2009-06-05 Colin D Bennett <colin@gibibit.com>
[grub2/phcoder.git] / ChangeLog
blobc7f7c068df4f744029c4631d2edd10bfc3a88dba
1 2009-06-05  Colin D Bennett  <colin@gibibit.com>
3         Optimized font character lookup using binary search instead of linear
4         search.  Fonts now are required to have the character index ordered by
5         code point.
7         * font/font.c (load_font_index): Verify that fonts have ordered
8         character indices.
9         (find_glyph): Use binary search instead of linear search to find a
10         character in a font.
12 2009-06-05  Michael Scherer  <misc@mandriva.org>
14         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
15         uses case sensitive btree.
16         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
17         only for case insensitive filesystems.
19 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
21         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
22         * conf/common.rmk (search_mod_CFLAGS): likewise
24 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
26         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to 
27         compensate a compiler bug
29 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
31         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitely define as 8
32         instead of '\b'
33         
34 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
36         Definitions for creating asm symbols with Apple's CC
38         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
39         [APPLE_CC] (VARIABLE): likewise
41 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
43         Disable lnxboot.img when compiled
44         with Apple's CC
46         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
47         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
48         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
49         [! APPLE_CC] (CODE_LENG): skip
50         [! APPLE_CC] (setup_sects): likewise
51         [! APPLE_CC]: skip filling
52         
53 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
55         Address in trampolines based on 32-bit registers when compiled
56         with Apple's CC
58         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers 
59         for addresses
60         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
62 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
64         Avoid aliases when compiling with Apple's CC for PCBIOS machine
66         * kern/misc.c [APPLE_CC] (memcpy): new function
67         [APPLE_CC] (memmove): likewise
68         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
69         (memcpy): define alias conditionaly on !APPLE_CC
70         (memset): likewise
71         (abort): likewise
72         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
73         APPLE_CC are defined
74         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
75         (grub_assert_fail): make prototype conditional
77 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
79         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
81         * conf/common.rmk (bin_UTILITIES): add (on false on condition) 
82         grub-macho2img 
83         (CLEANFILES): add grub-macho2img
84         (grub_macho2img_SOURCES): new variable
85         * kern/i386/pc/startup.S (bss_start): new variable
86         (bss_end): likewise
87         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
88         * util/grub-macho2img.c: new file
90 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
92         Use objconv when compiling with Apple's CC
94         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
95         (efiemu64.o): likewise
96         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
97         when compiling with Apple's CC
98         (efiemu64_s.o): likewise
99         * configure.ac: check for objconv when compiling with Apple's CC
100         * genmk.rb: use objconv for modules when compiled with Apple's CC
101         
102 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
104         Define segment as well as section when compiling with
105         Apple's CC
107         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
108         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
109         (efiemu_convert_pointer): likewise
110         (efiemu_set_virtual_address_map): likewise
111         (efiemu_convert_pointer): likewise
112         (efiemu_getcrc32): likewise
113         (init_crc32_table): likewise
114         (reflect): likewise
115         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
116         (GRUB_MOD_DEP): likewise
117         
118 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
120         Allow a compilation without -mcmodel=large
122         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
123         when compiled without -mcmodel=large
124         (filter_memory_map): remove memory post 4 GiB when compiled 
125         without -mcmodel=large
126         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to 
127         TARGET_CFLAGS when -mcmodel=large isn't supported
128         
129 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
131         Remove nested functions in efiemu core
133         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
134         
135 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
137         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
139         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
140         temporary storage
141         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when 
142         using Apple's CC 
143         (grub_cpu_is_tsc_supported): likewise
144         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
145         
146 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
148         Absolute addressing through constant with Apple's cc
150         * kern/i386/pc/startup.S: Define necessary constants
151         and address through it when using ABS with Apple's CC
152         * boot/i386/pc/diskboot.S: likewise
153         * boot/i386/pc/boot.S: likewise
154         * boot/i386/pc/lnxboot.S: likewise
155         * boot/i386/pc/cdboot.S: likewise
156         * mmap/i386/pc/mmap_helper.S: likewise
157         * commands/i386/pc/drivemap_int13h.S: likewise
159 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
161         Check if compiler is apple cc
163         * Makefile.in (ASFLAGS): new variable
164         (TARGET_ASFLAGS): likewise
165         (TARGET_MODULE_FORMAT): likewise
166         (TARGET_APPLE_CC): likewise
167         (OBJCONV): likewise
168         (TARGET_IMG_CFLAGS): likewise
169         (TARGET_CPPFLAGS): add includedir
170         * configure.ac: call grub_apple_cc and grub_apple_target_cc
171         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
172         Check for linker script only if compiler isn't Apple's CC
173         (TARGET_MODULE_FORMAT): set
174         (TARGET_APPLE_CC): likewise
175         (TARGET_ASFLAGS): likewise
176         (ASFLAGS): likewise
177         Check for objcopy only if compiler isn't Apple's CC
178         Check for BSS symbol only if compiler isn't Apple's CC
179         * genmk.rb: adapt nm options if we use Apple's utils
180         * aclocal.m4 (grub_apple_cc): new test
181         (grub_apple_target_cc): likewise
182         
183 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
185         Simplify sed expressions and improve awk
187         * Makefile.in (install-local): simplify sed expression
188         * gencmdlist.sh: likewise
189         * genmoddep.awk: avoid adding module as a dependency of itself
191 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
193         Add missing start symbols
195         * boot/i386/pc/boot.S: add start
196         * boot/i386/pc/pxeboot.S: likewise
197         
198 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
200         Fix wrong assumptions with grub-mkimage on EFI
201         
202         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
203         (relocate_addresses): consider both r_addend and value at offset
204         (make_mods_section): zerofill modinfo and header
205         (convert_elf): write prefix here
206         
207 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
209         Use .asciz instead of .string
211         * i386/pc/diskboot.S: use .asciz instead of .string
212         * i386/pc/boot.S: likewise
213         * include/grub/dl.h (GRUB_MOD_DEP): likewise
214         (GRUB_MOD_NAME): likewise
215         
216 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
218         gfxpayload support
220         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
221         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
222         (grub_video_setup): remove
223         (grub_video_set_mode): new prototype
224         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
225         (vid_mode): remove
226         (linux_vesafb_res): compile only on PCBIOS
227         (grub_linux_boot): support gfxpayload
228         * loader/i386/pc/xnu.c (video_hook): new function
229         (grub_xnu_set_video): support gfxpayload
230         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
231         (DEFAULT_VIDEO_HEIGHT): likewise
232         (DEFAULT_VIDEO_FLAGS): likewise
233         (DEFAULT_VIDEO_MODE): new definition
234         (video_hook): new function
235         (grub_gfxterm_init): use grub_video_set_mode
236         * util/grub.d/30_os-prober.in: remove explicit modesetting before 
237         loading xnu
238         * video/video.c (grub_video_setup): removed
239         (grub_video_set_mode): new function based on grub_gfxterm_init and 
240         grub_video_setup
242 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
244         Avoid calling biosdisk in drivemap
246         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
247         (revparse_biosdisk): likewise
248         (list_mappings): derive name from id directly
249         (grub_cmd_drivemap): use tryparse_diskstring
250         
251 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
253         Script fixes
255         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
256         (grub_lexer_param): add tokenonhold
257         (grub_script_create_cmdline): remove cmdline. All callers updated
258         (grub_script_function_create): make functionname
259         grub_script_arg. All callers updated
260         (grub_script_execute_argument_to_string): new prototype
261         * kern/parser.c (state_transitions): reorder
262         (grub_parser_cmdline_state): fix a bug and make more compact
263         * script/sh/execute.c (grub_script_execute_argument_to_string): 
264         make global
265         (grub_script_execute_cmdline): use new format
266         * script/sh/function.c (grub_script_function_create): make functionname
267         grub_script_arg. All callers updated
268         * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
269         (grub_script_yylex): remove
270         (grub_script_yylex2): renamed to ...
271         (grub_script_yylex): ...renamed
272         parse the expressions like a${b}c
273         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
274         (GRUB_PARSER_TOKEN_VAR): remove
275         (GRUB_PARSER_TOKEN_NAME): likewise
276         ("if"): declare as typeless
277         ("while"): likewise
278         ("function"): likewise
279         ("else"): likewise
280         ("then"): likewise
281         ("fi"): likewise
282         (text): remove
283         (argument): likewise
284         (script): accept empty scripts and make exit on error
285         (arguments): use GRUB_PARSER_TOKEN_ARG
286         (function): likewise
287         (command): move error handling to script
288         (menuentry): move grub_script_lexer_ref before
289         * script/sh/script.c (grub_script_create_cmdline): remove cmdline 
290         argument. All callers updated
292 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
294         Prevent GRUB from probing floppies during boot.
296         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
297         * commands/search.c (options): Add --no-floppy.
298         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
299         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
300         --no-floppy when searching for UUIDs.
302 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
304         Simplify the code duplication in commands/search.c.
306         * commands/search.c (search_label, search_fs_uuid): Merge into ...
307         (search_fs): ... this.  Update all users.
309 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
311         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
313 2009-05-28  Pavel Roskin  <proski@gnu.org>
315         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
316         Remove the original symlink explicitly.
318         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
319         just one slash.  That's how grub_fshelp_find_file() does it.
321 2009-05-26  Pavel Roskin  <proski@gnu.org>
323         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
324         to `str'.
326         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
327         possibly unused.
329 2009-05-25  Christian Franke  <franke@computer.org>
331         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
332         register.
333         (grub_atapi_identify): Add wait after drive select.
334         (grub_ata_identify): Do more strict status register check before
335         calling grub_atapi_identify ().  Suppress error message if status
336         register is 0x00 after command failure.  Add status register
337         check after PIO read to avoid bogus identify due to stuck DRQ.
338         Thanks to Pavel Roskin for testing.
339         (grub_device_initialize): Remove unsafe status register check.
340         Thanks to 'phcoder' for problem report and patch.
341         Prevent sign extension in debug message.
343 2009-05-23  Colin D Bennett  <colin@gibibit.com>
345         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
346         definition file, and functions defined in `normal/menu.c' have had
347         their prototypes moved to `include/grub/menu.h' for consistency.
349         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
350         from normal.h.
351         (grub_menu_get_entry): Likewise.
352         (grub_menu_get_timeout): Likewise.
353         (grub_menu_set_timeout): Likewise.
354         (grub_menu_execute_entry): Likewise.
355         (grub_menu_execute_with_fallback): Likewise.
356         (grub_menu_entry_run): Likewise.
358         * include/grub/normal.h: Re-ordered and grouped function
359         prototypes by file that the function is defined in.
360         (grub_menu_execute_callback): Removed; moved to menu.h.
361         (grub_menu_get_entry): Likewise.
362         (grub_menu_get_timeout): Likewise.
363         (grub_menu_set_timeout): Likewise.
364         (grub_menu_execute_entry): Likewise.
365         (grub_menu_execute_with_fallback): Likewise.
366         (grub_menu_entry_run): Likewise.
367         (grub_menu_addentry): Renamed from this ...
368         (grub_normal_add_menu_entry): ... to this.
370         * normal/main.c (grub_menu_addentry): Renamed from this ...
371         (grub_normal_add_menu_entry): ... to this.
373         * script/sh/execute.c (grub_script_execute_menuentry): Update
374         reference to renamed grub_menu_addentry function.
376 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
378         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
380 2009-05-22  Pavel Roskin  <proski@gnu.org>
382         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
383         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
384         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
385         compiling for the i386 targets, but not for the utilities.
387         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
388         to grub_uint8_t.
389         (grub_root_drive): Likewise.
390         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
391         remove alignment.
392         (grub_root_drive): Change size to byte.
393         (grub_start_addr): Remove.
394         (grub_end_addr): Likewise.
395         (grub_apm_bios_info): Likewise.
397 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
399         * normal/i386: Remove.
400         * normal/powerpc: Likewise.
401         * normal/sparc64: Likewise.
402         * normal/x86_64: Likewise.
404 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
406         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
407         * loader/i386/linux_trampoline.S: Fix identation
408         * loader/i386/xnu_helper.S: Likewise
410 2009-05-18  Colin D Bennett  <colin@gibibit.com>
412         Display error messages when parsing a Lua statement fails.
413         Previously, executing a syntactically invalid statement like
414         ")foo" or "bar;" would silently fail.
416         * script/lua/grub_main.c (handle_lua_error): New function.
417         (grub_lua_parse_line): Improved reporting of Lua parser and
418         execution errors.
420 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
422         Remove -Werror which causes build to fail on some systems
424         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
425         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
426         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
428 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
430         trampoline for linux on 64-bit platform
432         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
433         loader/i386/efi/linux_trampoline.S
434         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
435         declration
436         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
437         here
438         * loader/i386/linux_trampoline.S: moved here
439         * loader/i386/efi/linux.c (allocate_pages): reserve space for
440         trampoline
441         (jumpvector): removed
442         (grub_linux_trampoline_start): new declaration
443         (grub_linux_trampoline_end): likewise
444         (grub_linux_boot): use trampoline when on 64-bit platform
445         * loader/i386/linux.c: likewise
447 2009-05-16  Pavel Roskin  <proski@gnu.org>
449         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
450         const to avoid a warning.
451         (grub_lua_setenv): Likewise.
452         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
453         lmsg to fix a warning.
455 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
457         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
458         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
459         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
460         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
461         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
462         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
463         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
464         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
466 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
468         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
470 2009-05-16  Bean  <bean123ch@gmail.com>
472         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
473         (lua_mod_SOURCES): New variable.
474         (lua_mod_CFLAGS): Likewise.
475         (lua_mod_LDFLAGS): Likewise.
477         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
478         (setjmp_mod_SOURCES): New variable.
479         (setjmp_mod_CFLAGS): Likewise.
480         (setjmp_LDFLAGS): Likewise.
482         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
483         (setjmp_mod_SOURCES): New variable.
484         (setjmp_mod_CFLAGS): Likewise.
485         (setjmp_LDFLAGS): Likewise.
487         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
488         (setjmp_mod_SOURCES): New variable.
489         (setjmp_mod_CFLAGS): Likewise.
490         (setjmp_LDFLAGS): Likewise.
492         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
493         (setjmp_mod_SOURCES): New variable.
494         (setjmp_mod_CFLAGS): Likewise.
495         (setjmp_LDFLAGS): Likewise.
497         * normal/i386/setjmp.S: Moved from here ...
498         * lib/i386/setjmp.S: ... Moved here
499         * normal/x86_64/setjmp.S: Moved from here ...
500         * lib/x86_64/setjmp.S: ... Moved here
501         * normal/powerpc/setjmp.S: Moved from here ...
502         * lib/powerpc/setjmp.S: ... Moved here
503         * normal/sparc64/setjmp.S: Moved from here ...
504         * lib/sparc64/setjmp.S: ... Moved here
506         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
507         returns_twice in mingw.
509         * script/lua/grub_lib.c: New file.
510         * script/lua/grub_lib.h: Likewise.
511         * script/lua/grub_lua.h: Likewise.
512         * script/lua/grub_main.c: Likewise.
513         * script/lua/lapi.c: Likewise.
514         * script/lua/lapi.h: Likewise.
515         * script/lua/lauxlib.c: Likewise.
516         * script/lua/lauxlib.h: Likewise.
517         * script/lua/lbaselib.c: Likewise.
518         * script/lua/lcode.c: Likewise.
519         * script/lua/lcode.h: Likewise.
520         * script/lua/ldblib.c: Likewise.
521         * script/lua/ldebug.c: Likewise.
522         * script/lua/ldebug.h: Likewise.
523         * script/lua/ldo.c: Likewise.
524         * script/lua/ldo.h: Likewise.
525         * script/lua/ldump.c: Likewise.
526         * script/lua/lfunc.c: Likewise.
527         * script/lua/lfunc.h: Likewise.
528         * script/lua/lgc.c: Likewise.
529         * script/lua/lgc.h: Likewise.
530         * script/lua/linit.c: Likewise.
531         * script/lua/liolib.c: Likewise.
532         * script/lua/llex.c: Likewise.
533         * script/lua/llex.h: Likewise.
534         * script/lua/llimits.h: Likewise.
535         * script/lua/lmathlib.c: Likewise.
536         * script/lua/lmem.c: Likewise.
537         * script/lua/lmem.h: Likewise.
538         * script/lua/loadlib.c: Likewise.
539         * script/lua/lobject.c: Likewise.
540         * script/lua/lobject.h: Likewise.
541         * script/lua/lopcodes.c: Likewise.
542         * script/lua/lopcodes.h: Likewise.
543         * script/lua/loslib.c: Likewise.
544         * script/lua/lparser.c: Likewise.
545         * script/lua/lparser.h: Likewise.
546         * script/lua/lstate.c: Likewise.
547         * script/lua/lstate.h: Likewise.
548         * script/lua/lstring.c: Likewise.
549         * script/lua/lstring.h: Likewise.
550         * script/lua/lstrlib.c: Likewise.
551         * script/lua/ltable.c: Likewise.
552         * script/lua/ltable.h: Likewise.
553         * script/lua/ltablib.c: Likewise.
554         * script/lua/ltm.c: Likewise.
555         * script/lua/ltm.h: Likewise.
556         * script/lua/lua.h: Likewise.
557         * script/lua/luaconf.h: Likewise.
558         * script/lua/lualib.h: Likewise.
559         * script/lua/lundump.c: Likewise.
560         * script/lua/lundump.h: Likewise.
561         * script/lua/lvm.c: Likewise.
562         * script/lua/lvm.h: Likewise.
563         * script/lua/lzio.c: Likewise.
564         * script/lua/lzio.h: Likewise.
566 2009-05-16  Bean  <bean123ch@gmail.com>
568         * include/grub/kernel.h (grub_module_header_types): Add type
569         OBJ_TYPE_CONFIG.
571         * kern/main.c (grub_load_config): New function.
572         (grub_main): Call grub_load_config to read boot config.
574         * grub-mkimage (generate_image): New parameter config_path.
575         (options): New option --config.
576         (main): Parse --config option, and pass it to generate_image.
578 2009-05-14  Christian Franke  <franke@computer.org>
580         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
581         This fixes build on Cygwin.
583 2009-05-14  Pavel Roskin  <proski@gnu.org>
585         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
586         jump.  This saves two bytes, so the typical case of 2 swapped
587         drives would fit 32 bytes.
589 2009-05-13  Pavel Roskin  <proski@gnu.org>
591         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
592         grub_uint32_t to avoid a warning.
594         * loader/i386/linux.c (allocate_pages): When assigning
595         real_mode_mem, cast through grub_size_t to fix a warning.  The
596         code already makes sure that the value would fit a pointer.
597         (grub_linux_setup_video): Cast render_target->data to
598         grub_size_t to fix a warning.
600 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
602         * commands/i386/pc/drivemap.c: New file - implement drivemap
603         command.
604         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
605         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
607 2009-05-13  Pavel Roskin  <proski@gnu.org>
609         * util/i386/pc/grub-setup.c (setup): Remove unused variable
610         embedding_area_exists.
612 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
614         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
615         it easier to understand / work with.
616         Improve warning messages for cases where there's no embedding area,
617         or when it is too small (or core.img too large).
619 2009-05-13  Pavel Roskin  <proski@gnu.org>
621         * loader/i386/pc/multiboot2.c: Add necessary includes for
622         grub_multiboot2_real_boot().
624         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
625         PX record is always little-endian.  We only need the lower 2
626         bytes of the mode.
628         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
629         facilitate code reuse.
630         (grub_cpio_mount): Use "struct head", not a char buffer.  This
631         fixes a warning reported by gcc 4.4.
633         * kernel/disk.c (grub_disk_read): Use void pointer for the
634         buffer.
635         (grub_disk_write): Use const void pointer for the buffer.
636         Adjust all callers.  Remove unnecessary casts.
638 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
640         * util/i386/pc/grub-install.in: Update copyright year.
642 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
644         gptsync
646         * commands/gptsync.c: new file
647         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
648         (gptsync_mod_SOURCES): new variable
649         (gptsync_mod_CFLAGS): likewise
650         (gptsync_mod_LDFLAGS): likewise
651         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
652         new definition
653         (GRUB_PC_PARTITION_TYPE_HFS): likewise
654         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
655         * conf/i386-ieee1275.rmk: likewise
656         * conf/i386-pc.rmk: likewise
657         * conf/powerpc-ieee1275.rmk: likewise
659 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
661         Fixed grub-emu
663         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
664         (grub_dl_ref): likewise
666 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
668         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
669         split in two functions (one for msdos and one for gpt).
671 2009-05-08  Pavel Roskin  <proski@gnu.org>
673         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
674         not modified.
676         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
677         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
678         Initialize them with -1.  Add sanity check for bad1.  Eliminate
679         nerr variable.
681 2009-05-08  David S. Miller  <davem@davemloft.net>
683         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
685 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
687         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
688         existance.
690 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
692         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
693         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
695 2009-05-05  David S. Miller  <davem@davemloft.net>
697         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
699 2009-05-05  Pavel Roskin  <proski@gnu.org>
701         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
702         of grub_dl_ref() and grub_dl_unref().
703         * commands/parttool.c: Remove preprocessor conditionals around
704         grub_dl_ref() and grub_dl_unref().
705         * fs/affs.c: Likewise.
706         * fs/afs.c: Likewise.
707         * fs/cpio.c: Likewise.
708         * fs/ext2.c: Likewise.
709         * fs/fat.c: Likewise.
710         * fs/hfs.c: Likewise.
711         * fs/hfsplus.c: Likewise.
712         * fs/iso9660.c: Likewise.
713         * fs/jfs.c: Likewise.
714         * fs/minix.c: Likewise.
715         * fs/ntfs.c: Likewise.
716         * fs/reiserfs.c: Likewise.
717         * fs/sfs.c: Likewise.
718         * fs/udf.c: Likewise.
719         * fs/ufs.c: Likewise.
720         * fs/xfs.c: Likewise.
721         * include/grub/dl.h: Likewise.
722         * loader/xnu.c: Likewise.
724 2009-05-04  Pavel Roskin  <proski@gnu.org>
726         * commands/acpi.c: Remove unused variable my_mod.
727         * partmap/amiga.c: Likewise.
728         * partmap/apple.c: Likewise.
729         * partmap/gpt.c: Likewise.
730         * partmap/pc.c: Likewise.
731         * partmap/sun.c: Likewise.
732         * term/gfxterm.c: Likewise.
733         * term/i386/pc/vesafb.c: Likewise.
734         * term/i386/pc/vga.c: Likewise.
736 2009-05-04  David S. Miller  <davem@davemloft.net>
738         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
739         pointer args to grub_ieee1275_get_property().
741         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
743         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
744         devices, and do not traverse down under controller nodes.
746         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
747         (grub_ofdisk_open): Use it to un-escape "," characters.
748         * kern/disk.c (find_part_sep): New.
749         (grub_disk_open): Use it to find the first non-escaped ','
750         character in the disk name.
751         * util/ieee1275/devicemap.c (escape_of_path): New.
752         (grub_util_emit_devicemap_entry): Use it.
753         * util/sparc64/ieee1275/grub-install.in: Update script to
754         strip partition specifiers properly by not triggering on
755         '\' escaped ',' characters.
757 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
759         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
760         to 0x300.
761         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
762         resolutions.
763         (linux_vesafb_modes): Add a lot of additional modes to the list (based
764         on documentation from Wikipedia).
766 2009-05-04  Pavel Roskin  <proski@gnu.org>
768         * disk/ata.c: Spelling fixes.
769         * disk/raid.c: Likewise.
770         * disk/usbms.c: Likewise.
771         * disk/dmraid_nvidia.c: Likewise.
772         * kern/ieee1275/openfw.c: Likewise.
773         * kern/ieee1275/init.c: Likewise.
774         * kern/ieee1275/cmain.c: Likewise.
775         * boot/i386/pc/cdboot.S: Likewise.
776         * video/readers/png.c: Likewise.
777         * video/i386/pc/vbe.c: Likewise.
778         * fs/udf.c: Likewise.
779         * fs/hfs.c: Likewise.
780         * fs/reiserfs.c: Likewise.
781         * efiemu/runtime/efiemu.c: Likewise.
782         * efiemu/main.c: Likewise.
783         * efiemu/mm.c: Likewise.
784         * include/grub/elf.h: Likewise.
785         * include/grub/xnu.h: Likewise.
786         * include/grub/usbdesc.h: Likewise.
787         * include/grub/usb.h: Likewise.
788         * include/grub/script_sh.h: Likewise.
789         * include/grub/lib/LzmaEnc.h: Likewise.
790         * include/grub/efiemu/efiemu.h: Likewise.
791         * include/grub/command.h: Likewise.
792         * normal/menu.c: Likewise.
793         * normal/main.c: Likewise.
794         * normal/datetime.c: Likewise.
795         * bus/usb/uhci.c: Likewise.
796         * mmap/i386/uppermem.c: Likewise.
797         * mmap/mmap.c: Likewise.
798         * commands/acpi.c: Likewise.
799         * commands/test.c: Likewise.
800         * partmap/apple.c: Likewise.
801         * font/font.c: Likewise.
802         * loader/sparc64/ieee1275/linux.c: Likewise.
803         * loader/macho.c: Likewise.
804         * loader/i386/bsd_trampoline.S: Likewise.
805         * loader/i386/bsd.c: Likewise.
806         * loader/xnu.c: Likewise.
807         * term/i386/pc/vesafb.c: Likewise.
808         * term/usb_keyboard.c: Likewise.
809         * util/resolve.c: Likewise.
810         * util/getroot.c: Likewise.
812 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
814         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
816 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
818         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
819         build error.
821 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
823         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
824         parameter only available on BIOS.
826 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
828         Removed wrong semicolon in declaration
830         * grub/misc.h (grub_dprintf): remove semicolon
832 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
834         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
835         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
836         is done by grub_cmd_linux() now).
837         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
838         restore video to text mode.
839         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
840         indicates lack of "vga=" parameter.  "vga=0" is mapped to
841         `GRUB_LINUX_VID_MODE_NORMAL'.
843 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
845         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
846         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
847         and `normal/script.c'.  Add `kern/rescue_reader.c',
848         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
849         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
850         `grub_script.tab.c'.
852         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
853         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
854         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
855         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
856         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
858         * Makefile.in: Remove duplicated 2008 in Copyright line.
860 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
862         * util/misc.c (grub_util_warn): New function.  Emmits a warning
863         unconditionally.
864         * include/grub/util/misc.h (grub_util_warn): New declaration.
866         * util/i386/pc/grub-install.in: Understand --force and pass it down
867         to grub-setup.
869         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
870         down to setup().
871         (setup): Improve error messages and add warnings when requested to
872         install in odd layouts.  Refuse to install using blocklists unless
873         --force was set.
875 2009-05-04  martin f. krafft  <madduck@madduck.net>
877         * disk/raid.c (grub_raid_scan_device): Improve debug message.
879 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
881         Updated copyright year
883         * fs/hfsplus.c: updated copyright year
885 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
887         HFS+ UUID
889         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
890         in the space previously used by unused3
891         (grub_hfsplus_uuid): new function
892         (grub_hfsplus_fs): added uuid field
894 2009-05-03  Pavel Roskin  <proski@gnu.org>
896         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
897         suppress warnings.  It's no longer needed.
898         * disk/host.c: Likewise.
899         * disk/ata_pthru.c: Likewise.
900         * disk/loopback.c: Likewise.
901         * hook/datehook.c: Likewise.
902         * parttool/pcpart.c: Likewise.
903         * fs/i386/pc/pxe.c: Likewise.
904         * fs/ntfscomp.c: Likewise.
905         * efiemu/main.c: Likewise.
906         * mmap/mmap.c: Likewise.
907         * commands/crc.c: Likewise.
908         * commands/hexdump.c: Likewise.
909         * commands/hdparm.c: Likewise.
910         * commands/acpi.c: Likewise.
911         * commands/echo.c: Likewise.
912         * commands/minicmd.c: Likewise.
913         * commands/blocklist.c: Likewise.
914         * commands/memrw.c: Likewise.
915         * commands/loadenv.c: Likewise.
916         * commands/usbtest.c: Likewise.
917         * commands/lsmmap.c: Likewise.
918         * commands/boot.c: Likewise.
919         * commands/parttool.c: Likewise.
920         * commands/configfile.c: Likewise.
921         * commands/search.c: Likewise.
922         * commands/ieee1275/suspend.c: Likewise.
923         * commands/cat.c: Likewise.
924         * commands/i386/pc/pxecmd.c: Likewise.
925         * commands/i386/pc/play.c: Likewise.
926         * commands/i386/pc/halt.c: Likewise.
927         * commands/i386/pc/vbeinfo.c: Likewise.
928         * commands/i386/pc/vbetest.c: Likewise.
929         * commands/lspci.c: Likewise.
930         * commands/date.c: Likewise.
931         * commands/handler.c: Likewise.
932         * commands/ls.c: Likewise.
933         * commands/test.c: Likewise.
934         * commands/cmp.c: Likewise.
935         * commands/efi/loadbios.c: Likewise.
936         * commands/efi/fixvideo.c: Likewise.
937         * commands/halt.c: Likewise.
938         * commands/help.c: Likewise.
939         * commands/reboot.c: Likewise.
940         * hello/hello.c: Likewise.
941         * script/sh/main.c: Likewise.
942         * loader/xnu.c: Likewise.
943         * term/terminfo.c: Likewise.
944         * term/i386/pc/serial.c: Likewise.
945         * term/usb_keyboard.c: Likewise.
947 2009-05-03  David S. Miller  <davem@davemloft.net>
949         * normal/menu.c: Include grub/parser.h
951 2009-05-03  Pavel Roskin  <proski@gnu.org>
953         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
954         not char*.
955         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
956         Suggested by Javier Martín <lordhabbit@gmail.com>
958         * util/i386/pc/grub-mkrescue.in: Allow for the case when
959         efiemu??.o doesn't exist.
960         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
961         copying.
963 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
965         FreeBSD 64-bit support
967         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
968         and loader/i386/bsd_trampoline.S
969         (bsd_mod_ASFLAGS): new variable
970         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
971         (FREEBSD_MODTYPE_KERNEL64): likewise
972         (grub_bsd64_trampoline_start): likewise
973         (grub_bsd64_trampoline_end): likewise
974         (grub_bsd64_trampoline_selfjump): likewise
975         (grub_bsd64_trampoline_gdt): likewise
976         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
977         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
978         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
979         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
980         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
981         of "attrib" member
982         * loader/i386/bsd_pagetable.c: new file
983         * loader/i386/bsd_trampoline.S: likewise
984         * loader/i386/bsd.c (ALIGN_QWORD): new macro
985         (ALIGN_VAR): likewise
986         (entry_hi): new variable
987         (kern_end_mdofs): likewise
988         (is_64bit): likewise
989         (grub_freebsd_add_meta): use ALIGN_VAR
990         (grub_e820_mmap): new declaration
991         (grub_freebsd_add_mmap): new function
992         (grub_freebsd_add_meta_module): support 64 bit kernels
993         (grub_freebsd_list_modules): use ALIGN_VAR
994         (gdt_descriptor): new declaration
995         (grub_freebsd_boot): support 64 bit kernels
996         (grub_bsd_elf64_hook): new function
997         (grub_bsd_load_elf): support elf64
999 2009-05-03  Bean  <bean123ch@gmail.com>
1001         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1002         after we get the result of if statement.
1004 2009-05-03  Bean  <bean123ch@gmail.com>
1006         * Makefile.in (enable_efiemu): New variable.
1008         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1009         set.
1010         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1011         path.
1012         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1013         path, add -mno-red-zone option.
1014         (efiemu64_s.o): Likewise.
1015         (efiemu64.o): Use macro $^ for source file.
1017         * configure.ac (--enable-efiemu): New option.
1019 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1021         xnu support
1023         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1024         (pkglib_MODULES): add xnu.mod
1025         (xnu_mod_SOURCES): new variable
1026         (xnu_mod_CFLAGS): likewise
1027         (xnu_mod_LDFLAGS): likewise
1028         (xnu_mod_ASFLAGS): likewise
1029         * conf/i386-pc.rmk: likewise
1030         * conf/x86_64-efi.rmk: likewise
1031         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1032         new declaration
1033         * include/grub/i386/macho.h: new file
1034         * include/grub/i386/xnu.h: likewise
1035         * include/grub/macho.h: likewise
1036         * include/grub/machoload.h: likewise
1037         * include/grub/x86_64/macho.h: likewise
1038         * include/grub/x86_64/xnu.h: likewise
1039         * include/grub/xnu.h: likewise
1040         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1041         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1042         * loader/i386/efi/xnu.c: new file
1043         * loader/i386/pc/xnu.c: likewise
1044         * loader/i386/xnu.c: likewise
1045         * loader/i386/xnu_helper.S: likewise
1046         * loader/macho.c: likewise
1047         * loader/xnu.c: likewise
1048         * loader/xnu_resume.c: likewise
1049         * util/grub-dumpdevtree: likewise
1050         * include/grub/i386/pit.h: include grub/err.h
1051         (grub_pit_wait): export
1052         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1054 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1056         Efiemu
1058         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1059         _linux_efi, linux_efi.
1060         new files in grub-emu
1061         new targets efiemu32.o and efiemu64.o
1062         * loader/linux_normal_efiemu.c: likewise
1063         * loader/i386/efi/linux.c: added preliminary efiemu support
1064         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1065         files to copy
1066         * include/grub/autoefi.h: new file
1067         * include/grub/i386/efiemu.h: likewise
1068         * include/grub/i386/pc/efiemu.h: likewise
1069         * include/grub/efi/api.h: add LL suffix when necessary
1070         new definitions relating to tables
1071         * include/grub/efiemu/efiemu.h: new file
1072         * include/grub/efiemu/runtime.h: likewise
1073         * efiemu/prepare.c: likewise
1074         * efiemu/loadcore_common.c: likewise
1075         * efiemu/loadcore64.c: likewise
1076         * efiemu/runtime/efiemu.sh: likewise
1077         * efiemu/runtime/efiemu.S: likewise
1078         * efiemu/runtime/efiemu.c: likewise
1079         * efiemu/runtime/config.h: likewise
1080         * efiemu/prepare32.c: likewise
1081         * efiemu/main.c: likewise
1082         * efiemu/modules/pnvram.c: likewise
1083         * efiemu/modules/i386: likewise
1084         * efiemu/modules/i386/pc: likewise
1085         * efiemu/modules/acpi.c: likewise
1086         * efiemu/i386/pc/cfgtables.c: likewise
1087         * efiemu/i386/loadcore64.c: likewise
1088         * efiemu/i386/loadcore32.c: likewise
1089         * efiemu/prepare64.c: likewise
1090         * efiemu/loadcore.c: likewise
1091         * efiemu/symbols.c: likewise
1092         * efiemu/mm.c: likewise
1093         * efiemu/loadcore32.c: likewise
1095 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1097         ACPI spoofing
1099         * commands/acpi.c: new file
1100         * commands/i386/pc/acpi.c: likewise
1101         * commands/efi/acpi.c: likewise
1102         * include/grub/acpi.h: likewise
1103         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1104         (acpi_mod_SOURCES): new variable
1105         (acpi_mod_CFLAGS): likewise
1106         (acpi_mod_LDFLAGS): likewise
1107         * conf/i386-efi.rmk: likewise
1108         * conf/x86_64-efi.rmk: likewise
1110 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1112         Missing part from mmap patch
1114         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1115         (grub_mmap_unregister)
1116         (grub_mmap_free_and_unregister): use grub_mmap_register
1118 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1120         Mmap services
1122         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1123         * loader/i386/linux.c (find_mmap_size): likewise
1124         (allocate_pages): likewise
1125         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1126         (grub_fill_multiboot_mmap): likewise
1127         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1128         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1129         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1130         (OPENBSD_MMAP_RESERVED): likewise
1131         * include/grub/i386/pc/memory.h: include grub/memory.h
1132         (grub_lower_mem): removed
1133         (grub_upper_mem): likewise
1134         (GRUB_MACHINE_MEMORY_ACPI): new definition
1135         (GRUB_MACHINE_MEMORY_NVS): likewise
1136         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1137         (GRUB_MACHINE_MEMORY_HOLE): likewise
1138         (grub_machine_mmap_register): likewise
1139         (grub_machine_mmap_unregister): likewise
1140         (grub_machine_get_upper): likewise
1141         (grub_machine_get_lower): likewise
1142         (grub_machine_get_post64): likewise
1143         * include/grub/i386/efi/memory.h: new file
1144         * include/grub/x86_64/efi/memory.h: likewise
1145         * include/grub/efi/memory.h: likewise
1146         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1147         (mmap_mod_SOURCES): new variable
1148         (mmap_mod_LDFLAGS): likewise
1149         (mmap_mod_ASFLAGS): likewise
1150         * conf/i386-coreboot.rmk: likewise
1151         * conf/i386-ieee1275.rmk: likewise
1152         * conf/i386-efi.rmk: likewise
1153         * conf/x86_64-efi.rmk: likewise
1154         * include/grub/types.h (UINT_TO_PTR): new macro
1155         (PTR_TO_UINT32): likewise
1156         (PTR_TO_UINT64): likewise
1157         * include/grub/memory.h: new file
1158         * mmap/i386/pc/mmap.c: likewise
1159         * mmap/i386/pc/mmap_helper.S: likewise
1160         * mmap/i386/uppermem.c: likewise
1161         * mmap/mmap.c: likewise
1162         * mmap/efi/mmap.c: likewise
1163         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1164         grub_upper_mem
1165         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1166         (grub_upper_mem): likewise
1167         (grub_machine_init): don't use grub_upper_mem,
1168         make grub_lower_mem local
1169         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1170         grub_mmap_iterate and grub_mmap_get_upper
1171         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1173 2009-05-02  Bean  <bean123ch@gmail.com>
1175         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1176         script/sh/parser.y.
1177         (pkglib_MODULES): Add normal.mod and sh.mod.
1178         (normal_SOURCES): New variable.
1179         (normal_mod_CFLAGS): Likewise.
1180         (normal_mod_LDFLAGS): Likewise.
1181         (sh_mod_SOURCES): Likewise.
1182         (sh_mod_CFLAGS): Likewise.
1183         (sh_mod_LDFLAGS): Likewise.
1185         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1186         script/sh/lexer.c_DEPENDENCIES.
1187         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1188         kern/rescue_reader.c and kern/rescue_parser.c.
1189         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1190         (grub_emu_SOURCES): Change source files.
1191         (pkglib_MODULES): Remove normal.mod.
1192         (normal_SOURCES): Removed.
1193         (normal_mod_CFLAGS): Likewise.
1194         (normal_mod_LDFLAGS): Likewise.
1195         * conf/i386-coreboot.rmk: Likewise.
1196         * conf/i386-efi.rmk: Likewise.
1197         * conf/i386-ieee1276.rmk: Likewise.
1198         * conf/powerpc-ieee1275.rmk: Likewise.
1199         * conf/sparc64-ieee1275.rmk: Likewise.
1200         * conf/x86_64-efi.rmk: Likewise.
1202         * include/grub/command.h (grub_command_execute): New inline function.
1204         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1206         * include/grub/normal.h: Remove <grub/setjmp.h>.
1207         (grub_fs_module_list): Moved to normal/autofs.c.
1208         (grub_exit_env): Removed.
1209         (grub_command_execute): Likewise.
1210         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1211         parameter script.
1212         (read_command_list): New function declaration.
1213         (read_fs_list): Likewise.
1215         * include/parser.h: Include <grub/reader.h>.
1216         (grub_parser_split_cmdline): Change type of getline parameter.
1217         (grub_parser): New structure.
1218         (grub_parser_class): New variable.
1219         (grub_parser_execute): New function declaration.
1220         (grub_register_rescue_parser): Likewise.
1221         (grub_parser_register): New inline function.
1222         (grub_parser_unregister): Likewise.
1223         (grub_parser_get_current): Likewise.
1224         (grub_parser_set_current): Likewise.
1226         * include/grub/reader.h: New file.
1227         * kern/reader.c: Likewise.
1228         * kern/rescue_parser.c: Likewise.
1229         * kern/rescue_reader.c: Likewise.
1230         * normal/autofs.c: Likewise.
1231         * normal/dyncmd.c: Likewise.
1233         * include/grub/rescue.h: Removed.
1234         * normal/command.h: Likewise.
1236         * include/grub/script.h: Moved to ...
1237         * include/grub/script_sh.h: ... Moved here.
1238         * normal/execute.c: Moved to ...
1239         * script/sh/execute.c: ... Moved here.
1240         * normal/function.c: Moved to ...
1241         * script/sh/function.c: ... Moved here.
1242         * normal/lexer.c: Moved to ...
1243         * script/sh/lexer.c: ... Moved here.
1244         * normal/parser.y: Moved to ...
1245         * script/sh/parser.y: ... Moved here.
1246         * normal/script.c: Moved to ...
1247         * script/sh/script.c: ... Moved here.
1249         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1250         <grub/reader.h>.
1251         (grub_exit_env): Removed.
1252         (fs_module_list): Moved to normal/autofs.c.
1253         (grub_file_getline): Don't handle comment here.
1254         (free_menu): Skip removed field entry->commands.
1255         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1256         script parameter.
1257         (read_config_file): Removed nested parameter, change getline function.
1258         (grub_enter_normal_mode): Removed.
1259         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1260         (read_command_list): Likewise.
1261         (autoload_fs_module): Moved to normal/autofs.c.
1262         (read_fs_list): Likewise.
1263         (reader_nested): New variable.
1264         (grub_normal_execute): Run parser.sh to switch to sh parser.
1265         (grub_cmd_rescue): Removed.
1266         (cmd_normal): Removed.
1267         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1268         rescue command.
1269         (grub_cmdline_run): New function.
1270         (grub_normal_reader_init): Likewise.
1271         (grub_normal_read_line): Likewise.
1272         (grub_env_write_pager): Likewise.
1273         (cmdline): New variable.
1274         (grub_normal_reader): Likewise.
1275         (GRUB_MOD_INIT): Register normal reader and set as current, register
1276         pager hook, register normal command with grub_register_command_prio,
1277         so that it won't show up in command.lst.
1278         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1279         grub_fs_autoload_hook.
1281         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1282         (grub_menu_execute_entry): Replace grub_script_execute with
1283         grub_parser_execute, change parameter to grub_command_execute.
1285         * normal/menu_text.c: Remove <grub/script.h>.
1287         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1288         and <grub/parser.h>.
1289         (run): Change editor_getline to use new parser interface. Change
1290         parameter to grub_command_execute.
1292         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1293         <grub/reader.h> and <grub/parser.h>.
1294         (grub_load_normal_mode): Execute normal command.
1295         (grub_main): Call grub_register_core_commands,
1296         grub_register_rescue_parser and grub_register_rescue_reader, use
1297         grub_reader_loop to enter input loop.
1299         * kern/parser.c (grub_parser_split_cmdline): Change type of
1300         getline parameter.
1301         (grub_parser_class): New variable.
1302         (grub_parser_execute): New function.
1304         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1305         * loader/multiboot2.c: Likewise.
1306         * loader/sparc64/ieee1275/linux.c: Likewise.
1308         * util/grub-emu.c (read_command_list): New dummy function.
1310 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1312         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1313         count to 16 for CCISS and IDA.
1315 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1317         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1318         after waiting for user input.
1320         * loader/i386/linux.c: Include `<grub/normal.h>'.
1321         (grub_cmd_linux): Improve the error message about `ask' mode, by
1322         waiting for user input so it's not missed (we can do this, since
1323         user requested interaction).
1325 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1327         Added missing lst to grub-mkrescue
1329         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1330         and ${input_dir}/parttool.lst
1332 2009-04-30  David S. Miller  <davem@davemloft.net>
1334         * util/hostdisk.c (device_is_wholedisk): New function.
1335         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1336         zero only if device_is_wholedisk() returns true.
1338         * util/hostdisk.c (convert_system_partition_to_system_disk):
1339         Handle virtual disk devices named /dev/vdiskX as found on sparc
1340         and powerpc.
1342         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1343         lettered partition specifier is found, convert to numbered.
1345 2009-04-29  David S. Miller  <davem@davemloft.net>
1347         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1348         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1350         * normal/command.c: Add missing newline at end of file.
1352         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1353         warnings.
1354         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1355         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1356         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1357         ihandles have a 32-bit type but need to be stored in a "void *".
1359 2009-04-28  Pavel Roskin  <proski@gnu.org>
1361         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1362         not disk.  Adjust all dependencies.
1363         (grub_fs_uuid_close): Use grub_device_close(), not
1364         grub_disk_close().
1366         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1367         parent's partition, don't copy it by reference, as it gets freed
1368         on close.
1370 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1372         Preboot hooks support
1374         * commands/boot.c (struct grub_preboot_t): new declaration
1375         (preboots_head): new variable
1376         (preboots_tail): likewise
1377         (grub_loader_register_preboot_hook): new function
1378         (grub_loader_unregister_preboot_hook): likewise
1379         (grub_loader_set): launch preboot hooks
1380         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1381         (grub_loader_register_preboot_hook): new declaration
1382         (grub_loader_unregister_preboot_hook): likewise
1384 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1386         Warning fix
1388         * disk/scsi.c (grub_scsi_open): added missing cast when
1389         calling grub_dprintf
1391 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1393         Bug and warning fixes
1395         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1396         declaration
1397         * commands/test.c (test_parse): fixed bug with file tests and corrected
1398         declaration of find_file
1400 2009-04-26  Pavel Roskin  <proski@gnu.org>
1402         * Makefile.in: Don't install empty manual pages if help2man is
1403         missing.  Use help2man option for output, not shell redirection.
1405 2009-04-26  David S. Miller  <davem@davemloft.net>
1407         * util/grub-mkdevicemap.c (make_device_map): Add missing
1408         NESTED_FUNC_ATTR to process_device().
1410 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1412         Test command
1414         * commands/test.c: rewritten to use bash-like test
1416 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1418         Parttool autoloading and improvements
1420         * Makefile.in (pkglib_DATA): add parttool.lst
1421         (parttool.lst): new target
1422         * genmk.rb: generate parttool-*
1423         (CLEANFILES): add #{parttool}
1424         (PARTTOOLFILES): new variable
1425         * genparttoollist.sh: new file
1426         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1427         (grub_pcpart_type): likewise
1428         * commands/parttool.c (helpmsg): new variable
1429         (grub_cmd_parttool): output help if not enough arguments are supplied
1430         autoload modules
1431         (GRUB_MOD_INIT(parttool)): use helpmsg
1433 2009-04-24  David S. Miller  <davem@davemloft.net>
1435         Avoiding opening same device multiple times in device iterator.
1437         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1438         and use it to build a list of partitions in iterate_disk() and
1439         iterate_partition().
1441         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1442         on disk->data.
1444         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1445         grub_devalias_iterate() result instead of unconditional 0.
1446         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1447         Also, capture hook return value, either directly or via
1448         grub_children_iterate(), and propagate to caller.
1449         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1450         grub_children_iterate): Return value is now 'int' instead of
1451         'grub_err_t'.
1452         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1453         like a proper iterator, stopping when hooks return non-zero.
1454         (grub_devalias_iterate): Likewise.
1456 2009-04-23  David S. Miller  <davem@davemloft.net>
1458         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1460 2009-04-22  David S. Miller  <davem@davemloft.net>
1462         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1463         is larger than address_cells, use that value for address_cells too.
1465         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1466         IEEE1275_MAX_PATH_LEN): Define.
1467         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1468         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1469         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1470         'devtype'.  Explicitly NULL terminate devalias expansion.
1472         * util/sparc64/ieee1275/misc.c: New file.
1473         * util/sparc64/ieee1275/grub-setup.c: New file.
1474         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1475         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1476         * util/sparc64/ieee1275/grub-install.in: New file.
1477         * util/ieee1275/ofpath.c: New file.
1478         * util/ieee1275/devicemap.c: New file.
1479         * util/devicemap.c: New file.
1480         * util/deviceiter.c: New file.
1481         * kern/sparc64/ieee1275/init.c: New file.
1482         * include/grub/util/ofpath.h: New file.
1483         * include/grub/util/deviceiter.h: New file.
1484         * util/grub-mkdevicemap.c: Include deviceiter.h.
1485         Implement using grub_util_emit_devicemap_entry and
1486         grub_util_iterate_devices.
1487         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1488         util/devicemap.c into grub-mkdevicemap
1489         * conf/i386-efi.rmk: Likewise.
1490         * conf/i386-ieee1275.rmk: Likewise.
1491         * conf/i386-pc.rmk: Likewise.
1492         * conf/powerpc-ieee1275.rmk: Likewise.
1493         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1494         images and installation utilities.  Build kernel as image
1495         instead of as elf binary.  Use common rules as much as possible.
1497 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1499         Correct GPT definition
1501         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1502         of "attrib" member
1504 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1506         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1508 2009-04-19  David S. Miller  <davem@davemloft.net>
1510         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1511         (grub_rescue_cmd_linux): Rename to...
1512         (grub_cmd_linux): and fix prototype.
1513         (grub_rescue_cmd_initrd): Rename to...
1514         (grub_cmd_initrd): and fix prototype.
1515         (cmd_linux, cmd_initrd): New.
1516         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1517         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1519 2009-04-17  Pavel Roskin  <proski@gnu.org>
1521         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1522         format.
1523         (grub_ohci_transfer): Likewise.
1525         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1527         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1528         return without a value.  Fix inconsistent indentation.
1530         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1531         match struct grub_fs.
1533         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1534         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1535         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1536         * commands/lspci.c (grub_lspci_iter): Likewise.
1538 2009-04-16  Bean  <bean123ch@gmail.com>
1540         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1541         value.
1543 2009-04-15  Pavel Roskin  <proski@gnu.org>
1545         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1546         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1547         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1548         definitions.
1550 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1552         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1553         that no multiple data or metadata areas are supported and `Unknown
1554         metadata header'.
1556 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1558         Move loader out of the kernel
1560         * kern/loader.c: moved to ...
1561         * commands/boot.c: ... moved here
1562         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1563         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1564         * include/grub/kernel.h (grub_machine_fini): export
1565         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1566         (grub_loader_set): likewise
1567         (grub_loader_unset): likewise
1568         (grub_loader_boot): likewise
1569         * conf/common.rmk: new module boot.mod
1570         (pkglib_MODULES): add boot.mod
1571         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1572         (grub_emu_SOURCES): likewise
1573         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1574         (grub_emu_SOURCES): likewise
1575         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1576         (grub_emu_SOURCES): likewise
1577         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1578         (grub_emu_SOURCES): likewise
1579         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1580         (grub_emu_SOURCES): likewise
1581         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1582         (grub_emu_SOURCES): likewise
1583         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1584         (grub_emu_SOURCES): likewise
1586 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1588         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1590         * kern/misc.c (grub_itoa): Removed function
1591         (grub_ltoa): likewise
1592         (grub_vsprintf): use grub_lltoa
1594 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1596         Restore grub-emu
1598         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1599         * conf/i386-coreboot.rmk: likewise
1600         * conf/i386-ieee1275.rmk: likewise
1601         * conf/powerpc-ieee1275.rmk: likewise
1603 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1605         * INSTALL: Add that `./autogen.sh' needs to be run before
1606         `./configure.'.
1608 2009-04-14  Bean  <bean123ch@gmail.com>
1610         * Makefile.in (pkglib_DATA): Add handler.lst.
1611         (handler.lst): New rule.
1613         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1614         * conf/i386-coreboot.rmk: Likewise.
1615         * conf/i386-ieee1275.rmk: Likewise.
1616         * conf/i386-efi.rmk: Likewise.
1617         * conf/x86_64-efi.rmk: Likewise.
1618         * conf/powerpc-ieee1275.rmk: Likewise.
1619         * conf/sparc64-ieee1275.rmk: Likewise.
1621         * genhandlerlist.sh: New file.
1623         * genmk.rb: Add rules to generate handler.lst.
1625         * include/grub/normal.h (grub_file_getline): New function definition.
1626         (read_handler_list): Likewise.
1627         (free_handler_list): Likewise.
1629         * include/grub/term.h (grub_term_register_input): Add name parameter
1630         for auto generation of handler.lst.
1631         (grub_term_register_output): Likewise.
1633         * normal/handler.c: New file.
1635         * normal/main.c (get_line): Renamed to grub_file_getline.
1636         (read_config_file): Use the newly renamed grub_file_getline.
1637         (read_command_list): Likewise.
1638         (read_fs_list): Likewise.
1639         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1640         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1642         * term/efi/console.c (grub_console_init): Add name parameter for auto
1643         generation of handler.lst.
1644         * term/gfxterm.c: Likewise.
1645         * term/i386/pc/at_keyboard.c: Likewise.
1646         * term/i386/pc/console.c: Likewise.
1647         * term/i386/pc/serial.c: Likewise.
1648         * term/i386/pc/vesafb.c: Likewise.
1649         * term/i386/pc/vga.c: Likewise.
1650         * term/i386/pc/vga_text.c: Likewise.
1651         * term/ieee1275/ofconsole.c: Likewise.
1652         * term/usb_keyboard.c: Likewise.
1654 2009-04-14  Bean  <bean123ch@gmail.com>
1656         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1657         properly with null character.
1659 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1661         * configure: Remove.
1662         * config.h.in: Likewise.
1663         * stamp-h.in: Likewise.
1664         * DISTLIST: Likewise.
1665         * conf/common.mk: Likewise.
1666         * conf/i386-coreboot.mk: Likewise.
1667         * conf/i386-efi.mk: Likewise.
1668         * conf/i386-ieee1275.mk: Likewise.
1669         * conf/i386.mk: Likewise.
1670         * conf/i386-pc.mk: Likewise.
1671         * conf/powerpc-ieee1275.mk: Likewise.
1672         * conf/sparc64-ieee1275.mk: Likewise.
1673         * conf/x86_64-efi.mk: Likewise.
1675         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1676         develop on GRUB.
1678 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1679             David S. Miller  <davem@davemloft.net>
1681         * util/hostdisk.c (make_device_name): Fix buffer length
1682         calculations.
1684 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1686         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1687         <sys/param.h> and <sys/sysctl.h>.
1688         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1689         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1690         opening the device and reset them afterwards.
1692 2009-04-13  Pavel Roskin  <proski@gnu.org>
1694         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1695         Reported by John Stanley <jpsinthemix@verizon.net>
1697 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1699         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1700         that name for menuentries when appropriate.
1702 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1704         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1706 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1708         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1709         to Linux, simply abort telling the user it's no longer supported.
1711 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1713         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1714         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1715         `freebsd_loadenv' only when devices.hints exist.
1717 2009-04-13  Pavel Roskin  <proski@gnu.org>
1719         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1721 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1723         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1724         partition number.
1725         (grub_drive): Likewise.
1727 2009-04-13  David S. Miller  <davem@davemloft.net>
1729         * kern/sparc64/ieee1275/ieee1275.c: New file.
1730         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1731         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1732         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1733         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1734         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1735         grub_ieee1275_alloc_physmem): Declare new exported functions.
1737         * include/grub/sparc64/ieee1275/loader.h: New file.
1738         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1739         * include/grub/sparc64/kernel.h: Likewise.
1740         * loader/sparc64/ieee1275/linux.c: Likewise.
1742         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1743         (grub_fstest_SOURCES): Likewise.
1745         * util/hostdisk.c (make_device_name): Do not make any assumptions
1746         about the length of drive names.
1748         * kern/dl.c (grub_dl_load_file): Close file immediately when
1749         we are done using it.
1751 2009-04-12  David S. Miller  <davem@davemloft.net>
1753         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1754         values.  Noticed by Pavel Roskin.
1756         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1757         target compiler.
1759         * genmk.rb: Add more flexible image type specification, also
1760         pass --strip-unneeded to objcopy.
1761         * conf/i386-pc.rmk: Use *_FORMAT.
1762         * conf/i386-pc.mk: Rebuilt.
1764         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1765         (OFDISK_HASH_SZ): Define.
1766         (ofdisk_hash): New hash table.
1767         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1768         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1769         instead of device phandle which is not unique.
1771         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1772         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1773         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1774         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1775         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1776         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1777         GRUB_KERNEL_MACHINE_DATA_END): Define.
1778         (grub_kernel_image_size, grub_total_module_size): Declare.
1780 2009-04-12  Pavel Roskin  <proski@gnu.org>
1782          * configure.ac: Change the logic when we check for target tools.
1783          Do it when the target is specified and it's different from the
1784          specified value of the host.
1786 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1788         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1789         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1790         GNU/kFreeBSD. Check if a device is a character device. Use
1791         DIOCGMEDIASIZE to get the size.
1792         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1793         support for GNU/kFreeBSD.
1794         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1795         is a character device instead of a block device. Add support for
1796         FreeBSD device names.
1798         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1799         is a character device instead of a block device.
1801         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1802         is a character device instead of a block device.
1804 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1806         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1807         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1808         FreeBSD. Check if a device is a character device. Use
1809         DIOCGMEDIASIZE to get the size.
1810         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1811         support for FreeBSD.
1812         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1813         is a character device instead of a block device. Add support for
1814         FreeBSD device names.
1816         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1817         a character device instead of a block device.
1818         (grub_util_check_char_device): New function.
1820         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1821         a character device instead of a block device.
1823         * include/grub/util/getroot.h (grub_util_check_char_device): New
1824         prototype.
1826 2009-04-11  David S. Miller  <davem@davemloft.net>
1828         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1829         static libgcc.
1830         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1831         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1832         function, if present.
1833         (__bswapdi2): Likewise.
1835         * include/grub/sparc64/ieee1275/boot.h: New file.
1836         * boot/sparc64/ieee1275/boot.S: Likewise.
1837         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1839         * kern/misc.c (grub_ltoa): New function.
1840         (grub_vsprintf): Use it to format 'long' integers.
1842 2009-04-10  David S. Miller  <davem@davemloft.net>
1844         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1845         slots are of type grub_ieee1275_cell_t.
1846         (grub_nand_read): Likewise.
1847         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1848         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1849         macros are used to compare values in arg/ret block of the call.
1850         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1851         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1852         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1853         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1854         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1855         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1856         grub_ieee1275_close, grub_ieee1275_set_property,
1857         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1858         grub_ieee1275_cell_t.
1859         * kern/ieee1275/openfw.c (grub_map): Likewise.
1860         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1861         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1863         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1864         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1865         (grub_devalias_iterate): Likewise.
1867 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1869         UFS improvements
1871         * fs/ufs.c (INODE_NBLOCKS): new definition
1872         (struct grub_ufs_dirent): added fields for non-BSD dirents
1873         (grub_ufs_get_file_block): fixed double indirect handling
1874         (grub_ufs_lookup_symlink): use more robust way to determine whether
1875         symlink is inline
1876         (grub_ufs_find_file): support for non-BSD dirents
1877         (grub_ufs_dir): support for non-BSD dirents
1879 2009-04-10  Bean  <bean123ch@gnail.com>
1881         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1882         attribute, otherwise the size would be wrong for i386 platform.
1884         * include/grub/pci.h (grub_pci_read_word): New inline function.
1885         (grub_pci_read_byte): Likewise.
1886         (grub_pci_write): Likewise.
1887         (grub_pci_write_word): Likewise.
1888         (grub_pci_write_byte): Likewise.
1890         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1892         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1893         (find_framebuf): Scan pci to locate the frame buffer address.
1895         * commands/efi/fixvideo.c: New file.
1897         * commands/efi/loadbios.c: Likewise.
1899         * commands/memrw.c: Likewise.
1901         * util/grub-dumpbios.in: Likewise.
1903         * conf/common.rmk (grub-dumpbios): New utility.
1904         (pkglib_MODULES): New module memrw.mod.
1905         (memrw_mod_SOURCE): New macro.
1906         (memrw_mod_CFLAGS): Likewise.
1907         (memrw_mod_LDFLAGS): Likewise.
1909         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1910         fixvideo.mod.
1911         (loadbios_mod_SOURCE): New macro.
1912         (loadbios_mod_CFLAGS): Likewise.
1913         (loadbios_mod_LDFLAGS): Likewise.
1914         (fixvideo_mod_SOURCE): Likewise.
1915         (fixvideo_mod_CFLAGS): Likewise.
1916         (fixvideo_mod_LDFLAGS): Likewise.
1918         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1919         fixvideo.mod.
1920         (loadbios_mod_SOURCE): New macro.
1921         (loadbios_mod_CFLAGS): Likewise.
1922         (loadbios_mod_LDFLAGS): Likewise.
1923         (fixvideo_mod_SOURCE): Likewise.
1924         (fixvideo_mod_CFLAGS): Likewise.
1925         (fixvideo_mod_LDFLAGS): Likewise.
1927 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1929         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1931 2009-04-07  David S. Miller  <davem@davemloft.net>
1933         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1934         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1935         R_SPARC_WDISP30 case.
1936         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1938 2009-04-06  Pavel Roskin  <proski@gnu.org>
1940         * include/grub/misc.h (ARRAY_SIZE): New macro.
1941         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1942         New macro.
1943         * loader/i386/linux.c (allocate_pages): Use free_pages().
1944         (grub_linux_unload): Don't use free_pages().
1945         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1946         wrong index.  Treat all other modes as text modes.
1947         (grub_cmd_linux): Initialize vid_mode unconditionally to
1948         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1950         * commands/help.c (print_command_help): Use cmd->prio, not
1951         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1953 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1955         Parttool
1957         * parttool/pcpart.c: new file
1958         * commands/parttool.c: likewise
1959         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1960         (parttool_mod_SOURCES): new variable
1961         (parttool_mod_CFLAGS): likewise
1962         (parttool_mod_LDFLAGS): likewise
1963         (pcpart_mod_SOURCES): likewise
1964         (pcpart_mod_CFLAGS): likewise
1965         (pcpart_mod_LDFLAGS): likewise
1966         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1967         and parttool/pcpart.c
1968         * conf/i386-efi.rmk: likewise
1969         * conf/i386-ieee1275.rmk: likewise
1970         * conf/i386-pc.rmk: likewise
1971         * conf/powerpc-ieee1275.rmk: likewise
1972         * conf/sparc64-ieee1275.rmk: likewise
1973         * conf/x86_64-ieee1275.rmk: likewise
1975 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1977         Support for mtime and further expandability of dir command
1979         * include/grub/lib/datetime.h: moved to ...
1980         * include/grub/datetime.h: ... moved here and added
1981         declaration of grub_unixtime2datetime. All users updated
1982         * include/grub/fs.h: new syntax for dir and mtime functions in
1983         struct grub_fs
1984         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1985         and GRUB_FSHELP_FLAGS_MASK
1986         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1987         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1988         (grub_ext2_mtime): new function
1989         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1990         (grub_hfsplus_mtime): new function
1991         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1992         (GRUB_UFS_ATTR_FILE): likewise
1993         (GRUB_UFS_ATTR_LNK): likewise
1994         (struct grub_ufs_sblock): new fields mtime
1995         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1996         all users updated
1997         (grub_ufs_dir): mtime support
1998         (grub_ufs_mtime): new function
1999         * fs/affs.c (grub_affs_dir): use new dir syntax
2000         * fs/afs.c (grub_afs_dir): likewise
2001         * fs/cpio.c (grub_cpio_dir): likewise
2002         * fs/fat.c (grub_fat_find_dir): likewise
2003         * fs/hfs.c (grub_hfs_dir): likewise
2004         * fs/iso9660.c (grub_iso9660_dir): likewise
2005         * fs/jfs.c (grub_jfs_dir): likewise
2006         * fs/minix.c (grub_minix_dir): likewise
2007         * fs/ntfs.c (grub_ntfs_dir): likewise
2008         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2009         * fs/sfs.c (grub_sfs_dir): likewise
2010         * fs/xfs.c (grub_xfs_dir): likewise
2011         * util/hostfs.c (grub_hostfs_dir): likewise
2012         * lib/datetime.c: moved to ...
2013         * normal/datetime.c: ... moved here
2014         (grub_unixtime2datetime): new function
2015         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2016         * normal/completion.c (iterate_dir): use new dir syntax
2017         * normal/misc.c (grub_normal_print_device_info): tell the
2018         last modification time of a volume
2019         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2020         * conf/common.rmk: added lib/datetime.c to ls.mod
2021         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2022         (normal_mod_SOURCES): likewise
2023         (datetime_mod_SOURCES): Removed lib/datetime.c
2024         * conf/i386-efi.rmk: likewise
2025         * conf/i386-ieee1275.rmk: likewise
2026         * conf/i386-pc.rmk: likewise
2027         * conf/powerpc-ieee1275.rmk: likewise
2028         * conf/sparc64-ieee1275.rmk: likewise
2029         * conf/x86_64-efi.rmk: likewise
2031 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2033         Trim trailing spaces in FAT label and support mtools-like labels
2035         * fs/fat.c (grub_fat_iterate_dir): New function based
2036         on grub_fat_find_dir
2037         (grub_fat_find_dir): use grub_fat_iterate_dir
2038         (grub_fat_label): likewise
2040 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2042         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2043         and command.h
2044         remove extraneous kernel_elf_HEADERS
2046 2009-04-04  Bean  <bean123ch@gnail.com>
2048         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2050         * util/misc.c: Likewise.
2052 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2054         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2055         instead of grub_printf.
2057 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2059         * loader/i386/linux.c (grub_linux_setup_video): Fill
2060         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2061         values from `mode info' structure instead of hardcoded
2062         values.
2064 2009-04-01  Pavel Roskin  <proski@gnu.org>
2066         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2067         unused now.
2068         * genmk.rb: Likewise.
2069         * configure.ac: Likewise.
2071 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2073         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2074         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2076 2009-04-01  David S. Miller  <davem@davemloft.net>
2078         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2079         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2080         (grub_setjmp): Mark with 'returns_twice' attribute.
2081         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2082         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2083         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2085 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2087         Reapply fix from 2008-07-28 which was accidentally reverted; also
2088         perform the same fix to a similar check in same function.
2090         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2091         with the same number are found, just use issue a warning with
2092         grub_dprintf(), as this error has been reported to be non-fatal.
2094 2009-03-31  Pavel Roskin  <proski@gnu.org>
2096         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2097         for cross-compilation.
2099 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2101         Fix i386-ieee1275 build.
2103         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2104         Remove declaration.
2106 2009-03-30  Pavel Roskin  <proski@gnu.org>
2108         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2109         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2110         zero-terminated, rely only on the strlen value.  Fix comparison
2111         of strings differing in length.
2113 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2115         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2116         checking for abi version.  Improve error messages on BIOS to notify
2117         user about `linux16' command.
2119 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2121         Leak fixes
2123         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2124         in case of collision
2125         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2127 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2129         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2130         set `vid_mode' accordingly.
2131         (grub_linux_boot): Process `vid_mode' and set video mode.
2133 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2135         * util/grub.d/10_linux.in (linux_entry): New function.
2136         Factorize generation of Linux boot entries.
2138 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2140         Make the format of Environment Block plain text. The boot loader
2141         part is not tested well yet.
2143         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2144         (buffer): Removed.
2145         (envblk): Likewise.
2146         (usage): Remove "info" and "clear". Add "unset". Update the
2147         description of "set", as this does not delete variables any
2148         longer.
2149         (create_envblk_file): Complete rewrite.
2150         (open_envblk_file): Likewise.
2151         (cmd_info): Removed.
2152         (cmd_list): Likewise.
2153         (cmd_set): Likewise.
2154         (cmd_clear): Likewise.
2155         (list_variables): New function.
2156         (write_envblk): Likewise.
2157         (set_variables): Likewise.
2158         (unset_variables): Likewise.
2159         (main): Complete rewrite.
2161         * commands/loadenv.c (buffer): Removed.
2162         (envblk): Likewise.
2163         (open_envblk_file): New function.
2164         (read_envblk_file): Complete rewrite.
2165         (grub_cmd_load_env): Likewise.
2166         (grub_cmd_list_env): Likewise.
2167         (struct blocklist): New struct.
2168         (free_blocklists): New function.
2169         (check_blocklists): Likewise.
2170         (write_blocklists): Likewise.
2171         (grub_cmd_save_env): Complete rewrite.
2173         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2174         a plain text signature.
2175         (GRUB_ENVBLK_MAXLEN): Removed.
2176         (struct grub_envblk): Complete rewrite.
2177         (grub_envblk_find): Removed.
2178         (grub_envblk_insert): Likewise.
2179         (grub_envblk_open): New prototype.
2180         (grub_envblk_set): Likewise.
2181         (grub_envblk_delete): Put const to VALUE.
2182         (grub_envblk_iterate): Put const to NAME and VALUE.
2183         (grub_envblk_close): New prototype.
2184         (grub_envblk_buffer): New inline function.
2185         (grub_envblk_size): Likewise.
2187         * lib/envblk.c: Include grub/mm.h.
2188         (grub_env_find): Removed.
2189         (grub_envblk_open): New function.
2190         (grub_envblk_close): Likewise.
2191         (escaped_value_len): Likewise.
2192         (find_next_line): Likewise.
2193         (grub_envblk_insert): Removed.
2194         (grub_envblk_set): New function.
2195         (grub_envblk_delete): Complete rewrite.
2196         (grub_envblk_iterate): Likewise.
2198 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2200         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2201         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2202         variables.  Use 16-bit loader.
2203         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2204         loader.
2205         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2206         (grub_linux16_boot): ... this.  Update all users.
2207         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2208         (grub_linux_boot): ... this.  Update all users.
2210         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2211         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2212         commands to `linux16' and `initrd16'.
2213         (GRUB_MOD_FINI(linux)): Rename to ...
2214         (GRUB_MOD_FINI(linux16)): ... this.
2216 2009-03-24  Pavel Roskin  <proski@gnu.org>
2218         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2219         not just for compilation.
2221 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2223         Move multiboot helper out of kernel
2225         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2226         `loader/i386/multiboot_helper.S'.
2227         * conf/i386-coreboot.rmk: Likewise
2228         * conf/i386-ieee1275.rmk: Likewise
2230         * kern/i386/loader.S: Move multiboot helpers from here...
2231         * loader/i386/multiboot_helper.S: ...moved here
2232         * include/grub/i386/loader.h: Move declarations of multiboot
2233         helpers from here...
2234         * include/grub/i386/multiboot.h: ...moved here
2235         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2237 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2239         * kern/env.c (grub_env_context_open): Added an argument to specify
2240         whether a new context inherits exported variables from current
2241         one. This is useful when making a sandbox to interpret a config
2242         file.
2243         All callers updated.
2245         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2247 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2249         * kern/env.c (grub_env_context_close): Fix memory leaks.
2251 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2253         * normal/main.c (grub_normal_execute): Added an argument
2254         BATCH to specify if an interactive interface should be provided
2255         after reading a config file.
2256         All callers updated.
2257         (read_command_list): Prevent being executed twice.
2258         (read_fs_list): Likewise.
2260         * include/grub/normal.h (grub_normal_execute): Updated the
2261         prototype.
2263 2009-03-22  Pavel Roskin  <proski@gno.org>
2265         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2266         _start.
2267         * kern/i386/pc/startup.S: Likewise.
2268         * kern/i386/efi/startup.S: Likewise.
2269         * kern/i386/ieee1275/startup.S: Likewise.
2270         * kern/i386/coreboot/startup.S: Likewise.
2271         * kern/x86_64/efi/startup.S: Likewise.
2273         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2274         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2275         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2277 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2279         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2281         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2282         limit detection.
2283         Use vaddr of correct segment for entry_point.
2285 2009-03-21  Bean  <bean123ch@gmail.com>
2287         * commands/blocklist.c: Add include file <grub/command.h>, remove
2288         <grub/normal.h> and <grub/arg.h>.
2289         (grub_cmd_blocklist): Use the new command interface.
2290         (GRUB_MOD_INIT): Likewise.
2291         (GRUB_MOD_FINI): Likewise.
2292         * commands/boot.c: Likewise.
2293         * commands/cat.c: Likewise.
2294         * commands/cmp.c: Likewise.
2295         * commands/configfile.c: Likewise.
2296         * commands/crc.c: Likewise.
2297         * commands/echo.c: Likewise.
2298         * commands/halt.c: Likewise.
2299         * commands/handler.c: Likewise.
2300         * commands/hdparm.c: Likewise.
2301         * commands/help.c: Likewise.
2302         * commands/hexdump.c: Likewise.
2303         * commands/loadenv.c: Likewise.
2304         * commands/ls.c: Likewise.
2305         * commands/lsmmap.c: Likewise.
2306         * commands/lspci.c: Likewise.
2307         * commands/loadenv.c: Likewise.
2308         * commands/read.c: Likewise.
2309         * commands/reboot.c: Likewise.
2310         * commands/search.c: Likewise.
2311         * commands/sleep.c: Likewise.
2312         * commands/test.c: Likewise.
2313         * commands/usbtest.c: Likewise.
2314         * commands/videotest.c: Likewise.
2315         * commands/i386/cpuid.c: Likewise.
2316         * commands/i386/pc/halt.c: Likewise.
2317         * commands/i386/pc/play.c: Likewise.
2318         * commands/i386/pc/pxecmd.c: Likewise.
2319         * commands/i386/pc/vbeinfo.c: Likewise.
2320         * commands/i386/pc/vbetest.c: Likewise.
2321         * commands/ieee1275/suspend.c: Likewise.
2322         * disk/loopback.c: Likewise.
2323         * font/font_cmd.c: Likewise.
2324         * hello/hello.c: Likewise.
2325         * loader/efi/appleloader.c: Likewise.
2326         * loader/efi/chainloader.c: Likewise.
2327         * loader/i386/bsd.c: Likewise.
2328         * loader/i386/efi/linux.c: Likewise.
2329         * loader/i386/ieee1275/linux.c: Likewise.
2330         * loader/i386/linux.c: Likewise.
2331         * loader/i386/pc/chainloader.c: Likewise.
2332         * loader/i386/pc/linux.c: Likewise.
2333         * loader/powerpc/ieee1275/linux.c: Likewise.
2334         * loader/multiboot_loader.c: Likewise.
2335         * term/gfxterm.c: Likewise.
2336         * term/i386/pc/serial.c: Likewise.
2337         * term/terminfo.c: Likewise.
2339         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2340         * term/i386/pc/vga.c: Likewise.
2341         * video/readers/jpeg.c: Likewise.
2342         * video/readers/png.c: Likewise.
2343         * video/readers/tga.c: Likewise.
2345         * util/grub-fstest (cmd_loopback): Removed.
2346         (cmd_blocklist): Likewise.
2347         (cmd_ls): Likewise.
2348         (grub_register_command): Likewise.
2349         (grub_unregister_command): Likewise.
2350         (execute_command): Use grub_command_find to locate command and execute
2351         it.
2353         * include/grub/efi/chainloader.h: Removed.
2354         * loader/efi/chainloader_normal.c: Likewise.
2355         * loader/i386/bsd_normal.c: Likewise.
2356         * loader/i386/pc/chainloader_normal.c: Likewise.
2357         * loader/i386/pc/multiboot_normal.c: Likewise.
2358         * loader/linux_normal.c: Likewise.
2359         * loader/multiboot_loader_normal.c: Likewise.
2360         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2362         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2363         and grub_register_command_p1.
2365         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2366         kern/command.c, lib/arg.c and commands/extcmd.c.
2367         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2368         (minicmd_mod_SOURCES): New variable.
2369         (minicmd_mod_CFLAGS): Likewise.
2370         (minicmd_mod_LDFLAGS): Likewise.
2371         (extcmd_mod_SOURCES): Likewise.
2372         (extcmd_mod_CFLAGS): Likewise.
2373         (extcmd_mod_LDFLAGS): Likewise.
2374         (boot_mod_SOURCES): Removed.
2375         (boot_mod_CFLAGS): Likewise.
2376         (boot_mod_LDFLAGS): Likewise.
2378         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2379         kern/corecmd.c.
2380         (kernel_img_HEADERS): Add command.h.
2381         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2382         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2383         and lib/arg.c.
2384         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2385         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2386         remove the corresponding normal mode command.
2387         (normal_mod_SOURCES): Remove normal/arg.c.
2388         * conf/i386-coreboot.rmk: Likewise.
2389         * conf/i386-efi.rmk: Likewise.
2390         * conf/i386-ieee1275.rmk: Likewise.
2391         * conf/powerpc-ieee1275.rmk: Likewise.
2392         * conf/x86_64-efi.rmk: Likewise.
2394         * include/grub/arg.h: Move from here ...
2395         * include/grub/lib/arg.h: ... to here.
2397         * normal/arg.c: Move from here ...
2398         * lib/arg.c: ... to here.
2400         * commands/extcmd.c: New file.
2401         * commands/minicmd.c: Likewise.
2402         * include/grub/command.h: Likewise.
2403         * include/grub/extcmd.h: Likewise.
2404         * kern/command.c: Likewise.
2405         * kern/corecmd.c: Likewise.
2407         * kern/list.c (grub_list_iterate): Return int instead of void.
2408         (grub_list_insert): New function.
2409         (grub_prio_list_insert): Likewise.
2411         * kern/rescue.c (grub_rescue_command): Removed.
2412         (grub_rescue_command_list): Likewise.
2413         (grub_rescue_register_command): Likewise.
2414         (grub_rescue_unregister_command): Likewise.
2415         (grub_rescue_cmd_boot): Move to minicmd.c
2416         (grub_rescue_cmd_help): Likewise.
2417         (grub_rescue_cmd_info): Likewise.
2418         (grub_rescue_cmd_boot): Likewise.
2419         (grub_rescue_cmd_testload): Likewise.
2420         (grub_rescue_cmd_dump): Likewise.
2421         (grub_rescue_cmd_rmmod): Likewise.
2422         (grub_rescue_cmd_lsmod): Likewise.
2423         (grub_rescue_cmd_exit): Likewise.
2424         (grub_rescue_print_devices): Moved to corecmd.c.
2425         (grub_rescue_print_files): Likewise.
2426         (grub_rescue_cmd_ls): Likewise.
2427         (grub_rescue_cmd_insmod): Likewise.
2428         (grub_rescue_cmd_set): Likewise.
2429         (grub_rescue_cmd_unset): Likewise.
2430         (attempt_normal_mode): Use grub_command_find to get normal module.
2431         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2432         commands, remove grub_rescue_register_command calls.
2434         * normal/command.c (grub_register_command): Removed.
2435         (grub_unregister_command): Likewise.
2436         (grub_command_find): Likewise.
2437         (grub_iterate_commands): Likewise.
2438         (rescue_command): Likewise.
2439         (export_command): Moved to corecmd.c.
2440         (set_command): Removed.
2441         (unset_command): Likewise.
2442         (insmod_command): Likewise.
2443         (rmmod_command): Likewise.
2444         (lsmod_command): Likewise.
2445         (grub_command_init): Likewise.
2447         * normal/completion.c (iterate_command): Use cmd->prio to check for
2448         active command.
2449         (complete_arguments): Use grub_extcmd_t structure to find options.
2450         (grub_normal_do_completion): Change function grub_iterate_commands to
2451         grub_command_iterate.
2453         * normal/execute.c (grub_script_execute_cmd): No need to parse
2454         argument here.
2456         * normal/main.c (grub_dyncmd_dispatcher): New function.
2457         (read_command_list): Register unload commands as dyncmd.
2458         (grub_cmd_normal): Use new command interface, register rescue,
2459         unregister normal at entry, register normal, unregister rescue at exit.
2461         * include/grub/list.h (grub_list_test_t): New type.
2462         (grub_list_iterate): Return int instead of void.
2463         (grub_list_insert): New function.
2464         (GRUB_AS_NAMED_LIST_P): New macro.
2465         (GRUB_AS_PRIO_LIST): Likewise.
2466         (GRUB_AS_PRIO_LIST_P): Likewise.
2467         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2468         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2469         (grub_prio_list): New structure.
2470         (grub_prio_list_insert): New function.
2471         (grub_prio_list_remove): New inline function.
2473         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2474         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2475         (GRUB_COMMAND_FLAG_MENU): Likewise.
2476         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2477         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2478         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2479         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2480         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2481         (grub_command): Likewise.
2482         (grub_register_command): Likewise.
2483         (grub_command_find): Likewise.
2484         (grub_iterate_commands): Likewise.
2485         (grub_command_init): Likewise.
2486         (grub_arg_parse): Likewise.
2487         (grub_arg_show_help): Likewise.
2489         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2490         (grub_rescue_unregister_command): Likewise.
2492         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2493         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2494         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2496         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2497         grub_rescue_cmd_initrd.
2498         * include/grub/i386/loader.h: Likewise.
2499         * include/grub/x86_64/loader.h: Likewise.
2501         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2503 2009-03-21  Bean  <bean123ch@gmail.com>
2505         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2506         instead of stat in mingw environment.
2508         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2510         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2512         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2513         AC_CONFIG_LINKS.
2515 2009-03-21  Bean  <bean123ch@gmail.com>
2517         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2518         out of range error.
2520 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2522         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2523         checking inode flags for EXT4_EXTENTS_FLAG.
2525 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2527         * loader/i386/linux.c: Include `<grub/video.h>' and
2528         `<grub/i386/pc/vbe.h>'..
2529         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2530         (grub_linux32_boot): Attempt to configure video settings with
2531         grub_linux_setup_video().
2532         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2533         to avoid grub_console_fini() which would step out of graphical mode
2534         unconditionally.
2536 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2538         Fix build on powerpc.
2539         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2541 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2543         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2544         background image command.
2546 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2548         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2549         (grub_gfxterm_putchar): Extract pairs of identical calls to
2550         draw_cursor out of conditional blocks.
2552 2009-03-11  Pavel Roskin  <proski@gnu.org>
2554         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2555         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2557 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2559         * loader/i386/multiboot_elfxx.c
2560         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2562 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2564         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2565         `kern/handler.c'.
2567 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2569         * loader/i386/multiboot.c (code_size): New variable.
2570         (grub_multiboot): Define offsets by adding to `code_size' rather
2571         than subtracting from `grub_multiboot_payload_size'.  Provide
2572         4-byte alignment to MBI and others by increasing
2573         `boot_loader_name_length' appropriately.
2575         * loader/i386/multiboot_elfxx.c
2576         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2578 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2580         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2581         `fs/ext2.c'.
2583 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2585         Make loader/i386/linux.c usable on i386-pc again.
2587         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2588         memory to heap.
2589         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2590         `#error' stanza.
2592 2009-03-07  Bean  <bean123ch@gmail.com>
2594         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2595         allocation.
2597 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2599         Fix display issue on terminals with screen size other than 80x25
2600         (e.g. gfxterm with resolution higher than 640x480).
2602         * normal/main.c (grub_normal_init_page): Display title text in a
2603         position relative to the center of the terminal instead of relying
2604         on a hardcoded offset.
2606 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2608         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2609         installed.
2611         * Makefile.in (host_kernel): New variable.
2612         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2613         scripts instead of just the windows one.
2614         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2616 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2618         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2619         `kern/handler.c'.
2620         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2621         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2622         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2623         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2624         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2625         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2627 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2629         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2630         or if there's no space for the disk label and print the partition number on a
2631         invalid magic.
2633 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2635         * util/misc.c: Include <time.h>.
2636         (grub_millisleep): New function.
2638 2009-03-04  Bean  <bean123ch@gmail.com>
2640         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2641         another option -mno-red-zone.
2643         * commands/handler.c: Change module description.
2645         * kern/handler.c: Add missing space at the end of description line.
2647         * kern/list.c: Likewise.
2649 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2651         Move more components to the relocation area, and fix mbi pointer
2652         handling to use the destination rather than the origin (thanks to
2653         Vladimir Serbinenko for spotting).
2655         * loader/i386/multiboot.c (mbi_dest): New variable.
2656         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2657         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2658         relocation area.
2660 2009-03-01  Bean  <bean123ch@gmail.com>
2662         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2663         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2664         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2665         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2667         * loader/i386/efi/linux.c (acpi_guid): New variable.
2668         (acpi_guid): Likewise.
2669         (EBDA_SEG_ADDR): New constant.
2670         (LOW_MEM_ADDR): Likewise.
2671         (FAKE_EBDA_SEG): Likewise.
2672         (fake_bios_data): New function.
2673         (grub_linux_boot): Call fake_bios_data.
2675 2009-03-01  Bean  <bean123ch@gmail.com>
2677         * commands/terminal.c: Removed.
2679         * commands/handler.c: New file.
2681         * include/grub/list.h: Likewise.
2683         * include/grub/handler.h: Likewise.
2685         * kern/list.c: Likewise.
2687         * kern/handler.c: Likewise.
2689         * kern/term.h: Include header file <grub/handler.h>.
2690         (grub_term_input): Move next field to the beginning.
2691         (grub_term_output): Likewise.
2692         (grub_term_input_class): New variable.
2693         (grub_term_output_class): Likewise.
2694         (grub_term_register_input): Changed to inline function.
2695         (grub_term_register_output): Likewise.
2696         (grub_term_unregister_input): Likewise.
2697         (grub_term_unregister_output): Likewise.
2698         (grub_term_set_current_input): Likewise.
2699         (grub_term_set_current_output): Likewise.
2700         (grub_term_get_current_input): Likewise.
2701         (grub_term_get_current_output): Likewise.
2702         (grub_term_iterate_input): Removed.
2703         (grub_term_iterate_output): Likewise.
2705         * kern/term.c (grub_term_list_input): Removed.
2706         (grub_term_list_output): Likewise.
2707         (grub_term_input_class): New variable.
2708         (grub_term_output_class): Likewise.
2709         (grub_cur_term_input): Change variable as macro.
2710         (grub_cur_term_output): Likewise.
2711         (grub_term_register_input): Removed.
2712         (grub_term_register_output): Likewise.
2713         (grub_term_unregister_input): Likewise.
2714         (grub_term_unregister_output): Likewise.
2715         (grub_term_set_current_input): Likewise.
2716         (grub_term_set_current_output): Likewise.
2717         (grub_term_iterate_input): Likewise.
2718         (grub_term_iterate_output): Likewise.
2719         (grub_term_get_current_input): Likewise.
2720         (grub_term_get_current_output): Likewise.
2722         * util/grub-editenv.c: Include header file <grub/handler.h>.
2723         (grub_term_get_current_input): Removed.
2724         (grub_term_get_current_output): Likewise.
2725         (grub_term_input_class): New variable.
2726         (grub_term_output_class): Likewise.
2728         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2729         (grub_term_get_current_output): Likewise.
2730         (grub_term_input_class): New variable.
2731         (grub_term_output_class): Likewise.
2733         * util/grub-probe.c (grub_term_get_current_input): Removed.
2734         (grub_term_get_current_output): Likewise.
2735         (grub_term_input_class): New variable.
2736         (grub_term_output_class): Likewise.
2738         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2739         (grub_term_get_current_output): Likewise.
2740         (grub_term_input_class): New variable.
2741         (grub_term_output_class): Likewise.
2743         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2744         (terminal_mod_SOURCES): Likewise.
2745         (terminal_mod_CFLAGS): Likewise.
2746         (terminal_mod_LDFLAGS): Likewise.
2748         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2749         handler.c.
2750         (kernel_img_SOURCES): Add list.c and handler.c.
2751         (kernel_img_HEADERS): Add list.h and handler.h.
2753         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2754         handler.c.
2755         (kernel_mod_SOURCES): Add list.c and handler.c.
2756         (kernel_mod_HEADERS): Add list.h and handler.h.
2758         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2759         handler.c.
2760         (kernel_elf_SOURCES): Add list.c and handler.c.
2761         (kernel_elf_HEADERS): Add list.h and handler.h.
2763         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2764         handler.c.
2765         (kernel_elf_SOURCES): Add list.c and handler.c.
2766         (kernel_elf_HEADERS): Add list.h and handler.h.
2768         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2769         handler.c.
2770         (kernel_mod_SOURCES): Add list.c and handler.c.
2771         (kernel_mod_HEADERS): Add list.h and handler.h.
2773         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2774         handler.c.
2775         (kernel_elf_SOURCES): Add list.c and handler.c.
2776         (kernel_elf_HEADERS): Add list.h and handler.h.
2778 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2780         Factorize elf32 / elf64 code in Multiboot loader.  This will
2781         prevent it from getting out of sync again.
2783         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2784         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2785         grub_multiboot_load_elf64): Move from here ...
2786         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2787         grub_multiboot_load_elf): ... to here (new file).
2789 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2791         * util/grub.d/10_linux.in: Rename "single-user mode" to
2792         "recovery mode".
2794 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2796         Don't leak in SCSI code.
2797         * disk/scsi.c (grub_scsi_close): free `scsi'.
2799 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2801         * loader/i386/pc/multiboot.c: Move from here ...
2802         * loader/i386/multiboot.c: ... to here.  Update all users.
2804 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2806         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2807         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2809 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2811         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2812         b-tree.
2814 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2816         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2817         `0x' qualifier as 0 when base is specified as parameter).
2819 2009-02-24  Bean  <bean123ch@gmail.com>
2821         * configure.ac: Check for -mcmodel=large in x86_64 target.
2823         * include/grub/efi/api.h (efi_call_10): New macro.
2824         (efi_wrap_10): New function.
2826         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2827         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2828         (GRUB_PE32_REL_BASED_LOW): Likewise.
2829         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2830         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2831         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2832         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2833         (GRUB_PE32_REL_BASED_REL): Likewise.
2834         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2835         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2836         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2838         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2839         issue.
2841         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2842         (efi_wrap_10): New function.
2844         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2846         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2847         MB/MBP model (NV chipset).
2848         (devdata_devs): Add devpath_5 to the list.
2850         * load/i386/efi/linux.c (video_base): Remove variable.
2851         (RGB_MASK): New macro.
2852         (RGB_MAGIC): Likewise.
2853         (LINE_MIN): Likewise.
2854         (LINE_MAX): Likewise.
2855         (FBTEST_STEP): Likewise.
2856         (FBTEST_COUNT): Likewise.
2857         (fb_list): New variable.
2858         (grub_find_video_card): Remove function.
2859         (find_framebuf): New function.
2860         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2861         line length.
2863         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2864         problem for x86_64.
2866 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2868         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2870         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2871         coding tool name.
2873 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2875         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2876         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2877         in our relocation, instead of using it directly from heap.  Also
2878         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2880 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2882         Implement USB keyboard support (based on patch by Marco Gerards)
2884         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2885         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2886         (usb_keyboard_mod_LDFLAGS): New variables.
2888         * term/usb_keyboard.c: New file.
2890 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2892         Corrected wrong declaration
2894         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2896 2009-02-14  Christian Franke  <franke@computer.org>
2898         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2899         (grub_lspci_iter): Print class code and programming interface byte.
2901 2009-02-14  Christian Franke  <franke@computer.org>
2903         * gendistlist.sh: Ignore `.svn' directories.
2905 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2907         * fs/fat.c: Add 2009 to Copyright line.
2909 2009-02-14  Christian Franke  <franke@computer.org>
2911         * commands/hdparm.c: New file.  Provides `hdparm' command
2912         which sends ATA commands via grub_disk_ata_pass_through ().
2914         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2916         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2917         and <grub/cpu/io.h> to include/grub/ata.h.
2918         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2919         (GRUB_CDROM_SECTOR_SIZE): Remove.
2920         (GRUB_ATA_*): Move to include/grub/ata.h.
2921         (GRUB_ATAPI_*): Likewise.
2922         (enum grub_ata_commands): Likewise.
2923         (enum grub_ata_timeout_milliseconds): Likewise.
2924         (struct grub_ata_device): Likewise.
2925         (grub_ata_regset): Likewise.
2926         (grub_ata_regget): Likewise.
2927         (grub_ata_regset2): Likewise.
2928         (grub_ata_regget2): Likewise.
2929         (grub_ata_check_ready): Likewise.
2930         (grub_ata_wait_not_busy): Remove static, exported in
2931         include/grub/ata.h.
2932         (grub_ata_wait_drq): Likewise.
2933         (grub_ata_pio_read): Likewise.
2935         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2936         function for hdparm.mod.
2938         * include/grub/ata.h: New file, contains declarations from
2939         disk/ata.c.
2940         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2942         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2943         (grub_disk_ata_pass_through): New exported variable.
2945         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2947 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2949         Support multiple fallback entries, and provide an API to support
2950         executing default+fallback menu entries.  Renamed the `terminal' menu
2951         viewer to `text'.
2953         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2954         variable declaration.
2955         (grub_menu_execute_callback): New structure declaration.
2956         (grub_menu_execute_callback_t): New typedef.
2957         (grub_menu_execute_with_fallback): New function declaration.
2958         (grub_menu_get_entry): Likewise.
2959         (grub_menu_get_timeout): Likewise.
2960         (grub_menu_set_timeout): Likewise.
2962         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2964         * normal/menu.c (grub_wait_after_message): Moved to
2965         `normal/menu_text.c'.
2966         (draw_border): Likewise.
2967         (print_message): Likewise.
2968         (print_entry): Likewise.
2969         (print_entries): Likewise.
2970         (grub_menu_init_page): Likewise.
2971         (get_entry_number): Likewise.
2972         (print_timeout): Likewise.
2973         (run_menu): Likewise.
2974         (grub_menu_execute_entry): Likewise.
2975         (show_text_menu): Likewise.
2976         (get_and_remove_first_entry_number): New function.
2977         (grub_menu_execute_with_fallback): Likewise.
2978         (get_entry): Renamed to ...
2979         (grub_menu_get_entry): .. this and made it global.
2980         (get_timeout): Renamed to ...
2981         (grub_menu_get_timeout): ... this and made it global.
2982         (set_timeout): Renamed to ...
2983         (grub_menu_set_timeout): ... this and made it global.
2984         (grub_normal_terminal_menu_viewer): Renamed to ...
2985         (grub_normal_text_menu_viewer): ... this.
2987         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2988         from normal/menu.c.
2990         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2991         (normal_mod_SOURCES): Likewise.
2993         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2994         (normal_mod_SOURCES): Likewise.
2996         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2997         (normal_mod_SOURCES): Likewise.
2999         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3000         (normal_mod_SOURCES): Likewise.
3002         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3003         (normal_mod_SOURCES): Likewise.
3005         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3006         (normal_mod_SOURCES): Likewise.
3008         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3009         (normal_mod_SOURCES): Likewise.
3011 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3013         * util/grub.d/00_header.in: Update old reference to `font' command.
3015 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3017         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3019         Based on patch from Javier Martín.
3021 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3023         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3024         to avoid false positives with FAT.
3025         (grub_fstest_SOURCES): Likewise.
3026         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3027         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3028         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3029         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3030         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3031         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3033 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3035         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3036         bpb.version_specific.fat12_or_fat16.fstype and
3037         bpb.version_specific.fat32.fstype.
3039 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3041         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3043 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3045         * Makefile.in (host_os, host_cpu): New variables.
3046         (target_os): Remove.  Update all users.
3048 2009-02-08  Marco Gerards  <marco@gnu.org>
3050         * Makefile.in (enable_grub_emu_usb): New variable.
3051         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3052         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3053         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3054         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3055         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3056         `usbtest.mod' and `usbms.mod'.
3057         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3058         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3059         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3060         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3061         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3062         variables.
3064         * disk/usbms.c: New file.
3066         * include/grub/usb.h: Likewise.
3068         * include/grub/usbtrans.h: Likewise.
3070         * include/grub/usbdesc.h: Likewise.
3072         * bus/usb/usbtrans.c: Likewise.
3074         * bus/usb/ohci.c: Likewise.
3076         * bus/usb/uhci.c: Likewise.
3078         * bus/usb/usbhub.c: Likewise.
3080         * bus/usb/usb.c: Likewise.
3082         * commands/usbtest.c: Likewise.
3084         * util/usb.c: Likewise.
3086         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3088         * configure.ac: Test for libusb presence.
3090         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3092 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3094         * kern/mm.c: Add more comments.
3096 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3098         Patch from Javier Martín.
3099         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3100         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3102 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3104         * fs/cpio.c: Split tar functionality to ...
3105         * fs/tar.c: ... here (new file).  Update all users.
3107 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3109         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3110         backward-incompatible features.
3112         Based on patch from Javier Martín, with some adjustments.
3114 2009-02-07  Michael Scherer  <misc@mandriva.org>
3116         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3118 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3120         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3121         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3122         after the RAID stuff.
3124 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3126         Fixes problem when running vbetest command as reported by
3127         Vladimir Serbinenko <phcoder@gmail.com>.
3129         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3131 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3133         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3134         /dev/md/NpN style mdraid devices.
3136 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3138         * util/unifont2pff.rb: Remove.
3140 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3142         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3143         `#'.
3145 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3147         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3148         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3149         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3150         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3151         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3152         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3153         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3155 2009-02-02  Christian Franke  <franke@computer.org>
3157         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3159 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3161         * INSTALL: Note that we now require at least autoconf 2.59 and
3162         that LZO is optional.
3164 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3166         Base on patch on bug #24154 created by Tomas Tintera
3167         <trosos@seznam.cz>.
3169         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3171 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3173         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3174         <bero@arklinux.org>.
3176         * normal/parser.y (script_init): Add missing semicolon.
3178 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3180         * normal/main.c: Add include to grub/menu_viewer.h.
3181         (free_menu_entry_classes): Added.
3182         (grub_normal_menu_addentry): Added class property handling.
3183         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3184         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3186         * normal/menu_viewer.c: New file.
3188         * normal/menu.c (run_menu_entry): Renamed to ...
3189         (grub_menu_execute_entry): ... this and made it as global.
3190         (grub_menu_run): Renamed to ...
3191         (show_text_menu): ... this and made it local.
3192         (show_text_menu): Adapt to new function names.
3193         (grub_normal_terminal_menu_viewer): New global variable.
3195         * include/grub/menu.h: New file.
3197         * include/grub/menu_viewer.h: New file.
3199         * include/grub/normal.h: Added include to grub/menu.h.
3200         (grub_menu_entry): Moved to include/grub/menu.h.
3201         (grub_menu_entry_t): Likewise.
3202         (grub_menu): Likewise.
3203         (grub_menu_t): Likewise.
3204         (grub_normal_terminal_menu_viewer): Added.
3205         (grub_menu_execute_entry): Likewise.
3206         (grub_menu_run): Removed.
3208         * DISTLIST: Added include/grub/menu.h.
3209         Added include/grub/menu_viewer.h.
3210         Added normal/menu_viewer.c.
3212 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3214         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3215         arglist for menutitle arguments.
3217         * normal/main.c (grub_normal_menu_addentry): Likewise.
3219         * normal/parser.y (menuentry): Likewise.
3221         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3223         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3224         (grub_script_create_cmdmenu): Likewise.
3226         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3228         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3229         changes.
3231         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3233         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3235         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3237         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3239         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3241         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3243 2009-01-30  Christian Franke  <franke@computer.org>
3245         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3246         in option help text.
3248 2009-01-27  Pavel Roskin  <proski@gnu.org>
3250         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3252 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3254         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3256         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3258         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3259         unregister function.
3261 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3263         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3265         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3267         * util/grub-mkfont.c (usage): Fix typo.
3269         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3271 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3273         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3275         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3277         * kern/misc.c (grub_strcasecmp): New function.
3278         (grub_strcasecmp): Use grub_size_t instead of int for length.
3279         Fix return value.
3280         * include/grub/misc.h: Update function prototypes.
3282 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3284         * configure.ac: Fix cross-compilation check.
3286 2009-01-22  Christian Franke  <franke@computer.org>
3288         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3289         (precision) digit string.  Allow `.format2' without `format1' (width).
3290         Limit input chars for `%s' output to `format2' if specified.  This is
3291         compatible with standard printf ().
3293 2009-01-22  Christian Franke  <franke@computer.org>
3295         * disk/ata.c (grub_ata_wait_status): Replace by ...
3296         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3297         other status bits may be invalid while BSY is asserted.
3298         (grub_ata_check_ready): New function.
3299         (grub_ata_cmd): Removed.
3300         (grub_ata_wait_drq): New function.
3301         (grub_ata_strncpy): Remove inline.
3302         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3303         and error check now done by grub_ata_wait_drq ().
3304         (grub_ata_pio_write): Likewise.
3305         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3306         grub_ata_wait_drq () to wait for data.
3307         (grub_ata_device_initialize): Add status register check to
3308         detect missing SATA slave devices.  Add debug messages.
3309         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3310         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3311         transfer loop by grub_ata_pio_write ().
3312         (grub_ata_identify): Set DEV before check for !BSY. Use
3313         grub_ata_wait_drq () to wait for data.
3314         (grub_ata_setaddress): Set DEV before check for !BSY.
3315         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3316         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3317         command on (size % batch) == 0.  Add missing error check after write of
3318         last block.  Add debug messages.
3319         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3321 2009-01-19  Christian Franke  <franke@computer.org>
3323         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3324         (GRUB_ATAPI_IREASON_*): Likewise.
3325         (grub_ata_pio_write): Fix timeout error return.
3326         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3327         (grub_atapi_wait_drq): New function.
3328         (grub_atapi_packet): New parameter `size'.
3329         Use grub_atapi_wait_drq () and direct write instead of
3330         grub_ata_pio_write ().
3331         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3332         reads the number of bytes requested by the device for each DRQ
3333         assertion.
3334         (grub_atapi_write): Remove old implementation, return not
3335         implemented instead.
3337 2009-01-19  Christian Franke  <franke@computer.org>
3339         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3340         of 512 to calculate data size.
3341         (grub_scsi_read12): Likewise.
3342         (grub_scsi_write10): Likewise.
3343         (grub_scsi_write12): Likewise.
3344         (grub_scsi_read): Adjust size according to blocksize.
3345         Add checks for invalid blocksize and unaligned transfer.
3347 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3349         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3351         * term/gfxterm.c (write_char): Fix background rendering for wide
3352         width glyphs.
3354 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3356         * config.guess: Update to latest version from config git.
3357         * config.sub: Likewise.
3359 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3361         * Makefile.in: Change font compilation to use new grub-mkfont instead
3362         of java version.
3364         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3365         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3366         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3367         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3368         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3369         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3370         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3371         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3372         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3374 2009-01-16  Christian Franke  <franke@computer.org>
3376         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3377         (enum grub_ata_timeout_milliseconds): New enum.
3378         (grub_ata_wait_status): Add parameter milliseconds.
3379         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3380         recovery from timed-out commands.
3381         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3382         return grub_errno instead of REG_ERROR.
3383         (grub_ata_pio_write): Add parameter milliseconds.
3384         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3385         Pass milliseconds to grub_ata_wait_status () and
3386         grub_ata_pio_read ().
3387         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3388         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3389         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3390         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3391         It is not suitable for device detection, because DEV bit is ignored,
3392         the command may run too long, and not all devices set the signature
3393         properly.
3394         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3395         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3396         Fix device selection, DEV bit must be set first to address the registers
3397         of the correct device.
3398         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3399         grub_ata_pio_read/write ().
3400         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3401         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3403 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3405         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3407 2009-01-13  Bean  <bean123ch@gmail.com>
3409         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3411 2009-01-13  Bean  <bean123ch@gmail.com>
3413         * Makefile.in: (enable_grub_mkfont): New variable.
3414         (freetype_cflags): Likewise.
3415         (freetype_libs): Likewise.
3417         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3418         (grub_mkfont_SOURCES): New variable.
3419         (grub_mkfont_CFLAGS): Likewise.
3420         (grub_mkfont_LDFLAGS): Likewise.
3422         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3423         library if `--enable-grub-mkfont' is requested.
3424         (enable_grub_mkfont): New variable.
3425         (freetype_cflags): Likewise.
3426         (freetype_libs): Likewise.
3428         * util/grub-mkfont.c: New file.
3430 2009-01-12  Christian Franke  <franke@computer.org>
3432         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3433         mode check.  Fix setting of compat_use[].
3435 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3437         Update a few copyright years which we forgot to do in 2008 (only for
3438         files whose changes made in 2008 were copyright-significant)
3440         * Makefile.in: Add 2008 to Copyright line.
3441         * disk/ieee1275/ofdisk.c: Likewise.
3442         * disk/efi/efidisk.c: Likewise.
3443         * kern/dl.c: Likewise.
3444         * kern/sparc64/ieee1275/init.c: Likewise.
3445         * kern/mm.c: Likewise.
3446         * kern/efi/mm.c: Likewise.
3447         * boot/i386/pc/boot.S: Likewise.
3448         * genfslist.sh: Likewise.
3449         * fs/iso9660.c: Likewise.
3450         * fs/hfs.c: Likewise.
3451         * fs/jfs.c: Likewise.
3452         * fs/minix.c: Likewise.
3453         * fs/ufs.c: Likewise.
3454         * gensymlist.sh.in: Likewise.
3455         * genkernsyms.sh.in: Likewise.
3456         * include/grub/misc.h: Likewise.
3457         * include/grub/types.h: Likewise.
3458         * include/grub/symbol.h: Likewise.
3459         * include/grub/elf.h: Likewise.
3460         * include/grub/kernel.h: Likewise.
3461         * include/grub/disk.h: Likewise.
3462         * include/grub/dl.h: Likewise.
3463         * include/grub/i386/linux.h: Likewise.
3464         * include/grub/i386/pc/biosdisk.h: Likewise.
3465         * include/grub/efi/api.h: Likewise.
3466         * include/grub/efi/pe32.h: Likewise.
3467         * include/grub/util/misc.h: Likewise.
3468         * normal/execute.c: Likewise.
3469         * normal/arg.c: Likewise.
3470         * normal/completion.c: Likewise.
3471         * normal/lexer.c: Likewise.
3472         * normal/parser.y: Likewise.
3473         * normal/misc.c: Likewise.
3474         * commands/i386/pc/vbeinfo.c: Likewise.
3475         * commands/hexdump.c: Likewise.
3476         * commands/terminal.c: Likewise.
3477         * commands/ls.c: Likewise.
3478         * commands/help.c: Likewise.
3479         * partmap/pc.c: Likewise.
3480         * loader/efi/chainloader.c: Likewise.
3481         * loader/multiboot_loader.c: Likewise.
3482         * loader/i386/pc/multiboot2.c: Likewise.
3483         * term/efi/console.c: Likewise.
3484         * term/i386/pc/serial.c: Likewise.
3485         * util/lvm.c: Likewise.
3486         * util/console.c: Likewise.
3487         * util/i386/efi/grub-mkimage.c: Likewise.
3488         * util/raid.c: Likewise.
3490 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3492         * commands/videotest.c: Removed include to grub/machine/memory.h.
3494         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3495         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3496         (video_mod_SOURCES): Removed.
3497         (video_mod_CFLAGS): Likewise.
3498         (video_mod_LDFLAGS): Likewise.
3499         (gfxterm_mod_SOURCES): Likewise.
3500         (gfxterm_mod_CFLAGS): Likewise.
3501         (gfxterm_mod_LDFLAGS): Likewise.
3502         (videotest_mod_SOURCES): Likewise.
3503         (videotest_mod_CFLAGS): Likewise.
3504         (videotest_mod_LDFLAGS): Likewise.
3505         (bitmap_mod_SOURCES): Likewise.
3506         (bitmap_mod_CFLAGS): Likewise.
3507         (bitmap_mod_LDFLAGS): Likewise.
3508         (tga_mod_SOURCES): Likewise.
3509         (tga_mod_CFLAGS): Likewise.
3510         (tga_mod_LDFLAGS): Likewise.
3511         (jpeg_mod_SOURCES): Likewise.
3512         (jpeg_mod_CFLAGS): Likewise.
3513         (jpeg_mod_LDFLAGS): Likewise.
3514         (png_mod_SOURCES): Likewise.
3515         (png_mod_CFLAGS): Likewise.
3516         (png_mod_LDFLAGS): Likewise.
3518         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3519         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3520         (video_mod_SOURCES): Added.
3521         (video_mod_CFLAGS): Likewise.
3522         (video_mod_LDFLAGS): Likewise.
3523         (videotest_mod_SOURCES): Likewise.
3524         (videotest_mod_CFLAGS): Likewise.
3525         (videotest_mod_LDFLAGS): Likewise.
3526         (bitmap_mod_SOURCES): Likewise.
3527         (bitmap_mod_CFLAGS): Likewise.
3528         (bitmap_mod_LDFLAGS): Likewise.
3529         (tga_mod_SOURCES): Likewise.
3530         (tga_mod_CFLAGS): Likewise.
3531         (tga_mod_LDFLAGS): Likewise.
3532         (jpeg_mod_SOURCES): Likewise.
3533         (jpeg_mod_CFLAGS): Likewise.
3534         (jpeg_mod_LDFLAGS): Likewise.
3535         (png_mod_SOURCES): Likewise.
3536         (png_mod_CFLAGS): Likewise.
3537         (png_mod_LDFLAGS): Likewise.
3538         (gfxterm_mod_SOURCES): Likewise.
3539         (gfxterm_mod_CFLAGS): Likewise.
3540         (gfxterm_mod_LDFLAGS): Likewise.
3542         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3543         grub/machine/console.h.
3545 2009-01-04  Jerone Young  <jerone@gmail.com>
3547         Make on screen instructions clearer
3549         Based on patch created by Jidanni <jidanni@jidanni.org>
3551         * normal/menu.c: print clearer instructions on the screen
3553 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3555         New font engine.
3557         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3558         build system and fixed gfxterm.c to work with different sized fonts.
3560         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3562         * configure: Re-generated.
3564         * DISTLIST: Removed font/manager.c.
3565         Added font/font.c.
3566         Added font/font_cmd.c.
3568         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3569         compilation.
3571         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3573         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3575         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3577         * normal/menu.c: Likewise.
3579         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3580         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3582         * include/grub/font.h: Replaced with new file.
3584         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3585         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3586         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3587         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3588         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3589         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3590         fg_red, fg_green, fg_blue, fg_alpha.
3591         (grub_video_adapter): Removed blit_glyph.
3592         (grub_video_blit_glyph): Removed.
3594         * font/manager.c: Removed file.
3596         * font/font.c: New file.
3598         * font/font_cmd.c: Likewise.
3600         * video/video.c (grub_video_blit_glyph): Removed.
3602         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3603         (grub_video_vbe_map_rgba): Likewise.
3604         (grub_video_vbe_unmap_color_int): Likewise.
3605         (grub_video_vbe_blit_glyph): Removed.
3606         (grub_video_vbe_adapter): Removed blit_glyph.
3608         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3609         (get_pixel): Likewise.
3610         (set_pixel): Likewise.
3612         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3614         * term/gfxterm.c: Adapted to new font engine.
3616         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3618         * term/i386/pc/vga.c: Likewise.
3620         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3622         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3624         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3626         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3628         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3630         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3632         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3634         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3636         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3638         * util/grub.d/00_header.in: Changed to use new loadfont command.
3640         * util/grub-mkconfig_lib.in: Changed font extension.
3642 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3644         * util/getroot.c (grub_util_get_grub_dev): Add support for
3645         /dev/md/dNNpNN style partitionable mdraid devices.
3647 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3649         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3650         at a time limit of the PXE TFTP API correctly.
3651         (grub_pxefs_close): Likewise.
3653 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3655         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3656         grub_ata_device_initialize() calls.
3658 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3660         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3661         iteration failed.
3662         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3664 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3666         Fix build on powerpc-ieee1275.  Based on patch created by
3667         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3668         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3669         `kern/ieee1275/mmap.c'.
3670         * include/grub/powerpc/ieee1275/memory.h: New file.
3672         Provide grub-install on coreboot.
3673         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3674         (grub_install_SOURCES): New variable.
3675         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3676         usable on coreboot.
3678 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3680         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3681         to `grub_term_input_t'.
3682         (grub_term_get_current_output): Change return type to
3683         `grub_term_output_t'.
3685 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3687         Fix breakage on coreboot due to declaration mismatch.
3688         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3689         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3690         grub_vga_text_cls().
3692         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3693         comments.  Avoid copying one more byte than necessary (just in case).
3695         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3696         to 0x200000 (avoids trouble with some OFW implementations, and matches
3697         with the one in Yaboot).
3698         Reported by Manoel Abranches
3700 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3702         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3703         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3705         * util/grub-mkconfig_lib.in (grub_warn): New function.
3706         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3707         warnings, to obtain consistent formatting.
3708         * util/grub.d/00_header.in: Likewise.
3709         * util/update-grub_lib.in: Likewise.
3711         * loader/i386/linux.c (allocate_pages): Fix a warning.
3712         Move comment text to `#error' stanza.
3714         Harmonize ieee1275's grub_available_iterate() with the generic
3715         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3716         build problem on i386-ieee1275):
3717         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3718         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3719         parameter `type'.  Update all users of this function.
3720         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3721         `kern/ieee1275/mmap.c'.
3722         * kern/ieee1275/init.c
3723         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3724         with ...
3725         (grub_machine_mmap_iterate): ... this.
3726         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3727         return type to `grub_err_t'.  Update all implementations of this
3728         function prototype.
3729         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3730         Likewise.
3732         Add `lsmmap' command (lists firmware-provided memory map):
3733         * commands/lsmmap.c: New file.
3734         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3735         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3736         variables.
3737         * conf/powerpc-ieee1275.rmk: Likewise.
3738         * conf/i386-coreboot.rmk: Likewise.
3739         * conf/i386-ieee1275.rmk: Likewise.
3741 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3743         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3744         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3745         constraints to initrd allocation (based on code from
3746         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3747         for Linux to find it.
3749 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3751         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3752         order to cope with duplicate slashes.
3754 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3756         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3757         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3758         don't want to mess with lower memory, because it is used in the Linux
3759         loader.
3761         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3762         an appropriate place in lower memory, between 0x10000 and 0x90000,
3763         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3764         is in our heap (probably as a result of it being corrupted during
3765         decompression).  Add #error instance with comment to explain why this
3766         loader isn't currently usable on PC/BIOS.
3768 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3770         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3771         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3773 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3775         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3777         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3778         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3779         from here ...
3780         * include/grub/i386/pc/memory.h: ... to here.
3782 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3784         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3785         split).
3787         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3788         (grub_console_cur_color, grub_console_real_putchar)
3789         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3790         (grub_console_setcolorstate, grub_console_setcolor)
3791         (grub_console_getcolor): Move from here ...
3792         * include/grub/i386/vga_common.h: ... to here (new file).
3794         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3795         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3796         `<grub/i386/io.h>'.
3797         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3798         `<grub/i386/vga_common.h>'.
3800 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3802         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3803         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3804         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3805         variables.
3806         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3807         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3809         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3810         grub_console_init() with call to grub_vga_text_init().
3811         (grub_machine_fini): Replace call to
3812         grub_console_fini() with call to grub_vga_text_fini() and
3813         grub_at_keyboard_fini().
3815         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3816         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3817         (grub_console_setcolorstate, grub_console_setcolor)
3818         (grub_console_getcolor): New function prototypes.
3820         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3821         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3822         (grub_vga_text_setcursor): Static-ize.
3823         (grub_vga_text_term): New structure.
3824         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3826         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3827         (grub_console_cur_color, grub_console_standard_color)
3828         (grub_console_normal_color, grub_console_highlight_color)
3829         (map_char, grub_console_putchar, grub_console_getcharwidth)
3830         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3831         (grub_console_getcolor): Move from here ...
3832         * term/i386/vga_common.c: ... to here (same function names).
3834 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3836         Use newly-added Multiboot support in coreboot.
3838         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3839         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3841         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3842         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3843         (codestart): Store the MBI in `startup_multiboot_info' when we're
3844         being loaded using Multiboot.
3846         * kern/i386/coreboot/init.c (grub_machine_init): Move
3847         grub_at_keyboard_init() call to beginning of function (useful for
3848         debugging).  Call grub_machine_mmap_init() before attempting to use
3849         grub_machine_mmap_iterate().
3850         (grub_lower_mem, grub_upper_mem): Move from here ...
3851         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3852         here (new file).
3854         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3855         function prototype.
3857 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3859         Fix a regression introduced by the at_keyboard.mod split.  Because
3860         some terminals are default on some platforms and non-default on
3861         others, the first terminal being registered determines which is
3862         going to be default.
3864         * kern/term.c (grub_term_register_input): If this is the first
3865         terminal being registered, set it as the current one.
3866         (grub_term_register_output): Likewise.
3868         * term/efi/console.c (grub_console_init): Do not call
3869         grub_term_set_current_output() or grub_term_set_current_input().
3870         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3871         * term/i386/pc/console.c (grub_console_init): Likewise.
3872         (grub_console_fini): Do not call grub_term_set_current_input()
3873         (but leave grub_term_set_current_output() to restore text mode).
3875 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3877         * util/grub.d/00_header.in: Add backward compatibility check for
3878         versions of terminal.mod that don't understand `terminal_input' or
3879         `terminal_output'.
3881 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3883         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3884         `terminal_input' / `terminal_output', not `terminal'.
3886 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3888         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3889         (DISTCLEANFILES): Add `build_env.mk'.
3891 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3893         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3894         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3895         members.  Update all users.
3896         * util/console.c (grub_ncurses_term): Split in ...
3897         (grub_ncurses_term_input): ... this, and ...
3898         (grub_ncurses_term_output): ... this.  Update all users.
3899         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3901 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3903         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3904         (PKGDATA): Add $(pkgdata_SRCDIR).
3905         (pkglib_BUILDDIR): New variable.
3906         (pkgdata_SRCDIR): New variable.
3907         (build_env.mk): New target.
3908         (include_DATA): New variable.
3909         (install-local): Install $(include_DATA) files in $(includedir).
3911 2008-11-07  Pavel Roskin  <proski@gnu.org>
3913         * gendistlist.sh: Use C locale for sorting to ensure consistent
3914         output on all systems.
3916         * util/grub.d/00_header.in: Remove incorrect space before
3917         "serial".
3919 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3921         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3922         per specification.
3923         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3924         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3925         (based on find_multi_boot1_header).
3926         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3927         using find_multi_boot2_header(), and abort if neither Multiboot or
3928         Multiboot headers were found.
3930 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3932         Modularize at_keyboard.mod:
3934         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3935         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3936         (at_keyboard_mod_LDFLAGS): New variables.
3938         Actual terminal split:
3940         * include/grub/term.h (struct grub_term): Split in ...
3941         (struct grub_term_input): ... this, and ...
3942         (struct grub_term_output): ... this.  Update all users.
3943         (grub_term_set_current): Split in ...
3944         (grub_term_set_current_input): ... this, and ...
3945         (grub_term_set_current_output): ... this.
3946         (grub_term_get_current): Split in ...
3947         (grub_term_get_current_input): ... this, and ...
3948         (grub_term_get_current_output): ... this.
3949         (grub_term_register): Split in ...
3950         (grub_term_register_input): ... this, and ...
3951         (grub_term_register_output): ... this.
3952         (grub_term_unregister): Split in ...
3953         (grub_term_unregister_input): ... this, and ...
3954         (grub_term_unregister_output): ... this.
3955         (grub_term_iterate): Split in ...
3956         (grub_term_iterate_input): ... this, and ...
3957         (grub_term_iterate_output): ... this.
3959         * kern/term.c (grub_term_list): Split in ...
3960         (grub_term_list_input): ... this, and ...
3961         (grub_term_list_output): ... this.  Update all users.
3962         (grub_cur_term): Split in ...
3963         (grub_cur_term_input): ... this, and ...
3964         (grub_cur_term_output): ... this.  Update all users.
3965         (grub_term_set_current): Split in ...
3966         (grub_term_set_current_input): ... this, and ...
3967         (grub_term_set_current_output): ... this.
3968         (grub_term_get_current): Split in ...
3969         (grub_term_get_current_input): ... this, and ...
3970         (grub_term_get_current_output): ... this.
3971         (grub_term_register): Split in ...
3972         (grub_term_register_input): ... this, and ...
3973         (grub_term_register_output): ... this.
3974         (grub_term_unregister): Split in ...
3975         (grub_term_unregister_input): ... this, and ...
3976         (grub_term_unregister_output): ... this.
3977         (grub_term_iterate): Split in ...
3978         (grub_term_iterate_input): ... this, and ...
3979         (grub_term_iterate_output): ... this.
3981         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3982         a check for input and one for output (and only attempt to get keys
3983         from user when input works).
3985         * util/grub-probe.c (grub_term_get_current): Split in ...
3986         (grub_term_get_current_input): ... this, and ...
3987         (grub_term_get_current_output): ... this.
3988         * util/grub-fstest.c: Likewise.
3989         * util/i386/pc/grub-setup.c: Likewise.
3990         * util/grub-editenv.c: Likewise.
3992         Portability adjustments:
3994         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3995         `term/i386/pc/at_keyboard.c'.
3996         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3997         grub_keyboard_controller_init() (now handled by terminal .init).
3998         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3999         grub_at_keyboard_init().
4000         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4001         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4002         at_keyboard.mod via input terminal interface).
4003         * include/grub/i386/coreboot/console.h: Convert into a stub for
4004         `<grub/i386/pc/console.h>'.
4006         Migrate full terminals to new API:
4008         * term/efi/console.c (grub_console_term): Split into ...
4009         (grub_console_term_input): ... this, and ...
4010         (grub_console_term_output): ... this.  Update all users.
4011         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4012         (grub_ofconsole_init): Split into ...
4013         (grub_ofconsole_init_input): ... this, and ...
4014         (grub_ofconsole_init_output): ... this.
4015         (grub_ofconsole_term): Split into ...
4016         (grub_ofconsole_term_input): ... this, and ...
4017         (grub_ofconsole_term_output): ... this.  Update all users.
4018         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4019         (grub_serial_term_input): ... this, and ...
4020         (grub_serial_term_output): ... this.  Update all users.
4021         * term/i386/pc/console.c (grub_console_term): Split into ...
4022         (grub_console_term_input): ... this, and ...
4023         (grub_console_term_output): ... this.  Update all users.
4024         (grub_console_term_input): Only enable it on PC/BIOS platform.
4025         (grub_console_init): Remove grub_keyboard_controller_init() call.
4027         Migrate input terminals to new API:
4029         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4030         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4031         i386-specific anyway).
4032         (grub_console_checkkey): Rename to ...
4033         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4034         users.
4035         (grub_keyboard_controller_orig): New variable.
4036         (grub_console_getkey): Rename to ...
4037         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4038         users.
4039         (grub_keyboard_controller_init): Static-ize.  Save original
4040         controller value so that it can be restored ...
4041         (grub_keyboard_controller_fini): ... here (new function).
4042         (grub_at_keyboard_term): New structure.
4043         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4044         functions.
4046         Migrate output terminals to new API:
4048         * term/i386/pc/vga.c (grub_vga_term): Change type to
4049         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4050         members.  Update all users.
4051         * term/gfxterm.c (grub_video_term): Change type to
4052         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4053         members.  Update all users.
4054         * include/grub/i386/pc/console.h (grub_console_checkkey)
4055         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4056         etc).
4058         Migrate `terminal' command and userland tools to new API:
4060         * commands/terminal.c (grub_cmd_terminal): Split into ...
4061         (grub_cmd_terminal_input): ... this, and ...
4062         (grub_cmd_terminal_output): ... this.
4063         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4064         `terminal_input' and `terminal_output'.
4065         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4066         `terminal_input' / `terminal_output' API.
4067         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4068         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4069         provided ${GRUB_TERMINAL}, convert it).
4071 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4073         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4074         for FreeBSD.
4075         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4077 2008-11-03  Bean  <bean123ch@gmail.com>
4079         * kern/elf.c (grub_elf32_load): Revert to previous code.
4080         (grub_elf64_load): Likewise.
4082         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4084 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4086         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4087         (TARGET_CPPFLAGS): Likewise.
4088         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4090 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4092         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4094 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4096         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4097         addition of objects until the code is not going to be able to fail.
4099 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4101         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4102         (add a missing NULL check, and correct them by moving the pointer
4103         operations after the actual check).
4105 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4107         * util/i386/pc/grub-install.in: Handle empty string as output from
4108         make_system_path_relative_to_its_root().
4110 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4112         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4113         circular metadata worst case scenario. If the metadata is circular
4114         then copy the wrap in place.
4115         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4116         project lib/format_text/layout.h
4117         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4119 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4121         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4123 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4125         * util/update-grub_lib.in: Mention filename in warning message.
4127 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4129         * NEWS: Update for rename of update-grub to grub-mkconfig.
4131 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4133         * util/update-grub_lib.in: Copy to ...
4134         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4135         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4136         * util/update-grub.in: Rename to ...
4137         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4138         option. Add `--output' option to allow users to specify the generated
4139         configuration file.  Default to stdout.
4140         (update_grub_dir): Rename to ...
4141         (grub_mkconfig_dir): ... this.
4142         (grub_cfg): Default to an empty string.
4143         * conf/common.rmk (update-grub): Rename to ...
4144         (grub-mkconfig): ... this.
4145         (update-grub_lib): Copy to ...
4146         (grub-mkconfig_lib): ... this.
4147         (update-grub_SCRIPTS): Copy to ...
4148         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4149         (update-grub_DATA): Rename to ...
4150         (grub-mkconfig_DATA): ... this.
4152 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4154         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4155         to `modified'.  Add the real `created' field.
4156         (grub_iso9660_uuid): Use `modified' rather than `created' for
4157         constructing the UUID.
4159 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4161         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4162         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4164 2008-09-28  Bean  <bean123ch@gmail.com>
4166         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4167         Thanks to Christian Franke for finding this bug.
4169 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4171         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4172         instances of grub_util_get_disk_name() (see previous commit).
4174 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4176         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4177         `util/i386/get_disk_name.c'.
4178         * conf/i386-efi.rmk: Likewise.
4179         * conf/x86_64-efi.rmk: Likewise.
4180         * conf/i386-coreboot.rmk: Likewise.
4181         * conf/i386-ieee1275.rmk: Likewise.
4182         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4183         `util/ieee1275/get_disk_name.c'.
4184         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4185         * util/ieee1275/get_disk_name.c: Remove file.
4186         * util/i386/get_disk_name.c: Remove file.
4187         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4188         "hd%d" for device.map entries, rather than using
4189         grub_util_get_disk_name().
4191 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4193         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4194         warning.
4195         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4197 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4199         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4200         Changed to 0x5100.
4201         (GRUB_TERM_PPAGE): Changed to 0x4900.
4203 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4205         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4206         macros (they were i386-pc specific).
4207         * include/grub/sparc64/ieee1275/console.h: Likewise.
4208         * include/grub/efi/console.h: Likewise.
4210 2008-09-22  Bean  <bean123ch@gmail.com>
4212         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4213         resident and in attribute list.
4215         * include/grub/ntfs.h (BMP_LEN): Removed.
4217 2008-09-22  Bean  <bean123ch@gmail.com>
4219         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4220         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4222         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4223         error occurs, as grub_disk_open will call grub_disk_close, which will
4224         call p->close (scsi).
4226 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4228         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4229         (AC_PREREQ): Bumped to 2.59.
4230         (AC_TRY_COMPILE): Replace obsolete macro with ...
4231         (AC_COMPILE_IFELSE): ... this.
4232         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4233         (AC_LINK_IFELSE): ... this.
4235 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4237         * autogen.sh: Add a call to `gendistlist.sh'.
4239 2008-09-19  Christian Franke  <franke@computer.org>
4241         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4242         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4243         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4244         Export __enable_execute_stack() to modules.
4245         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4246         New function.
4248 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4250         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4251         Sort the list.
4253 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4255         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4256         #include <grub/util/hostdisk.h>.
4258 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4260         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4261         segments when their filesz is zero (grub_file_read() interprets
4262         zero-size as "read until EOF", which results in memory corruption).
4263         Use `lowest_segment' rather than 0 for calculating the current
4264         segment load address.
4266 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4268         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4269         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4270         clobbered useful information.
4272 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4274         * include/grub/util/biosdisk.h: Move to ...
4275         * include/grub/util/hostdisk.h: ... here.  Update all users.
4276         * util/biosdisk.c: Move to ...
4277         * util/hostdisk.c: ... here.  Update all users.
4279 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4281         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4282         variables.
4283         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4284         and length can be stored directly in the `mbi->mmap_addr' and
4285         `mbi->mmap_length' struct fields.
4287 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4289         * conf/i386.rmk: New file.  Provides declaration for building
4290         `cpuid.mod'.
4291         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4292         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4293         variables.
4294         Include `conf/i386.mk'.
4295         * conf/i386-efi.rmk: Likewise.
4296         * conf/x86_64-efi.rmk: Likewise.
4297         * conf/i386-coreboot.rmk: Likewise.
4298         * conf/i386-ieee1275.rmk: Likewise.
4300 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4302         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4303         Adds optimization support for BGR based modes.
4305         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4306         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4307         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4308         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4309         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4310         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4311         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4312         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4313         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4314         (grub_video_i386_vbeblit_index_index): Likewise.
4315         (grub_video_i386_vbeblit_replace_directN): Added.
4316         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4317         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4318         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4319         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4320         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4321         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4322         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4323         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4324         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4325         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4326         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4327         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4328         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4330         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4331         (grub_video_i386_vbefill_R8G8B8): Likewise.
4332         (grub_video_i386_vbefill_index): Likewise.
4333         (grub_video_i386_vbefill_direct32): Added.
4334         (grub_video_i386_vbefill_direct24): Likewise.
4335         (grub_video_i386_vbefill_direct16): Likewise.
4336         (grub_video_i386_vbefill_direct8): Likewise.
4338         * include/grub/video.h (grub_video_blit_format): Removed
4339         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4340         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4341         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4342         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4343         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4345         * video/video.c (grub_video_get_blit_format): Updated to use new
4346         blit formats.  Added handling for 16 bit color modes.
4348         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4349         fillers.
4350         (common_blitter): Updated to use new blitters.
4352         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4353         Removed.
4354         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4355         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4356         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4357         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4358         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4359         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4360         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4361         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4362         (grub_video_i386_vbeblit_index_index): Likewise.
4363         (grub_video_i386_vbeblit_replace_directN): Added.
4364         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4365         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4366         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4367         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4368         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4369         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4370         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4371         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4372         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4373         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4374         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4375         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4376         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4378         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4379         (grub_video_i386_vbefill_R8G8B8): Likewise.
4380         (grub_video_i386_vbefill_index): Likewise.
4381         (grub_video_i386_vbefill_direct32): Added.
4382         (grub_video_i386_vbefill_direct24): Likewise.
4383         (grub_video_i386_vbefill_direct16): Likewise.
4384         (grub_video_i386_vbefill_direct8): Likewise.
4386         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4387         types.
4389         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4390         types.
4392         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4393         blitter types.
4395         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4396         types.
4398 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4400         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4401         RAID level 1.
4403 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4405         * fs/iso9660.c (grub_iso9660_date): New structure.
4406         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4407         (grub_iso9660_uuid): New function.
4409 2008-09-05  Bean  <bean123ch@gmail.com>
4411         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4413         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4414         insensitive bit for names in Win32 and Win32 & DOS namespace.
4416         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4418         * include/grub/types.h (LONG_MAX): Likewise.
4420 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4422         * util/getroot.c: Include <config.h>.
4423         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4424         add support for /dev/md/N devices and handle LVM double dash escaping.
4426 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4428         * config.guess: Update to latest version from config git.
4429         * config.sub: Likewise.
4431 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4433         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4434         `disk->total_sectors'.
4436 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4438         * include/grub/normal.h: Fixed incorrect comment for
4439         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4441 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4443         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4444         values with defines.
4446         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4447         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4448         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4449         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4450         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4451         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4452         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4453         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4454         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4455         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4456         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4457         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4458         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4459         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4460         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4461         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4462         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4463         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4464         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4466 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4468         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4469         declaration.
4470         (grub_multiboot): Fix a few warnings.
4472 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4474         * loader/i386/pc/multiboot.c: Update comment not to say that
4475         boot_device support is unimplemented.
4477 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4479         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4480         or memory map support are unimplemented.
4482 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4484         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4486 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4488         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4489         total video memory in 'vbeinfo' output; show color format details for
4490         each video mode.
4492 2008-08-30  Pavel Roskin  <proski@gnu.org>
4494         * util/genmoddep.c: Remove for real this time.
4495         * DISTLIST: Remove util/genmoddep.c.
4497 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4499         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4500         as required by Multiboot spec (it was already 4-byte aligned, but
4501         only by chance).
4503 2008-08-29  Pavel Roskin  <proski@gnu.org>
4505         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4506         * kern/powerpc/ieee1275/startup.S: ... this.
4507         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4508         * DISTLIST: Likewise.
4510         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4511         grub/cpu/kernel.h.  Add start label for consistency with other
4512         platforms.  Add grub_prefix immediately after start.  Add jump
4513         to the code after grub_prefix.
4514         * include/grub/powerpc/kernel.h: Provide valid values for
4515         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4517 2008-08-29  Bean  <bean123ch@gmail.com>
4519         * configure.ac: Change host_os to cygwin for mingw.
4520         (asprintf): New check for function.
4522         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4523         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4525         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4526         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4527         sync, sleep and grub_util_get_disk_size for mingw.
4529         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4530         to get size in mingw.
4531         (open_device): Use flag O_BINARY if it's defined.
4532         (find_root_device): Add dummy code for mingw.
4534         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4535         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4536         (get_scsi_disk_name): Return 0 for mingw.
4538         * util/hostfs.c: #include <grub/util/misc.h>.
4539         (grub_hostfs_open): Use "rb" flag to open file, use
4540         grub_util_get_disk_size to get disk size for mingw.
4542         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4543         (asprintf): New function if HAVE_ASPRINTF is not set.
4544         (sync): New function for mingw.
4545         (sleep): Likewise.
4546         (grub_util_get_disk_size): Likewise.
4548 2008-08-28  Pavel Roskin  <proski@gnu.org>
4550         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4551         kern/time.c.
4553 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4555         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4557 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4559         Change find_grub_drive() syntax so it doesn't prevent it from
4560         detecting NULL names as errors.
4562         * util/biosdisk.c (find_grub_drive): Move free slot search code
4563         from here ...
4564         (find_free_slot): ... to here.
4565         (read_device_map): Use find_free_slot() to search for free slots.
4567 2008-08-27  Marco Gerards  <marco@gnu.org>
4569         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4570         (scsi_mod_SOURCES): New variable.
4571         (scsi_mod_CFLAGS): Likewise
4572         (scsi_mod_LDFLAGS): Likewise.
4574         * disk/scsi.c: New file.
4576         * include/grub/scsi.h: Likewise.
4578         * include/grub/scsicmd.h: Likewise.
4580         * disk/ata.c: Include <grub/scsi.h>.
4581         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4582         instead.
4583         (grub_ata_iterate): Skip ATAPI devices.
4584         (grub_ata_open): Only handle ATAPI devices.
4585         (struct grub_atapi_read): Removed.
4586         (grub_atapi_readsector): Likewise.
4587         (grub_ata_read): No longer handle ATAPI devices.
4588         (grub_ata_write): Likewise.
4589         (grub_atapi_iterate): New function.
4590         (grub_atapi_read): Likewise.
4591         (grub_atapi_write): Likewise.
4592         (grub_atapi_open): Likewise.
4593         (grub_atapi_close): Likewise.
4594         (grub_atapi_dev): New variable.
4595         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4596         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4598         * include/grub/disk.h (enum grub_disk_dev_id): Add
4599         `GRUB_DISK_DEVICE_SCSI_ID'.
4601 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4603         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4604         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4605         descriptive.
4607 2008-08-23  Bean  <bean123ch@gmail.com>
4609         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4610         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4611         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4612         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4613         dm_nv.mod.
4614         (raid5rec_mod_SOURCES): New macro.
4615         (raid5rec_mod_CFLAGS): Likewise.
4616         (raid5rec_mod_LDFLAGS): Likewise.
4617         (raid6rec_mod_SOURCES): Likewise.
4618         (raid6rec_mod_CFLAGS): Likewise.
4619         (raid6rec_mod_LDFLAGS): Likewise.
4620         (mdraid_mod_SOURCES): Likewise.
4621         (mdraid_mod_CFLAGS): Likewise.
4622         (mdraid_mod_LDFLAGS): Likewise.
4623         (dm_nv_mod_SOURCES): Likewise.
4624         (dm_nv_mod_CFLAGS): Likewise.
4625         (dm_nv_mod_LDFLAGS): Likewise.
4627         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4628         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4629         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4631         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4632         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4634         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4636         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4638         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4640         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4642         * disk/raid5_recover.c: New file.
4644         * disk/raid6_recover.c: Likewise.
4646         * disk/mdraid_linux.c: Likewise.
4648         * disk/dmraid_nvidia.c: Likewise.
4650         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4651         ULONG_MAX.
4653         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4654         calculate the size of raid device.
4655         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4656         different layout of raid5.
4657         (grub_raid_scan_device): Remove code specific to mdraid.
4658         (grub_raid_list): New variable.
4659         (free_array): New function.
4660         (grub_raid_register): Likewise.
4661         (grub_raid_unregister): Likewise.
4662         (grub_raid_rescan): Likewise.
4663         (GRUB_MOD_INIT): Don't iterate device here.
4664         (GRUB_MOD_FINI): Use free_array to release resource.
4666         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4667         (grub_raid5_recover_func_t): New function variable type.
4668         (grub_raid6_recover_func_t): Likewise.
4669         (grub_raid5_recover_func): New variable.
4670         (grub_raid6_recover_func): Likewise.
4671         (grub_raid_register): New function.
4672         (grub_raid_unregister): Likewise.
4673         (grub_raid_rescan): Likewise.
4674         (grub_raid_block_xor): Likewise.
4676         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4677         (CMD_CRC): New macro.
4678         (part): Removed.
4679         (read_file): Handle device as well as file.
4680         (cmd_crc): New function.
4681         (fstest): Handle multiple disks.
4682         (options): Remove part, raw and long, add root and diskcount.
4683         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4684         (main): Find the first non option entry and ignore subsequent options,
4685         add handling for the new options, support multiple disks.
4687         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4689 2008-08-23  Bean  <bean123ch@gmail.com>
4691         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4693         * genfslist.sh: Ignore kernel.mod.
4695         * genpartmaplist.sh: Likewise.
4697 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4699         * util/getroot.c (find_root_device): Skip anything that starts with
4700         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4702 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4704         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4705         * util/grub.d/00_header.in: Allow the administrator to change default
4706         gfxmode via ${GRUB_GFXMODE}.
4708 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4710         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4712 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4714         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4715         loader.
4716         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4717         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4719 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4721         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4722         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4724 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4726         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4727         (struct grub_virtual_screen): Remove `cursor_color'.
4728         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4729         initialization.
4730         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4732 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4734         Unify (identical) linux_normal.c files.
4735         * loader/i386/efi/linux_normal.c: Move from here ...
4736         * loader/linux_normal.c: ... to here.  Update all users.
4737         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4738         * loader/i386/ieee1275/linux_normal.c: Likewise.
4740 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4742         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4743         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4744         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4745         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4746         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4747         New macros.
4748         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4749         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4750         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4751         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4752         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4753         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4754         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4755         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4756         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4757         portably using grub_getxy().
4758         Replace `-EFI' with `-bzImage' in boot message.
4760 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4762         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4764 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4766         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4768         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4769         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4770         (grub_machine_mmap_iterate): New function declaration.
4771         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4772         structure.
4773         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4774         macros.
4776         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4777         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4778         Move e820 parsing from here ...
4779         * kern/i386/pc/mmap.c: New file.
4780         (grub_machine_mmap_iterate): ... to here.
4782         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4783         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4784         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4785         (grub_available_iterate): Redeclare to return `void', and redeclare
4786         its hook to use grub_uint64_t as addr and size parameters, and rename
4787         to ...
4788         (grub_machine_mmap_iterate): ... this.  Update all users.
4790         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4791         to make it more readable.  Rename to ...
4792         (grub_machine_mmap_iterate): ... this.
4794         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4795         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4796         (grub_multiboot): Allocate an extra region after the payload, and fill
4797         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4798         with the extra space.
4799         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4800         with the extra space.
4802 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4804         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4806 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4808         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4809         mdate-sh to the list `find' searches for.
4810         * DISTLIST: Regenerated.
4812 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4814         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4815         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4816         genmoddep.awk, gensymlist.sh.in.
4817         (DISTDIRS): Add bus, docs, hook, lib.
4818         * DISTLIST: Regenerated.
4819         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4821 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4823         * disk/raid.c (grub_raid_init): Handle/report errors set by
4824         grub_device_iterate().
4825         * disk/lvm.c (grub_lvm_init): Likewise.
4827 2008-08-15  Bean  <bean123ch@gmail.com>
4829         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4830         and datehook.mod.
4831         (datetime_mod_SOURCES): New macro.
4832         (datetime_mod_CFLAGS): Likewise.
4833         (datetime_mod_LDFLAGS): Likewise.
4834         (date_mod_SOURCES): Likewise.
4835         (date_mod_CFLAGS): Likewise.
4836         (date_mod_LDFLAGS): Likewise.
4837         (datehook_mod_SOURCES): Likewise.
4838         (datehook_mod_CFLAGS): Likewise.
4839         (datehook_mod_LDFLAGS): Likewise.
4841         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4842         and datehook.mod.
4843         (datetime_mod_SOURCES): New macro.
4844         (datetime_mod_CFLAGS): Likewise.
4845         (datetime_mod_LDFLAGS): Likewise.
4846         (date_mod_SOURCES): Likewise.
4847         (date_mod_CFLAGS): Likewise.
4848         (date_mod_LDFLAGS): Likewise.
4849         (datehook_mod_SOURCES): Likewise.
4850         (datehook_mod_CFLAGS): Likewise.
4851         (datehook_mod_LDFLAGS): Likewise.
4853         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4854         and datehook.mod.
4855         (datetime_mod_SOURCES): New macro.
4856         (datetime_mod_CFLAGS): Likewise.
4857         (datetime_mod_LDFLAGS): Likewise.
4858         (date_mod_SOURCES): Likewise.
4859         (date_mod_CFLAGS): Likewise.
4860         (date_mod_LDFLAGS): Likewise.
4861         (datehook_mod_SOURCES): Likewise.
4862         (datehook_mod_CFLAGS): Likewise.
4863         (datehook_mod_LDFLAGS): Likewise.
4865         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4866         and datehook.mod.
4867         (datetime_mod_SOURCES): New macro.
4868         (datetime_mod_CFLAGS): Likewise.
4869         (datetime_mod_LDFLAGS): Likewise.
4870         (date_mod_SOURCES): Likewise.
4871         (date_mod_CFLAGS): Likewise.
4872         (date_mod_LDFLAGS): Likewise.
4873         (datehook_mod_SOURCES): Likewise.
4874         (datehook_mod_CFLAGS): Likewise.
4875         (datehook_mod_LDFLAGS): Likewise.
4877         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4878         and datehook.mod.
4879         (datetime_mod_SOURCES): New macro.
4880         (datetime_mod_CFLAGS): Likewise.
4881         (datetime_mod_LDFLAGS): Likewise.
4882         (date_mod_SOURCES): Likewise.
4883         (date_mod_CFLAGS): Likewise.
4884         (date_mod_LDFLAGS): Likewise.
4885         (datehook_mod_SOURCES): Likewise.
4886         (datehook_mod_CFLAGS): Likewise.
4887         (datehook_mod_LDFLAGS): Likewise.
4889         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4891         * commands/date.c: New file.
4893         * hook/datehook.c: Likewise.
4895         * include/grub/lib/datetime.h: Likewise.
4897         * include/grub/i386/cmos.h: Likewise.
4899         * lib/datetime.c: Likewise.
4901         * lib/i386/datetime.c: Likewise.
4903         * lib/efi/datetime.c: Likewise.
4905 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4907         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4908         (grub_mkelfimage_SOURCES): New variable.
4909         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4911         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4912         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4913         * conf/powerpc-ieee1275.rmk: Likewise.
4914         * conf/i386-ieee1275.rmk: Likewise.
4916         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4917         * kern/i386/coreboot/init.c: Likewise.
4919         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4920         with `<grub/cpu/kernel.h>'.
4921         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4922         to ...
4923         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4924         * kern/i386/coreboot/startup.S: Likewise.
4926         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4927         (GRUB_MOD_GAP): Remove.
4928         * include/grub/powerpc/kernel.h: New file.
4929         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4930         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4931         * include/grub/i386/kernel.h: New file.
4932         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4933         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4934         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4936         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4937         `grub-mkelfimage'.
4938         Use --directory when invoking grub_mkimage.
4940         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4941         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4942         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4943         and GRUB_KERNEL_CPU_PREFIX.
4945 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4947         * include/grub/err.h (grub_err_printf): New function prototype.
4948         * util/misc.c (grub_err_printf): New function.
4949         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4950         grub_printf.
4951         * kern/err.c (grub_print_error): Use grub_err_printf.
4953 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4955         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4957 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4959         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4960         boot entry.
4962 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4964         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4965         of the relocation code from here ...
4966         (grub_multiboot): ... to here.
4967         (forward_relocator, backward_relocator): Move from here ...
4968         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4969         (grub_multiboot_backward_relocator): ... to here.
4970         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4971         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4972         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4973         (grub_multiboot_forward_relocator_end)
4974         (grub_multiboot_backward_relocator)
4975         (grub_multiboot_backward_relocator_end): New variables.
4977 2008-08-12  Bean  <bean123ch@gmail.com>
4979         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4981 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4983         * kern/i386/linuxbios/startup.S: Move from here ...
4984         * kern/i386/coreboot/startup.S: ... to here.
4986         * kern/i386/linuxbios/init.c: Move from here ...
4987         * kern/i386/coreboot/init.c: ... to here.
4989         * kern/i386/linuxbios/table.c: Move from here ...
4990         * kern/i386/coreboot/mmap.c: ... to here.
4992         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4994 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4996         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4997         errors.  Leave it to the upper layer to handle them.
4999 2008-08-09  Christian Franke  <franke@computer.org>
5001         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5002         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5003         Install `grub.d/10_windows' only on Cygwin.
5004         * configure.ac: Add subst of `target_os'.
5005         Check `target_os' also before setting TARGET_OBJ2ELF.
5006         Add `--enable-grub-pe2elf'.
5008 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5010         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5011         (grub_last_time): Change type to grub_uint64_t.
5012         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5013         (grub_disk_close): Likewise.
5015         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5016         (run_menu): Migrate code from to using grub_get_time_ms().
5018         * util/misc.c (grub_get_time_ms): New function.
5020 2008-08-08  Marco Gerards  <marco@gnu.org>
5022         * disk/ata.c (grub_ata_regget): Change return type to
5023         `grub_uint8_t'.
5024         (grub_ata_regget2): Likewise.
5025         (grub_ata_wait_status): New function.
5026         (grub_ata_wait_busy): Removed function, updated all users to use
5027         `grub_ata_wait_status'.
5028         (grub_ata_wait_drq): Likewise.
5029         (grub_ata_cmd): New function.
5030         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5031         error handling.
5032         (grub_ata_pio_write): Add error handling.
5033         (grub_atapi_identify): Likewise.
5034         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5035         handling.
5036         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5037         handling.  Actually use the detected registers.  Reorder the
5038         detection logic such that it is easier to read.
5039         (grub_ata_pciinit): Do not assign the same ID to each controller.
5040         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5041         handling.
5042         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5044         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5046 2008-08-08  Marco Gerards  <marco@gnu.org>
5048         * NEWS: Update.
5050 2008-08-07  Bean  <bean123ch@gmail.com>
5052         * include/grub/x86_64/pci.h: New file.
5054 2008-08-07  Christian Franke  <franke@computer.org>
5056         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5057         (TIMER2_GATE): Likewise.
5058         (grub_pit_wait): Add enable/disable of the timer2 gate
5059         bit of port 0x61.  This fixes a possible infinite loop.
5061 2008-08-07  Bean  <bean123ch@gmail.com>
5063         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5064         kern/i386/tsc.c and kern/i386/pit.c.
5066         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5067         x86_64 platform.
5069         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5070         <grub/i386/tsc.h>.
5072         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5074 2008-08-07  Bean  <bean123ch@gmail.com>
5076         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5078         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5080         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5081         multiple inclusion. Add #include <grub/types.h>.
5083 2008-08-06  Christian Franke  <franke@computer.org>
5085         * conf/common.rmk: Build and install `10_windows'.
5086         * util/grub.d/10_windows.in: New script.
5088 2008-08-06  Pavel Roskin  <proski@gnu.org>
5090         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5092 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5094         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5095         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5097 2008-08-06  Bean  <bean123ch@gmail.com>
5099         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5100         (grub_pxefs_fs_int): Remove dummy definition.
5101         (grub_pxefs_open): Use data->block_size to store the current block
5102         size setting.
5103         (grub_pxefs_read): Use block size stored in data->block_size. As the
5104         value of grub_pxe_blksize can be changed after the file is opened.
5106 2008-08-06  Bean  <bean123ch@gmail.com>
5108         * fs/i386/pc/pxe.c (curr_file): new variable.
5109         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5110         require the dummy internal file system anymore.
5111         (grub_pxefs_read): Removed.
5112         (grub_pxefs_close): Likewise.
5113         (grub_pxefs_fs_int): Likewise.
5114         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5115         connection when we switch file.
5116         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5118 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5120         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5121         `halt.mod'.
5122         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5123         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5125         * kern/i386/halt.c: New file.
5126         * kern/i386/reboot.c: Likewise.
5127         * include/grub/i386/reboot.h: Likewise.
5128         * include/grub/i386/halt.h: Likewise.
5130         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5131         Include `<grub/cpu/halt.h>'.
5132         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5133         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5135         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5136         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5137         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5138         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5139         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5140         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5141         from here ...
5142         * include/grub/i386/at_keyboard.h: ... to here.
5144 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5146         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5147         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5148         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5149         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5150         `kern/generic/millisleep.c'.
5152         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5153         instead of grub_get_rtc().
5154         (grub_tsc_init): Initialize `tsc_boot_time'.
5156         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5157         (grub_machine_init): Use grub_tsc_init() rather than
5158         installing an RTC-based handler via grub_install_get_time_ms().
5160         * kern/i386/pit.c: New file.
5161         * include/grub/i386/pit.h: Likewise.
5163 2008-08-05  Bean  <bean123ch@gmail.com>
5165         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5167         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5168         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5169         (pxe_mod_SOURCES): New macro.
5170         (pxe_mod_CFLAGS): Likewise.
5171         (pxe_mod_LDFLAGS): Likewise.
5172         (pxecmd_mod_SOURCES): Likewise.
5173         (pxecmd_mod_CFLAGS): Likewise.
5174         (pxecmd_mod_LDFLAGS): Likewise.
5176         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5177         (grub_pxe_call): Likewise.
5179         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5181         * commands/i386/pc/pxecmd.c: New file.
5183         * fs/i386/pc/pxe.c: Likewise.
5185         * include/grub/i386/pc/pxe.h: Likewise.
5187 2008-08-05  Bean  <bean123ch@gmail.com>
5189         * util/console.c (grub_console_cur_color): New variable.
5190         (grub_console_standard_color): Likewise.
5191         (grub_console_normal_color): Likewise.
5192         (grub_console_highlight_color): Likewise.
5193         (color_map): Likewise.
5194         (use_color): Likewise.
5195         (NUM_COLORS): New macro.
5196         (grub_ncurses_setcolorstate): Handle color properly.
5197         (grub_ncurses_setcolor): Don't change color here, just remember the
5198         settings, color will be set in grub_ncurses_setcolorstate.
5199         (grub_ncurses_getcolor): New function.
5200         (grub_ncurses_init): Initialize color pairs.
5201         (grub_ncurses_term): New member grub_ncurses_getcolor.
5203 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5205         High resolution timer support.  Implemented for x86 CPUs using TSC.
5206         Extracted generic grub_millisleep() so it's linked in only as needed.
5207         This requires a Pentium compatible CPU; if the RDTSC instruction is
5208         not supported, then it falls back on the generic grub_get_time_ms()
5209         implementation that uses the machine's RTC.
5211         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5212         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5213         `kern/generic/millisleep.c'.
5215         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5216         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5218         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5219         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5221         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5223         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5224         `kern/generic/millisleep.c'.
5226         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5228         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5230         * kern/generic/rtc_get_time_ms.c: New file.
5232         * kern/generic/millisleep.c: New file.
5234         * kern/misc.c: Don't include
5235         <kern/time.h> anymore.
5236         (grub_millisleep_generic): Removed.
5238         * commands/sleep.c (grub_interruptible_millisleep): Uses
5239         grub_get_time_ms() instead of grub_get_rtc().
5241         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5242         function.
5243         (grub_cpu_is_cpuid_supported): New inline function.
5244         (grub_cpu_is_tsc_supported): New inline function.
5245         (grub_tsc_init): New function prototype.
5246         (grub_tsc_get_time_ms): New function prototype.
5248         * kern/i386/tsc.c (grub_get_time_ms): New file.
5250         * include/grub/time.h: Include <grub/types.h.
5251         (grub_millisleep_generic): Removed.
5252         (grub_get_time_ms): New prototype.
5253         (grub_install_get_time_ms): New prototype.
5254         (grub_rtc_get_time_ms): New prototype.
5256         * kern/time.c (grub_get_time_ms): New function.
5257         (grub_install_get_time_ms): New function.
5259         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5260         <grub/time.h> anymore.
5261         (grub_millisleep): Removed.
5262         (grub_machine_init): Call grub_tsc_init.
5264         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5265         get_time_ms() implementation.
5267         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5268         (ieee1275_get_time_ms): New function.
5269         (grub_machine_init): Install get_time_ms() implementation.
5271         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5272         (grub_machine_init): Call grub_tsc_init().
5273         (grub_millisleep): Removed.
5275         * kern/ieee1275/init.c (grub_millisleep): Removed.
5276         (grub_machine_init): Install ieee1275_get_time_ms()
5277         implementation.
5278         (ieee1275_get_time_ms): New function.
5279         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5280         real work.
5282 2008-08-05  Marco Gerards  <marco@gnu.org>
5284         * disk/ata.c: Include <grub/pci.h>.
5285         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5286         (grub_ata_initialize): Rewritten.
5287         (grub_ata_device_initialize): New function.
5289 2008-08-04  Pavel Roskin  <proski@gnu.org>
5291         * kern/main.c: Include grub/mm.h.
5293 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5295         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5296         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5297         corruption problem).
5299 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5301         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5302         warnings introduced in my last commit.
5304 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5306         Make PCI available on all i386 architectures.
5308         * include/grub/i386/pc/pci.h: Move from here ...
5309         * include/grub/i386/pci.h: ... to here.
5311         * include/grub/i386/pc/pci.h: Remove.
5312         * include/grub/i386/efi/pci.h: Remove.
5313         * include/grub/x86_64/efi/pci.h: Remove.
5315         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5316         `<grub/cpu/pci.h>'.
5318         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5319         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5320         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5322         * conf/i386-ieee1275.rmk: Likewise.
5324 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5326         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5327         (grub_console_setcursor): Make it possible to set cursor off.
5329 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5331         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5332         of modules instead of assuming which platform provides what.
5333         * util/update-grub.in: Likewise.
5335 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5337         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5338         instead of `grub_install_dos_part' to determine whether a drive needs
5339         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5340         because it can be overridden when loading GRUB via Multiboot).
5342 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5344         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5346 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5348         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5349         of informational grub_dprintf() calls.
5351 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5353         * disk/memdisk.c (memdisk_size): Don't initialize.
5354         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5356         * include/grub/i386/pc/kernel.h
5357         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5358         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5359         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5360         (grub_arch_memdisk_size): Remove.
5362         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5363         field (was only used to transfer a constant).  Add `type' field to
5364         support multiple module types.
5365         (grub_module_iterate): New function.
5367         * kern/device.c (grub_device_open): Do not hide error messages
5368         when grub_disk_open() fails.  Use grub_print_error() instead.
5370         * kern/i386/pc/init.c (grub_arch_modules_addr)
5371         (grub_arch_memdisk_size): Remove functions.
5372         (grub_arch_modules_addr): Return the module address in high memory
5373         (now that it isn't copied anymore).
5375         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5376         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5377         decompression routine (grub_total_module_size already includes that
5378         now).  Don't copy modules back to low memory.
5380         * kern/main.c: Include `<grub/mm.h>'.
5381         (grub_load_modules): Split out (and use) ...
5382         (grub_module_iterate): ... this function, which iterates through
5383         module objects and runs a hook.
5384         Comment out grub_mm_init_region() call, as it would cause non-ELF
5385         modules to be overwritten.
5387         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5388         the memdisk image in its own region, make it part of the module list.
5389         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5390         (main): Parse --memdisk|-m option, and pass user-provided path as
5391         parameter to generate_image().
5392         (add_segments): Pass `memdisk_path' down to load_modules().
5393         (load_modules): Embed memdisk image in module section when requested.
5394         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5395         `header.type' instead of `header.offset'.
5397         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5398         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5399         (memdisk_mod_LDFLAGS): New variables.
5400         * conf/i386-coreboot.rmk: Likewise.
5401         * conf/i386-ieee1275.rmk: Likewise.
5403 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5405         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5406         (backward_relocator): New variables.  Used to allocate and relocate
5407         the payload, respectively.
5408         (grub_multiboot_load_elf32): Load into heap instead of requested
5409         address, install the appropriate relocator code in each bound of
5410         the payload, and set the entry point such that
5411         grub_multiboot_real_boot() will jump to one of them.
5413         * kern/i386/loader.S (grub_multiboot_payload_size)
5414         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5415         (grub_multiboot_payload_entry_offset): New variables.
5416         (grub_multiboot_real_boot): Set cpu context to what the relocator
5417         expects, and jump to the relocator instead of the payload.
5419         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5420         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5421         (grub_multiboot_payload_entry_offset): Export.
5423 2008-08-01  Bean  <bean123ch@gmail.com>
5425         * normal/menu_entry.c (editor_getline): Don't return the original
5426         string as result, as it will be released by lexer once it has done
5427         using it.
5429 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5431         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5432         within menuentries, not before them.
5433         util/grub.d/10_hurd.in: Likewise.
5435 2008-08-01  Bean  <bean123ch@gmail.com>
5437         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5438         (bufio_mod_SOURCES): New macro.
5439         (bufio_mod_CFLAGS): Likewise.
5440         (bufio_mod_LDFLAGS): Likewise.
5442         * include/grub/bufio.h: New file.
5444         * io/bufio.c: Likewise.
5446         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5447         (grub_video_reader_png): Use grub_buffile_open to open file.
5449         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5450         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5452         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5453         (grub_video_reader_tga): Use grub_buffile_open to open file.
5455         * font/manager.c: Include <grub/bufio.h>.
5456         (add_font): Use grub_buffile_open to open file.
5458 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5460         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5461         ELF segments, use a macro for arbitrarily accessing any of them instead
5462         of preparing a pointer that allows access to one at a time.
5463         (grub_multiboot_load_elf64): Likewise.
5465 2008-07-31  Bean  <bean123ch@gmail.com>
5467         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5468         GRUB_KERNEL_MACHINE_DATA_END.
5470 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5472         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5473         Increase from 0x50 to 0x60.
5474         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5475         use UUIDs to identify the root drive for them.  If that's not
5476         possible, abort.
5477         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5478         check, for cross-disk installs.
5480 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5482         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5483         is non-empty, use it to set the `prefix' environment variable instead
5484         of the usual approach.
5485         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5486         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5487         environment variable instead of dummy make_install_device().
5489         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5490         (start): Insert a data section, with `grub_prefix' variable.
5491         * kern/i386/linuxbios/startup.S: Likewise.
5493         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5494         New variable reference.
5495         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5496         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5497         to `start').
5498         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5499         section within startup.S (relative to `start').
5500         * include/grub/i386/coreboot/kernel.h: Likewise.
5502         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5503         Overwrite grub_prefix with its contents, at the beginning of the
5504         first segment.
5505         (main): Understand -p|--prefix.
5507 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5509         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5511 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5513         * term/i386/pc/vga_text.c (grub_console_cls): Use
5514         grub_console_gotoxy() to go back to beginning of the screen.
5515         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5517 2008-07-29  Christian Franke  <franke@computer.org>
5519         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5520         Add conversion of emulated mount points on Cygwin.
5522 2008-07-29  Christian Franke  <franke@computer.org>
5524         * util/update-grub.in: Add a check for admin
5525         group on Cygwin.
5526         Remove old `grub.cfg.new' before creation.
5527         Add `-f' to `mv' to handle the different filesystem
5528         semantics of Windows.
5530 2008-07-29  Bean  <bean123ch@gmail.com>
5532         * normal/main.c (get_line): Fix buffer overflow bug.
5534 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5536         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5537         (struct grub_apple_header): New struct.  Describes the layout of
5538         the partmap header.
5539         (apple_partition_map_iterate): Check the header magic as well as the
5540         partition magic (which was already being checked).
5542 2008-07-28  Pavel Roskin  <proski@gnu.org>
5544         * genmk.rb: Add a warning to the beginning of the output that
5545         it's a generated file and should not be edited.
5547 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5549         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5550         with the same number are found, just use issue a warning with
5551         grub_dprintf(), as this error has been reported to be non-fatal.
5553 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5555         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5556         information.
5558 2008-07-27  Bean  <bean123ch@gmail.com>
5560         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5561         (grub_fat_find_dir): Ignore case when comparing filename.
5563 2008-07-27  Bean  <bean123ch@gmail.com>
5565         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5566         smallino, as it's more descriptive, and i8count can be confused with
5567         the other field count.
5568         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5569         inode type.
5571 2008-07-27  Bean  <bean123ch@gmail.com>
5573         * commands/crc.c: New file.
5575         * lib/crc.c: Likewise.
5577         * include/grub/lib/crc.h: Likewise.
5579         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5581         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5582         (hexdump): Move this function to ...
5584         * lib/hexdump.c: ... here.
5586         * include/grub/hexdump.h: Renamed to ...
5588         * include/grub/lib/hexdump.h: ... this.
5590         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5592         * util/grub-editenv.c: Likewise.
5594         * include/envblk.h: Renamed to ...
5596         * include/lib/envblk.h: ... this.
5598         * util/envblk.c: Renamed to ...
5600         * lib/envblk.c: ... this.
5602         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5603         lib/hexdump.c.
5604         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5605         (pkglib_MODULES): Add crc.mod.
5606         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5607         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5608         (crc_mod_SOURCES): New macro.
5609         (crc_mod_CFLAGS): Likewise.
5610         (crc_mod_LDFLAGS): Likewise.
5612         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5614         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5616         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5618         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5620         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5622 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5624         * commands/help.c: Include <grub/term.h>.
5625         (TERM_WIDTH): Removed.  Updated all users.
5627 2008-07-27  Pavel Roskin  <proski@gnu.org>
5629         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5630         spurious warnings about a comment within a comment.
5632 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5634         * util/getroot.c (find_root_device): Skip devices that match
5635         /dev/dm-[0-9].  This lets the real device be found for any type of
5636         abstraction (LVM, EVMS, RAID..).
5637         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5638         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5639         device is found first, find_root_device() will now skip it.
5641 2008-07-24  Pavel Roskin  <proski@gnu.org>
5643         * include/grub/types.h: Use __builtin_bswap32() and
5644         __builtin_bswap64() with gcc 4.3 and newer.
5646 2008-07-24  Christian Franke  <franke@computer.org>
5648         * util/i386/pc/grub-install.in: If `--debug' is specified,
5649         pass `--verbose' to grub-setup.
5650         Abort script if make_system_path_relative_to_its_root() fails.
5652 2008-07-24  Bean  <bean123ch@gmail.com>
5654         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5655         variable `target_platform' should be `platform'.
5657 2008-07-24  Bean  <bean123ch@gmail.com>
5659         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5660         (grub_png_init_fixed_block): New function.
5661         (grub_png_decode_image_data): Handle fixed huffman code compression.
5663 2008-07-24  Bean  <bean123ch@gmail.com>
5665         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5666         (grub_pe2elf_SOURCES): New macro.
5667         (CLEANFILES): Add grub-pe2elf.
5669         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5670         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5671         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5672         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5673         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5674         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5675         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5676         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5677         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5678         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5679         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5680         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5681         (GRUB_PE32_DT_FUNCTION): Likewise.
5682         (GRUB_PE32_REL_I386_DIR32): Likewise.
5683         (GRUB_PE32_REL_I386_REL32): Likewise.
5684         (grub_pe32_symbol): New structure.
5685         (grub_pe32_reloc): Likewise.
5687         * util/grub-pe2elf.c: New file.
5689         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5690         start symbol in non pc platform.
5692         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5694         The following patches are from Christian Franke.
5696         * include/grub/dl.h: Remove .previous, gas supports this only
5697         for ELF format.
5699         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5700         Remove .type, gas supports this only for ELF format.
5702         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5703         nullbytes in symbol table. This fixes an infinite loop if table is
5704         zero filled.
5706         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5707         TARGET_IMG_LDFLAGS and EXEEXT.
5709         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5710         TARGET_IMG_LDFLAGS_AC.
5711         (grub_CHECK_STACK_ARG_PROBE): New function.
5713         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5715         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5717         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5718         to set TARGET_IMG_LD* accordingly.
5719         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5720         Add call to grub_CHECK_STACK_ARG_PROBE.
5721         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5723         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5725         * genmk.rb: Add EXEEXT to CLEANFILES.
5727 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5729         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5730         define the codes for arrows and lines used for the menu).
5731         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5732         as well.
5734         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5735         fonts, because the latter are too slow.
5737 2008-07-21  Bean  <bean123ch@gmail.com>
5739         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5740         a20. Run keyboard test last, as it will cause macbook to halt.
5742 2008-07-18  Pavel Roskin  <proski@gnu.org>
5744         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5745         load foreign architecture modules correctly anyway.  Keep
5746         support for loading host architecture modules, whether we
5747         compile them or not.
5749 2008-07-17  Pavel Roskin  <proski@gnu.org>
5751         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5752         change target_cpu.  The compiler default can mismatch target_cpu
5753         in any case.
5755         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5756         * kern/efi/efi.c: Likewise.
5758         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5759         target compiler is functional.
5760         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5761         are set up.
5763         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5764         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5765         adjustments from the rest, only do them if target is not
5766         explicitly given.  Merge other adjustments with the final sanity
5767         check.  Remove an extraneous check for supported CPU.  Be
5768         specific which CPU and which platform is not supported.
5770         * configure.ac: Default to pc platform for x86_64.
5772 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5774         Partial LinuxBIOS -> Coreboot rename.
5776         * conf/i386-linuxbios.rmk: Renamed to ...
5777         * conf/i386-coreboot.rmk: ... this.
5778         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5779         * configure.ac: Accept "coreboot" as input platform (but maintain
5780         compatibility with "linuxbios").
5781         * include/grub/i386/linuxbios: Renamed to ...
5782         * include/grub/i386/coreboot: ... this.
5784 2008-07-17  Bean  <bean123ch@gmail.com>
5786         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5787         (appleldr_mod_SOURCE): New variable.
5788         (appleldr_mod_CFLAGS): Likewise.
5789         (appleldr_mod_LDFLAGS): Likewise.
5790         (pci_mod_SOURCES): Likewise.
5791         (pci_mod_CFLAGS): Likewise.
5792         (pci_mod_LDFLAGS): Likewise.
5793         (lspci_mod_SOURCES): Likewise.
5794         (lspci_mod_CFLAGS): Likewise.
5795         (lspci_mod_LDFLAGS): Likewise.
5797         * conf/x86_64-efi.rmk: New file.
5799         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5800         macro.
5801         (grub_efidisk_write): Likewise.
5803         * include/efi/api.h (efi_call_0): New macro.
5804         (efi_call_1): Likewise.
5805         (efi_call_2): Likewise.
5806         (efi_call_3): Likewise.
5807         (efi_call_4): Likewise.
5808         (efi_call_5): Likewise.
5809         (efi_call_6): Likewise.
5811         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5812         grub_rescue_cmd_chainloader.
5814         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5815         (grub_pe32_optional_header): Change some fields based on i386 or
5816         x86_64 platform.
5817         (GRUB_PE32_PE32_MAGIC): Likewise.
5819         * include/grub/efi/uga_draw.h: New file.
5821         * include/grub/elf.h (STN_ABS): New constant.
5822         (R_X86_64_NONE): Relocation constant for x86_64.
5823         (R_X86_64_64): Likewise.
5824         (R_X86_64_PC32): Likewise.
5825         (R_X86_64_GOT32): Likewise.
5826         (R_X86_64_PLT32): Likewise.
5827         (R_X86_64_COPY): Likewise.
5828         (R_X86_64_GLOB_DAT): Likewise.
5829         (R_X86_64_JUMP_SLOT): Likewise.
5830         (R_X86_64_RELATIVE): Likewise.
5831         (R_X86_64_GOTPCREL): Likewise.
5832         (R_X86_64_32): Likewise.
5833         (R_X86_64_32S): Likewise.
5834         (R_X86_64_16): Likewise.
5835         (R_X86_64_PC16): Likewise.
5836         (R_X86_64_8): Likewise.
5837         (R_X86_64_PC8): Likewise.
5839         * include/grub/i386/efi/pci.h: New file.
5841         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5842         Change it value based on platform.
5843         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5844         (GRUB_E820_RAM): Likewise.
5845         (GRUB_E820_RESERVED): Likewise.
5846         (GRUB_E820_ACPI): Likewise.
5847         (GRUB_E820_NVS): Likewise.
5848         (GRUB_E820_EXEC_CODE): Likewise.
5849         (GRUB_E820_MAX_ENTRY): Likewise.
5850         (grub_e820_mmap): New structure.
5851         (linux_kernel_header): Change the efi field according to different
5852         kernel version, also field from linux_kernel_header.
5854         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5856         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5857         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5858         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5859         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5860         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5861         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5862         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5863         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5864         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5865         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5867         * include/grub/x86_64/efi/kernel.h: New file.
5869         * include/grub/x86_64/efi/loader.h: Likewise.
5871         * include/grub/x86_64/efi/machine.h: Likewise.
5873         * include/grub/x86_64/efi/pci.h: Likewise.
5875         * include/grub/x86_64/efi/time.h: Likewise.
5877         * include/grub/x86_64/linux.h: Likewise.
5879         * include/grub/x86_64/setjmp.h: Likewise.
5881         * include/grub/x86_64/time.h: Likewise.
5883         * include/grub/x86_64/types.h: Likewise.
5885         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5886          GRUB_TARGET_SIZEOF_VOID_P.
5888         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5889         (grub_efi_locate_handle): Likewise.
5890         (grub_efi_open_protocol): Likewise.
5891         (grub_efi_set_text_mode): Likewise.
5892         (grub_efi_stall): Likewise.
5893         (grub_exit): Likewise.
5894         (grub_reboot): Likewise.
5895         (grub_halt): Likewise.
5896         (grub_efi_exit_boot_services): Likewise.
5897         (grub_get_rtc): Likewise.
5899         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5900         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5901         (grub_efi_allocate_pages): Wrap efi calls.
5902         (grub_efi_free_pages): Wrap efi calls.
5903         (grub_efi_get_memory_map): Wrap efi calls.
5905         * kern/x86_64/dl.c: New file.
5907         * kern/x86_64/efi/callwrap.S: Likewise.
5909         * kern/x86_64/efi/startup.S: Likewise.
5911         * loader/efi/appleloader.c: Likewise.
5913         * loader/efi/chainloader.c (cmdline): New variable.
5914         (grub_chainloader_unload): Wrap efi calls.
5915         (grub_chainloader_boot): Likewise.
5916         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5917         command line.
5919         * loader/efi/chainloader_normal.c (chainloader_command):
5920         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5921         command line.
5923         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5924         method.
5925         (grub_e820_add_region): New function.
5926         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5927         booting.
5928         (grub_find_video_card): New function.
5929         (grub_linux_setup_video): New function.
5930         (grub_rescue_cmd_linux): Probe for video information.
5932         * normal/x86_64/setjmp.S: New file.
5934         * term/efi/console.c (map_char): New function.
5935         (grub_console_putchar): Map unicode char.
5936         (grub_console_checkkey): Wrap efi calls.
5937         (grub_console_getkey): Likewise.
5938         (grub_console_getwh): Likewise.
5939         (grub_console_gotoxy): Likewise.
5940         (grub_console_cls): Likewise.
5941         (grub_console_setcolorstate): Likewise.
5942         (grub_console_setcursor): Likewise.
5944         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5946 2008-07-16  Pavel Roskin  <proski@gnu.org>
5948         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5949         format strings.
5951         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5952         pointer, not an integer.  This fixes a warning and prevents
5953         precision loss on 64-bit systems.
5954         (relocate_addresses): Remove unneeded cast.
5956 2008-07-15  Pavel Roskin  <proski@gnu.org>
5958         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5960         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5962         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5963         Fix comparison between signed and unsigned.
5965         * include/grub/i386/ieee1275/console.h: Declare
5966         grub_console_init() and grub_console_fini().
5968         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5969         It's empty and unused.
5971         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5972         beginning to avoid warnings with some compilers.
5974         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5975         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5977 2008-07-14  Pavel Roskin  <proski@gnu.org>
5979         * kern/env.c (grub_register_variable_hook): Don't copy empty
5980         string, it leaks memory.  Pass "" to grub_env_set(), it should
5981         handle constant strings.
5983         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5984         * commands/cmp.c (grub_cmd_cmp): Likewise.
5985         * kern/dl.c (grub_dl_flush_cache): Likewise.
5986         (grub_dl_load_core): Likewise.
5987         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5988         (grub_elf64_load_phdrs): Likewise.
5990 2008-07-13  Pavel Roskin  <proski@gnu.org>
5992         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5993         between signed and unsigned.
5994         (LzmaEnc_Finish): Fix warning about an unused parameter.
5996 2008-07-13  Bean  <bean123ch@gmail.com>
5998         * Makefile.in (enable_lzo): New rule.
6000         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6002         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6004         * boot/i386/pc/lnxboot.S: #include <config.h>.
6006         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6007         its value according to the compression algorithm used, lzo or lzma.
6009         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6010         compression algorithm according to configure macro.
6012         * kern/i386/pc/startup.S (codestart): Likewise.
6014         * kern/i386/pc/lzma_decode.S: New file.
6016         * include/grub/lib/LzFind.h: Likewise.
6018         * include/grub/lib/LzHash.h: Likewise.
6020         * include/grub/lib/LzmaDec.h: Likewise.
6022         * include/grub/lib/LzmaEnc.h: Likewise.
6024         * include/grub/lib/LzmaTypes.h: Likewise.
6026         * lib/LzFind.c: Likewise.
6028         * lib/LzmaDec.c: Likewise.
6030         * lib/LzmaEnc.c: Likewise.
6032 2008-07-13  Bean  <bean123ch@gmail.com>
6034         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6035         (grub_ext4_extent_header): New structure.
6036         (grub_ext4_extent): Likewise.
6037         (grub_ext4_extent_idx): Likewise.
6038         (grub_ext4_find_leaf): New function.
6039         (grub_ext2_read_block): Handle extents.
6041 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6043         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6045 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6047         * util/grub.d/40_custom.in: New file. Example on how to add custom
6048         entries to /etc/grub.d.
6049         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6050         40_custom (implicitly, by merging all the grub.d rules).
6052 2008-07-11  Pavel Roskin  <proski@gnu.org>
6054         * commands/read.c (grub_getline): Fix invalid memory access.
6055         Don't add newline to the variable value.
6057         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6058         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6059         (serial_hw_get_port): Check validity of the port number.
6060         (grub_cmd_serial): Check return value of serial_hw_get_port().
6062 2008-07-07  Pavel Roskin  <proski@gnu.org>
6064         * boot/i386/pc/diskboot.S (notification_string): Replace
6065         "Loading kernel" with just "loading".  This is shorter, less
6066         confusing and saves a few bytes for possible future changes.
6068 2008-07-05  Pavel Roskin  <proski@gnu.org>
6070         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6071         size for ATAPI devices, they are undefined.  Output sector
6072         number in decimal form.
6074         * disk/ata.c: Use named constants for status bits.
6076 2008-07-04  Pavel Roskin  <proski@gnu.org>
6078         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6079         grub_addr_t before casting it to the void pointer to fix a
6080         warning.  Non-addressable regions are discarded earlier.
6081         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6082         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6083         (check_signature): Don't shadow table_header.
6084         (grub_linuxbios_table_iterate): Cast numeric constants to
6085         grub_linuxbios_table_header_t.
6086         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6087         grub_stop().
6089         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6090         prevent warnings.
6092         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6093         pointer, which can cause warnings.  Support 64-bit addresses.
6095         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6096         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6098 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6100         This fixes a performance issue when pc & gpt partmap iterators
6101         didn't abort iteration even after our hook found what it was
6102         looking for (often causing expensive probes of non-existent drives).
6104         Some callers relied on previous buggy behaviour, since they would
6105         raise an error when their own hooks caused early abortion of its
6106         iteration.
6108         * kern/device.c (grub_device_open): Improve error message.
6109         * disk/lvm.c (grub_lvm_open): Likewise.
6110         * disk/raid.c (grub_raid_open): Likewise.
6112         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6113         when hook requests it, independently of grub_errno.
6114         (pc_partition_map_probe): Do not fail when find_func() caused
6115         early abortion of pc_partition_map_iterate().
6117         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6118         when hook requests it, independently of grub_errno.
6119         (gpt_partition_map_probe): Do not fail when find_func() caused
6120         early abortion of gpt_partition_map_iterate().
6122         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6123         when hook requests it, independently of grub_errno.  Do not fail when
6124         part_map_iterate_hook() caused early abortion of p->iterate().
6126         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6127         when grub_partition_iterate() returned with non-zero.
6129 2008-07-03  Pavel Roskin  <proski@gnu.org>
6131         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6132         like we do in grub_ata_pio_read().
6133         (grub_ata_readwrite): Always write individual sectors.  Fix the
6134         sector count for the remainder.
6135         (grub_ata_write): Enable writing to ATA devices.  Correctly
6136         report error for ATAPI devices.
6138 2008-07-02  Pavel Roskin  <proski@gnu.org>
6140         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6141         warning.
6143         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6144         for every read sector, we already increment it for the whole
6145         batch.  This fixes reading more than 256 sectors at once.
6147         * util/grub-editenv.c (cmd_info): Cast argument to long
6148         explicitly.  ptrdiff_t reduces to int on i386.
6150         * util/grub-editenv.c (main): Be specific which parameter is
6151         missing.
6153         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6154         (memdisk): Make memdisk_orig_addr a pointer.
6156         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6157         for file offsets, use grub_off_t instead.  Fix printf format
6158         warnings.
6160         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6161         there.  Real unexpected warnings should not drown in the noise
6162         about known problems.
6164         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6165         grub_disk_addr_t for memory addresses.
6167         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6168         explicitly to fix a warning.
6170         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6172         * Makefile.in (MODULE_LDFLAGS): New variable.
6173         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6174         the linker accepts --build-id=none.
6175         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6176         MODULE_LDFLAGS.
6177         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6179         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6180         those in Linux XFS code.  Provide a way to access 64-bit parent
6181         inode.
6182         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6183         the end of struct grub_xfs_dir_header.
6185 2008-07-02  Bean  <bean123ch@gmail.com>
6187         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6188         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6189         and GRUB_IEEE1275_FLAG_NO_ANSI.
6191         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6192         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6193         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6195         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6196         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6198         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6199         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6201         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6202         esc sequence on non ANSI terminal.
6203         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6205         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6206         beginning of file.
6208 2008-07-02  Bean  <bean123ch@gmail.com>
6210         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6211         (grub_editenv_SOURCES): New variable.
6212         (pkglib_MODULES): Add loadenv.mod.
6213         (loadenv_mod_SOURCES): New variable.
6214         (loadenv_mod_CFLAGS): Likewise.
6215         (loadenv_mod_LDFLAGS): Likewise.
6217         * include/grub/envblk.h: New file.
6219         * util/envblk.c: New file.
6221         * util/grub-editenv.c: New file.
6223         * commands/loadenv.c: New file.
6225 2008-07-01  Pavel Roskin  <proski@gnu.org>
6227         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6228         not unsigned char.  This fixes warnings and is consistent with
6229         other tags.
6231         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6233         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6235         * term/tparm.c (analyze): Always set *popcount.
6237         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6238         cast to fix a warning.
6240         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6241         cast to suppress a warning.
6243         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6244         grub_fshelp_read_file() expects.
6246         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6247         write uuid as a 32-bit value in CPU byte order, so declare and
6248         use it as such.
6250         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6251         long if the format specifier expects it.
6252         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6253         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6254         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6255         long to fix a warning.
6256         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6257         grub_dprintf() arguments to fix warnings.
6259 2008-06-30  Pavel Roskin  <proski@gnu.org>
6261         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6262         install_bsd_part immediately before core.img is embedded or
6263         modified on disk.  This fixes core.img verification if core.img
6264         cannot be embedded.
6266         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6267         core_path to calculate the blocklist.
6268         Patch from Javier Martín <lordhabbit@gmail.com>
6270 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6272         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6273         block to disk block.
6274         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6275         Patch from Niels Böhm <bitbucket@arcor.de>
6277 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6279         * util/update-grub_lib.in (font_path): Search for fonts in
6280         /boot/grub first, which is more likely to be readable (we aren't
6281         deciding where fonts live, just looking for them).
6283 2008-06-26  Pavel Roskin  <proski@gnu.org>
6285         * util/biosdisk.c (read_device_map): Don't leave dead map
6286         entries for devices failing stat() check.
6288         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6289         core_path_dev for the core.img path on the target device.
6291 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6293         * disk/fs_uuid.c: New file.
6294         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6295         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6296         (fs_uuid_mod_LDFLAGS): New variables.
6297         * include/grub/disk.h (grub_disk_dev_id): Add
6298         `GRUB_DISK_DEVICE_UUID_ID'.
6299         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6300         implement iterate().
6302 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6304         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6305         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6306         Linux image includes no initrd.
6308 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6310         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6311         call to resolve the core image location that effectively appended the
6312         name twice.
6314 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6316         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6317         call from here ...
6319         * util/grub.d/10_hurd.in: ... to here ...
6320         * util/grub.d/10_linux.in: ... and here.
6322 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6324         * kern/main.c (grub_main): Export `prefix' variable immediately
6325         after it has been set by grub_machine_set_prefix().
6327 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6329         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6330         search result when not saving to variable, not the other way around.
6331         When saving to variable, abort iteration as soon as a match is found.
6333 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6335         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6336         check for partition that provides /boot/grub.  Its logic is flawed,
6337         as it prevents prepare_grub_to_access_device() from being called
6338         multiple times.
6340 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6342         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6343         "insmod" command directly when abstraction modules are needed,
6344         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6345         since it had already been processed).
6347 2008-06-19  Pavel Roskin  <proski@gnu.org>
6349         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6350         changed.  This is needed in case GRUB_LIBDIR changes.
6351         * conf/i386-ieee1275.rmk: Likewise.
6352         * conf/i386-linuxbios.rmk: Likewise.
6353         * conf/i386-pc.rmk: Likewise.
6354         * conf/powerpc-ieee1275.rmk: Likewise.
6356 2008-06-18  Pavel Roskin  <proski@gnu.org>
6358         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6359         kernel_elf_symlist.c to symlist.c for consistency with other
6360         architectures.  Update all users.
6361         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6363 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6365         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6366         it in prefix.
6368         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6369         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6370         a RAID device, run setup() for all members independently on whether
6371         LVM abstraction is being used.
6372         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6373         If grub-mkimage has set `*install_dos_part == -2', don't override this
6374         value.
6375         Perform *install_dos_part adjustments independently on whether
6376         we're embedding or not.
6377         Clarify error message when image is too big for embedding.
6378         Remove duplicate *install_dos_part stanza.
6380 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6382         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6383         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6384         variables.
6385         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6386         values in grub_ofconsole_normal_color and
6387         grub_ofconsole_highlight_color (they're not directly related to
6388         background and foreground).
6389         (grub_ofconsole_setcolorstate): Extract background and foreground
6390         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6392 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6394         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6395         /boot/grub for the check in last commit, not /boot (they could be
6396         different partitions).
6398 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6400         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6401         asked to setup access for the same partition that provides /boot,
6402         don't bother using UUIDs since our root already has the value we
6403         want.
6405 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6407         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6408         I2O devices.
6409         Patch from Sven Mueller <sven@debian.org>.
6411 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6413         * util/update-grub.in: Check for $EUID instead of $UID.
6414         Reported by Vincent Zweije.
6416 2008-06-16  Bean  <bean123ch@gmail.com>
6418         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6419         (grub_ext2_read_block): Likewise.
6420         (grub_ext2_read_inode): Likewise.
6421         (grub_ext2_mount): Likewise.
6422         (grub_ext2_close): Likewise.
6423         (grub_ext3_get_journal): Removed.
6425         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6426         (grub_reiserfs_read_symlink): Likewise.
6427         (grub_reiserfs_mount): Likewise.
6428         (grub_reiserfs_open): Likewise.
6429         (grub_reiserfs_read): Likewise.
6430         (grub_reiserfs_close): Likewise.
6431         (grub_reiserfs_get_journal): Removed.
6433         * fs/fshelp.c (grub_fshelp_read): Removed.
6434         (grub_fshelp_map_block): Likewise.
6436         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6437         (grub_fshelp_journal): Likewise.
6438         (grub_fshelp_read): Likewise.
6439         (grub_fshelp_map_block): Likewise.
6441 2008-06-16  Pavel Roskin  <proski@gnu.org>
6443         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6444         floating point anymore.
6445         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6447 2008-06-15  Pavel Roskin  <proski@gnu.org>
6449         * commands/ls.c (grub_ls_list_files): Use integer calculations
6450         for human readable format, avoid floating point use.
6451         * kern/misc.c (grub_ftoa): Remove.
6452         (grub_vsprintf): Remove floating point support.
6454 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6456         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6457         devices.
6458         Reported by Max Vozeler.
6460 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6462         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6463         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6464         skipped later.
6465         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6466         the beginning of the prefix.
6468         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6469         It is assumed that if we have a memdisk, grub-mkimage has set
6470         grub_prefix to include the "(memdisk)" drive in it.
6472 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6474         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6475         Initialize keyboard controller after registering the terminal, so that
6476         grub_printf() can be called from grub_keyboard_controller_init().
6478 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6480         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6481         extent-btree which is written as big endian on disk.
6482         Reported by Alain Greppin  <al@chilibi.org>.
6484 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6486         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6487         * util/i386/pc/grub-install.in (modules): Likewise.
6489 2008-06-13  Pavel Roskin  <proski@gnu.org>
6491         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6493 2008-06-13  Bean  <bean123ch@gmail.com>
6495         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6497         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6499         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6500         to indicate sparse block.
6502 2008-06-12  Pavel Roskin  <proski@gnu.org>
6504         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6505         number, grub_fshelp_read() does it for us.
6507         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6508         linear disk read with journal translation.
6509         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6510         * include/grub/fshelp.h: Declare grub_fshelp_read().
6512 2008-06-09  Pavel Roskin  <proski@gnu.org>
6514         * fs/minix.c (grub_minix_mount): Handle error reading
6515         superblock.
6517 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6519         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6520         don't append the RAID prefix afterwards.
6521         Reported by Clint Adams.
6523 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6525         Based on description from Pavel:
6526         * kern/disk.c (grub_disk_check_range): Rename to ...
6527         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6528         tasks performed by this function.
6530 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6532         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6533         `num_serial' (for consistency with other variables).
6534         (struct grub_ntfs_data): Add `uuid' member.
6535         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6536         (grub_ntfs_uuid): New function.
6537         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6539 2008-06-07  Pavel Roskin  <proski@gnu.org>
6541         * util/biosdisk.c (open_device): Revert last change to the
6542         function, it broke installation.  The sector needs to be
6543         different dependent on which device is opened.
6545 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6547         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6548         rest of GRUB, and breakage doesn't happen if its value were modified.
6550         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6551         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6552         a constant (same value).
6553         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6554         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6556 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6558         * util/biosdisk.c (open_device): Do not modify sector offset when
6559         accessing a partition.  kern/disk.c already handles this for us.
6561 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6563         * util/grub-emu.c (grub_machine_init): Move code in this function from
6564         here ...
6565         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6566         segfault in case grub_printf() is called).
6568         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6569         grub_probe.  Update all users not to explicitly add it again.
6570         (grub_device): New variable; contains corresponding device for grubdir.
6571         (fs_module, partmap_module, devabstraction_module): Pass
6572         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6573         every time.
6575 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6577         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6578         is found, print it (same layout as with labels).
6580 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6582         * util/biosdisk.c (get_drive): Rename to ...
6583         (find_grub_drive): ... this.  Update all users.
6585         (get_os_disk): Rename to ...
6586         (convert_system_partition_to_system_disk): ... this.  Update all users.
6588         (find_drive): Rename to ...
6589         (find_system_device): ... this.  Update all users.
6591 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6593         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6594         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6595         (make_device_map): Likewise.
6597 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6599         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6600         before dereferencing it.
6602         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6603         union with fat12/fat16-specific ones.  Add some new fields, including
6604         `num_serial' for both versions.
6605         (struct grub_fat_data): Add `uuid' member.
6606         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6607         names.  Initialize `data->uuid' using `num_serial'.
6608         (grub_fat_uuid): New function.
6609         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6611         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6612         (grub_reiserfs_uuid): New function.
6613         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6614         member.
6616         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6617         (grub_xfs_uuid): New function.
6618         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6620 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6622         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6623         code that is backward compatible with pre-uuid search command.
6625 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6627         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6628         floppies after everything else, to ensure floppy drive isn't accessed
6629         unnecessarily (patch from Bean).
6631 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6633         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6634         not print device names when we were asked to set a variable.
6636 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6638         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6639         using "cursor-on" and "cursor-off" commands (understood at least by
6640         the Open Firmware flavour on OLPC).
6642 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6644         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6645         on and off sequences.
6647 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6649         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6650         * util/update-grub.in: Likewise.
6652 2008-05-30  Pavel Roskin  <proski@gnu.org>
6654         * util/biosdisk.c (linux_find_partition): Simplify logic and
6655         make the code more universal.  Keep special processing for
6656         devfs, but use a simple rule for all other devices.  If the
6657         device ends with a number, append 'p' and the partition number.
6658         Otherwise, append only the partition number.
6660 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6662         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6663         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6664         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6665         the `root' parameter to Linux.
6667 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6669         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6670         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6671         --fs_uuid with --fs-uuid.
6672         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6673         all filesystems support them).
6675 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6677         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6678         grub_printf() flags, since we're printing in units of 2 bytes.
6680 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6682         * util/grub.d/00_header.in: Remove obsolete comment referencing
6683         convert_system_path_to_grub_path().
6684         * util/update-grub.in: Likewise.
6685         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6686         (convert_system_path_to_grub_path): Add a warning message explaining
6687         that this function is deprecated.  Rely on is_path_readable_by_grub()
6688         for the readability checks.
6689         (font_path): Use is_path_readable_by_grub() for the readability
6690         check rather than convert_system_path_to_grub_path().
6692 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6694         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6695         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6696         converting it first.
6697         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6698         grub.cfg for access to font file, and afterwards call it again to set
6699         the root device.
6701 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6703         * commands/search.c (options): Add --fs_uuid option.
6704         (search_fs_uuid): New function.
6705         (grub_cmd_search): Fix --set argument passing.
6706         Use search_fs_uuid() when requested via --fs_uuid.
6707         (grub_search_init): Update help message.
6708         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6709         and redeclare it as an array of 16-bit words.
6710         (grub_ext2_uuid): New function.
6711         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6712         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6713         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6714         (GRUB_DEVICE_BOOT_UUID): New variables.
6715         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6716         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6717         whenever possible.
6718         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6719         just assume `root' variable has the right value.
6720         * util/grub.d/10_linux.in: Likewise.
6721         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6722         via PRINT_FS_UUID.
6723         (main): Recognise `-t fs_uuid' argument.
6725 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6727         * util/biosdisk.c (map): Redefine structure to hold information
6728         about GRUB drive name.
6729         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6730         drive names.
6731         (call_hook): Remove.
6732         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6733         member.  Assume drive has partitions.
6734         (grub_util_biosdisk_open): Access device names via `.device' struct
6735         member.
6736         (open_device): Likewise.
6737         (find_drive): Likewise.
6738         (read_device_map): Adjust map[] usage to match the new struct
6739         definition.  Don't check for duplicates (still possible, but not cheap
6740         anymore).
6741         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6742         (make_device_name): Remove assumption of BIOS-like drive names.
6744 2008-05-30  Pavel Roskin  <proski@gnu.org>
6746         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6747         compiling execute.c doesn't need grub_script.tab.h anymore.
6748         (normal/command.c_DEPENDENCIES): Likewise.
6749         (normal/function.c_DEPENDENCIES): Likewise.
6750         * conf/i386-ieee1275.rmk: Likewise.
6751         * conf/i386-linuxbios.rmk: Likewise.
6752         * conf/i386-pc.rmk: Likewise.
6753         * conf/powerpc-ieee1275.rmk: Likewise.
6754         * conf/sparc64-ieee1275.rmk: Likewise.
6756 2008-05-29  Pavel Roskin  <proski@gnu.org>
6758         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6759         when scanning metadata for volume group name.
6761         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6762         a generated file, which may only be included from the files with
6763         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6764         use union YYSTYPE, as the later allows forward declaration.
6765         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6767 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6769         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6770         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6771         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6772         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6773         scan codes.
6775 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6777         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6778         control key combinations.
6780 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6782         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6783         * util/ieee1275/grub-install.in: ... to here.
6784         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6785         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6786         (grub_install_SOURCES): Likewise.
6788 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6790         * fs/affs.c: Update copyright year.
6791         * fs/ext2.c: Likewise.
6792         * fs/fshelp.c: Likewise.
6793         * fs/hfsplus.c: Likewise.
6794         * fs/ntfs.c: Likewise.
6795         * fs/xfs.c: Likewise.
6796         * include/grub/fshelp.h: Likewise.
6797         * util/grub-mkdevicemap.c: Likewise.
6799 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6801         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6802         might need to be fatfs to support some firmware implementations
6803         (e.g. OFW or EFI).
6805 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6807         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6808         devices.
6809         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6810         (make_device_map): Likewise.
6812 2008-05-20  Bean  <bean123ch@gmail.com>
6814         * fs/fshelp.c (grub_fshelp_map_block): New function.
6815         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6816         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6818         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6819         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6820         (grub_fshelp_journal): New structure.
6821         (grub_fshelp_map_block): New function prototype.
6822         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6823         (grub_fshelp_map_block): Likewise.
6825         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6826         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6827         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6828         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6829         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6830         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6831         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6832         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6833         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6834         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6835         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6836         (grub_ext2_sblock): New members for journal support.
6837         (grub_ext3_journal_header): New structure.
6838         (grub_ext3_journal_revoke_header): Likewise.
6839         (grub_ext3_journal_block_tag): Likewise.
6840         (grub_ext3_journal_sblock): Likewise.
6841         (grub_fshelp_node): New members logfile and journal.
6842         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6843         grub_fshelp_map_block to get real block number.
6844         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6845         number.
6846         (grub_ext2_read_inode): Likewise.
6847         (grub_ext3_get_journal): New function.
6848         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6849         (grub_ext2_close): Release memory used by journal.
6851         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6852         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6853         (grub_reiserfs_transaction_header): Renamed to
6854         grub_reiserfs_description_block, replace field data with real_blocks.
6855         (grub_reiserfs_commit_block): New structure.
6856         (grub_reiserfs_data): New member journal.
6857         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6858         number.
6859         (grub_reiserfs_read_symlink): Likewise.
6860         (grub_reiserfs_iterate_dir): Likewise.
6861         (grub_reiserfs_open): Likewise.
6862         (grub_reiserfs_read): Likewise.
6863         (grub_reiserfs_get_journal): New function.
6864         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6865         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6866         using grub_reiserfs_get_journal.
6867         (grub_reiserfs_close): Release memory used by journal.
6869         * fs/affs.c (grub_affs_read_block): Change block type to
6870         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6872         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6874         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6876         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6878         * fs/udf.c (grub_udf_read_block): Change block type to
6879         grub_disk_addr_t. Use type cast to avoid warning.
6881         * fs/xfs.c (grub_xfs_read_block): Likewise.
6883 2008-05-16  Christian Franke  <franke@computer.org>
6885         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6886         to ensure that break with ESC will always work.
6887         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6888         Remove ESC from keyboard queue.
6890 2008-05-16  Christian Franke  <franke@computer.org>
6892         * util/biosdisk.c: [__CYGWIN__] Add includes.
6893         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6894         (get_os_disk): Move variable declarations to OS specific
6895         parts to avoid warning.
6896         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6897         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6898         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6899         Cygwin.
6900         * util/getroot.c: [__CYGWIN__] Add includes.
6901         (strip_extra_slashes): Fix "/" case.
6902         [__CYGWIN__] (get_win32_path): New function.
6903         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6904         [__CYGWIN__] (find_root_device): Disable.
6905         [__CYGWIN__] (get_bootsec_serial): New function.
6906         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6907         [__linux__] (grub_guess_root_device): Add early returns to simplify
6908         structure.
6909         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6910         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6911         check for Linux only.
6913 2008-05-15  Bean  <bean123ch@gmail.com>
6915         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6916         keyboard hang problem in apple's intel mac.
6918 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6920         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6921         devices.
6922         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6923         (make_device_map): Likewise.
6924         Reported by Aurelien Jarno <aurel32@debian.org>
6926 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6928         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6929         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6930         (make_device_map): Output entries for xvd type disks.
6932 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6934         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6935         devices.
6936         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6937         (make_device_map): Likewise.
6938         Reported by Roland Dreier <rdreier@cisco.com>
6940 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6942         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6943         grub_strstr() call.  Correct a few mistakes in failure path handling.
6945 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6947         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6948         Do not print a trailing slash (therefore, the root directory is an
6949         empty string).
6950         (convert_system_path_to_grub_path): Do not remove trailing slash
6951         from make_system_path_relative_to_its_root() output.
6953         * util/i386/pc/grub-install.in: Add trailing slash to output from
6954         make_system_path_relative_to_its_root().
6956 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6958         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6959         ensures that output lines aren't intermangled with those sent to
6960         stderr (via grub_util_info()).
6961         * util/grub-probe.c (grub_refresh): Likewise.
6962         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6964 2008-05-05  Christian Franke  <franke@computer.org>
6966         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6967         Add Cygwin device names.
6968         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6969         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6970         (check_device): Return error instead of success on empty name.
6971         (make_device_map): Move label inside linux specific code to
6972         prevent compiler warning.
6974 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6976         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6977         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6978         first boot option.
6979         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6981 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6983         * docs/grub.cfg: New file (example GRUB configuration).
6985 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6987         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6988         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6989         and `disk/ieee1275/nand.c'.
6991 2008-04-25  Bean  <bean123ch@gmail.com>
6993         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6994         i386-linuxbios.
6996         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6997         change the buffer size to 4096 for cdrom device.
6999         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7000         and nand.mod.
7001         (_linux_mod_SOURCES): New variable.
7002         (_linux_mod_CFLAGS): Likewise.
7003         (_linux_mod_LDFLAGS): Likewise.
7004         (linux_mod_SOURCES): Likewise.
7005         (linux_mod_CFLAGS): Likewise.
7006         (linux_mod_LDFLAGS): Likewise.
7007         (nand_mod_SOURCES): Likewise.
7008         (nand_mod_CFLAGS): Likewise.
7009         (nand_mod_LDFLAGS): Likewise.
7011         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7012         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7013         type property. (nand device in olpc don't have this property)
7015         * include/grub/disk.h (grub_disk_dev_id): New macro
7016         GRUB_DISK_DEVICE_NAND_ID.
7018         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7019         function prototype.
7020         (grub_rescue_cmd_initrd): Likewise.
7022         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7023         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7024         ofw_cif_handler and ofw_idt, adjust padding number.
7026         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7027         GRUB_MACHINE_IEEE1275 is defined.
7029         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7030         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7032         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7033         on nested function heap_init.
7034         (grub_upper_mem): New variable for i386-ieee1275.
7035         (grub_get_extended_memory): New function for i386-ieee1275.
7036         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7038         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7039         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7040         property.
7042         * loader/i386/ieee1275/linux.c: New file.
7044         * loader/i386/ieee1275/linux_normal.c: New file.
7046         * disk/ieee1275/nand.c: New file.
7048 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7050         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7051         value.
7052         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7054 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7056         Restructures early code path on ieee1275 to unify grub_main() as
7057         the first C function that is executed in every platform.
7059         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7060         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7061         cmain().
7062         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7063         * kern/ieee1275/cmain.c (cmain): Rename to ...
7064         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7065         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7066         at the beginning.
7068 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7070         * util/update-grub.in: Fix syntax error when setting
7071         `GRUB_PRELOAD_MODULES'.
7072         Reported by Stephane Chazelas <stephane@artesyncp.com>
7074 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7076         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7077         section into account, newer toolchains generate unique build ids
7078         * configure.ac: remove the test for --build-id=none acceptance,
7079         we want build ids to be preserved
7080         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7081         far from other sections don't cause the raw binary images grow
7082         size
7084 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7086         * disk/lvm.c: Update copyright year.
7087         * kern/misc.c: Likewise.
7089 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7091         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7092         there is no memory left for physical volume name.
7094 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7096         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7097         volume name mapping to support bigger than 9 character names properly.
7099 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7101         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7102         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7104 2008-04-13  Christian Franke  <franke@computer.org>
7106         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7107         to create a floppy emulation boot CD when non emulation mode
7108         does not work.
7109         Enable Joliet CD filesystem extension.
7111 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7113         * kern/misc.c (grub_strncat): Fix off-by-one error.
7114         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7116         * kern/env.c (grub_env_context_close): Clear current context, not
7117         previous one.
7118         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7120         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7122 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7124         Improve robustness when handling LVM.
7126         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7127         (and leave `*p' unmodified).
7128         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7129         through it.
7130         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7131         iterating through it.
7132         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7133         through it.
7134         (grub_lvm_scan_device): Check the return value (and fail gracefully
7135         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7136         Don't assume `vg->pvs != NULL' when iterating through it.
7138 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7140         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7141         * genmk.rb (partmap): New variable.
7142         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7143         (#{partmap}): New target rule.
7144         * genpartmaplist.sh: New file.
7145         * Makefile.in (pkglib_DATA): Add partmap.lst.
7146         (partmap.lst): New target rule.
7147         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7148         modules (including all partition maps), instead of preloading them.
7150 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7152         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7153         `linux-boot-prober' (if installed) to detect other operating
7154         systems which are installed on the computer and add them to
7155         the boot menu.
7156         * conf/common.rmk: Build and install 30_os-prober.
7158 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7160         * kern/powerpc/ieee1275/init.c: Move from here ...
7161         * kern/ieee1275/init.c: ... to here.  Update all users.
7163         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7164         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7166         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7167         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7169         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7170         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7172 2008-04-10  Pavel Roskin  <proski@gnu.org>
7174         * configure.ac: Always use "_cv_" in cache variables for
7175         compatibility with Autoconf 2.62.
7177 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7179         Revert grub/machine/init.h addition by Pavel (since it breaks on
7180         i386-ieee1275 and others):
7181         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7182         * util/powerpc/ieee1275/misc.c: Likewise.
7184 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7186         * util/grub-probe.c (probe): Improve error message.
7188 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7190         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7191         (this prevents the presence of a bogus entry from ruining the whole
7192         thing).
7194 2008-04-06  Pavel Roskin  <proski@gnu.org>
7196         * util/biosdisk.c: Include grub/util/biosdisk.h.
7197         * util/grub-fstest.c (execute_command): Make static.
7198         * util/grub-mkdevicemap.c (check_device): Likewise.
7199         * util/i386/pc/misc.c: Include grub/machine/init.h.
7200         * util/powerpc/ieee1275/misc.c: Likewise.
7201         * util/lvm.c: Include grub/util/lvm.h.
7202         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7203         grub/cache.h.
7204         * util/raid.c: Include grub/util/raid.h.
7205         (grub_util_getdiskname): Make static.
7207         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7208         grub_hostfs_fini(), as they are called from grub_init_all() and
7209         grub_fini_all() respectively.  This fixes an infinite loop in
7210         grub-fstest due to double registration of hostfs.
7211         Reported by Christian Franke <Christian.Franke@t-online.de>
7213 2008-04-05  Pavel Roskin  <proski@gnu.org>
7215         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7216         all 8 functions.  Otherwise, probe function 0 only.
7218 2008-04-04  Pavel Roskin  <proski@gnu.org>
7220         * commands/lspci.c (grub_lspci_iter): Print the bus number
7221         correctly.
7223         * commands/lspci.c (grub_pci_classes): Fix typos.
7224         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7225         before device ID, as it's normally done.
7227         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7228         Fix signedness warnings.
7229         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7230         Likewise.
7231         * util/ieee1275/get_disk_name.c: Include config.h so that
7232         _GNU_SOURCE is defined and getline() is declared.  Mark an
7233         unused argument as such.  Fix a signedness warning.
7235 2008-04-02  Pavel Roskin  <proski@gnu.org>
7237         * genkernsyms.sh.in: Use more robust assignments for CC and
7238         srcdir.  Quote srcdir.
7239         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7240         the symbol table is not empty.
7242         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7243         * fs/cpio.c (grub_cpio_read): Likewise.
7245 2008-04-01  Pavel Roskin  <proski@gnu.org>
7247         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7248         * disk/host.c (grub_host_open): Likewise.
7249         * disk/loopback.c (grub_loopback_open): Likewise.
7250         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7251         disk->id as in disk/host.c, not a multi-character constant.
7253         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7254         later is obsolete, potentially dangerous and sets a bad example.
7255         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7256         * util/misc.c (grub_util_get_image_size): Likewise.
7258         * disk/loopback.c (options): Improve help for "--partitions".
7260         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7261         options to align them with the short options, e.g. "echo -e".
7263 2008-03-31  Bean  <bean123ch@gmail.com>
7265         * video/reader/png.c (grub_png_data): New member is_16bit and
7266         image_data.
7267         (grub_png_decode_image_header): Detect 16 bit png image.
7268         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7269         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7270         (grub_video_reader_png): Release memory occupied by image_data.
7272         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7273         4096 bytes.
7274         (grub_nfs_mount): Skip the test for sector per cluster.
7276         * include/grub/ntfs.h (MAX_SPC): Removed.
7278 2008-03-31  Bean  <bean123ch@gmail.com>
7280         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7281         (grub_probe_SOURCES): Add fs/afs.c.
7282         (grub_fstest_SOURCES): Likewise.
7283         (afs_mod_SOURCES): New variable.
7284         (afs_mod_CFLAGS): Likewise.
7285         (afs_mod_LDFLAGS): Likewise.
7287         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7288         (grub_emu_SOURCES): Likewise.
7290         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7292         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7294         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7296         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7298         * fs/afs.c: New file.
7300 2008-03-30  Pavel Roskin  <proski@gnu.org>
7302         * disk/host.c: Include grub/misc.h to fix a warning.
7303         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7304         warnings about implicit declarations.
7306         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7307         variable.
7308         * include/grub/i386/loader.h: Change declaration of
7309         grub_linux_boot() to match what grub_loader_set() expects.
7310         * util/getroot.c (grub_guess_root_device): Return const char* to
7311         fix a warning.
7312         * util/grub-probe.c (probe): Fix a warning about uninitialized
7313         abstraction_name variable.
7314         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7315         second argument as unused to fix a warning.
7317         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7318         missing grub_error() call.
7320         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7321         2.60 and newer uses it to define datadir.
7323         * commands/sleep.c: Fix warning about implicit declaration.
7324         * disk/memdisk.c: Likewise.
7325         * loader/aout.c: Likewise.
7326         * loader/i386/bsd_normal.c: Likewise.
7327         * util/grub-probe.c: Likewise.
7329         * commands/i386/cpuid.c (has_longmode): Make static.
7330         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7331         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7333         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7334         GDT.  This is more robust, as %ds can change.
7335         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7336         calling real_to_prot().
7337         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7339 2008-03-28  Pavel Roskin  <proski@gnu.org>
7341         * kern/i386/pc/startup.S: Assert that uncompressed functions
7342         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7343         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7344         code, as they push parts of the code (error handlers) beyond
7345         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7346         code as correctness and size.
7348 2008-03-28  Pavel Roskin  <proski@gnu.org>
7350         * kern/i386/pc/startup.S
7351         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7352         data block address to the real mode, keep offset minimal.  This
7353         works around a bug in AWARD BIOS on old Athlon systems, which
7354         makes CD detection hang.
7356 2008-03-26  Pavel Roskin  <proski@gnu.org>
7358         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7359         const.
7360         * include/grub/normal.h: Add grub_parse_color_name_pair()
7361         declaration.
7363 2008-03-24  Bean  <bean123ch@gmail.com>
7365         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7366         (cd_count): Removed.
7367         (cd_drive): New variable.
7368         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7369         (grub_biosdisk_call_hook): Likewise.
7370         (grub_biosdisk_iterate): Change cdrom detection method.
7371         (grub_biosdisk_open): Replace cd_start with cd_drive.
7372         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7373         detect cdrom device.
7375         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7376         Removed.
7377         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7378         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7379         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7380         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7381         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7382         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7383         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7384         (grub_biosdisk_cdrp): New structure.
7385         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7387         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7389         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7390         device.
7392         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7393         New function.
7395 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7397         Remove 2 TiB limit in ata.mod.
7398         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7399         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7400         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7401         grub_uint64_t instead of grub_uint32_t.
7403 2008-03-05  Bean  <bean123ch@gmail.com>
7405         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7406         (grub_multiboot): Set boot device.
7408         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7410 2008-03-02  Bean  <bean123ch@gmail.com>
7412         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7413         symlink_buffer.
7415 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7417         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7418         texinfo.tex.
7420         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7421         modified.
7423         * docs/fdl.texi: New file.
7425         * docs/mdate-sh: New file. Copied from gnulib.
7426         * docs/texinfo.tex: Likewise.
7428         * config.guess: Updated from gnulib.
7429         * install-sh: Likewise.
7431 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7433         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7434         (aout_mod_SOURCES): New variable.
7435         (aout_mod_CFLAGS): Likewise.
7436         (aout_mod_LDFLAGS): Likewise.
7438         * conf/i386-ieee1275.rmk: Likewise.
7440 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7442         * util/update-grub.in: Reorganise terminal validity check.  Accept
7443         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7444         Based on suggestion by Franklin PIAT.
7446 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7448         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7449         function.
7450         * util/getroot.c (grub_util_check_block_device): New function that
7451         returns the given argument if it is a block device and returns NULL else.
7452         * util/grub-probe.c (argument_is_device): New variable.
7453         (probe): Promote device_name from a variable to an argument. Receive
7454         device_name from grub_util_check_block_device() if path is NULL and from
7455         grub_guess_root_device() else. Do not free() device_name anymore.
7456         (options): Introduce new parameter '-d, --device'.
7457         (main): Add description of the new parameter to the help screen.
7458         Rename path variable to argument. Set argument_is_device if the '-d'
7459         option is given. Pass argument to probe() depending on
7460         argument_is_device.
7462 2008-02-24  Bean  <bean123ch@gmail.com>
7464         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7465         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7466         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7467         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7468         (GRUB_ISO9660_VOLDESC_END): Likewise.
7469         (grub_iso9660_primary_voldesc): New member escape.
7470         (grub_iso9660_data): New member joliet.
7471         (grub_iso9660_convert_string): New function.
7472         (grub_iso9660_mount): Detect joliet extension.
7473         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7474         (grub_iso9660_iso9660_label): Likewise.
7476         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7477         (grub_setup_SOURCES): Add fs/udf.c.
7478         (grub_fstest_SOURCES): Likewise.
7479         (udf_mod_SOURCES): New variable.
7480         (udf_mod_CFLAGS): Likewise.
7481         (udf_mod_LDFLAGS): Likewise.
7483         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7484         (grub_emu_SOURCES): Likewise.
7486         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7488         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7490         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7492         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7494         * fs/udf.c: New file.
7496 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7498         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7499         (normal/lexer.c_DEPENDENCIES): New variables.
7500         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7501         (normal/lexer.c_DEPENDENCIES): Likewise.
7502         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7503         (normal/lexer.c_DEPENDENCIES): Likewise.
7504         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7505         (normal/lexer.c_DEPENDENCIES): Likewise.
7506         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7507         (normal/lexer.c_DEPENDENCIES): Likewise.
7508         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7509         (normal/lexer.c_DEPENDENCIES): Likewise.
7511 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7513         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7514         since they were intended to be in hex.  This didn't break previously
7515         because of a bug in gpt_partition_map_iterate() (see below).
7517         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7518         when checking the validity of GPT header.
7519         Remove `partno', since it always provides the same information as `i'.
7521 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7523         * include/grub/efi/time.h: Fix a wrong comment.
7525 2008-02-19  Pavel Roskin  <proski@gnu.org>
7527         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7528         message.
7530 2008-02-19  Bean  <bean123ch@gmail.com>
7532         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7533         (aout_mod_SOURCES): New variable.
7534         (aout_mod_CFLAGS): Likewise.
7535         (aout_mod_LDFLAGS): Likewise.
7536         (_bsd_mod_SOURCES): New variable.
7537         (_bsd_mod_CFLAGS): Likewise.
7538         (_bsd_mod_LDFLAGS): Likewise.
7539         (bsd_mod_SOURCES): New variable.
7540         (bsd_mod_CFLAGS): Likewise.
7541         (bsd_mod_LDFLAGS): Likewise.
7543         * include/grub/aout.h: New file.
7545         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7547         * include/grub/i386/bsd.h: New file.
7549         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7550         to make it public.
7552         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7553         function is called, so that it's possible to change it inside the hook.
7554         (grub_elf64_load): Likewise.
7555         (grub_elf_file): Don't close the file if elf header is not found.
7556         (grub_elf_close): Close the file if grub_elf_file fails (The new
7557         grub_elf_file won't close it).
7558         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7559         (grub_elf64_size): Likewise.
7561         * kern/i386/loader.S (grub_unix_real_boot): New function.
7563         * loader/aout.c: New file.
7565         * loader/i386/bsd.c: New file.
7567         * loader/i386/bsd_normal.c: New file.
7569         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7571         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7572         can test other formats.
7574 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7576         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7577         (grub_gpt_partition_type_empty): Redefine with macro from
7578         `<grub/gpt_partition.h>'.
7579         (gpt_partition_map_iterate): Adjust partition type comparison.
7581         Export `entry' as partmap-specific `part.data' struct.
7582         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7584         * include/grub/gpt_partition.h (grub_gpt_header)
7585         (grub_gpt_partentry): ... to here (new file).
7587         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7589         (grub_gpt_partition_type_bios_boot): New const variable, defined
7590         with macro from `<grub/gpt_partition.h>'.
7592         (setup): Replace `first_start' with `embed_region', which keeps
7593         track of the embed region (and is partmap-agnostic).
7595         Replace find_first_partition_start() with find_usable_region(),
7596         which finds a usable region for embedding using partmap-specific
7597         knowledge (supports PC/MSDOS and GPT).
7599         Fix all assumptions that the embed region start at sector 1, using
7600         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7601         rather than `first_start' to calculate available size.
7603         In grub_util_info() message, replace "into after the MBR" with an
7604         indication of the specific sector our embed region starts at.
7606 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7608         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7609         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7610         `commands/reboot.c'.
7611         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7612         (halt_mod_SOURCES): Likewise.
7613         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7614         (halt_mod_SOURCES): Likewise.
7616 2008-02-17  Christian Franke  <franke@computer.org>
7618         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7620 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7622         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7623         set `first_start' to 0 for non-PC/MSDOS partition maps.
7625 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7627         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7628         do not assume partition map is PC/MSDOS before performing checks that
7629         are specific to that layout.
7631 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7633         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7634         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7635         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7637 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7639         * configure.ac: Only a cosmetic change on the handling of
7640         -fno-stack-protector.
7642 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7644         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7645         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7646         reboot.c.
7647         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7648         (halt_mod_SOURCES): New variable.
7649         (halt_mod_CFLAGS): Likewise.
7650         (halt_mod_LDFLAGS): Likewise.
7651         (reboot_mod_SOURCES): Likewise.
7652         (reboot_mod_CFLAGS): Likewise.
7653         (reboot_mod_LDFLAGS): Likewise.
7655         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7656         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7657         reboot.c.
7658         (halt_mod_SOURCES): Likewise.
7659         (reboot_mod_SOURCES): Likewise.
7661         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7662         commands/i386/pc/reboot.c by commands/reboot.c.
7663         (reboot_mod_SOURCES): Likewise.
7665         * commands/i386/pc/reboot.c: merge this file ...
7667         * commands/ieee1275/reboot.c: ... and this file ...
7669         * commands/reboot.c: ... to this file.
7670         Add some precompiler directive to include the correct header for
7671         each machine.
7673         * commands/ieee1275/halt.c: move this file ...
7675         * commands/halt.c: ... to here.
7676         Add some precompiler directive to include the correct header for
7677         each machine.
7679         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7680         (grub_halt): Likewise.
7682         * kern/efi/efi.c (grub_reboot): New function.
7683         (grub_halt): Likewise.
7685 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7687         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7688         /dev (like it is done for /dev/mapper).  This doesn't provide support
7689         for EVMS, but at least it is now easy to identify the problem when it
7690         arises.
7692 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7694         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7695         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7696         comparing it with -1, not 0.
7698 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7700         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7701         `disk/lvm.c'.
7702         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7703         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7705         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7706         `disk/lvm.c' to the end of the list.
7707         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7708         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7710 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7712         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7713         grub_print_error() instead.  This will let user know why we're entering
7714         rescue mode.
7715         Based on suggestions from Sam Morris.
7717 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7719         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7720         on remaining N args, instead of "--" arg N times.
7722 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7724         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7725         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7726         pattern for unknown glyphs.
7728 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7730         * configure.ac: Probe for `help2man'.
7731         * Makefile.in (builddir): New variable.
7732         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7733         or otherwise add a few flags/options to it.
7734         (install-local): For every executable utility or script that is
7735         installed, invoke $(HELP2MAN) to install a manpage based on --help
7736         output.
7738         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7739         that it doesn't prevent --help from working in build tree.
7741         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7742         with `bug-grub@gnu.org'.
7743         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7744         * util/update-grub.in (usage): New function.
7745         Implement proper argument check, with support for --help and --version
7746         (as well as existing -y).
7748 2008-02-09  Christian Franke  <franke@computer.org>
7750         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7751         avoid overwriting previous output.
7752         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7754 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7756         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7757         drawing the menu.
7759 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7761         * commands/sleep.c: New file.
7762         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7763         (sleep_mod_SOURCES): New variable.
7764         (sleep_mod_CFLAGS): Likewise.
7765         (sleep_mod_LDFLAGS): Likewise.
7767 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7769         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7770         situations in which we can deduce the RAID size and the superblock
7771         doesn't match it.
7773 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7775         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7776         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7777         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7779         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7780         and return a grub_diskmemberlist_t composed of physical array members.
7781         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7783         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7784         prototype.
7785         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7786         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7787         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7789         * util/grub-probe.c (probe): Move partmap probing code from here ...
7790         (probe_partmap): ... to here.
7791         (probe): Use probe_partmap() once for the disk we're probing, and
7792         additionally, when such disk contains a memberlist() struct member,
7793         once for each disk that is contained in the structure returned by
7794         memberlist().
7796 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7798         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7799         environment variable to 'all' in order to obtain debug output from
7800         non-util/ code.
7801         * util/i386/pc/grub-setup.c (main): Likewise.
7803 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7805         * disk/raid.c (grub_raid_scan_device): Check for
7806         `array->device[sb.this_disk.number]' rather than for
7807         `array->device[sb.this_disk.number]->name', since the latter is not
7808         guaranteed to be accessible.
7810 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7812         * disk/raid.c: Update copyright.
7813         * fs/cpio.c: Likewise.
7814         * include/grub/raid.h: Likewise.
7815         * loader/i386/pc/multiboot.c: Likewise.
7816         * util/hostfs.c: Likewise.
7818 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7820         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7821         to a grub_disk_t array.
7822         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7823         `device[x]'.
7824         (grub_raid_scan_device): Replace `device[x].name' accesses with
7825         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7827 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7829         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7830         grub_dprintf() calls.
7831         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7832         error message.
7834 2008-02-07  Christian Franke  <franke@computer.org>
7836         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7837         instead of fseek and ftell to support large files.
7838         (grub_hostfs_read): Likewise.
7840 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7842         Patch from Jeroen Dekkers.
7843         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7844         failure, since successfully reading all array members might not be
7845         required.
7847 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7849         * util/grub-probe.c (probe): Simplify partmap probing (with the
7850         assumption that the first word up to the underscore equals to
7851         the module name).
7853 2008-02-06  Christian Franke  <franke@computer.org>
7855         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7856         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7857         last block of a cpio or tar stream.
7858         Check for "TRAILER!!!" instead of any empty data
7859         block to detect last block of a cpio stream.
7860         (grub_cpio_dir): Fix constness of variable np.
7861         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7862         cpio or tar trailer is detected.  This fixes a crash
7863         on open of a non existing file.
7865 2008-02-05  Bean  <bean123ch@gmail.com>
7867         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7868         address of entry.
7869         (grub_multiboot_load_elf64): Likewise.
7870         (grub_multiboot): Initialize mbi structure.
7872         * util/grub-fstest.c: Don't include unused header file script.h.
7874         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7875         of file.
7876         (grub_fstest_SOURCES): Likewise.
7878 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7880         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7881         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7882         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7883         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7885         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7886         (translation_table): Replace hardcoded values with macros
7887         provided by `<grub/term.h>'.
7889         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7890         (keyboard_map): Correct/add a few values, with macros provided
7891         by `<grub/term.h>'.
7892         (keyboard_map_shift): Zero values that don't differ from their
7893         `keyboard_map' equivalents.
7894         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7895         Discard the second scan code that is always sent by Caps lock.
7896         Only use `keyboard_map_shift' when it provides a non-zero value,
7897         otherwise fallback to `keyboard_map'.
7899 2008-02-04  Bean  <bean123ch@gmail.com>
7901         * Makefile.in (enable_grub_fstest): New variable.
7903         * conf/common.rmk (grub_fstest_init.lst): New rule.
7904         (grub_fstest_init.h): Likewise.
7905         (grub_fstest_init.c): Likewise.
7906         (util/grub-fstest.c_DEPENDENCIES): New variable.
7907         (grub_fstest_SOURCES): Likewise.
7909         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7911         * util/grub-fstest.c: New file.
7913 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7915         Make grub-setup handle a separate root device.
7917         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7918         so that the root device can be compared with the destination
7919         device.
7920         When embedding the core image, if the root and destination devices
7921         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7922         0xFF.
7923         When not embedding, set ROOT_DRIVE to 0xFF.
7925 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7927         Add support for having a grub directory in a different drive. This
7928         is still only the data handling part.
7930         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7931         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7932         (grub_root_drive): New variable.
7934         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7935         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7936         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7937         as it was.
7939         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7941         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7942         macro.
7943         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7945         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7946         is bogus, because PXE booting does not specify any drive
7947         correctly.
7949         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7950         am not sure if this is really correct.
7952         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7953         is always identical to the boot drive when booting from a CD.
7955         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7956         longer.
7957         (root_drive): New variable.
7958         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7959         (setup_sectors): Push %dx right after popping it, because %dh will
7960         be modified later.
7961         (copy_buffer): Restore %dx.
7963 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7965         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7966         use `cdboot.img' for cdrom images.
7968 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7970         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7971         only setup gfxterm when `font' command has succeeded.
7973 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7975         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7976         (grub_rescue_cmd_multiboot_loader)
7977         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7979 2008-02-03  Pavel Roskin  <proski@gnu.org>
7981         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7982         %edx and %esi from stack only after grub_gate_a20() is called.
7983         grub_gate_a20() clobbers %edx.
7985 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7987         * configure.ac (AC_INIT): Bumped to 1.96.
7989         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7990         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7991         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7992         video/readers/png.c.
7994 2008-02-03  Bean  <bean123ch@gmail.com>
7996         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7997         (cdboot_img_SOURCES): New variable.
7998         (cdboot_img_ASFLAGS): New variable.
7999         (cdboot_img_LDFLAGS): New variable.
8001         * boot/i386/pc/cdboot.S: New file.
8003         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8004         (cd_count): Likewise.
8005         (grub_biosdisk_get_drive): Add support for cd device.
8006         (grub_biosdisk_call_hook): Likewise.
8007         (grub_biosdisk_iterate): Likewise.
8008         (grub_biosdisk_open): Likewise.
8009         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8010         (grub_biosdisk_rw): Support reading from cd device.
8011         (GRUB_MOD_INIT): Iterate cd devices.
8013         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8014         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8015         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8017         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8019 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8021         * commands/read.c: New file.
8022         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8023         (read_mod_SOURCES): New variable.
8024         (read_mod_CFLAGS): Likewise.
8025         (read_mod_LDFLAGS): Likewise.
8027 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8029         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8030         determining whether menu has to be displayed.
8032 2008-02-02  Marco Gerards  <marco@gnu.org>
8034         * bus/pci.c: New file.
8036         * include/grub/pci.h: Likewise.
8038         * include/grub/i386/pc/pci.h: Likewise.
8040         * commands/lspci.c: Likewise.
8042         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8043         `lspci.mod'.
8044         (pci_mod_SOURCES): New variable.
8045         (pci_mod_CFLAGS): Likewise.
8046         (pci_mod_LDFLAGS): Likewise.
8047         (lspci_mod_SOURCES): Likewise.
8048         (lspci_mod_CFLAGS): Likewise.
8049         (lspci_mod_LDFLAGS): Likewise.
8051 2008-02-02  Bean  <bean123ch@gmail.com>
8053         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8054         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8056         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8057         (grub_xfs_btree_node): New structure.
8058         (grub_xfs_btree_root): New structure.
8059         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8060         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8061         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8062         (GRUB_XFS_EXTENT_SIZE): Likewise.
8063         (grub_xfs_read_block): Support btree format type.
8064         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8065         Use directory block as basic unit.
8067         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8069         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8070         __attribute__ ((__regparm__ (1))).
8072 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8074         Correct a mistake in previous commit.
8076         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8077         top.
8078         (normal/command.c_DEPENDENCIES): New variable.
8080 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8082         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8083         top.
8084         (normal/command.c_DEPENDENCIES): New variable.
8085         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8086         * conf/i386-ieee1275.rmk: Likewise.
8087         * conf/i386-linuxbios.rmk: Likewise.
8088         * conf/i386-pc.rmk: Likewise.
8089         * conf/sparc64-ieee1275.rmk: Likewise.
8090         * conf/powerpc-ieee1275.rmk: Likewise.
8091         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8093         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8095 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8097         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8098         call at beginning of function.
8100 2008-01-31  Pavel Roskin  <proski@gnu.org>
8102         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8103         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8104         (grub_mkrescue_SOURCES): Likewise.
8105         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8107 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8109         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8110         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8111         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8112         (grub_probe_SOURCES): ... to here.
8114         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8115         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8116         * conf/i386-ieee1275.rmk: Likewise.
8117         * conf/i386-linuxbios.rmk: Likewise.
8118         * conf/powerpc-ieee1275.rmk: Likewise.
8120 2008-01-30  Tristan Gingold  <gingold@free.fr>
8122         * kern/rescue.c: Silently accept empty lines.
8124 2008-01-29  Bean  <bean123ch@gmail.com>
8126         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8127         (real_code_2): Code cleanup and change comment style.
8128         (move_memory): Avoid using 32-bit address mode.
8130 2008-01-29  Bean  <bean123ch@gmail.com>
8132         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8133         (png_mod_SOURCES): New variable.
8134         (png_mod_CFLAGS): Likewise.
8135         (png_mod_LDFLAGS): Likewise.
8137         * video/readers/png.c: New file.
8139 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8141         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8142         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8143         `ifndef GRUB_MOD_GAP' hack.
8144         * util/elf/grub-mkimage.c (add_segments): Likewise.
8146 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8148         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8149         `GRUB_MOD_GAP' for platforms in which it's not defined.
8150         * util/elf/grub-mkimage.c (add_segments): Likewise.
8152 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8154         Get grub-emu to build again (including parallel builds).
8156         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8157         Split into ...
8158         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8159         (normal/execute.c_DEPENDENCIES): ... this, ...
8160         (grub-emu_DEPENDENCIES): ... and this.
8162         * conf/i386-efi.rmk: Likewise.
8163         * conf/i386-linuxbios.rmk: Likewise.
8164         * conf/i386-ieee1275.rmk: Likewise.
8165         * conf/powerpc-ieee1275.rmk: Likewise.
8166         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8168 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8170         * NEWS: Add a few items.
8172 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8174         Fix parallel builds with grub-emu.  Based on earlier commit for
8175         grub-probe and grub-setup.
8177         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8178         (util/grub-emu.c_DEPENDENCIES): ... this.
8179         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8180         (util/grub-emu.c_DEPENDENCIES): ... this.
8181         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8182         (util/grub-emu.c_DEPENDENCIES): ... this.
8183         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8184         (util/grub-emu.c_DEPENDENCIES): ... this.
8185         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8186         (util/grub-emu.c_DEPENDENCIES): ... this.
8188 2008-01-27  Pavel Roskin  <proski@gnu.org>
8190         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8191         to create a gap between _end and the modules added to the image
8192         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8193         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8194         * util/elf/grub-mkimage.c (add_segments): Likewise.
8196 2008-01-26  Pavel Roskin  <proski@gnu.org>
8198         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8199         just return an error.
8201 2008-01-26  Bean  <bean123ch@gmail.com>
8203         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8204         (grub_reiserfs_get_item): Save offset of the next item.
8205         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8207 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8209         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8210         make all filesystem sources appear together (possibly fixing omissions
8211         while at it).
8212         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8213         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8214         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8215         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8217         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8218         add `kern/file.c'.
8219         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8220         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8221         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8222         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8224         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8225         (probe): Add a sanity check to make sure of our ability to read
8226         requested files when probing for filesystem type.
8228         * genmk.rb: Update copyright year (2007).
8230         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8231         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8232         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8233         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8234         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8235         : Remove function prototypes.
8237 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8239         Revert my previous commits (based on wrong assumption of how grub_errno
8240         works).
8242         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8243         * kern/file.c (grub_file_open): Likewise.
8245 2008-01-24  Pavel Roskin  <proski@gnu.org>
8247         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8248         that hang if GRUB tries to setup colors.
8249         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8250         colors for firmwares that don't support it.
8251         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8252         Recognize Open Hack'Ware, set flags to work around its
8253         limitations.
8255 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8257         * kern/file.c (grub_file_open): Do not account previous failures of
8258         unrelated functions when grub_errno is checked for.
8259         Reported by Oleg Strikov.
8261 2008-01-24  Bean  <bean123ch@gmail.com>
8263         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8264         (grub_ufs_sblock): New member volume name.
8265         (grub_ufs_find_file): Fix string copy bug.
8266         (grub_ufs_label): Implement this function properly.
8268         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8269         (grub_hfs_iterate_records): Use the correct file number for extents
8270         and catalog file. Fix problem in next index calculation.
8271         (grub_hfs_find_node): Replace recursive function call with loop.
8272         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8274 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8276         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8277         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8278         (grub_multiboot2_real_boot): New function prototype.
8280         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8281         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8283         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8284         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8286 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8288         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8289         #ifdef'ed out grub_printf().
8291 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8293         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8294         grub_dprintf calls, since they make "debug=all" mode unusable.
8295         (grub_console_checkkey): Likewise.
8297 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8299         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8300         `term/i386/pc/at_keyboard.c'.
8301         (pkglib_MODULES): Add `serial.mod'.
8302         (serial_mod_SOURCES): New variable.
8303         (serial_mod_CFLAGS): Likewise.
8304         (serial_mod_LDFLAGS): Likewise.
8306         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8307         `<grub/powerpc/ieee1275/console.h>'.
8308         (grub_keyboard_controller_init): New function prototype.
8309         (grub_console_checkkey): Likewise.
8310         (grub_console_getkey): Likewise.
8312         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8313         keyboard on i386.
8315         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8316         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8318 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8320         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8321         present, "(memdisk)/boot/grub" becomes the default prefix.
8323         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8324         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8325         allows users to overlay additional files into the image.
8327 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8329         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8330         and `machine/memory.h'.
8331         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8332         (_multiboot_mod_SOURCES): New variable.
8333         (_multiboot_mod_CFLAGS): Likewise.
8334         (_multiboot_mod_LDFLAGS): Likewise.
8335         (multiboot_mod_SOURCES): Likewise.
8336         (multiboot_mod_CFLAGS): Likewise.
8337         (multiboot_mod_LDFLAGS): Likewise.
8339         * include/grub/i386/ieee1275/loader.h: New file.
8341         * include/grub/i386/ieee1275/machine.h: Likewise.
8343         * include/grub/i386/ieee1275/memory.h: Likewise.
8345         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8346         variable declaration.
8347         (grub_os_area_size): Likewise.
8349         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8350         (grub_lower_mem, grub_upper_mem): New variables.
8351         (grub_stop_floppy): New function (just to make
8352         grub_multiboot2_real_boot() happy).
8354         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8355         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8356         (grub_stop): New function.
8357         Include `"../realmode.S"' and `"../loader.S"'.
8359         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8360         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8362         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8363         rely on grub_multiboot2_real_boot() for final boot.
8365 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8367         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8368         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8369         device that doesn't look like an SD card.
8370         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8371         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8372         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8373         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8374         found.
8376 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8378         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8379         avoid claiming over our own code.
8381 2008-01-22  Bean  <bean123ch@gmail.com>
8383         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8384         (jpeg_mod_SOURCES): New variable.
8385         (jpeg_mod_CFLAGS): Likewise.
8386         (jpeg_mod_LDFLAGS): Likewise.
8388         * video/readers/jpeg.c : New file.
8390 2008-01-22  Bean  <bean123ch@gmail.com>
8392         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8393         there are no more items.
8395 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8397         * kern/mm.c (grub_mm_init_region): Improve debug message.
8399 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8401         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8402         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8403         address.
8404         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8405         a C macro.
8406         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8407         Indicates start of upper memory.
8408         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8409         (generate_image): Abort when image size is big enough to corrupt
8410         upper memory.
8412         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8413         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8414         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8415         instead of hardcoding 0xA0000.
8416         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8417         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8418         instead of hardcoding 0xA0000.
8420 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8422         * disk/memdisk.c (memdisk_size): New variable.
8423         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8424         `memdisk_size'.
8425         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8426         image to dynamic memory.
8427         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8428         `memdisk_size'.  Free memdisk block.
8430 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8432         Fix detection of very small filesystems (like tar).
8434         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8435         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8436         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8437         a problem with this disk).
8439 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8441         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8442         on grub_biosdisk_rw_standard() error.
8444 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8446         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8447         recent changes.
8448         * kern/elf.c: Likewise.
8449         * kern/ieee1275/ieee1275.c: Likewise.
8450         * kern/powerpc/ieee1275/openfw.c: Likewise.
8451         * term/ieee1275/ofconsole.c: Likewise.
8453 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8455         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8457         * include/grub/kernel.h (grub_arch_memdisk_addr)
8458         (grub_arch_memdisk_size): Moved from here ...
8460         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8461         (grub_arch_memdisk_size): ... to here.
8463 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8465         Mostly based on bugfix from Bean.
8467         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8468         attribute with hook() parameter.
8469         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8470         declaration.
8471         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8472         attribute with hook() parameter.
8473         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8474         declaration.
8476 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8478         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8479         (pkglib_MODULES): Add `memdisk.mod'.
8480         (memdisk_mod_SOURCES): New variable.
8481         (memdisk_mod_CFLAGS): Likewise.
8482         (memdisk_mod_LDFLAGS): Likewise.
8484         * disk/memdisk.c: New file.
8486         * include/grub/disk.h (grub_disk_dev_id): Add
8487         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8489         * include/grub/i386/pc/kernel.h
8490         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8491         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8492         (grub_kernel_image_size): New variable declaration.
8493         (grub_total_module_size): Likewise.
8494         (grub_memdisk_image_size): Likewise.
8496         * include/grub/i386/pc/memory.h
8497         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8499         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8500         (grub_arch_memdisk_addr): New variable declaration.
8501         (grub_arch_memdisk_size): Likewise.
8503         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8504         (grub_arch_memdisk_size): Likewise.
8506         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8507         (codestart): Replace hardcoded `0x100000' with
8508         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8510         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8511         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8512         not NULL, append the contents of the file it refers to, at the end of
8513         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8514         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8515         (options): Add "memdisk"|'m' option.
8516         (main): Parse --memdisk|-m option, and pass user-provided path as
8517         parameter to generate_image().
8519 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8521         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8522         grub_dprintf() calls from here ...
8523         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8525 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8527         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8529         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8530         declaration.
8531         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8532         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8533         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8534         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8535         property).
8536         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8537         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8539 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8541         Get rid of confusing function (superseded by
8542         `grub_ieee1275_get_integer_property')
8543         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8544         prototype.
8545         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8546         function.
8547         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8548         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8549         in native endianness from grub_ieee1275_get_integer_property().
8551 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8553         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8554         command after "shut-down", since implementations differ on which
8555         the command for halt is.
8557 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8559         * include/grub/i386/linuxbios/console.h: Add header protection.
8560         (grub_keyboard_controller_init): New function prototype.
8561         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8562         (KEYBOARD_COMMAND_READ): Likewise.
8563         (KEYBOARD_COMMAND_WRITE): Likewise.
8564         (KEYBOARD_SCANCODE_SET1): Likewise.
8565         (grub_keyboard_controller_write): New function.
8566         (grub_keyboard_controller_read): Likewise.
8567         (grub_keyboard_controller_init): Likewise.
8569         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8570         (grub_console_init): On coreboot/LinuxBIOS, call
8571         grub_keyboard_controller_init().
8573 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8575         PowerPC changes provided by Pavel Roskin.
8577         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8578         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8579         don't rely on cmain() doing it.
8580         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8581         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8583 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8585         * include/grub/i386/linuxbios/memory.h
8586         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8587         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8588         receive `table_header' as argument.  Instead, probe for it in the
8589         known memory ranges where it can be present.
8590         (grub_available_iterate): Do not pass a fixed `table_header' address
8591         to grub_linuxbios_table_iterate().
8593 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8595         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8596         * conf/i386-ieee1275.rmk: New file.
8597         * include/grub/i386/ieee1275/console.h: Likewise.
8598         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8599         * include/grub/i386/ieee1275/kernel.h: Likewise.
8600         * include/grub/i386/ieee1275/time.h: Likewise.
8601         * kern/i386/ieee1275/init.c: Likewise.
8602         * kern/i386/ieee1275/startup.S: Likewise.
8604 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8606         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8607         when pointers are 32-bit (but still do set it to one when they are
8608         64-bit).
8610 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8612         * include/grub/ieee1275/ieee1275.h
8613         (grub_ieee1275_get_integer_property): New function prototype.
8615         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8616         (grub_ieee1275_get_integer_property): New function.  Wraps around
8617         grub_ieee1275_get_property() to handle endianness.
8619         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8620         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8621         where appropriate.
8622         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8623         (grub_map): Likewise.
8624         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8626 2008-01-15  Bean  <bean123ch@gmail.com>
8628         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8629         (grub_script_execute_cmdline): Reset grub_errno.
8631         * normal/main.c (read_config_file): Reset grub_errno.
8633         * normal/parse.y (script_init): New.
8634         (script): Move function and menuentry here.
8635         (delimiter): New.
8636         (command): Add delimiter at the end of command.
8637         (commands): Adjust to match the new command.
8638         (commandblock): Remove grub_script_lexer_record_start.
8639         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8640         (if): Use the new commands.
8642         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8644 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8646         * normal/menu.c (run_menu): Move timeout message from here ...
8647         (print_timeout): ... to here.
8648         (run_menu): Use print_timeout() once during initial draw to print
8649         the whole message, and again in every clock tick to update only
8650         the number of seconds.
8652 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8654         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8655         actual size of `available' from grub_ieee1275_get_property(), and
8656         restrict parsing to that bound.
8658 2008-01-15  Christian Franke  <franke@computer.org>
8660         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8661         (argp_program_version): Remove variable.
8662         (argp_program_bug_address): Likewise.
8663         (options): Convert from struct argp_option to struct option.
8664         (struct arguments): Remove.
8665         (parse_opt): Remove.
8666         (usage): New function.
8667         (main): Replace struct args members by simple variables.
8668         Replace argp_parse() by getopt_long().
8669         Add switch to evaluate options.
8670         Add missing "(...)" around root_dev in prefix string.
8672 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8674         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8675         for grub_ieee1275_exit(), in order to improve portability.
8677 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8679         * util/grub.d/10_linux.in (prefix): Define.
8680         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8682 2008-01-13  Pavel Roskin  <proski@gnu.org>
8684         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8685         grub_errno if no errors have been detected.
8687 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8689         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8690         (grub_util_get_dev_abstraction): New function prototype.
8692         * util/getroot.c: Include `<grub/util/getroot.h>'
8693         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8694         (grub_util_get_dev_abstraction): ... here (new function).
8696         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8697         `PRINT_ABSTRACTION'.
8698         (probe): Probe for abstraction type when requested.
8699         (main): Understand `--target=abstraction'.
8701         * util/i386/efi/grub-install.in: Add abstraction module to core
8702         image when it is found to be necessary.
8703         * util/i386/pc/grub-install.in: Likewise.
8704         * util/powerpc/ieee1275/grub-install.in: Likewise.
8706         * util/update-grub_lib.in (font_path): Return system path without
8707         converting to GRUB path.
8708         * util/update-grub.in: Convert system path returned by font_path()
8709         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8710         abstraction module is needed for loading fonts (if any).  Export
8711         that as `GRUB_PRELOAD_MODULES'.
8712         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8713         insmod commands).
8715 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8717         Remove some unused code from reiserfs.
8719         * fs/reiserfs.c (struct grub_reiserfs_key)
8720         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8721         (struct grub_reiserfs_node_body): Removed.
8722         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8723         Likewise.
8724         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8725         Likewise.
8726         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8727         Likewise.
8728         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8729         Likewise.
8730         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8731         Likewise.
8732         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8733         Likewise.
8734         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8735         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8736         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8738 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8740         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8741         Determines if a file is garbage left by packaging systems, etc.
8742         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8743         for processing /etc/grub.d scripts.
8744         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8745         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8746         as a condition for processing Linux images.
8748 2008-01-10  Pavel Roskin  <proski@gnu.org>
8750         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8751         to compile reiserfs.c on PowerPC.
8753 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8755         * kern/device.c (grub_device_iterate): Do not abort device iteration
8756         when one of the devices cannot be opened.
8757         * kern/disk.c (grub_disk_open): Do not account previous failures of
8758         unrelated functions when grub_errno is checked for.
8760 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8762         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8763         `! grub_linux_is_bzimage', change order of address comparison to make
8764         it more intuitive, and improve "too big zImage" error message.
8766 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8768         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8769         `$(update-grub_DATA)'.
8770         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8771         targets.
8773 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8775         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8776         which instruction is modified by grub-setup during installation
8777         (since it wasn't obvious by only looking at this file).
8779 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8781         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8782         listing actual TODO items.
8784 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8786         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8787         correctly.
8788         (grub_reiserfs_get_key_offset): Likewise.
8789         (grub_reiserfs_set_key_offset): Likewise.
8790         (grub_reiserfs_set_key_type): Likewise.
8791         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8793         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8794         better to remove the bitfield version completely.
8796 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8798         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8799         allocated from the heap, due to the fshelp implementation.
8800         (grub_reiserfs_dir): Free NODE, due to the same reason.
8802 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8804         Mostly from Vincent Pelletier:
8806         * fs/reiserfs.c: New file.
8808         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8809         (reiserfs_mod_SOURCES): New variable.
8810         (reiserfs_mod_CFLAGS): Likewise.
8811         (reiserfs_mod_LDFLAGS): Likewise.
8813         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8814         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8815         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8816         normal/color.c.
8818 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8820         * normal/color.c: Remove `<grub/env.h>'.
8822 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8824         * include/grub/normal.h: Include <grub/env.h>.
8826 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8828         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8829         usage example with `(hd0,1)'.
8830         Reported by Samuel Thibault.
8832 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8834         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8835         (grub_linux_boot_zimage): Rename to ...
8836         (grub_linux_boot): ... this.
8837         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8838         (grub_linux_boot_zimage): Conditionalize zImage copy.
8840         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8841         (grub_linux_boot_bzimage): Remove prototype.
8842         (grub_linux_boot_zimage): Rename to ...
8843         (grub_linux_boot): ... this.
8845         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8846         (grub_linux_boot): Remove function.
8848 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8850         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8851         (grub_env_write_color_highlight): Likewise.
8852         (grub_wait_after_message): Likewise.
8854         * normal/color.c: New file.
8856         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8857         (normal_mod_DEPENDENCIES): Likewise.
8859         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8860         (normal_mod_DEPENDENCIES): Likewise.
8862         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8863         (normal_mod_DEPENDENCIES): Likewise.
8865         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8866         (normal_mod_DEPENDENCIES): Likewise.
8868         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8869         for waiting after a message is printed.
8870         * normal/main.c (read_config_file): Likewise.
8871         (grub_normal_init): Register grub_env_write_color_normal() and
8872         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8873         `color_highlight' variables as global.
8875         * normal/menu.c (grub_wait_after_message): New function.
8876         (grub_color_menu_normal): New variable.  Replaces ...
8877         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8878         (grub_color_menu_highlight): New variable.  Replaces ...
8879         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8880         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8881         `GRUB_TERM_COLOR_STANDARD'.
8882         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8883         `normal_code' and `highlight_code' to `old_color_normal' and
8884         `old_color_highlight', respectively.
8885         (grub_menu_init_page): Update colors when drawing the menu, based on
8886         `menu_color_normal' and `menu_color_highlight' variables.
8887         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8888         a message is printed.
8890 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8892         * kern/env.c (grub_env_context_open): Propagate hooks for global
8893         variables to new context.
8895         * kern/main.c (grub_set_root_dev): Export `root' variable.
8897 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8899         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8900         discs unconditionally, since udev and others have options to provide
8901         them.
8903 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8905         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8907 2008-01-04  Christian Franke  <franke@computer.org>
8909         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8910         of eisa_mmap.
8912 2008-01-03  Pavel Roskin  <proski@gnu.org>
8914         * kern/i386/linuxbios/init.c: Put "void" to all function
8915         declarations with no arguments.
8916         * kern/powerpc/ieee1275/init.c: Likewise.
8917         * term/i386/pc/at_keyboard.c: Likewise.
8918         * term/i386/pc/vga_text.c: Likewise.
8919         * util/grub-mkdevicemap.c: Likewise.
8921 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8923         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8924         message when loaded image is out of bounds.
8925         (grub_multiboot_load_elf64): Likewise.
8927 2008-01-02  Pavel Roskin  <proski@gnu.org>
8929         * util/grub.d/10_linux.in: Try version without ".old" when
8930         looking for initrd.  It's better to use initrd from the newer
8931         kernel of the same version than no initrd at all.
8933 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8935         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8937 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8939         * include/grub/video.h: Added grub_video_unmap_color and
8940         grub_video_get_active_render_target.
8941         (grub_video_adapter): Added unmap_color and get_active_render_target.
8943         * video/video.c: Added grub_video_unmap_color and
8944         grub_video_get_active_render_target.
8945         (grub_video_get_info): Changed method to accept NULL pointer as an
8946         argument to allow detection of active video adapter.
8948         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8949         grub_video_vbe_unmap_color_int.
8950         Added grub_video_vbe_unmap_color and
8951         grub_video_vbe_get_active_render_target.
8952         (grub_video_vbe_adapter): Added unmap_color and
8953         get_active_render_target.
8955         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8956         with grub_video_vbe_unmap_color_int.
8958         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8959         (DEFAULT_NORMAL_COLOR): Likewise.
8960         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8961         (DEFAULT_FG_COLOR): Removed.
8962         (DEFAULT_BG_COLOR): Likewise.
8963         (DEFAULT_CURSOR_COLOR): Changed value.
8964         (grub_virtual_screen): Added standard_color_setting,
8965         normal_color_setting, highlight_color_setting and term_color.
8966         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8967         (bitmap_width): Added.
8968         (bitmap_height): Likewise.
8969         (bitmap): Likewise.
8970         (set_term_color): Likewise.
8971         (grub_virtual_screen_setup): Changed to use new terminal coloring
8972         settings.
8973         (grub_gfxterm_init): Added init for bitmap.
8974         (grub_gfxterm_fini): Added destroy for bitmap.
8975         (redraw_screen_rect): Updated to use background bitmap and new
8976         terminal coloring.
8977         (scroll_up): Added optimization for case when there is no bitmap.
8978         (grub_gfxterm_cls): Fixed to use correct background color.
8979         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8980         coloring.
8981         (grub_virtual_screen_setcolor): Likewise.
8982         (grub_virtual_screen_getcolor): Added.
8983         (grub_gfxterm_background_image_cmd): Likewise.
8984         (grub_video_term): Added setcolor and getcolor.
8985         (MOD_INIT): Added registration of background_image command.
8986         (MOD_TERM): Added unregistration for background_image command.
8988 2007-12-30  Pavel Roskin  <proski@gnu.org>
8990         * loader/multiboot_loader.c: Fix multiboot command
8991         unregistration.  Fix all typos in the word "multiboot".
8993 2007-12-29  Pavel Roskin  <proski@gnu.org>
8995         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8996         support for initrd names used in Fedora.
8998 2007-12-26  Bean  <bean123ch@gmail.com>
9000         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9001         (cpio_mod_SOURCES): New variable.
9002         (cpio_mod_CFLAGS): Likewise.
9003         (cpio_mod_LDFLAGS): Likewise.
9005         * fs/cpio.c: New file.
9007         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9009         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9011         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9013         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9015 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9017         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9018         (grub_getcolor): New function.
9020         * kern/term.c (grub_getcolor): New function.
9021         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9022         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9023         (print_entry): Set normal and highlight colors to
9024         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9025         respectively, before printing and restore them to old
9026         values afterwards.
9027         (grub_menu_init_page): Likewise.  Fill an additional colored space
9028         that would otherwise be left blank.
9030         * term/efi/console.c (grub_console_getcolor): New function.
9031         (struct grub_console_term.getcolor): New variable.
9032         * term/i386/pc/console.c (grub_console_getcolor): New function.
9033         (struct grub_console_term.getcolor): New variable.
9034         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9035         (struct grub_console_term.getcolor): New variable.
9037         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9038         (struct grub_console_term.setcolor): Remove variable.
9039         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9040         (struct grub_console_term.setcolor): Remove variable.
9041         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9042         (struct grub_console_term.setcolor): Remove variable.
9043         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9044         (struct grub_console_term.setcolor): Remove variable.
9046 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9048         * configure.ac: Search for possible unifont.hex locations, and
9049         define UNIFONT_HEX if found.
9051         * Makefile.in (UNIFONT_HEX): Define variable.
9052         (DATA): Rename to ...
9053         (PKGLIB): ... this.  Update all users.
9054         (PKGDATA): New variable.
9055         (pkgdata_IMAGES): Rename to ...
9056         (pkglib_IMAGES): ... this. Update all users.
9057         (pkgdata_MODULES): Rename to ...
9058         (pkglib_MODULES): ... this. Update all users.
9059         (pkgdata_PROGRAMS): Rename to ...
9060         (pkglib_PROGRAMS): ... this. Update all users.
9061         (pkgdata_DATA): Rename to ...
9062         (pkglib_DATA): ... this. Update all users.
9063         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9064         (unicode.pff, ascii.pff): New rules.
9065         (all-local): Add `$(PKGDATA)' dependency.
9066         (install-local): Process `$(PKGDATA)'.
9068         * util/update-grub_lib.in (font_path): Search for *.pff files in
9069         a few more locations, including `${pkgdata}'.
9071 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9073         Patch from Bean  <bean123ch@gmail.com>:
9074         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9075         `size'.
9077 2007-12-21  Bean  <bean123ch@gmail.com>
9079         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9080         (ntfscomp_mod_SOURCES): New variable.
9081         (ntfscomp_mod_CFLAGS): Likewise.
9082         (ntfscomp_mod_LDFLAGS): Likewise.
9084         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9085         (grub_probe_SOURCES): Likewise.
9086         (grub_emu_SOURCES): Likewise.
9088         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9089         (grub_emu_SOURCES): Likewise.
9091         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9092         (grub_emu_SOURCES): Likewise.
9094         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9095         (grub_emu_SOURCES): Likewise.
9097         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9098         (read_run_list): Renamed to grub_ntfs_read_run_list.
9099         (decomp_nextvcn): Moved to ntfscomp.c.
9100         (decomp_getch): Likewise.
9101         (decomp_get16): Likewise.
9102         (decomp_block): Likewise.
9103         (read_block): Likewise.
9104         (read_data): Partially moved to ntfscomp.c.
9105         (fixup): Change unsigned to grub_uint16_t.
9106         (read_mft): Change unsigned long to grub_uint32_t.
9107         (read_attr): Likewise.
9108         (read_data): Likewise.
9109         (read_run_data): Likewise.
9110         (read_run_list): Likewise.
9111         (read_mft): Likewise.
9113         * fs/ntfscomp.c: New file.
9115         * include/grub/ntfs.h: New file.
9117 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9119         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9120         IDE disk check, since Linux is known to support 20 IDE disks.
9121         Reported by Colin Watson.
9123 2007-12-15  Bean  <bean123ch@gmail.com>
9125         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9126         (lnxboot_img_SOURCES): New variable.
9127         (lnxboot_img_ASFLAGS): Likewise.
9128         (lnxboot_img_LDFLAGS): Likewise.
9130         * boot/i386/pc/lnxboot.S: New file.
9132 2007-11-24  Pavel Roskin  <proski@gnu.org>
9134         * configure.ac: Test if '--build-id=none' is supported by the
9135         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9136         objcopy to generate incorrect binary files (binutils
9137         2.17.50.0.18-1 as shipped by Fedora 8).
9138         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9139         linking, so that build ID doesn't break the test.
9141 2007-11-24  Pavel Roskin  <proski@gnu.org>
9143         * include/grub/i386/time.h: use "void" in the argument list
9144         of grub_cpu_idle().
9145         * include/grub/powerpc/time.h: Likewise.
9146         * include/grub/sparc64/time.h: Likewise.
9148 2007-11-18  Christian Franke  <franke@computer.org>
9150         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9151         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9152         This fixes the problem that function keys did not work in grub-emu.
9154 2007-11-18  Christian Franke  <franke@computer.org>
9156         * disk/host.c (grub_host_open): Remove attribute unused from
9157         name parameter. Add check for "host". This fixes the problem
9158         that grub-emu does not find partitions.
9160 2007-11-18  Christian Franke  <franke@computer.org>
9162         * util/hostfs.c (is_dir): New function.
9163         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9164         (grub_hostfs_read): Add missing fseek().
9165         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9166         of grub-emu on "ls (host)".
9168 2007-11-18  Christian Franke  <franke@computer.org>
9170         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9171         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9172         to 64 bit boundary by default.
9174 2007-11-18  Bean  <bean123ch@gmail.com>
9176         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9177         (hexdump_mod_SOURCES): New variable.
9178         (hexdump_mod_CFLAGS): Likewise.
9179         (hexdump_mod_LDFLAGS): Likewise.
9181         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9183         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9185         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9187         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9189         * include/grub/hexdump.h: New file.
9191         * commands/hexdump.c: New file.
9193 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9195         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9196         in grub_outb() calls.
9197         (beep_on): Likewise.
9199 2007-11-10  Christian Franke  <franke@computer.org>
9201         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9202         (grub_menu_run): Likewise.
9204 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9206         * include/grub/i386/efi/machine.h: New file.
9207         * include/grub/i386/linuxbios/machine.h: Likewise.
9208         * include/grub/i386/pc/machine.h: Likewise.
9209         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9210         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9212         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9213         (serial_hw_io_addr): New variable.
9214         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9215         instead of `(unsigned short *) 0x400'.
9217 2007-11-10  Bean  <bean123ch@gmail.com>
9219         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9221 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9223         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9224         (vga_mod_SOURCES): Added.
9225         (vga_mod_CFLAGS): Likewise.
9226         (vga_mod_LDFLAGS): Likewise.
9228         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9229         grub_outb() calls.
9230         (set_map_mask): Likewise.
9231         (set_read_map): Likewise.
9232         (set_read_address): Likewise.
9233         (vga_font): Removed variable.
9234         (get_vga_glyph): Removed function.
9235         (invalidate_char): Likewise.
9236         (write_char): Changed to use grub_font_get_glyph() for font
9237         information.
9238         (grub_vga_putchar): Likewise.
9239         (grub_vga_getcharwidth): Likewise.
9241 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9243         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9244         flags.
9245         (pxeboot_img_LDFLAGS): Likewise.
9246         (diskboot_img_LDFLAGS): Likewise.
9247         (kernel_img_LDFLAGS): Likewise.
9249 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9251         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9252         in grub_outb() calls.
9253         (serial_hw_init): Likewise.
9255 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9257         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9258         spaces.  Skip non-regular files.
9260 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9262         * kern/disk.c (grub_disk_firmware_fini)
9263         (grub_disk_firmware_is_tainted): New variables.
9265         * include/grub/disk.h (grub_disk_firmware_fini)
9266         (grub_disk_firmware_is_tainted): Likewise.
9268         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9269         (grub_disk_biosdisk_fini): ... to here.
9270         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9271         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9272         is set.  Register grub_disk_biosdisk_fini() in
9273         `grub_disk_firmware_fini'.
9275         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9276         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9277         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9278         to finish existing firmware disk interface.
9280         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9281         (ata_mod_SOURCES): New variable.
9282         (ata_mod_CFLAGS): Likewise.
9283         (ata_mod_LDFLAGS): Likewise.
9285 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9287         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9288         (grub_ata_wait): Reimplement using grub_millisleep().
9290         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9291         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9293 2007-11-03  Marco Gerards  <marco@gnu.org>
9295         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9296         (CRTC_ADDR_PORT): New macro.
9297         (CRTC_DATA_PORT): Likewise.
9298         (CRTC_CURSOR): Likewise.
9299         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9300         (CRTC_CURSOR_ADDR_LOW): Likewise.
9301         (update_cursor): New function.
9302         (grub_console_real_putchar): Call `update_cursor'.
9303         (grub_console_gotoxy): Likewise.
9304         (grub_console_cls): Set the default color when clearing the
9305         screen.
9306         (grub_console_setcursor): Implemented.
9308 2007-11-03  Marco Gerards  <marco@gnu.org>
9310         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9311         become activate.
9312         (grub_ata_pio_write): Likewise.
9314         (grub_atapi_identify): Wait after issuing an ATA command.
9315         (grub_atapi_packet): Likewise.
9316         (grub_ata_identify): Likewise.
9317         (grub_ata_readwrite): Likewise.
9319 2007-11-03  Marco Gerards  <marco@gnu.org>
9321         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9322         (grub_ata_pio_write): Likewise.
9323         (grub_ata_readwrite): Use `grub_error', instead of
9324         returning `grub_errno'.
9326 2007-11-03  Marco Gerards  <marco@gnu.org>
9328         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9329         grub_ata_pio_write once for every single sector, instead of for
9330         multiple sectors.
9332 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9334         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9336         * conf/i386-linuxbios.rmk: New file.
9338         * kern/i386/pc/hardware.c: Likewise.
9339         * term/i386/pc/at_keyboard.c: Likewise.
9340         * term/i386/pc/vga_text.c: Likewise.
9342         * include/grub/i386/linuxbios/boot.h: Likewise.
9343         * include/grub/i386/linuxbios/console.h: Likewise.
9344         * include/grub/i386/linuxbios/init.h: Likewise.
9345         * include/grub/i386/linuxbios/kernel.h: Likewise.
9346         * include/grub/i386/linuxbios/loader.h: Likewise.
9347         * include/grub/i386/linuxbios/memory.h: Likewise.
9348         * include/grub/i386/linuxbios/serial.h: Likewise.
9349         * include/grub/i386/linuxbios/time.h: Likewise.
9351         * kern/i386/linuxbios/init.c: Likewise.
9352         * kern/i386/linuxbios/startup.S: Likewise.
9353         * kern/i386/linuxbios/table.c: Likewise.
9355 2007-10-31  Marco Gerards  <marco@gnu.org>
9357         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9358         (ata_mod_SOURCES): New variable.
9359         (ata_mod_CFLAGS): Likewise.
9360         (ata_mod_LDFLAGS): Likewise.
9362         * disk/ata.c: New file.
9364         * include/grub/disk.h (grub_disk_dev_id): Add
9365         `GRUB_DISK_DEV_ATA_ID'.
9367 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9369         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9370         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9372         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9373         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9375         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9376         `<grub/types.h>'.
9378         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9380 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9382         * include/grub/types.h (ULONG_MAX): Define macro.
9384 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9386         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9387         `"../realmode.S"'.
9388         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9390 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9392         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9393         (pkgdata_MODULES): Add `biosdisk.mod'.
9394         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9395         variables.
9397         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9398         (grub_biosdisk_init): Replace with ...
9399         (GRUB_MOD_INIT(biosdisk)): ... this.
9400         (grub_biosdisk_fini): Replace with ...
9401         (GRUB_MOD_FINI(biosdisk)): ... this.
9403         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9404         (grub_machine_init): Remove call to grub_biosdisk_init().
9405         (grub_machine_fini): Remove call to grub_machine_fini().
9407         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9409 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9411         * include/grub/time.h: New file.
9412         * include/grub/i386/time.h: Likewise.
9413         * include/grub/powerpc/time.h: Likewise.
9414         * include/grub/sparc64/time.h: Likewise.
9416         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9417         instances to ...
9418         (KERNEL_MACHINE_TIME_HEADER): ... this.
9419         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9420         instances to ...
9421         (KERNEL_MACHINE_TIME_HEADER): ... this.
9422         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9423         instances to ...
9424         (KERNEL_MACHINE_TIME_HEADER): ... this.
9426         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9427         (grub_millisleep): New function.
9428         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9429         (grub_millisleep): New function.
9430         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9431         Remove `grub/machine/time.h' include.
9432         (grub_millisleep): New function.
9433         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9434         Remove `grub/machine/time.h' include.
9435         (grub_millisleep): New function.
9437         * include/grub/misc.h (grub_div_roundup): New function.
9439         * kern/misc.c: Include `<grub/time.h>'.
9440         (grub_millisleep_generic): New function.
9442         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9443         Add `time.h'.
9444         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9445         Add `time.h'.
9446         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9447         `machine/time.h'.  Add `time.h'.
9448         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9450 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9452         * include/grub/misc.h (grub_max): New function.
9454 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9456         * util/misc.c (grub_util_info): Call fflush() before returning.
9458 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9460         * genmk.rb (Image): Copy `extra_flags' from here ...
9461         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9463         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9464         to `argc' and `args' arguments.
9466 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9468         * kern/i386/loader.S: New file.
9470         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9471         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9472         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9473         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9474         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9475         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9476         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9477         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9478         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9479         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9480         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9481         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9482         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9483         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9485         * kern/i386/realmode.S: New file.
9487         * kern/i386/pc/startup.S (protstack): Moved from here ...
9488         * kern/i386/realmode.S (protstack)... to here.
9489         * kern/i386/pc/startup.S (gdt): Moved from here ...
9490         * kern/i386/realmode.S (gdt)... to here.
9491         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9492         * kern/i386/realmode.S (prot_to_real)... to here.
9494         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9495         `kern/i386/realmode.S'.
9497 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9499         * include/grub/i386/loader.h: New file.
9501         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9502         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9503         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9504         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9505         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9506         * include/grub/i386/loader.h (grub_linux_prot_size)
9507         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9508         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9509         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9510         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9512         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9514 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9516         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9517         filesystem when dev->disk is unset.
9518         Do probe for filesystem even when dev->disk->has_partitions is set.
9519         In case a filesystem is found, always report it.
9520         In case it isn't, if dev->disk->has_partitions is set, report that
9521         a partition table was found instead of reporting that no filesystem
9522         could be identified.
9524 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9526         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9527         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9529         * include/grub/types.h (grub_host_to_target16): New macro.
9530         (grub_host_to_target32): Likewise.
9531         (grub_host_to_target64): Likewise.
9532         (grub_target_to_host16): Likewise.
9533         (grub_target_to_host32): Likewise.
9534         (grub_target_to_host64): Likewise.
9536         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9537         Renamed from to ...
9538         (GRUB_MOD_ALIGN): ...this.  Update all users.
9540         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9541         grub_host_to_target32.
9542         Replace grub_be_to_cpu32 with grub_target_to_host32.
9543         (load_modules): Likewise.
9544         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9545         Replace grub_be_to_cpu32 with grub_target_to_host32.
9546         Replace grub_cpu_to_be16 with grub_host_to_target16.
9547         Replace grub_cpu_to_be32 grub_host_to_target32.
9549 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9551         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9552         * util/elf/grub-mkimage.c: ... here.
9554         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9555         `util/powerpc/ieee1275/grub-mkimage.c'.
9557 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9559         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9560         and make it easier to figure out.
9561         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9562         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9563         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9564         leave us with less than HEAP_MIN_SIZE total heap.
9565         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9567 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9569         * include/grub/i386/io.h: New file.
9570         * commands/i386/pc/play.c (inb): Removed.
9571         (outb): Removed.
9572         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9573         with grub_outb().
9574         * term/i386/pc/serial.c  (inb): Removed.
9575         (outb): Removed.
9576         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9577         with grub_outb().
9578         * term/i386/pc/vga.c  (inb): Removed.
9579         (outb): Removed.
9580         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9581         with grub_outb().
9583 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9585         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9586         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9587         Reported by Marcin Kurek.
9589 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9591         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9592         SmartFirmware version updates (as released by Sven Luther), and avoid
9593         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9594         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9595         known broken.
9597 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9599         From Hitoshi Ozeki:
9600         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9601         when merging two regions.
9603 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9605         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9606         * normal/completion.c (grub_normal_do_completion): Likewise.
9607         Reported by Hitoshi Ozeki.
9609 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9611         Do not use devices at boot in chainloading.
9613         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9614         (boot_part_addr): Likewise.
9615         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9616         with BOOT_DRIVE and BOOT_PART_ADDR.
9617         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9618         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9620 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9622         Patch from Simon Peter <dn.tlp@gmx.net>:
9623         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9624         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9625         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9626         util/i386/pc/grub-setup.c_DEPENDENCIES.
9627         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9628         util/grub-probe.c_DEPENDENCIES.
9629         * conf/powerpc-ieee1275.rmk: Likewise.
9631 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9633         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9634         to tell grub-mkdevicemap how to name devices.
9635         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9636         feature).
9638         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9639         util/i386/get_disk_name.c.
9640         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9641         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9642         util/ieee1275/get_disk_name.c.
9644         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9646         * DISTLIST: Add util/i386/get_disk_name.c and
9647         util/ieee1275/get_disk_name.c.
9649         * util/grub-mkdevicemap.c: Replace device naming logic with
9650         grub_util_get_disk_name() calls.
9652 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9654         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9655         (so that it works for both plural and singular quantities).
9657 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9659         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9660         so that [xz] isn't taken into account when determining order.
9662 2007-08-02  Marco Gerards  <marco@gnu.org>
9664         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9665         `include/multiboot2.h', `include/grub/elfload.h',
9666         `include/multiboot.h', `include/grub/multiboot.h',
9667         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9668         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9669         `kern/elf.c', `loader/multiboot_loader.c',
9670         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9671         `loader/i386/pc/multiboot2.c',
9672         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9673         `util/i386/pc/grub-mkrescue.in'.  Remove
9674         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9675         `include/grub/i386/pc/util/biosdisk.h' and
9676         `include/grub/powerpc/ieee1275/multiboot.h'.
9678 2007-08-02  Bean  <bean123ch@gmail.com>
9680         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9681         (ntfs_mod_SOURCES): New variable.
9682         (ntfs_mod_CFLAGS): Likewise.
9683         (ntfs_mod_LDFLAGS): Likewise.
9685         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9686         (grub_probe_SOURCES): Likewise.
9687         (grub_emu_SOURCES): Likewise.
9689         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9690         (grub_emu_SOURCES): Likewise.
9692         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9693         (grub_emu_SOURCES): Likewise.
9695         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9697         * fs/ntfs.c: New file.
9699 2007-08-02  Bean  <bean123ch@gmail.com>
9701         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9703         * file.h (grub_file): Likewise.
9705         * fshelp.h (grub_fshelp_read_file): Likewise.
9707         * util/i386/pc/grub-setup.c (setup): Likewise.
9708         (save_first_sector): Likewise.
9709         (save_blocklists): Likewise.
9711         * fs/affs.c (grub_affs_read_file): Likewise.
9713         * fs/ext2.c (grub_ext2_read_file): Likewise.
9715         * fs/fat.c (grub_fat_read_data): Likewise.
9717         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9719         * fs/hfs.c (grub_hfs_read_file): Likewise.
9721         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9723         * fs/jfs.c (grub_jfs_read_file): Likewise.
9725         * fs/minix.c (grub_minix_read_file): Likewise.
9727         * fs/sfs.c (grub_sfs_read_file): Likewise.
9729         * fs/ufs.c (grub_ufs_read_file): Likewise.
9731         * fs/xfs.c (grub_xfs_read_file): Likewise.
9733         * command/blocklist.c (read_blocklist): Likewise.
9734         (print_blocklist): Likewise.
9736 2007-08-02  Marco Gerards  <marco@gnu.org>
9738         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9739         `util/hostfs.c'.
9741         * disk/host.c: New file.
9743         * util/hostfs.c: Likewise.
9745         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9746         return `GRUB_ERR_BAD_FS'.
9747         * fs/sfs.c (grub_sfs_mount): Likewise.
9748         * fs/xfs.c (grub_xfs_mount): Likewise.
9750         * include/grub/disk.h (enum grub_disk_dev_id): Add
9751         `GRUB_DISK_DEVICE_HOST_ID'.
9753         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9755 2007-07-24  Jerone Young  <jerone@gmail.com>
9757         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9758         modules for compilation.
9759         * conf/powerpc-ieee1275.rmk: Likewise.
9761         * include/multiboot.h: Move multiboot definitions to one file. Rename
9762         many definitions to not get grub specific.
9763         * include/multiboot2.h: Create header with multiboot 2 definitions.
9764         * include/grub/multiboot.h: Header for grub specific function
9765         prototypes and definitions.
9766         * include/grub/multiboot2.h: Likewise.
9767         * include/grub/multiboot_loader.h: Likewise.
9768         * include/grub/i386/pc/multiboot.h: Removed.
9769         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9771         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9772         and 2 to allow for one multiboot and module commands.
9773         * loader/multiboot2.c: Add multiboot2 functionality.
9774         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9775         and definition names.
9776         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9777         2 functions.
9778         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9779         ieee1275 specific multiboot2 code.
9781         * kern/i386/pc/startup.S: Change headers and definition names for
9782         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9784 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9786         * geninitheader.sh: Process file specified in first parameter rather
9787         than hardcoding grub_modules_init.lst.
9788         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9789         than hardcoding grub_modules_init.h.
9791         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9792         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9793         grub_probe_init.[ch] and grub_setup_init.[ch].
9795         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9796         grub_modules_init.h with grub_emu_init.h.
9797         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9798         grub_probe_init.[ch] files.
9799         * conf/i386-efi.rmk: Likewise.
9800         * conf/i386-pc.rmk: Likewise.
9801         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9802         grub_setup_init.[ch] files.
9804         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9805         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9806         to initialize modules rather than a list of hardcoded functions.
9807         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9808         grub_init_all() to initialize modules rather than a list of hardcoded
9809         functions.
9811 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9813         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9814         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9816 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9818         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9819         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9820         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9821         flag when running on SmartFirmware.
9822         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9823         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9824         was set.
9826         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9827         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9828         rather than decreasing it.
9830         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9831         there's not enough space to do it, fail in the same way as when it
9832         can't be done because there are no partitions.
9834         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9835         when nvsetenv failed.
9837 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9839         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9840         because this rule is automatically generated.
9841         (grub-mkrescue): Removed for the same reason as above.
9843 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9845         Migrate to GNU General Public License Version 3.
9847         * COPYING: Replaced with the plain text version of GPLv3.
9849         * config.guess: Updated from gnulib.
9850         * config.sub: Likewise.
9852         * geninit.sh: Output a GPLv3 copyright notice.
9853         * geninitheader.sh: Likewise.
9854         * genmodsrc.sh: Likewise.
9855         * gensymlist.sh.in: Likewise.
9857         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9858         * boot/i386/pc/diskboot.S: Likewise.
9859         * boot/i386/pc/pxeboot.S: Likewise.
9860         * commands/blocklist.c: Likewise.
9861         * commands/boot.c: Likewise.
9862         * commands/cat.c: Likewise.
9863         * commands/cmp.c: Likewise.
9864         * commands/configfile.c: Likewise.
9865         * commands/echo.c: Likewise.
9866         * commands/help.c: Likewise.
9867         * commands/ls.c: Likewise.
9868         * commands/search.c: Likewise.
9869         * commands/terminal.c: Likewise.
9870         * commands/test.c: Likewise.
9871         * commands/videotest.c: Likewise.
9872         * commands/i386/cpuid.c: Likewise.
9873         * commands/i386/pc/halt.c: Likewise.
9874         * commands/i386/pc/play.c: Likewise.
9875         * commands/i386/pc/reboot.c: Likewise.
9876         * commands/i386/pc/vbeinfo.c: Likewise.
9877         * commands/i386/pc/vbetest.c: Likewise.
9878         * commands/ieee1275/halt.c: Likewise.
9879         * commands/ieee1275/reboot.c: Likewise.
9880         * commands/ieee1275/suspend.c: Likewise.
9881         * disk/loopback.c: Likewise.
9882         * disk/lvm.c: Likewise.
9883         * disk/raid.c: Likewise.
9884         * disk/efi/efidisk.c: Likewise.
9885         * disk/i386/pc/biosdisk.c: Likewise.
9886         * disk/ieee1275/ofdisk.c: Likewise.
9887         * font/manager.c: Likewise.
9888         * fs/affs.c: Likewise.
9889         * fs/ext2.c: Likewise.
9890         * fs/fat.c: Likewise.
9891         * fs/fshelp.c: Likewise.
9892         * fs/hfs.c: Likewise.
9893         * fs/hfsplus.c: Likewise.
9894         * fs/iso9660.c: Likewise.
9895         * fs/jfs.c: Likewise.
9896         * fs/minix.c: Likewise.
9897         * fs/sfs.c: Likewise.
9898         * fs/ufs.c: Likewise.
9899         * fs/xfs.c: Likewise.
9900         * hello/hello.c: Likewise.
9901         * include/grub/acorn_filecore.h: Likewise.
9902         * include/grub/arg.h: Likewise.
9903         * include/grub/bitmap.h: Likewise.
9904         * include/grub/boot.h: Likewise.
9905         * include/grub/cache.h: Likewise.
9906         * include/grub/device.h: Likewise.
9907         * include/grub/disk.h: Likewise.
9908         * include/grub/dl.h: Likewise.
9909         * include/grub/elfload.h: Likewise.
9910         * include/grub/env.h: Likewise.
9911         * include/grub/err.h: Likewise.
9912         * include/grub/file.h: Likewise.
9913         * include/grub/font.h: Likewise.
9914         * include/grub/fs.h: Likewise.
9915         * include/grub/fshelp.h: Likewise.
9916         * include/grub/gzio.h: Likewise.
9917         * include/grub/hfs.h: Likewise.
9918         * include/grub/kernel.h: Likewise.
9919         * include/grub/loader.h: Likewise.
9920         * include/grub/lvm.h: Likewise.
9921         * include/grub/misc.h: Likewise.
9922         * include/grub/mm.h: Likewise.
9923         * include/grub/net.h: Likewise.
9924         * include/grub/normal.h: Likewise.
9925         * include/grub/parser.h: Likewise.
9926         * include/grub/partition.h: Likewise.
9927         * include/grub/pc_partition.h: Likewise.
9928         * include/grub/raid.h: Likewise.
9929         * include/grub/rescue.h: Likewise.
9930         * include/grub/script.h: Likewise.
9931         * include/grub/setjmp.h: Likewise.
9932         * include/grub/symbol.h: Likewise.
9933         * include/grub/term.h: Likewise.
9934         * include/grub/terminfo.h: Likewise.
9935         * include/grub/tparm.h: Likewise.
9936         * include/grub/types.h: Likewise.
9937         * include/grub/video.h: Likewise.
9938         * include/grub/efi/api.h: Likewise.
9939         * include/grub/efi/chainloader.h: Likewise.
9940         * include/grub/efi/console.h: Likewise.
9941         * include/grub/efi/console_control.h: Likewise.
9942         * include/grub/efi/disk.h: Likewise.
9943         * include/grub/efi/efi.h: Likewise.
9944         * include/grub/efi/pe32.h: Likewise.
9945         * include/grub/efi/time.h: Likewise.
9946         * include/grub/i386/linux.h: Likewise.
9947         * include/grub/i386/setjmp.h: Likewise.
9948         * include/grub/i386/types.h: Likewise.
9949         * include/grub/i386/efi/kernel.h: Likewise.
9950         * include/grub/i386/efi/loader.h: Likewise.
9951         * include/grub/i386/efi/time.h: Likewise.
9952         * include/grub/i386/pc/biosdisk.h: Likewise.
9953         * include/grub/i386/pc/boot.h: Likewise.
9954         * include/grub/i386/pc/chainloader.h: Likewise.
9955         * include/grub/i386/pc/console.h: Likewise.
9956         * include/grub/i386/pc/init.h: Likewise.
9957         * include/grub/i386/pc/kernel.h: Likewise.
9958         * include/grub/i386/pc/loader.h: Likewise.
9959         * include/grub/i386/pc/memory.h: Likewise.
9960         * include/grub/i386/pc/multiboot.h: Likewise.
9961         * include/grub/i386/pc/serial.h: Likewise.
9962         * include/grub/i386/pc/time.h: Likewise.
9963         * include/grub/i386/pc/vbe.h: Likewise.
9964         * include/grub/i386/pc/vbeblit.h: Likewise.
9965         * include/grub/i386/pc/vbefill.h: Likewise.
9966         * include/grub/i386/pc/vbeutil.h: Likewise.
9967         * include/grub/i386/pc/vga.h: Likewise.
9968         * include/grub/ieee1275/ieee1275.h: Likewise.
9969         * include/grub/ieee1275/ofdisk.h: Likewise.
9970         * include/grub/powerpc/libgcc.h: Likewise.
9971         * include/grub/powerpc/setjmp.h: Likewise.
9972         * include/grub/powerpc/types.h: Likewise.
9973         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9974         * include/grub/powerpc/ieee1275/console.h: Likewise.
9975         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9976         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9977         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9978         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9979         * include/grub/powerpc/ieee1275/time.h: Likewise.
9980         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9981         * include/grub/sparc64/libgcc.h: Likewise.
9982         * include/grub/sparc64/setjmp.h: Likewise.
9983         * include/grub/sparc64/types.h: Likewise.
9984         * include/grub/sparc64/ieee1275/console.h: Likewise.
9985         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9986         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9987         * include/grub/sparc64/ieee1275/time.h: Likewise.
9988         * include/grub/util/biosdisk.h: Likewise.
9989         * include/grub/util/getroot.h: Likewise.
9990         * include/grub/util/lvm.h: Likewise.
9991         * include/grub/util/misc.h: Likewise.
9992         * include/grub/util/raid.h: Likewise.
9993         * include/grub/util/resolve.h: Likewise.
9994         * io/gzio.c: Likewise.
9995         * kern/device.c: Likewise.
9996         * kern/disk.c: Likewise.
9997         * kern/dl.c: Likewise.
9998         * kern/elf.c: Likewise.
9999         * kern/env.c: Likewise.
10000         * kern/err.c: Likewise.
10001         * kern/file.c: Likewise.
10002         * kern/fs.c: Likewise.
10003         * kern/loader.c: Likewise.
10004         * kern/main.c: Likewise.
10005         * kern/misc.c: Likewise.
10006         * kern/mm.c: Likewise.
10007         * kern/parser.c: Likewise.
10008         * kern/partition.c: Likewise.
10009         * kern/rescue.c: Likewise.
10010         * kern/term.c: Likewise.
10011         * kern/efi/efi.c: Likewise.
10012         * kern/efi/init.c: Likewise.
10013         * kern/efi/mm.c: Likewise.
10014         * kern/i386/dl.c: Likewise.
10015         * kern/i386/efi/init.c: Likewise.
10016         * kern/i386/efi/startup.S: Likewise.
10017         * kern/i386/pc/init.c: Likewise.
10018         * kern/i386/pc/lzo1x.S: Likewise.
10019         * kern/i386/pc/startup.S: Likewise.
10020         * kern/ieee1275/ieee1275.c: Likewise.
10021         * kern/powerpc/cache.S: Likewise.
10022         * kern/powerpc/dl.c: Likewise.
10023         * kern/powerpc/ieee1275/cmain.c: Likewise.
10024         * kern/powerpc/ieee1275/crt0.S: Likewise.
10025         * kern/powerpc/ieee1275/init.c: Likewise.
10026         * kern/powerpc/ieee1275/openfw.c: Likewise.
10027         * kern/sparc64/cache.S: Likewise.
10028         * kern/sparc64/dl.c: Likewise.
10029         * kern/sparc64/ieee1275/init.c: Likewise.
10030         * kern/sparc64/ieee1275/openfw.c: Likewise.
10031         * loader/efi/chainloader.c: Likewise.
10032         * loader/efi/chainloader_normal.c: Likewise.
10033         * loader/i386/efi/linux.c: Likewise.
10034         * loader/i386/efi/linux_normal.c: Likewise.
10035         * loader/i386/pc/chainloader.c: Likewise.
10036         * loader/i386/pc/chainloader_normal.c: Likewise.
10037         * loader/i386/pc/linux.c: Likewise.
10038         * loader/i386/pc/linux_normal.c: Likewise.
10039         * loader/i386/pc/multiboot.c: Likewise.
10040         * loader/i386/pc/multiboot_normal.c: Likewise.
10041         * loader/powerpc/ieee1275/linux.c: Likewise.
10042         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10043         * normal/arg.c: Likewise.
10044         * normal/cmdline.c: Likewise.
10045         * normal/command.c: Likewise.
10046         * normal/completion.c: Likewise.
10047         * normal/execute.c: Likewise.
10048         * normal/function.c: Likewise.
10049         * normal/lexer.c: Likewise.
10050         * normal/main.c: Likewise.
10051         * normal/menu.c: Likewise.
10052         * normal/menu_entry.c: Likewise.
10053         * normal/misc.c: Likewise.
10054         * normal/parser.y: Likewise.
10055         * normal/script.c: Likewise.
10056         * normal/i386/setjmp.S: Likewise.
10057         * normal/powerpc/setjmp.S: Likewise.
10058         * normal/sparc64/setjmp.S: Likewise.
10059         * partmap/acorn.c: Likewise.
10060         * partmap/amiga.c: Likewise.
10061         * partmap/apple.c: Likewise.
10062         * partmap/gpt.c: Likewise.
10063         * partmap/pc.c: Likewise.
10064         * partmap/sun.c: Likewise.
10065         * term/gfxterm.c: Likewise.
10066         * term/terminfo.c: Likewise.
10067         * term/efi/console.c: Likewise.
10068         * term/i386/pc/console.c: Likewise.
10069         * term/i386/pc/serial.c: Likewise.
10070         * term/i386/pc/vesafb.c: Likewise.
10071         * term/i386/pc/vga.c: Likewise.
10072         * term/ieee1275/ofconsole.c: Likewise.
10073         * util/biosdisk.c: Likewise.
10074         * util/console.c: Likewise.
10075         * util/genmoddep.c: Likewise.
10076         * util/getroot.c: Likewise.
10077         * util/grub-emu.c: Likewise.
10078         * util/grub-mkdevicemap.c: Likewise.
10079         * util/grub-probe.c: Likewise.
10080         * util/lvm.c: Likewise.
10081         * util/misc.c: Likewise.
10082         * util/raid.c: Likewise.
10083         * util/resolve.c: Likewise.
10084         * util/update-grub.in: Likewise.
10085         * util/update-grub_lib.in: Likewise.
10086         * util/grub.d/00_header.in: Likewise.
10087         * util/grub.d/10_hurd.in: Likewise.
10088         * util/grub.d/10_linux.in: Likewise.
10089         * util/i386/efi/grub-install.in: Likewise.
10090         * util/i386/efi/grub-mkimage.c: Likewise.
10091         * util/i386/pc/grub-install.in: Likewise.
10092         * util/i386/pc/grub-mkimage.c: Likewise.
10093         * util/i386/pc/grub-mkrescue.in: Likewise.
10094         * util/i386/pc/grub-setup.c: Likewise.
10095         * util/i386/pc/misc.c: Likewise.
10096         * util/powerpc/ieee1275/grub-install.in: Likewise.
10097         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10098         * util/powerpc/ieee1275/misc.c: Likewise.
10099         * video/bitmap.c: Likewise.
10100         * video/video.c: Likewise.
10101         * video/i386/pc/vbe.c: Likewise.
10102         * video/i386/pc/vbeblit.c: Likewise.
10103         * video/i386/pc/vbefill.c: Likewise.
10104         * video/i386/pc/vbeutil.c: Likewise.
10105         * video/readers/tga.c: Likewise.
10107 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10109         * conf/i386-efi.rmk: Replace obsolete reference to
10110         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10111         with util/getroot.c.
10112         * conf/powerpc-ieee1275.rmk: Likewise.
10113         * conf/sparc64-ieee1275.rmk: Likewise.
10115         * util/grub-emu.c (main): Fix unchecked pointer handling.
10117 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10119         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10120         invocation to fail, in order to support partition-less media.
10122         * util/i386/pc/grub-install.in: Likewise.
10124         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10125         which fs or partmap modules are needed (akin to its sister scripts).
10127         Also use grub-probe to get rid of unportable /proc/mounts check.
10129         Print the same informational message that the other scripts do, before
10130         exiting.
10132 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10134         * util/update-grub_lib.in (font_path): New function.  Determine whether
10135         a font file can be found and, if so, echo the GRUB path to it.
10137         * util/update-grub.in: Handle multiple terminals depending on user
10138         input, platform availability and font file presence.  Propagate
10139         variables of our findings to /etc/grub.d/ children.
10141         * util/grub.d/00_header.in: Handle multiple terminals, based on
10142         environment setup by update-grub.
10144 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10146         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10148 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10150         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10151         indicate end of data section in kernel image.
10152         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10153         GRUB_KERNEL_MACHINE_DATA_END.
10155         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10156         space for it.
10157         * kern/i386/efi/startup.S: Likewise.
10159         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10160         during image generation.  Implement --prefix option to override this
10161         patch.
10162         * util/i386/efi/grub-mkimage.c: Likewise.
10164         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10165         code to make path relative to its root into a separate function.
10167         * util/i386/pc/grub-install.in: Use newly provided
10168         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10169         pass the result to grub-install --prefix.
10171 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10173         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10174         DEFAULT_DEVICE_MAP.
10175         * util/grub-emu.c: Use above definitions from misc.h instead of
10176         defining them.
10177         * util/grub-mkdevicemap.c: Likewise.
10178         * util/i386/pc/grub-setup.c: Likewise.
10179         * util/grub-probe.c: Likewise.
10180         (probe): Abort with grub_util_error() when either
10181         grub_guess_root_device or grub_util_get_grub_dev fails.
10183 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10185         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10186         "pager" assignment.
10187         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10188         "pcdata".
10189         * util/grub-probe.c (probe): Likewise for "drive_name".
10191 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10193         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10194         not just the cdrom one.
10196 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10198         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10199         Add --pkglibdir=DIR option to override pkglibdir.
10200         Mention --image-type=TYPE in help output.
10201         Fix --grub-mkimage (it was a no-op).
10202         Abort gracefully when no parameter is given.
10204 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10206         * util/i386/pc/grub-mkrescue.in: New file.
10207         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10208         * Makefile.in: Handle bin_SCRIPTS.
10210 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10212         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10213         list of video modes.
10215 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10217         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10218         file doesn't exist, or if it is in a filesystem grub can't read.
10220         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10221         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10222         header comment to fit in 80 columns when the variables are resolved.
10224         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10225         could be identified by update-grub.  Remove redundant check for
10226         unifont.pff existence (since convert_system_path_to_grub_path now
10227         handles that).
10229 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10231         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10233         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10235         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10237 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10239         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10241         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10242         grub_apple_partition_map_fini.
10244         * util/biosdisk.c
10245         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10246         to access >2 TiB disks).
10248         Print disk->total_sectors with %llu instead of %lu, since this
10249         variable is always 64-bit (prevents wrong disk size from being displayed
10250         on either >2 TiB disk or big-endian CPU).
10252         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10253         into a generic case that supports all (sane) partition maps.
10255         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10256         breaks big-endian.
10258         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10259         and grub_apple_partition_map_fini() after that.
10261 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10263         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10265         * util/grub.d/00_header.in: Only enable gfxterm when
10266         convert_system_path_to_grub_path() succeeds.
10268 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10270         * util/update-grub_lib.in: New file.
10271         * DISTLIST: Add update-grub_lib.in.
10272         * conf/common.rmk: Generate update-grub_lib and install it in
10273         $(lib_DATA).
10274         * Makefile.in: Add install routine for $(lib_DATA).
10276         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10277         function provided by update-grub_lib to support arbitrary paths of
10278         unifont.pff.
10279         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10280         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10282 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10284         * commands/i386/cpuid.c: New module.
10285         * DISTLIST: Add it.
10286         * conf/i386-efi.rmk: Enable cpuid.mod.
10287         * conf/i386-pc.rmk: Likewise.
10289 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10291         * kern/disk.c (grub_disk_read): Check return value of
10292         grub_realloc().
10294 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10296         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10297         arrays.
10298         * disk/raid.c (grub_raid_open): Likewise.
10300 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10302         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10303         stack instead of on the heap.
10305         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10306         before doing a read on it.
10308         * configure.ac: Only use -fno-stack-protector for the target
10309         environment.
10311 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10313         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10314         __attribute_ ((unused)) to mode_type argument.
10316         * util/getroot.c (grub_guess_root_device): Fix #endif.
10318         * kern/misc.c (memcmp): Fix prototype.
10320         * include/grub/partition.h [GRUB_UTIL]
10321         (grub_gpt_partition_map_init): Add prototype.
10322         (grub_gpt_partition_map_fini): Likewise.
10324         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10325         at the right place.
10327         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10328         (grub_fat_read_data): Likewise.
10329         (grub_fat_find_dir): Likewise.
10331         * font/manager.c (find_glyph): Make table a const.
10332         (grub_font_get_glyph): Remove bitmap from if statement.
10334 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10336         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10337         code, first search for device in /dev/mapper, then in /dev.
10338         (grub_util_get_grub_dev): New function.
10339         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10340         prototype.
10341         * util/grub-probe.c (probe): Remove check for RAID, call
10342         grub_util_get_grub_dev() instead of
10343         grub_util_biosdisk_get_grub_dev().
10344         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10345         grub_util_biosdisk_get_grub_dev().
10346         * util/i386/pc/grub-setup.c (main): Likewise.
10348 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10350         * DISTLIST: Update for the latest changes.
10351         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10352         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10353         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10354         grub/util/biosdisk.h.
10355         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10356         grub/util/biosdisk.h.
10358 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10360         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10362 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10364         * util/i386/efi/grub-install.in: New.
10365         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10366         newly added grub-install.
10367         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10368         include.
10369         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10370         grub/util/biosdisk.h.
10371         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10372         grub/util/biosdisk.h.
10374 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10376         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10377         * include/grub/util/biosdisk.h: ... here.
10378         * util/i386/pc/biosdisk.c: Moved to ...
10379         * util/biosdisk.c: ... here.
10380         * util/i386/pc/getroot.c: Moved to ...
10381         * util/getroot.c: ... here.
10382         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10383         * util/grub-mkdevicemap.c: ... here.
10384         * util/i386/pc/grub-probe.c: Moved to ...
10385         * util/grub-probe.c: ... here.
10387 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10389         * util/update-grub.in: Remove duplicated line in grub.cfg header
10390         message.
10392 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10394         * util/update-grub.in: Fix a few assumptions about the devices holding
10395         /, /boot and /boot/grub being the same.
10396         * util/grub.d/00_header.in: Likewise.
10397         * util/grub.d/10_hurd.in: Likewise.
10398         * util/grub.d/10_linux.in: Likewise.
10400         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10401         patterns.  Use that to define the `.old' suffix as older than `'.
10403         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10405         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10406         the grub.cfg header message.
10408 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10410         * util/update-grub.in: Create device.map if it doesn't already exist,
10411         before attempting to run grub-probe.
10412         Check for grub-probe and grub-mkdevicemap with the same code
10413         grub-install is using.
10414         Remove test mode.
10416 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10418         * Makefile.in: Add the datarootdir autoconf variable.
10420 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10422         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10423         fail gracefully if dev->disk->partition == NULL.
10425 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10427         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10428         determine partition map module.
10429         * util/i386/pc/grub-install.in: Use this feature to decide which
10430         partition module to load, instead of hardcoding pc and gpt.
10432 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10434         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10435         source directory differs from build directory.
10437 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10439         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10440         initialisation.
10442 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10444         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10446 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10448         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10449         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10451 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10453         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10454         (grub_probe_SOURCES): Likewise.
10455         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10456         GPT and initialize dos_part and bsd_part accordingly.
10457         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10458         install_bsd_part.
10459         (main): Activate gpt module for use during partition identification,
10460         and deactivate it afterwards.
10461         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10462         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10463         partition identification, and deactivate it afterwards.
10465 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10467         * term/i386/pc/console.c (grub_console_fini): Call
10468         grub_term_set_current() before grub_term_unregister().
10470 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10472         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10473         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10474         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10475         and update-grub_DATA.
10476         * conf/common.rmk: Build and install update-grub components.
10477         * conf/common.mk: Regenerate.
10478         * util/update-grub.in: New.  Core of update-grub.
10479         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10480         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10481         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10482         * util/grub.d/README: New.  Document grub.d directory layout.
10484 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10486         * util/grub-emu.c: Move initialization functions
10487         grub_util_biosdisk_init() and grub_init_all() before
10488         grub_util_biosdisk_get_grub_dev(), which relies on them.
10490 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10492         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10493         it is used later.
10495 2007-04-18  Jerone Young  <jerone@gmail.com>
10497         * kernel/elf.c: Add missing parenthesis for conditional statement
10498         stanza.
10500 2007-04-10  Jerone Young  <jerone@gmail.com>
10502         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10503         continue on and look for device node with real device name.
10505 2007-04-10  Jerone Young  <jerone@gmail.com>
10507         * configure.ac: Add argument for autoconf to use transformation
10508         ability.
10509         * Makefile.in: Add autoconf package transformation code.
10510         * util/i386/pc/grub-install.in: Likewise.
10511         * util/powerpc/ieee1275/grub-install.in: Likewise.
10513 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10515         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10516         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10517         (EXT2_REVISION): Likewise.
10518         (EXT2_INODE_SIZE): Likewise.
10519         (struct grub_ext2_block_group): Added a missing member
10520         "used_dirs".
10521         (grub_ext2_read_inode): Divide by the inode size in a superblock
10522         instead of 128 to obtain INODES_PER_BLOCK.
10523         Use the macro EXT2_INODE_SIZE instead of directly using
10524         SBLOCK->INODE_SIZE.
10526 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10528         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10529         superblock instead of the structure size to compute an
10530         offset. This fixes the problem that GRUB could not read a
10531         filesystem when inode size is different from 128-byte.
10533 2007-03-05  Marco Gerards  <marco@gnu.org>
10535         * normal/main.c (read_config_file): When "menu" is not set, create
10536         an initial context.
10538 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10540         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10541         (HEAP_LIMIT): New macro.
10542         (grub_claim_heap): Claim memory up to `heaplimit'.
10544 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10546         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10547         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10548         (_start): Likewise.
10549         (grub_arch_modules_addr): Return address after `_end'.
10550         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10551         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10552         (add_segments): Calculate `_end' from phdr size and location.
10553         (ALIGN_UP): Moved to ...
10554         * include/grub/misc.h: here.
10555         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10556         New macro.
10557         (GRUB_IEEE1275_MODULE_BASE): Removed.
10559 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10561         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10562         loop boundary.
10564 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10566         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10567         All users updated.
10568         (grub_elf64_load_hook_t): Likewise.
10569         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10570         debug output.
10572 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10574         * kern/mm.c: Update copyright.
10575         (grub_mm_debug): Correct syntax error.
10576         (grub_mm_dump_free): New function.
10577         (grub_debug_free): Call `grub_free'.
10578         * include/grub/mm.h: Update copyright.
10579         (grub_mm_dump_free): Add declaration.
10581 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10583         * include/grub/ieee1275/ieee1275.h: Update copyright.
10584         * kern/powerpc/ieee1275/init.c: Likewise.
10585         * kern/powerpc/ieee1275/openfw.c: Likewise.
10587         * loader/powerpc/ieee1275/linux.c: Likewise.
10588         * include/grub/elfload.h: Likewise.
10589         * kern/elf.c: Likewise.
10590         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10591         callers.
10592         (grub_elf64_load): Likewise.
10593         (grub_elf32_load_segment): Move to a nested function.
10594         (grub_elf64_load_segment): Likewise.
10596 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10598         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10599         prototype.
10600         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10601         (grub_heap_len): Likewise.
10602         (HEAP_SIZE): New macro.
10603         (grub_claim_heap): New function.
10604         (grub_machine_init): Don't claim heap directly.  Call
10605         `grub_claim_heap'.
10606         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10607         (grub_available_iterate): New function.
10609 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10611         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10612         * configure.ac: Use it for testing the HOST and TARGET compilers.
10614 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10616         * Makefile.in (enable_grub_emu): New variable.
10617         * configure.ac (--enable-grub-emu): New option.
10618         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10619         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10620         * conf/i386-pc.rmk: Likewise.
10621         * conf/powerpc-ieee1275.rmk: Likewise.
10622         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10624 2006-12-12  Marco Gerards  <marco@gnu.org>
10626         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10628         * kern/env.c (grub_env_unset): Don't free the member `value' when
10629         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10630         pointer.
10632         * normal/main.c (current_menu): Removed.
10633         (free_menu): Unset the `menu' environment variable.
10634         (grub_normal_menu_addentry): Make use of the environment variable
10635         `menu', instead of using the global `current_menu'.  Allocate
10636         memory for the sourcecode of this entry.
10637         (read_config_file): New argument `nested', changed all callers.
10638         Only in the case of a new context, initialize a new menu.  Set the
10639         `menu' environment variable.
10640         (grub_normal_execute): Don't set and unset the environment
10641         variable `menu' here anymore.  Only free the menu when leaving the
10642         context.
10644         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10645         leak.
10647 2006-12-11  Marco Gerards  <marco@gnu.org>
10649         * normal/menu_entry.c (run): Fix off by one bug so the last line
10650         is executed.  Move the loader check to outside the loop.
10652 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10654         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10656 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10658         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10659         the number of sectors.  Reported by Andrey Shuvikov
10660         <mr_hyro@yahoo.com>.
10662 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10664         * kern/disk.c (grub_disk_read): When there is a read error, always
10665         try to read only the necessary data.
10667         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10668         disk/raid.c.
10669         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10670         prototype.
10671         [GRUB_UTIL] (grub_raid_fini): Likewise.
10672         [GRUB_UTIL] (grub_lvm_init): Likewise.
10673         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10674         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10675         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10676         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10677         and grub_raid_fini().
10679 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10681         * include/grub/types.h (__unused): Rename to UNUSED.
10682         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10683         (grub_elf64_size): Likewise.
10685 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10687         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10688         grub_error_push and grub_error_pop in the error-handling path.
10689         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10690         length.
10692 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10694         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10695         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10696         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10697         (kernel_elf_SOURCES): Likewise.
10698         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10699         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10700         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10701         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10702         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10703         (elf_mod_SOURCES): New variable.
10704         (elf_mod_CFLAGS): Likewise.
10705         (elf_mod_LDFLAGS): Likewise.
10706         * include/grub/types.h (__unused): New macro.
10707         * include/grub/elfload.h: New file.
10708         * kern/elf.c: Likewise.
10709         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10710         (ELF32_LOADMASK): New macro.
10711         (ELF64_LOADMASK): Likewise.
10712         (vmlinux): Removed.
10713         (grub_linux_load32): New function.
10714         (grub_linux_load64): Likewise.
10715         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10716         Use grub_elf_t instead of grub_file_t.
10718 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10720         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10721         `catch_result' to struct set_color_args.
10723 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10725         * normal/menu.c: Include grub/script.h.
10726         * normal/menu_entry.c: Likewise.
10727         * include/grub/normal.h: Do not include grub/script.h.
10729 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10731         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10733 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10735         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10736         disk.
10737         (grub_disk_close): Print debug messages when closing a disk.
10738         (grub_disk_read): Print debug messages when disk read fails.
10739         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10740         filesystem type.
10741         * kern/partition.c: Include misc.h.
10742         (grub_partition_iterate): Print debug messages when detecting
10743         partition type.
10745 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10747         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10748         is negative.
10749         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10751 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10753         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10754         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10756 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10758         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10759         instead of sizeof(lv). Patch by Michael Guntsche.
10761 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10763         * disk/lvm.c: Rename VGS to VG_LIST.
10764         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10765         (grub_lvm_open): Likewise.
10766         Thanks to Michael Guntsche for finding this bug.
10768 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10770         * configure.ac (AC_INIT): Bumped to 1.95.
10772 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10774         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10775         with "/dev/.static/dev/md".
10777 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10779         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10780         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10781         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10782         DRIVE_NAME are always freed.
10784         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10785         DOS_PART, as a DOS partition is counted from one instead of zero
10786         now. Reported by Robert Millan.
10788 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10790         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10791         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10792         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10793         string returned by grub_guess_root_device.
10794         * util/i386/pc/grub-setup.c: Likewise.
10795         * util/i386/pc/grub-probefs.c: Likewise.
10797         * util/i386/pc/grub-probefs.c: Rename to ...
10798         * util/i386/pc/grub-probe.c: ... this.
10799         * DISTLIST: Remove grub-probefs, add grub-probe.
10800         * conf/i386-efi.rmk: Likewise.
10801         * conf/i386-pc.rmk: Likewise.
10802         * util/i386/pc/grub-install.in: Likewise.
10804         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10805         choose which information we want to print.
10807 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10809         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10810         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10811         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10812         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10813         video/readers/tga.c and video/i386/pc/vbeutil.c.
10815 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10817         Added support for RAID and LVM.
10819         * disk/lvm.c: New file.
10820         * disk/raid.c: Likewise.
10821         * include/grub/lvm.h: Likewise.
10822         * include/grub/raid.h: Likewise.
10823         * include/grub/util/lvm.h: Likewise.
10824         * include/grub/util/raid.h: Likewise.
10825         * util/lvm.c: Likewise.
10826         * util/raid.c: Likewise.
10828         * include/grub/disk.h (grub_disk_dev_id): Add
10829         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10830         (grub_disk_get_size): New prototype.
10831         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10832         returns a partition.
10833         (grub_disk_get_size): New function.
10835         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10836         verbatim if grub_install_dos_part is -2.
10838         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10839         and LVM devices.
10841         * util/i386/pc/grub-setup.c (setup): New argument
10842         MUST_EMBED. Force embedding of GRUB when the argument is
10843         true. Close FILE before returning.
10844         (main): Add support for RAID and LVM.
10846         * conf/common.rmk: Add RAID and LVM modules.
10847         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10848         util/lvm.c.
10849         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10851         * kern/misc.c (grub_strstr): New function.
10852         * include/grub/misc.h (grub_strstr): New prototype.
10854 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10856         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10858 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10860         * kern/misc.c (grub_strtoull): Guess the base only if not
10861         specified.
10863 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10865         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10866         PowerMac support.
10868 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10870         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10872         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10873         Remove `flags' argument.  All callers changed.
10874         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10875         (IEEE1275_IHANDLE_INVALID): New variable.
10876         (IEEE1275_CELL_INVALID): New variable.
10877         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10878         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10879         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10880         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10881         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10882         codes from Open Firmware.  All callers updated.
10883         (grub_ieee1275_next_property): Directly return Open Firmware return
10884         code.
10885         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10886         Standardize error checking from `grub_ieee1275_get_property'.
10887         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10888         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10890 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10892         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10893         `instance_to_package_args' to `instance_to_path_args'.
10895         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10896         `grub_ieee1275_chosen'.
10898         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10899         `grub_ieee1275_interpret'.
10901 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10903         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10905 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10907         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10908         (__cmpdi): Likewise.
10910         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10911         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10912         `grub_ssize_t'.
10914         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10916         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10917         to type `grub_ssize_t'.
10918         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10920 2006-09-22  Marco Gerards  <marco@gnu.org>
10922         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10923         newlines.
10925 2006-09-22  Marco Gerards  <marco@gnu.org>
10927         * commands/echo.c: New file.
10929         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10931         * conf/common.rmk (echo_mod_SOURCES): New variable.
10932         (echo_mod_CFLAGS): Likewise.
10933         (echo_mod_LDFLAGS): Likewise.
10935 2006-09-22  Marco Gerards  <marco@gnu.org>
10937         * normal/main.c (get_line): Malloc memory instead of using
10938         preallocated memory.  Removed the arguments `cmdline' and
10939         `max_len'.  Updated all callers.
10941 2006-09-22  Marco Gerards  <marco@gnu.org>
10943         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10944         (normal_mod_DEPENDENCIES): Likewise.
10946         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10947         (normal_mod_DEPENDENCIES): Likewise.
10949         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10951 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10953         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10954         programs.
10955         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10956         (normal_mod_DEPENDENCIES): Likewise.
10957         * conf/i386-pc.mk: Regenerate.
10958         * conf/i386-efi.mk: Likewise
10959         * conf/common.mk: Likewise.
10960         * conf/powerpc-ieee1275.mk: Likewise.
10961         * conf/sparc64-ieee1275.mk: Likewise.
10963 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10965         Sync with i386 version.
10966         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10967         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10969 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10971         Import from GRUB Legacy (lib/device.c):
10972         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10973         (init_device_map) [__linux__]: Add support for I2O devices.
10975 2006-09-14  Marco Gerards  <marco@gnu.org>
10977         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10978         `-melf_i386'.
10980 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10982         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10983         /boot/grub/*.lst.
10985         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10987         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10988         before adding it to device.map.
10990 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10992         * genmk.rb: Let GCC generate dependencies the first time it
10993         compiles a file; using the -MD option.
10994         * conf/common.mk: Regenerate.
10995         * conf/i386-pc.mk: Likewise.
10996         * conf/i386-efi.mk: Likewise.
10997         * conf/powerpc-ieee1275.mk: Likewise.
10998         * conf/sparc64-ieee1275.mk: Likewise.
11000 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11002         Move the prototypes of grub_setjmp and grub_longjmp to
11003         cpu/setjmp.h, so that each architecture may specify different
11004         attributes.
11006         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11007         (grub_longjmp): Likewise.
11008         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11009         (grub_longjmp): Likewise.
11010         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11011         (grub_longjmp): Likewise.
11013         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11014         [!GRUB_UTIL] (grub_longjmp): Removed.
11016 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11018         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11019         "color!" method does not return any value.
11021 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11023         * include/grub/bitmap.h: New file.
11025         * include/grub/i386/pc/vbeutil.h: Likewise.
11027         * video/bitmap.c: Likewise.
11029         * video/readers/tga.c: Likewise.
11031         * video/i386/pc/vbeutil.c: Likewise.
11033         * commands/videotest.c: Code cleanup and updated to reflect to new
11034         video API.
11036         * term/gfxterm.c: Likewise.
11038         * video/video.c: Likewise.
11040         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11041         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11042         (bitmap_mod_SOURCES): New entry.
11043         (bitmap_mod_CFLAGS): Likewise.
11044         (bitmap_mod_LDFLAGS): Likewise.
11045         (tga_mod_SOURCES): Likewise.
11046         (tga_mod_CFLAGS): Likewise.
11047         (tga_mod_LDFLAGS): Likewise.
11049         * include/grub/video.h (grub_video_blit_operators): New enum type.
11050         (grub_video_render_target): Changed as forward declaration and moved
11051         actual definition to be video driver specific.
11052         (grub_video_adapter.blit_bitmap): Added blitting operator.
11053         (grub_video_adapter.blit_render_target): Likewise.
11054         (grub_video_blit_bitmap): Likewise.
11055         (grub_video_blit_render_target): Likewise.
11057         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11058         driver specific render target definition.
11059         (grub_video_vbe_map_rgba): Added driver internal helper.
11060         (grub_video_vbe_unmap_color): Updated to use
11061         grub_video_i386_vbeblit_info.
11062         (grub_video_vbe_get_video_ptr): Likewise.
11064         * include/grub/i386/pc/vbeblit.h
11065         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11066         grub_video_i386_vbeblit_info.
11067         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11068         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11069         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11070         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11071         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11072         (grub_video_i386_vbeblit_index_index): Likewise.
11073         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11074         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11075         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11076         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11077         operator.
11078         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11079         operator.
11081         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11082         include/grub/i386/pc/vbeblit.h.
11084         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11085         Updated to use grub_video_i386_vbeblit_info.
11086         (grub_video_i386_vbefill_R8G8B8): Likewise.
11087         (grub_video_i386_vbefill_index): Likewise.
11088         (grub_video_i386_vbefill): Added generic filler.
11090         * video/i386/pc/vbefill.c: Updated to reflect changes on
11091         include/grub/i386/pc/vbefill.h.
11093         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11094         grub_video_i386_vbeblit_info.
11095         (grub_video_vbe_unmap_color): Likewise.
11096         (grub_video_vbe_blit_glyph): Likewise.
11097         (grub_video_vbe_scroll): Likewise.
11098         (grub_video_vbe_draw_pixel): Removed function.
11099         (grub_video_vbe_get_pixel): Likewise.
11100         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11101         updated code to use it.
11102         (common_blitter): Added common blitter for render target and bitmap.
11103         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11104         (grub_video_vbe_blit_render_target): Likewise.
11106 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11108         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11109         is in text mode if there is no console control protocol instance
11110         available.
11112 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11114         * include/grub/video.h: Code cleanup.
11116         * include/grub/i386/pc/vbe.h: Likewise.
11118         * video/i386/pc/vbe.c: Likewise.
11120         * video/i386/pc/vbeblit.c: Likewise.
11122         * video/i386/pc/vbefill.c: Likewise.
11124         * video/video.c: Likewise.  Also added more comments.
11126 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11128         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11129         (struct grub_biosdisk_dap): Likewise.
11131         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11132         linkage settings for all functions.
11134 2006-07-12  Marco Gerards  <marco@gnu.org>
11136         * configure.ac (--enable-mm-debug): Fix typo.
11138         * genkernsyms.sh.in: Use proper quoting for `CC'.
11140 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11142         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11143         (normal_mod_ASFLAGS): Remove "-m32".
11145 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11147         * util/misc.c: Include config.h.
11148         [!HAVE_MEMALIGN]: Do not include malloc.h.
11149         (grub_memalign): Use posix_memalign, if present. Then, use
11150         memalign, if present. Otherwise, emit an error.
11152         * util/grub-emu.c: Do not include malloc.h.
11154         * include/grub/util/misc.h: Include unistd.h. This is required for
11155         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11156         D. Eades III <hde@foobar-qux.org>.
11158         * configure.ac (AC_GNU_SOURCE): Added.
11159         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11160         type.
11162 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11164         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11165         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11167 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11169         * include/grub/types.h (grub_host_addr_t): Rename to
11170         grub_target_addr_t.
11171         (grub_host_off_t): Rename to grub_target_off_t.
11172         (grub_host_size_t): Rename to grub_target_size_t.
11173         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11174         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11176         * include/grub/kernel.h (struct grub_module_header): Change type
11177         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11178         (grub_module_info): Likewise.
11180 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11182         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11183         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11184         Velazquez <jesus.velazquez@gmail.com>.
11186 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11188         Count partitions from 1 instead of 0 in the string representation
11189         of partitions. Still use 0-based internally.
11191         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11192         (sun_partition_map_iterate): Use grub_partition_t instead of
11193         struct grub_partition *. Cast DESC->START_CYLINDER to
11194         grub_uint64_t after converting the endian.
11195         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11196         (sun_partition_map_get_name): Add 1 to P->INDEX.
11198         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11199         PCDATA->DOS_PART.
11200         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11202         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11203         zero instead of one.
11204         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11205         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11207         * partmap/apple.c (apple_partition_map_iterate): Change the type
11208         of POS to unsigned.
11209         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11210         (apple_partition_map_get_name): Add 1 into P->INDEX.
11212         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11213         of POS to unsigned.
11214         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11215         calculate the offset of a partition.
11216         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11217         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11219         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11220         SECTOR to grub_disk_addr_t.
11221         (acorn_partition_map_iterate): Likewise.
11222         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11223         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11224         top.
11225         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11227         * kern/i386/pc/init.c (make_install_device): Add 1 into
11228         GRUB_INSTALL_DOS_PART.
11230         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11231         conditional.
11233 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11235         Clean up the code to support 64-bit addressing in disks and
11236         files. This change is not enough for filesystems yet.
11238         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11239         type of "start" to grub_uint64_t.
11240         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11241         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11242         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11243         convert addresses.
11245         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11246         to grub_disk_addr_t.
11248         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11249         string.
11251         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11253         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11254         to char *.
11256         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11258         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11260         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11262         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11263         to grub_off_t, to detect an error from grub_file_seek.
11264         (grub_multiboot_load_elf32): Likewise.
11266         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11267         maximum unsigned long value when an overflow is detected.
11268         (grub_strtoull): New function.
11269         (grub_divmod64): Likewise.
11270         (grub_lltoa): use grub_divmod64.
11272         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11273         grub_disk_addr_t.
11274         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11275         the pointer to next character. Use grub_strtoull instead of
11276         grub_strtoul.
11277         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11278         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11279         respectively.
11281         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11282         return value is signed.
11283         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11284         test if OFFSET is less than zero, as OFFSET is unsigned now.
11286         * kern/disk.c (struct grub_disk_cache): Change the type of
11287         "sector" to grub_disk_addr_t.
11288         (grub_disk_cache_get_index): Change the type of SECTOR to
11289         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11290         unsigned after shifting.
11291         (grub_disk_cache_invalidate): Change the type of SECTOR to
11292         grub_disk_addr_t.
11293         (grub_disk_cache_unlock): Likewise.
11294         (grub_disk_cache_store): Likewise.
11295         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11296         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11297         grub_disk_addr_t and grub_uint64_t, respectively.
11298         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11299         body, as the value of OFFSET is tweaked by
11300         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11301         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11302         respectively.
11303         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11304         body, as the value of OFFSET is tweaked by
11305         grub_disk_check_range. Change the types of LEN and N to
11306         grub_size_t.
11308         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11309         and "saved_offset" to grub_off_t.
11310         (test_header): Cast BUF to char *.
11311         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11312         to char *.
11313         (grub_gzio_read): Change the types of OFFSET and SIZE to
11314         grub_off_t and grub_size_t, respectively.
11316         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11317         Removed.
11318         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11319         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11320         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11321         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11322         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11324         * include/grub/types.h (grub_off_t): Unconditionally set to
11325         grub_uint64_t.
11326         (grub_disk_addr_t): Changed to grub_uint64_t.
11328         * include/grub/partition.h (struct grub_partition): Change the
11329         types of "start", "len" and "offset" to grub_disk_addr_t,
11330         grub_uint64_t and grub_disk_addr_t, respectively.
11331         (grub_partition_get_start): Return grub_disk_addr_t.
11332         (grub_partition_get_len): Return grub_uint64_t.
11334         * include/grub/misc.h (grub_strtoull): New prototype.
11335         (grub_divmod64): Likewise.
11337         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11338         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11339         grub_off_t, respectively.
11340         All callers and references changed.
11342         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11343         grub_size_t in "read".
11344         All callers and references changed.
11346         * include/grub/file.h (struct grub_file): Change the types of
11347         "offset" and "size" to grub_off_t and grub_off_t,
11348         respectively. Change the type of SECTOR to grub_disk_addr_t in
11349         "read_hook".
11350         (grub_file_read): Change the type of LEN to grub_size_t.
11351         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11352         grub_off_t.
11353         (grub_file_size): Return grub_off_t.
11354         (grub_file_tell): Likewise.
11355         All callers and references changed.
11357         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11358         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11359         "write".
11360         (struct grub_disk): Change the type of "total_sectors" to
11361         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11362         "read_hook".
11363         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11364         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11365         (grub_disk_write): Likewise.
11366         All callers and references changed.
11368         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11369         char * for grub_strncmp to silence gcc.
11370         (grub_iso9660_mount): Likewise.
11371         (grub_iso9660_mount): Likewise.
11372         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11373         return statement.
11374         (grub_iso9660_iterate_dir): Likewise.
11375         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11377         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11378         LEN to grub_disk_addr_t and grub_size_t, respectively.
11380         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11382         * fs/jfs.c (grub_jfs_read_file): Likewise.
11384         * fs/minix.c (grub_jfs_read_file): Likewise.
11386         * fs/sfs.c (grub_jfs_read_file): Likewise.
11388         * fs/ufs.c (grub_jfs_read_file): Likewise.
11390         * fs/xfs.c (grub_jfs_read_file): Likewise.
11392         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11393         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11394         respectively.
11396         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11397         BLKNR to -1 instead of returning GRUB_ERRNO.
11398         (grub_ext2_read_file): Change the types of SECTOR and
11399         LEN to grub_disk_addr_t and grub_size_t, respectively.
11401         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11402         LEN to grub_disk_addr_t and grub_size_t, respectively.
11404         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11405         grub_file_read.
11407         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11408         string. Do not cast SECTOR explicitly.
11410         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11411         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11412         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11413         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11414         over 2TB and LBA mode is not supported, raise an error.
11415         (get_safe_sectors): New function.
11416         (grub_biosdisk_read): Use get_safe_sectors.
11417         (grub_biosdisk_write): Likewise.
11419         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11420         (grub_efidisk_write): Likewise.
11422         * disk/loopback.c (delete_loopback): Cosmetic changes.
11423         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11424         correctly.
11425         (grub_loopback_open): Likewise.
11426         (grub_loopback_read): Likewise. Also, change the type of POS to
11427         grub_off_t, and fix the usage of grub_memset.
11429         * commands/i386/pc/play.c: Include grub/machine/time.h.
11431         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11432         print FILE->SIZE.
11434         * commands/configfile.c: Include grub/env.h.
11436         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11437         GRUB_ERRNO directly instead. Change the type of POS to
11438         grub_off_t. Follow the coding standard.
11440         * commands/blocklist.c: Include grub/partition.h.
11441         (grub_cmd_blocklist): Return an error if the underlying device is
11442         not a disk. Take the starting sector of a partition into account,
11443         if a partition is used.
11445         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11446         a length field.
11447         (lba_mode): Support 64-bit addresses.
11448         (chs_mode): Likewise.
11449         (copy_buffer): Adapted to the new offsets of a length field and a
11450         segment field.
11451         (blocklist_default_start): Allocate 64-bit space.
11453         * boot/i386/pc/boot.S (force_lba): Removed.
11454         (boot_drive): Moved to under KERNEL_SECTOR.
11455         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11456         space.
11457         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11458         is useless.
11459         (lba_mode): Refactored to support a 64-bit address. More size
11460         optimization.
11461         (setup_sectors): Likewise.
11463 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11465         * DISTLIST: Added include/grub/i386/linux.h. Removed
11466         include/grub/i386/pc/linux.h
11468         * configure.ac (AC_INIT): Bumped to 1.94.
11470         * config.guess: Updated from gnulib.
11471         * config.sub: Likewise.
11472         * install-sh: Likewise.
11473         * mkinstalldirs: Likewise.
11475 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11477         * conf/common.rmk (grub_modules_init.lst): Depended on
11478         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11479         MODSRCFILES.
11481         * genmk.rb (PModule::rule): Reverted the previous change.
11483 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11485         * conf/common.rmk (grub_modules_init.lst): Depends on
11486         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11487         that the target does not exist before producing.
11488         (grub_modules_init.h): Remove the target before generating.
11489         (grub_emu_init.c): Likewise.
11491         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11493 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11495         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11496         for the target-specific tests. Make sure that we also have the
11497         up-to-date target variables for those tests.
11499 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11501         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11502         (PModule::rule): Likewise.
11504 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11506         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11507         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11508         target-specific flags should be prefixed.
11509         (PModule::rule): Likewise.
11511 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11513         * configure.ac (CMP): Check if cmp is available explicitly.
11515 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11517         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11518         (target_cpu): New variable.
11519         (pkglibdir): Use target_cpu instead of host_cpu.
11521         * util/i386/pc/grub-install.in (host_cpu): Removed.
11522         (target_cpu): New variable.
11523         (pkglibdir): Use target_cpu instead of host_cpu.
11525         * util/genmoddep.c: Removed.
11527         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11528         instead of GRUB_HOST_SIZEOF_VOID_P.
11529         * kern/dl.c: Likewise.
11531         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11532         ...
11533         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11534         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11535         (GRUB_TARGET_SIZEOF_LONG): ... this.
11536         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11537         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11538         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11539         to ...
11540         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11541         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11542         (GRUB_TARGET_SIZEOF_LONG): ... this.
11543         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11544         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11545         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11546         to ...
11547         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11548         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11549         (GRUB_TARGET_SIZEOF_LONG): ... this.
11550         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11551         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11553         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11554         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11555         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11556         instead of GRUB_HOST_SIZEOF_LONG.
11557         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11558         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11559         GRUB_CPU_WORDS_BIGENDIAN.
11560         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11561         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11562         grub_host_ssize_t.
11564         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11565         (genmoddep_SOURCES): Likewise.
11566         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11567         (genmoddep_SOURCES): Likewise.
11568         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11569         (genmoddep_SOURCES): Likewise.
11570         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11571         Likewise.
11572         (genmoddep_SOURCES): Likewise.
11574         * genmoddep.awk: New file.
11576         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11577         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11578         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11579         (PModule::rule): Likewise.
11580         (Program::rule): Likewise.
11581         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11582         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11583         respectively.
11585         * configure.ac: Rewritten intensively to use host and target
11586         instead of build and host, respectively.
11588         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11589         (host_cpu): Removed.
11590         (target_cpu): New variable.
11591         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11592         (BUILD_CC): Removed.
11593         (BUILD_CFLAGS): Likewise.
11594         (BUILD_CPPFLAGS): Likewise.
11595         (TARGET_CC): New variable.
11596         (TARGET_CFLAGS): Likewise.
11597         (TARGET_CPPFLAGS): Likewise.
11598         (TARGET_LDFLAGS): Likewise.
11599         (AWK): Likewise.
11600         (include): Use target_cpu instead of host_cpu.
11601         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11603         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11605 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11607         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11608         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11609         field 'false' to 'exec_on_false'.
11610         (grub_script_create_cmdif): Renamed argument names to reflect above
11611         changes.
11613         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11615         * normal/script.c (grub_script_create_cmdif): Likewise.
11617 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11619         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11620         top.
11621         (grub_hfsplus_btree_recptr): Likewise.
11622         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11623         FILEBLOCK both to pass a block number and store next block
11624         number.
11625         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11626         overflow file correctly. Specify errors appropriately, because
11627         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11628         grub_hfsplus_btree_recptr to get the pointer to a found key.
11629         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11630         is found.
11632         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11633         linux.mod.
11634         (_linux_mod_SOURCES): New variable.
11635         (_linux_mod_CFLAGS): Likewise.
11636         (_linux_mod_LDFLAGS): Likewise.
11637         (linux_mod_SOURCES): Likewise.
11638         (linux_mod_CFLAGS): Likewise.
11639         (linux_mod_LDFLAGS): Likewise.
11641         * DISTLIST: Added loader/i386/efi/linux.c,
11642         loader/i386/efi/linux_normal.c and
11643         include/grub/i386/efi/loader.h.
11645         * loader/i386/efi/linux.c: New file.
11646         * loader/i386/efi/linux_normal.c: Likewise.
11647         * include/grub/i386/efi/loader.h: Likewise.
11649 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11651         * commands/blocklist.c: New file.
11653         * DISTLIST: Added commands/blocklist.c.
11655         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11656         color for the background, and a darker color for the foreground.
11657         (grub_console_checkkey): Return READ_KEY.
11658         (grub_console_cls): Set the background to
11659         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11661         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11663         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11664         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11666         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11667         prototype.
11669         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11670         BG. The spec is wrong again.
11672         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11673         prototype.
11674         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11676         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11677         commands/blocklist.c.
11678         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11680         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11681         (blocklist_mod_SOURCES): New variable.
11682         (blocklist_mod_CFLAGS): Likewise.
11683         (blocklist_mod_LDFLAGS): Likewise.
11685 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11687         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11688         duplication.
11689         (lba_mode): Use %eax more intensively to reduce the code size.
11691 2006-05-20  Marco Gerards  <marco@gnu.org>
11693         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11695         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11696         for `menuentry'.
11697         (script): Accept leading newlines.
11698         (newlines): New rule to describe 0 or more newlines.
11699         (commands): Accept `command' with trailing newline.  Fixed the
11700         order in which arguments were passed to `grub_script_add_cmd'.
11701         Accept commands separated by newlines.
11702         (function): Changed to accept newlines.
11703         (menuentry) Rewritten.
11705         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11706         front of the list, instead of to the end.
11708 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11710         * util/i386/pc/grub-install.in (bindir): New variable.
11711         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11712         Shaver <lbgwjl@gmail.com>.
11714 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11716         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11717         grub/machine/linux.h
11718         * loader/i386/pc/linux.c: Likewise.
11720         * include/grub/i386/pc/linux.h: Moved to ...
11721         * include/grub/i386/linux.h: ... here.
11723         * include/grub/i386/linux.h (struct linux_kernel_params): New
11724         struct.
11726 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11728         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11729         checking.
11730         (grub_video_vbe_blit_glyph): Likewise.
11731         (grub_video_vbe_blit_bitmap): Likewise.
11732         (grub_video_vbe_blit_render_target): Likewise.
11734 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11736         * configure.ac (--with-platform): Properly quote the square
11737         brackets.
11739 2006-05-08  Marco Gerards  <marco@gnu.org>
11741         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11742         this...
11743         (kernel_elf_HEADERS): ...to this.  Updated all users.
11744         (grubof_symlist.c): Renamed from this...
11745         (kernel_elf_symlist.c): ...to this.  Updated all users.
11746         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11747         (grubof_SOURCES): Renamed from this...
11748         (kernel_elf_SOURCES): ...to this.
11749         (grubof_HEADERS): Renamed from this...
11750         (kernel_elf_HEADERS): ...to this.
11751         (grubof_CFLAGS): Renamed from this...
11752         (kernel_elf_CFLAGS): ...to this.
11753         (grubof_ASFLAGS): Renamed from this...
11754         (kernel_elf_ASFLAGS): ...to this.
11755         (grubof_LDFLAGS): Renamed from this...
11756         (kernel_elf_LDFLAGS): ...to this.
11758         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11759         this...
11760         (kernel_elf_HEADERS): ...to this.  Updated all users.
11761         (grubof_symlist.c): Renamed from this...
11762         (kernel_elf_symlist.c): ...to this.  Updated all users.
11763         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11764         (grubof_SOURCES): Renamed from this...
11765         (kernel_elf_SOURCES): ...to this.
11766         (grubof_HEADERS): Renamed from this...
11767         (kernel_elf_HEADERS): ...to this.
11768         (grubof_CFLAGS): Renamed from this...
11769         (kernel_elf_CFLAGS): ...to this.
11770         (grubof_ASFLAGS): Renamed from this...
11771         (kernel_elf_ASFLAGS): ...to this.
11772         (grubof_LDFLAGS): Renamed from this...
11773         (kernel_elf_LDFLAGS): ...to this.
11775         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11776         `kernel.elf' instead of `grubof'.
11778 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11780         Add --with-platform to configure. Use pkglibdir instead of
11781         pkgdatadir. This is reported by Roger Leigh.
11783         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11784         (host_vendor): Likewise.
11785         (host_os): Likewise.
11786         (pkgdatadir): Likewise.
11787         (platform): New variable.
11788         (pkglibdir): Likewise.
11789         Use PKGLIBDIR instead of PKGDATADIR.
11791         * util/i386/pc/grub-install.in (datadir): Removed.
11792         (host_vendor): Likewise.
11793         (host_os): Likewise.
11794         (pkgdatadir): Likewise.
11795         (platform): New variable.
11796         (pkglibdir): Likewise.
11797         Use PKGLIBDIR instead of PKGDATADIR.
11799         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11800         instead of GRUB_DATADIR.
11801         (main): Likewise.
11802         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11803         (main): Likewise.
11804         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11805         (main): Likewise.
11807         * configure.ac (--with-platform): New option.
11808         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11810         * Makefile.in: Include a makefile based on PLATFORM instead of
11811         HOST_VENDOR.
11812         (pkgdatadir): Not appended by the machine type.
11813         (pkglibdir): Appended by the machine type.
11814         (host_vendor): Removed.
11815         (platform): New variable.
11816         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11817         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11818         (uninstall): Likewise.
11820 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11822         Use the environment context in the menu. Remove the commands
11823         "default" and "timeout", and use variables instead.
11825         * normal/menu.c: Include grub/env.h.
11826         (print_entry): Cast TITLE to silence gcc.
11827         (get_timeout): New function.
11828         (set_timeout): Likewise.
11829         (get_entry_number): Likewise.
11830         (run_menu): Use a default entry, a fallback entry and a timeout
11831         in the environment variables "default", "fallback" and
11832         "timeout". Also, tweak the default entry if it is not within the
11833         current menu entries.
11834         (grub_menu_run): Use a fallback entry in the environment variable
11835         "fallback".
11837         * normal/main.c (read_config_file): Do not initialize
11838         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11839         NEWMENU->TIMEOUT.
11840         (grub_normal_execute): Use a data slot to store the menu.
11842         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11843         fallback_entry and timeout.
11844         (struct grub_menu_list): Removed.
11845         (grub_menu_list_t): Likewise.
11846         (struct grub_context): Likewise.
11847         (grub_context_t): Likewise.
11848         (grub_context_get): Likewise.
11849         (grub_context_get_current_menu): Likewise.
11850         (grub_context_push_menu): Likewise.
11851         (grub_context_pop_menu): Likewise.
11852         (grub_default_init): Likewise.
11853         (grub_default_fini): Likewise.
11854         (grub_timeout_init): Likewise.
11855         (grub_timeout_fini): Likewise.
11857         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11858         and timeout.mod.
11859         (normal_mod_SOURCES): Removed normal/context.c.
11861         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11862         commands/default.c, commands/timeout.c and normal/context.c.
11863         (normal_mod_SOURCES): Removed normal/context.c.
11865         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11866         commands/timeout.c and normal/context.c.
11867         (normal_mod_SOURCES): Removed normal/context.c.
11869         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11870         commands/default.c, commands/timeout.c and normal/context.c.
11871         (normal_mod_SOURCES): Removed normal/context.c.
11873         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11874         timeout.mod.
11875         (default_mod_SOURCES): Removed.
11876         (default_mod_CFLAGS): Likewise.
11877         (default_mod_LDFLAGS): Likewise.
11878         (timeout_mod_SOURCES): Removed.
11879         (timeout_mod_CFLAGS): Likewise.
11880         (timeout_mod_LDFLAGS): Likewise.
11882         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11883         normal/context.c.
11885         * commands/default.c: Removed.
11886         * commands/timeout.c: Likewise.
11887         * normal/context.c: Likewise.
11889 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11891         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11893 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11895         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11896         "next" to "prev" for readability.
11897         (struct grub_env_sorted_var): New struct.
11898         (grub_env_context): Renamed to ...
11899         (initial_context): ... this.
11900         (grub_env_var_context): Renamed to ...
11901         (current_context): ... this.
11902         (grub_env_find): Look only at CURRENT_CONTEXT.
11903         (grub_env_context_open): Rewritten to copy exported variables from
11904         previous context.
11905         (grub_env_context_close): Rewritten according to the new
11906         scheme. Also, add an assertion to prevent the initial context from
11907         removed.
11908         (grub_env_insert): Removed the code for the sorted list.
11909         (grub_env_remove): Likewise.
11910         (grub_env_export): Simply mark the variable with
11911         GRUB_ENV_VAR_GLOBAL.
11912         (grub_env_set): A cosmetic change for naming consistency.
11913         (grub_env_get): Likewise.
11914         (grub_env_unset): Likewise.
11915         (grub_env_iterate): Rewritten to sort variables within this
11916         function.
11917         (grub_register_variable_hook): Fixed for naming consistency. Call
11918         grub_env_find again, only if NAME is not found at the first time.
11919         (mangle_data_slot_name): New function.
11920         (grub_env_set_data_slot): Likewise.
11921         (grub_env_get_data_slot): Likewise.
11922         (grub_env_unset_data_slot): Likewise.
11924         * include/grub/env.h (grub_env_var_type): New enum.
11925         (GRUB_ENV_VAR_LOCAL): New constant.
11926         (GRUB_ENV_VAR_GLOBAL): Likewise.
11927         (GRUB_ENV_VAR_DATA): Likewise.
11928         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11929         "type".
11930         (grub_env_set): Replace VAR with NAME for consistency.
11931         (grub_register_variable_hook): Likewise.
11932         (grub_env_export): Specify the name of the argument.
11933         (grub_env_set_data_slot): New prototype.
11934         (grub_env_get_data_slot): Likewise.
11935         (grub_env_unset_data_slot): Likewise.
11937 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11939         Extend the loader so that GRUB can accept a loader which comes
11940         back to GRUB when a loaded image exits. Also, this change adds
11941         support for a chainloader on EFI.
11943         * term/efi/console.c: Include grub/misc.h.
11944         (grub_console_checkkey): Display a scan code on the top for
11945         debugging. This will be removed once the EFI port gets stable.
11946         Correct the scan code mapping.
11948         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11949         allocate memory from larger regions, in order to reduce the number
11950         of allocated regions. Otherwise, the MacOSX loader panics.
11951         (filter_memory_map): Avoid less than 1MB for compatibility with
11952         other loaders.
11953         (add_memory_regions): Allocate from the tail of a region, if
11954         possible, to avoid allocating a region near to 1MB, for the MacOSX
11955         loader.
11957         * kern/efi/init.c (grub_efi_set_prefix): Specify
11958         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11960         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11961         argument IMAGE_HANDLE and specify it to get a loaded image.
11962         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11963         grub_efi_get_loaded_image.
11964         (grub_efi_get_filename): Divide the length by the size of
11965         grub_efi_char16_t.
11966         (grub_efi_get_device_path): New function.
11967         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11968         the length by the size of grub_efi_char16_t for a file path device
11969         path node.
11971         * kern/loader.c (grub_loader_noreturn): New variable.
11972         (grub_loader_set): Accept a new argument NORETURN. Set
11973         GRUB_LOADER_NORETURN to NORETURN.
11974         All callers changed.
11975         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11976         grub_machine_fini.
11978         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11979         prototype.
11980         (grub_efi_get_loaded_image): Take an argument to specify an image
11981         handle.
11983         * include/grub/loader.h (grub_loader_set): Added one more argument
11984         NORETURN.
11986         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11987         instead of grub_efi_open_protocol.
11988         (grub_efidisk_get_device_name): Likewise.
11989         (grub_efidisk_close): Print a newline.
11990         (grub_efidisk_get_device_handle): Fixed to use
11991         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11992         GRUB_EFI_DEVICE_PATH_TYPE.
11994         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11995         * kern/efi/efi.c (device_path_guid): ... here.
11997         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11998         chain.mod.
11999         (kernel_mod_HEADERS): Added efi/disk.h.
12000         (_chain_mod_SOURCES): New variable.
12001         (_chain_mod_CFLAGS): Likewise.
12002         (_chain_mod_LDFLAGS): Likewise.
12003         (chain_mod_SOURCES): Likewise.
12004         (chain_mod_CFLAGS): Likewise.
12005         (chain_mod_LDFLAGS): Likewise.
12007         * DISTLIST: Added include/grub/efi/chainloader.h,
12008         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12010         * include/grub/efi/chainloader.h: New file.
12011         * loader/efi/chainloader.c: Likewise.
12012         * loader/efi/chainloader_normal.c: Likewise.
12014 2006-04-30  Marco Gerards  <marco@gnu.org>
12016         * commands/configfile.c (grub_cmd_source): New function.
12017         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12018         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12020 2006-04-30  Marco Gerards  <marco@gnu.org>
12022         * normal/execute.c (grub_script_execute_cmd): Change the return
12023         type to `grub_err_t'.  Correctly return the error.
12024         (grub_script_execute_cmdline): In case a command line is not a
12025         command or a function, try to interpret it as an assignment.
12027 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12029         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12030         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12031         skip a node whose name is obviously invalid as UTF-16,
12032         i.e. contains a NUL character. Stop the iteration when the last
12033         directory entry is found. Instead of using the return value of
12034         grub_hfsplus_btree_iterate_node, store the value in RET and use
12035         it, because the iterator can be stopped by the last directory
12036         entry.
12038 2006-04-30  Marco Gerards  <marco@gnu.org>
12040         * include/grub/env.h (grub_env_export): New prototype.  Reported
12041         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12043 2006-04-30  Marco Gerards  <marco@gnu.org>
12045         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12046         size of the extents in a catalog file record.
12048 2006-04-29  Marco Gerards  <marco@gnu.org>
12050         * commands/configfile.c (grub_cmd_configfile): Execute the
12051         configfile within its own context.
12053         * include/grub/env.h (grub_env_context_open): New prototype.
12054         (grub_env_context_close): Likewise.
12056         * kern/env.c (grub_env): Removed.
12057         (grub_env_sorted): Likewise.
12058         (grub_env_context): New variable.
12059         (grub_env_var_context): Likewise.
12060         (grub_env_find): Search both the active context and the global
12061         context.
12062         (grub_env_context_open): New function.
12063         (grub_env_context_close): Likewise.
12064         (grub_env_insert): Likewise.
12065         (grub_env_remove): Likewise.
12066         (grub_env_export): Likewise.
12067         (grub_env_set): Changed to use helper functions to avoid code
12068         duplication.
12069         (grub_env_iterate): Rewritten so both the current context and the
12070         global context are being used.
12072         * normal/command.c (export_command): New function.
12073         (grub_command_init): Register the `export' function.
12075 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12077         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12078         explicitly to suppress gcc's warnings.
12079         * fs/fat.c (grub_fat_find_dir): Likewise.
12080         (grub_fat_label): Likewise.
12081         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12082         (grub_xfs_mount): Likewise.
12083         (grub_xfs_label): Likewise.
12084         * fs/affs.c (grub_affs_mount): Likewise.
12085         (grub_affs_label): Likewise.
12086         (grub_affs_iterate_dir): Likewise.
12087         * fs/sfs.c (grub_sfs_mount): Likewise.
12088         (grub_sfs_iterate_dir): Likewise.
12089         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12090         * fs/hfs.c (grub_hfs_mount): Likewise.
12091         (grub_hfs_cmp_catkeys): Likewise.
12092         (grub_hfs_find_dir): Likewise.
12093         (grub_hfs_dir): Likewise.
12094         (grub_hfs_label): Likewise.
12095         * fs/jfs.c (grub_jfs_mount): Likewise.
12096         (grub_jfs_opendir): Likewise.
12097         (grub_jfs_getent): Likewise.
12098         (grub_jfs_lookup_symlink): Likewise.
12099         (grub_jfs_label): Likewise.
12100         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12101         (grub_hfsplus_iterate_dir): Likewise.
12102         (grub_hfsplus_btree_iterate_node): Made static.
12104         * util/grub-emu.c (prefix): New variable.
12105         (grub_machine_set_prefix): New function.
12106         (main): Do not set the environment variable "prefix" here. Only
12107         set PREFIX, which is used later by grub_machine_set_prefix.
12109         * include/grub/video.h: Do not include grub/symbol.h.
12110         (grub_video_register): Not exported. This symbol is not defined in
12111         the kernel.
12112         (grub_video_unregister): Likewise.
12113         (grub_video_iterate): Likewise.
12114         (grub_video_setup): Likewise.
12115         (grub_video_restore): Likewise.
12116         (grub_video_get_info): Likewise.
12117         (grub_video_get_blit_format): Likewise.
12118         (grub_video_set_palette): Likewise.
12119         (grub_video_get_palette): Likewise.
12120         (grub_video_set_viewport): Likewise.
12121         (grub_video_get_viewport): Likewise.
12122         (grub_video_map_color): Likewise.
12123         (grub_video_map_rgb): Likewise.
12124         (grub_video_map_rgba): Likewise.
12125         (grub_video_fill_rect): Likewise.
12126         (grub_video_blit_glyph): Likewise.
12127         (grub_video_blit_bitmap): Likewise.
12128         (grub_video_blit_render_target): Likewise.
12129         (grub_video_scroll): Likewise.
12130         (grub_video_swap_buffers): Likewise.
12131         (grub_video_create_render_target): Likewise.
12132         (grub_video_delete_render_target): Likewise.
12133         (grub_video_set_active_render_target): Likewise.
12135         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12136         Undefined.
12137         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12139         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12140         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12141         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12142         instead of $(srcdir)/genkernsyms.sh.
12144         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12145         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12146         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12147         instead of $(srcdir)/genkernsyms.sh.
12149         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12150         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12151         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12152         instead of $(srcdir)/genkernsyms.sh.
12154         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12155         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12156         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12157         instead of $(srcdir)/genkernsyms.sh.
12159         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12160         genkernsyms.sh.
12162         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12163         genkernsyms.sh.
12164         (gensymlist.sh): New target.
12165         (genkernsyms.sh): Likewise.
12167         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12168         genkernsyms.sh.in and gensymlist.sh.in.
12170         * genkernsyms.sh: Removed.
12171         * gensymlist.sh: Likewise.
12173         * genkernsyms.sh.in: New file.
12174         * gensymlist.sh.in: Likewise.
12176 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12178         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12179         clobber "prefix", since we may have already set it manually.
12181 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12183         * kern/misc.c (abort): New alias for grub_abort.
12185 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12187         A new machine-specific function "grub_machine_set_prefix" is
12188         defined. This is called after loading modules, so that a prefix
12189         initialization can use modules. Also, this change adds an
12190         intensive debugging feature for the memory manager via the
12191         configure option "--enable-mm-debug".
12193         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12194         PART.LEN.
12196         * kern/sparc64/ieee1275/init.c (abort): Removed.
12197         (grub_stop): Likewise.
12198         (grub_exit): New function.
12199         (grub_set_prefix): Renamed to ...
12200         (grub_machine_set_prefix): ... this.
12201         (grub_machine_init): Do not call grub_set_prefix.
12203         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12204         (grub_machine_set_prefix): ... this.
12205         (grub_machine_init): Do not call grub_set_prefix.
12207         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12208         (grub_machine_init): Do not set the prefix here.
12210         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12212         * kern/efi/init.c: Include grub/mm.h.
12213         (grub_efi_set_prefix): New function.
12215         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12216         (grub_efi_get_filename): New function.
12217         (grub_print_device_path): Renamed to ...
12218         (grub_efi_print_device_path): ... this.
12220         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12221         [MM_DEBUG] (grub_realloc): Likewise.
12222         [MM_DEBUG] (grub_free): Likewise.
12223         [MM_DEBUG] (grub_memalign): Likewise.
12224         [MM_DEBUG] (grub_mm_debug): New variable.
12225         [MM_DEBUG] (grub_debug_malloc): New function.
12226         [MM_DEBUG] (grub_debug_free): New function.
12227         [MM_DEBUG] (grub_debug_realloc): New function.
12228         [MM_DEBUG] (grub_debug_memalign): New function.
12230         * kern/misc.c (grub_abort): Print a newline to distinguish
12231         the message.
12233         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12234         grub_set_root_dev after loading modules. This is necessary when
12235         setting a prefix depends on modules.
12237         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12238         (grub_efi_print_device_path): ... this.
12239         (grub_efi_get_filename): New prototype.
12240         (grub_efi_set_prefix): Likewise.
12242         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12243         and grub/disk.h.
12244         (grub_efidisk_get_device_handle): New prototype.
12245         (grub_efidisk_get_device_name): Likewise.
12247         * include/grub/mm.h: Include config.h.
12248         (MM_DEBUG): Removed.
12249         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12250         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12251         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12252         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12253         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12254         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12255         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12256         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12257         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12259         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12261         * disk/efi/efidisk.c: Include grub/partition.h.
12262         (iterate_child_devices): New function.
12263         (add_device): First, compare only last device path nodes, so that
12264         devices are sorted by the types.
12265         (grub_efidisk_get_device_handle): New function.
12266         (grub_efidisk_get_device_name): Likewise.
12268         * configure.ac (--enable-mm-debug): New option to enable the
12269         memory manager debugging feature. This makes the binary much
12270         bigger, so is disabled by default.
12272 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12274         Use grub_abort instead of grub_stop, and grub_exit must be
12275         define in each architecture now. Also, this change adds support
12276         for EFI disks.
12278         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12279         (grub_getkey): New function.
12280         (grub_term_get_current): Likewise.
12282         * util/i386/pc/grub-setup.c: Include grub/term.h.
12283         (grub_getkey): New function.
12284         (grub_term_get_current): Likewise.
12286         * util/misc.c (grub_stop): Renamed to ...
12287         (grub_exit): ... this.
12289         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12290         (grub_exit): ... this.
12291         (grub_machine_init): Use grub_abort instead of abort.
12292         (grub_stop): Removed.
12294         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12295         abort.
12297         * kern/i386/pc/startup.S (grub_exit): New function.
12298         (cold_reboot): New label.
12300         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12301         (grub_efi_init): Call grub_efidisk_init.
12302         (grub_efi_fini): Call grub_efidisk_fini.
12304         * kern/efi/efi.c: Include grub/mm.h.
12305         (grub_efi_console_control_guid): Renamed to ...
12306         (console_control_guid): ... this.
12307         (grub_efi_loaded_image_guid): Renamed to ...
12308         (loaded_image_guid): ... this.
12309         (grub_efi_locate_handle): New function.
12310         (grub_efi_open_protocol): Likewise.
12311         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12312         GRUB_EFI_CONSOLE_CONTROL_GUID.
12313         (grub_efi_exit): Removed.
12314         (grub_stop): Likewise.
12315         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12316         (grub_exit): New function.
12317         (grub_print_device_path): Likewise.
12319         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12320         (grub_enter_rescue_mode): Register "exit".
12322         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12323         (grub_abort): New function.
12325         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12327         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12329         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12331         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12332         (grub_print_device_path): New prototype.
12333         (grub_efi_locate_handle): Likewise.
12334         (grub_efi_open_protocol): Likewise.
12336         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12337         * disk/efi/efidisk.c: Likewise.
12339         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12341         * include/grub/efi/console_control.h
12342         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12344         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12345         last 8 bytes as an array.
12346         (GRUB_EFI_DISK_IO_GUID): New macro.
12347         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12348         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12349         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12350         grub_uint8_t.
12351         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12352         (struct grub_efi_device_path): Rename the member "sub_type" to
12353         "subtype".
12354         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12355         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12356         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12357         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12358         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12359         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12360         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12361         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12362         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12363         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12364         (struct grub_efi_pci_device_path): New structure.
12365         (grub_efi_pci_device_path_t): New type.
12366         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12367         (struct grub_efi_pccard_device_path): New structure.
12368         (grub_efi_pccard_device_path_t): New type.
12369         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12370         (struct grub_efi_memory_mapped_device_path): New structure.
12371         (grub_efi_memory_mapped_device_path_t): New type.
12372         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12373         (struct grub_efi_vendor_device_path): New structure.
12374         (grub_efi_vendor_device_path_t): New type.
12375         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12376         (struct grub_efi_controller_device_path): New structure.
12377         (grub_efi_controller_device_path_t): New type.
12378         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12379         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12380         (struct grub_efi_acpi_device_path): New structure.
12381         (grub_efi_acpi_device_path_t): New type.
12382         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12383         (struct grub_efi_expanded_acpi_device_path): New structure.
12384         (grub_efi_expanded_acpi_device_path_t): New type.
12385         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12386         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12387         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12388         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12389         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12390         (struct grub_efi_atapi_device_path): New structure.
12391         (grub_efi_atapi_device_path_t): New type.
12392         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12393         (struct grub_efi_fibre_channel_device_path): New structure.
12394         (grub_efi_fibre_channel_device_path_t): New type.
12395         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12396         (struct grub_efi_1394_device_path): New structure.
12397         (grub_efi_1394_device_path_t): New type.
12398         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12399         (struct grub_efi_usb_device_path): New structure.
12400         (grub_efi_usb_device_path_t): New type.
12401         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12402         (struct grub_efi_usb_class_device_path): New structure.
12403         (grub_efi_usb_class_device_path_t): New type.
12404         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12405         (struct grub_efi_i2o_device_path): New structure.
12406         (grub_efi_i2o_device_path_t): New type.
12407         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12408         (struct grub_efi_mac_address_device_path): New structure.
12409         (grub_efi_mac_address_device_path_t): New type.
12410         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12411         (struct grub_efi_ipv4_device_path): New structure.
12412         (grub_efi_ipv4_device_path_t): New type.
12413         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12414         (struct grub_efi_ipv6_device_path): New structure.
12415         (grub_efi_ipv6_device_path_t): New type.
12416         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12417         (struct grub_efi_infiniband_device_path): New structure.
12418         (grub_efi_infiniband_device_path_t): New type.
12419         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12420         (struct grub_efi_uart_device_path): New structure.
12421         (grub_efi_uart_device_path_t): New type.
12422         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12423         (struct grub_efi_vendor_messaging_device_path): New structure.
12424         (grub_efi_vendor_messaging_device_path_t): New type.
12425         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12426         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12427         (struct grub_efi_hard_drive_device_path): New structure.
12428         (grub_efi_hard_drive_device_path_t): New type.
12429         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12430         (struct grub_efi_cdrom_device_path): New structure.
12431         (grub_efi_cdrom_device_path_t): New type.
12432         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12433         (struct grub_efi_vendor_media_device_path): New structure.
12434         (grub_efi_vendor_media_device_path_t): New type.
12435         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12436         (struct grub_efi_file_path_device_path): New structure.
12437         (grub_efi_file_path_device_path_t): New type.
12438         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12439         (struct grub_efi_protocol_device_path): New structure.
12440         (grub_efi_protocol_device_path_t): New type.
12441         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12442         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12443         (struct grub_efi_bios_device_path): New structure.
12444         (grub_efi_bios_device_path_t): New type.
12445         (struct grub_efi_disk_io): New structure.
12446         (grub_efi_disk_io_t): New type.
12447         (struct grub_efi_block_io_media): New structure.
12448         (grub_efi_block_io_media_t): New type.
12449         (struct grub_efi_block_io): New structure.
12450         (grub_efi_block_io_t): New type.
12452         * include/grub/misc.h (grub_stop): Removed.
12453         (grub_exit): New prototype.
12454         (grub_abort): Likewise.
12456         * include/grub/disk.h (enum grub_disk_dev_id): Added
12457         GRUB_DISK_DEVICE_EFIDISK_ID.
12459         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12460         disk/efi/efidisk.c.
12461         (kernel_syms.lst): Remove the target if an error occurs.
12463 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12465         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12466         as it was simply too buggy.
12468 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12470         * kern/misc.c (grub_lltoa): New function.
12471         (grub_vsprintf): Added support for the long long suffix,
12472         i.e. "ll".
12474 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12476         * Makefile.in (LDFLAGS): Add variable.
12477         (LD): Remove variable.
12478         * configure.ac: Add -m32 to LDFLAGS.
12479         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12480         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12481         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12482         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12483         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12484         variables.
12485         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12486         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12487         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12489 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12491         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12492         length for unknown glyph.
12494 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12496         Add support for pre-loaded modules into the EFI port.
12498         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12499         completely. Accept one more argument DIR. The caller has changed.
12501         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12503         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12504         (grub_efi_loaded_image_guid): New variable.
12505         (grub_efi_get_loaded_image): New function.
12506         (grub_arch_modules_addr): Likewise.
12508         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12509         prototype.
12511         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12512         (struct grub_efi_loaded_image): New structure.
12513         (grub_efi_loaded_image_t): New type.
12515 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12517         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12518         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12519         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12521 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12523         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12525 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12527         * DISTLIST: Added include/grub/efi/console.h,
12528         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12529         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12531         * include/grub/efi/console.h: New file.
12532         * include/grub/efi/time.h: Likewise.
12533         * include/grub/i386/efi/kernel.h: Likewise.
12534         * kern/efi/init.c: Likewise.
12535         * kern/efi/mm.c: Likewise.
12536         * term/efi/console.c: Likewise.
12538         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12539         (grub_stop): Removed.
12540         (grub_get_rtc): Likewise.
12541         (grub_machine_init): Simply call grub_efi_init.
12542         (grub_machine_fini): Call grub_efi_fini.
12544         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12545         (grub_efi_output_string): Removed.
12546         (grub_efi_stall): New function.
12547         (grub_stop): Likewise.
12548         (grub_get_rtc): Likewise.
12550         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12551         (grub_efi_stall): New prototype.
12552         (grub_efi_allocate_pages): Likewise.
12553         (grub_efi_free_pages): Likewise.
12554         (grub_efi_get_memory_map): Likewise.
12555         (grub_efi_mm_init): Likewise.
12556         (grub_efi_mm_fini): Likewise.
12557         (grub_efi_init): Likewise.
12558         (grub_efi_fini): Likewise.
12560         * include/grub/i386/efi/time.h: Do not include
12561         grub/symbol.h. Include grub/efi/time.h.
12562         (GRUB_TICKS_PER_SECOND): Removed.
12563         (grub_get_rtc): Likewise.
12565         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12566         Added padding. The EFI spec is buggy.
12567         (GRUB_EFI_BLACK): New macro.
12568         (GRUB_EFI_BLUE): Likewise.
12569         (GRUB_EFI_GREEN): Likewise.
12570         (GRUB_EFI_CYAN): Likewise.
12571         (GRUB_EFI_RED): Likewise.
12572         (GRUB_EFI_MAGENTA): Likewise.
12573         (GRUB_EFI_BROWN): Likewise.
12574         (GRUB_EFI_LIGHTGRAY): Likewise.
12575         (GRUB_EFI_BRIGHT): Likewise.
12576         (GRUB_EFI_DARKGRAY): Likewise.
12577         (GRUB_EFI_LIGHTBLUE): Likewise.
12578         (GRUB_EFI_LIGHTGREEN): Likewise.
12579         (GRUB_EFI_LIGHTCYAN): Likewise.
12580         (GRUB_EFI_LIGHTRED): Likewise.
12581         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12582         (GRUB_EFI_YELLOW): Likewise.
12583         (GRUB_EFI_WHITE): Likewise.
12584         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12585         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12586         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12587         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12588         (GRUB_EFI_BACKGROUND_RED): Likewise.
12589         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12590         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12591         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12592         (GRUB_EFI_TEXT_ATTR): Likewise.
12594         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12595         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12596         (kernel_mod_HEADERS): Added efi/time.h.
12598 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12600         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12601         include/grub/efi/api.h, include/grub/efi/console_control.h,
12602         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12603         include/grub/i386/efi/time.h, kern/efi/efi.c,
12604         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12605         and util/i386/efi/grub-mkimage.c.
12607         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12609         * genmk.rb (PModule#rule): Do not export symbols if
12610         #{prefix}_EXPORTS is set to "no".
12612         * conf/i386-efi.mk: New file.
12613         * conf/i386-efi.rmk: Likewise.
12614         * include/grub/efi/api.h: Likewise.
12615         * include/grub/efi/console_control.h: Likewise.
12616         * include/grub/efi/efi.h: Likewise.
12617         * include/grub/efi/pe32.h: Likewise.
12618         * include/grub/i386/efi/time.h: Likewise.
12619         * kern/efi/efi.c: Likewise.
12620         * kern/i386/efi/init.c: Likewise.
12621         * kern/i386/efi/startup.S: Likewise.
12622         * util/i386/efi/grub-mkimage.c: Likewise.
12624 2006-04-17  Marco Gerards  <marco@gnu.org>
12626         * include/grub/script.h: Include <grub/parser.h> and
12627         "grub_script.tab.h".
12628         (struct grub_lexer_param): New struct.
12629         (struct grub_parser_param): Likewise.
12630         (grub_script_create_arglist): Pass the state in an argument.
12631         (grub_script_add_arglist): Likewise.
12632         (grub_script_create_cmdline): Likewise.
12633         (grub_script_create_cmdblock): Likewise.
12634         (grub_script_create_cmdif): Likewise.
12635         (grub_script_create_cmdmenu): Likewise.
12636         (grub_script_add_cmd): Likewise.
12637         (grub_script_arg_add): Likewise.
12638         (grub_script_lexer_ref): Likewise.
12639         (grub_script_lexer_deref): Likewise.
12640         (grub_script_lexer_record_start): Likewise.
12641         (grub_script_lexer_record_stop): Likewise.
12642         (grub_script_mem_record): Likewise.
12643         (grub_script_mem_record_stop): Likewise.
12644         (grub_script_malloc): Likewise.
12645         (grub_script_yylex): Likewise.
12646         (grub_script_yyparse): Likewise.
12647         (grub_script_yyerror): Likewise.
12648         (grub_script_yylex): Likewise.
12649         (grub_script_lexer_init): Return the state.
12651         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12652         (grub_script_lexer_done): Likewise.
12653         (grub_script_lexer_getline): Likewise.
12654         (grub_script_lexer_refs): Likewise.
12655         (script): Likewise.
12656         (newscript): Likewise.
12657         (record): Likewise.
12658         (recording): Likewise.
12659         (recordpos): Likewise.
12660         (recordlen): Likewise.
12661         (grub_script_lexer_init): Return the state instead of setting
12662         global variables.
12663         (grub_script_lexer_ref): Use the newly added argument for state
12664         instead of globals.
12665         (grub_script_lexer_deref): Likewise.
12666         (grub_script_lexer_record_start): Likewise.
12667         (grub_script_lexer_record_stop): Likewise.
12668         (recordchar): Likewise.
12669         (nextchar): Likewise.
12670         (grub_script_yylex2): Likewise.
12671         (grub_script_yylex): Likewise.
12672         (grub_script_yyerror): Likewise.
12674         * normal/parser.y (func_mem): Removed variable.
12675         (menu_entry): Likewise.
12676         (err): Likewise.
12677         (%lex-param): New parser option.
12678         (%parse-param): Likewise.
12679         (script): Always return the AST.
12680         (argument): Pass the state around.
12681         (arguments): Likewise.
12682         (grubcmd): Likewise.
12683         (commands): Likewise.
12684         (function): Likewise.
12685         (menuentry): Likewise.
12686         (if_statement): Likewise.
12687         (if): Likewise.
12689         * normal/script.c (grub_script_memused): Removed variable.
12690         (grub_script_parsed): Likewise.
12691         (grub_script_malloc): Added a state argument.  Use that instead of
12692         global variables.
12693         (grub_script_mem_record): Likewise.
12694         (grub_script_mem_record_stop): Likewise.
12695         (grub_script_arg_add): Likewise.
12696         (grub_script_add_arglist): Likewise.
12697         (grub_script_create_cmdline): Likewise.
12698         (grub_script_create_cmdif): Likewise.
12699         (grub_script_create_cmdmenu): Likewise.
12700         (grub_script_add_cmd): Likewise.
12701         (grub_script_parse): Setup the state before calling the parser.
12703 2006-04-16  Marco Gerards  <marco@gnu.org>
12705         * normal/command.c (grub_command_init): Remove the title command.
12707         * normal/lexer.c (grub_script_yylex): Renamed from this...
12708         (grub_script_yylex2): ... to this.
12709         (grub_script_yylex): New function.  Temporary
12710         introduced to filter some tokens.
12711         (grub_script_yyerror): Print a newline.
12713         * normal/main.c (read_config_file): Output information about the
12714         lines that contain errors.  Wait for a key after all lines have
12715         been processed.  Don't return an empty menu.
12717         * normal/parser.y (func_mem): Don't initialize.
12718         (menu_entry): Likewise.
12719         (err): New variable.
12720         (script): Don't return anything when an error was encountered.
12721         (ws, returns): Removed rules.
12722         (argument): Disabled concatenated variable support.
12723         (arguments): Remove explicit separators.
12724         (grubcmd): Likewise.
12725         (function): Likewise.
12726         (menuentry): Likewise.
12727         (if): Likewise.
12728         (commands): Likewise.  Add error handling.
12730         * normal/script.c (grub_script_create_cmdline): If
12731         `grub_script_parsed' is 0, assume the parser encountered an error.
12733 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12735         * configure.ac: Add support for EFI. Fix the typo
12736         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12738 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12740         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12741         foreign multibyte characters should be shown correctly.
12743 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12745         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12746         calculation.
12747         (read_config_file): Made it to close file before returning.
12749 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12751         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12752         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12753         video/i386/pc/vbefill.c.
12755         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12756         video/i386/pc/vbefill.c.
12758         * include/grub/video.h (grub_video_blit_format): New enum.
12759         (grub_video_mode_info): Added new member blit_format.
12760         (grub_video_get_blit_format): New function prototype.
12762         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12763         function prototype.
12764         (grub_video_vbe_map_rgb): Likewise.
12765         (grub_video_vbe_unmap_color): Likewise.
12767         * include/grub/i386/pc/vbeblit.h: New file.
12769         * include/grub/i386/pc/vbefill.h: New file.
12771         * video/video.c (grub_video_get_blit_format): New function.
12772         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12773         (grub_video_vbe_map_rgb): Likewise.
12774         (grub_video_vbe_unmap_color): Likewise.
12776         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12777         optimized fills.
12778         (grub_video_vbe_blit_render_target): Changed to use more optimized
12779         blits.
12780         (grub_video_vbe_setup): Added detection for optimized settings.
12781         (grub_video_vbe_create_render_target): Likewise.
12783         * video/i386/pc/vbeblit.c: New file.
12785         * video/i386/pc/vbefill.c: New file.
12787 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12789         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12790         here...
12792         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12793         parsing to support both hex and dec ranges.  If filename was missing
12794         show usage information.
12796 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12798         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12799         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12801         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12802         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12803         (video_mod_SOURCES): Added.
12804         (video_mod_CFLAGS): Likewise.
12805         (video_mod_LDFLAGS): Likewise.
12806         (gfxterm_mod_SOURCES): Likewise.
12807         (gfxterm_mod_CFLAGS): Likewise.
12808         (gfxterm_mod_LDFLAGS): Likewise.
12809         (videotest_mod_SOURCES): Likewise.
12810         (videotest_mod_CFLAGS): Likewise.
12811         (videotest_mod_LDFLAGS): Likewise.
12812         (vesafb_mod_SOURCES): Removed.
12813         (vesafb_mod_CFLAGS): Likewise.
12814         (vesafb_mod_LDFLAGS): Likewise.
12815         (vga_mod_SOURCES): Likewise.
12816         (vga_mod_CFLAGS): Likewise.
12817         (vga_mod_LDFLAGS): Likewise.
12819         * commands/videotest.c: New file.
12821         * font/manager.c (fill_with_default_glyph): Modified to use
12822         grub_font_glyph.
12823         (grub_font_get_glyph): Likewise.
12824         (fontmanager): Renamed from this...
12825         (font_manager): ... to this.
12827         * include/grub/font.h (grub_font_glyph): Added new structure.
12828         (grub_font_get_glyph): Modified to use grub_font_glyph.
12830         * include/grub/misc.h (grub_abs): Added as inline function.
12832         * include/grub/video.h: New file.
12834         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12835         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12836         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12837         (grub_vbe_get_controller_info): Renamed from this...
12838         (grub_vbe_bios_get_controller_info): ... to this.
12839         (grub_vbe_get_mode_info): Renamed from this...
12840         (grub_vbe_bios_get_mode_info): ... to this.
12841         (grub_vbe_set_mode): Renamed from this...
12842         (grub_vbe_bios_set_mode): ... to this.
12843         (grub_vbe_get_mode): Renamed from this...
12844         (grub_vbe_bios_get_mode): ... to this.
12845         (grub_vbe_set_memory_window): Renamed from this...
12846         (grub_vbe_bios_set_memory_window): ... to this.
12847         (grub_vbe_get_memory_window): Renamed from this...
12848         (grub_vbe_bios_get_memory_window): ... to this.
12849         (grub_vbe_set_scanline_length): Renamed from this...
12850         (grub_vbe_set_scanline_length): ... to this.
12851         (grub_vbe_get_scanline_length): Renamed from this...
12852         (grub_vbe_bios_get_scanline_length): ... to this.
12853         (grub_vbe_set_display_start): Renamed from this...
12854         (grub_vbe_bios_set_display_start): ... to this.
12855         (grub_vbe_get_display_start): Renamed from this...
12856         (grub_vbe_bios_get_display_start): ... to this.
12857         (grub_vbe_set_palette_data): Renamed from this...
12858         (grub_vbe_bios_set_palette_data): ... to this.
12859         (grub_vbe_set_pixel_rgb): Removed.
12860         (grub_vbe_set_pixel_index): Likewise.
12862         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12863         from this...
12864         (grub_vbe_bios_get_controller_info): ... to this.
12865         (grub_vbe_get_mode_info): Renamed from this...
12866         (grub_vbe_bios_get_mode_info): ... to this.
12867         (grub_vbe_set_mode): Renamed from this...
12868         (grub_vbe_bios_set_mode): ... to this.
12869         (grub_vbe_get_mode): Renamed from this...
12870         (grub_vbe_bios_get_mode): ... to this.
12871         (grub_vbe_set_memory_window): Renamed from this...
12872         (grub_vbe_bios_set_memory_window): ... to this.
12873         (grub_vbe_get_memory_window): Renamed from this...
12874         (grub_vbe_bios_get_memory_window): ... to this.
12875         (grub_vbe_set_scanline_length): Renamed from this...
12876         (grub_vbe_set_scanline_length): ... to this.
12877         (grub_vbe_get_scanline_length): Renamed from this...
12878         (grub_vbe_bios_get_scanline_length): ... to this.
12879         (grub_vbe_set_display_start): Renamed from this...
12880         (grub_vbe_bios_set_display_start): ... to this.
12881         (grub_vbe_get_display_start): Renamed from this...
12882         (grub_vbe_bios_get_display_start): ... to this.
12883         (grub_vbe_set_palette_data): Renamed from this...
12884         (grub_vbe_bios_set_palette_data): ... to this.
12885         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12886         getting corrupted after calling it.  Added more pushes and pops.
12887         (grub_vbe_bios_set_mode): Likewise.
12888         (grub_vbe_bios_get_mode): Likewise.
12889         (grub_vbe_bios_get_memory_window): Likewise.
12890         (grub_vbe_bios_set_scanline_length): Likewise.
12891         (grub_vbe_bios_get_scanline_length): Likewise.
12892         (grub_vbe_bios_get_display_start): Likewise.
12893         (grub_vbe_bios_set_palette_data): Likewise.
12895         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12896         (cl_insert): Likewise.
12897         (cl_delete): Likewise.
12899         * term/gfxterm.c: New file.
12901         * term/i386/pc/vesafb.c: Removed file.
12903         * video/video.c: New file.
12905         * video/i386/pc/vbe.c (real2pm): Added new function.
12906         (grub_video_vbe_draw_pixel): Likewise.
12907         (grub_video_vbe_get_video_ptr): Likewise.
12908         (grub_video_vbe_get_pixel): Likewise
12909         (grub_video_vbe_init): Likewise.
12910         (grub_video_vbe_fini): Likewise.
12911         (grub_video_vbe_setup): Likewise.
12912         (grub_video_vbe_get_info): Likewise.
12913         (grub_video_vbe_set_palette): Likewise.
12914         (grub_video_vbe_get_palette): Likewise.
12915         (grub_video_vbe_set_viewport): Likewise.
12916         (grub_video_vbe_get_viewport): Likewise.
12917         (grub_video_vbe_map_color): Likewise.
12918         (grub_video_vbe_map_rgb): Likewise.
12919         (grub_video_vbe_map_rgba): Likewise.
12920         (grub_video_vbe_unmap_color): Likewise.
12921         (grub_video_vbe_fill_rect): Likewise.
12922         (grub_video_vbe_blit_glyph): Likewise.
12923         (grub_video_vbe_blit_bitmap): Likewise.
12924         (grub_video_vbe_blit_render_target): Likewise.
12925         (grub_video_vbe_scroll): Likewise.
12926         (grub_video_vbe_swap_buffers): Likewise.
12927         (grub_video_vbe_create_render_target): Likewise.
12928         (grub_video_vbe_delete_render_target): Likewise.
12929         (grub_video_vbe_set_active_render_target): Likewise.
12930         (grub_vbe_set_pixel_rgb): Remove function.
12931         (grub_vbe_set_pixel_index): Likewise.
12932         (index_color_mode): Remove static variable.
12933         (active_mode): Likewise.
12934         (framebuffer): Likewise.
12935         (bytes_per_scan_line): Likewise.
12936         (grub_video_vbe_adapter): Added new static variable.
12937         (framebuffer): Likewise.
12938         (render_target): Likewise.
12939         (initial_mode): Likewise.
12940         (mode_in_use): Likewise.
12941         (mode_list): Likewise.
12943 2006-03-10  Marco Gerards  <marco@gnu.org>
12945         * configure.ac (AC_INIT): Bumped to 1.93.
12947         * DISTLIST: Added `include/grub/hfs.h'.
12949 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12951         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12952         18H, which might help the BIOS falling back to next boot media.
12954 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12956         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12957         Poe Chen <poe.poechen@gmail.com>.
12959 2006-01-17  Marco Gerards  <marco@gnu.org>
12961         * include/grub/normal.h: Include <grub/script.h>.
12962         (grub_command_list): Removed struct.
12963         (grub_command_list_t): Removed type.
12964         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12965         members `commands' and `sourcecode'.
12966         * include/grub/script.h: Add inclusion guards.
12967         (grub_script_cmd_menuentry): New struct.
12968         (grub_script_execute_menuentry): New prototype.
12969         (grub_script_lexer_record_start): Likewise.
12970         (grub_script_lexer_record_stop): Likewise.
12971         * normal/execute.c (grub_script_execute_menuentry): New function.
12972         * normal/lexer.c (record, recording, recordpos, recordlen): New
12973         variables.
12974         (grub_script_lexer_record_start): New function.
12975         (grub_script_lexer_record_stop): Likewise.
12976         (recordchar): Likewise.
12977         (nextchar): Likewise.
12978         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12979         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12980         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12981         (current_menu): New variable.
12982         (free_menu): Mainly rewritten.
12983         (grub_normal_menu_addentry): New function.
12984         (read_config_file): Rewritten.
12985         * normal/menu.c (run_menu_entry): Mainly rewritten.
12986         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12987         the menu entry.
12988         (run): Mainly rewritten.
12989         * normal/parser.y (menu_entry): New variable.
12990         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12991         (menuentry): New rule.
12992         (command): Add `menuentry'.
12993         (if_statement): Allow additional returns before `fi'.
12994         * normal/script.c (grub_script_create_cmdmenu): New function.
12996 2006-01-03  Marco Gerards  <marco@gnu.org>
12998         * INSTALL: GNU Bison is required.
12999         * configure.ac: Rewritten the test to detect Bison.
13000         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13001         <xun.sun.cn@gmail.com>.
13003 2006-01-03  Marco Gerards  <marco@gnu.org>
13005         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13006         the HFS+ filesystem to filesystem blocks.
13007         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13008         GCC warning is silenced.
13010 2006-01-03  Marco Gerards  <marco@gnu.org>
13012         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13013         read from disk from big endian to host byte order.
13015 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13017         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13018         documentation.
13019         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13020         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13021         embedded HFS+ filesystem.
13022         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13023         (grub_hfs_sblock): Move from here...
13024         * include/grub/hfs.h: To here...  New file.
13025         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13026         documentation.
13027         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13028         New macros.
13029         (grub_hfsplus_volheader): Change type of member `magic' to
13030         `grub_uint16_t'.
13031         (grub_hfsplus_data): Add new member `embedded_offset'.
13032         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13033         returned block.
13034         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13035         Calculate the offset.
13037 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13039         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13040         Removed.
13041         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13043 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13045         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13046         ENV->NAME is NULL after allocating ENV->VALUE.
13048 2005-12-25  Marco Gerards  <marco@gnu.org>
13050         * kern/env.c (grub_env_set): Rewritten the error handling code.
13052 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13054         * geninit.sh: Made more robust, and more portable.
13056 2005-12-25  Marco Gerards  <marco@gnu.org>
13058         Add support for Apple HFS+ filesystems.
13060         * fs/hfsplus.c: New file.
13062         * DISTLIST: Added `fs/hfsplus.c'.
13064         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13065         (hfsplus_mod_SOURCES): New variable.
13066         (hfsplus_mod_CFLAGS): Likewise.
13067         (hfsplus_mod_LDFLAGS): Likewise.
13068         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13069         (grub_setup_SOURCES): Likewise.
13070         (grub_mkdevicemap_SOURCES): Likewise.
13071         (grub_emu_SOURCES): Likewise.
13072         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13074         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13076         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13078 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13080         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13081         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13082         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13083         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13084         normal/lexer.c, normal/parser.y, normal/script.c, and
13085         partmap/gpt.c.
13086         Removed kern/sparc64/cache.c.
13088         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13089         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13090         grub_emu_init.c.
13092         * configure.ac (AC_INIT): Bumped to 1.92.
13094 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13096         * kern/err.c (grub_error_push): Added new function to support error
13097         stacks.
13098         (grub_error_pop): Likewise.
13099         (grub_error_stack_items): New local variable to support error stacks.
13100         (grub_error_stack_pos): Likewise.
13101         (grub_error_stack_assert): Likewise.
13102         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13103         stack depth.
13104         (grub_print_error): Added support to print errors from error stack.
13106         * include/grub/err.h (grub_error_push): Added function prototype.
13107         (grub_error_pop): Likewise.
13109 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13111         * configure.ac: Accept `powerpc64' as host_cpu.
13112         (amd64): Rename to `biarch32'.
13114         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13115         non-cacheline-aligned addresses.
13117         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13118         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13119         if `size' is non-zero.
13121 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13123         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13124         and `cd' to make sure the filename is not prefixed with a
13125         directory name.
13126         (pkgdata_MODULES): Add `gpt.mod'.
13127         (gpt_mod_SOURCES): New variable.
13128         (gpt_mod_CFLAGS): Likewise.
13129         (gpt_mod_LDFLAGS): Likewise.
13131         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13133         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13134         New macro.
13136         * partmap/gpt.c: New file.
13138         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13139         GPT partition map is detected.
13141 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13143         * commands/i386/pc/play.c: New file.
13144         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13145         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13146         macros.
13148 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13150         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13151         ((unused))' to silence gcc warning.
13153 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13155         * configure.ac: Correct `AC_PROG_YACC' test.
13157 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13159         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13160         check before installing files.
13162 2005-11-22  Mike Small  <smallm@panix.com>
13164         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13165         number regex so multidigit numbers are recognized correctly.
13167 2005-11-22  Mike Small  <smallm@panix.com>
13169         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13170         debugging message before attempting to claim memory.
13171         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13172         multiple addresses in case of failure.
13174 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13176         * term/tparm.c (get_space): Remove empty `if' statement.
13178         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13180         * kern/parser.c (check_varstate): Rename `state' to 's'.
13182 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13184         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13185         variable definitions to the beginning of each function.  Sort stack
13186         variables by size.
13187         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13188         `buf' argument to `char *'.
13190 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13192         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13193         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13194         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13195         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13196         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13197         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13198         configfile.mod, search.mod, gzio.mod and test.mod.
13199         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13200         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13201         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13202         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13203         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13204         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13205         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13206         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13207         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13208         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13209         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13210         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13211         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13212         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13213         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13214         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13215         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13216         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13217         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13218         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13219         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13220         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13221         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13223         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13224         `grep --include'.
13225         (pkgdata_MODULES): Add test.mod.
13227 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13229         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13230         appending to variables with "+=".
13231         (PModule): Use full pathname to generate *.lst filenames.
13233         * Makefile.in: Fixed list rules moved from genmk.rb.
13234         (.DELETE_ON_ERROR): New special target.
13235         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13237         * conf/i386-pc.rmk: Include conf/common.mk.
13238         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13239         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13240         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13241         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13242         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13243         configfile.mod, search.mod, gzio.mod and test.mod.
13244         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13245         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13246         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13247         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13248         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13249         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13250         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13251         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13252         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13253         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13254         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13255         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13256         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13257         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13258         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13259         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13260         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13261         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13262         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13263         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13264         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13265         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13266         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13267         here...
13268         * conf/common.rmk: ... to here.  New file.
13270         * conf/common.mk: New file.
13272 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13274         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13275         (grub_script.tab.c): ... here.
13277         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13278         (grub_script.tab.c): ... here.
13280         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13281         (grub_script.tab.c): ... here.
13283         * normal/command.c (grub_command_find): Fixed a memory leak of
13284         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13286 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13288         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13289         "@" which marks the start of a comment on ARM.
13290         (VARIABLE): Likewise.
13292 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13294         Add support for Linux/ADFS partition tables.
13296         * partmap/acorn.c: New file.
13298         * include/grub/acorn_filecore.h: Likewise.
13300         * DISTLIST: Added `partmap/acorn.c' and
13301         `include/grub/acorn_filecore.h'.
13303         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13304         `partmap/acorn.c'.
13305         (pkgdata_MODULES): Add `acorn.mod'.
13306         (acorn_mod_SOURCES): New variable.
13307         (acorn_mod_CFLAGS): Likewise.
13309         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13310         `partmap/acorn.c'.
13311         (pkgdata_MODULES): Add `acorn.mod'.
13312         (acorn_mod_SOURCES): New variable.
13313         (acorn_mod_CFLAGS): Likewise.
13315         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13316         (pkgdata_MODULES): Add `acorn.mod'.
13317         (acorn_mod_SOURCES): New variable.
13318         (acorn_mod_CFLAGS): Likewise.
13319         (acorn_mod_LDFLAGS): Likewise.
13321         * include/types.h (grub_disk_addr_t): New typedef.
13323 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13325         * geninit.sh: New file.
13327         * geninitheader.sh: Likewise.
13329         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13330         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13331         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13332         * commands/configfile.c (grub_configfile_init)
13333         (grub_configfile_fini): Likewise.
13334         * commands/default.c (grub_default_init, grub_default_fini):
13335         Likewise.
13336         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13337         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13338         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13339         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13340         Likewise.
13341         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13342         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13343         Likewise.
13344         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13345         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13346         Likewise.
13347         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13348         Likewise.
13349         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13350         Likewise.
13351         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13352         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13353         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13354         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13355         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13356         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13357         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13358         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13359         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13360         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13361         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13362         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13363         * partmap/amiga.c (grub_amiga_partition_map_init)
13364         (grub_amiga_partition_map_fini): Likewise.
13365         * partmap/apple.c (grub_apple_partition_map_init)
13366         (grub_apple_partition_map_fini): Likewise.
13367         * partmap/pc.c (grub_pc_partition_map_init)
13368         (grub_pc_partition_map_fini): Likewise.
13369         * partmap/sun.c (grub_sun_partition_map_init,
13370         grub_sun_partition_map_fini): Likewise.
13371         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13372         Likewise.
13374         * util/grub-emu.c: Include <grub_modules_init.h>.
13375         (main): Don't initialize and de-initialize any modules directly,
13376         use `grub_init_all' and `grub_fini_all' instead.
13378         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13379         `grub_vesafb_mod_init'.
13380         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13381         all users.
13382         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13383         `grub_vga_mod_init'.  Updated all users.
13384         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13386         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13387         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13388         rules.
13390         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13391         Generate a function to initialize the module in utilities.
13392         Updated all callers.
13393         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13394         initialize the module in utilities.  Updated all callers.
13396 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13398         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13399         escape sequence and a literal ^L to clear the screen.
13401         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13402         when returning from Open Firmware.
13404 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13406         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13407         (grub_ofconsole_height): Likewise.
13408         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13409         manually insert a '\n'.
13410         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13411         `grub_ofconsole_height'.  Return early if these are already set.
13413 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13415         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13416         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13417         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13418         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13419         and `normal/script.c'.
13420         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13421         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13422         (test_mod_SOURCES): New variable.
13423         (test_mod_CFLAGS): Likewise.
13424         (test_mod_LDFLAGS): Likewise.
13425         (pkgdata_MODULES): Add `test.mod'.
13426         (grub_script.tab.c): New rule.
13427         (grub_script.tab.h): Likewise.
13429 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13431         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13432         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13433         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13434         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13435         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13436         (test_mod_SOURCES): New variable.
13437         (test_mod_CFLAGS): Likewise.
13438         (pkgdata_MODULES): Add `test.mod'.
13439         (grub_script.tab.c): New rule.
13440         (grub_script.tab.h): Likewise.
13442 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13444         Add initial scripting support.
13446         * commands/test.c: New file.
13447         * include/grub/script.h: Likewise.
13448         * normal/execute.c: Likewise.
13449         * normal/function.c: Likewise.
13450         * normal/lexer.c: Likewise.
13451         * normal/parser.y: Likewise.
13452         * normal/script.c: Likewise.
13454         * configure.ac: Add `AC_PROG_YACC' test.
13456         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13457         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13458         `normal/function.c' and `normal/script.c'.
13459         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13460         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13461         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13462         variables.
13463         (pkgdata_MODULES): Add `test.mod'.
13464         (grub_script.tab.c): New rule.
13465         (grub_script.tab.h): Likewise.
13467         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13469         * include/grub/normal.h (grub_test_init): New prototype.
13470         (grub_test_fini): Likewise.
13472         * normal/command.c: Include <grub/script.h>.
13473         (grub_command_execute): Rewritten.
13475         * util/grub-emu.c (main): Call `grub_test_init' and
13476         `grub_test_fini'.
13478 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13480         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13481         to 0.
13482         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13483         there are no pending characters.
13485 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13487         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13488         `grub_strndup' to drop device arguments. Replace unnecessary
13489         `grub_strndup' with `grub_strdup'.
13491 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13493         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13494         `debug' environment variable has been set.
13496 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13498         * Makefile.in (install-local): Use $(DATA).
13499         (uninstall): Likewise.
13500         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13501         (sbin_UTILITIES): ... to here.
13502         (sbin_SCRIPTS): New variable.
13503         (grub_install_SOURCES): New variable.
13504         * util/powerpc/ieee1275/grub-install.in: New file.
13505         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13506         variable.
13507         (add_segments): Call `grub_util_get_path'.
13509 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13511         From Timothy Baldwin:
13512         * commands/ls.c (grub_ls_list_files): Close FILE with
13513         grub_file_close.
13514         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13516 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13518         * include/grub/parser.h: New file.
13520         * kern/parser.c: Likewise.
13522         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13523         (grub_setup_SOURCES): Likewise.
13524         (grub_probefs_SOURCES): Likewise.
13525         (grub_emu_SOURCES): Likewise.
13526         (kernel_img_HEADERS): Add `parser.h'.
13528         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13529         (grub_emu_SOURCES): Add `kern/parser.c'.
13530         (grubof_SOURCES): Likewise.
13532         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13533         (grubof_SOURCES): Add `kern/parser.c'.
13535         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13537         * kern/misc.c (grub_split_cmdline): Removed function.
13539         * kern/rescue.c: Include <grub/parser.h>.
13540         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13541         of `grub_split_cmdline'.
13543         * normal/command.c: Include <grub/parser.h>.
13544         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13545         of `grub_split_cmdline'.
13547         * normal/completion.c: Include <grub/parser.h>.
13548         (cmdline_state): New variable.
13549         (iterate_dir): End the filename with a quote depending on the
13550         command line state.
13551         (get_state): new function.
13552         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13553         split the arguments and determine the current argument.  When the
13554         argument string is not quoted, escape all spaces.
13556 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13558         * normal/sparc64/setjmp.S: New file.
13560 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13562         * include/grub/sparc64/libgcc.h: New file.
13563         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13564         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13565         normal/sparc64/setjmp.c.
13567 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13569         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13570         * kern/sparc64/cache.S: New file.
13571         * kern/sparc64/cache.c: Removed.
13572         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13573         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13574         -mtune=ultrasparc.
13575         (COMMON_LDFLAGS): Add -melf64_sparc.
13576         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13577         (grubof_SOURCES): Use cache.S instead of cache.c.
13578         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13579         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13580         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13581         commented though.
13582         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13583         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13584         (linux_mod_CFLAGS): Commented out.
13585         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13586         out because module isn't built.
13587         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13588         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13589         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13590         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13591         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13592         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13593         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13594         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13595         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13596         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13597         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13598         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13599         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13600         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13602 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13604         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13605         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13606         longer, because HFS should not be used on PC.
13608 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13610         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13611         consistently within the loop.
13613 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13615         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13616         directory can not be read.
13618 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13620         * configure.ac (AC_INIT): Increase the version number to 1.91.
13622         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13623         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13624         term/i386/pc/serial.c.
13626 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13628         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13629         file size must be permitted.
13631         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13632         between %ah and %al.
13634 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13636         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13637         grub_uint64_t.
13638         Call the hook with a NUL-terminated filename.
13639         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13640         grub_cpu_to_be32.
13642         * kern/term.c (cursor_state): New variable.
13643         (grub_term_set_current): Reset the cursor state on a new
13644         terminal.
13645         (grub_setcursor): Rewritten to use CURSOR_STATE.
13646         (grub_getcursor): New function.
13648         * include/grub/term.h (grub_getcursor): New prototype.
13650         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13651         integers on ARM. Reported by Timothy Baldwin
13652         <T.E.Baldwin99@members.leeds.ac.uk>.
13654 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13656         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13657         allocated.
13658         (grub_sfs_dir): Likewise.
13660 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13662         Add support for the SFS filesystem.
13664         * fs/sfs.c: New file.
13666         * DISTLIST: Added `fs/sfs.c'.
13668         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13669         (grub_probefs_SOURCES): Likewise.
13670         (grub_emu_SOURCES): Likewise.
13671         (pkgdata_MODULES): Add `sfs.mod'.
13672         (sfs_mod_SOURCES): New variable.
13673         (sfs_mod_CFLAGS): Likewise.
13674         (sfs_mod_LDFLAGS): Likewise.
13676         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13677         (pkgdata_MODULES): Add `sfs.mod'.
13678         (sfs_mod_SOURCES): New variable.
13679         (sfs_mod_CFLAGS): Likewise.
13681         * util/grub-emu.c (main): Call `grub_sfs_init' and
13682         `grub_sfs_fini'.
13684         * include/grub/fs.h (grub_sfs_init): New prototype.
13685         (grub_sfs_fini): Likewise.
13687 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13689         Add support for the AFFS filesystem.
13691         * fs/affs.c: New file.
13693         * DISTLIST: Added `fs/affs.c'.
13695         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13696         (grub_probefs_SOURCES): Likewise.
13697         (grub_emu_SOURCES): Likewise.
13698         (pkgdata_MODULES): Add `affs.mod'.
13699         (affs_mod_SOURCES): New variable.
13700         (affs_mod_CFLAGS): Likewise.
13701         (affs_mod_LDFLAGS): Likewise.
13703         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13704         (pkgdata_MODULES): Add `affs.mod'.
13705         (affs_mod_SOURCES): New variable.
13706         (affs_mod_CFLAGS): Likewise.
13708         * util/grub-emu.c (main): Call `grub_affs_init' and
13709         `grub_affs_fini'.
13711         * include/grub/fs.h (grub_affs_init): New prototype.
13712         (grub_affs_fini): Likewise.
13714 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13716         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13718 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13720         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13721         `-m32' to CFLAGS.
13723         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13724         linking.
13726         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13727         (COMMON_LDFLAGS): New variable.
13728         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13729         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13730         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13731         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13732         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13733         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13734         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13735         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13736         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13737         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13738         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13739         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13740         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13741         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13742         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13743         variables.
13744         (normal_mod_ASFLAGS): Add `-m32'.
13746         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13747         (grub_host_size_t, grub_host_ssize_t): New types.
13748         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13749         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13750         `GRUB_HOST_SIZEOF_VOID_P'.
13752         * include/grub/kernel.h (struct grub_module_header): Type of
13753         member offset changed to `grub_host_off_t'.  Type of member size
13754         changed to `grub_host_size_t'.
13755         (struct grub_module_info): Type of member offset changed to
13756         `grub_host_off_t'.  Type of member size changed to
13757         `grub_host_size_t'.
13759 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13761         Make GRUB's kernel compliant to Multiboot Specification.
13763         * kern/i386/pc/startup.S (multiboot_header): New label.
13764         (multiboot_entry): Likewise.
13765         (multiboot_trampoline): Likewise.
13767         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13768         Increased to 0x4A0.
13770         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13771         put parentheses after a question mark.
13772         [!GRUB_UTIL] (my_mod): New variable.
13774         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13776 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13778         Adds support for the XFS filesystem.  Btrees are not supported
13779         yet.
13781         * fs/xfs.c: New file.
13783         * DISTLIST: Added `fs/xfs.c'.
13785         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13786         (grub_probefs_SOURCES): Likewise.
13787         (grub_emu_SOURCES): Likewise.
13788         (pkgdata_MODULES): Add `xfs.mod'.
13789         (xfs_mod_SOURCES): New variable.
13790         (xfs_mod_CFLAGS): Likewise.
13792         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13793         (pkgdata_MODULES): Add `xfs.mod'.
13794         (xfs_mod_SOURCES): New variable.
13795         (xfs_mod_CFLAGS): Likewise.
13797         * util/grub-emu.c (main): Call `grub_xfs_init' and
13798         `grub_xfs_fini'.
13800         * include/grub/fs.h (grub_xfs_init): New prototype.
13801         (grub_xfs_fini): Likewise.
13804 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13806         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13807         color modes, allow greater than 16 colors to be configured as
13808         a default palette.
13810 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13812         * normal/completion.c (complete_arguments): Add the qualifier
13813         const into OPTIONS.
13815         From Omniflux <omniflux+lists@omniflux.com>:
13816         * include/grub/terminfo.h: New file.
13817         * include/grub/tparm.h: Likewise.
13818         * include/grub/i386/pc/serial.h: Likewise.
13819         * term/terminfo.c: Likewise.
13820         * term/tparm.c: Likewise.
13821         * term/i386/pc/serial.c: Likewise.
13822         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13823         serial.mod.
13824         (terminfo_mod_SOURCES): New variable.
13825         (terminfo_mod_CFLAGS): Likewise.
13826         (serial_mod_SOURCES): Likewise.
13827         (serial_mod_CFLAGS): Likewise.
13829 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13831         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13832         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13833         and kern/powerpc/ieee1275/cmain.c, respectively.
13835         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13836         * kern/powerpc/ieee1275/crt0.S: ... here.
13838         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13839         * kern/powerpc/ieee1275/cmain.c: ... here.
13841         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13842         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13843         instead of boot/powerpc/ieee1275/crt0.S and
13844         boot/powerpc/ieee1275/cmain.c, respectively.
13846         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13847         sectors. It was not used anyway.
13849 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13851         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13852         `unused parameter' warning.
13854 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13856         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13857         function.
13858         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13859         getcharwidth.
13861 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13863         * include/grub/normal.h (enum grub_completion_type): Added
13864         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13866         * normal/cmdline.c (print_completion): Handle
13867         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13868         * normal/menu_entry.c (store_completion): Likewise.
13870         * normal/completion.c (complete_arguments): New function.
13871         (grub_normal_do_completion): Call `complete_arguments' when the
13872         current words start with a dash.
13874 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13876         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13877         `gzio.mod' instead of `io.mod').
13879 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13881         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13882         (DISTDIRS): Added io and video.
13883         Rewrite the search routine to make an output consistently.
13885         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13886         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13887         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13888         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13889         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13890         util/powerpc/ieee1275/misc.c.
13892         * include/grub/gzio.h: New file.
13893         * io/gzio.c: Likewise.
13895         * kern/file.c (grub_file_close): Call grub_device_close only if
13896         FILE->DEVICE is not NULL.
13898         * include/grub/mm.h [!NULL] (NULL): New macro.
13900         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13902         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13903         (pkgdata_MODULES): Added gzio.mod.
13904         (gzio_mod_SOURCES): New variable.
13905         (gzio_mod_CFLAGS): Likewise.
13907         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13908         (pkgdata_MODULES): Added gzio.mod.
13909         (gzio_mod_SOURCES): New variable.
13910         (gzio_mod_CFLAGS): Likewise.
13912         * commands/cat.c: Include grub/gzio.h.
13913         (grub_cmd_cat): Use grub_gzfile_open instead of
13914         grub_file_open.
13916         * commands/cmp.c: Include grub/gzio.h.
13917         (grub_cmd_cmp): Use grub_gzfile_open instead of
13918         grub_file_open.
13920         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13921         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13922         grub_file_open.
13923         (grub_rescue_cmd_module): Likewise.
13925 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13927         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13928         kern/sparc64/ieee1275/init.c because it contains _start.
13929         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13931 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13933         * configure.ac: Add support for sparc64 host with ieee1275
13934         firmware.
13935         * configure: Generated from configure.ac.
13936         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13937         instead of int.
13938         (grub_ofdisk_read): Likewise.
13939         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13940         pointers as (void *) to remove a warning.
13941         (grub_ofdisk_close): Likewise.
13942         (grub_ofdisk_read): Likewise.
13943         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13944         returns, so make it return void to remove a warning.
13945         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13946         Corresponding prototype change.
13947         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13948         values, and cast the pointers as (void *) to remove a warning.
13949         (grub_mm_dump): Likewise.
13950         * conf/sparc64-ieee1275.mk: New file.
13951         * conf/sparc64-ieee1275.rmk: Likewise.
13952         * include/grub/sparc64/setjmp.h: Likewise.
13953         * include/grub/sparc64/types.h: Likewise.
13954         * include/grub/sparc64/ieee1275/console.h: Likewise.
13955         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13956         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13957         * include/grub/sparc64/ieee1275/time.h: Likewise.
13958         * kern/sparc64/cache.c: Likewise.
13959         * kern/sparc64/dl.c: Likewise.
13960         * kern/sparc64/ieee1275/init.c: Likewise.
13961         * kern/sparc64/ieee1275/openfw.c: Likewise.
13963 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13965         * util/console.c (grub_ncurses_putchar): If C is greater than
13966         0x7f, set C to a question mark.
13967         (grub_ncurses_getcharwidth): New function.
13968         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13969         getcharwidth.
13971         * normal/menu.c (print_entry): Made aware of Unicode. First,
13972         convert TITLE to UCS-4, and predict the cursor position by
13973         grub_getcharwidth.
13975         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13976         const to SRC.
13977         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13979 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13981         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13982         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13983         grub_strcat.
13985         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13986         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13987         grub_strcpy and grub_strlen. Take it into account that a space
13988         character is inserted as a delimiter.
13990 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13992         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13993         invalid magic in the error.
13995         * commands/search.c: New file.
13997         * util/grub-emu.c (main): Call grub_search_init and
13998         grub_search_fini.
14000         * kern/rescue.c (grub_rescue_print_disks): Removed.
14001         (grub_rescue_print_devices): New function.
14002         (grub_rescue_cmd_ls): Use grub_device_iterate with
14003         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14004         grub_rescue_print_disks.
14006         * kern/partition.c (grub_partition_iterate): Return the result of
14007         PARTMAP->ITERATE instead of GRUB_ERRNO.
14009         * kern/device.c: Include grub/partition.h.
14010         (grub_device_iterate): New function.
14012         * include/grub/partition.h (grub_partition_iterate): Return int
14013         instead of grub_err_t.
14015         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14016         prototype.
14017         [GRUB_UTIL] (grub_search_fini): Likewise.
14019         * include/grub/device.h (grub_device_iterate): New prototype.
14021         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14022         commands/search.c.
14023         (pkgdata_MODULES): Added search.mod.
14024         (search_mod_SOURCES): New variable.
14025         (search_mod_CFLAGS): Likewise.
14027         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14028         (pkgdata_MODULES): Added search.mod.
14029         (search_mod_SOURCES): New variable.
14030         (search_mod_CFLAGS): Likewise.
14032         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14033         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14034         All callers changed.
14036         * DISTLIST: Added commands/search.c.
14038 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14040         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14041         conversion.
14042         (grub_getcharwidth): New function.
14044         * kern/misc.c (grub_utf8_to_ucs4): New function.
14046         * include/grub/term.h (struct grub_term): Added a new member
14047         "getcharwidth".
14048         (grub_getcharwidth): New prototype.
14050         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14052         * term/i386/pc/console.c (map_char): New function. Segregated from
14053         grub_console_putchar.
14054         (grub_console_putchar): Use map_char.
14055         (grub_console_getcharwidth): New function.
14056         (grub_console_term): Specified grub_console_getcharwidth as
14057         getcharwidth.
14059         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14060         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14062         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14063         GRUB_ERRNO.
14064         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14065         on grub_strtoul completely.
14066         (write_char): Declare local variables in the beginning of the
14067         function.
14068         (grub_vesafb_getcharwidth): New function.
14069         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14070         getcharwidth.
14072 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14074         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14075         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14076         commands/i386/pc/vbetest.c.
14078         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14079         call grub_vbe_get_controller_info again, because the returned
14080         information is volatile.
14081         (grub_vbe_set_video_mode): Mostly rewritten.
14082         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14083         grub_vbe_status_t correctly.
14084         (grub_vbe_get_video_mode_info): Likewise.
14085         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14086         several if statements.
14088         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14089         * commands/i386/pc/vbeinfo.c: ... this.
14091         * commands/i386/pc/vbe_test.c: Renamed to ...
14092         * commands/i386/pc/vbetest.c: ... this.
14094         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14095         ...
14096         (grub_cmd_vbeinfo): ... this. Save video modes before
14097         iterating. Skip a video mode, if it is not available, not enough
14098         information is given or it is monochrome. Show the memory
14099         model. Leave the interpretation of MODEVAR to grub_strtoul
14100         completely.
14101         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14102         (GRUB_MOD_FINI): Likewise.
14104         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14105         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14106         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14107         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14108         grub_strtoul completely.
14109         (real2pm): Removed.
14110         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14111         (GRUB_MOD_FINI): Likewise.
14113         * normal/misc.c: Include grub/mm.h.
14115         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14116         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14117         (vbe_list_modes_mod_SOURCES): Removed.
14118         (vbe_list_modes_mod_CFLAGS): Likewise.
14119         (vbe_test_mod_SOURCES): Likewise.
14120         (vbe_test_mod_CFLAGS): Likewise.
14121         (vbeinfo_mod_SOURCES): New variable.
14122         (vbeinfo_mod_CFLAGS): Likewise.
14123         (vbetest_mod_SOURCES): Likewise.
14124         (vbetest_mod_CFLAGS): Likewise.
14126 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14128         * normal/misc.c: New file.
14130         * DISTLIST: Added normal/misc.c.
14132         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14133         DISK to HOOK. Call HOOK with DISK.
14134         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14135         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14136         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14138         * normal/menu_entry.c (struct screen): Added a new member
14139         "completion_shown".
14140         (completion_buffer): New global variable.
14141         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14142         (store_completion): New function.
14143         (complete): Likewise.
14144         (clear_completions): Likewise.
14145         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14146         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14147         a tab, call complete.
14149         * normal/completion.c (disk_dev): Removed.
14150         (print_simple_completion): Likewise.
14151         (print_partition_completion): Likewise.
14152         (print_func): New global variable.
14153         (add_completion): Do not take the arguments WHAT or PRINT any
14154         longer. Added a new argument TYPE. Instead of printing directly,
14155         call PRINT_FUNC if not NULL.
14156         All callers changed.
14157         (complete_device): Use a local variable DEV instead of
14158         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14159         (grub_normal_do_completion): Take a new argument HOOK. Do not
14160         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14161         empty string, return NULL instead.
14162         All callers changed.
14164         * normal/cmdline.c (print_completion): New function.
14166         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14167         to HOOK.
14168         All callers changed.
14170         * kern/disk.c (grub_print_partinfo): Removed.
14172         * include/grub/partition.h (struct grub_partition_map): Add a new
14173         argument DISK into HOOK of ITERATE.
14174         (grub_partition_iterate): Add a new argument DISK to HOOK.
14176         * include/grub/normal.h (enum grub_completion_type): New enum.
14177         (grub_completion_type_t): New type.
14178         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14179         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14180         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14181         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14182         (grub_normal_do_completion): Added a new argument HOOK.
14183         (grub_normal_print_device_info): New prototype.
14185         * include/grub/disk.h (grub_print_partinfo): Removed.
14187         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14188         (normal_mod_SOURCES): Likewise.
14189         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14190         (normal_mod_SOURCES): Likewise.
14192         * commands/ls.c (grub_ls_list_disks): Use
14193         grub_normal_print_device_info instead of grub_print_partinfo. Free
14194         PNAME.
14195         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14196         duplicating the code.
14198 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14200         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14201         follow GCS more precisely.
14202         * commands/i386/pc/vbe_test.c: Likewise.
14203         * include/grub/i386/pc/vbe.h: Likewise.
14204         * term/i386/pc/vesafb.c: Likewise.
14205         * video/i386/pc/vbe.c: Likewise.
14207 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14209         * DISTLIST: Added term/i386/pc/vesafb.c
14210         DISTLIST: Added video/i386/pc/vbe.c
14211         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14212         DISTLIST: Added commands/i386/pc/vbe_test.c.
14213         * commands/i386/pc/vbe_list_modes.c: New file.
14214         * commands/i386/pc/vbe_test.c: Likewise.
14215         * term/i386/pc/vesafb.c: Likewise.
14216         * video/i386/pc/vbe.c: Likewise.
14217         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14218         (grub_vbe_probe) Added prototype.
14219         (grub_vbe_set_video_mode) Likewise.
14220         (grub_vbe_get_video_mode) Likewise.
14221         (grub_vbe_get_video_mode_info) Likewise.
14222         (grub_vbe_set_pixel_rgb) Likewise.
14223         (grub_vbe_set_pixel_index) Likewise.
14224         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14225         (pkgdata_MODULES): Added vesafb.mod.
14226         (pkgdata_MODULES): Added vbe_list_modes.mod.
14227         (pkgdata_MODULES): Added vbe_test.mod.
14228         (vbe_mod_SOURCES): Added.
14229         (vbe_mod_CFLAGS): Likewise.
14230         (vesafb_mod_SOURCES): Likewise.
14231         (vesafb_mod_CFLAGS): Likewise.
14232         (vbe_list_modes_mod_SOURCES): Likewise.
14233         (vbe_list_modes_mod_CFLAGS): Likewise.
14234         (vbe_test_mod_SOURCES): Likewise.
14235         (vbe_test_mod_CFLAGS): Likewise.
14237 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14239         * normal/command.c (grub_command_execute): If INTERACTIVE is
14240         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14241         CMDLINE. Disable the pager if INTERACTIVE is true.
14242         All callers are changed.
14244         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14245         before reading a config file.
14246         * normal/main.c (read_config_file): Even if a command is not
14247         found, register it if it is within an entry.
14249         * util/grub-emu.c: Include sys/types.h and unistd.h.
14250         (options): Added --hold.
14251         (struct arguments): Added a new member "hold".
14252         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14253         missing.
14254         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14255         cleared by a debugger, if it is not zero.
14257         * include/grub/normal.h (grub_command_execute): Add an argument
14258         INTERACTIVE.
14260 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14262         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14264 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14266         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14267         program with another one, because the old one didn't detect a bug
14268         in gcc-3.4. Always use regparm 2, because the new test is still
14269         not enough for gcc-4.0. Someone must investigate a simple test
14270         case which detects a bug in gcc-4.0.
14272 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14274         * DISTLIST: Added normal/completion.c.
14276         * normal/completion.c: New file.
14278         * term/i386/pc/console.c (grub_console_getwh): New function.
14279         (grub_console_term): Assign grub_console_getwh to getwh.
14281         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14282         function is defined in normal/completion.c as
14283         grub_normal_do_completion.
14284         (grub_cmdline_get): Use grub_normal_do_completion instead of
14285         grub_tab_complete.
14287         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14288         returns non-zero, otherwise return 0.
14289         (grub_partition_iterate): First, probe the partition map. Then,
14290         call ITERATE only for this partition map.
14292         * kern/misc.c (grub_strncmp): Rewritten.
14294         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14295         returns non-zero. Otherwise return 0.
14297         * include/grub/partition.h (grub_partition_map_iterate): Return
14298         int instead of void.
14300         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14302         * include/grub/misc.h (grub_strncmp): Change the type of N to
14303         grub_size_t.
14305         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14306         of void.
14308         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14309         unsigned explicitly before comparing it with I.
14311         * kern/main.c (grub_env_write_root): Add the attribute unused into
14312         VAR.
14314         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14315         normal/completion.c.
14316         (normal_mod_SOURCES): Likewise.
14317         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14318         (normal_mod_SOURCES): Likewise.
14320         * normal/command.c (grub_iterate_commands): If ITERATE returns
14321         non-zero, return one immediately.
14323 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14325         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14326         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14327         descriptions.
14328         (grub_vbe_get_controller_info): New function.
14329         (grub_vbe_get_mode_info): Likewise.
14330         (grub_vbe_set_mode): Likewise.
14331         (grub_vbe_get_mode): Likewise.
14332         (grub_vbe_set_memory_window): Likewise.
14333         (grub_vbe_get_memory_window): Likewise.
14334         (grub_vbe_set_scanline_length): Likewise.
14335         (grub_vbe_get_scanline_length): Likewise.
14336         (grub_vbe_set_display_start): Likewise.
14337         (grub_vbe_get_display_start): Likewise.
14338         (grub_vbe_set_palette_data): Likewise.
14339         * include/grub/i386/pc/vbe.h: New file.
14341 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14343         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14344         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14345         * DISTLIST: Likewise.
14346         * kern/ieee1275/of.c: Moved to ...
14347         * kern/ieee1275/ieee1275.c: ... here.
14349 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14351         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14352         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14353         Pass 0 as `end' parameter to grub_strtoul().
14355 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14357         * include/grub/powerpc/ieee1275/console.h: Do not include
14358         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14359         ifdef.
14360         (grub_console_cur_color): Remove i386-specific prototype.
14361         (grub_console_real_putchar): Likewise.
14362         (grub_console_checkkey): Likewise.
14363         (grub_console_getkey): Likewise.
14364         (grub_console_getxy): Likewise.
14365         (grub_console_gotoxy): Likewise.
14366         (grub_console_cls): Likewise.
14367         (grub_console_setcursor): Likewise.
14368         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14369         Include <grub/machine/console.h>.
14370         * term/ieee1275/ofconsole.c: Likewise.
14372 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14374         * Makefile.in (LIBLZO): New variable.
14376         * configure.ac: Check for LZO version 2.
14378         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14379         lzo/lzo1x.h instead of lzo1x.h.
14381         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14382         of -llzo.
14384         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14385         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14387         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14388         copying the data from PARTITION to P.
14390 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14392         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14393         negative, unload the module.
14395         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14396         map is "pc_partition_map" but not "pc".
14397         (usage): Fix the description. The options are --boot-image and
14398         --core-image but not --boot-file or --core-file.
14399         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14400         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14401         DEFAULT_DIRECTORY.
14403         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14404         --core-file. Specify INSTALL_DEVICE as an argument.
14406         * util/console.c: Include config.h.
14407         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14408         [HAVE_NCURSES_H]: Include ncurses.h.
14409         [HAVE_CURSES_H]: Include curses.h.
14410         [!A_NORMAL] (A_NORMAL): Defined as zero.
14411         [!A_STANDOUT] (A_STANDOUT): Likewise.
14413         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14414         -lncurses.
14415         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14417         * configure.ac: Check for curses libraries and headers.
14419         * Makefile.in (LIBCURSES): New variable.
14421         * genmk.rb (Script::rule): Set the executable bits.
14423         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14424         name of the PC partition map is "pc_partition_map" but not "pc".
14426 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14428         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14429         (modules): Likewise.
14430         (usage): Added descriptions for --modules and --grub-probefs.
14431         Handle --modules and --grub-probefs. Save the arguments in MODULES
14432         and GRUB_PROBEFS, respectively.
14433         Auto-detect a filesystem module against GRUBDIR. If the result is
14434         empty and modules are not specified explicitly, abort the
14435         installation. Add the result to MODULES.
14437         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14438         disk/powerpc/ieee1275/ofdisk.c,
14439         include/grub/powerpc/ieee1275/init.h and
14440         term/powerpc/ieee1275/ofconsole.c.
14441         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14442         term/ieee1275/ofconsole.c.
14444         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14446         * COPYING: Upgraded to the latest version. Only the address of the
14447         FSF office has changed.
14449 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14451         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14452         kern/ieee1275.c with kern/ieee1275/of.c.
14454         * kern/ieee1275.c: Moved to ...
14455         * kern/ieee1275/of.c: ... here.
14457 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14459         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14460         readability.
14462         * config.guess: Updated to the latest version from gnulib.
14463         * config.sub: Likewise.
14464         * install.sh: Likewise.
14465         * mkinstalldirs: Likewise.
14467         * include/grub/console.h: Removed. This file is arch-specific. Do
14468         not put this in include/grub.
14470         * include/grub/i386/pc/console.h: Resurrected.
14472         * util/console.c: Include grub/machine/console.h instead of
14473         grub/console.h.
14474         * util/grub-emu.c: Likewise.
14476 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14478         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14479         hardcoded value.
14481         From Vincent Pelletier  <subdino2004@yahoo.fr>
14482         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14483         Redefined to use grub_getwh.
14484         (grub_term): New member named getwh.
14485         (grub_getwh): New prototype.
14486         * kern/term.c (grub_getwh): New function.
14487         * term/i386/pc/console.c (grub_console_getwh): New function.
14488         (grub_console_term): New member `getwh'.
14489         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14490         (grub_vga_term): New member `getwh'.
14491         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14492         grub_ssize_t.
14493         (grub_ofconsole_getw): New function.
14494         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14495         (grub_ofconsole_term): New field named getwh and new initial
14496         value.
14498 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14500         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14501         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14502         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14503         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14504         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14505         of <grub/machine/ieee1275.h>.
14506         * commands/ieee1275/reboot.c: Likewise.
14507         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14508         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14509         parameter structs to use new type `grub_ieee1275_cell_t'.
14510         * term/powerpc/ieee1275/ofconsole.c: Move ...
14511         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14512         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14513         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14514         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14515         to return int.
14516         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14517         Remove unused prototypes.  All users updated.
14518         * include/grub/powerpc/ieee1275/console.h: Removed.
14519         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14520         `grub_ieee1275_cell_t'.
14521         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14522         Cast comparisons with -1 to the correct type.
14523         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14524         type to match `grub_ieee1275_entry_fn'.
14526 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14528         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14530         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14531         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14532         partmap/sun.c.
14533         (grub_probefs_SOURCES): New variable.
14535         * util/i386/pc/grub-probefs.c: New file.
14537         * util/i386/pc/grub-setup.c (main): Call
14538         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14539         grub_hfs_init and grub_jfs_init to initialize the system. Call
14540         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14541         grub_pc_partition_map_fini to finish the system.
14543 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14545         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14546         function.
14547         (grub_multiboot_load_elf32): Likewise.
14548         (grub_multiboot_is_elf64): Likewise.
14549         (grub_multiboot_load_elf64): Likewise.
14550         (grub_multiboot_load_elf): Likewise.
14551         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14552         an ELF32 or ELF64 file.
14553         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14555         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14556         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14557         NULL before calling FS->LABEL.
14558         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14559         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14560         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14561         before calling FS->LABEL.
14563 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14565         * util/i386/pc/grub-install.in (datadir): New variable.
14566         (libdir): Removed.
14567         (pkgdatadir): New variable.
14568         (pkglibdir): Removed.
14570 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14572         * DISTLIST: Added util/i386/pc/grub-install.in.
14574         * util/i386/pc/grub-install.in: New file.
14576         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14577         (grub_install_SOURCES): Likewise.
14579         * genmk.rb: Added support for scripts.
14580         (Script): New class.
14581         (scripts): New variable.
14583         * Makefile.in (install-local): Install sbin_SCRIPTS by
14584         INSTALL_SCRIPT.
14585         (uninstall): Remove sbin_SCRIPTS.
14587         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14588         device, try to get a GRUB device by
14589         grub_util_biosdisk_get_grub_dev.
14590         Free DEST_DEV.
14592         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14593         description for --device-map.
14595 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14597         Change the semantics of variable hooks. They now return strings
14598         instead of error values.
14600         * util/i386/pc/grub-setup.c: Include grub/env.h.
14601         (setup): Use grub_device_set_root instead of grub_env_set.
14603         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14604         grub_env_get instead of grub_device_set_root and
14605         grub_device_get_root, respectively.
14607         * kern/main.c (grub_env_write_root): New function.
14608         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14609         grub_env_set instead of grub_device_set_root.
14611         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14612         many variables.
14613         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14614         rather than calling ENV->WRITE_HOOK afterwards.
14615         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14616         passing a pointer of a pointer.
14617         (grub_register_variable_hook): Change the types of "read_hook" and
14618         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14619         respectively.
14620         Allocate the default empty string on the heap, because this string
14621         may be freed later.
14623         * kern/device.c: Include grub/env.h.
14624         (grub_device_set_root): Removed.
14625         (grub_device_get_root): Likewise.
14626         (grub_device_open): Use grub_env_get instead of
14627         grub_device_get_root.
14629         * include/grub/env.h (grub_env_read_hook_t): New type.
14630         (grub_env_write_hook_t): Likewise.
14631         (grub_env_var): Change the types of "read_hook" and "write_hook"
14632         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14633         (grub_register_variable_hook): Likewise.
14635         * include/grub/device.h (grub_device_set_root): Removed.
14636         (grub_device_set_root): Likewise.
14638         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14639         make sure that DIRNAME terminates with '/', so that
14640         grub_fat_find_dir will fail if PATH is not a directory.
14642         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14643         from DIRNAME.
14644         Use the qualifier auto for print_files and print_files_long.
14645         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14646         as a regular file.
14647         Put a newline only if there is no error.
14648         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14649         used.
14651 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14653         * kern/partition.c (grub_partition_probe): Initialize PART to
14654         NULL. Otherwise, when no partition map is registered, this returns
14655         a garbage.
14657 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14659         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14660         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14661         valid.
14663 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14665         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14666         information on each device, if it does not have partitions. Print
14667         "Device" instead of "Disk", because this function is not specific
14668         to disk devices.
14670         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14671         static to ensure that it is put on the memory rather than a
14672         register.
14674 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14676         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14677         (grub_cat_init): Likewise.
14678         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14679         (options): Likewise.
14680         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14681         (grub_configfile_init): Likewise.
14682         * font/manager.c (GRUB_MOD_INIT): Likewise.
14683         * commands/help.c (GRUB_MOD_INIT): Likewise.
14684         (grub_help_init): Likewise.
14685         * normal/command.c (grub_command_init): Likewise.
14686         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14687         * disk/loopback.c (grub_loop_init): Likewise.
14688         (GRUB_MOD_INIT): Likewise.
14689         * commands/ls.c (grub_ls_init): Likewise.
14690         (GRUB_MOD_INIT): Likewise.
14691         (options): Likewise.
14692         * commands/boot.c (grub_boot_init): Likewise.
14693         (GRUB_MOD_INIT): Likewise.
14694         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14695         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14696         (GRUB_MOD_INIT): Likewise.
14697         * commands/cmp.c (grub_cmp_init): Likewise.
14698         (GRUB_MOD_INIT): Likewise.
14700         * normal/arg.c: Use <> instead of "" to include header files.
14701         (SHORT_ARG_HELP): New macro.
14702         (SHORT_ARG_USAGE): Likewise.
14703         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14704         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14705         descriptions.
14706         (find_short): Check if C is 'h' or 'u' explicitly.
14707         (grub_arg_show_help): Use space characters instead of tabs. Treat
14708         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14709         are shown with --help and --usage only if they are not used for
14710         the command itself.
14711         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14712         'h' and 'u'.
14714         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14715         const into "longarg". Change the type of "shortarg" to int.
14717 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14719         * boot/i386/pc/boot.S (boot_drive_check): New label.
14721         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14722         macro.
14724         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14725         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14727 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14729         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14730         When turning off Gate A20, skip the check and return immediately,
14731         because this is not fatal usually.
14733 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14735         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14736         be 0x7C00 instead of 0x8000.
14738         * boot/i386/pc/pxeboot.S: Rewritten.
14740         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14741         EXT_C.
14742         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14743         result.
14745 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14747         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14748         robustness. This routine now supports a BIOS call and System
14749         Control Port A to modify the gate A20.
14751         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14752         Increased to 0x440.
14754 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14756         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14757         device path and resulting ihandle.
14758         (grub_ofdisk_close): dprintf the ihandle being closed.
14759         (grub_ofdisk_read): dprintf function parameters.
14760         * kern/mm.c (grub_mm_init_region): Likewise.
14761         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14762         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14763         size, and boot arguments.
14764         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14765         before loading into memory.
14766         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14767         before loading into memory.
14769 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14771         * kern/mm.c: Added much documentation.
14772         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14773         8, set to 5 instead of 8.
14775 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14777         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14779         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14780         (grub_mkdevicemap_SOURCES): New variable.
14782         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14783         lib/device.c of GRUB Legacy.
14785 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14787         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14788         instead of PATH is NULL.
14790 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14792         * commands/cmp.c (BUFFER_SIZE): New macro.
14793         (grub_cmd_cmp): Close the right file at the right time.  Compare
14794         only data just read.  Don't report files of different  size as
14795         identical.  Dynamically allocate buffers.  Move variable
14796         declarations at the beginning of function.
14798 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14800         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14801         reverse.
14803 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14805         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14806         when backspace is pressed at beginning of line.
14808 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14810         * DISTLIST: Added genfslist.sh.
14812         * normal/main.c (fs_module_list): New variable.
14813         (autoload_fs_module): New function.
14814         (read_fs_list): Likewise.
14815         (grub_normal_execute): Call read_fs_list.
14817         * kern/fs.c (grub_fs_autoload_hook): New variable.
14818         (grub_fs_probe): Added support for auto-loading.
14820         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14821         (grub_fs_module_list_t): New type.
14823         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14824         (grub_fs_autoload_hook): New prototype.
14826         * genfslist.sh: New file.
14828         * genmk.rb: Added a rule to generate a filesystem list.
14830 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14832         * configure.ac: Fix the test for cross-compiling.
14834         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14835         define GRUB_UTIL anymore.
14837         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14838         so this function works on other systems than just big endian.
14839         (load_modules): Likewise.
14840         (add_segments): Likewise.
14842 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14844         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14845         contains `l' modifier, get a long from va_arg().
14847 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14849         * kern/mm.c (grub_free): If the next free block which is being
14850         merged is the first free block, set the first block to the block
14851         being freed.
14852         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14854 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14856         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14857         `grub_ieee1275_chosen'.
14859 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14861         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14862         (grub_ieee1275_chosen): New variable.
14863         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14864         `chosen'.
14865         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14866         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14867         Rename first argument to `phandle' for consistency.
14868         (grub_ieee1275_get_property_length): Likewise.
14869         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14870         to grub_ieee1275_phandle_t.
14871         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14872         Move export next to declaration.
14873         (grub_ieee1275_chosen): New variable.
14874         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14875         Correct cosmetic typo.
14876         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14877         `grub_ieee1275_chosen'.
14878         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14879         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14880         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14881         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14882         `grub_ieee1275_chosen'.
14884 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14886         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14887         /chosen/bootargs.
14888         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14889         /chosen/bootargs as "variable=value" pairs.
14891 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14893         * include/grub/misc.h (grub_dprintf): New macro.
14894         (grub_real_dprintf): New prototype.
14895         (grub_strword): Likewise.
14896         (grub_iswordseparator): Likewise.
14897         * kern/misc.c (grub_real_dprintf): New function.
14898         (grub_strword): Likewise.
14899         (grub_iswordseparator): Likewise.
14901 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14903         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14904         (roundup): Remove macro.
14905         (grub_ieee1275_flags): Make static.
14906         (grub_ieee1275_realmode): Remove.
14907         (grub_ieee1275_test_flag): New function.
14908         (grub_ieee1275_set_flag): Likewise.
14909         (find_options): Rename to `grub_ieee1275_find_options'; update
14910         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14911         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14912         (cmain): New prototype.
14913         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14914         `grub_ieee1275_flags' directly.
14915         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14916         machine/biosdisk.h.
14917         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14918         Don't include grub/machine/init.h.
14919         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14920         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14921         Remove prototype.
14922         (grub_ieee1275_realmode): Likewise.
14923         (grub_ieee1275_flag): New enum.
14924         (grub_ieee1275_test_flag): New prototype.
14925         (grub_ieee1275_set_flag): New prototype.
14926         * include/grub/powerpc/ieee1275/init.h: Remove file.
14927         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14928         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14929         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14930         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14931         comment.
14932         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14933         `grub_ieee1275_test_flag'.
14934         (grub_ieee1275_encode_devname): Likewise.
14936 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14938         * include/grub/powerpc/ieee1275/ieee1275.h
14939         (grub_ieee1275_encode_devname): New prototype.
14940         (grub_ieee1275_get_filename): Likewise.
14941         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14942         function.
14943         (grub_set_prefix): Likewise.
14944         (grub_machine_init): Call grub_set_prefix.
14945         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14946         (grub_parse_type): New enum.
14947         (grub_ieee1275_get_devargs): New function.
14948         (grub_ieee1275_get_devname): Likewise.
14949         (grub_ieee1275_parse_args): Likewise.
14950         (grub_ieee1275_get_filename): Likewise.
14951         (grub_ieee1275_encode_devname): Likewise.
14953 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14955         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14956         `grub_loader_unset'.
14958 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14960         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14961         instead of grub_ieee1275_interpret.
14962         (grub_halt_init): New function.
14963         (grub_halt_fini): Likewise.
14964         (GRUB_MOD_INIT): Correct message grammar.
14965         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14966         instead of grub_ieee1275_interpret.
14967         (grub_reboot_init): New function.
14968         (grub_reboot_fini): Likewise.
14969         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14970         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14971         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14972         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14973         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14974         function.
14975         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14976         Add prototype.
14977         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14978         prototype.
14979         (grub_halt): Likewise.
14980         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14981         (cmain): Remove __attribute__((unused)).
14982         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14983         (grub_heap_len): Likewise.
14984         (grub_machine_fini): New function.
14985         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14986         (grub_halt): Likewise.
14987         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14988         function.
14989         * util/powerpc/ieee1275/misc.c: New file.
14991 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14993         * DISTLIST: New file.
14994         * gendistlist.sh: Likewise.
14996         * Makefile.in (COMMON_DISTFILES): Removed.
14997         (BOOT_DISTFILES): Likewise.
14998         (CONF_DISTFILES): Likewise.
14999         (DISK_DISTFILES): Likewise.
15000         (FS_DISTFILES): Likewise.
15001         (INCLUDE_DISTFILES): Likewise.
15002         (KERN_DISTFILES): Likewise.
15003         (LOADER_DISTFILES): Likewise.
15004         (TERM_DISTFILES): Likewise.
15005         (UTIL_DISTFILES): Likewise.
15006         (DISTFILES): Likewise.
15007         (uninstall): Uninstall files in $(pkgdata_DATA).
15008         (DISTLIST): New target.
15009         (distdir): Use the contents of the file DISTLIST to get a list of
15010         distributed files.
15012 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15014         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15015         descriptor. This is ported from GRUB Legacy.
15017         * gencmdlist.sh: Added an extra semicolon to make it work with
15018         old sed versions. Reported by Robert Bihlmeyer
15019         <robbe@orcus.priv.at>.
15021 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15023         Automatic loading of commands is supported.
15025         * normal/main.c (read_command_list): New function.
15026         (grub_normal_execute): Call read_command_list.
15028         * normal/command.c (grub_register_command): Return zero or CMD.
15029         Allocate CMD->NAME from the heap.
15030         Initialize CMD->MODULE_NAME to zero.
15031         Find the same name as well. If the same command is found and it is
15032         a dummy command, overwrite members. If it is not a dummy command,
15033         return zero.
15034         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15035         (grub_command_find): If a dummy command is found, load a module
15036         and retry to find a command only once.
15038         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15039         make sure that each command is loaded.
15041         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15042         macro.
15043         (struct grub_command): Remove const from the member `name'.
15044         Add a new member `module_name'.
15045         (grub_register_command): Return grub_command_t.
15047         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15048         sure that each command is loaded.
15050         * genmk.rb (PModule::rule): Specify a module name without the
15051         suffix ".mod" to gencmdlist.sh.
15053 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15055         * gencmdlist.sh: New file.
15057         * genmk.rb (PModule::rule): Generate a rule for a command list.
15058         Clean command.lst.
15059         Generate command.lst from $(COMMANDFILES).
15061         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15062         (DATA): Added $(pkgdata_DATA).
15063         (install-local): Install files in $(pkgdata_DATA).
15065 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15067         * term/i386/pc/vga.c (debug_command): Removed.
15068         (GRUB_MOD_INIT): Do not register the command "debug".
15070         From Hollis Blanchard:
15071         * commands/configfile.c: New file.
15072         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15073         commands/configfile.c.
15074         (pkgdata_MODULES): Added configfile.mod.
15075         (configfile_mod_SOURCES): New variable.
15076         (configfile_mod_CFLAGS): Likewise.
15077         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15078         commands/configfile.c.
15079         (pkgdata_MODULES): Added configfile.mod.
15080         (configfile_mod_SOURCES): New variable.
15081         (configfile_mod_CFLAGS): Likewise.
15082         * util/grub-emu.c (main): Call grub_configfile_init and
15083         grub_configfile_fini.
15084         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15085         prototype.
15086         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15088 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15090         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15091         address.
15093         * commands/help.c (grub_cmd_help): Do not print newlines after
15094         the last command in print_command_help.
15096 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15098         * commands/default.h: New file.
15099         * commands/timeout.h: Likewise.
15100         * normal/context.c: Likewise.
15102         * util/misc.c: Do not include sys/times.h.
15103         Include sys/time.h and grub/machine/time.h.
15104         (grub_get_rtc): Rewritten with gettimeofday.
15106         * util/grub-emu.c (main): Call grub_default_init and
15107         grub_timeout_init before grub_normal_init, and call
15108         grub_timeout_fini and grub_default_fini after grub_main.
15110         * util/console.c (grub_ncurses_checkkey): Return the read
15111         character or -1.
15113         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15114         timeouts.
15116         * normal/main.c (read_config_file): Push MENU. If this fails,
15117         print an error and wait for a user input.
15118         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15119         If a menu is empty or an error occurs, pop MENU.
15120         (grub_normal_execute): Pop and free MENU after grub_menu_run
15121         returns.
15123         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15125         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15126         include time.h.
15127         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15128         without GRUB_UTIL.
15129         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15130         time.h.
15131         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15132         without GRUB_UTIL.
15134         * include/grub/normal.h (struct grub_menu_list): New struct.
15135         (grub_menu_list_t): New type.
15136         (struct grub_context): New struct.
15137         (grub_context_t): New type.
15138         (grub_register_command): Got rid of EXPORT_FUNC.
15139         (grub_unregister_command): Likewise.
15140         (grub_context_get): New prototype.
15141         (grub_context_get_current_menu): Likewise.
15142         (grub_context_push_menu): Likewise.
15143         (grub_context_pop_menu): Likewise.
15144         [GRUB_UTIL] (grub_default_init): Likewise.
15145         [GRUB_UTIL] (grub_default_fini): Likewise.
15146         [GRUB_UTIL] (grub_timeout_init): Likewise.
15147         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15149         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15150         commands/timeout.c and normal/context.c.
15151         (pkgdata_MODULES): Added default.mod and timeout.mod.
15152         (normal_mod_SOURCES): Added normal/context.c.
15153         (default_mod_SOURCES): New variable.
15154         (default_mod_CFLAGS): Likewise.
15155         (timeout_mod_SOURCES): Likewise.
15156         (timeout_mod_CFLAGS): Likewise.
15157         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15158         conf/i386-pc.rmk.
15159         (pkgdata_MODULES): Added default.mod and timeout.mod.
15160         (normal_mod_SOURCES): Added normal/context.c.
15161         (default_mod_SOURCES): New variable.
15162         (default_mod_CFLAGS): Likewise.
15163         (timeout_mod_SOURCES): Likewise.
15164         (timeout_mod_CFLAGS): Likewise.
15166         * Makefile.in (all-local): Added $(MKFILES).
15168 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15170         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15171         (grub_emu_SOURCES): Likewise.
15172         (pkgdata_MODULES): Add `sun.mod'.
15173         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15174         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15175         `partmap/sun.c'.
15176         (pkgdata_MODULES): Add `sun.mod'.
15177         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15178         * include/grub/partition.h (grub_sun_partition_map_init): New
15179         prototype.
15180         (grub_sun_partition_map_fini): Likewise.
15181         * partmap/sun.c: New file.
15182         * util/grub-emu.c (main): Initialize and de-initialize the sun
15183         partitionmap support.
15185 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15187         This implements an Emacs-like menu entry editor.
15189         * normal/menu_entry.c: New file.
15191         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15192         characters to ASCII.
15193         (saved_char): New variable.
15194         (grub_ncurses_checkkey): Rewritten completely.
15195         (grub_ncurses_getkey): Likewise.
15196         (grub_ncurses_init): Call raw instead of cbreak.
15198         * normal/menu.c (print_entry): Do not put a space.
15199         (init_page): Renamed to ...
15200         (grub_menu_init_page): ... this. All callers changed.
15201         (edit_menu_entry): Removed.
15202         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15204         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15206         * kern/misc.c (grub_vprintf): Call grub_refresh.
15208         * normal/menu.c (DISP_LEFT): Renamed to ...
15209         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15210         * normal/menu.c (DISP_UP): Renamed to ...
15211         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15212         * normal/menu.c (DISP_RIGHT): Renamed to ...
15213         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15214         * normal/menu.c (DISP_DOWN): Renamed to ...
15215         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15216         * normal/menu.c (DISP_HLINE): Renamed to ...
15217         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15218         * normal/menu.c (DISP_VLINE): Renamed to ...
15219         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15220         * normal/menu.c (DISP_UL): Renamed to ...
15221         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15222         * normal/menu.c (DISP_UR): Renamed to ...
15223         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15224         * normal/menu.c (DISP_LL): Renamed to ...
15225         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15226         * normal/menu.c (DISP_LR): Renamed to ...
15227         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15228         * normal/menu.c (TERM_WIDTH): Renamed to ...
15229         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15230         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15231         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15232         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15233         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15234         * normal/menu.c (TERM_MARGIN): Renamed to ...
15235         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15236         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15237         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15238         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15239         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15240         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15241         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15242         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15243         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15244         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15245         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15246         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15247         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15248         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15249         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15250         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15251         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15252         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15253         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15254         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15255         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15256         All callers changed.
15258         * include/grub/normal.h: New prototype.
15260         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15261         normal/menu_entry.c.
15262         (normal_mod_SOURCES): Likewise.
15263         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15264         (normal_mod_SOURCES): Likewise.
15266 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15268         * include/grub/normal.h (grub_halt_init): New prototype.
15269         (grub_halt_fini): Likewise.
15270         (grub_reboot_init): Likewise.
15271         (grub_reboot_fini): Likewise.
15273         * util/grub-emu.c: Include signal.h.
15274         (main_env): New global variable.
15275         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15276         catch C-c.
15277         (grub_machine_fini): New function.
15278         (main): Call grub_halt_init and grub_reboot_init before
15279         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15280         Call setjmp with MAIN_ENV to go back afterwards.
15281         Call grub_machine_fini right before return.
15283         * include/grub/util/misc.h: Include setjmp.h.
15284         (main_env): New prototype.
15286         * include/grub/kernel.h (grub_machine_fini): New prototype.
15287         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15288         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15290         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15291         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15292         * term/i386/pc/console.c (grub_console_fini): Likewise.
15294         * util/i386/pc/misc.c: New file.
15296         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15297         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15298         commands/i386/pc/reboot.c.
15300 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15302         * include/grub/dl.h (grub_dl_check_header): New prototype.
15303         (grub_arch_dl_check_header): Change return type to grub_err_t,
15304         remove size parameter and export function.  Update all callers.
15305         * kern/dl.c (grub_dl_check_header): New function.
15306         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15307         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15308         are inside the core.
15309         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15310         independent ELF header checks.
15311         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15312         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15313         `grub_dl_check_header' instead of explicit checks.  Check for the
15314         ELF type.
15315         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15316         `grub_dl_check_header' instead of explicit checks.  Remove arch
15317         specific ELF header checks.
15319         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15320         argument SIZE.
15322 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15324         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15325         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15327 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15329         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15330         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15331         (part_map_iterate): Clear `grub_errno' and return 0 if
15332         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15333         * partmap/amiga.c (amiga_partition_map_iterate): Return
15334         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15335         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15337 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15339         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15340         help info.
15342 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15344         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15345         Removed prototype.
15346         (grub_rescue_cmd_linux): New prototype.
15347         (grub_rescue_cmd_initrd): Likewise.
15348         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15349         `bi_rec'.
15350         (grub_linux_release_mem): Release the memory for the initrd.
15351         (grub_load_linux): Renamed from this...
15352         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15353         Changed `entry' not to be static.  Loop over memory regions to
15354         find another one when the default fails.
15355         (grub_rescue_cmd_initrd): New function.
15356         (grub_linux_init): Remove function.
15357         (grub_linux_fini): Likewise.
15358         (GRUB_MOD_INIT): Register `initrd'.
15359         (GRUB_MOD_FINI): Unregister `initrd'.
15360         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15361         Function removed.
15362         (grub_linux_normal_fini): Likewise.
15363         (GRUB_MOD_INIT): Register `initrd'.
15364         (GRUB_MOD_FINI): Unregister `initrd'.
15366 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15368         * commands/help.c: New file.
15369         * normal/arg.c (show_help): Renamed to...
15370         (grub_arg_show_help): ... this.
15371         * commands/i386/pc/halt.c: New file.
15372         * commands/i386/pc/reboot.c: Likewise.
15373         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15374         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15375         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15376         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15377         variables.
15378         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15379         `commands/help.c'.
15380         (pkgdata_MODULES): Add `help.mod'.
15381         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15382         * grub/i386/pc/init.h (grub_reboot): New prototype.
15383         (grub_halt): Likewise.
15384         * include/grub/normal.h (grub_arg_show_help): New prototype.
15385         (grub_help_init): Likewise.
15386         (grub_help_fini): Likewise.
15387         * util/grub-emu.c (main): Initialize and deinitialize the help
15388         command.
15390         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15392         * normal/command.c (grub_command_init): Fixed the description of
15393         the `set' and `unset' commands.
15395 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15397         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15398         function.
15399         * commands/ieee1275/halt.c: New file.
15400         * commands/ieee1275/reboot.c: Likewise.
15401         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15402         `__attribute__ ((unused))'.  Some GCS related fixed.
15403         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15404         (grub_suspend_fini): Likewise.
15405         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15406         and `halt.mod'.
15407         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15408         (halt_mod_CFLAGS): New variables.
15409         * include/grub/powerpc/ieee1275/ieee1275.h
15410         (grub_ieee1275_interpret): New prototype.
15412 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15414         * include/grub/misc.h (memmove): New prototype.
15415         (memcpy): Likewise.
15417 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15419         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15420         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15422 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15424         * kern/misc.c (grub_strndup): Function rewritten.
15426 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15428         * normal/menu.c (TERM_WIDTH): Macro redefined.
15429         (TERM_TOP_BORDER_Y): Likewise.
15430         (draw_border): Replaced while-loop by a for-loop.  Make the number
15431         of lines consistent with the number of lines displayed in
15432         print_entries.  Added a margin below the rectangle.
15433         (print_entry): Make the entry fit in the rectangle.
15434         (print_entries): Display the scroll arrows next to the right
15435         border.
15437 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15439         * fs/minix.c (grub_minix_find_file): Reserve more space for
15440         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15441         `grub_strncpy' to copy `path' into it.
15443 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15445         Add the loopback device, a device via which files can be accessed
15446         as devices.
15448         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15449         (pkgdata_MODULES): Add loopback.mod.
15450         (loopback_mod_SOURCES): New variable.
15451         (loopback_mod_CFLAGS): Likewise.
15452         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15453         `disk/loopback.c'.
15454         (pkgdata_MODULES): Add loopback.mod.
15455         (loopback_mod_SOURCES): New variable.
15456         (loopback_mod_CFLAGS): Likewise.
15457         * disk/loopback.c: new file.
15458         * include/grub/normal.h (grub_loop_init): New prototype.
15459         (grub_loop_fini): New prototype.
15460         * util/grub-emu.c (main): Initialize and de-initialize loopback
15461         support.
15462         * include/grub/disk.h (grub_disk_dev_id): Add
15463         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15465 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15467         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15468         function.
15469         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15470         (suspend_mod_SOURCES): New variable.
15471         (suspend_mod_CFLAGS): Likewise.
15472         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15473         New prototype.
15474         * commands/ieee1275/suspend.c: New file.
15476 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15478         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15479         ((unused))' to `__attribute__ ((used))'.
15480         (GRUB_MOD_FINI): Likewise.
15481         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15482         * genmk.rb (PModule): Assign space to common symbols when linking
15483         modules.
15485 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15487         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15488         `unsigned' arguments to `grub_size_t'.
15489         (grub_malloc): Likewise.
15490         (grub_realloc): Likewise.
15491         (grub_memalign): Likewise.
15492         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15493         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15494         * util/misc.c (grub_malloc): Likewise.
15495         (grub_realloc): Likewise.
15496         * kern/mm.c (get_header_from_pointer): Change the casts to
15497         `unsigned' into a cast to `grub_size_t'.
15499         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15500         point to `currnode' when `currnode' is changed.
15502         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15503         Schottelius <nico-linux@schottelius.org>.
15505 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15507         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15508         (note_path): Remove variable.
15509         (GRUB_IEEE1275_NOTE_NAME): New macro.
15510         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15511         (grub_ieee1275_note_hdr): New structure.
15512         (grub_ieee1275_note_desc): Likewise.
15513         (grub_ieee1275_note): Likewise.
15514         (load_note): Remove `dir' argument.  All callers updated.  Remove
15515         `note_img' and `path'.  Do not load a file from `note_path'.
15516         Initialize a struct grub_ieee1275_note and write that to `out'.
15517         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15519 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15521         * util/misc.c (grub_util_read_image): Revert last change.  It
15522         called `grub_util_read_at', which seeks from the beginning of the
15523         file.
15525 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15527         * TODO: Add note about endianness in grub-mkimage.
15528         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15529         section.
15530         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15531         (grub_mkimage_SOURCES): New target.
15532         * include/grub/kernel.h (grub_start_addr): Remove variable.
15533         (grub_end_addr): Likewise.
15534         (grub_total_module_size): Likewise.
15535         (grub_kernel_image_size): Likewise.
15536         (GRUB_MODULE_MAGIC): New constant.
15537         (grub_module_info): New structure.
15538         (grub_arch_modules_addr): New prototype.
15539         (grub_get_end_addr): Remove prototype.
15540         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15541         * include/grub/powerpc/ieee1275/kernel.h: New file.
15542         * include/grub/util/misc.h (grub_util_get_fp_size): New
15543         prototype.
15544         (grub_util_read_at): Likewise.
15545         (grub_util_write_image_at): Likewise.
15546         * kern/main.c (grub_get_end_addr): Remove function.
15547         (grub_load_modules): Call grub_arch_modules_addr instead of using
15548         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15549         the grub_module_info fields instead of calling grub_get_end_addr
15550         as loop conditions.  Move grub_add_unused_region code here.
15551         (grub_add_unused_region): Remove function.
15552         * kern/i386/pc/init.c: Include grub/cache.h.
15553         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15554         one call to add_mem_region.
15555         (grub_arch_modules_addr): New function.
15556         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15557         (grub_total_module_size): Likewise.
15558         Include grub/machine/kernel.h.
15559         (grub_arch_modules_addr): New function.
15560         * util/grub-emu.c (grub_end_addr): Remove variable.
15561         (grub_total_module_size): Likewise.
15562         (grub_arch_modules_addr): New function.
15563         * util/misc.c: Include unistd.h.
15564         (grub_util_get_fp_size): New function.
15565         (grub_util_read_at): Likewise.
15566         (grub_util_write_image_at): Likewise.
15567         (grub_util_read_image): Call grub_util_read_at.
15568         (grub_util_write_image): Call grub_util_write_image_at.
15569         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15570         additional memory in kernel_img for a struct grub_module_info.
15571         Fill in that grub_module_info.
15572         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15574 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15576         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15577         New function.
15578         * include/grub/powerpc/ieee1275/ieee1275.h
15579         (grub_ieee1275_milliseconds): New prototype.
15580         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15581         Change to 1000.
15582         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15583         grub_ieee1275_milliseconds.
15585 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15587         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15588         variable.
15589         (find_options): New function.
15590         (cmain): Call find_options.
15591         * include/grub/powerpc/ieee1275/ieee1275.h
15592         (grub_ieee1275_realmode): New extern variable.
15593         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15594         grub_map if grub_ieee1275_realmode is false.
15596 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15598         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15599         lines are inserted and make it work like readline.  Reported by
15600         Vincent Pelletier <subdino2004@yahoo.fr>.
15602 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15604         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15606         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15607         `kern/powerpc/cache.S'.
15609 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15611         * genmk.rb: Handle the `Program' class in the main loop.  Written
15612         by Johan Rydberg <jrydberg@gnu.org>.
15613         (Program): New class.
15614         (programs): New variable.
15615         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15616         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15617         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15618         (help_arch): Function removed.
15619         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15620         `powerpc/libgcc.h' and `loader.h'.
15621         (pkgdata_PROGRAMS): New variable.
15622         (sbin_UTILITIES): Variable removed.
15623         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15624         (grubof_SOURCES): Variable re-defined so it only includes the
15625         core functionality.
15626         (grubof_CFLAGS): Remove `-DGRUBOF'.
15627         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15628         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15629         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15630         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15631         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15632         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15633         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15634         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15635         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15636         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15637         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15638         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15639         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15640         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15641         (pc_mod_CFLAGS): New variables.
15642         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15643         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15644         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15645         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15646         Moved from here...
15647         * include/grub/i386/pc/init.h (grub_os_area_addr)
15648         (rub_os_area_size): ... to here.
15649         * include/grub/powerpc/ieee1275/ieee1275.h
15650         (grub_ieee1275_entry_fn): Export symbol.
15651         * include/grub/powerpc/ieee1275/init.h: New file.
15652         * include/grub/powerpc/libgcc.h: Likewise.
15653         * include/grub/cache.h: Likewise.
15654         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15655         <hollis@penguinppc.org>.
15656         * kern/dl.c: Include <grub/cache.h>.
15657         (grub_dl_flush_cache): New function.
15658         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15659         for this module.
15660         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15661         (grub_console_init): Removed prototypes.
15662         (grub_machine_init): Don't initialize the modules anymore.
15663         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15664         static.
15665         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15666         Macro undef removed.
15667         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15668         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15669         relocation `R_PPC_REL32'.  Return an error when the relocation is
15670         unknown.
15671         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15672         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15673         * util/misc.c (grub_arch_sync_caches): Likewise.
15675 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15677         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15678         `symlist.c', add `grubof_symlist.c'.
15679         (symlist.c): Variable removed.
15680         (grubof_HEADERS): Variable added.
15681         (grubof_symlist.c): New target.
15682         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15683         `kernel_img_HEADERS'.
15684         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15685         * kern/powerpc/dl.c: New file.
15686         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15687         Function removed.
15688         (grub_arch_dl_relocate_symbols): Likewise.
15689         (grub_register_exported_symbols): Likewise.
15691 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15693         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15694         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15695         to fail instead.  Reported by Vincent Pelletier
15696         <subdino2004@yahoo.fr>.
15698         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15699         it is not allocated.  Reported by Vincent Pelletier
15700         <subdino2004@yahoo.fr>.
15702         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15703         output so the output looks better.
15705 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15707         Modulize the partition map support and add support for the amiga
15708         partition map.
15710         * commands/ls.c: Include <grub/partition.h> instead of
15711         <grub/machine/partition.h>.
15712         * kern/disk.c: Likewise.
15713         * kern/rescue.c: Likewise.
15714         * loader/i386/pc/chainloader.c: Likewise.
15715         * normal/cmdline.c: Likewise.
15716         * kern/powerpc/ieee1275/init.c: Likewise.
15717         (grub_machine_init): Call `grub_pc_partition_map_init',
15718         `grub_amiga_partition_map_init' and
15719         `grub_apple_partition_map_init'.
15720         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15721         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15722         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15723         `partition.h' and `pc_partition.h'.
15724         (grub_setup_SOURCES): Remove
15725         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15726         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15727         (grub_emu_SOURCES): Likewise.
15728         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15729         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15730         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15731         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15732         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15733         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15734         (grubof_SOURCES): Likewise.
15735         * disk/i386/pc/partition.c: File removed.
15736         * disk/powerpc/ieee1275/partition.c: Likewise.
15737         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15738         * include/grub/i386/pc/partition.h: Likewise.
15739         * kern/partition.c: New file.
15740         * partmap/amiga.c: Likewise.
15741         * partmap/apple.c: Likewise.
15742         * partmap/pc.c: Likewise.
15743         * include/grub/partition.h: Likewise..
15744         * include/grub/pc_partition.h: Likewise.
15745         * util/grub-emu.c: Include <grub/partition.h> instead of
15746         <grub/machine/partition.h>.
15747         (main): Call `grub_pc_partition_map_init',
15748         `grub_amiga_partition_map_init' and
15749         `grub_apple_partition_map_init' and deinitialize afterwards.
15750         * util/i386/pc/biosdisk.c: Include `#include
15751         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15752         `<grub/machine/partition.h>'.
15753         * util/i386/pc/grub-setup.c: Likewise.
15754         * util/i386/pc/biosdisk.c: Likewise.
15755         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15756         partition information in case of a PC partition.
15757         * util/i386/pc/grub-setup.c: Include `#include
15758         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15759         `<grub/machine/partition.h>'.
15760         (setup): Only access the PC specific partition information in case
15761         of a PC partition.
15763 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15765         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15766         (grub_longjmp): Likewise.
15767         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15768         20.
15769         * normal/powerpc/setjmp.S: New file.
15770         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15771         `normal/powerpc/setjmp.S'.
15772         (grubof_CFLAGS): Add `-DGRUBOF'.
15773         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15774         [GRUB_UTIL && !GRUBOF].
15776 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15778         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15779         property named `name'.  Correctly handle the error returned by
15780         `grub_ieee1275_finddevice' if a device can not be opened.
15782 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15784         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15785         `actual' for negativity.
15786         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15787         kern/fshelp.c.
15789 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15791         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15792         (PAGE_OFFSET): New macro.
15793         (CRTC_ADDR_PORT): Likewise.
15794         (CRTC_DATA_PORT): Likewise.
15795         (START_ADDR_HIGH_REGISTER): Likewise.
15796         (START_ADDR_LOW_REGISTER): Likewise.
15797         (GRAPHICS_ADDR_PORT): Likewise.
15798         (GRAPHICS_DATA_PORT): Likewise.
15799         (READ_MAP_REGISTER): Likewise.
15800         (INPUT_STATUS1_REGISTER): Likewise.
15801         (INPUT_STATUS1_VERTR_BIT): Likewise.
15802         (page): New variable.
15803         (wait_vretrace): New function.
15804         (set_read_map): Likewise.
15805         (set_start_address): Likewise.
15806         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15807         the right page.
15808         (check_vga_mem): Take the page into account.
15809         (write_char): Likewise.
15810         (write_cursor): Likewise.
15811         (scroll_up): Likewise.  Copy the page to the page that is not
15812         shown and switch between both pages.
15813         (grub_vga_putchar): Fix off by one error.
15814         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15815         account.
15817 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15819         Add support for iso9660 (including rockridge).
15821         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15822         (iso9660_mod_SOURCES): New variable.
15823         (iso9660_mod_CFLAGS): Likewise.
15824         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15825         * include/grub/fs.h (grub_iso9660_init): New prototype.
15826         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15827         * fs/iso9660.c: New file.
15829         * include/grub/misc.h (grub_strncat): New prototype.
15830         * kern/misc.c (grub_strncat): New function.
15832         * fs/hfs.c (grub_hfs_mount): Translate the error
15833         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15834         * fs/jfs.c (grub_jfs_mount): Likewise.
15835         * fs/ufs.c (grub_ufs_mount): Likewise.
15837 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15839         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15840         which initialized BAT registers.
15841         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15842         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15843         Move from here...
15844         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15845         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15846         ... to here.
15847         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15848         (grub_mapclaim): Likewise.
15849         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15850         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15851         hand.
15853 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15855         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15856         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15857         -ffreestanding and -msoft-float.
15859 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15861         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15862         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15863         set in grub_ieee1275_flags.
15865 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15867         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15868         prototype.
15869         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15870         grub_console_init first.
15871         Change the memory range used for grub_ieee1275_claim and
15872         grub_mm_init_region.
15873         Print an error message if the claim fails.
15874         Include <grub/misc.h>.
15876 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15878         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15879         Call grub_children_iterate for device nodes of type `scsi',
15880         `ide', or `ata'.
15881         (grub_ofdisk_open): Remove manual device alias resolution.
15882         Fix memory leak when device cannot be opened.
15883         * include/grub/powerpc/ieee1275/ieee1275.h
15884         (grub_children_iterate): New prototype.
15885         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15886         New function.
15887         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15888         Return -1 if args.size was -1.
15890 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15892         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15893         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15894         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15895         Open Firmware's memory for it; claim memory from _start to _end.
15896         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15897         (_end): New extern.
15898         (_start): Zero BSS from __bss_start to _end.
15899         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15900         New extern.
15901         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15903 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15905         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15906         -1 if args.base was -1.
15908 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15910         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15911         escape sequence instead of a literal ^L. Also call
15912         grub_ofconsole_gotoxy.
15914 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15916         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15917         void *  arguments to grub_addr_t.  All callers updated.  Also make
15918         the `result' argument optional.
15919         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15920         All callers updated.
15922 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15924         * commands/ls.c (grub_ls_list_files): Use the string following the
15925         initial ')', if present, as the filesystem path.
15926         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15928         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15930 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15932         Make the source code of the menu interface more readable.
15934         * normal/menu.c: Include grub/mm.h.
15935         (TERM_WIDTH): New macro.
15936         (TERM_HEIGHT): Likewise.
15937         (TERM_INFO_HEIGHT): Likewise.
15938         (TERM_MARGIN): Likewise.
15939         (TERM_SCROLL_WIDTH): Likewise.
15940         (TERM_TOP_BORDER_Y): Likewise.
15941         (TERM_LEFT_BORDER_X): Likewise.
15942         (TERM_BORDER_WIDTH): Likewise.
15943         (TERM_MESSAGE_HEIGHT): Likewise.
15944         (TERM_BORDER_HEIGHT): Likewise.
15945         (TERM_NUM_ENTRIES): Likewise.
15946         (TERM_FIRST_ENTRY_Y): Likewise.
15947         (TERM_ENTRY_WIDTH): Likewise.
15948         (TERM_CURSOR_X): Likewise.
15949         (draw_border): Use macros instead of magic numbers.
15950         (print_entry): Likewise.
15951         (print_entries): Likewise.
15952         (run_menu): Likewise. Also, handle the key 'e'.
15953         (run_menu_entry): Ignore empty command lines.
15954         (print_message): Added a new argument EDIT. If EDIT is true,
15955         print a different message.
15956         (init_page): Likewise.
15957         (edit_menu_entry): New function. Not implemented yet.
15959 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15961         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15962         can be loaded from normal mode.
15964         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15965         `multiboot.mod'.
15966         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15967         (multiboot_mod_CFLAGS): New variables.
15968         * loader/i386/pc/linux_normal.c: New file.
15969         * loader/i386/pc/multiboot_normal.c: Likewise.
15971         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15972         attribute `unused'.
15974         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15975         `fdiro' to read the mode information from instead of `diro'.
15977         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15978         looking up a symlink.
15980         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15981         macro.
15982         * normal/command.c (grub_command_execute): Don't parse the
15983         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15984         flags of the command.
15986         * normal/menu.c (grub_menu_run): Fix typo.
15988 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15990         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15992         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15993         `y + 1' instead of `y - 1'.
15995         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15997 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15999         From Hollis Blanchard <hollis@penguinppc.org>:
16000         * kern/misc.c (memmove): New alias for grub_memmove.
16001         (memcmp): New alias for grub_memcmp.
16002         (memset): New alias for grub_memset.
16003         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16004         Change "int handle" to "grub_ieee1275_phandle_t handle".
16005         * include/grub/powerpc/ieee1275/ieee1275.h
16006         (grub_ieee1275_get_property): Likewise.
16008 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16010         Added normal mode command `chainloader' as module chain.mod, which
16011         depends on normal.mod and _chain.mod.
16013         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16014         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16015         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16016         Deleted prototype.
16017         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16018         but arguments parsing moved to ...
16019         (grub_chainloader_cmd): ... here.  New function.
16020         * include/grub/i386/pc/chainloader.h: New file.
16021         * loader/i386/pc/chainloader_normal.c: Likewise.
16023 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16025         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16026         (grub_mkimage_LDFLAGS): Likewise.
16027         (grub_emu_SOURCES): Likewise.
16028         (kernel_img_HEADERS): Added fshelp.h.
16029         * fs/ext2.c: Include <grub/fshelp.h>.
16030         (FILETYPE_REG): New macro.
16031         (FILETYPE_INO_REG): Likewise.
16032         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16033         Changed all users.
16034         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16035         all users.
16036         (grub_fshelp_node): New struct.
16037         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16038         to a pointer.
16039         (grub_ext2_get_file_block): Removed function.
16040         (grub_ext2_read_block): New function.
16041         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16042         This function was written.
16043         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16044         (grub_ext2_find_file): Removed function.
16045         (grub_ext2_read_symlink): New function.
16046         (grub_ext2_iterate_dir): Likewise.
16047         (grub_ext2_open): Rewritten.
16048         (grub_ext2_dir): Rewritten.
16049         * include/grub/fshelp.h: New file.
16050         * fs/fshelp.c: Likewise.
16052 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16054         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16055         (print_message): Add a missing newline.
16056         (run_menu): Added timeout support.
16057         (run_menu_entry): New local function.
16058         (grub_menu_run): Added support for booting.
16060         * kern/loader.c (grub_loader_is_loaded): New function.
16062         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16063         (grub_get_rtc): Exported.
16065         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16066         (grub_get_rtc): Exported.
16068         * include/grub/normal.h (struct grub_command_list): Remove
16069         constant from the member `command'.
16071         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16073         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16075         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16077 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16079         Add support for the JFS filesystem.
16081         * fs/jfs.c: New file.
16082         * include/grub/fs.h (grub_jfs_init): New prototype.
16083         (grub_jfs_fini): New prototype.
16084         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16085         (grub_emu_SOURCES): Likewise.
16086         (pkgdata_MODULES): Add jfs.mod.
16087         (jfs_mod_SOURCES): New variable.
16088         (jfs_mod_CFLAGS): Likewise.
16089         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16090         (grubof_SOURCES): Likewise.
16091         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16093         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16094         endian to the host endian.
16095         (grub_fat_utf16_to_utf8): Move function from there...
16096         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16097         the endianness of the source string anymore.
16098         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16100 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16102         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16103         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16104         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16105         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16107         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16108         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16109         for `node_found' and `it_dir'.
16110         (grub_hfs_dir): Add prototype for `dir_hook'.
16112         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16113         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16114         and `indir32' to silence a gcc warning.
16116         * include/grub/fs.h (grub_hfs_init): New prototype.
16117         (grub_hfs_fini): Likewise.
16120 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16122         Each disk device has its own id now. This is useful to make use
16123         of multiple disk devices.
16125         * include/grub/disk.h (grub_disk_dev_id): New enum.
16126         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16127         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16129         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16130         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16132         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16133         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16135         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16136         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16138         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16139         "id" which is used by the cache manager.
16141         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16142         of just "GRUB".
16144 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16146         * fs/hfs.c: New file.
16147         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16148         (grub_emu_SOURCES): Likewise.
16149         (pkgdata_MODULES): Add hfs.mod.
16150         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16151         (grubof_SOURCES): Likewise.
16152         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16154         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16155         * kern/misc.c (grub_strncasecmp): Add function.
16157 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16159         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16160         with parentheses.
16162         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16163         (grub_ext2_dir): In case the directory entry type is unknown, read
16164         it from the inode.
16166 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16168         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16169         grub_load_linux instead of grub_rescue_cmd_linux as second
16170         argument of grub_rescue_register_command.
16172         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16174 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16176         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16177         function.
16178         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16179         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16180         `loader/powerpc/ieee1275/linux.c',
16181         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16182         * include/grub/powerpc/ieee1275/ieee1275.h
16183         (grub_ieee1275_release): New prototype.
16184         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16185         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16186         normal, boot, linux and linux_normal.
16187         * loader/powerpc/ieee1275/linux.c: New file.
16188         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16190 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16192         * normal/arg.c (grub_arg_parse): Correct error handling after
16193         reallocating the argumentlist (check if `argl' is not null instead
16194         of checking if `args' is not null).
16195         * kern/mm.c (grub_realloc): Return the same pointer when using the
16196         same region, instead of returning the header address.
16198 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16200         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16201         one block instead of two when looking for the initial partition.
16202         (grub_partition_probe): Initialize the local variable `p' with 0.
16203         Use base 10 for the grub_strtoul call.
16204         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16205         need for one local variable.
16206         (grub_strtoul): Don't add the new value to `num', instead of that
16207         just assign it.
16209 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16211         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16212         (pxeboot_img_SOURCES): New variable.
16213         (pxeboot_img_ASFLAGS): Likewise.
16214         (pxeboot_img_LDFLAGS): Likewise.
16215         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16216         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16217         <lode_leroy@hotmail.com>.
16219 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16221         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16222         there was no input.
16224 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16226         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16227         the history buffer logic.
16229 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16231         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16232         (FILETYPE_INO_SYMLINK): New macros.
16233         (grub_ext2_find_file): Check if the node is a directory using the
16234         inode stat information instead of using the filetype in the
16235         dirent.  Exclude the first character of an absolute symlink.
16236         (grub_ext2_dir): Mask out the filetype part of the mode member of
16237         the inode.
16239 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16241         Add support for UFS version 1 and 2.  Add support for the minix
16242         filesystem version 1 and 2, both the variants with 14 and 30 long
16243         filenames.
16245         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16246         fs/minix.c.
16247         (grub_emu_SOURCES): Likewise.
16248         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16249         (ufs_mod_SOURCES): New variable.
16250         (ufs_mod_CFLAGS): Likewise.
16251         (minix_mod_SOURCES): Likewise.
16252         (minix_mod_CFLAGS): Likewise.
16253         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16254         fs/minix.c.
16255         (grubof_SOURCES): Likewise.
16256         * fs/ufs.c: New file.
16257         * fs/minix.c: New file.
16258         * include/grub/fs.h (grub_ufs_init): New prototype.
16259         (grub_ufs_fini): Likewise.
16260         (grub_minix_init): Likewise.
16261         (grub_minix_fini): Likewise.
16262         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16263         minix fs.
16265 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16267         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16268         commands/ls.c, commands/terminal.c, commands/boot.c,
16269         commands/cmp.c and commands/cat.c.
16270         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16272         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16273         "env.h"
16275 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16277         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16278         and grub_, respectively. Because the conversion is trivial and
16279         mechanical, I omit the details here. Please refer to the CVS
16280         if you need more information.
16282 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16284         * include/pupa: Renamed to ...
16285         * include/grub: ... this.
16286         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16287         * util/i386/pc/grub-mkimage.c: ... this.
16288         * util/i386/pc/pupa-setup.c: Renamed to ...
16289         * util/i386/pc/grub-setup.c: ... this.
16290         * util/pupa-emu.c: Renamed to ...
16291         * util/grub-emu.c: ... this.
16293 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16295         Add support for the newworld apple macintosh (PPC).  This has been
16296         tested on the powerbook 2000 only.  It only adds support for
16297         generic ieee1275 functions, console and disk support.  This should
16298         be easy to port to other architectures with support for Open
16299         Firmware.
16301         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16302         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16303         specific tests are only executed while building for the i386.
16304         Inverse test for crosscompile.
16305         * genmk.rb (Utility): Allow assembler files.
16306         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16307         * conf/powerpc-ieee1275.rmk: New file.
16308         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16309         * disk/powerpc/ieee1275/partition.c: Likewise.
16310         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16311         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16312         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16313         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16314         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16315         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16316         * include/pupa/powerpc/ieee1275/loader.h
16317         * include/pupa/powerpc/setjmp.h: Likewise.
16318         * include/pupa/powerpc/types.h: Likewise.
16319         * kern/powerpc/ieee1275/init.c: Likewise.
16320         * kern/powerpc/ieee1275/openfw.c: Likewise.
16321         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16323         These files were written by Johan Rydberg
16324         (jrydberg@night.trouble.net) and I only modified them slightly.
16326         * boot/powerpc/ieee1275/cmain.c: New file.
16327         * boot/powerpc/ieee1275/crt0.S: Likewise.
16328         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16329         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16331 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16333         * Makefile.in: Update copyright.
16334         * genmodsrc.sh: Likewise.
16335         * gensymlist.sh: Likewise.
16336         * term/i386/pc/vga.c: Indent correctly.
16338         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16339         bugreporting address.
16340         * util/i386/pc/pupa-setup.c (usage): Likewise,
16341         (main): Call pupa_ext2_init and pupa_ext2_fini.
16343         * fs/fat.c (log2): Renamed to ...
16344         (fat_log2): ... this.
16345         All callers changed.
16346         * kern/misc.c (memcpy): Alias to pupa_memmove.
16347         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16348         lvalue cast.
16349         * util/console.c (pupa_ncurses_fini): Return 0.
16351         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16352         Move fail label here.
16353         [__GNU__]: Don't warn when using stat.
16354         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16355         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16356         long int. Use strtol instead of strtoul.
16358 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16360         * commands/boot.c: New file.
16361         * commands/cat.c: Likewise.
16362         * commands/cmp.c: Likewise.
16363         * commands/ls.c: Likewise.
16364         * commands/terminal.c: Likewise.
16365         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16366         (pupa_register_command): Changed interface to match the new
16367         argument parser.
16368         (pupa_command_execute): Changed (almost rewritten) so it uses
16369         pupa_split_command.  Added support for setting variables using the
16370         syntax `foo=bar'.
16371         (rescue_command): Changed to work with the new argument parser.
16372         (terminal_command): Moved from here to commands/terminal.c.
16373         (set_command): New function.
16374         (unset_command): New function.
16375         (insmod_command): New function.
16376         (rmmod_command): New function.
16377         (lsmod_command): New function.
16378         (pupa_command_init): Don't initialize the command terminal
16379         anymore.  Initialize the commands set, unset, insmod, rmmod and
16380         lsmod.
16381         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16382         (kernel_img_HEADERS): Add arg.h and env.h.
16383         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16384         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16385         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16386         normal/arg.c.
16387         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16388         terminal.mod.
16389         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16390         (boot_mod_SOURCES): New variable.
16391         (terminal_mod_SOURCES): Likewise.
16392         (ls_mod_SOURCES): Likewise.
16393         (cmp_mod_SOURCES): Likewise.
16394         (cat_mod_SOURCES): Likewise.
16396         * normal/arg.c: New file.
16397         * kern/env.c: Likewise.
16398         * include/pupa/arg.h: Likewise.
16399         * include/pupa/env.h: Likewise.
16400         * font/manager.c (font_command): Changed to match argument parsing
16401         interface changes.
16402         (PUPA_MOD_INIT): Likewise.
16403         * hello/hello.c (pupa_cmd_hello): Likewise.
16404         (PUPA_MOD_INIT): Likewise.
16405         * include/pupa/disk.h: Include <pupa/device.h>.
16406         (pupa_print_partinfo): New prototype.
16407         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16408         (pupa_dl_get_prefix): Likewise.
16409         * include/pupa/misc.h: Include <pupa/err.h>.
16410         (pupa_isgraph): New prototype.
16411         (pupa_isdigit): Likewise.
16412         (pupa_split_cmdline): Likewise.
16413         * include/pupa/normal.h: Include <pupa/arg.h>.
16414         (pupa_command): Changed the prototype of the member `func' to
16415         match the argument parsing interface.  Added member `options'.
16416         (pupa_register_command): Updated to match function.
16417         (pupa_arg_parse): New prototype.
16418         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16419         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16420         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16421         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16422         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16423         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16424         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16425         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16426         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16427         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16428         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16429         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16430         * kern/disk.c: Include <pupa/file.h>.
16431         (pupa_print_partinfo): New function.
16432         * kern/dl.c: Include <pupa/env.h>.
16433         (pupa_dl_dir): Variable removed.
16434         (pupa_dl_load): Use the environment variable `prefix' instead of
16435         the variable pupa_dl_dir.
16436         (pupa_dl_set_prefix): Function removed.
16437         (pupa_dl_get_prefix): Likewise.
16438         * kern/i386/pc/init.c: Include <pupa/env.h>.
16439         (pupa_machine_init): Use the environment variable `prefix' instead of
16440         using pupa_dl_set_prefix to set the prefix.
16441         * kern/main.c: Include <pupa/env.h>.
16442         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16443         using pupa_dl_get_prefix to get the prefix.
16444         * kern/misc.c: Include <pupa/env.h>.
16445         (pupa_isdigit): New function.
16446         (pupa_isgraph): Likewise.
16447         (pupa_ftoa): Likewise.
16448         (pupa_vsprintf): Added support for printing values of the type
16449         `double'.  Make it possible to format variable output when using
16450         formatting like `%1.2%f'.
16451         (pupa_split_cmdline): New function.
16452         * kern/rescue.c: Include <pupa/env.h>.
16453         (next_word): Removed function.
16454         (pupa_rescue_cmd_prefix): Likewise.
16455         (pupa_rescue_cmd_set): New function.
16456         (pupa_rescue_cmd_unset): New function.
16457         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16458         split the command line instead of splitting it here.  Added
16459         support for setting variables using the syntax `foo=bar'.  Don't
16460         initialize the prefix command anymore.  Initialized the set and
16461         unset commands.
16462         * normal/cmdline.c: Include <pupa/env.h>.
16463         (pupa_tab_complete): Added prototypes for print_simple_completion,
16464         print_partition_completion, add_completion, iterate_commands,
16465         iterate_dev, iterate_part and iterate_dir. Moved code to print
16466         partition information from here to kern/disk.c.
16467         (pupa_cmdline_run): Don't check if the function exists anymore.
16468         * normal/main.c: Include <pupa/env.h>.
16469         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16470         instead of using pupa_dl_get_prefix to get the prefix.
16471         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16472         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16473         warning.
16474         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16475         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16476         ((unused))' to silence a gcc warning.
16477         (pupa_vga_setcolor): Likewise.
16478         (debug_command): Changed to match argument parsing
16479         interface changes.
16480         * util/pupa-emu.c: Include <pupa/env.h>.
16481         (options): Added 0's for unused fields to silence a gcc warning.
16482         (argp): Likewise.
16483         (main): Use the environment variable `prefix' instead of using
16484         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16485         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16486         and terminal.
16488         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16489         * util/misc.c: Include <malloc.h>.
16490         (pupa_malloc): Rewritten so errors are correctly reported.
16491         (pupa_realloc): Likewise.
16492         (pupa_memalign): Likewise.
16493         (pupa_mm_init_region): Declare unused variables with
16494         `__attribute__ ((unused))' to silence a gcc warning.
16495         * normal/i386/setjmp.S: Remove tab at the end of the file to
16496         silence a gcc warning.
16497         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16498         variables with `__attribute__ ((unused))' to silence a gcc
16499         warning.
16500         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16501         local variable i unsigned to silence a gcc warning.
16503         * kern/term.c: Include <pupa/misc.h>.
16504         (pupa_more_lines): New variable.
16505         (pupa_more): Likewise.
16506         (pupa_putcode): When the pager is active pause at the end of every
16507         screen.
16508         (pupa_set_more): New function.
16509         * include/pupa/term.h (pupa_set_more): New prototype.
16512 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16514         Now this project is GRUB 2 rather than PUPA. The location of
16515         the CVS repository was moved to GRUB's.
16517         * configure.ac: Use bug-grub as the reporting address.
16518         Use GRUB instead of PUPA.
16519         Change the version number to 1.90.
16521 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16523         * genkernsyms.sh: Updated copyright information.
16524         * genmk.rb: Likewise.
16525         * genmodsrc.sh: Likewise.
16526         * gensymlist.sh: Likewise.
16527         * boot/i386/pc/boot.S: Likewise.
16528         * boot/i386/pc/diskboot.S: Likewise.
16529         * disk/i386/pc/biosdisk.c: Likewise.
16530         * disk/i386/pc/partition.c: Likewise.
16531         * font/manager.c: Likewise.
16532         * fs/ext2.c: Likewise.
16533         * fs/fat.c: Likewise.
16534         * include/pupa/boot.h: Likewise.
16535         * include/pupa/device.h: Likewise.
16536         * include/pupa/disk.h: Likewise.
16537         * include/pupa/dl.h: Likewise.
16538         * include/pupa/elf.h: Likewise.
16539         * include/pupa/err.h: Likewise.
16540         * include/pupa/file.h: Likewise.
16541         * include/pupa/font.h: Likewise.
16542         * include/pupa/fs.h: Likewise.
16543         * include/pupa/kernel.h: Likewise.
16544         * include/pupa/loader.h: Likewise.
16545         * include/pupa/misc.h: Likewise.
16546         * include/pupa/mm.h: Likewise.
16547         * include/pupa/net.h: Likewise.
16548         * include/pupa/normal.h: Likewise.
16549         * include/pupa/rescue.h: Likewise.
16550         * include/pupa/setjmp.h: Likewise.
16551         * include/pupa/symbol.h: Likewise.
16552         * include/pupa/term.h: Likewise.
16553         * include/pupa/types.h: Likewise.
16554         * include/pupa/i386/setjmp.h: Likewise.
16555         * include/pupa/i386/types.h: Likewise.
16556         * include/pupa/i386/pc/biosdisk.h: Likewise.
16557         * include/pupa/i386/pc/boot.h: Likewise.
16558         * include/pupa/i386/pc/console.h: Likewise.
16559         * include/pupa/i386/pc/init.h: Likewise.
16560         * include/pupa/i386/pc/kernel.h: Likewise.
16561         * include/pupa/i386/pc/linux.h: Likewise.
16562         * include/pupa/i386/pc/loader.h: Likewise.
16563         * include/pupa/i386/pc/memory.h: Likewise.
16564         * include/pupa/i386/pc/multiboot.h: Likewise.
16565         * include/pupa/i386/pc/partition.h: Likewise.
16566         * include/pupa/i386/pc/time.h: Likewise.
16567         * include/pupa/i386/pc/vga.h: Likewise.
16568         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16569         * include/pupa/util/getroot.h: Likewise.
16570         * include/pupa/util/misc.h: Likewise.
16571         * include/pupa/util/resolve.h: Likewise.
16572         * kern/device.c: Likewise.
16573         * kern/disk.c: Likewise.
16574         * kern/dl.c: Likewise.
16575         * kern/err.c: Likewise.
16576         * kern/file.c: Likewise.
16577         * kern/fs.c: Likewise.
16578         * kern/loader.c: Likewise.
16579         * kern/main.c: Likewise.
16580         * kern/misc.c: Likewise.
16581         * kern/mm.c: Likewise.
16582         * kern/rescue.c: Likewise.
16583         * kern/term.c: Likewise.
16584         * kern/i386/dl.c: Likewise.
16585         * kern/i386/pc/init.c: Likewise.
16586         * kern/i386/pc/lzo1x.S: Likewise.
16587         * kern/i386/pc/startup.S: Likewise.
16588         * loader/i386/pc/chainloader.c: Likewise.
16589         * loader/i386/pc/linux.c: Likewise.
16590         * loader/i386/pc/multiboot.c: Likewise.
16591         * normal/cmdline.c: Likewise.
16592         * normal/command.c: Likewise.
16593         * normal/main.c: Likewise.
16594         * normal/menu.c: Likewise.
16595         * normal/i386/setjmp.S: Likewise.
16596         * term/i386/pc/console.c: Likewise.
16597         * term/i386/pc/vga.c: Likewise.
16598         * util/console.c: Likewise.
16599         * util/genmoddep.c: Likewise.
16600         * util/misc.c: Likewise.
16601         * util/pupa-emu.c: Likewise.
16602         * util/resolve.c: Likewise.
16603         * util/unifont2pff.rb: Likewise.
16604         * util/i386/pc/biosdisk.c: Likewise.
16605         * util/i386/pc/getroot.c: Likewise.
16606         * util/i386/pc/pupa-mkimage.c: Likewise.
16607         * util/i386/pc/pupa-setup.c: Likewise.
16609 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16611         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16612         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16613         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16614         reading and reset it after reading.
16615         (pupa_ext2_close): Return PUPA_ERR_NONE.
16617         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16618         Correct value.
16619         (struct linux_kernel_header): Add kernel_version and
16620         initrd_addr_max.
16621         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16622         pupa_file_read succeeds.
16623         (pupa_rescue_cmd_initrd): Implement.
16625 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16627         * fs/ext2.c (pupa_ext2_label): New function.
16628         (pupa_ext2_fs): Added label.
16629         * fs/fat.c (pupa_fat_label): New function.
16630         (pupa_fat_fs): Added label.
16631         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16633         * kern/misc.c (pupa_strndup): New function.
16634         * include/pupa/misc.h (pupa_strndup): New prototype.
16636         * include/pupa/normal.h: Include <pupa/err.h>.
16637         (pupa_set_history): New prototype.
16638         (pupa_iterate_commands): New prototype.
16639         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16640         <pupa/disk.h>, <pupa/file.h>.
16641         (hist_size): New variable.
16642         (hist_lines): Likewise.
16643         (hist_end): Likewise.
16644         (hist_used): Likewise.
16645         (pupa_set_history): New function.
16646         (pupa_history_get): Likewise.
16647         (pupa_history_add): Likewise.
16648         (pupa_history_replace): Likewise.
16649         (pupa_tab_complete): Likewise.
16650         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16651         completion shows partitionnames while completing partitions, this
16652         feature was suggested by Jeff Bailey.
16653         * normal/command.c (pupa_iterate_commands): New function.
16654         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16655         (pupa_normal_init): Initialize history buffer.
16656         (PUPA_MOD_INIT): Likewise.
16657         (pupa_normal_fini): Free the history buffer.
16658         (PUPA_MOD_FINI): Likewise.
16660         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16661         key.
16663         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16664         * configure.ac [i386]: Check for regparam bug.
16665         (NESTED_FUNC_ATTR) [! i386]: Defined.
16667 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16669         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16670         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16671         (pupa_emu_SOURCES): New variable.
16672         (pupa_emu_LDFLAGS): Likewise.
16673         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16674         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16675         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16676         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16677         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16678         (pupa_jmp_buf): New typedef.
16679         (pupa_setjmp) [PUPA_UTIL]: New macro.
16680         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16681         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16682         (pupa_refresh): New prototype.
16683         * include/pupa/util/getroot.h: New file.
16684         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16685         it.
16686         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16687         (pupa_rescue_cmd_cat): Likewise.
16688         (pupa_rescue_cmd_ls): Likewise.
16689         (pupa_rescue_cmd_testload): Likewise.
16690         (pupa_rescue_cmd_lsmod): Likewise.
16691         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16692         * normal/menu.c (run_menu): Likewise.
16693         * kern/term.c (pupa_cls): Likewise.
16694         (pupa_refresh): New function.
16695         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16696         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16697         * util/console.c: New file.
16699         * util/i386/pc/getroot.c: New file.
16700         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16701         (pupa_putchar): New function.
16702         (pupa_refresh): Likewise.
16703         (xgetcwd): Function moved to ...
16704         (strip_extra_slashes): Likewise.
16705         (get_prefix): Likewise.
16706         * util/i386/pc/getroot.c: ... here.
16707         (find_root_device): Function moved and renamed to...
16708         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16709         Changed all callers.
16710         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16711         and renamed to...
16712         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16713         Changed all callers.
16714         * util/misc.c (pupa_memalign): New function.
16715         (pupa_mm_init_region): Likewise.
16716         (pupa_register_exported_symbols): Likewise.
16717         (pupa_putchar): Function removed.
16718         * util/pupa-emu.c: New file.
16720 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16722         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16723         (_multiboot_mod_SOURCES): New variable.
16724         (_multiboot_mod_CFLAGS): Likewise.
16725         * loader/i386/pc/multiboot.c: New file.
16726         * include/pupa/i386/pc/multiboot.h: Likewise.
16727         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16728         (pupa_multiboot_real_boot): New function.
16729         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16730         (pupa_multiboot_real_boot): New prototype.
16731         (pupa_rescue_cmd_multiboot): Likewise
16732         (pupa_rescue_cmd_module): Likewise.
16734         * kern/loader.c (pupa_loader_set): Continue when
16735         pupa_loader_unload_func() fails.
16736         (pupa_loader_unset): New function.
16737         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16739         * kern/misc.c (pupa_stpcpy): New function.
16740         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16742 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16744         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16745         for available extensions.
16747         * include/pupa/i386/pc/time.h: New file.
16748         * kern/disk.c: Include <pupa/machine/time.h>.
16749         (PUPA_CACHE_TIMEOUT): New macro.
16750         (pupa_last_time): New variable.
16751         (pupa_disk_open): Flush the cache when there was a timeout.
16752         (pupa_disk_close): Reset the timer.
16753         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16754         pupa_currticks.
16755         * util/misc.c: Include <sys/times.h>
16756         (pupa_get_rtc): New function.
16758 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16760         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16761         as blocks.
16762         (pupa_ext2_get_file_block): Use blocks member.
16764         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16765         first block. Return -1 instead of pupa_errno on error.
16767 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16769         * README: In the pupa-mkimage example use _chain instead of chain
16770         and ext2 instead of fat.
16771         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16772         adding journal playback for ext2fs.
16773         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16774         (pkgdata_MODULES): Added ext2.mod.
16775         (ext2_mod_SOURCES): New variable.
16776         (ext2_mod_CFLAGS): Likewise.
16777         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16778         * include/pupa/misc.h (pupa_strncpy): New prototype.
16779         (pupa_strcat): Likewise.
16780         (pupa_strncmp): Likewise.
16781         * kern/misc.c (pupa_strcat): Enable function.
16782         (pupa_strncpy): New function.
16783         (pupa_strncmp): Likewise.
16784         * fs/ext2.c: New file.
16786         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16787         when the read failed before retrying.
16788         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16789         (_FILE_OFFSET_BITS): Likewise.
16790         * configure.ac: Added AC_SYS_LARGEFILE.
16792 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16794         * genmk.rb (PModule#rule): Make sure to get only symbol names
16795         from the output of nm.
16796         Reported by Robert Millan <zeratul2@wanadoo.es>.
16798 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16800         I forgot to check in these changes for a long time. This adds
16801         incomplete support for VGA console, and this is still very
16802         buggy. Also, a lot of consideration is required for I18N,
16803         UNICODE, and VGA font issues. Therefore, assume that this is
16804         such that "better than nothing".
16806         * font/manager.c: New file.
16807         * include/pupa/font.h: Likewise.
16808         * include/pupa/i386/pc/vga.h: Likewise.
16809         * term/i386/pc/vga.c: Likewise.
16810         * util/unifont2pff.rb: Likewise.
16812         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16813         (pkgdata_MODULES): Added vga.mod and font.mod.
16814         (vga_mod_SOURCES): New variables.
16815         (vga_mod_CFLAGS): Likewise.
16816         (font_mod_SOURCES): Likewise.
16817         (font_mod_CFLAGS): Likewise.
16819         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16821         * include/pupa/term.h: Include pupa/err.h.
16822         (struct pupa_term): Added init and fini.
16823         Changed the argument of putchar to pupa_uint32_t.
16825         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16826         (pupa_console_real_putchar): New prototype.
16827         (pupa_console_putchar): Removed.
16828         (pupa_console_checkkey): Exported.
16829         (pupa_console_getkey): Likewise.
16831         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16832         characters.
16834         * kern/term.c (pupa_term_set_current): Rewritten.
16835         (pupa_putchar): Likewise.
16836         (pupa_putcode): New function.
16838         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16839         (pupa_console_real_putchar): ... this.
16840         (pupa_vga_set_mode): New function.
16841         (pupa_vga_get_font): Likewise.
16843         * normal/command.c: Include pupa/term.h.
16844         (terminal_command): New function.
16845         (pupa_command_init): Register the command "terminal".
16847         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16848         (DISP_UP): Likewise.
16849         (DISP_RIGHT): Likewise.
16850         (DISP_DOWN): Likewise.
16851         (DISP_HLINE): Likewise.
16852         (DISP_VLINE): Likewise.
16853         (DISP_UL): Likewise.
16854         (DISP_UR): Likewise.
16855         (DISP_LL): Likewise.
16856         (DISP_LR): Likewise.
16858         * term/i386/pc/console.c (pupa_console_putchar): New function.
16860 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16862         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16863         FIX. Reverse the path_list.
16865         * include/pupa/normal.h: Export pupa_register_command and
16866         pupa_unregister_command.
16868         * hello/hello.c (pupa_cmd_hello): New module.
16869         * conf/i386-pc.rmk: Added hello.mod.
16871 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16873         * kern/i386/pc/lzo1x.S: New file.
16875         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16876         (compress_kernel): New variable.
16877         (generate_image): Heavily modified to support compressing a
16878         large part of the core image.
16880         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16881         leak.
16882         (pupa_util_load_image): New function.
16884         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16885         (pupa_compressed_size): New variable.
16886         (codestart): Enable Gate A20 here.
16887         Decompress the compressed part of the core image.
16888         Rearrange the code to put functions and variables which are
16889         required for initialization in the non-compressed part.
16890         Include lzo1x.S.
16892         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16893         here.
16895         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16897         * include/pupa/i386/pc/kernel.h
16898         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16899         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16900         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16901         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16902         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16904         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16906         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16907         (Utility#rule): Likewise.
16909         * configure.ac: Check if LZO is available.
16911 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16913         * include/pupa/normal.h: New file.
16914         * include/pupa/setjmp.h: Likewise.
16915         * include/pupa/i386/setjmp.h: Likewise.
16916         * normal/cmdline.c: Likewise.
16917         * normal/command.c: Likewise.
16918         * normal/main.c: Likewise.
16919         * normal/menu.c: Likewise.
16920         * normal/i386/setjmp.S: Likewise.
16922         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16923         (pupa_rescue_cmd_initrd): Likewise.
16925         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16926         Likewise.
16928         * kern/i386/pc/startup.S (translation_table): New variable.
16929         (translate_keycode): New function.
16930         (pupa_console_getkey): Call translate_keycode.
16932         * kern/rescue.c (attempt_normal_mode): New function.
16933         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16934         it failed, print a message.
16936         * kern/mm.c (pupa_real_malloc): Print more information when a
16937         free magic is broken.
16938         (pupa_free): If the first free header is not free actually, set
16939         it to P.
16941         * kern/main.c (pupa_load_normal_mode): Just load the module
16942         "normal".
16943         (pupa_main): Don't print the message
16944         "Entering into rescue mode..." here.
16946         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16947         Declared.
16948         (pupa_rescue_cmd_initrd): Likewise.
16949         (pupa_rescue_cmd_initrd): Likewise.
16951         * include/pupa/symbol.h (FUNCTION): Specify the type.
16952         (VARIABLE): Likewise.
16954         * include/pupa/err.h (pupa_err_t): Added
16955         PUPA_ERR_UNKNOWN_COMMAND.
16957         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16958         (pupa_dl_get_prefix): Likewise.
16960         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16961         Added _chain.mod and _linux.mod instead of chain.mod and
16962         linux.mod.
16963         (chain_mod_SOURCES): Renamed to ...
16964         (_chain_mod_SOURCES): ... this.
16965         (chain_mod_CFLAGS): Renamed to ...
16966         (_chain_mod_CFLAGS): ... this.
16967         (linux_mod_SOURCES): Renamed to ...
16968         (_linux_mod_SOURCES): ... this.
16969         (linux_mod_CFLAGS): Renamed to ...
16970         (_linux_mod_CFLAGS): ... this.
16971         (normal_mod_SOURCES): New variable.
16972         (normal_mod_CFLAGS): Likewise.
16973         (normal_mod_ASFLAGS): Likewise.
16975 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16977         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16978         possible.
16980         * kern/dl.c (pupa_dl_ref): Refer depending modules
16981         recursively.
16982         (pupa_dl_unref): Unrefer depending modules recursively.
16983         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16984         a module is unloaded before one depending on that module is
16985         unloaded.
16986         (pupa_dl_unload): Unload depending modules explicitly,
16987         if possible.
16989 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16991         * include/pupa/i386/pc/linux.h: New file.
16992         * loader/i386/pc/linux.c: Likewise.
16994         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16995         Removed.
16996         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16997         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16998         of PUPA_CHAINLOADER_BOOT_SECTOR.
17000         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17001         (pupa_linux_prot_size): New variable.
17002         (pupa_linux_tmp_addr): Likewise.
17003         (pupa_linux_real_addr): Likewise.
17004         (pupa_linux_boot_zimage): New function.
17005         (pupa_linux_boot_bzimage): Likewise.
17007         * kern/i386/pc/init.c (struct mem_region): New structure.
17008         (MAX_REGIONS): New macro.
17009         (mem_regions): New variable.
17010         (num_regions): Likewise.
17011         (pupa_os_area_addr): Likewise.
17012         (pupa_os_area_size): Likewise.
17013         (pupa_lower_mem): Likewise.
17014         (pupa_upper_mem): Likewise.
17015         (add_mem_region): New function.
17016         (compact_mem_regions): Likewise.
17017         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17018         the size of the conventional memory and that of so-called upper
17019         memory (before the first memory hole).
17020         Instead of adding each found region to free memory, use
17021         add_mem_region and add them after removing overlaps.
17022         Also, add only 1/4 of the upper memory to free memory. The rest
17023         is used for loading OS images. Maybe this is ad hoc, but this
17024         makes it much easier to relocate OS images when booting.
17026         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17027         (pupa_enter_rescue_mode): Don't register initrd and module.
17029         * kern/mm.c: Include pupa/dl.h.
17031         * kern/main.c: Include pupa/file.h and pupa/device.h.
17033         * kern/loader.c (pupa_loader_load_module_func): Removed.
17034         (pupa_loader_load_module): Likewise.
17036         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17037         ``.o''.
17039         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17040         (pupa_linux_tmp_addr): Likewise.
17041         (pupa_linux_real_addr): Likewise.
17042         (pupa_linux_boot_zimage): Likewise.
17043         (pupa_linux_boot_bzimage): Likewise.
17045         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17046         (pupa_upper_mem): Likewise.
17047         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17048         module is too dangerous.
17050         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17051         (pupa_os_area_size): Likewise.
17052         (pupa_loader_set): Remove the first argument. Loader doesn't
17053         manage modules or initrd any longer.
17054         (pupa_loader_load_module): Removed.
17056         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17057         (linux_mod_SOURCES): New variable.
17058         (linux_mod_CFLAGS): Likewise.
17060 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17062         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17063         the length of a blocklist correctly.
17065         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17066         Use ioctl only if the OS file is a block device.
17067         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17068         not very useful for normal files.
17070         * kern/main.c (pupa_set_root_dev): New function.
17071         (pupa_load_normal_mode): Likewise.
17072         (pupa_main): Call those above.
17074         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17075         pupa_uint16_t.
17077         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17079 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17081         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17082         (setup): Configure the installed partition information and the
17083         dl prefix.
17085         * loader/i386/pc/chainloader.c (my_mod): New variable.
17086         (pupa_chainloader_unload): New function.
17087         (pupa_rescue_cmd_chainloader): Refer itself.
17088         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17090         * kern/i386/pc/startup.S (install_partition): Removed.
17091         (version_string): Likewise.
17092         (config_file): Likewise.
17093         (pupa_install_dos_part): New variable.
17094         (pupa_install_bsd_part): Likewise.
17095         (pupa_prefix): Likewise.
17096         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17098         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17099         and pupa/misc.h.
17100         (make_install_device): New function.
17101         (pupa_machine_init): Set the dl prefix.
17103         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17104         (buf): Renamed to ...
17105         (linebuf): ... this.
17106         (pupa_rescue_cmd_prefix): New function.
17107         (pupa_rescue_cmd_insmod): Likewise.
17108         (pupa_rescue_cmd_rmmod): Likewise.
17109         (pupa_rescue_cmd_lsmod): Likewise.
17110         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17111         rmmod and lsmod.
17113         * kern/mm.c (pupa_memalign): If failed even after invalidating
17114         disk caches, unload unneeded modules and retry.
17116         * kern/misc.c (pupa_memmove): New function.
17117         (pupa_memcpy): Removed.
17118         (pupa_strcpy): New function.
17119         (pupa_itoa): Made static.
17121         * kern/dl.c (pupa_dl_iterate): New function.
17122         (pupa_dl_ref): Likewise.
17123         (pupa_dl_unref): Likewise.
17124         (pupa_dl_unload): Return if succeeded or not.
17125         (pupa_dl_unload_unneeded): New function.
17126         (pupa_dl_unload_all): Likewise.
17127         (pupa_dl_init): Renamed to ...
17128         (pupa_dl_set_prefix): ... this.
17129         (pupa_dl_get_prefix): New function.
17131         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17132         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17133         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17134         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17135         (pupa_install_dos_part): Declared.
17136         (pupa_install_bsd_part): Likewise.
17137         (pupa_prefix): Likewise.
17138         (pupa_boot_drive): Likewise.
17140         * include/pupa/types.h: Fix a typo.
17142         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17143         pupa_memmove.
17144         (pupa_memmove): Declared.
17145         (pupa_strcpy): Likewise.
17147         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17148         pupa_mod_init takes one argument, its own module.
17149         (pupa_dl_unload_unneeded): Declared.
17150         (pupa_dl_unload_all): Likewise.
17151         (pupa_dl_ref): Likewise.
17152         (pupa_dl_unref): Likewise.
17153         (pupa_dl_iterate): Likewise.
17154         (pupa_dl_init): Renamed to ...
17155         (pupa_dl_set_prefix): ... this.
17156         (pupa_dl_get_prefix): Declared.
17158         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17159         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17160         unloaded.
17161         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17162         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17164         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17165         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17167 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17169         * util/i386/pc/pupa-setup.c (setup): Define the internal
17170         function find_first_partition_start at the top level, because GCC
17171         3.0.x cannot compile internal functions in deeper scopes
17172         correctly.
17173         (find_root_device): Use lstat instead of stat.
17174         Don't follow symbolic links.
17175         Fix the path-constructing code.
17177         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17178         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17179         by a BLKGETSIZE ioctl first, because block devices don't fill
17180         the member st_mode of the structure stat on Linux.
17181         [__linux__] (linux_find_partition): Use a temporary buffer
17182         REAL_DEV for the working space. Copy it to DEV before returning.
17183         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17184         buffer cache consistent.
17185         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17186         strncmp. The previous value was merely wrong.
17187         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17189         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17190         FAT size is 12. The previous value was merely wrong.
17192         * kern/main.c (pupa_main): Don't split the starting message from
17193         newlines.
17195         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17196         LF, because BIOS goes crazy about character attributes in this
17197         case.
17199 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17201         * include/i386/pc/util/biosdisk.h: New file.
17202         * util/i386/pc/biosdisk.c: Likewise.
17203         * util/i386/pc/pupa-setup.c: Likewise.
17205         * Makefile.in (INCLUDE_DISTFILES): Added
17206         include/pupa/i386/pc/util/biosdisk.h.
17207         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17208         directory util/i386/pc.
17209         (install-local): Added a rule for sbin_UTILITIES.
17210         (uninstall): Likewise.
17212         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17214         * util/misc.c (xrealloc): New function.
17215         (pupa_malloc): Likewise.
17216         (pupa_free): Likewise.
17217         (pupa_realloc): Likewise.
17218         (pupa_stop): Likewise.
17219         (pupa_putchar): Likewise.
17221         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17223         * include/pupa/util/misc.h (xrealloc): Declared.
17225         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17226         macro.
17227         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17228         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17230         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17231         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17233         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17234         way should be implemented.
17235         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17237         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17238         the size of NAME for safety.
17239         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17240         0x88.
17242         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17243         (pupa_setup_SOURCES): Likewise.
17245         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17247 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17249         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17250         bunch of pushl's from pusha, because this destroys the return
17251         value.
17253 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17255         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17256         This means that any missing prototypes could be fatal. Also, you
17257         must take care when writing assembly code. See the comments at
17258         the beginning of startup.S, for more details.
17260         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17261         compilation mechanism.
17262         (pupa_chainloader_real_boot): Likewise.
17263         (pupa_biosdisk_rw_int13_extensions): Likewise.
17264         (pupa_biosdisk_rw_standard): Likewise.
17265         (pupa_biosdisk_check_int13_extensions): Likewise.
17266         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17267         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17268         (pupa_get_memsize): Likewise.
17269         (pupa_get_mmap_entry): Likewise.
17270         (pupa_console_putchar): Likewise.
17271         (pupa_console_setcursor): Likewise.
17272         (pupa_getrtsecs): Use pushl instead of push.
17274         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17275         memory instead of the stack for a mmap entry, because some
17276         BIOSes may ignore the maximum size and overflow.
17278         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17280         * genmk.rb (PModule#rule): Compile automatically generated
17281         sources with module-specific CFLAGS as well as other sources.
17283 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17285         * configure.ac: Check ld.
17286         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17287         respectively, before checking endianness and sizes.
17289         * Makefile.in (LD): New variable.
17291 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17293         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17295 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17297         * Changelog: New file.