2009-06-08 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder/solaris.git] / ChangeLog
blobddc8389983dbb6cb0f3468a16dd174452937e028
1 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
3         * Makefile.in (uninstall): Remove all $include_DATA files.
5 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
7         * commands/true.c: New file.  Implement the true and false commands.
8         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
9         (true_mod_SOURCES): New variable.
10         (true_mod_CFLAGS): Likewise.
11         (true_mod_LDFLAGS): Likewise.
13 2009-06-05  Colin D Bennett  <colin@gibibit.com>
15         Optimized font character lookup using binary search instead of linear
16         search.  Fonts now are required to have the character index ordered by
17         code point.
19         * font/font.c (load_font_index): Verify that fonts have ordered
20         character indices.
21         (find_glyph): Use binary search instead of linear search to find a
22         character in a font.
24 2009-06-05  Michael Scherer  <misc@mandriva.org>
26         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
27         uses case sensitive btree.
28         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
29         only for case insensitive filesystems.
31 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
33         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
34         * conf/common.rmk (search_mod_CFLAGS): likewise
36 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
38         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to 
39         compensate a compiler bug
41 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
43         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitely define as 8
44         instead of '\b'
45         
46 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
48         Definitions for creating asm symbols with Apple's CC
50         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
51         [APPLE_CC] (VARIABLE): likewise
53 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
55         Disable lnxboot.img when compiled
56         with Apple's CC
58         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
59         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
60         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
61         [! APPLE_CC] (CODE_LENG): skip
62         [! APPLE_CC] (setup_sects): likewise
63         [! APPLE_CC]: skip filling
64         
65 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
67         Address in trampolines based on 32-bit registers when compiled
68         with Apple's CC
70         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers 
71         for addresses
72         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
74 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
76         Avoid aliases when compiling with Apple's CC for PCBIOS machine
78         * kern/misc.c [APPLE_CC] (memcpy): new function
79         [APPLE_CC] (memmove): likewise
80         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
81         (memcpy): define alias conditionaly on !APPLE_CC
82         (memset): likewise
83         (abort): likewise
84         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
85         APPLE_CC are defined
86         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
87         (grub_assert_fail): make prototype conditional
89 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
91         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
93         * conf/common.rmk (bin_UTILITIES): add (on false on condition) 
94         grub-macho2img 
95         (CLEANFILES): add grub-macho2img
96         (grub_macho2img_SOURCES): new variable
97         * kern/i386/pc/startup.S (bss_start): new variable
98         (bss_end): likewise
99         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
100         * util/grub-macho2img.c: new file
102 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
104         Use objconv when compiling with Apple's CC
106         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
107         (efiemu64.o): likewise
108         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
109         when compiling with Apple's CC
110         (efiemu64_s.o): likewise
111         * configure.ac: check for objconv when compiling with Apple's CC
112         * genmk.rb: use objconv for modules when compiled with Apple's CC
113         
114 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
116         Define segment as well as section when compiling with
117         Apple's CC
119         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
120         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
121         (efiemu_convert_pointer): likewise
122         (efiemu_set_virtual_address_map): likewise
123         (efiemu_convert_pointer): likewise
124         (efiemu_getcrc32): likewise
125         (init_crc32_table): likewise
126         (reflect): likewise
127         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
128         (GRUB_MOD_DEP): likewise
129         
130 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
132         Allow a compilation without -mcmodel=large
134         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
135         when compiled without -mcmodel=large
136         (filter_memory_map): remove memory post 4 GiB when compiled 
137         without -mcmodel=large
138         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to 
139         TARGET_CFLAGS when -mcmodel=large isn't supported
140         
141 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
143         Remove nested functions in efiemu core
145         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
146         
147 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
149         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
151         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
152         temporary storage
153         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when 
154         using Apple's CC 
155         (grub_cpu_is_tsc_supported): likewise
156         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
157         
158 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
160         Absolute addressing through constant with Apple's cc
162         * kern/i386/pc/startup.S: Define necessary constants
163         and address through it when using ABS with Apple's CC
164         * boot/i386/pc/diskboot.S: likewise
165         * boot/i386/pc/boot.S: likewise
166         * boot/i386/pc/lnxboot.S: likewise
167         * boot/i386/pc/cdboot.S: likewise
168         * mmap/i386/pc/mmap_helper.S: likewise
169         * commands/i386/pc/drivemap_int13h.S: likewise
171 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
173         Check if compiler is apple cc
175         * Makefile.in (ASFLAGS): new variable
176         (TARGET_ASFLAGS): likewise
177         (TARGET_MODULE_FORMAT): likewise
178         (TARGET_APPLE_CC): likewise
179         (OBJCONV): likewise
180         (TARGET_IMG_CFLAGS): likewise
181         (TARGET_CPPFLAGS): add includedir
182         * configure.ac: call grub_apple_cc and grub_apple_target_cc
183         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
184         Check for linker script only if compiler isn't Apple's CC
185         (TARGET_MODULE_FORMAT): set
186         (TARGET_APPLE_CC): likewise
187         (TARGET_ASFLAGS): likewise
188         (ASFLAGS): likewise
189         Check for objcopy only if compiler isn't Apple's CC
190         Check for BSS symbol only if compiler isn't Apple's CC
191         * genmk.rb: adapt nm options if we use Apple's utils
192         * aclocal.m4 (grub_apple_cc): new test
193         (grub_apple_target_cc): likewise
194         
195 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
197         Simplify sed expressions and improve awk
199         * Makefile.in (install-local): simplify sed expression
200         * gencmdlist.sh: likewise
201         * genmoddep.awk: avoid adding module as a dependency of itself
203 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
205         Add missing start symbols
207         * boot/i386/pc/boot.S: add start
208         * boot/i386/pc/pxeboot.S: likewise
209         
210 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
212         Fix wrong assumptions with grub-mkimage on EFI
213         
214         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
215         (relocate_addresses): consider both r_addend and value at offset
216         (make_mods_section): zerofill modinfo and header
217         (convert_elf): write prefix here
218         
219 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
221         Use .asciz instead of .string
223         * i386/pc/diskboot.S: use .asciz instead of .string
224         * i386/pc/boot.S: likewise
225         * include/grub/dl.h (GRUB_MOD_DEP): likewise
226         (GRUB_MOD_NAME): likewise
227         
228 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
230         gfxpayload support
232         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
233         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
234         (grub_video_setup): remove
235         (grub_video_set_mode): new prototype
236         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
237         (vid_mode): remove
238         (linux_vesafb_res): compile only on PCBIOS
239         (grub_linux_boot): support gfxpayload
240         * loader/i386/pc/xnu.c (video_hook): new function
241         (grub_xnu_set_video): support gfxpayload
242         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
243         (DEFAULT_VIDEO_HEIGHT): likewise
244         (DEFAULT_VIDEO_FLAGS): likewise
245         (DEFAULT_VIDEO_MODE): new definition
246         (video_hook): new function
247         (grub_gfxterm_init): use grub_video_set_mode
248         * util/grub.d/30_os-prober.in: remove explicit modesetting before 
249         loading xnu
250         * video/video.c (grub_video_setup): removed
251         (grub_video_set_mode): new function based on grub_gfxterm_init and 
252         grub_video_setup
254 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
256         Avoid calling biosdisk in drivemap
258         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
259         (revparse_biosdisk): likewise
260         (list_mappings): derive name from id directly
261         (grub_cmd_drivemap): use tryparse_diskstring
262         
263 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
265         Script fixes
267         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
268         (grub_lexer_param): add tokenonhold
269         (grub_script_create_cmdline): remove cmdline. All callers updated
270         (grub_script_function_create): make functionname
271         grub_script_arg. All callers updated
272         (grub_script_execute_argument_to_string): new prototype
273         * kern/parser.c (state_transitions): reorder
274         (grub_parser_cmdline_state): fix a bug and make more compact
275         * script/sh/execute.c (grub_script_execute_argument_to_string): 
276         make global
277         (grub_script_execute_cmdline): use new format
278         * script/sh/function.c (grub_script_function_create): make functionname
279         grub_script_arg. All callers updated
280         * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
281         (grub_script_yylex): remove
282         (grub_script_yylex2): renamed to ...
283         (grub_script_yylex): ...renamed
284         parse the expressions like a${b}c
285         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
286         (GRUB_PARSER_TOKEN_VAR): remove
287         (GRUB_PARSER_TOKEN_NAME): likewise
288         ("if"): declare as typeless
289         ("while"): likewise
290         ("function"): likewise
291         ("else"): likewise
292         ("then"): likewise
293         ("fi"): likewise
294         (text): remove
295         (argument): likewise
296         (script): accept empty scripts and make exit on error
297         (arguments): use GRUB_PARSER_TOKEN_ARG
298         (function): likewise
299         (command): move error handling to script
300         (menuentry): move grub_script_lexer_ref before
301         * script/sh/script.c (grub_script_create_cmdline): remove cmdline 
302         argument. All callers updated
304 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
306         Prevent GRUB from probing floppies during boot.
308         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
309         * commands/search.c (options): Add --no-floppy.
310         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
311         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
312         --no-floppy when searching for UUIDs.
314 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
316         Simplify the code duplication in commands/search.c.
318         * commands/search.c (search_label, search_fs_uuid): Merge into ...
319         (search_fs): ... this.  Update all users.
321 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
323         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
325 2009-05-28  Pavel Roskin  <proski@gnu.org>
327         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
328         Remove the original symlink explicitly.
330         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
331         just one slash.  That's how grub_fshelp_find_file() does it.
333 2009-05-26  Pavel Roskin  <proski@gnu.org>
335         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
336         to `str'.
338         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
339         possibly unused.
341 2009-05-25  Christian Franke  <franke@computer.org>
343         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
344         register.
345         (grub_atapi_identify): Add wait after drive select.
346         (grub_ata_identify): Do more strict status register check before
347         calling grub_atapi_identify ().  Suppress error message if status
348         register is 0x00 after command failure.  Add status register
349         check after PIO read to avoid bogus identify due to stuck DRQ.
350         Thanks to Pavel Roskin for testing.
351         (grub_device_initialize): Remove unsafe status register check.
352         Thanks to 'phcoder' for problem report and patch.
353         Prevent sign extension in debug message.
355 2009-05-23  Colin D Bennett  <colin@gibibit.com>
357         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
358         definition file, and functions defined in `normal/menu.c' have had
359         their prototypes moved to `include/grub/menu.h' for consistency.
361         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
362         from normal.h.
363         (grub_menu_get_entry): Likewise.
364         (grub_menu_get_timeout): Likewise.
365         (grub_menu_set_timeout): Likewise.
366         (grub_menu_execute_entry): Likewise.
367         (grub_menu_execute_with_fallback): Likewise.
368         (grub_menu_entry_run): Likewise.
370         * include/grub/normal.h: Re-ordered and grouped function
371         prototypes by file that the function is defined in.
372         (grub_menu_execute_callback): Removed; moved to menu.h.
373         (grub_menu_get_entry): Likewise.
374         (grub_menu_get_timeout): Likewise.
375         (grub_menu_set_timeout): Likewise.
376         (grub_menu_execute_entry): Likewise.
377         (grub_menu_execute_with_fallback): Likewise.
378         (grub_menu_entry_run): Likewise.
379         (grub_menu_addentry): Renamed from this ...
380         (grub_normal_add_menu_entry): ... to this.
382         * normal/main.c (grub_menu_addentry): Renamed from this ...
383         (grub_normal_add_menu_entry): ... to this.
385         * script/sh/execute.c (grub_script_execute_menuentry): Update
386         reference to renamed grub_menu_addentry function.
388 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
390         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
392 2009-05-22  Pavel Roskin  <proski@gnu.org>
394         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
395         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
396         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
397         compiling for the i386 targets, but not for the utilities.
399         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
400         to grub_uint8_t.
401         (grub_root_drive): Likewise.
402         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
403         remove alignment.
404         (grub_root_drive): Change size to byte.
405         (grub_start_addr): Remove.
406         (grub_end_addr): Likewise.
407         (grub_apm_bios_info): Likewise.
409 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
411         * normal/i386: Remove.
412         * normal/powerpc: Likewise.
413         * normal/sparc64: Likewise.
414         * normal/x86_64: Likewise.
416 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
418         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
419         * loader/i386/linux_trampoline.S: Fix identation
420         * loader/i386/xnu_helper.S: Likewise
422 2009-05-18  Colin D Bennett  <colin@gibibit.com>
424         Display error messages when parsing a Lua statement fails.
425         Previously, executing a syntactically invalid statement like
426         ")foo" or "bar;" would silently fail.
428         * script/lua/grub_main.c (handle_lua_error): New function.
429         (grub_lua_parse_line): Improved reporting of Lua parser and
430         execution errors.
432 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
434         Remove -Werror which causes build to fail on some systems
436         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
437         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
438         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
440 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
442         trampoline for linux on 64-bit platform
444         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
445         loader/i386/efi/linux_trampoline.S
446         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
447         declration
448         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
449         here
450         * loader/i386/linux_trampoline.S: moved here
451         * loader/i386/efi/linux.c (allocate_pages): reserve space for
452         trampoline
453         (jumpvector): removed
454         (grub_linux_trampoline_start): new declaration
455         (grub_linux_trampoline_end): likewise
456         (grub_linux_boot): use trampoline when on 64-bit platform
457         * loader/i386/linux.c: likewise
459 2009-05-16  Pavel Roskin  <proski@gnu.org>
461         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
462         const to avoid a warning.
463         (grub_lua_setenv): Likewise.
464         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
465         lmsg to fix a warning.
467 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
469         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
470         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
471         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
472         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
473         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
474         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
475         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
476         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
478 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
480         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
482 2009-05-16  Bean  <bean123ch@gmail.com>
484         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
485         (lua_mod_SOURCES): New variable.
486         (lua_mod_CFLAGS): Likewise.
487         (lua_mod_LDFLAGS): Likewise.
489         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
490         (setjmp_mod_SOURCES): New variable.
491         (setjmp_mod_CFLAGS): Likewise.
492         (setjmp_LDFLAGS): Likewise.
494         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
495         (setjmp_mod_SOURCES): New variable.
496         (setjmp_mod_CFLAGS): Likewise.
497         (setjmp_LDFLAGS): Likewise.
499         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
500         (setjmp_mod_SOURCES): New variable.
501         (setjmp_mod_CFLAGS): Likewise.
502         (setjmp_LDFLAGS): Likewise.
504         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
505         (setjmp_mod_SOURCES): New variable.
506         (setjmp_mod_CFLAGS): Likewise.
507         (setjmp_LDFLAGS): Likewise.
509         * normal/i386/setjmp.S: Moved from here ...
510         * lib/i386/setjmp.S: ... Moved here
511         * normal/x86_64/setjmp.S: Moved from here ...
512         * lib/x86_64/setjmp.S: ... Moved here
513         * normal/powerpc/setjmp.S: Moved from here ...
514         * lib/powerpc/setjmp.S: ... Moved here
515         * normal/sparc64/setjmp.S: Moved from here ...
516         * lib/sparc64/setjmp.S: ... Moved here
518         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
519         returns_twice in mingw.
521         * script/lua/grub_lib.c: New file.
522         * script/lua/grub_lib.h: Likewise.
523         * script/lua/grub_lua.h: Likewise.
524         * script/lua/grub_main.c: Likewise.
525         * script/lua/lapi.c: Likewise.
526         * script/lua/lapi.h: Likewise.
527         * script/lua/lauxlib.c: Likewise.
528         * script/lua/lauxlib.h: Likewise.
529         * script/lua/lbaselib.c: Likewise.
530         * script/lua/lcode.c: Likewise.
531         * script/lua/lcode.h: Likewise.
532         * script/lua/ldblib.c: Likewise.
533         * script/lua/ldebug.c: Likewise.
534         * script/lua/ldebug.h: Likewise.
535         * script/lua/ldo.c: Likewise.
536         * script/lua/ldo.h: Likewise.
537         * script/lua/ldump.c: Likewise.
538         * script/lua/lfunc.c: Likewise.
539         * script/lua/lfunc.h: Likewise.
540         * script/lua/lgc.c: Likewise.
541         * script/lua/lgc.h: Likewise.
542         * script/lua/linit.c: Likewise.
543         * script/lua/liolib.c: Likewise.
544         * script/lua/llex.c: Likewise.
545         * script/lua/llex.h: Likewise.
546         * script/lua/llimits.h: Likewise.
547         * script/lua/lmathlib.c: Likewise.
548         * script/lua/lmem.c: Likewise.
549         * script/lua/lmem.h: Likewise.
550         * script/lua/loadlib.c: Likewise.
551         * script/lua/lobject.c: Likewise.
552         * script/lua/lobject.h: Likewise.
553         * script/lua/lopcodes.c: Likewise.
554         * script/lua/lopcodes.h: Likewise.
555         * script/lua/loslib.c: Likewise.
556         * script/lua/lparser.c: Likewise.
557         * script/lua/lparser.h: Likewise.
558         * script/lua/lstate.c: Likewise.
559         * script/lua/lstate.h: Likewise.
560         * script/lua/lstring.c: Likewise.
561         * script/lua/lstring.h: Likewise.
562         * script/lua/lstrlib.c: Likewise.
563         * script/lua/ltable.c: Likewise.
564         * script/lua/ltable.h: Likewise.
565         * script/lua/ltablib.c: Likewise.
566         * script/lua/ltm.c: Likewise.
567         * script/lua/ltm.h: Likewise.
568         * script/lua/lua.h: Likewise.
569         * script/lua/luaconf.h: Likewise.
570         * script/lua/lualib.h: Likewise.
571         * script/lua/lundump.c: Likewise.
572         * script/lua/lundump.h: Likewise.
573         * script/lua/lvm.c: Likewise.
574         * script/lua/lvm.h: Likewise.
575         * script/lua/lzio.c: Likewise.
576         * script/lua/lzio.h: Likewise.
578 2009-05-16  Bean  <bean123ch@gmail.com>
580         * include/grub/kernel.h (grub_module_header_types): Add type
581         OBJ_TYPE_CONFIG.
583         * kern/main.c (grub_load_config): New function.
584         (grub_main): Call grub_load_config to read boot config.
586         * grub-mkimage (generate_image): New parameter config_path.
587         (options): New option --config.
588         (main): Parse --config option, and pass it to generate_image.
590 2009-05-14  Christian Franke  <franke@computer.org>
592         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
593         This fixes build on Cygwin.
595 2009-05-14  Pavel Roskin  <proski@gnu.org>
597         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
598         jump.  This saves two bytes, so the typical case of 2 swapped
599         drives would fit 32 bytes.
601 2009-05-13  Pavel Roskin  <proski@gnu.org>
603         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
604         grub_uint32_t to avoid a warning.
606         * loader/i386/linux.c (allocate_pages): When assigning
607         real_mode_mem, cast through grub_size_t to fix a warning.  The
608         code already makes sure that the value would fit a pointer.
609         (grub_linux_setup_video): Cast render_target->data to
610         grub_size_t to fix a warning.
612 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
614         * commands/i386/pc/drivemap.c: New file - implement drivemap
615         command.
616         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
617         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
619 2009-05-13  Pavel Roskin  <proski@gnu.org>
621         * util/i386/pc/grub-setup.c (setup): Remove unused variable
622         embedding_area_exists.
624 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
626         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
627         it easier to understand / work with.
628         Improve warning messages for cases where there's no embedding area,
629         or when it is too small (or core.img too large).
631 2009-05-13  Pavel Roskin  <proski@gnu.org>
633         * loader/i386/pc/multiboot2.c: Add necessary includes for
634         grub_multiboot2_real_boot().
636         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
637         PX record is always little-endian.  We only need the lower 2
638         bytes of the mode.
640         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
641         facilitate code reuse.
642         (grub_cpio_mount): Use "struct head", not a char buffer.  This
643         fixes a warning reported by gcc 4.4.
645         * kernel/disk.c (grub_disk_read): Use void pointer for the
646         buffer.
647         (grub_disk_write): Use const void pointer for the buffer.
648         Adjust all callers.  Remove unnecessary casts.
650 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
652         * util/i386/pc/grub-install.in: Update copyright year.
654 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
656         gptsync
658         * commands/gptsync.c: new file
659         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
660         (gptsync_mod_SOURCES): new variable
661         (gptsync_mod_CFLAGS): likewise
662         (gptsync_mod_LDFLAGS): likewise
663         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
664         new definition
665         (GRUB_PC_PARTITION_TYPE_HFS): likewise
666         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
667         * conf/i386-ieee1275.rmk: likewise
668         * conf/i386-pc.rmk: likewise
669         * conf/powerpc-ieee1275.rmk: likewise
671 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
673         Fixed grub-emu
675         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
676         (grub_dl_ref): likewise
678 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
680         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
681         split in two functions (one for msdos and one for gpt).
683 2009-05-08  Pavel Roskin  <proski@gnu.org>
685         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
686         not modified.
688         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
689         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
690         Initialize them with -1.  Add sanity check for bad1.  Eliminate
691         nerr variable.
693 2009-05-08  David S. Miller  <davem@davemloft.net>
695         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
697 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
699         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
700         existance.
702 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
704         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
705         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
707 2009-05-05  David S. Miller  <davem@davemloft.net>
709         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
711 2009-05-05  Pavel Roskin  <proski@gnu.org>
713         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
714         of grub_dl_ref() and grub_dl_unref().
715         * commands/parttool.c: Remove preprocessor conditionals around
716         grub_dl_ref() and grub_dl_unref().
717         * fs/affs.c: Likewise.
718         * fs/afs.c: Likewise.
719         * fs/cpio.c: Likewise.
720         * fs/ext2.c: Likewise.
721         * fs/fat.c: Likewise.
722         * fs/hfs.c: Likewise.
723         * fs/hfsplus.c: Likewise.
724         * fs/iso9660.c: Likewise.
725         * fs/jfs.c: Likewise.
726         * fs/minix.c: Likewise.
727         * fs/ntfs.c: Likewise.
728         * fs/reiserfs.c: Likewise.
729         * fs/sfs.c: Likewise.
730         * fs/udf.c: Likewise.
731         * fs/ufs.c: Likewise.
732         * fs/xfs.c: Likewise.
733         * include/grub/dl.h: Likewise.
734         * loader/xnu.c: Likewise.
736 2009-05-04  Pavel Roskin  <proski@gnu.org>
738         * commands/acpi.c: Remove unused variable my_mod.
739         * partmap/amiga.c: Likewise.
740         * partmap/apple.c: Likewise.
741         * partmap/gpt.c: Likewise.
742         * partmap/pc.c: Likewise.
743         * partmap/sun.c: Likewise.
744         * term/gfxterm.c: Likewise.
745         * term/i386/pc/vesafb.c: Likewise.
746         * term/i386/pc/vga.c: Likewise.
748 2009-05-04  David S. Miller  <davem@davemloft.net>
750         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
751         pointer args to grub_ieee1275_get_property().
753         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
755         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
756         devices, and do not traverse down under controller nodes.
758         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
759         (grub_ofdisk_open): Use it to un-escape "," characters.
760         * kern/disk.c (find_part_sep): New.
761         (grub_disk_open): Use it to find the first non-escaped ','
762         character in the disk name.
763         * util/ieee1275/devicemap.c (escape_of_path): New.
764         (grub_util_emit_devicemap_entry): Use it.
765         * util/sparc64/ieee1275/grub-install.in: Update script to
766         strip partition specifiers properly by not triggering on
767         '\' escaped ',' characters.
769 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
771         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
772         to 0x300.
773         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
774         resolutions.
775         (linux_vesafb_modes): Add a lot of additional modes to the list (based
776         on documentation from Wikipedia).
778 2009-05-04  Pavel Roskin  <proski@gnu.org>
780         * disk/ata.c: Spelling fixes.
781         * disk/raid.c: Likewise.
782         * disk/usbms.c: Likewise.
783         * disk/dmraid_nvidia.c: Likewise.
784         * kern/ieee1275/openfw.c: Likewise.
785         * kern/ieee1275/init.c: Likewise.
786         * kern/ieee1275/cmain.c: Likewise.
787         * boot/i386/pc/cdboot.S: Likewise.
788         * video/readers/png.c: Likewise.
789         * video/i386/pc/vbe.c: Likewise.
790         * fs/udf.c: Likewise.
791         * fs/hfs.c: Likewise.
792         * fs/reiserfs.c: Likewise.
793         * efiemu/runtime/efiemu.c: Likewise.
794         * efiemu/main.c: Likewise.
795         * efiemu/mm.c: Likewise.
796         * include/grub/elf.h: Likewise.
797         * include/grub/xnu.h: Likewise.
798         * include/grub/usbdesc.h: Likewise.
799         * include/grub/usb.h: Likewise.
800         * include/grub/script_sh.h: Likewise.
801         * include/grub/lib/LzmaEnc.h: Likewise.
802         * include/grub/efiemu/efiemu.h: Likewise.
803         * include/grub/command.h: Likewise.
804         * normal/menu.c: Likewise.
805         * normal/main.c: Likewise.
806         * normal/datetime.c: Likewise.
807         * bus/usb/uhci.c: Likewise.
808         * mmap/i386/uppermem.c: Likewise.
809         * mmap/mmap.c: Likewise.
810         * commands/acpi.c: Likewise.
811         * commands/test.c: Likewise.
812         * partmap/apple.c: Likewise.
813         * font/font.c: Likewise.
814         * loader/sparc64/ieee1275/linux.c: Likewise.
815         * loader/macho.c: Likewise.
816         * loader/i386/bsd_trampoline.S: Likewise.
817         * loader/i386/bsd.c: Likewise.
818         * loader/xnu.c: Likewise.
819         * term/i386/pc/vesafb.c: Likewise.
820         * term/usb_keyboard.c: Likewise.
821         * util/resolve.c: Likewise.
822         * util/getroot.c: Likewise.
824 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
826         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
828 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
830         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
831         build error.
833 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
835         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
836         parameter only available on BIOS.
838 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
840         Removed wrong semicolon in declaration
842         * grub/misc.h (grub_dprintf): remove semicolon
844 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
846         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
847         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
848         is done by grub_cmd_linux() now).
849         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
850         restore video to text mode.
851         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
852         indicates lack of "vga=" parameter.  "vga=0" is mapped to
853         `GRUB_LINUX_VID_MODE_NORMAL'.
855 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
857         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
858         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
859         and `normal/script.c'.  Add `kern/rescue_reader.c',
860         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
861         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
862         `grub_script.tab.c'.
864         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
865         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
866         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
867         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
868         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
870         * Makefile.in: Remove duplicated 2008 in Copyright line.
872 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
874         * util/misc.c (grub_util_warn): New function.  Emmits a warning
875         unconditionally.
876         * include/grub/util/misc.h (grub_util_warn): New declaration.
878         * util/i386/pc/grub-install.in: Understand --force and pass it down
879         to grub-setup.
881         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
882         down to setup().
883         (setup): Improve error messages and add warnings when requested to
884         install in odd layouts.  Refuse to install using blocklists unless
885         --force was set.
887 2009-05-04  martin f. krafft  <madduck@madduck.net>
889         * disk/raid.c (grub_raid_scan_device): Improve debug message.
891 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
893         Updated copyright year
895         * fs/hfsplus.c: updated copyright year
897 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
899         HFS+ UUID
901         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
902         in the space previously used by unused3
903         (grub_hfsplus_uuid): new function
904         (grub_hfsplus_fs): added uuid field
906 2009-05-03  Pavel Roskin  <proski@gnu.org>
908         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
909         suppress warnings.  It's no longer needed.
910         * disk/host.c: Likewise.
911         * disk/ata_pthru.c: Likewise.
912         * disk/loopback.c: Likewise.
913         * hook/datehook.c: Likewise.
914         * parttool/pcpart.c: Likewise.
915         * fs/i386/pc/pxe.c: Likewise.
916         * fs/ntfscomp.c: Likewise.
917         * efiemu/main.c: Likewise.
918         * mmap/mmap.c: Likewise.
919         * commands/crc.c: Likewise.
920         * commands/hexdump.c: Likewise.
921         * commands/hdparm.c: Likewise.
922         * commands/acpi.c: Likewise.
923         * commands/echo.c: Likewise.
924         * commands/minicmd.c: Likewise.
925         * commands/blocklist.c: Likewise.
926         * commands/memrw.c: Likewise.
927         * commands/loadenv.c: Likewise.
928         * commands/usbtest.c: Likewise.
929         * commands/lsmmap.c: Likewise.
930         * commands/boot.c: Likewise.
931         * commands/parttool.c: Likewise.
932         * commands/configfile.c: Likewise.
933         * commands/search.c: Likewise.
934         * commands/ieee1275/suspend.c: Likewise.
935         * commands/cat.c: Likewise.
936         * commands/i386/pc/pxecmd.c: Likewise.
937         * commands/i386/pc/play.c: Likewise.
938         * commands/i386/pc/halt.c: Likewise.
939         * commands/i386/pc/vbeinfo.c: Likewise.
940         * commands/i386/pc/vbetest.c: Likewise.
941         * commands/lspci.c: Likewise.
942         * commands/date.c: Likewise.
943         * commands/handler.c: Likewise.
944         * commands/ls.c: Likewise.
945         * commands/test.c: Likewise.
946         * commands/cmp.c: Likewise.
947         * commands/efi/loadbios.c: Likewise.
948         * commands/efi/fixvideo.c: Likewise.
949         * commands/halt.c: Likewise.
950         * commands/help.c: Likewise.
951         * commands/reboot.c: Likewise.
952         * hello/hello.c: Likewise.
953         * script/sh/main.c: Likewise.
954         * loader/xnu.c: Likewise.
955         * term/terminfo.c: Likewise.
956         * term/i386/pc/serial.c: Likewise.
957         * term/usb_keyboard.c: Likewise.
959 2009-05-03  David S. Miller  <davem@davemloft.net>
961         * normal/menu.c: Include grub/parser.h
963 2009-05-03  Pavel Roskin  <proski@gnu.org>
965         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
966         not char*.
967         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
968         Suggested by Javier Martín <lordhabbit@gmail.com>
970         * util/i386/pc/grub-mkrescue.in: Allow for the case when
971         efiemu??.o doesn't exist.
972         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
973         copying.
975 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
977         FreeBSD 64-bit support
979         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
980         and loader/i386/bsd_trampoline.S
981         (bsd_mod_ASFLAGS): new variable
982         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
983         (FREEBSD_MODTYPE_KERNEL64): likewise
984         (grub_bsd64_trampoline_start): likewise
985         (grub_bsd64_trampoline_end): likewise
986         (grub_bsd64_trampoline_selfjump): likewise
987         (grub_bsd64_trampoline_gdt): likewise
988         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
989         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
990         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
991         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
992         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
993         of "attrib" member
994         * loader/i386/bsd_pagetable.c: new file
995         * loader/i386/bsd_trampoline.S: likewise
996         * loader/i386/bsd.c (ALIGN_QWORD): new macro
997         (ALIGN_VAR): likewise
998         (entry_hi): new variable
999         (kern_end_mdofs): likewise
1000         (is_64bit): likewise
1001         (grub_freebsd_add_meta): use ALIGN_VAR
1002         (grub_e820_mmap): new declaration
1003         (grub_freebsd_add_mmap): new function
1004         (grub_freebsd_add_meta_module): support 64 bit kernels
1005         (grub_freebsd_list_modules): use ALIGN_VAR
1006         (gdt_descriptor): new declaration
1007         (grub_freebsd_boot): support 64 bit kernels
1008         (grub_bsd_elf64_hook): new function
1009         (grub_bsd_load_elf): support elf64
1011 2009-05-03  Bean  <bean123ch@gmail.com>
1013         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1014         after we get the result of if statement.
1016 2009-05-03  Bean  <bean123ch@gmail.com>
1018         * Makefile.in (enable_efiemu): New variable.
1020         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1021         set.
1022         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1023         path.
1024         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1025         path, add -mno-red-zone option.
1026         (efiemu64_s.o): Likewise.
1027         (efiemu64.o): Use macro $^ for source file.
1029         * configure.ac (--enable-efiemu): New option.
1031 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1033         xnu support
1035         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1036         (pkglib_MODULES): add xnu.mod
1037         (xnu_mod_SOURCES): new variable
1038         (xnu_mod_CFLAGS): likewise
1039         (xnu_mod_LDFLAGS): likewise
1040         (xnu_mod_ASFLAGS): likewise
1041         * conf/i386-pc.rmk: likewise
1042         * conf/x86_64-efi.rmk: likewise
1043         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1044         new declaration
1045         * include/grub/i386/macho.h: new file
1046         * include/grub/i386/xnu.h: likewise
1047         * include/grub/macho.h: likewise
1048         * include/grub/machoload.h: likewise
1049         * include/grub/x86_64/macho.h: likewise
1050         * include/grub/x86_64/xnu.h: likewise
1051         * include/grub/xnu.h: likewise
1052         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1053         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1054         * loader/i386/efi/xnu.c: new file
1055         * loader/i386/pc/xnu.c: likewise
1056         * loader/i386/xnu.c: likewise
1057         * loader/i386/xnu_helper.S: likewise
1058         * loader/macho.c: likewise
1059         * loader/xnu.c: likewise
1060         * loader/xnu_resume.c: likewise
1061         * util/grub-dumpdevtree: likewise
1062         * include/grub/i386/pit.h: include grub/err.h
1063         (grub_pit_wait): export
1064         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1066 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1068         Efiemu
1070         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1071         _linux_efi, linux_efi.
1072         new files in grub-emu
1073         new targets efiemu32.o and efiemu64.o
1074         * loader/linux_normal_efiemu.c: likewise
1075         * loader/i386/efi/linux.c: added preliminary efiemu support
1076         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1077         files to copy
1078         * include/grub/autoefi.h: new file
1079         * include/grub/i386/efiemu.h: likewise
1080         * include/grub/i386/pc/efiemu.h: likewise
1081         * include/grub/efi/api.h: add LL suffix when necessary
1082         new definitions relating to tables
1083         * include/grub/efiemu/efiemu.h: new file
1084         * include/grub/efiemu/runtime.h: likewise
1085         * efiemu/prepare.c: likewise
1086         * efiemu/loadcore_common.c: likewise
1087         * efiemu/loadcore64.c: likewise
1088         * efiemu/runtime/efiemu.sh: likewise
1089         * efiemu/runtime/efiemu.S: likewise
1090         * efiemu/runtime/efiemu.c: likewise
1091         * efiemu/runtime/config.h: likewise
1092         * efiemu/prepare32.c: likewise
1093         * efiemu/main.c: likewise
1094         * efiemu/modules/pnvram.c: likewise
1095         * efiemu/modules/i386: likewise
1096         * efiemu/modules/i386/pc: likewise
1097         * efiemu/modules/acpi.c: likewise
1098         * efiemu/i386/pc/cfgtables.c: likewise
1099         * efiemu/i386/loadcore64.c: likewise
1100         * efiemu/i386/loadcore32.c: likewise
1101         * efiemu/prepare64.c: likewise
1102         * efiemu/loadcore.c: likewise
1103         * efiemu/symbols.c: likewise
1104         * efiemu/mm.c: likewise
1105         * efiemu/loadcore32.c: likewise
1107 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1109         ACPI spoofing
1111         * commands/acpi.c: new file
1112         * commands/i386/pc/acpi.c: likewise
1113         * commands/efi/acpi.c: likewise
1114         * include/grub/acpi.h: likewise
1115         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1116         (acpi_mod_SOURCES): new variable
1117         (acpi_mod_CFLAGS): likewise
1118         (acpi_mod_LDFLAGS): likewise
1119         * conf/i386-efi.rmk: likewise
1120         * conf/x86_64-efi.rmk: likewise
1122 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1124         Missing part from mmap patch
1126         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1127         (grub_mmap_unregister)
1128         (grub_mmap_free_and_unregister): use grub_mmap_register
1130 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1132         Mmap services
1134         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1135         * loader/i386/linux.c (find_mmap_size): likewise
1136         (allocate_pages): likewise
1137         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1138         (grub_fill_multiboot_mmap): likewise
1139         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1140         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1141         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1142         (OPENBSD_MMAP_RESERVED): likewise
1143         * include/grub/i386/pc/memory.h: include grub/memory.h
1144         (grub_lower_mem): removed
1145         (grub_upper_mem): likewise
1146         (GRUB_MACHINE_MEMORY_ACPI): new definition
1147         (GRUB_MACHINE_MEMORY_NVS): likewise
1148         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1149         (GRUB_MACHINE_MEMORY_HOLE): likewise
1150         (grub_machine_mmap_register): likewise
1151         (grub_machine_mmap_unregister): likewise
1152         (grub_machine_get_upper): likewise
1153         (grub_machine_get_lower): likewise
1154         (grub_machine_get_post64): likewise
1155         * include/grub/i386/efi/memory.h: new file
1156         * include/grub/x86_64/efi/memory.h: likewise
1157         * include/grub/efi/memory.h: likewise
1158         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1159         (mmap_mod_SOURCES): new variable
1160         (mmap_mod_LDFLAGS): likewise
1161         (mmap_mod_ASFLAGS): likewise
1162         * conf/i386-coreboot.rmk: likewise
1163         * conf/i386-ieee1275.rmk: likewise
1164         * conf/i386-efi.rmk: likewise
1165         * conf/x86_64-efi.rmk: likewise
1166         * include/grub/types.h (UINT_TO_PTR): new macro
1167         (PTR_TO_UINT32): likewise
1168         (PTR_TO_UINT64): likewise
1169         * include/grub/memory.h: new file
1170         * mmap/i386/pc/mmap.c: likewise
1171         * mmap/i386/pc/mmap_helper.S: likewise
1172         * mmap/i386/uppermem.c: likewise
1173         * mmap/mmap.c: likewise
1174         * mmap/efi/mmap.c: likewise
1175         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1176         grub_upper_mem
1177         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1178         (grub_upper_mem): likewise
1179         (grub_machine_init): don't use grub_upper_mem,
1180         make grub_lower_mem local
1181         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1182         grub_mmap_iterate and grub_mmap_get_upper
1183         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1185 2009-05-02  Bean  <bean123ch@gmail.com>
1187         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1188         script/sh/parser.y.
1189         (pkglib_MODULES): Add normal.mod and sh.mod.
1190         (normal_SOURCES): New variable.
1191         (normal_mod_CFLAGS): Likewise.
1192         (normal_mod_LDFLAGS): Likewise.
1193         (sh_mod_SOURCES): Likewise.
1194         (sh_mod_CFLAGS): Likewise.
1195         (sh_mod_LDFLAGS): Likewise.
1197         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1198         script/sh/lexer.c_DEPENDENCIES.
1199         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1200         kern/rescue_reader.c and kern/rescue_parser.c.
1201         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1202         (grub_emu_SOURCES): Change source files.
1203         (pkglib_MODULES): Remove normal.mod.
1204         (normal_SOURCES): Removed.
1205         (normal_mod_CFLAGS): Likewise.
1206         (normal_mod_LDFLAGS): Likewise.
1207         * conf/i386-coreboot.rmk: Likewise.
1208         * conf/i386-efi.rmk: Likewise.
1209         * conf/i386-ieee1276.rmk: Likewise.
1210         * conf/powerpc-ieee1275.rmk: Likewise.
1211         * conf/sparc64-ieee1275.rmk: Likewise.
1212         * conf/x86_64-efi.rmk: Likewise.
1214         * include/grub/command.h (grub_command_execute): New inline function.
1216         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1218         * include/grub/normal.h: Remove <grub/setjmp.h>.
1219         (grub_fs_module_list): Moved to normal/autofs.c.
1220         (grub_exit_env): Removed.
1221         (grub_command_execute): Likewise.
1222         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1223         parameter script.
1224         (read_command_list): New function declaration.
1225         (read_fs_list): Likewise.
1227         * include/parser.h: Include <grub/reader.h>.
1228         (grub_parser_split_cmdline): Change type of getline parameter.
1229         (grub_parser): New structure.
1230         (grub_parser_class): New variable.
1231         (grub_parser_execute): New function declaration.
1232         (grub_register_rescue_parser): Likewise.
1233         (grub_parser_register): New inline function.
1234         (grub_parser_unregister): Likewise.
1235         (grub_parser_get_current): Likewise.
1236         (grub_parser_set_current): Likewise.
1238         * include/grub/reader.h: New file.
1239         * kern/reader.c: Likewise.
1240         * kern/rescue_parser.c: Likewise.
1241         * kern/rescue_reader.c: Likewise.
1242         * normal/autofs.c: Likewise.
1243         * normal/dyncmd.c: Likewise.
1245         * include/grub/rescue.h: Removed.
1246         * normal/command.h: Likewise.
1248         * include/grub/script.h: Moved to ...
1249         * include/grub/script_sh.h: ... Moved here.
1250         * normal/execute.c: Moved to ...
1251         * script/sh/execute.c: ... Moved here.
1252         * normal/function.c: Moved to ...
1253         * script/sh/function.c: ... Moved here.
1254         * normal/lexer.c: Moved to ...
1255         * script/sh/lexer.c: ... Moved here.
1256         * normal/parser.y: Moved to ...
1257         * script/sh/parser.y: ... Moved here.
1258         * normal/script.c: Moved to ...
1259         * script/sh/script.c: ... Moved here.
1261         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1262         <grub/reader.h>.
1263         (grub_exit_env): Removed.
1264         (fs_module_list): Moved to normal/autofs.c.
1265         (grub_file_getline): Don't handle comment here.
1266         (free_menu): Skip removed field entry->commands.
1267         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1268         script parameter.
1269         (read_config_file): Removed nested parameter, change getline function.
1270         (grub_enter_normal_mode): Removed.
1271         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1272         (read_command_list): Likewise.
1273         (autoload_fs_module): Moved to normal/autofs.c.
1274         (read_fs_list): Likewise.
1275         (reader_nested): New variable.
1276         (grub_normal_execute): Run parser.sh to switch to sh parser.
1277         (grub_cmd_rescue): Removed.
1278         (cmd_normal): Removed.
1279         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1280         rescue command.
1281         (grub_cmdline_run): New function.
1282         (grub_normal_reader_init): Likewise.
1283         (grub_normal_read_line): Likewise.
1284         (grub_env_write_pager): Likewise.
1285         (cmdline): New variable.
1286         (grub_normal_reader): Likewise.
1287         (GRUB_MOD_INIT): Register normal reader and set as current, register
1288         pager hook, register normal command with grub_register_command_prio,
1289         so that it won't show up in command.lst.
1290         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1291         grub_fs_autoload_hook.
1293         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1294         (grub_menu_execute_entry): Replace grub_script_execute with
1295         grub_parser_execute, change parameter to grub_command_execute.
1297         * normal/menu_text.c: Remove <grub/script.h>.
1299         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1300         and <grub/parser.h>.
1301         (run): Change editor_getline to use new parser interface. Change
1302         parameter to grub_command_execute.
1304         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1305         <grub/reader.h> and <grub/parser.h>.
1306         (grub_load_normal_mode): Execute normal command.
1307         (grub_main): Call grub_register_core_commands,
1308         grub_register_rescue_parser and grub_register_rescue_reader, use
1309         grub_reader_loop to enter input loop.
1311         * kern/parser.c (grub_parser_split_cmdline): Change type of
1312         getline parameter.
1313         (grub_parser_class): New variable.
1314         (grub_parser_execute): New function.
1316         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1317         * loader/multiboot2.c: Likewise.
1318         * loader/sparc64/ieee1275/linux.c: Likewise.
1320         * util/grub-emu.c (read_command_list): New dummy function.
1322 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1324         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1325         count to 16 for CCISS and IDA.
1327 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1329         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1330         after waiting for user input.
1332         * loader/i386/linux.c: Include `<grub/normal.h>'.
1333         (grub_cmd_linux): Improve the error message about `ask' mode, by
1334         waiting for user input so it's not missed (we can do this, since
1335         user requested interaction).
1337 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1339         Added missing lst to grub-mkrescue
1341         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1342         and ${input_dir}/parttool.lst
1344 2009-04-30  David S. Miller  <davem@davemloft.net>
1346         * util/hostdisk.c (device_is_wholedisk): New function.
1347         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1348         zero only if device_is_wholedisk() returns true.
1350         * util/hostdisk.c (convert_system_partition_to_system_disk):
1351         Handle virtual disk devices named /dev/vdiskX as found on sparc
1352         and powerpc.
1354         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1355         lettered partition specifier is found, convert to numbered.
1357 2009-04-29  David S. Miller  <davem@davemloft.net>
1359         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1360         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1362         * normal/command.c: Add missing newline at end of file.
1364         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1365         warnings.
1366         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1367         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1368         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1369         ihandles have a 32-bit type but need to be stored in a "void *".
1371 2009-04-28  Pavel Roskin  <proski@gnu.org>
1373         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1374         not disk.  Adjust all dependencies.
1375         (grub_fs_uuid_close): Use grub_device_close(), not
1376         grub_disk_close().
1378         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1379         parent's partition, don't copy it by reference, as it gets freed
1380         on close.
1382 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1384         Preboot hooks support
1386         * commands/boot.c (struct grub_preboot_t): new declaration
1387         (preboots_head): new variable
1388         (preboots_tail): likewise
1389         (grub_loader_register_preboot_hook): new function
1390         (grub_loader_unregister_preboot_hook): likewise
1391         (grub_loader_set): launch preboot hooks
1392         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1393         (grub_loader_register_preboot_hook): new declaration
1394         (grub_loader_unregister_preboot_hook): likewise
1396 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1398         Warning fix
1400         * disk/scsi.c (grub_scsi_open): added missing cast when
1401         calling grub_dprintf
1403 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1405         Bug and warning fixes
1407         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1408         declaration
1409         * commands/test.c (test_parse): fixed bug with file tests and corrected
1410         declaration of find_file
1412 2009-04-26  Pavel Roskin  <proski@gnu.org>
1414         * Makefile.in: Don't install empty manual pages if help2man is
1415         missing.  Use help2man option for output, not shell redirection.
1417 2009-04-26  David S. Miller  <davem@davemloft.net>
1419         * util/grub-mkdevicemap.c (make_device_map): Add missing
1420         NESTED_FUNC_ATTR to process_device().
1422 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1424         Test command
1426         * commands/test.c: rewritten to use bash-like test
1428 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1430         Parttool autoloading and improvements
1432         * Makefile.in (pkglib_DATA): add parttool.lst
1433         (parttool.lst): new target
1434         * genmk.rb: generate parttool-*
1435         (CLEANFILES): add #{parttool}
1436         (PARTTOOLFILES): new variable
1437         * genparttoollist.sh: new file
1438         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1439         (grub_pcpart_type): likewise
1440         * commands/parttool.c (helpmsg): new variable
1441         (grub_cmd_parttool): output help if not enough arguments are supplied
1442         autoload modules
1443         (GRUB_MOD_INIT(parttool)): use helpmsg
1445 2009-04-24  David S. Miller  <davem@davemloft.net>
1447         Avoiding opening same device multiple times in device iterator.
1449         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1450         and use it to build a list of partitions in iterate_disk() and
1451         iterate_partition().
1453         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1454         on disk->data.
1456         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1457         grub_devalias_iterate() result instead of unconditional 0.
1458         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1459         Also, capture hook return value, either directly or via
1460         grub_children_iterate(), and propagate to caller.
1461         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1462         grub_children_iterate): Return value is now 'int' instead of
1463         'grub_err_t'.
1464         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1465         like a proper iterator, stopping when hooks return non-zero.
1466         (grub_devalias_iterate): Likewise.
1468 2009-04-23  David S. Miller  <davem@davemloft.net>
1470         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1472 2009-04-22  David S. Miller  <davem@davemloft.net>
1474         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1475         is larger than address_cells, use that value for address_cells too.
1477         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1478         IEEE1275_MAX_PATH_LEN): Define.
1479         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1480         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1481         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1482         'devtype'.  Explicitly NULL terminate devalias expansion.
1484         * util/sparc64/ieee1275/misc.c: New file.
1485         * util/sparc64/ieee1275/grub-setup.c: New file.
1486         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1487         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1488         * util/sparc64/ieee1275/grub-install.in: New file.
1489         * util/ieee1275/ofpath.c: New file.
1490         * util/ieee1275/devicemap.c: New file.
1491         * util/devicemap.c: New file.
1492         * util/deviceiter.c: New file.
1493         * kern/sparc64/ieee1275/init.c: New file.
1494         * include/grub/util/ofpath.h: New file.
1495         * include/grub/util/deviceiter.h: New file.
1496         * util/grub-mkdevicemap.c: Include deviceiter.h.
1497         Implement using grub_util_emit_devicemap_entry and
1498         grub_util_iterate_devices.
1499         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1500         util/devicemap.c into grub-mkdevicemap
1501         * conf/i386-efi.rmk: Likewise.
1502         * conf/i386-ieee1275.rmk: Likewise.
1503         * conf/i386-pc.rmk: Likewise.
1504         * conf/powerpc-ieee1275.rmk: Likewise.
1505         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1506         images and installation utilities.  Build kernel as image
1507         instead of as elf binary.  Use common rules as much as possible.
1509 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1511         Correct GPT definition
1513         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1514         of "attrib" member
1516 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1518         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1520 2009-04-19  David S. Miller  <davem@davemloft.net>
1522         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1523         (grub_rescue_cmd_linux): Rename to...
1524         (grub_cmd_linux): and fix prototype.
1525         (grub_rescue_cmd_initrd): Rename to...
1526         (grub_cmd_initrd): and fix prototype.
1527         (cmd_linux, cmd_initrd): New.
1528         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1529         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1531 2009-04-17  Pavel Roskin  <proski@gnu.org>
1533         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1534         format.
1535         (grub_ohci_transfer): Likewise.
1537         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1539         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1540         return without a value.  Fix inconsistent indentation.
1542         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1543         match struct grub_fs.
1545         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1546         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1547         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1548         * commands/lspci.c (grub_lspci_iter): Likewise.
1550 2009-04-16  Bean  <bean123ch@gmail.com>
1552         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1553         value.
1555 2009-04-15  Pavel Roskin  <proski@gnu.org>
1557         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1558         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1559         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1560         definitions.
1562 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1564         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1565         that no multiple data or metadata areas are supported and `Unknown
1566         metadata header'.
1568 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1570         Move loader out of the kernel
1572         * kern/loader.c: moved to ...
1573         * commands/boot.c: ... moved here
1574         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1575         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1576         * include/grub/kernel.h (grub_machine_fini): export
1577         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1578         (grub_loader_set): likewise
1579         (grub_loader_unset): likewise
1580         (grub_loader_boot): likewise
1581         * conf/common.rmk: new module boot.mod
1582         (pkglib_MODULES): add boot.mod
1583         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1584         (grub_emu_SOURCES): likewise
1585         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1586         (grub_emu_SOURCES): likewise
1587         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1588         (grub_emu_SOURCES): likewise
1589         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1590         (grub_emu_SOURCES): likewise
1591         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1592         (grub_emu_SOURCES): likewise
1593         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1594         (grub_emu_SOURCES): likewise
1595         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1596         (grub_emu_SOURCES): likewise
1598 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1600         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1602         * kern/misc.c (grub_itoa): Removed function
1603         (grub_ltoa): likewise
1604         (grub_vsprintf): use grub_lltoa
1606 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1608         Restore grub-emu
1610         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1611         * conf/i386-coreboot.rmk: likewise
1612         * conf/i386-ieee1275.rmk: likewise
1613         * conf/powerpc-ieee1275.rmk: likewise
1615 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1617         * INSTALL: Add that `./autogen.sh' needs to be run before
1618         `./configure.'.
1620 2009-04-14  Bean  <bean123ch@gmail.com>
1622         * Makefile.in (pkglib_DATA): Add handler.lst.
1623         (handler.lst): New rule.
1625         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1626         * conf/i386-coreboot.rmk: Likewise.
1627         * conf/i386-ieee1275.rmk: Likewise.
1628         * conf/i386-efi.rmk: Likewise.
1629         * conf/x86_64-efi.rmk: Likewise.
1630         * conf/powerpc-ieee1275.rmk: Likewise.
1631         * conf/sparc64-ieee1275.rmk: Likewise.
1633         * genhandlerlist.sh: New file.
1635         * genmk.rb: Add rules to generate handler.lst.
1637         * include/grub/normal.h (grub_file_getline): New function definition.
1638         (read_handler_list): Likewise.
1639         (free_handler_list): Likewise.
1641         * include/grub/term.h (grub_term_register_input): Add name parameter
1642         for auto generation of handler.lst.
1643         (grub_term_register_output): Likewise.
1645         * normal/handler.c: New file.
1647         * normal/main.c (get_line): Renamed to grub_file_getline.
1648         (read_config_file): Use the newly renamed grub_file_getline.
1649         (read_command_list): Likewise.
1650         (read_fs_list): Likewise.
1651         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1652         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1654         * term/efi/console.c (grub_console_init): Add name parameter for auto
1655         generation of handler.lst.
1656         * term/gfxterm.c: Likewise.
1657         * term/i386/pc/at_keyboard.c: Likewise.
1658         * term/i386/pc/console.c: Likewise.
1659         * term/i386/pc/serial.c: Likewise.
1660         * term/i386/pc/vesafb.c: Likewise.
1661         * term/i386/pc/vga.c: Likewise.
1662         * term/i386/pc/vga_text.c: Likewise.
1663         * term/ieee1275/ofconsole.c: Likewise.
1664         * term/usb_keyboard.c: Likewise.
1666 2009-04-14  Bean  <bean123ch@gmail.com>
1668         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1669         properly with null character.
1671 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1673         * configure: Remove.
1674         * config.h.in: Likewise.
1675         * stamp-h.in: Likewise.
1676         * DISTLIST: Likewise.
1677         * conf/common.mk: Likewise.
1678         * conf/i386-coreboot.mk: Likewise.
1679         * conf/i386-efi.mk: Likewise.
1680         * conf/i386-ieee1275.mk: Likewise.
1681         * conf/i386.mk: Likewise.
1682         * conf/i386-pc.mk: Likewise.
1683         * conf/powerpc-ieee1275.mk: Likewise.
1684         * conf/sparc64-ieee1275.mk: Likewise.
1685         * conf/x86_64-efi.mk: Likewise.
1687         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1688         develop on GRUB.
1690 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1691             David S. Miller  <davem@davemloft.net>
1693         * util/hostdisk.c (make_device_name): Fix buffer length
1694         calculations.
1696 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1698         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1699         <sys/param.h> and <sys/sysctl.h>.
1700         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1701         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1702         opening the device and reset them afterwards.
1704 2009-04-13  Pavel Roskin  <proski@gnu.org>
1706         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1707         Reported by John Stanley <jpsinthemix@verizon.net>
1709 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1711         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1712         that name for menuentries when appropriate.
1714 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1716         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1718 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1720         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1721         to Linux, simply abort telling the user it's no longer supported.
1723 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1725         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1726         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1727         `freebsd_loadenv' only when devices.hints exist.
1729 2009-04-13  Pavel Roskin  <proski@gnu.org>
1731         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1733 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1735         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1736         partition number.
1737         (grub_drive): Likewise.
1739 2009-04-13  David S. Miller  <davem@davemloft.net>
1741         * kern/sparc64/ieee1275/ieee1275.c: New file.
1742         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1743         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1744         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1745         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1746         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1747         grub_ieee1275_alloc_physmem): Declare new exported functions.
1749         * include/grub/sparc64/ieee1275/loader.h: New file.
1750         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1751         * include/grub/sparc64/kernel.h: Likewise.
1752         * loader/sparc64/ieee1275/linux.c: Likewise.
1754         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1755         (grub_fstest_SOURCES): Likewise.
1757         * util/hostdisk.c (make_device_name): Do not make any assumptions
1758         about the length of drive names.
1760         * kern/dl.c (grub_dl_load_file): Close file immediately when
1761         we are done using it.
1763 2009-04-12  David S. Miller  <davem@davemloft.net>
1765         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1766         values.  Noticed by Pavel Roskin.
1768         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1769         target compiler.
1771         * genmk.rb: Add more flexible image type specification, also
1772         pass --strip-unneeded to objcopy.
1773         * conf/i386-pc.rmk: Use *_FORMAT.
1774         * conf/i386-pc.mk: Rebuilt.
1776         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1777         (OFDISK_HASH_SZ): Define.
1778         (ofdisk_hash): New hash table.
1779         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1780         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1781         instead of device phandle which is not unique.
1783         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1784         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1785         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1786         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1787         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1788         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1789         GRUB_KERNEL_MACHINE_DATA_END): Define.
1790         (grub_kernel_image_size, grub_total_module_size): Declare.
1792 2009-04-12  Pavel Roskin  <proski@gnu.org>
1794          * configure.ac: Change the logic when we check for target tools.
1795          Do it when the target is specified and it's different from the
1796          specified value of the host.
1798 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1800         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1801         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1802         GNU/kFreeBSD. Check if a device is a character device. Use
1803         DIOCGMEDIASIZE to get the size.
1804         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1805         support for GNU/kFreeBSD.
1806         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1807         is a character device instead of a block device. Add support for
1808         FreeBSD device names.
1810         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1811         is a character device instead of a block device.
1813         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1814         is a character device instead of a block device.
1816 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1818         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1819         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1820         FreeBSD. Check if a device is a character device. Use
1821         DIOCGMEDIASIZE to get the size.
1822         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1823         support for FreeBSD.
1824         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1825         is a character device instead of a block device. Add support for
1826         FreeBSD device names.
1828         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1829         a character device instead of a block device.
1830         (grub_util_check_char_device): New function.
1832         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1833         a character device instead of a block device.
1835         * include/grub/util/getroot.h (grub_util_check_char_device): New
1836         prototype.
1838 2009-04-11  David S. Miller  <davem@davemloft.net>
1840         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1841         static libgcc.
1842         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1843         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1844         function, if present.
1845         (__bswapdi2): Likewise.
1847         * include/grub/sparc64/ieee1275/boot.h: New file.
1848         * boot/sparc64/ieee1275/boot.S: Likewise.
1849         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1851         * kern/misc.c (grub_ltoa): New function.
1852         (grub_vsprintf): Use it to format 'long' integers.
1854 2009-04-10  David S. Miller  <davem@davemloft.net>
1856         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1857         slots are of type grub_ieee1275_cell_t.
1858         (grub_nand_read): Likewise.
1859         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1860         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1861         macros are used to compare values in arg/ret block of the call.
1862         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1863         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1864         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1865         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1866         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1867         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1868         grub_ieee1275_close, grub_ieee1275_set_property,
1869         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1870         grub_ieee1275_cell_t.
1871         * kern/ieee1275/openfw.c (grub_map): Likewise.
1872         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1873         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1875         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1876         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1877         (grub_devalias_iterate): Likewise.
1879 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1881         UFS improvements
1883         * fs/ufs.c (INODE_NBLOCKS): new definition
1884         (struct grub_ufs_dirent): added fields for non-BSD dirents
1885         (grub_ufs_get_file_block): fixed double indirect handling
1886         (grub_ufs_lookup_symlink): use more robust way to determine whether
1887         symlink is inline
1888         (grub_ufs_find_file): support for non-BSD dirents
1889         (grub_ufs_dir): support for non-BSD dirents
1891 2009-04-10  Bean  <bean123ch@gnail.com>
1893         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1894         attribute, otherwise the size would be wrong for i386 platform.
1896         * include/grub/pci.h (grub_pci_read_word): New inline function.
1897         (grub_pci_read_byte): Likewise.
1898         (grub_pci_write): Likewise.
1899         (grub_pci_write_word): Likewise.
1900         (grub_pci_write_byte): Likewise.
1902         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1904         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1905         (find_framebuf): Scan pci to locate the frame buffer address.
1907         * commands/efi/fixvideo.c: New file.
1909         * commands/efi/loadbios.c: Likewise.
1911         * commands/memrw.c: Likewise.
1913         * util/grub-dumpbios.in: Likewise.
1915         * conf/common.rmk (grub-dumpbios): New utility.
1916         (pkglib_MODULES): New module memrw.mod.
1917         (memrw_mod_SOURCE): New macro.
1918         (memrw_mod_CFLAGS): Likewise.
1919         (memrw_mod_LDFLAGS): Likewise.
1921         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1922         fixvideo.mod.
1923         (loadbios_mod_SOURCE): New macro.
1924         (loadbios_mod_CFLAGS): Likewise.
1925         (loadbios_mod_LDFLAGS): Likewise.
1926         (fixvideo_mod_SOURCE): Likewise.
1927         (fixvideo_mod_CFLAGS): Likewise.
1928         (fixvideo_mod_LDFLAGS): Likewise.
1930         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1931         fixvideo.mod.
1932         (loadbios_mod_SOURCE): New macro.
1933         (loadbios_mod_CFLAGS): Likewise.
1934         (loadbios_mod_LDFLAGS): Likewise.
1935         (fixvideo_mod_SOURCE): Likewise.
1936         (fixvideo_mod_CFLAGS): Likewise.
1937         (fixvideo_mod_LDFLAGS): Likewise.
1939 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1941         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1943 2009-04-07  David S. Miller  <davem@davemloft.net>
1945         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1946         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1947         R_SPARC_WDISP30 case.
1948         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1950 2009-04-06  Pavel Roskin  <proski@gnu.org>
1952         * include/grub/misc.h (ARRAY_SIZE): New macro.
1953         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1954         New macro.
1955         * loader/i386/linux.c (allocate_pages): Use free_pages().
1956         (grub_linux_unload): Don't use free_pages().
1957         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1958         wrong index.  Treat all other modes as text modes.
1959         (grub_cmd_linux): Initialize vid_mode unconditionally to
1960         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1962         * commands/help.c (print_command_help): Use cmd->prio, not
1963         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1965 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1967         Parttool
1969         * parttool/pcpart.c: new file
1970         * commands/parttool.c: likewise
1971         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1972         (parttool_mod_SOURCES): new variable
1973         (parttool_mod_CFLAGS): likewise
1974         (parttool_mod_LDFLAGS): likewise
1975         (pcpart_mod_SOURCES): likewise
1976         (pcpart_mod_CFLAGS): likewise
1977         (pcpart_mod_LDFLAGS): likewise
1978         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1979         and parttool/pcpart.c
1980         * conf/i386-efi.rmk: likewise
1981         * conf/i386-ieee1275.rmk: likewise
1982         * conf/i386-pc.rmk: likewise
1983         * conf/powerpc-ieee1275.rmk: likewise
1984         * conf/sparc64-ieee1275.rmk: likewise
1985         * conf/x86_64-ieee1275.rmk: likewise
1987 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1989         Support for mtime and further expandability of dir command
1991         * include/grub/lib/datetime.h: moved to ...
1992         * include/grub/datetime.h: ... moved here and added
1993         declaration of grub_unixtime2datetime. All users updated
1994         * include/grub/fs.h: new syntax for dir and mtime functions in
1995         struct grub_fs
1996         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1997         and GRUB_FSHELP_FLAGS_MASK
1998         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1999         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2000         (grub_ext2_mtime): new function
2001         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2002         (grub_hfsplus_mtime): new function
2003         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2004         (GRUB_UFS_ATTR_FILE): likewise
2005         (GRUB_UFS_ATTR_LNK): likewise
2006         (struct grub_ufs_sblock): new fields mtime
2007         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2008         all users updated
2009         (grub_ufs_dir): mtime support
2010         (grub_ufs_mtime): new function
2011         * fs/affs.c (grub_affs_dir): use new dir syntax
2012         * fs/afs.c (grub_afs_dir): likewise
2013         * fs/cpio.c (grub_cpio_dir): likewise
2014         * fs/fat.c (grub_fat_find_dir): likewise
2015         * fs/hfs.c (grub_hfs_dir): likewise
2016         * fs/iso9660.c (grub_iso9660_dir): likewise
2017         * fs/jfs.c (grub_jfs_dir): likewise
2018         * fs/minix.c (grub_minix_dir): likewise
2019         * fs/ntfs.c (grub_ntfs_dir): likewise
2020         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2021         * fs/sfs.c (grub_sfs_dir): likewise
2022         * fs/xfs.c (grub_xfs_dir): likewise
2023         * util/hostfs.c (grub_hostfs_dir): likewise
2024         * lib/datetime.c: moved to ...
2025         * normal/datetime.c: ... moved here
2026         (grub_unixtime2datetime): new function
2027         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2028         * normal/completion.c (iterate_dir): use new dir syntax
2029         * normal/misc.c (grub_normal_print_device_info): tell the
2030         last modification time of a volume
2031         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2032         * conf/common.rmk: added lib/datetime.c to ls.mod
2033         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2034         (normal_mod_SOURCES): likewise
2035         (datetime_mod_SOURCES): Removed lib/datetime.c
2036         * conf/i386-efi.rmk: likewise
2037         * conf/i386-ieee1275.rmk: likewise
2038         * conf/i386-pc.rmk: likewise
2039         * conf/powerpc-ieee1275.rmk: likewise
2040         * conf/sparc64-ieee1275.rmk: likewise
2041         * conf/x86_64-efi.rmk: likewise
2043 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2045         Trim trailing spaces in FAT label and support mtools-like labels
2047         * fs/fat.c (grub_fat_iterate_dir): New function based
2048         on grub_fat_find_dir
2049         (grub_fat_find_dir): use grub_fat_iterate_dir
2050         (grub_fat_label): likewise
2052 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2054         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2055         and command.h
2056         remove extraneous kernel_elf_HEADERS
2058 2009-04-04  Bean  <bean123ch@gnail.com>
2060         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2062         * util/misc.c: Likewise.
2064 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2066         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2067         instead of grub_printf.
2069 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2071         * loader/i386/linux.c (grub_linux_setup_video): Fill
2072         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2073         values from `mode info' structure instead of hardcoded
2074         values.
2076 2009-04-01  Pavel Roskin  <proski@gnu.org>
2078         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2079         unused now.
2080         * genmk.rb: Likewise.
2081         * configure.ac: Likewise.
2083 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2085         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2086         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2088 2009-04-01  David S. Miller  <davem@davemloft.net>
2090         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2091         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2092         (grub_setjmp): Mark with 'returns_twice' attribute.
2093         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2094         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2095         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2097 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2099         Reapply fix from 2008-07-28 which was accidentally reverted; also
2100         perform the same fix to a similar check in same function.
2102         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2103         with the same number are found, just use issue a warning with
2104         grub_dprintf(), as this error has been reported to be non-fatal.
2106 2009-03-31  Pavel Roskin  <proski@gnu.org>
2108         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2109         for cross-compilation.
2111 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2113         Fix i386-ieee1275 build.
2115         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2116         Remove declaration.
2118 2009-03-30  Pavel Roskin  <proski@gnu.org>
2120         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2121         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2122         zero-terminated, rely only on the strlen value.  Fix comparison
2123         of strings differing in length.
2125 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2127         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2128         checking for abi version.  Improve error messages on BIOS to notify
2129         user about `linux16' command.
2131 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2133         Leak fixes
2135         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2136         in case of collision
2137         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2139 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2141         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2142         set `vid_mode' accordingly.
2143         (grub_linux_boot): Process `vid_mode' and set video mode.
2145 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2147         * util/grub.d/10_linux.in (linux_entry): New function.
2148         Factorize generation of Linux boot entries.
2150 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2152         Make the format of Environment Block plain text. The boot loader
2153         part is not tested well yet.
2155         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2156         (buffer): Removed.
2157         (envblk): Likewise.
2158         (usage): Remove "info" and "clear". Add "unset". Update the
2159         description of "set", as this does not delete variables any
2160         longer.
2161         (create_envblk_file): Complete rewrite.
2162         (open_envblk_file): Likewise.
2163         (cmd_info): Removed.
2164         (cmd_list): Likewise.
2165         (cmd_set): Likewise.
2166         (cmd_clear): Likewise.
2167         (list_variables): New function.
2168         (write_envblk): Likewise.
2169         (set_variables): Likewise.
2170         (unset_variables): Likewise.
2171         (main): Complete rewrite.
2173         * commands/loadenv.c (buffer): Removed.
2174         (envblk): Likewise.
2175         (open_envblk_file): New function.
2176         (read_envblk_file): Complete rewrite.
2177         (grub_cmd_load_env): Likewise.
2178         (grub_cmd_list_env): Likewise.
2179         (struct blocklist): New struct.
2180         (free_blocklists): New function.
2181         (check_blocklists): Likewise.
2182         (write_blocklists): Likewise.
2183         (grub_cmd_save_env): Complete rewrite.
2185         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2186         a plain text signature.
2187         (GRUB_ENVBLK_MAXLEN): Removed.
2188         (struct grub_envblk): Complete rewrite.
2189         (grub_envblk_find): Removed.
2190         (grub_envblk_insert): Likewise.
2191         (grub_envblk_open): New prototype.
2192         (grub_envblk_set): Likewise.
2193         (grub_envblk_delete): Put const to VALUE.
2194         (grub_envblk_iterate): Put const to NAME and VALUE.
2195         (grub_envblk_close): New prototype.
2196         (grub_envblk_buffer): New inline function.
2197         (grub_envblk_size): Likewise.
2199         * lib/envblk.c: Include grub/mm.h.
2200         (grub_env_find): Removed.
2201         (grub_envblk_open): New function.
2202         (grub_envblk_close): Likewise.
2203         (escaped_value_len): Likewise.
2204         (find_next_line): Likewise.
2205         (grub_envblk_insert): Removed.
2206         (grub_envblk_set): New function.
2207         (grub_envblk_delete): Complete rewrite.
2208         (grub_envblk_iterate): Likewise.
2210 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2212         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2213         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2214         variables.  Use 16-bit loader.
2215         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2216         loader.
2217         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2218         (grub_linux16_boot): ... this.  Update all users.
2219         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2220         (grub_linux_boot): ... this.  Update all users.
2222         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2223         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2224         commands to `linux16' and `initrd16'.
2225         (GRUB_MOD_FINI(linux)): Rename to ...
2226         (GRUB_MOD_FINI(linux16)): ... this.
2228 2009-03-24  Pavel Roskin  <proski@gnu.org>
2230         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2231         not just for compilation.
2233 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2235         Move multiboot helper out of kernel
2237         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2238         `loader/i386/multiboot_helper.S'.
2239         * conf/i386-coreboot.rmk: Likewise
2240         * conf/i386-ieee1275.rmk: Likewise
2242         * kern/i386/loader.S: Move multiboot helpers from here...
2243         * loader/i386/multiboot_helper.S: ...moved here
2244         * include/grub/i386/loader.h: Move declarations of multiboot
2245         helpers from here...
2246         * include/grub/i386/multiboot.h: ...moved here
2247         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2249 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2251         * kern/env.c (grub_env_context_open): Added an argument to specify
2252         whether a new context inherits exported variables from current
2253         one. This is useful when making a sandbox to interpret a config
2254         file.
2255         All callers updated.
2257         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2259 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2261         * kern/env.c (grub_env_context_close): Fix memory leaks.
2263 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2265         * normal/main.c (grub_normal_execute): Added an argument
2266         BATCH to specify if an interactive interface should be provided
2267         after reading a config file.
2268         All callers updated.
2269         (read_command_list): Prevent being executed twice.
2270         (read_fs_list): Likewise.
2272         * include/grub/normal.h (grub_normal_execute): Updated the
2273         prototype.
2275 2009-03-22  Pavel Roskin  <proski@gno.org>
2277         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2278         _start.
2279         * kern/i386/pc/startup.S: Likewise.
2280         * kern/i386/efi/startup.S: Likewise.
2281         * kern/i386/ieee1275/startup.S: Likewise.
2282         * kern/i386/coreboot/startup.S: Likewise.
2283         * kern/x86_64/efi/startup.S: Likewise.
2285         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2286         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2287         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2289 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2291         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2293         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2294         limit detection.
2295         Use vaddr of correct segment for entry_point.
2297 2009-03-21  Bean  <bean123ch@gmail.com>
2299         * commands/blocklist.c: Add include file <grub/command.h>, remove
2300         <grub/normal.h> and <grub/arg.h>.
2301         (grub_cmd_blocklist): Use the new command interface.
2302         (GRUB_MOD_INIT): Likewise.
2303         (GRUB_MOD_FINI): Likewise.
2304         * commands/boot.c: Likewise.
2305         * commands/cat.c: Likewise.
2306         * commands/cmp.c: Likewise.
2307         * commands/configfile.c: Likewise.
2308         * commands/crc.c: Likewise.
2309         * commands/echo.c: Likewise.
2310         * commands/halt.c: Likewise.
2311         * commands/handler.c: Likewise.
2312         * commands/hdparm.c: Likewise.
2313         * commands/help.c: Likewise.
2314         * commands/hexdump.c: Likewise.
2315         * commands/loadenv.c: Likewise.
2316         * commands/ls.c: Likewise.
2317         * commands/lsmmap.c: Likewise.
2318         * commands/lspci.c: Likewise.
2319         * commands/loadenv.c: Likewise.
2320         * commands/read.c: Likewise.
2321         * commands/reboot.c: Likewise.
2322         * commands/search.c: Likewise.
2323         * commands/sleep.c: Likewise.
2324         * commands/test.c: Likewise.
2325         * commands/usbtest.c: Likewise.
2326         * commands/videotest.c: Likewise.
2327         * commands/i386/cpuid.c: Likewise.
2328         * commands/i386/pc/halt.c: Likewise.
2329         * commands/i386/pc/play.c: Likewise.
2330         * commands/i386/pc/pxecmd.c: Likewise.
2331         * commands/i386/pc/vbeinfo.c: Likewise.
2332         * commands/i386/pc/vbetest.c: Likewise.
2333         * commands/ieee1275/suspend.c: Likewise.
2334         * disk/loopback.c: Likewise.
2335         * font/font_cmd.c: Likewise.
2336         * hello/hello.c: Likewise.
2337         * loader/efi/appleloader.c: Likewise.
2338         * loader/efi/chainloader.c: Likewise.
2339         * loader/i386/bsd.c: Likewise.
2340         * loader/i386/efi/linux.c: Likewise.
2341         * loader/i386/ieee1275/linux.c: Likewise.
2342         * loader/i386/linux.c: Likewise.
2343         * loader/i386/pc/chainloader.c: Likewise.
2344         * loader/i386/pc/linux.c: Likewise.
2345         * loader/powerpc/ieee1275/linux.c: Likewise.
2346         * loader/multiboot_loader.c: Likewise.
2347         * term/gfxterm.c: Likewise.
2348         * term/i386/pc/serial.c: Likewise.
2349         * term/terminfo.c: Likewise.
2351         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2352         * term/i386/pc/vga.c: Likewise.
2353         * video/readers/jpeg.c: Likewise.
2354         * video/readers/png.c: Likewise.
2355         * video/readers/tga.c: Likewise.
2357         * util/grub-fstest (cmd_loopback): Removed.
2358         (cmd_blocklist): Likewise.
2359         (cmd_ls): Likewise.
2360         (grub_register_command): Likewise.
2361         (grub_unregister_command): Likewise.
2362         (execute_command): Use grub_command_find to locate command and execute
2363         it.
2365         * include/grub/efi/chainloader.h: Removed.
2366         * loader/efi/chainloader_normal.c: Likewise.
2367         * loader/i386/bsd_normal.c: Likewise.
2368         * loader/i386/pc/chainloader_normal.c: Likewise.
2369         * loader/i386/pc/multiboot_normal.c: Likewise.
2370         * loader/linux_normal.c: Likewise.
2371         * loader/multiboot_loader_normal.c: Likewise.
2372         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2374         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2375         and grub_register_command_p1.
2377         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2378         kern/command.c, lib/arg.c and commands/extcmd.c.
2379         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2380         (minicmd_mod_SOURCES): New variable.
2381         (minicmd_mod_CFLAGS): Likewise.
2382         (minicmd_mod_LDFLAGS): Likewise.
2383         (extcmd_mod_SOURCES): Likewise.
2384         (extcmd_mod_CFLAGS): Likewise.
2385         (extcmd_mod_LDFLAGS): Likewise.
2386         (boot_mod_SOURCES): Removed.
2387         (boot_mod_CFLAGS): Likewise.
2388         (boot_mod_LDFLAGS): Likewise.
2390         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2391         kern/corecmd.c.
2392         (kernel_img_HEADERS): Add command.h.
2393         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2394         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2395         and lib/arg.c.
2396         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2397         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2398         remove the corresponding normal mode command.
2399         (normal_mod_SOURCES): Remove normal/arg.c.
2400         * conf/i386-coreboot.rmk: Likewise.
2401         * conf/i386-efi.rmk: Likewise.
2402         * conf/i386-ieee1275.rmk: Likewise.
2403         * conf/powerpc-ieee1275.rmk: Likewise.
2404         * conf/x86_64-efi.rmk: Likewise.
2406         * include/grub/arg.h: Move from here ...
2407         * include/grub/lib/arg.h: ... to here.
2409         * normal/arg.c: Move from here ...
2410         * lib/arg.c: ... to here.
2412         * commands/extcmd.c: New file.
2413         * commands/minicmd.c: Likewise.
2414         * include/grub/command.h: Likewise.
2415         * include/grub/extcmd.h: Likewise.
2416         * kern/command.c: Likewise.
2417         * kern/corecmd.c: Likewise.
2419         * kern/list.c (grub_list_iterate): Return int instead of void.
2420         (grub_list_insert): New function.
2421         (grub_prio_list_insert): Likewise.
2423         * kern/rescue.c (grub_rescue_command): Removed.
2424         (grub_rescue_command_list): Likewise.
2425         (grub_rescue_register_command): Likewise.
2426         (grub_rescue_unregister_command): Likewise.
2427         (grub_rescue_cmd_boot): Move to minicmd.c
2428         (grub_rescue_cmd_help): Likewise.
2429         (grub_rescue_cmd_info): Likewise.
2430         (grub_rescue_cmd_boot): Likewise.
2431         (grub_rescue_cmd_testload): Likewise.
2432         (grub_rescue_cmd_dump): Likewise.
2433         (grub_rescue_cmd_rmmod): Likewise.
2434         (grub_rescue_cmd_lsmod): Likewise.
2435         (grub_rescue_cmd_exit): Likewise.
2436         (grub_rescue_print_devices): Moved to corecmd.c.
2437         (grub_rescue_print_files): Likewise.
2438         (grub_rescue_cmd_ls): Likewise.
2439         (grub_rescue_cmd_insmod): Likewise.
2440         (grub_rescue_cmd_set): Likewise.
2441         (grub_rescue_cmd_unset): Likewise.
2442         (attempt_normal_mode): Use grub_command_find to get normal module.
2443         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2444         commands, remove grub_rescue_register_command calls.
2446         * normal/command.c (grub_register_command): Removed.
2447         (grub_unregister_command): Likewise.
2448         (grub_command_find): Likewise.
2449         (grub_iterate_commands): Likewise.
2450         (rescue_command): Likewise.
2451         (export_command): Moved to corecmd.c.
2452         (set_command): Removed.
2453         (unset_command): Likewise.
2454         (insmod_command): Likewise.
2455         (rmmod_command): Likewise.
2456         (lsmod_command): Likewise.
2457         (grub_command_init): Likewise.
2459         * normal/completion.c (iterate_command): Use cmd->prio to check for
2460         active command.
2461         (complete_arguments): Use grub_extcmd_t structure to find options.
2462         (grub_normal_do_completion): Change function grub_iterate_commands to
2463         grub_command_iterate.
2465         * normal/execute.c (grub_script_execute_cmd): No need to parse
2466         argument here.
2468         * normal/main.c (grub_dyncmd_dispatcher): New function.
2469         (read_command_list): Register unload commands as dyncmd.
2470         (grub_cmd_normal): Use new command interface, register rescue,
2471         unregister normal at entry, register normal, unregister rescue at exit.
2473         * include/grub/list.h (grub_list_test_t): New type.
2474         (grub_list_iterate): Return int instead of void.
2475         (grub_list_insert): New function.
2476         (GRUB_AS_NAMED_LIST_P): New macro.
2477         (GRUB_AS_PRIO_LIST): Likewise.
2478         (GRUB_AS_PRIO_LIST_P): Likewise.
2479         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2480         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2481         (grub_prio_list): New structure.
2482         (grub_prio_list_insert): New function.
2483         (grub_prio_list_remove): New inline function.
2485         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2486         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2487         (GRUB_COMMAND_FLAG_MENU): Likewise.
2488         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2489         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2490         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2491         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2492         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2493         (grub_command): Likewise.
2494         (grub_register_command): Likewise.
2495         (grub_command_find): Likewise.
2496         (grub_iterate_commands): Likewise.
2497         (grub_command_init): Likewise.
2498         (grub_arg_parse): Likewise.
2499         (grub_arg_show_help): Likewise.
2501         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2502         (grub_rescue_unregister_command): Likewise.
2504         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2505         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2506         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2508         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2509         grub_rescue_cmd_initrd.
2510         * include/grub/i386/loader.h: Likewise.
2511         * include/grub/x86_64/loader.h: Likewise.
2513         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2515 2009-03-21  Bean  <bean123ch@gmail.com>
2517         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2518         instead of stat in mingw environment.
2520         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2522         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2524         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2525         AC_CONFIG_LINKS.
2527 2009-03-21  Bean  <bean123ch@gmail.com>
2529         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2530         out of range error.
2532 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2534         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2535         checking inode flags for EXT4_EXTENTS_FLAG.
2537 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2539         * loader/i386/linux.c: Include `<grub/video.h>' and
2540         `<grub/i386/pc/vbe.h>'..
2541         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2542         (grub_linux32_boot): Attempt to configure video settings with
2543         grub_linux_setup_video().
2544         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2545         to avoid grub_console_fini() which would step out of graphical mode
2546         unconditionally.
2548 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2550         Fix build on powerpc.
2551         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2553 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2555         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2556         background image command.
2558 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2560         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2561         (grub_gfxterm_putchar): Extract pairs of identical calls to
2562         draw_cursor out of conditional blocks.
2564 2009-03-11  Pavel Roskin  <proski@gnu.org>
2566         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2567         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2569 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2571         * loader/i386/multiboot_elfxx.c
2572         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2574 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2576         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2577         `kern/handler.c'.
2579 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2581         * loader/i386/multiboot.c (code_size): New variable.
2582         (grub_multiboot): Define offsets by adding to `code_size' rather
2583         than subtracting from `grub_multiboot_payload_size'.  Provide
2584         4-byte alignment to MBI and others by increasing
2585         `boot_loader_name_length' appropriately.
2587         * loader/i386/multiboot_elfxx.c
2588         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2590 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2592         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2593         `fs/ext2.c'.
2595 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2597         Make loader/i386/linux.c usable on i386-pc again.
2599         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2600         memory to heap.
2601         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2602         `#error' stanza.
2604 2009-03-07  Bean  <bean123ch@gmail.com>
2606         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2607         allocation.
2609 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2611         Fix display issue on terminals with screen size other than 80x25
2612         (e.g. gfxterm with resolution higher than 640x480).
2614         * normal/main.c (grub_normal_init_page): Display title text in a
2615         position relative to the center of the terminal instead of relying
2616         on a hardcoded offset.
2618 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2620         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2621         installed.
2623         * Makefile.in (host_kernel): New variable.
2624         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2625         scripts instead of just the windows one.
2626         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2628 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2630         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2631         `kern/handler.c'.
2632         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2633         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2634         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2635         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2636         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2637         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2639 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2641         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2642         or if there's no space for the disk label and print the partition number on a
2643         invalid magic.
2645 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2647         * util/misc.c: Include <time.h>.
2648         (grub_millisleep): New function.
2650 2009-03-04  Bean  <bean123ch@gmail.com>
2652         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2653         another option -mno-red-zone.
2655         * commands/handler.c: Change module description.
2657         * kern/handler.c: Add missing space at the end of description line.
2659         * kern/list.c: Likewise.
2661 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2663         Move more components to the relocation area, and fix mbi pointer
2664         handling to use the destination rather than the origin (thanks to
2665         Vladimir Serbinenko for spotting).
2667         * loader/i386/multiboot.c (mbi_dest): New variable.
2668         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2669         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2670         relocation area.
2672 2009-03-01  Bean  <bean123ch@gmail.com>
2674         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2675         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2676         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2677         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2679         * loader/i386/efi/linux.c (acpi_guid): New variable.
2680         (acpi_guid): Likewise.
2681         (EBDA_SEG_ADDR): New constant.
2682         (LOW_MEM_ADDR): Likewise.
2683         (FAKE_EBDA_SEG): Likewise.
2684         (fake_bios_data): New function.
2685         (grub_linux_boot): Call fake_bios_data.
2687 2009-03-01  Bean  <bean123ch@gmail.com>
2689         * commands/terminal.c: Removed.
2691         * commands/handler.c: New file.
2693         * include/grub/list.h: Likewise.
2695         * include/grub/handler.h: Likewise.
2697         * kern/list.c: Likewise.
2699         * kern/handler.c: Likewise.
2701         * kern/term.h: Include header file <grub/handler.h>.
2702         (grub_term_input): Move next field to the beginning.
2703         (grub_term_output): Likewise.
2704         (grub_term_input_class): New variable.
2705         (grub_term_output_class): Likewise.
2706         (grub_term_register_input): Changed to inline function.
2707         (grub_term_register_output): Likewise.
2708         (grub_term_unregister_input): Likewise.
2709         (grub_term_unregister_output): Likewise.
2710         (grub_term_set_current_input): Likewise.
2711         (grub_term_set_current_output): Likewise.
2712         (grub_term_get_current_input): Likewise.
2713         (grub_term_get_current_output): Likewise.
2714         (grub_term_iterate_input): Removed.
2715         (grub_term_iterate_output): Likewise.
2717         * kern/term.c (grub_term_list_input): Removed.
2718         (grub_term_list_output): Likewise.
2719         (grub_term_input_class): New variable.
2720         (grub_term_output_class): Likewise.
2721         (grub_cur_term_input): Change variable as macro.
2722         (grub_cur_term_output): Likewise.
2723         (grub_term_register_input): Removed.
2724         (grub_term_register_output): Likewise.
2725         (grub_term_unregister_input): Likewise.
2726         (grub_term_unregister_output): Likewise.
2727         (grub_term_set_current_input): Likewise.
2728         (grub_term_set_current_output): Likewise.
2729         (grub_term_iterate_input): Likewise.
2730         (grub_term_iterate_output): Likewise.
2731         (grub_term_get_current_input): Likewise.
2732         (grub_term_get_current_output): Likewise.
2734         * util/grub-editenv.c: Include header file <grub/handler.h>.
2735         (grub_term_get_current_input): Removed.
2736         (grub_term_get_current_output): Likewise.
2737         (grub_term_input_class): New variable.
2738         (grub_term_output_class): Likewise.
2740         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2741         (grub_term_get_current_output): Likewise.
2742         (grub_term_input_class): New variable.
2743         (grub_term_output_class): Likewise.
2745         * util/grub-probe.c (grub_term_get_current_input): Removed.
2746         (grub_term_get_current_output): Likewise.
2747         (grub_term_input_class): New variable.
2748         (grub_term_output_class): Likewise.
2750         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2751         (grub_term_get_current_output): Likewise.
2752         (grub_term_input_class): New variable.
2753         (grub_term_output_class): Likewise.
2755         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2756         (terminal_mod_SOURCES): Likewise.
2757         (terminal_mod_CFLAGS): Likewise.
2758         (terminal_mod_LDFLAGS): Likewise.
2760         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2761         handler.c.
2762         (kernel_img_SOURCES): Add list.c and handler.c.
2763         (kernel_img_HEADERS): Add list.h and handler.h.
2765         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2766         handler.c.
2767         (kernel_mod_SOURCES): Add list.c and handler.c.
2768         (kernel_mod_HEADERS): Add list.h and handler.h.
2770         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2771         handler.c.
2772         (kernel_elf_SOURCES): Add list.c and handler.c.
2773         (kernel_elf_HEADERS): Add list.h and handler.h.
2775         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2776         handler.c.
2777         (kernel_elf_SOURCES): Add list.c and handler.c.
2778         (kernel_elf_HEADERS): Add list.h and handler.h.
2780         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2781         handler.c.
2782         (kernel_mod_SOURCES): Add list.c and handler.c.
2783         (kernel_mod_HEADERS): Add list.h and handler.h.
2785         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2786         handler.c.
2787         (kernel_elf_SOURCES): Add list.c and handler.c.
2788         (kernel_elf_HEADERS): Add list.h and handler.h.
2790 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2792         Factorize elf32 / elf64 code in Multiboot loader.  This will
2793         prevent it from getting out of sync again.
2795         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2796         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2797         grub_multiboot_load_elf64): Move from here ...
2798         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2799         grub_multiboot_load_elf): ... to here (new file).
2801 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2803         * util/grub.d/10_linux.in: Rename "single-user mode" to
2804         "recovery mode".
2806 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2808         Don't leak in SCSI code.
2809         * disk/scsi.c (grub_scsi_close): free `scsi'.
2811 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2813         * loader/i386/pc/multiboot.c: Move from here ...
2814         * loader/i386/multiboot.c: ... to here.  Update all users.
2816 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2818         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2819         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2821 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2823         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2824         b-tree.
2826 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2828         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2829         `0x' qualifier as 0 when base is specified as parameter).
2831 2009-02-24  Bean  <bean123ch@gmail.com>
2833         * configure.ac: Check for -mcmodel=large in x86_64 target.
2835         * include/grub/efi/api.h (efi_call_10): New macro.
2836         (efi_wrap_10): New function.
2838         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2839         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2840         (GRUB_PE32_REL_BASED_LOW): Likewise.
2841         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2842         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2843         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2844         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2845         (GRUB_PE32_REL_BASED_REL): Likewise.
2846         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2847         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2848         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2850         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2851         issue.
2853         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2854         (efi_wrap_10): New function.
2856         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2858         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2859         MB/MBP model (NV chipset).
2860         (devdata_devs): Add devpath_5 to the list.
2862         * load/i386/efi/linux.c (video_base): Remove variable.
2863         (RGB_MASK): New macro.
2864         (RGB_MAGIC): Likewise.
2865         (LINE_MIN): Likewise.
2866         (LINE_MAX): Likewise.
2867         (FBTEST_STEP): Likewise.
2868         (FBTEST_COUNT): Likewise.
2869         (fb_list): New variable.
2870         (grub_find_video_card): Remove function.
2871         (find_framebuf): New function.
2872         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2873         line length.
2875         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2876         problem for x86_64.
2878 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2880         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2882         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2883         coding tool name.
2885 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2887         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2888         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2889         in our relocation, instead of using it directly from heap.  Also
2890         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2892 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2894         Implement USB keyboard support (based on patch by Marco Gerards)
2896         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2897         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2898         (usb_keyboard_mod_LDFLAGS): New variables.
2900         * term/usb_keyboard.c: New file.
2902 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2904         Corrected wrong declaration
2906         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2908 2009-02-14  Christian Franke  <franke@computer.org>
2910         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2911         (grub_lspci_iter): Print class code and programming interface byte.
2913 2009-02-14  Christian Franke  <franke@computer.org>
2915         * gendistlist.sh: Ignore `.svn' directories.
2917 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2919         * fs/fat.c: Add 2009 to Copyright line.
2921 2009-02-14  Christian Franke  <franke@computer.org>
2923         * commands/hdparm.c: New file.  Provides `hdparm' command
2924         which sends ATA commands via grub_disk_ata_pass_through ().
2926         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2928         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2929         and <grub/cpu/io.h> to include/grub/ata.h.
2930         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2931         (GRUB_CDROM_SECTOR_SIZE): Remove.
2932         (GRUB_ATA_*): Move to include/grub/ata.h.
2933         (GRUB_ATAPI_*): Likewise.
2934         (enum grub_ata_commands): Likewise.
2935         (enum grub_ata_timeout_milliseconds): Likewise.
2936         (struct grub_ata_device): Likewise.
2937         (grub_ata_regset): Likewise.
2938         (grub_ata_regget): Likewise.
2939         (grub_ata_regset2): Likewise.
2940         (grub_ata_regget2): Likewise.
2941         (grub_ata_check_ready): Likewise.
2942         (grub_ata_wait_not_busy): Remove static, exported in
2943         include/grub/ata.h.
2944         (grub_ata_wait_drq): Likewise.
2945         (grub_ata_pio_read): Likewise.
2947         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2948         function for hdparm.mod.
2950         * include/grub/ata.h: New file, contains declarations from
2951         disk/ata.c.
2952         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2954         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2955         (grub_disk_ata_pass_through): New exported variable.
2957         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2959 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2961         Support multiple fallback entries, and provide an API to support
2962         executing default+fallback menu entries.  Renamed the `terminal' menu
2963         viewer to `text'.
2965         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2966         variable declaration.
2967         (grub_menu_execute_callback): New structure declaration.
2968         (grub_menu_execute_callback_t): New typedef.
2969         (grub_menu_execute_with_fallback): New function declaration.
2970         (grub_menu_get_entry): Likewise.
2971         (grub_menu_get_timeout): Likewise.
2972         (grub_menu_set_timeout): Likewise.
2974         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2976         * normal/menu.c (grub_wait_after_message): Moved to
2977         `normal/menu_text.c'.
2978         (draw_border): Likewise.
2979         (print_message): Likewise.
2980         (print_entry): Likewise.
2981         (print_entries): Likewise.
2982         (grub_menu_init_page): Likewise.
2983         (get_entry_number): Likewise.
2984         (print_timeout): Likewise.
2985         (run_menu): Likewise.
2986         (grub_menu_execute_entry): Likewise.
2987         (show_text_menu): Likewise.
2988         (get_and_remove_first_entry_number): New function.
2989         (grub_menu_execute_with_fallback): Likewise.
2990         (get_entry): Renamed to ...
2991         (grub_menu_get_entry): .. this and made it global.
2992         (get_timeout): Renamed to ...
2993         (grub_menu_get_timeout): ... this and made it global.
2994         (set_timeout): Renamed to ...
2995         (grub_menu_set_timeout): ... this and made it global.
2996         (grub_normal_terminal_menu_viewer): Renamed to ...
2997         (grub_normal_text_menu_viewer): ... this.
2999         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3000         from normal/menu.c.
3002         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3003         (normal_mod_SOURCES): Likewise.
3005         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3006         (normal_mod_SOURCES): Likewise.
3008         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3009         (normal_mod_SOURCES): Likewise.
3011         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3012         (normal_mod_SOURCES): Likewise.
3014         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3015         (normal_mod_SOURCES): Likewise.
3017         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3018         (normal_mod_SOURCES): Likewise.
3020         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3021         (normal_mod_SOURCES): Likewise.
3023 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3025         * util/grub.d/00_header.in: Update old reference to `font' command.
3027 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3029         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3031         Based on patch from Javier Martín.
3033 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3035         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3036         to avoid false positives with FAT.
3037         (grub_fstest_SOURCES): Likewise.
3038         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3039         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3040         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3041         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3042         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3043         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3045 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3047         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3048         bpb.version_specific.fat12_or_fat16.fstype and
3049         bpb.version_specific.fat32.fstype.
3051 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3053         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3055 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3057         * Makefile.in (host_os, host_cpu): New variables.
3058         (target_os): Remove.  Update all users.
3060 2009-02-08  Marco Gerards  <marco@gnu.org>
3062         * Makefile.in (enable_grub_emu_usb): New variable.
3063         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3064         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3065         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3066         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3067         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3068         `usbtest.mod' and `usbms.mod'.
3069         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3070         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3071         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3072         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3073         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3074         variables.
3076         * disk/usbms.c: New file.
3078         * include/grub/usb.h: Likewise.
3080         * include/grub/usbtrans.h: Likewise.
3082         * include/grub/usbdesc.h: Likewise.
3084         * bus/usb/usbtrans.c: Likewise.
3086         * bus/usb/ohci.c: Likewise.
3088         * bus/usb/uhci.c: Likewise.
3090         * bus/usb/usbhub.c: Likewise.
3092         * bus/usb/usb.c: Likewise.
3094         * commands/usbtest.c: Likewise.
3096         * util/usb.c: Likewise.
3098         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3100         * configure.ac: Test for libusb presence.
3102         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3104 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3106         * kern/mm.c: Add more comments.
3108 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3110         Patch from Javier Martín.
3111         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3112         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3114 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3116         * fs/cpio.c: Split tar functionality to ...
3117         * fs/tar.c: ... here (new file).  Update all users.
3119 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3121         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3122         backward-incompatible features.
3124         Based on patch from Javier Martín, with some adjustments.
3126 2009-02-07  Michael Scherer  <misc@mandriva.org>
3128         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3130 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3132         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3133         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3134         after the RAID stuff.
3136 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3138         Fixes problem when running vbetest command as reported by
3139         Vladimir Serbinenko <phcoder@gmail.com>.
3141         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3143 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3145         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3146         /dev/md/NpN style mdraid devices.
3148 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3150         * util/unifont2pff.rb: Remove.
3152 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3154         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3155         `#'.
3157 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3159         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3160         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3161         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3162         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3163         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3164         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3165         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3167 2009-02-02  Christian Franke  <franke@computer.org>
3169         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3171 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3173         * INSTALL: Note that we now require at least autoconf 2.59 and
3174         that LZO is optional.
3176 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3178         Base on patch on bug #24154 created by Tomas Tintera
3179         <trosos@seznam.cz>.
3181         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3183 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3185         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3186         <bero@arklinux.org>.
3188         * normal/parser.y (script_init): Add missing semicolon.
3190 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3192         * normal/main.c: Add include to grub/menu_viewer.h.
3193         (free_menu_entry_classes): Added.
3194         (grub_normal_menu_addentry): Added class property handling.
3195         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3196         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3198         * normal/menu_viewer.c: New file.
3200         * normal/menu.c (run_menu_entry): Renamed to ...
3201         (grub_menu_execute_entry): ... this and made it as global.
3202         (grub_menu_run): Renamed to ...
3203         (show_text_menu): ... this and made it local.
3204         (show_text_menu): Adapt to new function names.
3205         (grub_normal_terminal_menu_viewer): New global variable.
3207         * include/grub/menu.h: New file.
3209         * include/grub/menu_viewer.h: New file.
3211         * include/grub/normal.h: Added include to grub/menu.h.
3212         (grub_menu_entry): Moved to include/grub/menu.h.
3213         (grub_menu_entry_t): Likewise.
3214         (grub_menu): Likewise.
3215         (grub_menu_t): Likewise.
3216         (grub_normal_terminal_menu_viewer): Added.
3217         (grub_menu_execute_entry): Likewise.
3218         (grub_menu_run): Removed.
3220         * DISTLIST: Added include/grub/menu.h.
3221         Added include/grub/menu_viewer.h.
3222         Added normal/menu_viewer.c.
3224 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3226         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3227         arglist for menutitle arguments.
3229         * normal/main.c (grub_normal_menu_addentry): Likewise.
3231         * normal/parser.y (menuentry): Likewise.
3233         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3235         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3236         (grub_script_create_cmdmenu): Likewise.
3238         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3240         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3241         changes.
3243         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3245         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3247         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3249         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3251         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3253         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3255 2009-01-30  Christian Franke  <franke@computer.org>
3257         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3258         in option help text.
3260 2009-01-27  Pavel Roskin  <proski@gnu.org>
3262         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3264 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3266         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3268         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3270         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3271         unregister function.
3273 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3275         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3277         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3279         * util/grub-mkfont.c (usage): Fix typo.
3281         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3283 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3285         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3287         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3289         * kern/misc.c (grub_strcasecmp): New function.
3290         (grub_strcasecmp): Use grub_size_t instead of int for length.
3291         Fix return value.
3292         * include/grub/misc.h: Update function prototypes.
3294 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3296         * configure.ac: Fix cross-compilation check.
3298 2009-01-22  Christian Franke  <franke@computer.org>
3300         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3301         (precision) digit string.  Allow `.format2' without `format1' (width).
3302         Limit input chars for `%s' output to `format2' if specified.  This is
3303         compatible with standard printf ().
3305 2009-01-22  Christian Franke  <franke@computer.org>
3307         * disk/ata.c (grub_ata_wait_status): Replace by ...
3308         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3309         other status bits may be invalid while BSY is asserted.
3310         (grub_ata_check_ready): New function.
3311         (grub_ata_cmd): Removed.
3312         (grub_ata_wait_drq): New function.
3313         (grub_ata_strncpy): Remove inline.
3314         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3315         and error check now done by grub_ata_wait_drq ().
3316         (grub_ata_pio_write): Likewise.
3317         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3318         grub_ata_wait_drq () to wait for data.
3319         (grub_ata_device_initialize): Add status register check to
3320         detect missing SATA slave devices.  Add debug messages.
3321         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3322         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3323         transfer loop by grub_ata_pio_write ().
3324         (grub_ata_identify): Set DEV before check for !BSY. Use
3325         grub_ata_wait_drq () to wait for data.
3326         (grub_ata_setaddress): Set DEV before check for !BSY.
3327         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3328         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3329         command on (size % batch) == 0.  Add missing error check after write of
3330         last block.  Add debug messages.
3331         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3333 2009-01-19  Christian Franke  <franke@computer.org>
3335         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3336         (GRUB_ATAPI_IREASON_*): Likewise.
3337         (grub_ata_pio_write): Fix timeout error return.
3338         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3339         (grub_atapi_wait_drq): New function.
3340         (grub_atapi_packet): New parameter `size'.
3341         Use grub_atapi_wait_drq () and direct write instead of
3342         grub_ata_pio_write ().
3343         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3344         reads the number of bytes requested by the device for each DRQ
3345         assertion.
3346         (grub_atapi_write): Remove old implementation, return not
3347         implemented instead.
3349 2009-01-19  Christian Franke  <franke@computer.org>
3351         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3352         of 512 to calculate data size.
3353         (grub_scsi_read12): Likewise.
3354         (grub_scsi_write10): Likewise.
3355         (grub_scsi_write12): Likewise.
3356         (grub_scsi_read): Adjust size according to blocksize.
3357         Add checks for invalid blocksize and unaligned transfer.
3359 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3361         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3363         * term/gfxterm.c (write_char): Fix background rendering for wide
3364         width glyphs.
3366 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3368         * config.guess: Update to latest version from config git.
3369         * config.sub: Likewise.
3371 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3373         * Makefile.in: Change font compilation to use new grub-mkfont instead
3374         of java version.
3376         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3377         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3378         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3379         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3380         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3381         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3382         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3383         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3384         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3386 2009-01-16  Christian Franke  <franke@computer.org>
3388         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3389         (enum grub_ata_timeout_milliseconds): New enum.
3390         (grub_ata_wait_status): Add parameter milliseconds.
3391         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3392         recovery from timed-out commands.
3393         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3394         return grub_errno instead of REG_ERROR.
3395         (grub_ata_pio_write): Add parameter milliseconds.
3396         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3397         Pass milliseconds to grub_ata_wait_status () and
3398         grub_ata_pio_read ().
3399         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3400         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3401         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3402         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3403         It is not suitable for device detection, because DEV bit is ignored,
3404         the command may run too long, and not all devices set the signature
3405         properly.
3406         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3407         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3408         Fix device selection, DEV bit must be set first to address the registers
3409         of the correct device.
3410         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3411         grub_ata_pio_read/write ().
3412         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3413         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3415 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3417         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3419 2009-01-13  Bean  <bean123ch@gmail.com>
3421         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3423 2009-01-13  Bean  <bean123ch@gmail.com>
3425         * Makefile.in: (enable_grub_mkfont): New variable.
3426         (freetype_cflags): Likewise.
3427         (freetype_libs): Likewise.
3429         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3430         (grub_mkfont_SOURCES): New variable.
3431         (grub_mkfont_CFLAGS): Likewise.
3432         (grub_mkfont_LDFLAGS): Likewise.
3434         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3435         library if `--enable-grub-mkfont' is requested.
3436         (enable_grub_mkfont): New variable.
3437         (freetype_cflags): Likewise.
3438         (freetype_libs): Likewise.
3440         * util/grub-mkfont.c: New file.
3442 2009-01-12  Christian Franke  <franke@computer.org>
3444         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3445         mode check.  Fix setting of compat_use[].
3447 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3449         Update a few copyright years which we forgot to do in 2008 (only for
3450         files whose changes made in 2008 were copyright-significant)
3452         * Makefile.in: Add 2008 to Copyright line.
3453         * disk/ieee1275/ofdisk.c: Likewise.
3454         * disk/efi/efidisk.c: Likewise.
3455         * kern/dl.c: Likewise.
3456         * kern/sparc64/ieee1275/init.c: Likewise.
3457         * kern/mm.c: Likewise.
3458         * kern/efi/mm.c: Likewise.
3459         * boot/i386/pc/boot.S: Likewise.
3460         * genfslist.sh: Likewise.
3461         * fs/iso9660.c: Likewise.
3462         * fs/hfs.c: Likewise.
3463         * fs/jfs.c: Likewise.
3464         * fs/minix.c: Likewise.
3465         * fs/ufs.c: Likewise.
3466         * gensymlist.sh.in: Likewise.
3467         * genkernsyms.sh.in: Likewise.
3468         * include/grub/misc.h: Likewise.
3469         * include/grub/types.h: Likewise.
3470         * include/grub/symbol.h: Likewise.
3471         * include/grub/elf.h: Likewise.
3472         * include/grub/kernel.h: Likewise.
3473         * include/grub/disk.h: Likewise.
3474         * include/grub/dl.h: Likewise.
3475         * include/grub/i386/linux.h: Likewise.
3476         * include/grub/i386/pc/biosdisk.h: Likewise.
3477         * include/grub/efi/api.h: Likewise.
3478         * include/grub/efi/pe32.h: Likewise.
3479         * include/grub/util/misc.h: Likewise.
3480         * normal/execute.c: Likewise.
3481         * normal/arg.c: Likewise.
3482         * normal/completion.c: Likewise.
3483         * normal/lexer.c: Likewise.
3484         * normal/parser.y: Likewise.
3485         * normal/misc.c: Likewise.
3486         * commands/i386/pc/vbeinfo.c: Likewise.
3487         * commands/hexdump.c: Likewise.
3488         * commands/terminal.c: Likewise.
3489         * commands/ls.c: Likewise.
3490         * commands/help.c: Likewise.
3491         * partmap/pc.c: Likewise.
3492         * loader/efi/chainloader.c: Likewise.
3493         * loader/multiboot_loader.c: Likewise.
3494         * loader/i386/pc/multiboot2.c: Likewise.
3495         * term/efi/console.c: Likewise.
3496         * term/i386/pc/serial.c: Likewise.
3497         * util/lvm.c: Likewise.
3498         * util/console.c: Likewise.
3499         * util/i386/efi/grub-mkimage.c: Likewise.
3500         * util/raid.c: Likewise.
3502 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3504         * commands/videotest.c: Removed include to grub/machine/memory.h.
3506         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3507         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3508         (video_mod_SOURCES): Removed.
3509         (video_mod_CFLAGS): Likewise.
3510         (video_mod_LDFLAGS): Likewise.
3511         (gfxterm_mod_SOURCES): Likewise.
3512         (gfxterm_mod_CFLAGS): Likewise.
3513         (gfxterm_mod_LDFLAGS): Likewise.
3514         (videotest_mod_SOURCES): Likewise.
3515         (videotest_mod_CFLAGS): Likewise.
3516         (videotest_mod_LDFLAGS): Likewise.
3517         (bitmap_mod_SOURCES): Likewise.
3518         (bitmap_mod_CFLAGS): Likewise.
3519         (bitmap_mod_LDFLAGS): Likewise.
3520         (tga_mod_SOURCES): Likewise.
3521         (tga_mod_CFLAGS): Likewise.
3522         (tga_mod_LDFLAGS): Likewise.
3523         (jpeg_mod_SOURCES): Likewise.
3524         (jpeg_mod_CFLAGS): Likewise.
3525         (jpeg_mod_LDFLAGS): Likewise.
3526         (png_mod_SOURCES): Likewise.
3527         (png_mod_CFLAGS): Likewise.
3528         (png_mod_LDFLAGS): Likewise.
3530         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3531         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3532         (video_mod_SOURCES): Added.
3533         (video_mod_CFLAGS): Likewise.
3534         (video_mod_LDFLAGS): Likewise.
3535         (videotest_mod_SOURCES): Likewise.
3536         (videotest_mod_CFLAGS): Likewise.
3537         (videotest_mod_LDFLAGS): Likewise.
3538         (bitmap_mod_SOURCES): Likewise.
3539         (bitmap_mod_CFLAGS): Likewise.
3540         (bitmap_mod_LDFLAGS): Likewise.
3541         (tga_mod_SOURCES): Likewise.
3542         (tga_mod_CFLAGS): Likewise.
3543         (tga_mod_LDFLAGS): Likewise.
3544         (jpeg_mod_SOURCES): Likewise.
3545         (jpeg_mod_CFLAGS): Likewise.
3546         (jpeg_mod_LDFLAGS): Likewise.
3547         (png_mod_SOURCES): Likewise.
3548         (png_mod_CFLAGS): Likewise.
3549         (png_mod_LDFLAGS): Likewise.
3550         (gfxterm_mod_SOURCES): Likewise.
3551         (gfxterm_mod_CFLAGS): Likewise.
3552         (gfxterm_mod_LDFLAGS): Likewise.
3554         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3555         grub/machine/console.h.
3557 2009-01-04  Jerone Young  <jerone@gmail.com>
3559         Make on screen instructions clearer
3561         Based on patch created by Jidanni <jidanni@jidanni.org>
3563         * normal/menu.c: print clearer instructions on the screen
3565 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3567         New font engine.
3569         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3570         build system and fixed gfxterm.c to work with different sized fonts.
3572         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3574         * configure: Re-generated.
3576         * DISTLIST: Removed font/manager.c.
3577         Added font/font.c.
3578         Added font/font_cmd.c.
3580         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3581         compilation.
3583         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3585         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3587         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3589         * normal/menu.c: Likewise.
3591         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3592         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3594         * include/grub/font.h: Replaced with new file.
3596         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3597         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3598         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3599         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3600         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3601         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3602         fg_red, fg_green, fg_blue, fg_alpha.
3603         (grub_video_adapter): Removed blit_glyph.
3604         (grub_video_blit_glyph): Removed.
3606         * font/manager.c: Removed file.
3608         * font/font.c: New file.
3610         * font/font_cmd.c: Likewise.
3612         * video/video.c (grub_video_blit_glyph): Removed.
3614         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3615         (grub_video_vbe_map_rgba): Likewise.
3616         (grub_video_vbe_unmap_color_int): Likewise.
3617         (grub_video_vbe_blit_glyph): Removed.
3618         (grub_video_vbe_adapter): Removed blit_glyph.
3620         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3621         (get_pixel): Likewise.
3622         (set_pixel): Likewise.
3624         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3626         * term/gfxterm.c: Adapted to new font engine.
3628         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3630         * term/i386/pc/vga.c: Likewise.
3632         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3634         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3636         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3638         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3640         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3642         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3644         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3646         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3648         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3650         * util/grub.d/00_header.in: Changed to use new loadfont command.
3652         * util/grub-mkconfig_lib.in: Changed font extension.
3654 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3656         * util/getroot.c (grub_util_get_grub_dev): Add support for
3657         /dev/md/dNNpNN style partitionable mdraid devices.
3659 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3661         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3662         at a time limit of the PXE TFTP API correctly.
3663         (grub_pxefs_close): Likewise.
3665 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3667         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3668         grub_ata_device_initialize() calls.
3670 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3672         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3673         iteration failed.
3674         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3676 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3678         Fix build on powerpc-ieee1275.  Based on patch created by
3679         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3680         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3681         `kern/ieee1275/mmap.c'.
3682         * include/grub/powerpc/ieee1275/memory.h: New file.
3684         Provide grub-install on coreboot.
3685         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3686         (grub_install_SOURCES): New variable.
3687         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3688         usable on coreboot.
3690 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3692         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3693         to `grub_term_input_t'.
3694         (grub_term_get_current_output): Change return type to
3695         `grub_term_output_t'.
3697 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3699         Fix breakage on coreboot due to declaration mismatch.
3700         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3701         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3702         grub_vga_text_cls().
3704         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3705         comments.  Avoid copying one more byte than necessary (just in case).
3707         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3708         to 0x200000 (avoids trouble with some OFW implementations, and matches
3709         with the one in Yaboot).
3710         Reported by Manoel Abranches
3712 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3714         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3715         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3717         * util/grub-mkconfig_lib.in (grub_warn): New function.
3718         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3719         warnings, to obtain consistent formatting.
3720         * util/grub.d/00_header.in: Likewise.
3721         * util/update-grub_lib.in: Likewise.
3723         * loader/i386/linux.c (allocate_pages): Fix a warning.
3724         Move comment text to `#error' stanza.
3726         Harmonize ieee1275's grub_available_iterate() with the generic
3727         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3728         build problem on i386-ieee1275):
3729         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3730         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3731         parameter `type'.  Update all users of this function.
3732         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3733         `kern/ieee1275/mmap.c'.
3734         * kern/ieee1275/init.c
3735         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3736         with ...
3737         (grub_machine_mmap_iterate): ... this.
3738         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3739         return type to `grub_err_t'.  Update all implementations of this
3740         function prototype.
3741         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3742         Likewise.
3744         Add `lsmmap' command (lists firmware-provided memory map):
3745         * commands/lsmmap.c: New file.
3746         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3747         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3748         variables.
3749         * conf/powerpc-ieee1275.rmk: Likewise.
3750         * conf/i386-coreboot.rmk: Likewise.
3751         * conf/i386-ieee1275.rmk: Likewise.
3753 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3755         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3756         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3757         constraints to initrd allocation (based on code from
3758         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3759         for Linux to find it.
3761 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3763         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3764         order to cope with duplicate slashes.
3766 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3768         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3769         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3770         don't want to mess with lower memory, because it is used in the Linux
3771         loader.
3773         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3774         an appropriate place in lower memory, between 0x10000 and 0x90000,
3775         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3776         is in our heap (probably as a result of it being corrupted during
3777         decompression).  Add #error instance with comment to explain why this
3778         loader isn't currently usable on PC/BIOS.
3780 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3782         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3783         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3785 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3787         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3789         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3790         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3791         from here ...
3792         * include/grub/i386/pc/memory.h: ... to here.
3794 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3796         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3797         split).
3799         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3800         (grub_console_cur_color, grub_console_real_putchar)
3801         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3802         (grub_console_setcolorstate, grub_console_setcolor)
3803         (grub_console_getcolor): Move from here ...
3804         * include/grub/i386/vga_common.h: ... to here (new file).
3806         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3807         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3808         `<grub/i386/io.h>'.
3809         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3810         `<grub/i386/vga_common.h>'.
3812 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3814         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3815         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3816         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3817         variables.
3818         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3819         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3821         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3822         grub_console_init() with call to grub_vga_text_init().
3823         (grub_machine_fini): Replace call to
3824         grub_console_fini() with call to grub_vga_text_fini() and
3825         grub_at_keyboard_fini().
3827         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3828         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3829         (grub_console_setcolorstate, grub_console_setcolor)
3830         (grub_console_getcolor): New function prototypes.
3832         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3833         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3834         (grub_vga_text_setcursor): Static-ize.
3835         (grub_vga_text_term): New structure.
3836         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3838         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3839         (grub_console_cur_color, grub_console_standard_color)
3840         (grub_console_normal_color, grub_console_highlight_color)
3841         (map_char, grub_console_putchar, grub_console_getcharwidth)
3842         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3843         (grub_console_getcolor): Move from here ...
3844         * term/i386/vga_common.c: ... to here (same function names).
3846 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3848         Use newly-added Multiboot support in coreboot.
3850         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3851         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3853         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3854         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3855         (codestart): Store the MBI in `startup_multiboot_info' when we're
3856         being loaded using Multiboot.
3858         * kern/i386/coreboot/init.c (grub_machine_init): Move
3859         grub_at_keyboard_init() call to beginning of function (useful for
3860         debugging).  Call grub_machine_mmap_init() before attempting to use
3861         grub_machine_mmap_iterate().
3862         (grub_lower_mem, grub_upper_mem): Move from here ...
3863         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3864         here (new file).
3866         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3867         function prototype.
3869 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3871         Fix a regression introduced by the at_keyboard.mod split.  Because
3872         some terminals are default on some platforms and non-default on
3873         others, the first terminal being registered determines which is
3874         going to be default.
3876         * kern/term.c (grub_term_register_input): If this is the first
3877         terminal being registered, set it as the current one.
3878         (grub_term_register_output): Likewise.
3880         * term/efi/console.c (grub_console_init): Do not call
3881         grub_term_set_current_output() or grub_term_set_current_input().
3882         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3883         * term/i386/pc/console.c (grub_console_init): Likewise.
3884         (grub_console_fini): Do not call grub_term_set_current_input()
3885         (but leave grub_term_set_current_output() to restore text mode).
3887 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3889         * util/grub.d/00_header.in: Add backward compatibility check for
3890         versions of terminal.mod that don't understand `terminal_input' or
3891         `terminal_output'.
3893 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3895         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3896         `terminal_input' / `terminal_output', not `terminal'.
3898 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3900         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3901         (DISTCLEANFILES): Add `build_env.mk'.
3903 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3905         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3906         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3907         members.  Update all users.
3908         * util/console.c (grub_ncurses_term): Split in ...
3909         (grub_ncurses_term_input): ... this, and ...
3910         (grub_ncurses_term_output): ... this.  Update all users.
3911         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3913 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3915         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3916         (PKGDATA): Add $(pkgdata_SRCDIR).
3917         (pkglib_BUILDDIR): New variable.
3918         (pkgdata_SRCDIR): New variable.
3919         (build_env.mk): New target.
3920         (include_DATA): New variable.
3921         (install-local): Install $(include_DATA) files in $(includedir).
3923 2008-11-07  Pavel Roskin  <proski@gnu.org>
3925         * gendistlist.sh: Use C locale for sorting to ensure consistent
3926         output on all systems.
3928         * util/grub.d/00_header.in: Remove incorrect space before
3929         "serial".
3931 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3933         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3934         per specification.
3935         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3936         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3937         (based on find_multi_boot1_header).
3938         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3939         using find_multi_boot2_header(), and abort if neither Multiboot or
3940         Multiboot headers were found.
3942 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3944         Modularize at_keyboard.mod:
3946         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3947         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3948         (at_keyboard_mod_LDFLAGS): New variables.
3950         Actual terminal split:
3952         * include/grub/term.h (struct grub_term): Split in ...
3953         (struct grub_term_input): ... this, and ...
3954         (struct grub_term_output): ... this.  Update all users.
3955         (grub_term_set_current): Split in ...
3956         (grub_term_set_current_input): ... this, and ...
3957         (grub_term_set_current_output): ... this.
3958         (grub_term_get_current): Split in ...
3959         (grub_term_get_current_input): ... this, and ...
3960         (grub_term_get_current_output): ... this.
3961         (grub_term_register): Split in ...
3962         (grub_term_register_input): ... this, and ...
3963         (grub_term_register_output): ... this.
3964         (grub_term_unregister): Split in ...
3965         (grub_term_unregister_input): ... this, and ...
3966         (grub_term_unregister_output): ... this.
3967         (grub_term_iterate): Split in ...
3968         (grub_term_iterate_input): ... this, and ...
3969         (grub_term_iterate_output): ... this.
3971         * kern/term.c (grub_term_list): Split in ...
3972         (grub_term_list_input): ... this, and ...
3973         (grub_term_list_output): ... this.  Update all users.
3974         (grub_cur_term): Split in ...
3975         (grub_cur_term_input): ... this, and ...
3976         (grub_cur_term_output): ... this.  Update all users.
3977         (grub_term_set_current): Split in ...
3978         (grub_term_set_current_input): ... this, and ...
3979         (grub_term_set_current_output): ... this.
3980         (grub_term_get_current): Split in ...
3981         (grub_term_get_current_input): ... this, and ...
3982         (grub_term_get_current_output): ... this.
3983         (grub_term_register): Split in ...
3984         (grub_term_register_input): ... this, and ...
3985         (grub_term_register_output): ... this.
3986         (grub_term_unregister): Split in ...
3987         (grub_term_unregister_input): ... this, and ...
3988         (grub_term_unregister_output): ... this.
3989         (grub_term_iterate): Split in ...
3990         (grub_term_iterate_input): ... this, and ...
3991         (grub_term_iterate_output): ... this.
3993         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3994         a check for input and one for output (and only attempt to get keys
3995         from user when input works).
3997         * util/grub-probe.c (grub_term_get_current): Split in ...
3998         (grub_term_get_current_input): ... this, and ...
3999         (grub_term_get_current_output): ... this.
4000         * util/grub-fstest.c: Likewise.
4001         * util/i386/pc/grub-setup.c: Likewise.
4002         * util/grub-editenv.c: Likewise.
4004         Portability adjustments:
4006         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4007         `term/i386/pc/at_keyboard.c'.
4008         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4009         grub_keyboard_controller_init() (now handled by terminal .init).
4010         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4011         grub_at_keyboard_init().
4012         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4013         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4014         at_keyboard.mod via input terminal interface).
4015         * include/grub/i386/coreboot/console.h: Convert into a stub for
4016         `<grub/i386/pc/console.h>'.
4018         Migrate full terminals to new API:
4020         * term/efi/console.c (grub_console_term): Split into ...
4021         (grub_console_term_input): ... this, and ...
4022         (grub_console_term_output): ... this.  Update all users.
4023         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4024         (grub_ofconsole_init): Split into ...
4025         (grub_ofconsole_init_input): ... this, and ...
4026         (grub_ofconsole_init_output): ... this.
4027         (grub_ofconsole_term): Split into ...
4028         (grub_ofconsole_term_input): ... this, and ...
4029         (grub_ofconsole_term_output): ... this.  Update all users.
4030         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4031         (grub_serial_term_input): ... this, and ...
4032         (grub_serial_term_output): ... this.  Update all users.
4033         * term/i386/pc/console.c (grub_console_term): Split into ...
4034         (grub_console_term_input): ... this, and ...
4035         (grub_console_term_output): ... this.  Update all users.
4036         (grub_console_term_input): Only enable it on PC/BIOS platform.
4037         (grub_console_init): Remove grub_keyboard_controller_init() call.
4039         Migrate input terminals to new API:
4041         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4042         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4043         i386-specific anyway).
4044         (grub_console_checkkey): Rename to ...
4045         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4046         users.
4047         (grub_keyboard_controller_orig): New variable.
4048         (grub_console_getkey): Rename to ...
4049         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4050         users.
4051         (grub_keyboard_controller_init): Static-ize.  Save original
4052         controller value so that it can be restored ...
4053         (grub_keyboard_controller_fini): ... here (new function).
4054         (grub_at_keyboard_term): New structure.
4055         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4056         functions.
4058         Migrate output terminals to new API:
4060         * term/i386/pc/vga.c (grub_vga_term): Change type to
4061         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4062         members.  Update all users.
4063         * term/gfxterm.c (grub_video_term): Change type to
4064         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4065         members.  Update all users.
4066         * include/grub/i386/pc/console.h (grub_console_checkkey)
4067         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4068         etc).
4070         Migrate `terminal' command and userland tools to new API:
4072         * commands/terminal.c (grub_cmd_terminal): Split into ...
4073         (grub_cmd_terminal_input): ... this, and ...
4074         (grub_cmd_terminal_output): ... this.
4075         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4076         `terminal_input' and `terminal_output'.
4077         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4078         `terminal_input' / `terminal_output' API.
4079         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4080         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4081         provided ${GRUB_TERMINAL}, convert it).
4083 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4085         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4086         for FreeBSD.
4087         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4089 2008-11-03  Bean  <bean123ch@gmail.com>
4091         * kern/elf.c (grub_elf32_load): Revert to previous code.
4092         (grub_elf64_load): Likewise.
4094         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4096 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4098         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4099         (TARGET_CPPFLAGS): Likewise.
4100         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4102 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4104         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4106 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4108         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4109         addition of objects until the code is not going to be able to fail.
4111 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4113         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4114         (add a missing NULL check, and correct them by moving the pointer
4115         operations after the actual check).
4117 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4119         * util/i386/pc/grub-install.in: Handle empty string as output from
4120         make_system_path_relative_to_its_root().
4122 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4124         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4125         circular metadata worst case scenario. If the metadata is circular
4126         then copy the wrap in place.
4127         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4128         project lib/format_text/layout.h
4129         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4131 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4133         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4135 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4137         * util/update-grub_lib.in: Mention filename in warning message.
4139 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4141         * NEWS: Update for rename of update-grub to grub-mkconfig.
4143 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4145         * util/update-grub_lib.in: Copy to ...
4146         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4147         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4148         * util/update-grub.in: Rename to ...
4149         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4150         option. Add `--output' option to allow users to specify the generated
4151         configuration file.  Default to stdout.
4152         (update_grub_dir): Rename to ...
4153         (grub_mkconfig_dir): ... this.
4154         (grub_cfg): Default to an empty string.
4155         * conf/common.rmk (update-grub): Rename to ...
4156         (grub-mkconfig): ... this.
4157         (update-grub_lib): Copy to ...
4158         (grub-mkconfig_lib): ... this.
4159         (update-grub_SCRIPTS): Copy to ...
4160         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4161         (update-grub_DATA): Rename to ...
4162         (grub-mkconfig_DATA): ... this.
4164 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4166         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4167         to `modified'.  Add the real `created' field.
4168         (grub_iso9660_uuid): Use `modified' rather than `created' for
4169         constructing the UUID.
4171 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4173         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4174         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4176 2008-09-28  Bean  <bean123ch@gmail.com>
4178         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4179         Thanks to Christian Franke for finding this bug.
4181 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4183         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4184         instances of grub_util_get_disk_name() (see previous commit).
4186 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4188         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4189         `util/i386/get_disk_name.c'.
4190         * conf/i386-efi.rmk: Likewise.
4191         * conf/x86_64-efi.rmk: Likewise.
4192         * conf/i386-coreboot.rmk: Likewise.
4193         * conf/i386-ieee1275.rmk: Likewise.
4194         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4195         `util/ieee1275/get_disk_name.c'.
4196         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4197         * util/ieee1275/get_disk_name.c: Remove file.
4198         * util/i386/get_disk_name.c: Remove file.
4199         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4200         "hd%d" for device.map entries, rather than using
4201         grub_util_get_disk_name().
4203 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4205         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4206         warning.
4207         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4209 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4211         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4212         Changed to 0x5100.
4213         (GRUB_TERM_PPAGE): Changed to 0x4900.
4215 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4217         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4218         macros (they were i386-pc specific).
4219         * include/grub/sparc64/ieee1275/console.h: Likewise.
4220         * include/grub/efi/console.h: Likewise.
4222 2008-09-22  Bean  <bean123ch@gmail.com>
4224         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4225         resident and in attribute list.
4227         * include/grub/ntfs.h (BMP_LEN): Removed.
4229 2008-09-22  Bean  <bean123ch@gmail.com>
4231         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4232         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4234         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4235         error occurs, as grub_disk_open will call grub_disk_close, which will
4236         call p->close (scsi).
4238 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4240         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4241         (AC_PREREQ): Bumped to 2.59.
4242         (AC_TRY_COMPILE): Replace obsolete macro with ...
4243         (AC_COMPILE_IFELSE): ... this.
4244         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4245         (AC_LINK_IFELSE): ... this.
4247 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4249         * autogen.sh: Add a call to `gendistlist.sh'.
4251 2008-09-19  Christian Franke  <franke@computer.org>
4253         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4254         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4255         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4256         Export __enable_execute_stack() to modules.
4257         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4258         New function.
4260 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4262         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4263         Sort the list.
4265 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4267         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4268         #include <grub/util/hostdisk.h>.
4270 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4272         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4273         segments when their filesz is zero (grub_file_read() interprets
4274         zero-size as "read until EOF", which results in memory corruption).
4275         Use `lowest_segment' rather than 0 for calculating the current
4276         segment load address.
4278 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4280         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4281         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4282         clobbered useful information.
4284 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4286         * include/grub/util/biosdisk.h: Move to ...
4287         * include/grub/util/hostdisk.h: ... here.  Update all users.
4288         * util/biosdisk.c: Move to ...
4289         * util/hostdisk.c: ... here.  Update all users.
4291 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4293         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4294         variables.
4295         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4296         and length can be stored directly in the `mbi->mmap_addr' and
4297         `mbi->mmap_length' struct fields.
4299 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4301         * conf/i386.rmk: New file.  Provides declaration for building
4302         `cpuid.mod'.
4303         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4304         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4305         variables.
4306         Include `conf/i386.mk'.
4307         * conf/i386-efi.rmk: Likewise.
4308         * conf/x86_64-efi.rmk: Likewise.
4309         * conf/i386-coreboot.rmk: Likewise.
4310         * conf/i386-ieee1275.rmk: Likewise.
4312 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4314         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4315         Adds optimization support for BGR based modes.
4317         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4318         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4319         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4320         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4321         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4322         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4323         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4324         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4325         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4326         (grub_video_i386_vbeblit_index_index): Likewise.
4327         (grub_video_i386_vbeblit_replace_directN): Added.
4328         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4329         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4330         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4331         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4332         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4333         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4334         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4335         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4336         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4337         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4338         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4339         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4340         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4342         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4343         (grub_video_i386_vbefill_R8G8B8): Likewise.
4344         (grub_video_i386_vbefill_index): Likewise.
4345         (grub_video_i386_vbefill_direct32): Added.
4346         (grub_video_i386_vbefill_direct24): Likewise.
4347         (grub_video_i386_vbefill_direct16): Likewise.
4348         (grub_video_i386_vbefill_direct8): Likewise.
4350         * include/grub/video.h (grub_video_blit_format): Removed
4351         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4352         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4353         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4354         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4355         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4357         * video/video.c (grub_video_get_blit_format): Updated to use new
4358         blit formats.  Added handling for 16 bit color modes.
4360         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4361         fillers.
4362         (common_blitter): Updated to use new blitters.
4364         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4365         Removed.
4366         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4367         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4368         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4369         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4370         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4371         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4372         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4373         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4374         (grub_video_i386_vbeblit_index_index): Likewise.
4375         (grub_video_i386_vbeblit_replace_directN): Added.
4376         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4377         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4378         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4379         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4380         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4381         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4382         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4383         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4384         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4385         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4386         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4387         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4388         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4390         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4391         (grub_video_i386_vbefill_R8G8B8): Likewise.
4392         (grub_video_i386_vbefill_index): Likewise.
4393         (grub_video_i386_vbefill_direct32): Added.
4394         (grub_video_i386_vbefill_direct24): Likewise.
4395         (grub_video_i386_vbefill_direct16): Likewise.
4396         (grub_video_i386_vbefill_direct8): Likewise.
4398         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4399         types.
4401         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4402         types.
4404         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4405         blitter types.
4407         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4408         types.
4410 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4412         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4413         RAID level 1.
4415 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4417         * fs/iso9660.c (grub_iso9660_date): New structure.
4418         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4419         (grub_iso9660_uuid): New function.
4421 2008-09-05  Bean  <bean123ch@gmail.com>
4423         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4425         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4426         insensitive bit for names in Win32 and Win32 & DOS namespace.
4428         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4430         * include/grub/types.h (LONG_MAX): Likewise.
4432 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4434         * util/getroot.c: Include <config.h>.
4435         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4436         add support for /dev/md/N devices and handle LVM double dash escaping.
4438 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4440         * config.guess: Update to latest version from config git.
4441         * config.sub: Likewise.
4443 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4445         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4446         `disk->total_sectors'.
4448 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4450         * include/grub/normal.h: Fixed incorrect comment for
4451         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4453 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4455         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4456         values with defines.
4458         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4459         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4460         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4461         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4462         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4463         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4464         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4465         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4466         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4467         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4468         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4469         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4470         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4471         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4472         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4473         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4474         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4475         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4476         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4478 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4480         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4481         declaration.
4482         (grub_multiboot): Fix a few warnings.
4484 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4486         * loader/i386/pc/multiboot.c: Update comment not to say that
4487         boot_device support is unimplemented.
4489 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4491         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4492         or memory map support are unimplemented.
4494 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4496         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4498 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4500         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4501         total video memory in 'vbeinfo' output; show color format details for
4502         each video mode.
4504 2008-08-30  Pavel Roskin  <proski@gnu.org>
4506         * util/genmoddep.c: Remove for real this time.
4507         * DISTLIST: Remove util/genmoddep.c.
4509 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4511         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4512         as required by Multiboot spec (it was already 4-byte aligned, but
4513         only by chance).
4515 2008-08-29  Pavel Roskin  <proski@gnu.org>
4517         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4518         * kern/powerpc/ieee1275/startup.S: ... this.
4519         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4520         * DISTLIST: Likewise.
4522         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4523         grub/cpu/kernel.h.  Add start label for consistency with other
4524         platforms.  Add grub_prefix immediately after start.  Add jump
4525         to the code after grub_prefix.
4526         * include/grub/powerpc/kernel.h: Provide valid values for
4527         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4529 2008-08-29  Bean  <bean123ch@gmail.com>
4531         * configure.ac: Change host_os to cygwin for mingw.
4532         (asprintf): New check for function.
4534         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4535         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4537         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4538         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4539         sync, sleep and grub_util_get_disk_size for mingw.
4541         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4542         to get size in mingw.
4543         (open_device): Use flag O_BINARY if it's defined.
4544         (find_root_device): Add dummy code for mingw.
4546         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4547         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4548         (get_scsi_disk_name): Return 0 for mingw.
4550         * util/hostfs.c: #include <grub/util/misc.h>.
4551         (grub_hostfs_open): Use "rb" flag to open file, use
4552         grub_util_get_disk_size to get disk size for mingw.
4554         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4555         (asprintf): New function if HAVE_ASPRINTF is not set.
4556         (sync): New function for mingw.
4557         (sleep): Likewise.
4558         (grub_util_get_disk_size): Likewise.
4560 2008-08-28  Pavel Roskin  <proski@gnu.org>
4562         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4563         kern/time.c.
4565 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4567         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4569 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4571         Change find_grub_drive() syntax so it doesn't prevent it from
4572         detecting NULL names as errors.
4574         * util/biosdisk.c (find_grub_drive): Move free slot search code
4575         from here ...
4576         (find_free_slot): ... to here.
4577         (read_device_map): Use find_free_slot() to search for free slots.
4579 2008-08-27  Marco Gerards  <marco@gnu.org>
4581         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4582         (scsi_mod_SOURCES): New variable.
4583         (scsi_mod_CFLAGS): Likewise
4584         (scsi_mod_LDFLAGS): Likewise.
4586         * disk/scsi.c: New file.
4588         * include/grub/scsi.h: Likewise.
4590         * include/grub/scsicmd.h: Likewise.
4592         * disk/ata.c: Include <grub/scsi.h>.
4593         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4594         instead.
4595         (grub_ata_iterate): Skip ATAPI devices.
4596         (grub_ata_open): Only handle ATAPI devices.
4597         (struct grub_atapi_read): Removed.
4598         (grub_atapi_readsector): Likewise.
4599         (grub_ata_read): No longer handle ATAPI devices.
4600         (grub_ata_write): Likewise.
4601         (grub_atapi_iterate): New function.
4602         (grub_atapi_read): Likewise.
4603         (grub_atapi_write): Likewise.
4604         (grub_atapi_open): Likewise.
4605         (grub_atapi_close): Likewise.
4606         (grub_atapi_dev): New variable.
4607         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4608         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4610         * include/grub/disk.h (enum grub_disk_dev_id): Add
4611         `GRUB_DISK_DEVICE_SCSI_ID'.
4613 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4615         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4616         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4617         descriptive.
4619 2008-08-23  Bean  <bean123ch@gmail.com>
4621         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4622         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4623         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4624         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4625         dm_nv.mod.
4626         (raid5rec_mod_SOURCES): New macro.
4627         (raid5rec_mod_CFLAGS): Likewise.
4628         (raid5rec_mod_LDFLAGS): Likewise.
4629         (raid6rec_mod_SOURCES): Likewise.
4630         (raid6rec_mod_CFLAGS): Likewise.
4631         (raid6rec_mod_LDFLAGS): Likewise.
4632         (mdraid_mod_SOURCES): Likewise.
4633         (mdraid_mod_CFLAGS): Likewise.
4634         (mdraid_mod_LDFLAGS): Likewise.
4635         (dm_nv_mod_SOURCES): Likewise.
4636         (dm_nv_mod_CFLAGS): Likewise.
4637         (dm_nv_mod_LDFLAGS): Likewise.
4639         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4640         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4641         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4643         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4644         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4646         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4648         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4650         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4652         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4654         * disk/raid5_recover.c: New file.
4656         * disk/raid6_recover.c: Likewise.
4658         * disk/mdraid_linux.c: Likewise.
4660         * disk/dmraid_nvidia.c: Likewise.
4662         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4663         ULONG_MAX.
4665         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4666         calculate the size of raid device.
4667         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4668         different layout of raid5.
4669         (grub_raid_scan_device): Remove code specific to mdraid.
4670         (grub_raid_list): New variable.
4671         (free_array): New function.
4672         (grub_raid_register): Likewise.
4673         (grub_raid_unregister): Likewise.
4674         (grub_raid_rescan): Likewise.
4675         (GRUB_MOD_INIT): Don't iterate device here.
4676         (GRUB_MOD_FINI): Use free_array to release resource.
4678         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4679         (grub_raid5_recover_func_t): New function variable type.
4680         (grub_raid6_recover_func_t): Likewise.
4681         (grub_raid5_recover_func): New variable.
4682         (grub_raid6_recover_func): Likewise.
4683         (grub_raid_register): New function.
4684         (grub_raid_unregister): Likewise.
4685         (grub_raid_rescan): Likewise.
4686         (grub_raid_block_xor): Likewise.
4688         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4689         (CMD_CRC): New macro.
4690         (part): Removed.
4691         (read_file): Handle device as well as file.
4692         (cmd_crc): New function.
4693         (fstest): Handle multiple disks.
4694         (options): Remove part, raw and long, add root and diskcount.
4695         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4696         (main): Find the first non option entry and ignore subsequent options,
4697         add handling for the new options, support multiple disks.
4699         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4701 2008-08-23  Bean  <bean123ch@gmail.com>
4703         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4705         * genfslist.sh: Ignore kernel.mod.
4707         * genpartmaplist.sh: Likewise.
4709 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4711         * util/getroot.c (find_root_device): Skip anything that starts with
4712         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4714 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4716         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4717         * util/grub.d/00_header.in: Allow the administrator to change default
4718         gfxmode via ${GRUB_GFXMODE}.
4720 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4722         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4724 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4726         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4727         loader.
4728         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4729         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4731 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4733         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4734         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4736 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4738         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4739         (struct grub_virtual_screen): Remove `cursor_color'.
4740         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4741         initialization.
4742         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4744 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4746         Unify (identical) linux_normal.c files.
4747         * loader/i386/efi/linux_normal.c: Move from here ...
4748         * loader/linux_normal.c: ... to here.  Update all users.
4749         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4750         * loader/i386/ieee1275/linux_normal.c: Likewise.
4752 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4754         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4755         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4756         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4757         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4758         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4759         New macros.
4760         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4761         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4762         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4763         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4764         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4765         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4766         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4767         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4768         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4769         portably using grub_getxy().
4770         Replace `-EFI' with `-bzImage' in boot message.
4772 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4774         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4776 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4778         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4780         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4781         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4782         (grub_machine_mmap_iterate): New function declaration.
4783         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4784         structure.
4785         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4786         macros.
4788         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4789         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4790         Move e820 parsing from here ...
4791         * kern/i386/pc/mmap.c: New file.
4792         (grub_machine_mmap_iterate): ... to here.
4794         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4795         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4796         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4797         (grub_available_iterate): Redeclare to return `void', and redeclare
4798         its hook to use grub_uint64_t as addr and size parameters, and rename
4799         to ...
4800         (grub_machine_mmap_iterate): ... this.  Update all users.
4802         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4803         to make it more readable.  Rename to ...
4804         (grub_machine_mmap_iterate): ... this.
4806         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4807         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4808         (grub_multiboot): Allocate an extra region after the payload, and fill
4809         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4810         with the extra space.
4811         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4812         with the extra space.
4814 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4816         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4818 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4820         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4821         mdate-sh to the list `find' searches for.
4822         * DISTLIST: Regenerated.
4824 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4826         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4827         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4828         genmoddep.awk, gensymlist.sh.in.
4829         (DISTDIRS): Add bus, docs, hook, lib.
4830         * DISTLIST: Regenerated.
4831         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4833 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4835         * disk/raid.c (grub_raid_init): Handle/report errors set by
4836         grub_device_iterate().
4837         * disk/lvm.c (grub_lvm_init): Likewise.
4839 2008-08-15  Bean  <bean123ch@gmail.com>
4841         * conf/i386-pc.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-coreboot.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-ieee1275.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/i386-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         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4890         and datehook.mod.
4891         (datetime_mod_SOURCES): New macro.
4892         (datetime_mod_CFLAGS): Likewise.
4893         (datetime_mod_LDFLAGS): Likewise.
4894         (date_mod_SOURCES): Likewise.
4895         (date_mod_CFLAGS): Likewise.
4896         (date_mod_LDFLAGS): Likewise.
4897         (datehook_mod_SOURCES): Likewise.
4898         (datehook_mod_CFLAGS): Likewise.
4899         (datehook_mod_LDFLAGS): Likewise.
4901         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4903         * commands/date.c: New file.
4905         * hook/datehook.c: Likewise.
4907         * include/grub/lib/datetime.h: Likewise.
4909         * include/grub/i386/cmos.h: Likewise.
4911         * lib/datetime.c: Likewise.
4913         * lib/i386/datetime.c: Likewise.
4915         * lib/efi/datetime.c: Likewise.
4917 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4919         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4920         (grub_mkelfimage_SOURCES): New variable.
4921         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4923         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4924         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4925         * conf/powerpc-ieee1275.rmk: Likewise.
4926         * conf/i386-ieee1275.rmk: Likewise.
4928         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4929         * kern/i386/coreboot/init.c: Likewise.
4931         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4932         with `<grub/cpu/kernel.h>'.
4933         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4934         to ...
4935         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4936         * kern/i386/coreboot/startup.S: Likewise.
4938         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4939         (GRUB_MOD_GAP): Remove.
4940         * include/grub/powerpc/kernel.h: New file.
4941         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4942         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4943         * include/grub/i386/kernel.h: New file.
4944         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4945         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4946         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4948         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4949         `grub-mkelfimage'.
4950         Use --directory when invoking grub_mkimage.
4952         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4953         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4954         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4955         and GRUB_KERNEL_CPU_PREFIX.
4957 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4959         * include/grub/err.h (grub_err_printf): New function prototype.
4960         * util/misc.c (grub_err_printf): New function.
4961         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4962         grub_printf.
4963         * kern/err.c (grub_print_error): Use grub_err_printf.
4965 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4967         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4969 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4971         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4972         boot entry.
4974 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4976         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4977         of the relocation code from here ...
4978         (grub_multiboot): ... to here.
4979         (forward_relocator, backward_relocator): Move from here ...
4980         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4981         (grub_multiboot_backward_relocator): ... to here.
4982         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4983         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4984         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4985         (grub_multiboot_forward_relocator_end)
4986         (grub_multiboot_backward_relocator)
4987         (grub_multiboot_backward_relocator_end): New variables.
4989 2008-08-12  Bean  <bean123ch@gmail.com>
4991         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4993 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4995         * kern/i386/linuxbios/startup.S: Move from here ...
4996         * kern/i386/coreboot/startup.S: ... to here.
4998         * kern/i386/linuxbios/init.c: Move from here ...
4999         * kern/i386/coreboot/init.c: ... to here.
5001         * kern/i386/linuxbios/table.c: Move from here ...
5002         * kern/i386/coreboot/mmap.c: ... to here.
5004         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5006 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5008         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5009         errors.  Leave it to the upper layer to handle them.
5011 2008-08-09  Christian Franke  <franke@computer.org>
5013         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5014         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5015         Install `grub.d/10_windows' only on Cygwin.
5016         * configure.ac: Add subst of `target_os'.
5017         Check `target_os' also before setting TARGET_OBJ2ELF.
5018         Add `--enable-grub-pe2elf'.
5020 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5022         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5023         (grub_last_time): Change type to grub_uint64_t.
5024         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5025         (grub_disk_close): Likewise.
5027         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5028         (run_menu): Migrate code from to using grub_get_time_ms().
5030         * util/misc.c (grub_get_time_ms): New function.
5032 2008-08-08  Marco Gerards  <marco@gnu.org>
5034         * disk/ata.c (grub_ata_regget): Change return type to
5035         `grub_uint8_t'.
5036         (grub_ata_regget2): Likewise.
5037         (grub_ata_wait_status): New function.
5038         (grub_ata_wait_busy): Removed function, updated all users to use
5039         `grub_ata_wait_status'.
5040         (grub_ata_wait_drq): Likewise.
5041         (grub_ata_cmd): New function.
5042         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5043         error handling.
5044         (grub_ata_pio_write): Add error handling.
5045         (grub_atapi_identify): Likewise.
5046         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5047         handling.
5048         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5049         handling.  Actually use the detected registers.  Reorder the
5050         detection logic such that it is easier to read.
5051         (grub_ata_pciinit): Do not assign the same ID to each controller.
5052         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5053         handling.
5054         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5056         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5058 2008-08-08  Marco Gerards  <marco@gnu.org>
5060         * NEWS: Update.
5062 2008-08-07  Bean  <bean123ch@gmail.com>
5064         * include/grub/x86_64/pci.h: New file.
5066 2008-08-07  Christian Franke  <franke@computer.org>
5068         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5069         (TIMER2_GATE): Likewise.
5070         (grub_pit_wait): Add enable/disable of the timer2 gate
5071         bit of port 0x61.  This fixes a possible infinite loop.
5073 2008-08-07  Bean  <bean123ch@gmail.com>
5075         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5076         kern/i386/tsc.c and kern/i386/pit.c.
5078         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5079         x86_64 platform.
5081         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5082         <grub/i386/tsc.h>.
5084         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5086 2008-08-07  Bean  <bean123ch@gmail.com>
5088         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5090         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5092         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5093         multiple inclusion. Add #include <grub/types.h>.
5095 2008-08-06  Christian Franke  <franke@computer.org>
5097         * conf/common.rmk: Build and install `10_windows'.
5098         * util/grub.d/10_windows.in: New script.
5100 2008-08-06  Pavel Roskin  <proski@gnu.org>
5102         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5104 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5106         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5107         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5109 2008-08-06  Bean  <bean123ch@gmail.com>
5111         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5112         (grub_pxefs_fs_int): Remove dummy definition.
5113         (grub_pxefs_open): Use data->block_size to store the current block
5114         size setting.
5115         (grub_pxefs_read): Use block size stored in data->block_size. As the
5116         value of grub_pxe_blksize can be changed after the file is opened.
5118 2008-08-06  Bean  <bean123ch@gmail.com>
5120         * fs/i386/pc/pxe.c (curr_file): new variable.
5121         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5122         require the dummy internal file system anymore.
5123         (grub_pxefs_read): Removed.
5124         (grub_pxefs_close): Likewise.
5125         (grub_pxefs_fs_int): Likewise.
5126         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5127         connection when we switch file.
5128         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5130 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5132         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5133         `halt.mod'.
5134         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5135         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5137         * kern/i386/halt.c: New file.
5138         * kern/i386/reboot.c: Likewise.
5139         * include/grub/i386/reboot.h: Likewise.
5140         * include/grub/i386/halt.h: Likewise.
5142         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5143         Include `<grub/cpu/halt.h>'.
5144         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5145         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5147         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5148         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5149         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5150         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5151         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5152         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5153         from here ...
5154         * include/grub/i386/at_keyboard.h: ... to here.
5156 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5158         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5159         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5160         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5161         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5162         `kern/generic/millisleep.c'.
5164         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5165         instead of grub_get_rtc().
5166         (grub_tsc_init): Initialize `tsc_boot_time'.
5168         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5169         (grub_machine_init): Use grub_tsc_init() rather than
5170         installing an RTC-based handler via grub_install_get_time_ms().
5172         * kern/i386/pit.c: New file.
5173         * include/grub/i386/pit.h: Likewise.
5175 2008-08-05  Bean  <bean123ch@gmail.com>
5177         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5179         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5180         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5181         (pxe_mod_SOURCES): New macro.
5182         (pxe_mod_CFLAGS): Likewise.
5183         (pxe_mod_LDFLAGS): Likewise.
5184         (pxecmd_mod_SOURCES): Likewise.
5185         (pxecmd_mod_CFLAGS): Likewise.
5186         (pxecmd_mod_LDFLAGS): Likewise.
5188         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5189         (grub_pxe_call): Likewise.
5191         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5193         * commands/i386/pc/pxecmd.c: New file.
5195         * fs/i386/pc/pxe.c: Likewise.
5197         * include/grub/i386/pc/pxe.h: Likewise.
5199 2008-08-05  Bean  <bean123ch@gmail.com>
5201         * util/console.c (grub_console_cur_color): New variable.
5202         (grub_console_standard_color): Likewise.
5203         (grub_console_normal_color): Likewise.
5204         (grub_console_highlight_color): Likewise.
5205         (color_map): Likewise.
5206         (use_color): Likewise.
5207         (NUM_COLORS): New macro.
5208         (grub_ncurses_setcolorstate): Handle color properly.
5209         (grub_ncurses_setcolor): Don't change color here, just remember the
5210         settings, color will be set in grub_ncurses_setcolorstate.
5211         (grub_ncurses_getcolor): New function.
5212         (grub_ncurses_init): Initialize color pairs.
5213         (grub_ncurses_term): New member grub_ncurses_getcolor.
5215 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5217         High resolution timer support.  Implemented for x86 CPUs using TSC.
5218         Extracted generic grub_millisleep() so it's linked in only as needed.
5219         This requires a Pentium compatible CPU; if the RDTSC instruction is
5220         not supported, then it falls back on the generic grub_get_time_ms()
5221         implementation that uses the machine's RTC.
5223         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5224         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5225         `kern/generic/millisleep.c'.
5227         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5228         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5230         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5231         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5233         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5235         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5236         `kern/generic/millisleep.c'.
5238         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5240         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5242         * kern/generic/rtc_get_time_ms.c: New file.
5244         * kern/generic/millisleep.c: New file.
5246         * kern/misc.c: Don't include
5247         <kern/time.h> anymore.
5248         (grub_millisleep_generic): Removed.
5250         * commands/sleep.c (grub_interruptible_millisleep): Uses
5251         grub_get_time_ms() instead of grub_get_rtc().
5253         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5254         function.
5255         (grub_cpu_is_cpuid_supported): New inline function.
5256         (grub_cpu_is_tsc_supported): New inline function.
5257         (grub_tsc_init): New function prototype.
5258         (grub_tsc_get_time_ms): New function prototype.
5260         * kern/i386/tsc.c (grub_get_time_ms): New file.
5262         * include/grub/time.h: Include <grub/types.h.
5263         (grub_millisleep_generic): Removed.
5264         (grub_get_time_ms): New prototype.
5265         (grub_install_get_time_ms): New prototype.
5266         (grub_rtc_get_time_ms): New prototype.
5268         * kern/time.c (grub_get_time_ms): New function.
5269         (grub_install_get_time_ms): New function.
5271         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5272         <grub/time.h> anymore.
5273         (grub_millisleep): Removed.
5274         (grub_machine_init): Call grub_tsc_init.
5276         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5277         get_time_ms() implementation.
5279         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5280         (ieee1275_get_time_ms): New function.
5281         (grub_machine_init): Install get_time_ms() implementation.
5283         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5284         (grub_machine_init): Call grub_tsc_init().
5285         (grub_millisleep): Removed.
5287         * kern/ieee1275/init.c (grub_millisleep): Removed.
5288         (grub_machine_init): Install ieee1275_get_time_ms()
5289         implementation.
5290         (ieee1275_get_time_ms): New function.
5291         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5292         real work.
5294 2008-08-05  Marco Gerards  <marco@gnu.org>
5296         * disk/ata.c: Include <grub/pci.h>.
5297         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5298         (grub_ata_initialize): Rewritten.
5299         (grub_ata_device_initialize): New function.
5301 2008-08-04  Pavel Roskin  <proski@gnu.org>
5303         * kern/main.c: Include grub/mm.h.
5305 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5307         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5308         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5309         corruption problem).
5311 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5313         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5314         warnings introduced in my last commit.
5316 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5318         Make PCI available on all i386 architectures.
5320         * include/grub/i386/pc/pci.h: Move from here ...
5321         * include/grub/i386/pci.h: ... to here.
5323         * include/grub/i386/pc/pci.h: Remove.
5324         * include/grub/i386/efi/pci.h: Remove.
5325         * include/grub/x86_64/efi/pci.h: Remove.
5327         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5328         `<grub/cpu/pci.h>'.
5330         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5331         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5332         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5334         * conf/i386-ieee1275.rmk: Likewise.
5336 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5338         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5339         (grub_console_setcursor): Make it possible to set cursor off.
5341 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5343         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5344         of modules instead of assuming which platform provides what.
5345         * util/update-grub.in: Likewise.
5347 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5349         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5350         instead of `grub_install_dos_part' to determine whether a drive needs
5351         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5352         because it can be overridden when loading GRUB via Multiboot).
5354 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5356         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5358 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5360         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5361         of informational grub_dprintf() calls.
5363 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5365         * disk/memdisk.c (memdisk_size): Don't initialize.
5366         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5368         * include/grub/i386/pc/kernel.h
5369         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5370         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5371         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5372         (grub_arch_memdisk_size): Remove.
5374         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5375         field (was only used to transfer a constant).  Add `type' field to
5376         support multiple module types.
5377         (grub_module_iterate): New function.
5379         * kern/device.c (grub_device_open): Do not hide error messages
5380         when grub_disk_open() fails.  Use grub_print_error() instead.
5382         * kern/i386/pc/init.c (grub_arch_modules_addr)
5383         (grub_arch_memdisk_size): Remove functions.
5384         (grub_arch_modules_addr): Return the module address in high memory
5385         (now that it isn't copied anymore).
5387         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5388         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5389         decompression routine (grub_total_module_size already includes that
5390         now).  Don't copy modules back to low memory.
5392         * kern/main.c: Include `<grub/mm.h>'.
5393         (grub_load_modules): Split out (and use) ...
5394         (grub_module_iterate): ... this function, which iterates through
5395         module objects and runs a hook.
5396         Comment out grub_mm_init_region() call, as it would cause non-ELF
5397         modules to be overwritten.
5399         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5400         the memdisk image in its own region, make it part of the module list.
5401         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5402         (main): Parse --memdisk|-m option, and pass user-provided path as
5403         parameter to generate_image().
5404         (add_segments): Pass `memdisk_path' down to load_modules().
5405         (load_modules): Embed memdisk image in module section when requested.
5406         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5407         `header.type' instead of `header.offset'.
5409         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5410         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5411         (memdisk_mod_LDFLAGS): New variables.
5412         * conf/i386-coreboot.rmk: Likewise.
5413         * conf/i386-ieee1275.rmk: Likewise.
5415 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5417         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5418         (backward_relocator): New variables.  Used to allocate and relocate
5419         the payload, respectively.
5420         (grub_multiboot_load_elf32): Load into heap instead of requested
5421         address, install the appropriate relocator code in each bound of
5422         the payload, and set the entry point such that
5423         grub_multiboot_real_boot() will jump to one of them.
5425         * kern/i386/loader.S (grub_multiboot_payload_size)
5426         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5427         (grub_multiboot_payload_entry_offset): New variables.
5428         (grub_multiboot_real_boot): Set cpu context to what the relocator
5429         expects, and jump to the relocator instead of the payload.
5431         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5432         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5433         (grub_multiboot_payload_entry_offset): Export.
5435 2008-08-01  Bean  <bean123ch@gmail.com>
5437         * normal/menu_entry.c (editor_getline): Don't return the original
5438         string as result, as it will be released by lexer once it has done
5439         using it.
5441 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5443         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5444         within menuentries, not before them.
5445         util/grub.d/10_hurd.in: Likewise.
5447 2008-08-01  Bean  <bean123ch@gmail.com>
5449         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5450         (bufio_mod_SOURCES): New macro.
5451         (bufio_mod_CFLAGS): Likewise.
5452         (bufio_mod_LDFLAGS): Likewise.
5454         * include/grub/bufio.h: New file.
5456         * io/bufio.c: Likewise.
5458         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5459         (grub_video_reader_png): Use grub_buffile_open to open file.
5461         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5462         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5464         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5465         (grub_video_reader_tga): Use grub_buffile_open to open file.
5467         * font/manager.c: Include <grub/bufio.h>.
5468         (add_font): Use grub_buffile_open to open file.
5470 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5472         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5473         ELF segments, use a macro for arbitrarily accessing any of them instead
5474         of preparing a pointer that allows access to one at a time.
5475         (grub_multiboot_load_elf64): Likewise.
5477 2008-07-31  Bean  <bean123ch@gmail.com>
5479         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5480         GRUB_KERNEL_MACHINE_DATA_END.
5482 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5484         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5485         Increase from 0x50 to 0x60.
5486         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5487         use UUIDs to identify the root drive for them.  If that's not
5488         possible, abort.
5489         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5490         check, for cross-disk installs.
5492 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5494         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5495         is non-empty, use it to set the `prefix' environment variable instead
5496         of the usual approach.
5497         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5498         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5499         environment variable instead of dummy make_install_device().
5501         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5502         (start): Insert a data section, with `grub_prefix' variable.
5503         * kern/i386/linuxbios/startup.S: Likewise.
5505         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5506         New variable reference.
5507         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5508         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5509         to `start').
5510         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5511         section within startup.S (relative to `start').
5512         * include/grub/i386/coreboot/kernel.h: Likewise.
5514         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5515         Overwrite grub_prefix with its contents, at the beginning of the
5516         first segment.
5517         (main): Understand -p|--prefix.
5519 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5521         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5523 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5525         * term/i386/pc/vga_text.c (grub_console_cls): Use
5526         grub_console_gotoxy() to go back to beginning of the screen.
5527         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5529 2008-07-29  Christian Franke  <franke@computer.org>
5531         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5532         Add conversion of emulated mount points on Cygwin.
5534 2008-07-29  Christian Franke  <franke@computer.org>
5536         * util/update-grub.in: Add a check for admin
5537         group on Cygwin.
5538         Remove old `grub.cfg.new' before creation.
5539         Add `-f' to `mv' to handle the different filesystem
5540         semantics of Windows.
5542 2008-07-29  Bean  <bean123ch@gmail.com>
5544         * normal/main.c (get_line): Fix buffer overflow bug.
5546 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5548         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5549         (struct grub_apple_header): New struct.  Describes the layout of
5550         the partmap header.
5551         (apple_partition_map_iterate): Check the header magic as well as the
5552         partition magic (which was already being checked).
5554 2008-07-28  Pavel Roskin  <proski@gnu.org>
5556         * genmk.rb: Add a warning to the beginning of the output that
5557         it's a generated file and should not be edited.
5559 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5561         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5562         with the same number are found, just use issue a warning with
5563         grub_dprintf(), as this error has been reported to be non-fatal.
5565 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5567         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5568         information.
5570 2008-07-27  Bean  <bean123ch@gmail.com>
5572         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5573         (grub_fat_find_dir): Ignore case when comparing filename.
5575 2008-07-27  Bean  <bean123ch@gmail.com>
5577         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5578         smallino, as it's more descriptive, and i8count can be confused with
5579         the other field count.
5580         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5581         inode type.
5583 2008-07-27  Bean  <bean123ch@gmail.com>
5585         * commands/crc.c: New file.
5587         * lib/crc.c: Likewise.
5589         * include/grub/lib/crc.h: Likewise.
5591         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5593         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5594         (hexdump): Move this function to ...
5596         * lib/hexdump.c: ... here.
5598         * include/grub/hexdump.h: Renamed to ...
5600         * include/grub/lib/hexdump.h: ... this.
5602         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5604         * util/grub-editenv.c: Likewise.
5606         * include/envblk.h: Renamed to ...
5608         * include/lib/envblk.h: ... this.
5610         * util/envblk.c: Renamed to ...
5612         * lib/envblk.c: ... this.
5614         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5615         lib/hexdump.c.
5616         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5617         (pkglib_MODULES): Add crc.mod.
5618         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5619         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5620         (crc_mod_SOURCES): New macro.
5621         (crc_mod_CFLAGS): Likewise.
5622         (crc_mod_LDFLAGS): Likewise.
5624         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5626         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5628         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5630         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5632         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5634 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5636         * commands/help.c: Include <grub/term.h>.
5637         (TERM_WIDTH): Removed.  Updated all users.
5639 2008-07-27  Pavel Roskin  <proski@gnu.org>
5641         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5642         spurious warnings about a comment within a comment.
5644 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5646         * util/getroot.c (find_root_device): Skip devices that match
5647         /dev/dm-[0-9].  This lets the real device be found for any type of
5648         abstraction (LVM, EVMS, RAID..).
5649         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5650         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5651         device is found first, find_root_device() will now skip it.
5653 2008-07-24  Pavel Roskin  <proski@gnu.org>
5655         * include/grub/types.h: Use __builtin_bswap32() and
5656         __builtin_bswap64() with gcc 4.3 and newer.
5658 2008-07-24  Christian Franke  <franke@computer.org>
5660         * util/i386/pc/grub-install.in: If `--debug' is specified,
5661         pass `--verbose' to grub-setup.
5662         Abort script if make_system_path_relative_to_its_root() fails.
5664 2008-07-24  Bean  <bean123ch@gmail.com>
5666         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5667         variable `target_platform' should be `platform'.
5669 2008-07-24  Bean  <bean123ch@gmail.com>
5671         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5672         (grub_png_init_fixed_block): New function.
5673         (grub_png_decode_image_data): Handle fixed huffman code compression.
5675 2008-07-24  Bean  <bean123ch@gmail.com>
5677         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5678         (grub_pe2elf_SOURCES): New macro.
5679         (CLEANFILES): Add grub-pe2elf.
5681         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5682         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5683         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5684         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5685         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5686         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5687         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5688         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5689         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5690         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5691         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5692         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5693         (GRUB_PE32_DT_FUNCTION): Likewise.
5694         (GRUB_PE32_REL_I386_DIR32): Likewise.
5695         (GRUB_PE32_REL_I386_REL32): Likewise.
5696         (grub_pe32_symbol): New structure.
5697         (grub_pe32_reloc): Likewise.
5699         * util/grub-pe2elf.c: New file.
5701         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5702         start symbol in non pc platform.
5704         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5706         The following patches are from Christian Franke.
5708         * include/grub/dl.h: Remove .previous, gas supports this only
5709         for ELF format.
5711         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5712         Remove .type, gas supports this only for ELF format.
5714         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5715         nullbytes in symbol table. This fixes an infinite loop if table is
5716         zero filled.
5718         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5719         TARGET_IMG_LDFLAGS and EXEEXT.
5721         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5722         TARGET_IMG_LDFLAGS_AC.
5723         (grub_CHECK_STACK_ARG_PROBE): New function.
5725         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5727         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5729         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5730         to set TARGET_IMG_LD* accordingly.
5731         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5732         Add call to grub_CHECK_STACK_ARG_PROBE.
5733         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5735         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5737         * genmk.rb: Add EXEEXT to CLEANFILES.
5739 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5741         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5742         define the codes for arrows and lines used for the menu).
5743         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5744         as well.
5746         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5747         fonts, because the latter are too slow.
5749 2008-07-21  Bean  <bean123ch@gmail.com>
5751         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5752         a20. Run keyboard test last, as it will cause macbook to halt.
5754 2008-07-18  Pavel Roskin  <proski@gnu.org>
5756         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5757         load foreign architecture modules correctly anyway.  Keep
5758         support for loading host architecture modules, whether we
5759         compile them or not.
5761 2008-07-17  Pavel Roskin  <proski@gnu.org>
5763         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5764         change target_cpu.  The compiler default can mismatch target_cpu
5765         in any case.
5767         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5768         * kern/efi/efi.c: Likewise.
5770         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5771         target compiler is functional.
5772         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5773         are set up.
5775         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5776         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5777         adjustments from the rest, only do them if target is not
5778         explicitly given.  Merge other adjustments with the final sanity
5779         check.  Remove an extraneous check for supported CPU.  Be
5780         specific which CPU and which platform is not supported.
5782         * configure.ac: Default to pc platform for x86_64.
5784 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5786         Partial LinuxBIOS -> Coreboot rename.
5788         * conf/i386-linuxbios.rmk: Renamed to ...
5789         * conf/i386-coreboot.rmk: ... this.
5790         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5791         * configure.ac: Accept "coreboot" as input platform (but maintain
5792         compatibility with "linuxbios").
5793         * include/grub/i386/linuxbios: Renamed to ...
5794         * include/grub/i386/coreboot: ... this.
5796 2008-07-17  Bean  <bean123ch@gmail.com>
5798         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5799         (appleldr_mod_SOURCE): New variable.
5800         (appleldr_mod_CFLAGS): Likewise.
5801         (appleldr_mod_LDFLAGS): Likewise.
5802         (pci_mod_SOURCES): Likewise.
5803         (pci_mod_CFLAGS): Likewise.
5804         (pci_mod_LDFLAGS): Likewise.
5805         (lspci_mod_SOURCES): Likewise.
5806         (lspci_mod_CFLAGS): Likewise.
5807         (lspci_mod_LDFLAGS): Likewise.
5809         * conf/x86_64-efi.rmk: New file.
5811         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5812         macro.
5813         (grub_efidisk_write): Likewise.
5815         * include/efi/api.h (efi_call_0): New macro.
5816         (efi_call_1): Likewise.
5817         (efi_call_2): Likewise.
5818         (efi_call_3): Likewise.
5819         (efi_call_4): Likewise.
5820         (efi_call_5): Likewise.
5821         (efi_call_6): Likewise.
5823         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5824         grub_rescue_cmd_chainloader.
5826         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5827         (grub_pe32_optional_header): Change some fields based on i386 or
5828         x86_64 platform.
5829         (GRUB_PE32_PE32_MAGIC): Likewise.
5831         * include/grub/efi/uga_draw.h: New file.
5833         * include/grub/elf.h (STN_ABS): New constant.
5834         (R_X86_64_NONE): Relocation constant for x86_64.
5835         (R_X86_64_64): Likewise.
5836         (R_X86_64_PC32): Likewise.
5837         (R_X86_64_GOT32): Likewise.
5838         (R_X86_64_PLT32): Likewise.
5839         (R_X86_64_COPY): Likewise.
5840         (R_X86_64_GLOB_DAT): Likewise.
5841         (R_X86_64_JUMP_SLOT): Likewise.
5842         (R_X86_64_RELATIVE): Likewise.
5843         (R_X86_64_GOTPCREL): Likewise.
5844         (R_X86_64_32): Likewise.
5845         (R_X86_64_32S): Likewise.
5846         (R_X86_64_16): Likewise.
5847         (R_X86_64_PC16): Likewise.
5848         (R_X86_64_8): Likewise.
5849         (R_X86_64_PC8): Likewise.
5851         * include/grub/i386/efi/pci.h: New file.
5853         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5854         Change it value based on platform.
5855         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5856         (GRUB_E820_RAM): Likewise.
5857         (GRUB_E820_RESERVED): Likewise.
5858         (GRUB_E820_ACPI): Likewise.
5859         (GRUB_E820_NVS): Likewise.
5860         (GRUB_E820_EXEC_CODE): Likewise.
5861         (GRUB_E820_MAX_ENTRY): Likewise.
5862         (grub_e820_mmap): New structure.
5863         (linux_kernel_header): Change the efi field according to different
5864         kernel version, also field from linux_kernel_header.
5866         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5868         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5869         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5870         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5871         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5872         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5873         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5874         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5875         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5876         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5877         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5879         * include/grub/x86_64/efi/kernel.h: New file.
5881         * include/grub/x86_64/efi/loader.h: Likewise.
5883         * include/grub/x86_64/efi/machine.h: Likewise.
5885         * include/grub/x86_64/efi/pci.h: Likewise.
5887         * include/grub/x86_64/efi/time.h: Likewise.
5889         * include/grub/x86_64/linux.h: Likewise.
5891         * include/grub/x86_64/setjmp.h: Likewise.
5893         * include/grub/x86_64/time.h: Likewise.
5895         * include/grub/x86_64/types.h: Likewise.
5897         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5898          GRUB_TARGET_SIZEOF_VOID_P.
5900         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5901         (grub_efi_locate_handle): Likewise.
5902         (grub_efi_open_protocol): Likewise.
5903         (grub_efi_set_text_mode): Likewise.
5904         (grub_efi_stall): Likewise.
5905         (grub_exit): Likewise.
5906         (grub_reboot): Likewise.
5907         (grub_halt): Likewise.
5908         (grub_efi_exit_boot_services): Likewise.
5909         (grub_get_rtc): Likewise.
5911         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5912         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5913         (grub_efi_allocate_pages): Wrap efi calls.
5914         (grub_efi_free_pages): Wrap efi calls.
5915         (grub_efi_get_memory_map): Wrap efi calls.
5917         * kern/x86_64/dl.c: New file.
5919         * kern/x86_64/efi/callwrap.S: Likewise.
5921         * kern/x86_64/efi/startup.S: Likewise.
5923         * loader/efi/appleloader.c: Likewise.
5925         * loader/efi/chainloader.c (cmdline): New variable.
5926         (grub_chainloader_unload): Wrap efi calls.
5927         (grub_chainloader_boot): Likewise.
5928         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5929         command line.
5931         * loader/efi/chainloader_normal.c (chainloader_command):
5932         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5933         command line.
5935         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5936         method.
5937         (grub_e820_add_region): New function.
5938         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5939         booting.
5940         (grub_find_video_card): New function.
5941         (grub_linux_setup_video): New function.
5942         (grub_rescue_cmd_linux): Probe for video information.
5944         * normal/x86_64/setjmp.S: New file.
5946         * term/efi/console.c (map_char): New function.
5947         (grub_console_putchar): Map unicode char.
5948         (grub_console_checkkey): Wrap efi calls.
5949         (grub_console_getkey): Likewise.
5950         (grub_console_getwh): Likewise.
5951         (grub_console_gotoxy): Likewise.
5952         (grub_console_cls): Likewise.
5953         (grub_console_setcolorstate): Likewise.
5954         (grub_console_setcursor): Likewise.
5956         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5958 2008-07-16  Pavel Roskin  <proski@gnu.org>
5960         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5961         format strings.
5963         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5964         pointer, not an integer.  This fixes a warning and prevents
5965         precision loss on 64-bit systems.
5966         (relocate_addresses): Remove unneeded cast.
5968 2008-07-15  Pavel Roskin  <proski@gnu.org>
5970         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5972         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5974         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5975         Fix comparison between signed and unsigned.
5977         * include/grub/i386/ieee1275/console.h: Declare
5978         grub_console_init() and grub_console_fini().
5980         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5981         It's empty and unused.
5983         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5984         beginning to avoid warnings with some compilers.
5986         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5987         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5989 2008-07-14  Pavel Roskin  <proski@gnu.org>
5991         * kern/env.c (grub_register_variable_hook): Don't copy empty
5992         string, it leaks memory.  Pass "" to grub_env_set(), it should
5993         handle constant strings.
5995         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5996         * commands/cmp.c (grub_cmd_cmp): Likewise.
5997         * kern/dl.c (grub_dl_flush_cache): Likewise.
5998         (grub_dl_load_core): Likewise.
5999         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6000         (grub_elf64_load_phdrs): Likewise.
6002 2008-07-13  Pavel Roskin  <proski@gnu.org>
6004         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6005         between signed and unsigned.
6006         (LzmaEnc_Finish): Fix warning about an unused parameter.
6008 2008-07-13  Bean  <bean123ch@gmail.com>
6010         * Makefile.in (enable_lzo): New rule.
6012         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6014         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6016         * boot/i386/pc/lnxboot.S: #include <config.h>.
6018         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6019         its value according to the compression algorithm used, lzo or lzma.
6021         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6022         compression algorithm according to configure macro.
6024         * kern/i386/pc/startup.S (codestart): Likewise.
6026         * kern/i386/pc/lzma_decode.S: New file.
6028         * include/grub/lib/LzFind.h: Likewise.
6030         * include/grub/lib/LzHash.h: Likewise.
6032         * include/grub/lib/LzmaDec.h: Likewise.
6034         * include/grub/lib/LzmaEnc.h: Likewise.
6036         * include/grub/lib/LzmaTypes.h: Likewise.
6038         * lib/LzFind.c: Likewise.
6040         * lib/LzmaDec.c: Likewise.
6042         * lib/LzmaEnc.c: Likewise.
6044 2008-07-13  Bean  <bean123ch@gmail.com>
6046         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6047         (grub_ext4_extent_header): New structure.
6048         (grub_ext4_extent): Likewise.
6049         (grub_ext4_extent_idx): Likewise.
6050         (grub_ext4_find_leaf): New function.
6051         (grub_ext2_read_block): Handle extents.
6053 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6055         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6057 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6059         * util/grub.d/40_custom.in: New file. Example on how to add custom
6060         entries to /etc/grub.d.
6061         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6062         40_custom (implicitly, by merging all the grub.d rules).
6064 2008-07-11  Pavel Roskin  <proski@gnu.org>
6066         * commands/read.c (grub_getline): Fix invalid memory access.
6067         Don't add newline to the variable value.
6069         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6070         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6071         (serial_hw_get_port): Check validity of the port number.
6072         (grub_cmd_serial): Check return value of serial_hw_get_port().
6074 2008-07-07  Pavel Roskin  <proski@gnu.org>
6076         * boot/i386/pc/diskboot.S (notification_string): Replace
6077         "Loading kernel" with just "loading".  This is shorter, less
6078         confusing and saves a few bytes for possible future changes.
6080 2008-07-05  Pavel Roskin  <proski@gnu.org>
6082         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6083         size for ATAPI devices, they are undefined.  Output sector
6084         number in decimal form.
6086         * disk/ata.c: Use named constants for status bits.
6088 2008-07-04  Pavel Roskin  <proski@gnu.org>
6090         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6091         grub_addr_t before casting it to the void pointer to fix a
6092         warning.  Non-addressable regions are discarded earlier.
6093         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6094         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6095         (check_signature): Don't shadow table_header.
6096         (grub_linuxbios_table_iterate): Cast numeric constants to
6097         grub_linuxbios_table_header_t.
6098         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6099         grub_stop().
6101         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6102         prevent warnings.
6104         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6105         pointer, which can cause warnings.  Support 64-bit addresses.
6107         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6108         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6110 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6112         This fixes a performance issue when pc & gpt partmap iterators
6113         didn't abort iteration even after our hook found what it was
6114         looking for (often causing expensive probes of non-existent drives).
6116         Some callers relied on previous buggy behaviour, since they would
6117         raise an error when their own hooks caused early abortion of its
6118         iteration.
6120         * kern/device.c (grub_device_open): Improve error message.
6121         * disk/lvm.c (grub_lvm_open): Likewise.
6122         * disk/raid.c (grub_raid_open): Likewise.
6124         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6125         when hook requests it, independently of grub_errno.
6126         (pc_partition_map_probe): Do not fail when find_func() caused
6127         early abortion of pc_partition_map_iterate().
6129         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6130         when hook requests it, independently of grub_errno.
6131         (gpt_partition_map_probe): Do not fail when find_func() caused
6132         early abortion of gpt_partition_map_iterate().
6134         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6135         when hook requests it, independently of grub_errno.  Do not fail when
6136         part_map_iterate_hook() caused early abortion of p->iterate().
6138         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6139         when grub_partition_iterate() returned with non-zero.
6141 2008-07-03  Pavel Roskin  <proski@gnu.org>
6143         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6144         like we do in grub_ata_pio_read().
6145         (grub_ata_readwrite): Always write individual sectors.  Fix the
6146         sector count for the remainder.
6147         (grub_ata_write): Enable writing to ATA devices.  Correctly
6148         report error for ATAPI devices.
6150 2008-07-02  Pavel Roskin  <proski@gnu.org>
6152         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6153         warning.
6155         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6156         for every read sector, we already increment it for the whole
6157         batch.  This fixes reading more than 256 sectors at once.
6159         * util/grub-editenv.c (cmd_info): Cast argument to long
6160         explicitly.  ptrdiff_t reduces to int on i386.
6162         * util/grub-editenv.c (main): Be specific which parameter is
6163         missing.
6165         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6166         (memdisk): Make memdisk_orig_addr a pointer.
6168         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6169         for file offsets, use grub_off_t instead.  Fix printf format
6170         warnings.
6172         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6173         there.  Real unexpected warnings should not drown in the noise
6174         about known problems.
6176         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6177         grub_disk_addr_t for memory addresses.
6179         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6180         explicitly to fix a warning.
6182         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6184         * Makefile.in (MODULE_LDFLAGS): New variable.
6185         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6186         the linker accepts --build-id=none.
6187         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6188         MODULE_LDFLAGS.
6189         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6191         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6192         those in Linux XFS code.  Provide a way to access 64-bit parent
6193         inode.
6194         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6195         the end of struct grub_xfs_dir_header.
6197 2008-07-02  Bean  <bean123ch@gmail.com>
6199         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6200         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6201         and GRUB_IEEE1275_FLAG_NO_ANSI.
6203         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6204         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6205         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6207         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6208         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6210         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6211         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6213         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6214         esc sequence on non ANSI terminal.
6215         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6217         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6218         beginning of file.
6220 2008-07-02  Bean  <bean123ch@gmail.com>
6222         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6223         (grub_editenv_SOURCES): New variable.
6224         (pkglib_MODULES): Add loadenv.mod.
6225         (loadenv_mod_SOURCES): New variable.
6226         (loadenv_mod_CFLAGS): Likewise.
6227         (loadenv_mod_LDFLAGS): Likewise.
6229         * include/grub/envblk.h: New file.
6231         * util/envblk.c: New file.
6233         * util/grub-editenv.c: New file.
6235         * commands/loadenv.c: New file.
6237 2008-07-01  Pavel Roskin  <proski@gnu.org>
6239         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6240         not unsigned char.  This fixes warnings and is consistent with
6241         other tags.
6243         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6245         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6247         * term/tparm.c (analyze): Always set *popcount.
6249         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6250         cast to fix a warning.
6252         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6253         cast to suppress a warning.
6255         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6256         grub_fshelp_read_file() expects.
6258         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6259         write uuid as a 32-bit value in CPU byte order, so declare and
6260         use it as such.
6262         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6263         long if the format specifier expects it.
6264         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6265         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6266         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6267         long to fix a warning.
6268         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6269         grub_dprintf() arguments to fix warnings.
6271 2008-06-30  Pavel Roskin  <proski@gnu.org>
6273         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6274         install_bsd_part immediately before core.img is embedded or
6275         modified on disk.  This fixes core.img verification if core.img
6276         cannot be embedded.
6278         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6279         core_path to calculate the blocklist.
6280         Patch from Javier Martín <lordhabbit@gmail.com>
6282 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6284         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6285         block to disk block.
6286         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6287         Patch from Niels Böhm <bitbucket@arcor.de>
6289 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6291         * util/update-grub_lib.in (font_path): Search for fonts in
6292         /boot/grub first, which is more likely to be readable (we aren't
6293         deciding where fonts live, just looking for them).
6295 2008-06-26  Pavel Roskin  <proski@gnu.org>
6297         * util/biosdisk.c (read_device_map): Don't leave dead map
6298         entries for devices failing stat() check.
6300         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6301         core_path_dev for the core.img path on the target device.
6303 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6305         * disk/fs_uuid.c: New file.
6306         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6307         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6308         (fs_uuid_mod_LDFLAGS): New variables.
6309         * include/grub/disk.h (grub_disk_dev_id): Add
6310         `GRUB_DISK_DEVICE_UUID_ID'.
6311         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6312         implement iterate().
6314 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6316         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6317         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6318         Linux image includes no initrd.
6320 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6322         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6323         call to resolve the core image location that effectively appended the
6324         name twice.
6326 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6328         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6329         call from here ...
6331         * util/grub.d/10_hurd.in: ... to here ...
6332         * util/grub.d/10_linux.in: ... and here.
6334 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6336         * kern/main.c (grub_main): Export `prefix' variable immediately
6337         after it has been set by grub_machine_set_prefix().
6339 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6341         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6342         search result when not saving to variable, not the other way around.
6343         When saving to variable, abort iteration as soon as a match is found.
6345 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6347         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6348         check for partition that provides /boot/grub.  Its logic is flawed,
6349         as it prevents prepare_grub_to_access_device() from being called
6350         multiple times.
6352 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6354         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6355         "insmod" command directly when abstraction modules are needed,
6356         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6357         since it had already been processed).
6359 2008-06-19  Pavel Roskin  <proski@gnu.org>
6361         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6362         changed.  This is needed in case GRUB_LIBDIR changes.
6363         * conf/i386-ieee1275.rmk: Likewise.
6364         * conf/i386-linuxbios.rmk: Likewise.
6365         * conf/i386-pc.rmk: Likewise.
6366         * conf/powerpc-ieee1275.rmk: Likewise.
6368 2008-06-18  Pavel Roskin  <proski@gnu.org>
6370         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6371         kernel_elf_symlist.c to symlist.c for consistency with other
6372         architectures.  Update all users.
6373         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6375 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6377         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6378         it in prefix.
6380         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6381         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6382         a RAID device, run setup() for all members independently on whether
6383         LVM abstraction is being used.
6384         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6385         If grub-mkimage has set `*install_dos_part == -2', don't override this
6386         value.
6387         Perform *install_dos_part adjustments independently on whether
6388         we're embedding or not.
6389         Clarify error message when image is too big for embedding.
6390         Remove duplicate *install_dos_part stanza.
6392 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6394         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6395         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6396         variables.
6397         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6398         values in grub_ofconsole_normal_color and
6399         grub_ofconsole_highlight_color (they're not directly related to
6400         background and foreground).
6401         (grub_ofconsole_setcolorstate): Extract background and foreground
6402         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6404 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6406         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6407         /boot/grub for the check in last commit, not /boot (they could be
6408         different partitions).
6410 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6412         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6413         asked to setup access for the same partition that provides /boot,
6414         don't bother using UUIDs since our root already has the value we
6415         want.
6417 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6419         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6420         I2O devices.
6421         Patch from Sven Mueller <sven@debian.org>.
6423 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6425         * util/update-grub.in: Check for $EUID instead of $UID.
6426         Reported by Vincent Zweije.
6428 2008-06-16  Bean  <bean123ch@gmail.com>
6430         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6431         (grub_ext2_read_block): Likewise.
6432         (grub_ext2_read_inode): Likewise.
6433         (grub_ext2_mount): Likewise.
6434         (grub_ext2_close): Likewise.
6435         (grub_ext3_get_journal): Removed.
6437         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6438         (grub_reiserfs_read_symlink): Likewise.
6439         (grub_reiserfs_mount): Likewise.
6440         (grub_reiserfs_open): Likewise.
6441         (grub_reiserfs_read): Likewise.
6442         (grub_reiserfs_close): Likewise.
6443         (grub_reiserfs_get_journal): Removed.
6445         * fs/fshelp.c (grub_fshelp_read): Removed.
6446         (grub_fshelp_map_block): Likewise.
6448         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6449         (grub_fshelp_journal): Likewise.
6450         (grub_fshelp_read): Likewise.
6451         (grub_fshelp_map_block): Likewise.
6453 2008-06-16  Pavel Roskin  <proski@gnu.org>
6455         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6456         floating point anymore.
6457         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6459 2008-06-15  Pavel Roskin  <proski@gnu.org>
6461         * commands/ls.c (grub_ls_list_files): Use integer calculations
6462         for human readable format, avoid floating point use.
6463         * kern/misc.c (grub_ftoa): Remove.
6464         (grub_vsprintf): Remove floating point support.
6466 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6468         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6469         devices.
6470         Reported by Max Vozeler.
6472 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6474         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6475         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6476         skipped later.
6477         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6478         the beginning of the prefix.
6480         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6481         It is assumed that if we have a memdisk, grub-mkimage has set
6482         grub_prefix to include the "(memdisk)" drive in it.
6484 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6486         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6487         Initialize keyboard controller after registering the terminal, so that
6488         grub_printf() can be called from grub_keyboard_controller_init().
6490 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6492         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6493         extent-btree which is written as big endian on disk.
6494         Reported by Alain Greppin  <al@chilibi.org>.
6496 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6498         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6499         * util/i386/pc/grub-install.in (modules): Likewise.
6501 2008-06-13  Pavel Roskin  <proski@gnu.org>
6503         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6505 2008-06-13  Bean  <bean123ch@gmail.com>
6507         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6509         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6511         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6512         to indicate sparse block.
6514 2008-06-12  Pavel Roskin  <proski@gnu.org>
6516         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6517         number, grub_fshelp_read() does it for us.
6519         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6520         linear disk read with journal translation.
6521         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6522         * include/grub/fshelp.h: Declare grub_fshelp_read().
6524 2008-06-09  Pavel Roskin  <proski@gnu.org>
6526         * fs/minix.c (grub_minix_mount): Handle error reading
6527         superblock.
6529 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6531         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6532         don't append the RAID prefix afterwards.
6533         Reported by Clint Adams.
6535 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6537         Based on description from Pavel:
6538         * kern/disk.c (grub_disk_check_range): Rename to ...
6539         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6540         tasks performed by this function.
6542 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6544         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6545         `num_serial' (for consistency with other variables).
6546         (struct grub_ntfs_data): Add `uuid' member.
6547         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6548         (grub_ntfs_uuid): New function.
6549         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6551 2008-06-07  Pavel Roskin  <proski@gnu.org>
6553         * util/biosdisk.c (open_device): Revert last change to the
6554         function, it broke installation.  The sector needs to be
6555         different dependent on which device is opened.
6557 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6559         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6560         rest of GRUB, and breakage doesn't happen if its value were modified.
6562         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6563         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6564         a constant (same value).
6565         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6566         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6568 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6570         * util/biosdisk.c (open_device): Do not modify sector offset when
6571         accessing a partition.  kern/disk.c already handles this for us.
6573 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6575         * util/grub-emu.c (grub_machine_init): Move code in this function from
6576         here ...
6577         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6578         segfault in case grub_printf() is called).
6580         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6581         grub_probe.  Update all users not to explicitly add it again.
6582         (grub_device): New variable; contains corresponding device for grubdir.
6583         (fs_module, partmap_module, devabstraction_module): Pass
6584         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6585         every time.
6587 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6589         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6590         is found, print it (same layout as with labels).
6592 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6594         * util/biosdisk.c (get_drive): Rename to ...
6595         (find_grub_drive): ... this.  Update all users.
6597         (get_os_disk): Rename to ...
6598         (convert_system_partition_to_system_disk): ... this.  Update all users.
6600         (find_drive): Rename to ...
6601         (find_system_device): ... this.  Update all users.
6603 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6605         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6606         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6607         (make_device_map): Likewise.
6609 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6611         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6612         before dereferencing it.
6614         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6615         union with fat12/fat16-specific ones.  Add some new fields, including
6616         `num_serial' for both versions.
6617         (struct grub_fat_data): Add `uuid' member.
6618         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6619         names.  Initialize `data->uuid' using `num_serial'.
6620         (grub_fat_uuid): New function.
6621         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6623         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6624         (grub_reiserfs_uuid): New function.
6625         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6626         member.
6628         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6629         (grub_xfs_uuid): New function.
6630         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6632 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6634         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6635         code that is backward compatible with pre-uuid search command.
6637 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6639         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6640         floppies after everything else, to ensure floppy drive isn't accessed
6641         unnecessarily (patch from Bean).
6643 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6645         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6646         not print device names when we were asked to set a variable.
6648 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6650         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6651         using "cursor-on" and "cursor-off" commands (understood at least by
6652         the Open Firmware flavour on OLPC).
6654 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6656         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6657         on and off sequences.
6659 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6661         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6662         * util/update-grub.in: Likewise.
6664 2008-05-30  Pavel Roskin  <proski@gnu.org>
6666         * util/biosdisk.c (linux_find_partition): Simplify logic and
6667         make the code more universal.  Keep special processing for
6668         devfs, but use a simple rule for all other devices.  If the
6669         device ends with a number, append 'p' and the partition number.
6670         Otherwise, append only the partition number.
6672 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6674         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6675         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6676         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6677         the `root' parameter to Linux.
6679 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6681         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6682         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6683         --fs_uuid with --fs-uuid.
6684         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6685         all filesystems support them).
6687 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6689         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6690         grub_printf() flags, since we're printing in units of 2 bytes.
6692 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6694         * util/grub.d/00_header.in: Remove obsolete comment referencing
6695         convert_system_path_to_grub_path().
6696         * util/update-grub.in: Likewise.
6697         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6698         (convert_system_path_to_grub_path): Add a warning message explaining
6699         that this function is deprecated.  Rely on is_path_readable_by_grub()
6700         for the readability checks.
6701         (font_path): Use is_path_readable_by_grub() for the readability
6702         check rather than convert_system_path_to_grub_path().
6704 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6706         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6707         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6708         converting it first.
6709         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6710         grub.cfg for access to font file, and afterwards call it again to set
6711         the root device.
6713 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6715         * commands/search.c (options): Add --fs_uuid option.
6716         (search_fs_uuid): New function.
6717         (grub_cmd_search): Fix --set argument passing.
6718         Use search_fs_uuid() when requested via --fs_uuid.
6719         (grub_search_init): Update help message.
6720         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6721         and redeclare it as an array of 16-bit words.
6722         (grub_ext2_uuid): New function.
6723         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6724         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6725         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6726         (GRUB_DEVICE_BOOT_UUID): New variables.
6727         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6728         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6729         whenever possible.
6730         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6731         just assume `root' variable has the right value.
6732         * util/grub.d/10_linux.in: Likewise.
6733         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6734         via PRINT_FS_UUID.
6735         (main): Recognise `-t fs_uuid' argument.
6737 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6739         * util/biosdisk.c (map): Redefine structure to hold information
6740         about GRUB drive name.
6741         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6742         drive names.
6743         (call_hook): Remove.
6744         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6745         member.  Assume drive has partitions.
6746         (grub_util_biosdisk_open): Access device names via `.device' struct
6747         member.
6748         (open_device): Likewise.
6749         (find_drive): Likewise.
6750         (read_device_map): Adjust map[] usage to match the new struct
6751         definition.  Don't check for duplicates (still possible, but not cheap
6752         anymore).
6753         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6754         (make_device_name): Remove assumption of BIOS-like drive names.
6756 2008-05-30  Pavel Roskin  <proski@gnu.org>
6758         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6759         compiling execute.c doesn't need grub_script.tab.h anymore.
6760         (normal/command.c_DEPENDENCIES): Likewise.
6761         (normal/function.c_DEPENDENCIES): Likewise.
6762         * conf/i386-ieee1275.rmk: Likewise.
6763         * conf/i386-linuxbios.rmk: Likewise.
6764         * conf/i386-pc.rmk: Likewise.
6765         * conf/powerpc-ieee1275.rmk: Likewise.
6766         * conf/sparc64-ieee1275.rmk: Likewise.
6768 2008-05-29  Pavel Roskin  <proski@gnu.org>
6770         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6771         when scanning metadata for volume group name.
6773         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6774         a generated file, which may only be included from the files with
6775         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6776         use union YYSTYPE, as the later allows forward declaration.
6777         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6779 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6781         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6782         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6783         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6784         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6785         scan codes.
6787 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6789         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6790         control key combinations.
6792 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6794         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6795         * util/ieee1275/grub-install.in: ... to here.
6796         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6797         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6798         (grub_install_SOURCES): Likewise.
6800 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6802         * fs/affs.c: Update copyright year.
6803         * fs/ext2.c: Likewise.
6804         * fs/fshelp.c: Likewise.
6805         * fs/hfsplus.c: Likewise.
6806         * fs/ntfs.c: Likewise.
6807         * fs/xfs.c: Likewise.
6808         * include/grub/fshelp.h: Likewise.
6809         * util/grub-mkdevicemap.c: Likewise.
6811 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6813         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6814         might need to be fatfs to support some firmware implementations
6815         (e.g. OFW or EFI).
6817 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6819         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6820         devices.
6821         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6822         (make_device_map): Likewise.
6824 2008-05-20  Bean  <bean123ch@gmail.com>
6826         * fs/fshelp.c (grub_fshelp_map_block): New function.
6827         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6828         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6830         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6831         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6832         (grub_fshelp_journal): New structure.
6833         (grub_fshelp_map_block): New function prototype.
6834         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6835         (grub_fshelp_map_block): Likewise.
6837         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6838         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6839         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6840         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6841         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6842         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6843         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6844         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6845         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6846         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6847         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6848         (grub_ext2_sblock): New members for journal support.
6849         (grub_ext3_journal_header): New structure.
6850         (grub_ext3_journal_revoke_header): Likewise.
6851         (grub_ext3_journal_block_tag): Likewise.
6852         (grub_ext3_journal_sblock): Likewise.
6853         (grub_fshelp_node): New members logfile and journal.
6854         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6855         grub_fshelp_map_block to get real block number.
6856         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6857         number.
6858         (grub_ext2_read_inode): Likewise.
6859         (grub_ext3_get_journal): New function.
6860         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6861         (grub_ext2_close): Release memory used by journal.
6863         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6864         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6865         (grub_reiserfs_transaction_header): Renamed to
6866         grub_reiserfs_description_block, replace field data with real_blocks.
6867         (grub_reiserfs_commit_block): New structure.
6868         (grub_reiserfs_data): New member journal.
6869         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6870         number.
6871         (grub_reiserfs_read_symlink): Likewise.
6872         (grub_reiserfs_iterate_dir): Likewise.
6873         (grub_reiserfs_open): Likewise.
6874         (grub_reiserfs_read): Likewise.
6875         (grub_reiserfs_get_journal): New function.
6876         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6877         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6878         using grub_reiserfs_get_journal.
6879         (grub_reiserfs_close): Release memory used by journal.
6881         * fs/affs.c (grub_affs_read_block): Change block type to
6882         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6884         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6886         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6888         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6890         * fs/udf.c (grub_udf_read_block): Change block type to
6891         grub_disk_addr_t. Use type cast to avoid warning.
6893         * fs/xfs.c (grub_xfs_read_block): Likewise.
6895 2008-05-16  Christian Franke  <franke@computer.org>
6897         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6898         to ensure that break with ESC will always work.
6899         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6900         Remove ESC from keyboard queue.
6902 2008-05-16  Christian Franke  <franke@computer.org>
6904         * util/biosdisk.c: [__CYGWIN__] Add includes.
6905         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6906         (get_os_disk): Move variable declarations to OS specific
6907         parts to avoid warning.
6908         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6909         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6910         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6911         Cygwin.
6912         * util/getroot.c: [__CYGWIN__] Add includes.
6913         (strip_extra_slashes): Fix "/" case.
6914         [__CYGWIN__] (get_win32_path): New function.
6915         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6916         [__CYGWIN__] (find_root_device): Disable.
6917         [__CYGWIN__] (get_bootsec_serial): New function.
6918         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6919         [__linux__] (grub_guess_root_device): Add early returns to simplify
6920         structure.
6921         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6922         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6923         check for Linux only.
6925 2008-05-15  Bean  <bean123ch@gmail.com>
6927         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6928         keyboard hang problem in apple's intel mac.
6930 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6932         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6933         devices.
6934         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6935         (make_device_map): Likewise.
6936         Reported by Aurelien Jarno <aurel32@debian.org>
6938 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6940         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6941         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6942         (make_device_map): Output entries for xvd type disks.
6944 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6946         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6947         devices.
6948         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6949         (make_device_map): Likewise.
6950         Reported by Roland Dreier <rdreier@cisco.com>
6952 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6954         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6955         grub_strstr() call.  Correct a few mistakes in failure path handling.
6957 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6959         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6960         Do not print a trailing slash (therefore, the root directory is an
6961         empty string).
6962         (convert_system_path_to_grub_path): Do not remove trailing slash
6963         from make_system_path_relative_to_its_root() output.
6965         * util/i386/pc/grub-install.in: Add trailing slash to output from
6966         make_system_path_relative_to_its_root().
6968 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6970         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6971         ensures that output lines aren't intermangled with those sent to
6972         stderr (via grub_util_info()).
6973         * util/grub-probe.c (grub_refresh): Likewise.
6974         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6976 2008-05-05  Christian Franke  <franke@computer.org>
6978         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6979         Add Cygwin device names.
6980         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6981         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6982         (check_device): Return error instead of success on empty name.
6983         (make_device_map): Move label inside linux specific code to
6984         prevent compiler warning.
6986 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6988         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6989         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6990         first boot option.
6991         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6993 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6995         * docs/grub.cfg: New file (example GRUB configuration).
6997 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6999         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7000         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7001         and `disk/ieee1275/nand.c'.
7003 2008-04-25  Bean  <bean123ch@gmail.com>
7005         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7006         i386-linuxbios.
7008         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7009         change the buffer size to 4096 for cdrom device.
7011         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7012         and nand.mod.
7013         (_linux_mod_SOURCES): New variable.
7014         (_linux_mod_CFLAGS): Likewise.
7015         (_linux_mod_LDFLAGS): Likewise.
7016         (linux_mod_SOURCES): Likewise.
7017         (linux_mod_CFLAGS): Likewise.
7018         (linux_mod_LDFLAGS): Likewise.
7019         (nand_mod_SOURCES): Likewise.
7020         (nand_mod_CFLAGS): Likewise.
7021         (nand_mod_LDFLAGS): Likewise.
7023         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7024         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7025         type property. (nand device in olpc don't have this property)
7027         * include/grub/disk.h (grub_disk_dev_id): New macro
7028         GRUB_DISK_DEVICE_NAND_ID.
7030         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7031         function prototype.
7032         (grub_rescue_cmd_initrd): Likewise.
7034         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7035         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7036         ofw_cif_handler and ofw_idt, adjust padding number.
7038         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7039         GRUB_MACHINE_IEEE1275 is defined.
7041         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7042         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7044         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7045         on nested function heap_init.
7046         (grub_upper_mem): New variable for i386-ieee1275.
7047         (grub_get_extended_memory): New function for i386-ieee1275.
7048         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7050         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7051         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7052         property.
7054         * loader/i386/ieee1275/linux.c: New file.
7056         * loader/i386/ieee1275/linux_normal.c: New file.
7058         * disk/ieee1275/nand.c: New file.
7060 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7062         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7063         value.
7064         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7066 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7068         Restructures early code path on ieee1275 to unify grub_main() as
7069         the first C function that is executed in every platform.
7071         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7072         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7073         cmain().
7074         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7075         * kern/ieee1275/cmain.c (cmain): Rename to ...
7076         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7077         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7078         at the beginning.
7080 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7082         * util/update-grub.in: Fix syntax error when setting
7083         `GRUB_PRELOAD_MODULES'.
7084         Reported by Stephane Chazelas <stephane@artesyncp.com>
7086 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7088         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7089         section into account, newer toolchains generate unique build ids
7090         * configure.ac: remove the test for --build-id=none acceptance,
7091         we want build ids to be preserved
7092         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7093         far from other sections don't cause the raw binary images grow
7094         size
7096 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7098         * disk/lvm.c: Update copyright year.
7099         * kern/misc.c: Likewise.
7101 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7103         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7104         there is no memory left for physical volume name.
7106 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7108         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7109         volume name mapping to support bigger than 9 character names properly.
7111 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7113         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7114         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7116 2008-04-13  Christian Franke  <franke@computer.org>
7118         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7119         to create a floppy emulation boot CD when non emulation mode
7120         does not work.
7121         Enable Joliet CD filesystem extension.
7123 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7125         * kern/misc.c (grub_strncat): Fix off-by-one error.
7126         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7128         * kern/env.c (grub_env_context_close): Clear current context, not
7129         previous one.
7130         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7132         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7134 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7136         Improve robustness when handling LVM.
7138         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7139         (and leave `*p' unmodified).
7140         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7141         through it.
7142         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7143         iterating through it.
7144         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7145         through it.
7146         (grub_lvm_scan_device): Check the return value (and fail gracefully
7147         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7148         Don't assume `vg->pvs != NULL' when iterating through it.
7150 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7152         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7153         * genmk.rb (partmap): New variable.
7154         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7155         (#{partmap}): New target rule.
7156         * genpartmaplist.sh: New file.
7157         * Makefile.in (pkglib_DATA): Add partmap.lst.
7158         (partmap.lst): New target rule.
7159         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7160         modules (including all partition maps), instead of preloading them.
7162 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7164         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7165         `linux-boot-prober' (if installed) to detect other operating
7166         systems which are installed on the computer and add them to
7167         the boot menu.
7168         * conf/common.rmk: Build and install 30_os-prober.
7170 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7172         * kern/powerpc/ieee1275/init.c: Move from here ...
7173         * kern/ieee1275/init.c: ... to here.  Update all users.
7175         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7176         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7178         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7179         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7181         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7182         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7184 2008-04-10  Pavel Roskin  <proski@gnu.org>
7186         * configure.ac: Always use "_cv_" in cache variables for
7187         compatibility with Autoconf 2.62.
7189 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7191         Revert grub/machine/init.h addition by Pavel (since it breaks on
7192         i386-ieee1275 and others):
7193         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7194         * util/powerpc/ieee1275/misc.c: Likewise.
7196 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7198         * util/grub-probe.c (probe): Improve error message.
7200 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7202         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7203         (this prevents the presence of a bogus entry from ruining the whole
7204         thing).
7206 2008-04-06  Pavel Roskin  <proski@gnu.org>
7208         * util/biosdisk.c: Include grub/util/biosdisk.h.
7209         * util/grub-fstest.c (execute_command): Make static.
7210         * util/grub-mkdevicemap.c (check_device): Likewise.
7211         * util/i386/pc/misc.c: Include grub/machine/init.h.
7212         * util/powerpc/ieee1275/misc.c: Likewise.
7213         * util/lvm.c: Include grub/util/lvm.h.
7214         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7215         grub/cache.h.
7216         * util/raid.c: Include grub/util/raid.h.
7217         (grub_util_getdiskname): Make static.
7219         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7220         grub_hostfs_fini(), as they are called from grub_init_all() and
7221         grub_fini_all() respectively.  This fixes an infinite loop in
7222         grub-fstest due to double registration of hostfs.
7223         Reported by Christian Franke <Christian.Franke@t-online.de>
7225 2008-04-05  Pavel Roskin  <proski@gnu.org>
7227         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7228         all 8 functions.  Otherwise, probe function 0 only.
7230 2008-04-04  Pavel Roskin  <proski@gnu.org>
7232         * commands/lspci.c (grub_lspci_iter): Print the bus number
7233         correctly.
7235         * commands/lspci.c (grub_pci_classes): Fix typos.
7236         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7237         before device ID, as it's normally done.
7239         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7240         Fix signedness warnings.
7241         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7242         Likewise.
7243         * util/ieee1275/get_disk_name.c: Include config.h so that
7244         _GNU_SOURCE is defined and getline() is declared.  Mark an
7245         unused argument as such.  Fix a signedness warning.
7247 2008-04-02  Pavel Roskin  <proski@gnu.org>
7249         * genkernsyms.sh.in: Use more robust assignments for CC and
7250         srcdir.  Quote srcdir.
7251         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7252         the symbol table is not empty.
7254         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7255         * fs/cpio.c (grub_cpio_read): Likewise.
7257 2008-04-01  Pavel Roskin  <proski@gnu.org>
7259         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7260         * disk/host.c (grub_host_open): Likewise.
7261         * disk/loopback.c (grub_loopback_open): Likewise.
7262         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7263         disk->id as in disk/host.c, not a multi-character constant.
7265         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7266         later is obsolete, potentially dangerous and sets a bad example.
7267         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7268         * util/misc.c (grub_util_get_image_size): Likewise.
7270         * disk/loopback.c (options): Improve help for "--partitions".
7272         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7273         options to align them with the short options, e.g. "echo -e".
7275 2008-03-31  Bean  <bean123ch@gmail.com>
7277         * video/reader/png.c (grub_png_data): New member is_16bit and
7278         image_data.
7279         (grub_png_decode_image_header): Detect 16 bit png image.
7280         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7281         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7282         (grub_video_reader_png): Release memory occupied by image_data.
7284         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7285         4096 bytes.
7286         (grub_nfs_mount): Skip the test for sector per cluster.
7288         * include/grub/ntfs.h (MAX_SPC): Removed.
7290 2008-03-31  Bean  <bean123ch@gmail.com>
7292         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7293         (grub_probe_SOURCES): Add fs/afs.c.
7294         (grub_fstest_SOURCES): Likewise.
7295         (afs_mod_SOURCES): New variable.
7296         (afs_mod_CFLAGS): Likewise.
7297         (afs_mod_LDFLAGS): Likewise.
7299         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7300         (grub_emu_SOURCES): Likewise.
7302         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7304         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7306         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7308         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7310         * fs/afs.c: New file.
7312 2008-03-30  Pavel Roskin  <proski@gnu.org>
7314         * disk/host.c: Include grub/misc.h to fix a warning.
7315         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7316         warnings about implicit declarations.
7318         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7319         variable.
7320         * include/grub/i386/loader.h: Change declaration of
7321         grub_linux_boot() to match what grub_loader_set() expects.
7322         * util/getroot.c (grub_guess_root_device): Return const char* to
7323         fix a warning.
7324         * util/grub-probe.c (probe): Fix a warning about uninitialized
7325         abstraction_name variable.
7326         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7327         second argument as unused to fix a warning.
7329         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7330         missing grub_error() call.
7332         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7333         2.60 and newer uses it to define datadir.
7335         * commands/sleep.c: Fix warning about implicit declaration.
7336         * disk/memdisk.c: Likewise.
7337         * loader/aout.c: Likewise.
7338         * loader/i386/bsd_normal.c: Likewise.
7339         * util/grub-probe.c: Likewise.
7341         * commands/i386/cpuid.c (has_longmode): Make static.
7342         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7343         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7345         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7346         GDT.  This is more robust, as %ds can change.
7347         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7348         calling real_to_prot().
7349         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7351 2008-03-28  Pavel Roskin  <proski@gnu.org>
7353         * kern/i386/pc/startup.S: Assert that uncompressed functions
7354         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7355         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7356         code, as they push parts of the code (error handlers) beyond
7357         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7358         code as correctness and size.
7360 2008-03-28  Pavel Roskin  <proski@gnu.org>
7362         * kern/i386/pc/startup.S
7363         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7364         data block address to the real mode, keep offset minimal.  This
7365         works around a bug in AWARD BIOS on old Athlon systems, which
7366         makes CD detection hang.
7368 2008-03-26  Pavel Roskin  <proski@gnu.org>
7370         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7371         const.
7372         * include/grub/normal.h: Add grub_parse_color_name_pair()
7373         declaration.
7375 2008-03-24  Bean  <bean123ch@gmail.com>
7377         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7378         (cd_count): Removed.
7379         (cd_drive): New variable.
7380         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7381         (grub_biosdisk_call_hook): Likewise.
7382         (grub_biosdisk_iterate): Change cdrom detection method.
7383         (grub_biosdisk_open): Replace cd_start with cd_drive.
7384         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7385         detect cdrom device.
7387         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7388         Removed.
7389         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7390         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7391         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7392         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7393         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7394         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7395         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7396         (grub_biosdisk_cdrp): New structure.
7397         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7399         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7401         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7402         device.
7404         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7405         New function.
7407 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7409         Remove 2 TiB limit in ata.mod.
7410         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7411         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7412         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7413         grub_uint64_t instead of grub_uint32_t.
7415 2008-03-05  Bean  <bean123ch@gmail.com>
7417         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7418         (grub_multiboot): Set boot device.
7420         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7422 2008-03-02  Bean  <bean123ch@gmail.com>
7424         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7425         symlink_buffer.
7427 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7429         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7430         texinfo.tex.
7432         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7433         modified.
7435         * docs/fdl.texi: New file.
7437         * docs/mdate-sh: New file. Copied from gnulib.
7438         * docs/texinfo.tex: Likewise.
7440         * config.guess: Updated from gnulib.
7441         * install-sh: Likewise.
7443 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7445         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7446         (aout_mod_SOURCES): New variable.
7447         (aout_mod_CFLAGS): Likewise.
7448         (aout_mod_LDFLAGS): Likewise.
7450         * conf/i386-ieee1275.rmk: Likewise.
7452 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7454         * util/update-grub.in: Reorganise terminal validity check.  Accept
7455         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7456         Based on suggestion by Franklin PIAT.
7458 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7460         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7461         function.
7462         * util/getroot.c (grub_util_check_block_device): New function that
7463         returns the given argument if it is a block device and returns NULL else.
7464         * util/grub-probe.c (argument_is_device): New variable.
7465         (probe): Promote device_name from a variable to an argument. Receive
7466         device_name from grub_util_check_block_device() if path is NULL and from
7467         grub_guess_root_device() else. Do not free() device_name anymore.
7468         (options): Introduce new parameter '-d, --device'.
7469         (main): Add description of the new parameter to the help screen.
7470         Rename path variable to argument. Set argument_is_device if the '-d'
7471         option is given. Pass argument to probe() depending on
7472         argument_is_device.
7474 2008-02-24  Bean  <bean123ch@gmail.com>
7476         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7477         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7478         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7479         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7480         (GRUB_ISO9660_VOLDESC_END): Likewise.
7481         (grub_iso9660_primary_voldesc): New member escape.
7482         (grub_iso9660_data): New member joliet.
7483         (grub_iso9660_convert_string): New function.
7484         (grub_iso9660_mount): Detect joliet extension.
7485         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7486         (grub_iso9660_iso9660_label): Likewise.
7488         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7489         (grub_setup_SOURCES): Add fs/udf.c.
7490         (grub_fstest_SOURCES): Likewise.
7491         (udf_mod_SOURCES): New variable.
7492         (udf_mod_CFLAGS): Likewise.
7493         (udf_mod_LDFLAGS): Likewise.
7495         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7496         (grub_emu_SOURCES): Likewise.
7498         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7500         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7502         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7504         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7506         * fs/udf.c: New file.
7508 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7510         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7511         (normal/lexer.c_DEPENDENCIES): New variables.
7512         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7513         (normal/lexer.c_DEPENDENCIES): Likewise.
7514         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7515         (normal/lexer.c_DEPENDENCIES): Likewise.
7516         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7517         (normal/lexer.c_DEPENDENCIES): Likewise.
7518         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7519         (normal/lexer.c_DEPENDENCIES): Likewise.
7520         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7521         (normal/lexer.c_DEPENDENCIES): Likewise.
7523 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7525         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7526         since they were intended to be in hex.  This didn't break previously
7527         because of a bug in gpt_partition_map_iterate() (see below).
7529         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7530         when checking the validity of GPT header.
7531         Remove `partno', since it always provides the same information as `i'.
7533 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7535         * include/grub/efi/time.h: Fix a wrong comment.
7537 2008-02-19  Pavel Roskin  <proski@gnu.org>
7539         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7540         message.
7542 2008-02-19  Bean  <bean123ch@gmail.com>
7544         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7545         (aout_mod_SOURCES): New variable.
7546         (aout_mod_CFLAGS): Likewise.
7547         (aout_mod_LDFLAGS): Likewise.
7548         (_bsd_mod_SOURCES): New variable.
7549         (_bsd_mod_CFLAGS): Likewise.
7550         (_bsd_mod_LDFLAGS): Likewise.
7551         (bsd_mod_SOURCES): New variable.
7552         (bsd_mod_CFLAGS): Likewise.
7553         (bsd_mod_LDFLAGS): Likewise.
7555         * include/grub/aout.h: New file.
7557         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7559         * include/grub/i386/bsd.h: New file.
7561         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7562         to make it public.
7564         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7565         function is called, so that it's possible to change it inside the hook.
7566         (grub_elf64_load): Likewise.
7567         (grub_elf_file): Don't close the file if elf header is not found.
7568         (grub_elf_close): Close the file if grub_elf_file fails (The new
7569         grub_elf_file won't close it).
7570         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7571         (grub_elf64_size): Likewise.
7573         * kern/i386/loader.S (grub_unix_real_boot): New function.
7575         * loader/aout.c: New file.
7577         * loader/i386/bsd.c: New file.
7579         * loader/i386/bsd_normal.c: New file.
7581         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7583         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7584         can test other formats.
7586 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7588         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7589         (grub_gpt_partition_type_empty): Redefine with macro from
7590         `<grub/gpt_partition.h>'.
7591         (gpt_partition_map_iterate): Adjust partition type comparison.
7593         Export `entry' as partmap-specific `part.data' struct.
7594         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7596         * include/grub/gpt_partition.h (grub_gpt_header)
7597         (grub_gpt_partentry): ... to here (new file).
7599         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7601         (grub_gpt_partition_type_bios_boot): New const variable, defined
7602         with macro from `<grub/gpt_partition.h>'.
7604         (setup): Replace `first_start' with `embed_region', which keeps
7605         track of the embed region (and is partmap-agnostic).
7607         Replace find_first_partition_start() with find_usable_region(),
7608         which finds a usable region for embedding using partmap-specific
7609         knowledge (supports PC/MSDOS and GPT).
7611         Fix all assumptions that the embed region start at sector 1, using
7612         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7613         rather than `first_start' to calculate available size.
7615         In grub_util_info() message, replace "into after the MBR" with an
7616         indication of the specific sector our embed region starts at.
7618 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7620         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7621         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7622         `commands/reboot.c'.
7623         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7624         (halt_mod_SOURCES): Likewise.
7625         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7626         (halt_mod_SOURCES): Likewise.
7628 2008-02-17  Christian Franke  <franke@computer.org>
7630         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7632 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7634         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7635         set `first_start' to 0 for non-PC/MSDOS partition maps.
7637 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7639         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7640         do not assume partition map is PC/MSDOS before performing checks that
7641         are specific to that layout.
7643 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7645         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7646         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7647         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7649 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7651         * configure.ac: Only a cosmetic change on the handling of
7652         -fno-stack-protector.
7654 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7656         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7657         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7658         reboot.c.
7659         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7660         (halt_mod_SOURCES): New variable.
7661         (halt_mod_CFLAGS): Likewise.
7662         (halt_mod_LDFLAGS): Likewise.
7663         (reboot_mod_SOURCES): Likewise.
7664         (reboot_mod_CFLAGS): Likewise.
7665         (reboot_mod_LDFLAGS): Likewise.
7667         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7668         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7669         reboot.c.
7670         (halt_mod_SOURCES): Likewise.
7671         (reboot_mod_SOURCES): Likewise.
7673         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7674         commands/i386/pc/reboot.c by commands/reboot.c.
7675         (reboot_mod_SOURCES): Likewise.
7677         * commands/i386/pc/reboot.c: merge this file ...
7679         * commands/ieee1275/reboot.c: ... and this file ...
7681         * commands/reboot.c: ... to this file.
7682         Add some precompiler directive to include the correct header for
7683         each machine.
7685         * commands/ieee1275/halt.c: move this file ...
7687         * commands/halt.c: ... to here.
7688         Add some precompiler directive to include the correct header for
7689         each machine.
7691         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7692         (grub_halt): Likewise.
7694         * kern/efi/efi.c (grub_reboot): New function.
7695         (grub_halt): Likewise.
7697 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7699         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7700         /dev (like it is done for /dev/mapper).  This doesn't provide support
7701         for EVMS, but at least it is now easy to identify the problem when it
7702         arises.
7704 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7706         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7707         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7708         comparing it with -1, not 0.
7710 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7712         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7713         `disk/lvm.c'.
7714         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7715         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7717         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7718         `disk/lvm.c' to the end of the list.
7719         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7720         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7722 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7724         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7725         grub_print_error() instead.  This will let user know why we're entering
7726         rescue mode.
7727         Based on suggestions from Sam Morris.
7729 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7731         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7732         on remaining N args, instead of "--" arg N times.
7734 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7736         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7737         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7738         pattern for unknown glyphs.
7740 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7742         * configure.ac: Probe for `help2man'.
7743         * Makefile.in (builddir): New variable.
7744         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7745         or otherwise add a few flags/options to it.
7746         (install-local): For every executable utility or script that is
7747         installed, invoke $(HELP2MAN) to install a manpage based on --help
7748         output.
7750         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7751         that it doesn't prevent --help from working in build tree.
7753         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7754         with `bug-grub@gnu.org'.
7755         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7756         * util/update-grub.in (usage): New function.
7757         Implement proper argument check, with support for --help and --version
7758         (as well as existing -y).
7760 2008-02-09  Christian Franke  <franke@computer.org>
7762         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7763         avoid overwriting previous output.
7764         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7766 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7768         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7769         drawing the menu.
7771 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7773         * commands/sleep.c: New file.
7774         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7775         (sleep_mod_SOURCES): New variable.
7776         (sleep_mod_CFLAGS): Likewise.
7777         (sleep_mod_LDFLAGS): Likewise.
7779 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7781         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7782         situations in which we can deduce the RAID size and the superblock
7783         doesn't match it.
7785 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7787         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7788         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7789         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7791         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7792         and return a grub_diskmemberlist_t composed of physical array members.
7793         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7795         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7796         prototype.
7797         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7798         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7799         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7801         * util/grub-probe.c (probe): Move partmap probing code from here ...
7802         (probe_partmap): ... to here.
7803         (probe): Use probe_partmap() once for the disk we're probing, and
7804         additionally, when such disk contains a memberlist() struct member,
7805         once for each disk that is contained in the structure returned by
7806         memberlist().
7808 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7810         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7811         environment variable to 'all' in order to obtain debug output from
7812         non-util/ code.
7813         * util/i386/pc/grub-setup.c (main): Likewise.
7815 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7817         * disk/raid.c (grub_raid_scan_device): Check for
7818         `array->device[sb.this_disk.number]' rather than for
7819         `array->device[sb.this_disk.number]->name', since the latter is not
7820         guaranteed to be accessible.
7822 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7824         * disk/raid.c: Update copyright.
7825         * fs/cpio.c: Likewise.
7826         * include/grub/raid.h: Likewise.
7827         * loader/i386/pc/multiboot.c: Likewise.
7828         * util/hostfs.c: Likewise.
7830 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7832         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7833         to a grub_disk_t array.
7834         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7835         `device[x]'.
7836         (grub_raid_scan_device): Replace `device[x].name' accesses with
7837         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7839 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7841         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7842         grub_dprintf() calls.
7843         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7844         error message.
7846 2008-02-07  Christian Franke  <franke@computer.org>
7848         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7849         instead of fseek and ftell to support large files.
7850         (grub_hostfs_read): Likewise.
7852 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7854         Patch from Jeroen Dekkers.
7855         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7856         failure, since successfully reading all array members might not be
7857         required.
7859 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7861         * util/grub-probe.c (probe): Simplify partmap probing (with the
7862         assumption that the first word up to the underscore equals to
7863         the module name).
7865 2008-02-06  Christian Franke  <franke@computer.org>
7867         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7868         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7869         last block of a cpio or tar stream.
7870         Check for "TRAILER!!!" instead of any empty data
7871         block to detect last block of a cpio stream.
7872         (grub_cpio_dir): Fix constness of variable np.
7873         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7874         cpio or tar trailer is detected.  This fixes a crash
7875         on open of a non existing file.
7877 2008-02-05  Bean  <bean123ch@gmail.com>
7879         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7880         address of entry.
7881         (grub_multiboot_load_elf64): Likewise.
7882         (grub_multiboot): Initialize mbi structure.
7884         * util/grub-fstest.c: Don't include unused header file script.h.
7886         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7887         of file.
7888         (grub_fstest_SOURCES): Likewise.
7890 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7892         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7893         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7894         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7895         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7897         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7898         (translation_table): Replace hardcoded values with macros
7899         provided by `<grub/term.h>'.
7901         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7902         (keyboard_map): Correct/add a few values, with macros provided
7903         by `<grub/term.h>'.
7904         (keyboard_map_shift): Zero values that don't differ from their
7905         `keyboard_map' equivalents.
7906         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7907         Discard the second scan code that is always sent by Caps lock.
7908         Only use `keyboard_map_shift' when it provides a non-zero value,
7909         otherwise fallback to `keyboard_map'.
7911 2008-02-04  Bean  <bean123ch@gmail.com>
7913         * Makefile.in (enable_grub_fstest): New variable.
7915         * conf/common.rmk (grub_fstest_init.lst): New rule.
7916         (grub_fstest_init.h): Likewise.
7917         (grub_fstest_init.c): Likewise.
7918         (util/grub-fstest.c_DEPENDENCIES): New variable.
7919         (grub_fstest_SOURCES): Likewise.
7921         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7923         * util/grub-fstest.c: New file.
7925 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7927         Make grub-setup handle a separate root device.
7929         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7930         so that the root device can be compared with the destination
7931         device.
7932         When embedding the core image, if the root and destination devices
7933         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7934         0xFF.
7935         When not embedding, set ROOT_DRIVE to 0xFF.
7937 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7939         Add support for having a grub directory in a different drive. This
7940         is still only the data handling part.
7942         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7943         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7944         (grub_root_drive): New variable.
7946         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7947         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7948         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7949         as it was.
7951         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7953         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7954         macro.
7955         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7957         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7958         is bogus, because PXE booting does not specify any drive
7959         correctly.
7961         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7962         am not sure if this is really correct.
7964         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7965         is always identical to the boot drive when booting from a CD.
7967         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7968         longer.
7969         (root_drive): New variable.
7970         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7971         (setup_sectors): Push %dx right after popping it, because %dh will
7972         be modified later.
7973         (copy_buffer): Restore %dx.
7975 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7977         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7978         use `cdboot.img' for cdrom images.
7980 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7982         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7983         only setup gfxterm when `font' command has succeeded.
7985 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7987         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7988         (grub_rescue_cmd_multiboot_loader)
7989         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7991 2008-02-03  Pavel Roskin  <proski@gnu.org>
7993         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7994         %edx and %esi from stack only after grub_gate_a20() is called.
7995         grub_gate_a20() clobbers %edx.
7997 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7999         * configure.ac (AC_INIT): Bumped to 1.96.
8001         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8002         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8003         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8004         video/readers/png.c.
8006 2008-02-03  Bean  <bean123ch@gmail.com>
8008         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8009         (cdboot_img_SOURCES): New variable.
8010         (cdboot_img_ASFLAGS): New variable.
8011         (cdboot_img_LDFLAGS): New variable.
8013         * boot/i386/pc/cdboot.S: New file.
8015         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8016         (cd_count): Likewise.
8017         (grub_biosdisk_get_drive): Add support for cd device.
8018         (grub_biosdisk_call_hook): Likewise.
8019         (grub_biosdisk_iterate): Likewise.
8020         (grub_biosdisk_open): Likewise.
8021         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8022         (grub_biosdisk_rw): Support reading from cd device.
8023         (GRUB_MOD_INIT): Iterate cd devices.
8025         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8026         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8027         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8029         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8031 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8033         * commands/read.c: New file.
8034         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8035         (read_mod_SOURCES): New variable.
8036         (read_mod_CFLAGS): Likewise.
8037         (read_mod_LDFLAGS): Likewise.
8039 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8041         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8042         determining whether menu has to be displayed.
8044 2008-02-02  Marco Gerards  <marco@gnu.org>
8046         * bus/pci.c: New file.
8048         * include/grub/pci.h: Likewise.
8050         * include/grub/i386/pc/pci.h: Likewise.
8052         * commands/lspci.c: Likewise.
8054         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8055         `lspci.mod'.
8056         (pci_mod_SOURCES): New variable.
8057         (pci_mod_CFLAGS): Likewise.
8058         (pci_mod_LDFLAGS): Likewise.
8059         (lspci_mod_SOURCES): Likewise.
8060         (lspci_mod_CFLAGS): Likewise.
8061         (lspci_mod_LDFLAGS): Likewise.
8063 2008-02-02  Bean  <bean123ch@gmail.com>
8065         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8066         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8068         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8069         (grub_xfs_btree_node): New structure.
8070         (grub_xfs_btree_root): New structure.
8071         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8072         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8073         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8074         (GRUB_XFS_EXTENT_SIZE): Likewise.
8075         (grub_xfs_read_block): Support btree format type.
8076         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8077         Use directory block as basic unit.
8079         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8081         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8082         __attribute__ ((__regparm__ (1))).
8084 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8086         Correct a mistake in previous commit.
8088         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8089         top.
8090         (normal/command.c_DEPENDENCIES): New variable.
8092 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8094         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8095         top.
8096         (normal/command.c_DEPENDENCIES): New variable.
8097         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8098         * conf/i386-ieee1275.rmk: Likewise.
8099         * conf/i386-linuxbios.rmk: Likewise.
8100         * conf/i386-pc.rmk: Likewise.
8101         * conf/sparc64-ieee1275.rmk: Likewise.
8102         * conf/powerpc-ieee1275.rmk: Likewise.
8103         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8105         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8107 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8109         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8110         call at beginning of function.
8112 2008-01-31  Pavel Roskin  <proski@gnu.org>
8114         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8115         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8116         (grub_mkrescue_SOURCES): Likewise.
8117         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8119 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8121         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8122         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8123         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8124         (grub_probe_SOURCES): ... to here.
8126         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8127         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8128         * conf/i386-ieee1275.rmk: Likewise.
8129         * conf/i386-linuxbios.rmk: Likewise.
8130         * conf/powerpc-ieee1275.rmk: Likewise.
8132 2008-01-30  Tristan Gingold  <gingold@free.fr>
8134         * kern/rescue.c: Silently accept empty lines.
8136 2008-01-29  Bean  <bean123ch@gmail.com>
8138         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8139         (real_code_2): Code cleanup and change comment style.
8140         (move_memory): Avoid using 32-bit address mode.
8142 2008-01-29  Bean  <bean123ch@gmail.com>
8144         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8145         (png_mod_SOURCES): New variable.
8146         (png_mod_CFLAGS): Likewise.
8147         (png_mod_LDFLAGS): Likewise.
8149         * video/readers/png.c: New file.
8151 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8153         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8154         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8155         `ifndef GRUB_MOD_GAP' hack.
8156         * util/elf/grub-mkimage.c (add_segments): Likewise.
8158 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8160         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8161         `GRUB_MOD_GAP' for platforms in which it's not defined.
8162         * util/elf/grub-mkimage.c (add_segments): Likewise.
8164 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8166         Get grub-emu to build again (including parallel builds).
8168         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8169         Split into ...
8170         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8171         (normal/execute.c_DEPENDENCIES): ... this, ...
8172         (grub-emu_DEPENDENCIES): ... and this.
8174         * conf/i386-efi.rmk: Likewise.
8175         * conf/i386-linuxbios.rmk: Likewise.
8176         * conf/i386-ieee1275.rmk: Likewise.
8177         * conf/powerpc-ieee1275.rmk: Likewise.
8178         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8180 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8182         * NEWS: Add a few items.
8184 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8186         Fix parallel builds with grub-emu.  Based on earlier commit for
8187         grub-probe and grub-setup.
8189         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8190         (util/grub-emu.c_DEPENDENCIES): ... this.
8191         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8192         (util/grub-emu.c_DEPENDENCIES): ... this.
8193         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8194         (util/grub-emu.c_DEPENDENCIES): ... this.
8195         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8196         (util/grub-emu.c_DEPENDENCIES): ... this.
8197         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8198         (util/grub-emu.c_DEPENDENCIES): ... this.
8200 2008-01-27  Pavel Roskin  <proski@gnu.org>
8202         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8203         to create a gap between _end and the modules added to the image
8204         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8205         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8206         * util/elf/grub-mkimage.c (add_segments): Likewise.
8208 2008-01-26  Pavel Roskin  <proski@gnu.org>
8210         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8211         just return an error.
8213 2008-01-26  Bean  <bean123ch@gmail.com>
8215         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8216         (grub_reiserfs_get_item): Save offset of the next item.
8217         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8219 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8221         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8222         make all filesystem sources appear together (possibly fixing omissions
8223         while at it).
8224         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8225         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8226         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8227         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8229         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8230         add `kern/file.c'.
8231         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8232         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8233         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8234         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8236         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8237         (probe): Add a sanity check to make sure of our ability to read
8238         requested files when probing for filesystem type.
8240         * genmk.rb: Update copyright year (2007).
8242         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8243         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8244         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8245         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8246         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8247         : Remove function prototypes.
8249 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8251         Revert my previous commits (based on wrong assumption of how grub_errno
8252         works).
8254         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8255         * kern/file.c (grub_file_open): Likewise.
8257 2008-01-24  Pavel Roskin  <proski@gnu.org>
8259         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8260         that hang if GRUB tries to setup colors.
8261         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8262         colors for firmwares that don't support it.
8263         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8264         Recognize Open Hack'Ware, set flags to work around its
8265         limitations.
8267 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8269         * kern/file.c (grub_file_open): Do not account previous failures of
8270         unrelated functions when grub_errno is checked for.
8271         Reported by Oleg Strikov.
8273 2008-01-24  Bean  <bean123ch@gmail.com>
8275         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8276         (grub_ufs_sblock): New member volume name.
8277         (grub_ufs_find_file): Fix string copy bug.
8278         (grub_ufs_label): Implement this function properly.
8280         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8281         (grub_hfs_iterate_records): Use the correct file number for extents
8282         and catalog file. Fix problem in next index calculation.
8283         (grub_hfs_find_node): Replace recursive function call with loop.
8284         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8286 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8288         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8289         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8290         (grub_multiboot2_real_boot): New function prototype.
8292         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8293         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8295         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8296         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8298 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8300         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8301         #ifdef'ed out grub_printf().
8303 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8305         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8306         grub_dprintf calls, since they make "debug=all" mode unusable.
8307         (grub_console_checkkey): Likewise.
8309 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8311         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8312         `term/i386/pc/at_keyboard.c'.
8313         (pkglib_MODULES): Add `serial.mod'.
8314         (serial_mod_SOURCES): New variable.
8315         (serial_mod_CFLAGS): Likewise.
8316         (serial_mod_LDFLAGS): Likewise.
8318         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8319         `<grub/powerpc/ieee1275/console.h>'.
8320         (grub_keyboard_controller_init): New function prototype.
8321         (grub_console_checkkey): Likewise.
8322         (grub_console_getkey): Likewise.
8324         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8325         keyboard on i386.
8327         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8328         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8330 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8332         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8333         present, "(memdisk)/boot/grub" becomes the default prefix.
8335         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8336         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8337         allows users to overlay additional files into the image.
8339 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8341         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8342         and `machine/memory.h'.
8343         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8344         (_multiboot_mod_SOURCES): New variable.
8345         (_multiboot_mod_CFLAGS): Likewise.
8346         (_multiboot_mod_LDFLAGS): Likewise.
8347         (multiboot_mod_SOURCES): Likewise.
8348         (multiboot_mod_CFLAGS): Likewise.
8349         (multiboot_mod_LDFLAGS): Likewise.
8351         * include/grub/i386/ieee1275/loader.h: New file.
8353         * include/grub/i386/ieee1275/machine.h: Likewise.
8355         * include/grub/i386/ieee1275/memory.h: Likewise.
8357         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8358         variable declaration.
8359         (grub_os_area_size): Likewise.
8361         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8362         (grub_lower_mem, grub_upper_mem): New variables.
8363         (grub_stop_floppy): New function (just to make
8364         grub_multiboot2_real_boot() happy).
8366         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8367         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8368         (grub_stop): New function.
8369         Include `"../realmode.S"' and `"../loader.S"'.
8371         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8372         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8374         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8375         rely on grub_multiboot2_real_boot() for final boot.
8377 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8379         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8380         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8381         device that doesn't look like an SD card.
8382         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8383         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8384         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8385         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8386         found.
8388 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8390         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8391         avoid claiming over our own code.
8393 2008-01-22  Bean  <bean123ch@gmail.com>
8395         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8396         (jpeg_mod_SOURCES): New variable.
8397         (jpeg_mod_CFLAGS): Likewise.
8398         (jpeg_mod_LDFLAGS): Likewise.
8400         * video/readers/jpeg.c : New file.
8402 2008-01-22  Bean  <bean123ch@gmail.com>
8404         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8405         there are no more items.
8407 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8409         * kern/mm.c (grub_mm_init_region): Improve debug message.
8411 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8413         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8414         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8415         address.
8416         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8417         a C macro.
8418         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8419         Indicates start of upper memory.
8420         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8421         (generate_image): Abort when image size is big enough to corrupt
8422         upper memory.
8424         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8425         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8426         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8427         instead of hardcoding 0xA0000.
8428         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8429         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8430         instead of hardcoding 0xA0000.
8432 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8434         * disk/memdisk.c (memdisk_size): New variable.
8435         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8436         `memdisk_size'.
8437         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8438         image to dynamic memory.
8439         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8440         `memdisk_size'.  Free memdisk block.
8442 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8444         Fix detection of very small filesystems (like tar).
8446         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8447         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8448         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8449         a problem with this disk).
8451 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8453         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8454         on grub_biosdisk_rw_standard() error.
8456 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8458         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8459         recent changes.
8460         * kern/elf.c: Likewise.
8461         * kern/ieee1275/ieee1275.c: Likewise.
8462         * kern/powerpc/ieee1275/openfw.c: Likewise.
8463         * term/ieee1275/ofconsole.c: Likewise.
8465 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8467         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8469         * include/grub/kernel.h (grub_arch_memdisk_addr)
8470         (grub_arch_memdisk_size): Moved from here ...
8472         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8473         (grub_arch_memdisk_size): ... to here.
8475 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8477         Mostly based on bugfix from Bean.
8479         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8480         attribute with hook() parameter.
8481         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8482         declaration.
8483         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8484         attribute with hook() parameter.
8485         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8486         declaration.
8488 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8490         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8491         (pkglib_MODULES): Add `memdisk.mod'.
8492         (memdisk_mod_SOURCES): New variable.
8493         (memdisk_mod_CFLAGS): Likewise.
8494         (memdisk_mod_LDFLAGS): Likewise.
8496         * disk/memdisk.c: New file.
8498         * include/grub/disk.h (grub_disk_dev_id): Add
8499         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8501         * include/grub/i386/pc/kernel.h
8502         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8503         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8504         (grub_kernel_image_size): New variable declaration.
8505         (grub_total_module_size): Likewise.
8506         (grub_memdisk_image_size): Likewise.
8508         * include/grub/i386/pc/memory.h
8509         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8511         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8512         (grub_arch_memdisk_addr): New variable declaration.
8513         (grub_arch_memdisk_size): Likewise.
8515         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8516         (grub_arch_memdisk_size): Likewise.
8518         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8519         (codestart): Replace hardcoded `0x100000' with
8520         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8522         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8523         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8524         not NULL, append the contents of the file it refers to, at the end of
8525         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8526         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8527         (options): Add "memdisk"|'m' option.
8528         (main): Parse --memdisk|-m option, and pass user-provided path as
8529         parameter to generate_image().
8531 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8533         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8534         grub_dprintf() calls from here ...
8535         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8537 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8539         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8541         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8542         declaration.
8543         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8544         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8545         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8546         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8547         property).
8548         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8549         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8551 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8553         Get rid of confusing function (superseded by
8554         `grub_ieee1275_get_integer_property')
8555         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8556         prototype.
8557         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8558         function.
8559         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8560         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8561         in native endianness from grub_ieee1275_get_integer_property().
8563 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8565         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8566         command after "shut-down", since implementations differ on which
8567         the command for halt is.
8569 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8571         * include/grub/i386/linuxbios/console.h: Add header protection.
8572         (grub_keyboard_controller_init): New function prototype.
8573         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8574         (KEYBOARD_COMMAND_READ): Likewise.
8575         (KEYBOARD_COMMAND_WRITE): Likewise.
8576         (KEYBOARD_SCANCODE_SET1): Likewise.
8577         (grub_keyboard_controller_write): New function.
8578         (grub_keyboard_controller_read): Likewise.
8579         (grub_keyboard_controller_init): Likewise.
8581         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8582         (grub_console_init): On coreboot/LinuxBIOS, call
8583         grub_keyboard_controller_init().
8585 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8587         PowerPC changes provided by Pavel Roskin.
8589         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8590         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8591         don't rely on cmain() doing it.
8592         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8593         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8595 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8597         * include/grub/i386/linuxbios/memory.h
8598         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8599         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8600         receive `table_header' as argument.  Instead, probe for it in the
8601         known memory ranges where it can be present.
8602         (grub_available_iterate): Do not pass a fixed `table_header' address
8603         to grub_linuxbios_table_iterate().
8605 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8607         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8608         * conf/i386-ieee1275.rmk: New file.
8609         * include/grub/i386/ieee1275/console.h: Likewise.
8610         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8611         * include/grub/i386/ieee1275/kernel.h: Likewise.
8612         * include/grub/i386/ieee1275/time.h: Likewise.
8613         * kern/i386/ieee1275/init.c: Likewise.
8614         * kern/i386/ieee1275/startup.S: Likewise.
8616 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8618         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8619         when pointers are 32-bit (but still do set it to one when they are
8620         64-bit).
8622 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8624         * include/grub/ieee1275/ieee1275.h
8625         (grub_ieee1275_get_integer_property): New function prototype.
8627         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8628         (grub_ieee1275_get_integer_property): New function.  Wraps around
8629         grub_ieee1275_get_property() to handle endianness.
8631         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8632         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8633         where appropriate.
8634         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8635         (grub_map): Likewise.
8636         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8638 2008-01-15  Bean  <bean123ch@gmail.com>
8640         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8641         (grub_script_execute_cmdline): Reset grub_errno.
8643         * normal/main.c (read_config_file): Reset grub_errno.
8645         * normal/parse.y (script_init): New.
8646         (script): Move function and menuentry here.
8647         (delimiter): New.
8648         (command): Add delimiter at the end of command.
8649         (commands): Adjust to match the new command.
8650         (commandblock): Remove grub_script_lexer_record_start.
8651         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8652         (if): Use the new commands.
8654         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8656 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8658         * normal/menu.c (run_menu): Move timeout message from here ...
8659         (print_timeout): ... to here.
8660         (run_menu): Use print_timeout() once during initial draw to print
8661         the whole message, and again in every clock tick to update only
8662         the number of seconds.
8664 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8666         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8667         actual size of `available' from grub_ieee1275_get_property(), and
8668         restrict parsing to that bound.
8670 2008-01-15  Christian Franke  <franke@computer.org>
8672         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8673         (argp_program_version): Remove variable.
8674         (argp_program_bug_address): Likewise.
8675         (options): Convert from struct argp_option to struct option.
8676         (struct arguments): Remove.
8677         (parse_opt): Remove.
8678         (usage): New function.
8679         (main): Replace struct args members by simple variables.
8680         Replace argp_parse() by getopt_long().
8681         Add switch to evaluate options.
8682         Add missing "(...)" around root_dev in prefix string.
8684 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8686         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8687         for grub_ieee1275_exit(), in order to improve portability.
8689 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8691         * util/grub.d/10_linux.in (prefix): Define.
8692         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8694 2008-01-13  Pavel Roskin  <proski@gnu.org>
8696         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8697         grub_errno if no errors have been detected.
8699 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8701         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8702         (grub_util_get_dev_abstraction): New function prototype.
8704         * util/getroot.c: Include `<grub/util/getroot.h>'
8705         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8706         (grub_util_get_dev_abstraction): ... here (new function).
8708         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8709         `PRINT_ABSTRACTION'.
8710         (probe): Probe for abstraction type when requested.
8711         (main): Understand `--target=abstraction'.
8713         * util/i386/efi/grub-install.in: Add abstraction module to core
8714         image when it is found to be necessary.
8715         * util/i386/pc/grub-install.in: Likewise.
8716         * util/powerpc/ieee1275/grub-install.in: Likewise.
8718         * util/update-grub_lib.in (font_path): Return system path without
8719         converting to GRUB path.
8720         * util/update-grub.in: Convert system path returned by font_path()
8721         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8722         abstraction module is needed for loading fonts (if any).  Export
8723         that as `GRUB_PRELOAD_MODULES'.
8724         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8725         insmod commands).
8727 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8729         Remove some unused code from reiserfs.
8731         * fs/reiserfs.c (struct grub_reiserfs_key)
8732         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8733         (struct grub_reiserfs_node_body): Removed.
8734         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8735         Likewise.
8736         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8737         Likewise.
8738         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8739         Likewise.
8740         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8741         Likewise.
8742         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8743         Likewise.
8744         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8745         Likewise.
8746         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8747         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8748         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8750 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8752         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8753         Determines if a file is garbage left by packaging systems, etc.
8754         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8755         for processing /etc/grub.d scripts.
8756         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8757         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8758         as a condition for processing Linux images.
8760 2008-01-10  Pavel Roskin  <proski@gnu.org>
8762         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8763         to compile reiserfs.c on PowerPC.
8765 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8767         * kern/device.c (grub_device_iterate): Do not abort device iteration
8768         when one of the devices cannot be opened.
8769         * kern/disk.c (grub_disk_open): Do not account previous failures of
8770         unrelated functions when grub_errno is checked for.
8772 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8774         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8775         `! grub_linux_is_bzimage', change order of address comparison to make
8776         it more intuitive, and improve "too big zImage" error message.
8778 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8780         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8781         `$(update-grub_DATA)'.
8782         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8783         targets.
8785 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8787         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8788         which instruction is modified by grub-setup during installation
8789         (since it wasn't obvious by only looking at this file).
8791 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8793         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8794         listing actual TODO items.
8796 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8798         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8799         correctly.
8800         (grub_reiserfs_get_key_offset): Likewise.
8801         (grub_reiserfs_set_key_offset): Likewise.
8802         (grub_reiserfs_set_key_type): Likewise.
8803         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8805         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8806         better to remove the bitfield version completely.
8808 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8810         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8811         allocated from the heap, due to the fshelp implementation.
8812         (grub_reiserfs_dir): Free NODE, due to the same reason.
8814 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8816         Mostly from Vincent Pelletier:
8818         * fs/reiserfs.c: New file.
8820         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8821         (reiserfs_mod_SOURCES): New variable.
8822         (reiserfs_mod_CFLAGS): Likewise.
8823         (reiserfs_mod_LDFLAGS): Likewise.
8825         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8826         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8827         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8828         normal/color.c.
8830 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8832         * normal/color.c: Remove `<grub/env.h>'.
8834 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8836         * include/grub/normal.h: Include <grub/env.h>.
8838 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8840         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8841         usage example with `(hd0,1)'.
8842         Reported by Samuel Thibault.
8844 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8846         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8847         (grub_linux_boot_zimage): Rename to ...
8848         (grub_linux_boot): ... this.
8849         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8850         (grub_linux_boot_zimage): Conditionalize zImage copy.
8852         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8853         (grub_linux_boot_bzimage): Remove prototype.
8854         (grub_linux_boot_zimage): Rename to ...
8855         (grub_linux_boot): ... this.
8857         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8858         (grub_linux_boot): Remove function.
8860 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8862         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8863         (grub_env_write_color_highlight): Likewise.
8864         (grub_wait_after_message): Likewise.
8866         * normal/color.c: New file.
8868         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8869         (normal_mod_DEPENDENCIES): Likewise.
8871         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8872         (normal_mod_DEPENDENCIES): Likewise.
8874         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8875         (normal_mod_DEPENDENCIES): Likewise.
8877         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8878         (normal_mod_DEPENDENCIES): Likewise.
8880         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8881         for waiting after a message is printed.
8882         * normal/main.c (read_config_file): Likewise.
8883         (grub_normal_init): Register grub_env_write_color_normal() and
8884         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8885         `color_highlight' variables as global.
8887         * normal/menu.c (grub_wait_after_message): New function.
8888         (grub_color_menu_normal): New variable.  Replaces ...
8889         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8890         (grub_color_menu_highlight): New variable.  Replaces ...
8891         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8892         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8893         `GRUB_TERM_COLOR_STANDARD'.
8894         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8895         `normal_code' and `highlight_code' to `old_color_normal' and
8896         `old_color_highlight', respectively.
8897         (grub_menu_init_page): Update colors when drawing the menu, based on
8898         `menu_color_normal' and `menu_color_highlight' variables.
8899         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8900         a message is printed.
8902 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8904         * kern/env.c (grub_env_context_open): Propagate hooks for global
8905         variables to new context.
8907         * kern/main.c (grub_set_root_dev): Export `root' variable.
8909 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8911         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8912         discs unconditionally, since udev and others have options to provide
8913         them.
8915 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8917         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8919 2008-01-04  Christian Franke  <franke@computer.org>
8921         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8922         of eisa_mmap.
8924 2008-01-03  Pavel Roskin  <proski@gnu.org>
8926         * kern/i386/linuxbios/init.c: Put "void" to all function
8927         declarations with no arguments.
8928         * kern/powerpc/ieee1275/init.c: Likewise.
8929         * term/i386/pc/at_keyboard.c: Likewise.
8930         * term/i386/pc/vga_text.c: Likewise.
8931         * util/grub-mkdevicemap.c: Likewise.
8933 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8935         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8936         message when loaded image is out of bounds.
8937         (grub_multiboot_load_elf64): Likewise.
8939 2008-01-02  Pavel Roskin  <proski@gnu.org>
8941         * util/grub.d/10_linux.in: Try version without ".old" when
8942         looking for initrd.  It's better to use initrd from the newer
8943         kernel of the same version than no initrd at all.
8945 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8947         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8949 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8951         * include/grub/video.h: Added grub_video_unmap_color and
8952         grub_video_get_active_render_target.
8953         (grub_video_adapter): Added unmap_color and get_active_render_target.
8955         * video/video.c: Added grub_video_unmap_color and
8956         grub_video_get_active_render_target.
8957         (grub_video_get_info): Changed method to accept NULL pointer as an
8958         argument to allow detection of active video adapter.
8960         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8961         grub_video_vbe_unmap_color_int.
8962         Added grub_video_vbe_unmap_color and
8963         grub_video_vbe_get_active_render_target.
8964         (grub_video_vbe_adapter): Added unmap_color and
8965         get_active_render_target.
8967         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8968         with grub_video_vbe_unmap_color_int.
8970         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8971         (DEFAULT_NORMAL_COLOR): Likewise.
8972         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8973         (DEFAULT_FG_COLOR): Removed.
8974         (DEFAULT_BG_COLOR): Likewise.
8975         (DEFAULT_CURSOR_COLOR): Changed value.
8976         (grub_virtual_screen): Added standard_color_setting,
8977         normal_color_setting, highlight_color_setting and term_color.
8978         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8979         (bitmap_width): Added.
8980         (bitmap_height): Likewise.
8981         (bitmap): Likewise.
8982         (set_term_color): Likewise.
8983         (grub_virtual_screen_setup): Changed to use new terminal coloring
8984         settings.
8985         (grub_gfxterm_init): Added init for bitmap.
8986         (grub_gfxterm_fini): Added destroy for bitmap.
8987         (redraw_screen_rect): Updated to use background bitmap and new
8988         terminal coloring.
8989         (scroll_up): Added optimization for case when there is no bitmap.
8990         (grub_gfxterm_cls): Fixed to use correct background color.
8991         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8992         coloring.
8993         (grub_virtual_screen_setcolor): Likewise.
8994         (grub_virtual_screen_getcolor): Added.
8995         (grub_gfxterm_background_image_cmd): Likewise.
8996         (grub_video_term): Added setcolor and getcolor.
8997         (MOD_INIT): Added registration of background_image command.
8998         (MOD_TERM): Added unregistration for background_image command.
9000 2007-12-30  Pavel Roskin  <proski@gnu.org>
9002         * loader/multiboot_loader.c: Fix multiboot command
9003         unregistration.  Fix all typos in the word "multiboot".
9005 2007-12-29  Pavel Roskin  <proski@gnu.org>
9007         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9008         support for initrd names used in Fedora.
9010 2007-12-26  Bean  <bean123ch@gmail.com>
9012         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9013         (cpio_mod_SOURCES): New variable.
9014         (cpio_mod_CFLAGS): Likewise.
9015         (cpio_mod_LDFLAGS): Likewise.
9017         * fs/cpio.c: New file.
9019         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9021         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9023         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9025         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9027 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9029         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9030         (grub_getcolor): New function.
9032         * kern/term.c (grub_getcolor): New function.
9033         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9034         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9035         (print_entry): Set normal and highlight colors to
9036         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9037         respectively, before printing and restore them to old
9038         values afterwards.
9039         (grub_menu_init_page): Likewise.  Fill an additional colored space
9040         that would otherwise be left blank.
9042         * term/efi/console.c (grub_console_getcolor): New function.
9043         (struct grub_console_term.getcolor): New variable.
9044         * term/i386/pc/console.c (grub_console_getcolor): New function.
9045         (struct grub_console_term.getcolor): New variable.
9046         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9047         (struct grub_console_term.getcolor): New variable.
9049         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9050         (struct grub_console_term.setcolor): Remove variable.
9051         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9052         (struct grub_console_term.setcolor): Remove variable.
9053         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9054         (struct grub_console_term.setcolor): Remove variable.
9055         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9056         (struct grub_console_term.setcolor): Remove variable.
9058 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9060         * configure.ac: Search for possible unifont.hex locations, and
9061         define UNIFONT_HEX if found.
9063         * Makefile.in (UNIFONT_HEX): Define variable.
9064         (DATA): Rename to ...
9065         (PKGLIB): ... this.  Update all users.
9066         (PKGDATA): New variable.
9067         (pkgdata_IMAGES): Rename to ...
9068         (pkglib_IMAGES): ... this. Update all users.
9069         (pkgdata_MODULES): Rename to ...
9070         (pkglib_MODULES): ... this. Update all users.
9071         (pkgdata_PROGRAMS): Rename to ...
9072         (pkglib_PROGRAMS): ... this. Update all users.
9073         (pkgdata_DATA): Rename to ...
9074         (pkglib_DATA): ... this. Update all users.
9075         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9076         (unicode.pff, ascii.pff): New rules.
9077         (all-local): Add `$(PKGDATA)' dependency.
9078         (install-local): Process `$(PKGDATA)'.
9080         * util/update-grub_lib.in (font_path): Search for *.pff files in
9081         a few more locations, including `${pkgdata}'.
9083 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9085         Patch from Bean  <bean123ch@gmail.com>:
9086         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9087         `size'.
9089 2007-12-21  Bean  <bean123ch@gmail.com>
9091         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9092         (ntfscomp_mod_SOURCES): New variable.
9093         (ntfscomp_mod_CFLAGS): Likewise.
9094         (ntfscomp_mod_LDFLAGS): Likewise.
9096         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9097         (grub_probe_SOURCES): Likewise.
9098         (grub_emu_SOURCES): Likewise.
9100         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9101         (grub_emu_SOURCES): Likewise.
9103         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9104         (grub_emu_SOURCES): Likewise.
9106         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9107         (grub_emu_SOURCES): Likewise.
9109         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9110         (read_run_list): Renamed to grub_ntfs_read_run_list.
9111         (decomp_nextvcn): Moved to ntfscomp.c.
9112         (decomp_getch): Likewise.
9113         (decomp_get16): Likewise.
9114         (decomp_block): Likewise.
9115         (read_block): Likewise.
9116         (read_data): Partially moved to ntfscomp.c.
9117         (fixup): Change unsigned to grub_uint16_t.
9118         (read_mft): Change unsigned long to grub_uint32_t.
9119         (read_attr): Likewise.
9120         (read_data): Likewise.
9121         (read_run_data): Likewise.
9122         (read_run_list): Likewise.
9123         (read_mft): Likewise.
9125         * fs/ntfscomp.c: New file.
9127         * include/grub/ntfs.h: New file.
9129 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9131         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9132         IDE disk check, since Linux is known to support 20 IDE disks.
9133         Reported by Colin Watson.
9135 2007-12-15  Bean  <bean123ch@gmail.com>
9137         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9138         (lnxboot_img_SOURCES): New variable.
9139         (lnxboot_img_ASFLAGS): Likewise.
9140         (lnxboot_img_LDFLAGS): Likewise.
9142         * boot/i386/pc/lnxboot.S: New file.
9144 2007-11-24  Pavel Roskin  <proski@gnu.org>
9146         * configure.ac: Test if '--build-id=none' is supported by the
9147         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9148         objcopy to generate incorrect binary files (binutils
9149         2.17.50.0.18-1 as shipped by Fedora 8).
9150         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9151         linking, so that build ID doesn't break the test.
9153 2007-11-24  Pavel Roskin  <proski@gnu.org>
9155         * include/grub/i386/time.h: use "void" in the argument list
9156         of grub_cpu_idle().
9157         * include/grub/powerpc/time.h: Likewise.
9158         * include/grub/sparc64/time.h: Likewise.
9160 2007-11-18  Christian Franke  <franke@computer.org>
9162         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9163         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9164         This fixes the problem that function keys did not work in grub-emu.
9166 2007-11-18  Christian Franke  <franke@computer.org>
9168         * disk/host.c (grub_host_open): Remove attribute unused from
9169         name parameter. Add check for "host". This fixes the problem
9170         that grub-emu does not find partitions.
9172 2007-11-18  Christian Franke  <franke@computer.org>
9174         * util/hostfs.c (is_dir): New function.
9175         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9176         (grub_hostfs_read): Add missing fseek().
9177         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9178         of grub-emu on "ls (host)".
9180 2007-11-18  Christian Franke  <franke@computer.org>
9182         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9183         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9184         to 64 bit boundary by default.
9186 2007-11-18  Bean  <bean123ch@gmail.com>
9188         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9189         (hexdump_mod_SOURCES): New variable.
9190         (hexdump_mod_CFLAGS): Likewise.
9191         (hexdump_mod_LDFLAGS): Likewise.
9193         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9195         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9197         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9199         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9201         * include/grub/hexdump.h: New file.
9203         * commands/hexdump.c: New file.
9205 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9207         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9208         in grub_outb() calls.
9209         (beep_on): Likewise.
9211 2007-11-10  Christian Franke  <franke@computer.org>
9213         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9214         (grub_menu_run): Likewise.
9216 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9218         * include/grub/i386/efi/machine.h: New file.
9219         * include/grub/i386/linuxbios/machine.h: Likewise.
9220         * include/grub/i386/pc/machine.h: Likewise.
9221         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9222         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9224         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9225         (serial_hw_io_addr): New variable.
9226         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9227         instead of `(unsigned short *) 0x400'.
9229 2007-11-10  Bean  <bean123ch@gmail.com>
9231         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9233 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9235         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9236         (vga_mod_SOURCES): Added.
9237         (vga_mod_CFLAGS): Likewise.
9238         (vga_mod_LDFLAGS): Likewise.
9240         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9241         grub_outb() calls.
9242         (set_map_mask): Likewise.
9243         (set_read_map): Likewise.
9244         (set_read_address): Likewise.
9245         (vga_font): Removed variable.
9246         (get_vga_glyph): Removed function.
9247         (invalidate_char): Likewise.
9248         (write_char): Changed to use grub_font_get_glyph() for font
9249         information.
9250         (grub_vga_putchar): Likewise.
9251         (grub_vga_getcharwidth): Likewise.
9253 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9255         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9256         flags.
9257         (pxeboot_img_LDFLAGS): Likewise.
9258         (diskboot_img_LDFLAGS): Likewise.
9259         (kernel_img_LDFLAGS): Likewise.
9261 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9263         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9264         in grub_outb() calls.
9265         (serial_hw_init): Likewise.
9267 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9269         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9270         spaces.  Skip non-regular files.
9272 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9274         * kern/disk.c (grub_disk_firmware_fini)
9275         (grub_disk_firmware_is_tainted): New variables.
9277         * include/grub/disk.h (grub_disk_firmware_fini)
9278         (grub_disk_firmware_is_tainted): Likewise.
9280         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9281         (grub_disk_biosdisk_fini): ... to here.
9282         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9283         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9284         is set.  Register grub_disk_biosdisk_fini() in
9285         `grub_disk_firmware_fini'.
9287         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9288         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9289         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9290         to finish existing firmware disk interface.
9292         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9293         (ata_mod_SOURCES): New variable.
9294         (ata_mod_CFLAGS): Likewise.
9295         (ata_mod_LDFLAGS): Likewise.
9297 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9299         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9300         (grub_ata_wait): Reimplement using grub_millisleep().
9302         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9303         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9305 2007-11-03  Marco Gerards  <marco@gnu.org>
9307         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9308         (CRTC_ADDR_PORT): New macro.
9309         (CRTC_DATA_PORT): Likewise.
9310         (CRTC_CURSOR): Likewise.
9311         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9312         (CRTC_CURSOR_ADDR_LOW): Likewise.
9313         (update_cursor): New function.
9314         (grub_console_real_putchar): Call `update_cursor'.
9315         (grub_console_gotoxy): Likewise.
9316         (grub_console_cls): Set the default color when clearing the
9317         screen.
9318         (grub_console_setcursor): Implemented.
9320 2007-11-03  Marco Gerards  <marco@gnu.org>
9322         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9323         become activate.
9324         (grub_ata_pio_write): Likewise.
9326         (grub_atapi_identify): Wait after issuing an ATA command.
9327         (grub_atapi_packet): Likewise.
9328         (grub_ata_identify): Likewise.
9329         (grub_ata_readwrite): Likewise.
9331 2007-11-03  Marco Gerards  <marco@gnu.org>
9333         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9334         (grub_ata_pio_write): Likewise.
9335         (grub_ata_readwrite): Use `grub_error', instead of
9336         returning `grub_errno'.
9338 2007-11-03  Marco Gerards  <marco@gnu.org>
9340         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9341         grub_ata_pio_write once for every single sector, instead of for
9342         multiple sectors.
9344 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9346         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9348         * conf/i386-linuxbios.rmk: New file.
9350         * kern/i386/pc/hardware.c: Likewise.
9351         * term/i386/pc/at_keyboard.c: Likewise.
9352         * term/i386/pc/vga_text.c: Likewise.
9354         * include/grub/i386/linuxbios/boot.h: Likewise.
9355         * include/grub/i386/linuxbios/console.h: Likewise.
9356         * include/grub/i386/linuxbios/init.h: Likewise.
9357         * include/grub/i386/linuxbios/kernel.h: Likewise.
9358         * include/grub/i386/linuxbios/loader.h: Likewise.
9359         * include/grub/i386/linuxbios/memory.h: Likewise.
9360         * include/grub/i386/linuxbios/serial.h: Likewise.
9361         * include/grub/i386/linuxbios/time.h: Likewise.
9363         * kern/i386/linuxbios/init.c: Likewise.
9364         * kern/i386/linuxbios/startup.S: Likewise.
9365         * kern/i386/linuxbios/table.c: Likewise.
9367 2007-10-31  Marco Gerards  <marco@gnu.org>
9369         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9370         (ata_mod_SOURCES): New variable.
9371         (ata_mod_CFLAGS): Likewise.
9372         (ata_mod_LDFLAGS): Likewise.
9374         * disk/ata.c: New file.
9376         * include/grub/disk.h (grub_disk_dev_id): Add
9377         `GRUB_DISK_DEV_ATA_ID'.
9379 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9381         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9382         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9384         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9385         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9387         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9388         `<grub/types.h>'.
9390         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9392 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9394         * include/grub/types.h (ULONG_MAX): Define macro.
9396 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9398         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9399         `"../realmode.S"'.
9400         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9402 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9404         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9405         (pkgdata_MODULES): Add `biosdisk.mod'.
9406         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9407         variables.
9409         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9410         (grub_biosdisk_init): Replace with ...
9411         (GRUB_MOD_INIT(biosdisk)): ... this.
9412         (grub_biosdisk_fini): Replace with ...
9413         (GRUB_MOD_FINI(biosdisk)): ... this.
9415         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9416         (grub_machine_init): Remove call to grub_biosdisk_init().
9417         (grub_machine_fini): Remove call to grub_machine_fini().
9419         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9421 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9423         * include/grub/time.h: New file.
9424         * include/grub/i386/time.h: Likewise.
9425         * include/grub/powerpc/time.h: Likewise.
9426         * include/grub/sparc64/time.h: Likewise.
9428         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9429         instances to ...
9430         (KERNEL_MACHINE_TIME_HEADER): ... this.
9431         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9432         instances to ...
9433         (KERNEL_MACHINE_TIME_HEADER): ... this.
9434         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9435         instances to ...
9436         (KERNEL_MACHINE_TIME_HEADER): ... this.
9438         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9439         (grub_millisleep): New function.
9440         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9441         (grub_millisleep): New function.
9442         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9443         Remove `grub/machine/time.h' include.
9444         (grub_millisleep): New function.
9445         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9446         Remove `grub/machine/time.h' include.
9447         (grub_millisleep): New function.
9449         * include/grub/misc.h (grub_div_roundup): New function.
9451         * kern/misc.c: Include `<grub/time.h>'.
9452         (grub_millisleep_generic): New function.
9454         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9455         Add `time.h'.
9456         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9457         Add `time.h'.
9458         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9459         `machine/time.h'.  Add `time.h'.
9460         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9462 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9464         * include/grub/misc.h (grub_max): New function.
9466 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9468         * util/misc.c (grub_util_info): Call fflush() before returning.
9470 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9472         * genmk.rb (Image): Copy `extra_flags' from here ...
9473         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9475         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9476         to `argc' and `args' arguments.
9478 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9480         * kern/i386/loader.S: New file.
9482         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9483         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9484         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9485         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9486         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9487         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9488         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9489         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9490         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9491         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9492         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9493         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9494         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9495         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9497         * kern/i386/realmode.S: New file.
9499         * kern/i386/pc/startup.S (protstack): Moved from here ...
9500         * kern/i386/realmode.S (protstack)... to here.
9501         * kern/i386/pc/startup.S (gdt): Moved from here ...
9502         * kern/i386/realmode.S (gdt)... to here.
9503         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9504         * kern/i386/realmode.S (prot_to_real)... to here.
9506         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9507         `kern/i386/realmode.S'.
9509 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9511         * include/grub/i386/loader.h: New file.
9513         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9514         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9515         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9516         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9517         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9518         * include/grub/i386/loader.h (grub_linux_prot_size)
9519         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9520         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9521         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9522         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9524         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9526 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9528         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9529         filesystem when dev->disk is unset.
9530         Do probe for filesystem even when dev->disk->has_partitions is set.
9531         In case a filesystem is found, always report it.
9532         In case it isn't, if dev->disk->has_partitions is set, report that
9533         a partition table was found instead of reporting that no filesystem
9534         could be identified.
9536 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9538         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9539         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9541         * include/grub/types.h (grub_host_to_target16): New macro.
9542         (grub_host_to_target32): Likewise.
9543         (grub_host_to_target64): Likewise.
9544         (grub_target_to_host16): Likewise.
9545         (grub_target_to_host32): Likewise.
9546         (grub_target_to_host64): Likewise.
9548         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9549         Renamed from to ...
9550         (GRUB_MOD_ALIGN): ...this.  Update all users.
9552         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9553         grub_host_to_target32.
9554         Replace grub_be_to_cpu32 with grub_target_to_host32.
9555         (load_modules): Likewise.
9556         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9557         Replace grub_be_to_cpu32 with grub_target_to_host32.
9558         Replace grub_cpu_to_be16 with grub_host_to_target16.
9559         Replace grub_cpu_to_be32 grub_host_to_target32.
9561 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9563         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9564         * util/elf/grub-mkimage.c: ... here.
9566         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9567         `util/powerpc/ieee1275/grub-mkimage.c'.
9569 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9571         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9572         and make it easier to figure out.
9573         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9574         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9575         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9576         leave us with less than HEAP_MIN_SIZE total heap.
9577         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9579 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9581         * include/grub/i386/io.h: New file.
9582         * commands/i386/pc/play.c (inb): Removed.
9583         (outb): Removed.
9584         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9585         with grub_outb().
9586         * term/i386/pc/serial.c  (inb): Removed.
9587         (outb): Removed.
9588         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9589         with grub_outb().
9590         * term/i386/pc/vga.c  (inb): Removed.
9591         (outb): Removed.
9592         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9593         with grub_outb().
9595 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9597         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9598         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9599         Reported by Marcin Kurek.
9601 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9603         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9604         SmartFirmware version updates (as released by Sven Luther), and avoid
9605         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9606         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9607         known broken.
9609 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9611         From Hitoshi Ozeki:
9612         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9613         when merging two regions.
9615 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9617         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9618         * normal/completion.c (grub_normal_do_completion): Likewise.
9619         Reported by Hitoshi Ozeki.
9621 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9623         Do not use devices at boot in chainloading.
9625         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9626         (boot_part_addr): Likewise.
9627         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9628         with BOOT_DRIVE and BOOT_PART_ADDR.
9629         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9630         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9632 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9634         Patch from Simon Peter <dn.tlp@gmx.net>:
9635         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9636         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9637         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9638         util/i386/pc/grub-setup.c_DEPENDENCIES.
9639         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9640         util/grub-probe.c_DEPENDENCIES.
9641         * conf/powerpc-ieee1275.rmk: Likewise.
9643 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9645         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9646         to tell grub-mkdevicemap how to name devices.
9647         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9648         feature).
9650         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9651         util/i386/get_disk_name.c.
9652         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9653         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9654         util/ieee1275/get_disk_name.c.
9656         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9658         * DISTLIST: Add util/i386/get_disk_name.c and
9659         util/ieee1275/get_disk_name.c.
9661         * util/grub-mkdevicemap.c: Replace device naming logic with
9662         grub_util_get_disk_name() calls.
9664 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9666         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9667         (so that it works for both plural and singular quantities).
9669 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9671         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9672         so that [xz] isn't taken into account when determining order.
9674 2007-08-02  Marco Gerards  <marco@gnu.org>
9676         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9677         `include/multiboot2.h', `include/grub/elfload.h',
9678         `include/multiboot.h', `include/grub/multiboot.h',
9679         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9680         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9681         `kern/elf.c', `loader/multiboot_loader.c',
9682         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9683         `loader/i386/pc/multiboot2.c',
9684         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9685         `util/i386/pc/grub-mkrescue.in'.  Remove
9686         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9687         `include/grub/i386/pc/util/biosdisk.h' and
9688         `include/grub/powerpc/ieee1275/multiboot.h'.
9690 2007-08-02  Bean  <bean123ch@gmail.com>
9692         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9693         (ntfs_mod_SOURCES): New variable.
9694         (ntfs_mod_CFLAGS): Likewise.
9695         (ntfs_mod_LDFLAGS): Likewise.
9697         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9698         (grub_probe_SOURCES): Likewise.
9699         (grub_emu_SOURCES): Likewise.
9701         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9702         (grub_emu_SOURCES): Likewise.
9704         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9705         (grub_emu_SOURCES): Likewise.
9707         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9709         * fs/ntfs.c: New file.
9711 2007-08-02  Bean  <bean123ch@gmail.com>
9713         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9715         * file.h (grub_file): Likewise.
9717         * fshelp.h (grub_fshelp_read_file): Likewise.
9719         * util/i386/pc/grub-setup.c (setup): Likewise.
9720         (save_first_sector): Likewise.
9721         (save_blocklists): Likewise.
9723         * fs/affs.c (grub_affs_read_file): Likewise.
9725         * fs/ext2.c (grub_ext2_read_file): Likewise.
9727         * fs/fat.c (grub_fat_read_data): Likewise.
9729         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9731         * fs/hfs.c (grub_hfs_read_file): Likewise.
9733         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9735         * fs/jfs.c (grub_jfs_read_file): Likewise.
9737         * fs/minix.c (grub_minix_read_file): Likewise.
9739         * fs/sfs.c (grub_sfs_read_file): Likewise.
9741         * fs/ufs.c (grub_ufs_read_file): Likewise.
9743         * fs/xfs.c (grub_xfs_read_file): Likewise.
9745         * command/blocklist.c (read_blocklist): Likewise.
9746         (print_blocklist): Likewise.
9748 2007-08-02  Marco Gerards  <marco@gnu.org>
9750         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9751         `util/hostfs.c'.
9753         * disk/host.c: New file.
9755         * util/hostfs.c: Likewise.
9757         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9758         return `GRUB_ERR_BAD_FS'.
9759         * fs/sfs.c (grub_sfs_mount): Likewise.
9760         * fs/xfs.c (grub_xfs_mount): Likewise.
9762         * include/grub/disk.h (enum grub_disk_dev_id): Add
9763         `GRUB_DISK_DEVICE_HOST_ID'.
9765         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9767 2007-07-24  Jerone Young  <jerone@gmail.com>
9769         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9770         modules for compilation.
9771         * conf/powerpc-ieee1275.rmk: Likewise.
9773         * include/multiboot.h: Move multiboot definitions to one file. Rename
9774         many definitions to not get grub specific.
9775         * include/multiboot2.h: Create header with multiboot 2 definitions.
9776         * include/grub/multiboot.h: Header for grub specific function
9777         prototypes and definitions.
9778         * include/grub/multiboot2.h: Likewise.
9779         * include/grub/multiboot_loader.h: Likewise.
9780         * include/grub/i386/pc/multiboot.h: Removed.
9781         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9783         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9784         and 2 to allow for one multiboot and module commands.
9785         * loader/multiboot2.c: Add multiboot2 functionality.
9786         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9787         and definition names.
9788         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9789         2 functions.
9790         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9791         ieee1275 specific multiboot2 code.
9793         * kern/i386/pc/startup.S: Change headers and definition names for
9794         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9796 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9798         * geninitheader.sh: Process file specified in first parameter rather
9799         than hardcoding grub_modules_init.lst.
9800         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9801         than hardcoding grub_modules_init.h.
9803         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9804         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9805         grub_probe_init.[ch] and grub_setup_init.[ch].
9807         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9808         grub_modules_init.h with grub_emu_init.h.
9809         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9810         grub_probe_init.[ch] files.
9811         * conf/i386-efi.rmk: Likewise.
9812         * conf/i386-pc.rmk: Likewise.
9813         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9814         grub_setup_init.[ch] files.
9816         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9817         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9818         to initialize modules rather than a list of hardcoded functions.
9819         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9820         grub_init_all() to initialize modules rather than a list of hardcoded
9821         functions.
9823 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9825         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9826         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9828 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9830         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9831         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9832         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9833         flag when running on SmartFirmware.
9834         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9835         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9836         was set.
9838         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9839         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9840         rather than decreasing it.
9842         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9843         there's not enough space to do it, fail in the same way as when it
9844         can't be done because there are no partitions.
9846         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9847         when nvsetenv failed.
9849 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9851         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9852         because this rule is automatically generated.
9853         (grub-mkrescue): Removed for the same reason as above.
9855 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9857         Migrate to GNU General Public License Version 3.
9859         * COPYING: Replaced with the plain text version of GPLv3.
9861         * config.guess: Updated from gnulib.
9862         * config.sub: Likewise.
9864         * geninit.sh: Output a GPLv3 copyright notice.
9865         * geninitheader.sh: Likewise.
9866         * genmodsrc.sh: Likewise.
9867         * gensymlist.sh.in: Likewise.
9869         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9870         * boot/i386/pc/diskboot.S: Likewise.
9871         * boot/i386/pc/pxeboot.S: Likewise.
9872         * commands/blocklist.c: Likewise.
9873         * commands/boot.c: Likewise.
9874         * commands/cat.c: Likewise.
9875         * commands/cmp.c: Likewise.
9876         * commands/configfile.c: Likewise.
9877         * commands/echo.c: Likewise.
9878         * commands/help.c: Likewise.
9879         * commands/ls.c: Likewise.
9880         * commands/search.c: Likewise.
9881         * commands/terminal.c: Likewise.
9882         * commands/test.c: Likewise.
9883         * commands/videotest.c: Likewise.
9884         * commands/i386/cpuid.c: Likewise.
9885         * commands/i386/pc/halt.c: Likewise.
9886         * commands/i386/pc/play.c: Likewise.
9887         * commands/i386/pc/reboot.c: Likewise.
9888         * commands/i386/pc/vbeinfo.c: Likewise.
9889         * commands/i386/pc/vbetest.c: Likewise.
9890         * commands/ieee1275/halt.c: Likewise.
9891         * commands/ieee1275/reboot.c: Likewise.
9892         * commands/ieee1275/suspend.c: Likewise.
9893         * disk/loopback.c: Likewise.
9894         * disk/lvm.c: Likewise.
9895         * disk/raid.c: Likewise.
9896         * disk/efi/efidisk.c: Likewise.
9897         * disk/i386/pc/biosdisk.c: Likewise.
9898         * disk/ieee1275/ofdisk.c: Likewise.
9899         * font/manager.c: Likewise.
9900         * fs/affs.c: Likewise.
9901         * fs/ext2.c: Likewise.
9902         * fs/fat.c: Likewise.
9903         * fs/fshelp.c: Likewise.
9904         * fs/hfs.c: Likewise.
9905         * fs/hfsplus.c: Likewise.
9906         * fs/iso9660.c: Likewise.
9907         * fs/jfs.c: Likewise.
9908         * fs/minix.c: Likewise.
9909         * fs/sfs.c: Likewise.
9910         * fs/ufs.c: Likewise.
9911         * fs/xfs.c: Likewise.
9912         * hello/hello.c: Likewise.
9913         * include/grub/acorn_filecore.h: Likewise.
9914         * include/grub/arg.h: Likewise.
9915         * include/grub/bitmap.h: Likewise.
9916         * include/grub/boot.h: Likewise.
9917         * include/grub/cache.h: Likewise.
9918         * include/grub/device.h: Likewise.
9919         * include/grub/disk.h: Likewise.
9920         * include/grub/dl.h: Likewise.
9921         * include/grub/elfload.h: Likewise.
9922         * include/grub/env.h: Likewise.
9923         * include/grub/err.h: Likewise.
9924         * include/grub/file.h: Likewise.
9925         * include/grub/font.h: Likewise.
9926         * include/grub/fs.h: Likewise.
9927         * include/grub/fshelp.h: Likewise.
9928         * include/grub/gzio.h: Likewise.
9929         * include/grub/hfs.h: Likewise.
9930         * include/grub/kernel.h: Likewise.
9931         * include/grub/loader.h: Likewise.
9932         * include/grub/lvm.h: Likewise.
9933         * include/grub/misc.h: Likewise.
9934         * include/grub/mm.h: Likewise.
9935         * include/grub/net.h: Likewise.
9936         * include/grub/normal.h: Likewise.
9937         * include/grub/parser.h: Likewise.
9938         * include/grub/partition.h: Likewise.
9939         * include/grub/pc_partition.h: Likewise.
9940         * include/grub/raid.h: Likewise.
9941         * include/grub/rescue.h: Likewise.
9942         * include/grub/script.h: Likewise.
9943         * include/grub/setjmp.h: Likewise.
9944         * include/grub/symbol.h: Likewise.
9945         * include/grub/term.h: Likewise.
9946         * include/grub/terminfo.h: Likewise.
9947         * include/grub/tparm.h: Likewise.
9948         * include/grub/types.h: Likewise.
9949         * include/grub/video.h: Likewise.
9950         * include/grub/efi/api.h: Likewise.
9951         * include/grub/efi/chainloader.h: Likewise.
9952         * include/grub/efi/console.h: Likewise.
9953         * include/grub/efi/console_control.h: Likewise.
9954         * include/grub/efi/disk.h: Likewise.
9955         * include/grub/efi/efi.h: Likewise.
9956         * include/grub/efi/pe32.h: Likewise.
9957         * include/grub/efi/time.h: Likewise.
9958         * include/grub/i386/linux.h: Likewise.
9959         * include/grub/i386/setjmp.h: Likewise.
9960         * include/grub/i386/types.h: Likewise.
9961         * include/grub/i386/efi/kernel.h: Likewise.
9962         * include/grub/i386/efi/loader.h: Likewise.
9963         * include/grub/i386/efi/time.h: Likewise.
9964         * include/grub/i386/pc/biosdisk.h: Likewise.
9965         * include/grub/i386/pc/boot.h: Likewise.
9966         * include/grub/i386/pc/chainloader.h: Likewise.
9967         * include/grub/i386/pc/console.h: Likewise.
9968         * include/grub/i386/pc/init.h: Likewise.
9969         * include/grub/i386/pc/kernel.h: Likewise.
9970         * include/grub/i386/pc/loader.h: Likewise.
9971         * include/grub/i386/pc/memory.h: Likewise.
9972         * include/grub/i386/pc/multiboot.h: Likewise.
9973         * include/grub/i386/pc/serial.h: Likewise.
9974         * include/grub/i386/pc/time.h: Likewise.
9975         * include/grub/i386/pc/vbe.h: Likewise.
9976         * include/grub/i386/pc/vbeblit.h: Likewise.
9977         * include/grub/i386/pc/vbefill.h: Likewise.
9978         * include/grub/i386/pc/vbeutil.h: Likewise.
9979         * include/grub/i386/pc/vga.h: Likewise.
9980         * include/grub/ieee1275/ieee1275.h: Likewise.
9981         * include/grub/ieee1275/ofdisk.h: Likewise.
9982         * include/grub/powerpc/libgcc.h: Likewise.
9983         * include/grub/powerpc/setjmp.h: Likewise.
9984         * include/grub/powerpc/types.h: Likewise.
9985         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9986         * include/grub/powerpc/ieee1275/console.h: Likewise.
9987         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9988         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9989         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9990         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9991         * include/grub/powerpc/ieee1275/time.h: Likewise.
9992         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9993         * include/grub/sparc64/libgcc.h: Likewise.
9994         * include/grub/sparc64/setjmp.h: Likewise.
9995         * include/grub/sparc64/types.h: Likewise.
9996         * include/grub/sparc64/ieee1275/console.h: Likewise.
9997         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9998         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9999         * include/grub/sparc64/ieee1275/time.h: Likewise.
10000         * include/grub/util/biosdisk.h: Likewise.
10001         * include/grub/util/getroot.h: Likewise.
10002         * include/grub/util/lvm.h: Likewise.
10003         * include/grub/util/misc.h: Likewise.
10004         * include/grub/util/raid.h: Likewise.
10005         * include/grub/util/resolve.h: Likewise.
10006         * io/gzio.c: Likewise.
10007         * kern/device.c: Likewise.
10008         * kern/disk.c: Likewise.
10009         * kern/dl.c: Likewise.
10010         * kern/elf.c: Likewise.
10011         * kern/env.c: Likewise.
10012         * kern/err.c: Likewise.
10013         * kern/file.c: Likewise.
10014         * kern/fs.c: Likewise.
10015         * kern/loader.c: Likewise.
10016         * kern/main.c: Likewise.
10017         * kern/misc.c: Likewise.
10018         * kern/mm.c: Likewise.
10019         * kern/parser.c: Likewise.
10020         * kern/partition.c: Likewise.
10021         * kern/rescue.c: Likewise.
10022         * kern/term.c: Likewise.
10023         * kern/efi/efi.c: Likewise.
10024         * kern/efi/init.c: Likewise.
10025         * kern/efi/mm.c: Likewise.
10026         * kern/i386/dl.c: Likewise.
10027         * kern/i386/efi/init.c: Likewise.
10028         * kern/i386/efi/startup.S: Likewise.
10029         * kern/i386/pc/init.c: Likewise.
10030         * kern/i386/pc/lzo1x.S: Likewise.
10031         * kern/i386/pc/startup.S: Likewise.
10032         * kern/ieee1275/ieee1275.c: Likewise.
10033         * kern/powerpc/cache.S: Likewise.
10034         * kern/powerpc/dl.c: Likewise.
10035         * kern/powerpc/ieee1275/cmain.c: Likewise.
10036         * kern/powerpc/ieee1275/crt0.S: Likewise.
10037         * kern/powerpc/ieee1275/init.c: Likewise.
10038         * kern/powerpc/ieee1275/openfw.c: Likewise.
10039         * kern/sparc64/cache.S: Likewise.
10040         * kern/sparc64/dl.c: Likewise.
10041         * kern/sparc64/ieee1275/init.c: Likewise.
10042         * kern/sparc64/ieee1275/openfw.c: Likewise.
10043         * loader/efi/chainloader.c: Likewise.
10044         * loader/efi/chainloader_normal.c: Likewise.
10045         * loader/i386/efi/linux.c: Likewise.
10046         * loader/i386/efi/linux_normal.c: Likewise.
10047         * loader/i386/pc/chainloader.c: Likewise.
10048         * loader/i386/pc/chainloader_normal.c: Likewise.
10049         * loader/i386/pc/linux.c: Likewise.
10050         * loader/i386/pc/linux_normal.c: Likewise.
10051         * loader/i386/pc/multiboot.c: Likewise.
10052         * loader/i386/pc/multiboot_normal.c: Likewise.
10053         * loader/powerpc/ieee1275/linux.c: Likewise.
10054         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10055         * normal/arg.c: Likewise.
10056         * normal/cmdline.c: Likewise.
10057         * normal/command.c: Likewise.
10058         * normal/completion.c: Likewise.
10059         * normal/execute.c: Likewise.
10060         * normal/function.c: Likewise.
10061         * normal/lexer.c: Likewise.
10062         * normal/main.c: Likewise.
10063         * normal/menu.c: Likewise.
10064         * normal/menu_entry.c: Likewise.
10065         * normal/misc.c: Likewise.
10066         * normal/parser.y: Likewise.
10067         * normal/script.c: Likewise.
10068         * normal/i386/setjmp.S: Likewise.
10069         * normal/powerpc/setjmp.S: Likewise.
10070         * normal/sparc64/setjmp.S: Likewise.
10071         * partmap/acorn.c: Likewise.
10072         * partmap/amiga.c: Likewise.
10073         * partmap/apple.c: Likewise.
10074         * partmap/gpt.c: Likewise.
10075         * partmap/pc.c: Likewise.
10076         * partmap/sun.c: Likewise.
10077         * term/gfxterm.c: Likewise.
10078         * term/terminfo.c: Likewise.
10079         * term/efi/console.c: Likewise.
10080         * term/i386/pc/console.c: Likewise.
10081         * term/i386/pc/serial.c: Likewise.
10082         * term/i386/pc/vesafb.c: Likewise.
10083         * term/i386/pc/vga.c: Likewise.
10084         * term/ieee1275/ofconsole.c: Likewise.
10085         * util/biosdisk.c: Likewise.
10086         * util/console.c: Likewise.
10087         * util/genmoddep.c: Likewise.
10088         * util/getroot.c: Likewise.
10089         * util/grub-emu.c: Likewise.
10090         * util/grub-mkdevicemap.c: Likewise.
10091         * util/grub-probe.c: Likewise.
10092         * util/lvm.c: Likewise.
10093         * util/misc.c: Likewise.
10094         * util/raid.c: Likewise.
10095         * util/resolve.c: Likewise.
10096         * util/update-grub.in: Likewise.
10097         * util/update-grub_lib.in: Likewise.
10098         * util/grub.d/00_header.in: Likewise.
10099         * util/grub.d/10_hurd.in: Likewise.
10100         * util/grub.d/10_linux.in: Likewise.
10101         * util/i386/efi/grub-install.in: Likewise.
10102         * util/i386/efi/grub-mkimage.c: Likewise.
10103         * util/i386/pc/grub-install.in: Likewise.
10104         * util/i386/pc/grub-mkimage.c: Likewise.
10105         * util/i386/pc/grub-mkrescue.in: Likewise.
10106         * util/i386/pc/grub-setup.c: Likewise.
10107         * util/i386/pc/misc.c: Likewise.
10108         * util/powerpc/ieee1275/grub-install.in: Likewise.
10109         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10110         * util/powerpc/ieee1275/misc.c: Likewise.
10111         * video/bitmap.c: Likewise.
10112         * video/video.c: Likewise.
10113         * video/i386/pc/vbe.c: Likewise.
10114         * video/i386/pc/vbeblit.c: Likewise.
10115         * video/i386/pc/vbefill.c: Likewise.
10116         * video/i386/pc/vbeutil.c: Likewise.
10117         * video/readers/tga.c: Likewise.
10119 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10121         * conf/i386-efi.rmk: Replace obsolete reference to
10122         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10123         with util/getroot.c.
10124         * conf/powerpc-ieee1275.rmk: Likewise.
10125         * conf/sparc64-ieee1275.rmk: Likewise.
10127         * util/grub-emu.c (main): Fix unchecked pointer handling.
10129 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10131         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10132         invocation to fail, in order to support partition-less media.
10134         * util/i386/pc/grub-install.in: Likewise.
10136         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10137         which fs or partmap modules are needed (akin to its sister scripts).
10139         Also use grub-probe to get rid of unportable /proc/mounts check.
10141         Print the same informational message that the other scripts do, before
10142         exiting.
10144 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10146         * util/update-grub_lib.in (font_path): New function.  Determine whether
10147         a font file can be found and, if so, echo the GRUB path to it.
10149         * util/update-grub.in: Handle multiple terminals depending on user
10150         input, platform availability and font file presence.  Propagate
10151         variables of our findings to /etc/grub.d/ children.
10153         * util/grub.d/00_header.in: Handle multiple terminals, based on
10154         environment setup by update-grub.
10156 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10158         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10160 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10162         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10163         indicate end of data section in kernel image.
10164         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10165         GRUB_KERNEL_MACHINE_DATA_END.
10167         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10168         space for it.
10169         * kern/i386/efi/startup.S: Likewise.
10171         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10172         during image generation.  Implement --prefix option to override this
10173         patch.
10174         * util/i386/efi/grub-mkimage.c: Likewise.
10176         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10177         code to make path relative to its root into a separate function.
10179         * util/i386/pc/grub-install.in: Use newly provided
10180         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10181         pass the result to grub-install --prefix.
10183 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10185         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10186         DEFAULT_DEVICE_MAP.
10187         * util/grub-emu.c: Use above definitions from misc.h instead of
10188         defining them.
10189         * util/grub-mkdevicemap.c: Likewise.
10190         * util/i386/pc/grub-setup.c: Likewise.
10191         * util/grub-probe.c: Likewise.
10192         (probe): Abort with grub_util_error() when either
10193         grub_guess_root_device or grub_util_get_grub_dev fails.
10195 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10197         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10198         "pager" assignment.
10199         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10200         "pcdata".
10201         * util/grub-probe.c (probe): Likewise for "drive_name".
10203 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10205         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10206         not just the cdrom one.
10208 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10210         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10211         Add --pkglibdir=DIR option to override pkglibdir.
10212         Mention --image-type=TYPE in help output.
10213         Fix --grub-mkimage (it was a no-op).
10214         Abort gracefully when no parameter is given.
10216 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10218         * util/i386/pc/grub-mkrescue.in: New file.
10219         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10220         * Makefile.in: Handle bin_SCRIPTS.
10222 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10224         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10225         list of video modes.
10227 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10229         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10230         file doesn't exist, or if it is in a filesystem grub can't read.
10232         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10233         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10234         header comment to fit in 80 columns when the variables are resolved.
10236         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10237         could be identified by update-grub.  Remove redundant check for
10238         unifont.pff existence (since convert_system_path_to_grub_path now
10239         handles that).
10241 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10243         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10245         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10247         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10249 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10251         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10253         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10254         grub_apple_partition_map_fini.
10256         * util/biosdisk.c
10257         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10258         to access >2 TiB disks).
10260         Print disk->total_sectors with %llu instead of %lu, since this
10261         variable is always 64-bit (prevents wrong disk size from being displayed
10262         on either >2 TiB disk or big-endian CPU).
10264         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10265         into a generic case that supports all (sane) partition maps.
10267         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10268         breaks big-endian.
10270         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10271         and grub_apple_partition_map_fini() after that.
10273 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10275         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10277         * util/grub.d/00_header.in: Only enable gfxterm when
10278         convert_system_path_to_grub_path() succeeds.
10280 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10282         * util/update-grub_lib.in: New file.
10283         * DISTLIST: Add update-grub_lib.in.
10284         * conf/common.rmk: Generate update-grub_lib and install it in
10285         $(lib_DATA).
10286         * Makefile.in: Add install routine for $(lib_DATA).
10288         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10289         function provided by update-grub_lib to support arbitrary paths of
10290         unifont.pff.
10291         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10292         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10294 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10296         * commands/i386/cpuid.c: New module.
10297         * DISTLIST: Add it.
10298         * conf/i386-efi.rmk: Enable cpuid.mod.
10299         * conf/i386-pc.rmk: Likewise.
10301 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10303         * kern/disk.c (grub_disk_read): Check return value of
10304         grub_realloc().
10306 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10308         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10309         arrays.
10310         * disk/raid.c (grub_raid_open): Likewise.
10312 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10314         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10315         stack instead of on the heap.
10317         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10318         before doing a read on it.
10320         * configure.ac: Only use -fno-stack-protector for the target
10321         environment.
10323 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10325         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10326         __attribute_ ((unused)) to mode_type argument.
10328         * util/getroot.c (grub_guess_root_device): Fix #endif.
10330         * kern/misc.c (memcmp): Fix prototype.
10332         * include/grub/partition.h [GRUB_UTIL]
10333         (grub_gpt_partition_map_init): Add prototype.
10334         (grub_gpt_partition_map_fini): Likewise.
10336         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10337         at the right place.
10339         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10340         (grub_fat_read_data): Likewise.
10341         (grub_fat_find_dir): Likewise.
10343         * font/manager.c (find_glyph): Make table a const.
10344         (grub_font_get_glyph): Remove bitmap from if statement.
10346 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10348         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10349         code, first search for device in /dev/mapper, then in /dev.
10350         (grub_util_get_grub_dev): New function.
10351         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10352         prototype.
10353         * util/grub-probe.c (probe): Remove check for RAID, call
10354         grub_util_get_grub_dev() instead of
10355         grub_util_biosdisk_get_grub_dev().
10356         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10357         grub_util_biosdisk_get_grub_dev().
10358         * util/i386/pc/grub-setup.c (main): Likewise.
10360 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10362         * DISTLIST: Update for the latest changes.
10363         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10364         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10365         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10366         grub/util/biosdisk.h.
10367         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10368         grub/util/biosdisk.h.
10370 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10372         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10374 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10376         * util/i386/efi/grub-install.in: New.
10377         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10378         newly added grub-install.
10379         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10380         include.
10381         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10382         grub/util/biosdisk.h.
10383         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10384         grub/util/biosdisk.h.
10386 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10388         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10389         * include/grub/util/biosdisk.h: ... here.
10390         * util/i386/pc/biosdisk.c: Moved to ...
10391         * util/biosdisk.c: ... here.
10392         * util/i386/pc/getroot.c: Moved to ...
10393         * util/getroot.c: ... here.
10394         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10395         * util/grub-mkdevicemap.c: ... here.
10396         * util/i386/pc/grub-probe.c: Moved to ...
10397         * util/grub-probe.c: ... here.
10399 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10401         * util/update-grub.in: Remove duplicated line in grub.cfg header
10402         message.
10404 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10406         * util/update-grub.in: Fix a few assumptions about the devices holding
10407         /, /boot and /boot/grub being the same.
10408         * util/grub.d/00_header.in: Likewise.
10409         * util/grub.d/10_hurd.in: Likewise.
10410         * util/grub.d/10_linux.in: Likewise.
10412         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10413         patterns.  Use that to define the `.old' suffix as older than `'.
10415         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10417         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10418         the grub.cfg header message.
10420 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10422         * util/update-grub.in: Create device.map if it doesn't already exist,
10423         before attempting to run grub-probe.
10424         Check for grub-probe and grub-mkdevicemap with the same code
10425         grub-install is using.
10426         Remove test mode.
10428 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10430         * Makefile.in: Add the datarootdir autoconf variable.
10432 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10434         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10435         fail gracefully if dev->disk->partition == NULL.
10437 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10439         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10440         determine partition map module.
10441         * util/i386/pc/grub-install.in: Use this feature to decide which
10442         partition module to load, instead of hardcoding pc and gpt.
10444 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10446         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10447         source directory differs from build directory.
10449 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10451         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10452         initialisation.
10454 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10456         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10458 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10460         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10461         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10463 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10465         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10466         (grub_probe_SOURCES): Likewise.
10467         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10468         GPT and initialize dos_part and bsd_part accordingly.
10469         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10470         install_bsd_part.
10471         (main): Activate gpt module for use during partition identification,
10472         and deactivate it afterwards.
10473         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10474         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10475         partition identification, and deactivate it afterwards.
10477 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10479         * term/i386/pc/console.c (grub_console_fini): Call
10480         grub_term_set_current() before grub_term_unregister().
10482 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10484         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10485         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10486         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10487         and update-grub_DATA.
10488         * conf/common.rmk: Build and install update-grub components.
10489         * conf/common.mk: Regenerate.
10490         * util/update-grub.in: New.  Core of update-grub.
10491         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10492         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10493         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10494         * util/grub.d/README: New.  Document grub.d directory layout.
10496 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10498         * util/grub-emu.c: Move initialization functions
10499         grub_util_biosdisk_init() and grub_init_all() before
10500         grub_util_biosdisk_get_grub_dev(), which relies on them.
10502 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10504         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10505         it is used later.
10507 2007-04-18  Jerone Young  <jerone@gmail.com>
10509         * kernel/elf.c: Add missing parenthesis for conditional statement
10510         stanza.
10512 2007-04-10  Jerone Young  <jerone@gmail.com>
10514         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10515         continue on and look for device node with real device name.
10517 2007-04-10  Jerone Young  <jerone@gmail.com>
10519         * configure.ac: Add argument for autoconf to use transformation
10520         ability.
10521         * Makefile.in: Add autoconf package transformation code.
10522         * util/i386/pc/grub-install.in: Likewise.
10523         * util/powerpc/ieee1275/grub-install.in: Likewise.
10525 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10527         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10528         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10529         (EXT2_REVISION): Likewise.
10530         (EXT2_INODE_SIZE): Likewise.
10531         (struct grub_ext2_block_group): Added a missing member
10532         "used_dirs".
10533         (grub_ext2_read_inode): Divide by the inode size in a superblock
10534         instead of 128 to obtain INODES_PER_BLOCK.
10535         Use the macro EXT2_INODE_SIZE instead of directly using
10536         SBLOCK->INODE_SIZE.
10538 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10540         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10541         superblock instead of the structure size to compute an
10542         offset. This fixes the problem that GRUB could not read a
10543         filesystem when inode size is different from 128-byte.
10545 2007-03-05  Marco Gerards  <marco@gnu.org>
10547         * normal/main.c (read_config_file): When "menu" is not set, create
10548         an initial context.
10550 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10552         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10553         (HEAP_LIMIT): New macro.
10554         (grub_claim_heap): Claim memory up to `heaplimit'.
10556 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10558         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10559         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10560         (_start): Likewise.
10561         (grub_arch_modules_addr): Return address after `_end'.
10562         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10563         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10564         (add_segments): Calculate `_end' from phdr size and location.
10565         (ALIGN_UP): Moved to ...
10566         * include/grub/misc.h: here.
10567         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10568         New macro.
10569         (GRUB_IEEE1275_MODULE_BASE): Removed.
10571 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10573         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10574         loop boundary.
10576 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10578         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10579         All users updated.
10580         (grub_elf64_load_hook_t): Likewise.
10581         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10582         debug output.
10584 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10586         * kern/mm.c: Update copyright.
10587         (grub_mm_debug): Correct syntax error.
10588         (grub_mm_dump_free): New function.
10589         (grub_debug_free): Call `grub_free'.
10590         * include/grub/mm.h: Update copyright.
10591         (grub_mm_dump_free): Add declaration.
10593 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10595         * include/grub/ieee1275/ieee1275.h: Update copyright.
10596         * kern/powerpc/ieee1275/init.c: Likewise.
10597         * kern/powerpc/ieee1275/openfw.c: Likewise.
10599         * loader/powerpc/ieee1275/linux.c: Likewise.
10600         * include/grub/elfload.h: Likewise.
10601         * kern/elf.c: Likewise.
10602         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10603         callers.
10604         (grub_elf64_load): Likewise.
10605         (grub_elf32_load_segment): Move to a nested function.
10606         (grub_elf64_load_segment): Likewise.
10608 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10610         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10611         prototype.
10612         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10613         (grub_heap_len): Likewise.
10614         (HEAP_SIZE): New macro.
10615         (grub_claim_heap): New function.
10616         (grub_machine_init): Don't claim heap directly.  Call
10617         `grub_claim_heap'.
10618         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10619         (grub_available_iterate): New function.
10621 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10623         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10624         * configure.ac: Use it for testing the HOST and TARGET compilers.
10626 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10628         * Makefile.in (enable_grub_emu): New variable.
10629         * configure.ac (--enable-grub-emu): New option.
10630         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10631         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10632         * conf/i386-pc.rmk: Likewise.
10633         * conf/powerpc-ieee1275.rmk: Likewise.
10634         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10636 2006-12-12  Marco Gerards  <marco@gnu.org>
10638         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10640         * kern/env.c (grub_env_unset): Don't free the member `value' when
10641         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10642         pointer.
10644         * normal/main.c (current_menu): Removed.
10645         (free_menu): Unset the `menu' environment variable.
10646         (grub_normal_menu_addentry): Make use of the environment variable
10647         `menu', instead of using the global `current_menu'.  Allocate
10648         memory for the sourcecode of this entry.
10649         (read_config_file): New argument `nested', changed all callers.
10650         Only in the case of a new context, initialize a new menu.  Set the
10651         `menu' environment variable.
10652         (grub_normal_execute): Don't set and unset the environment
10653         variable `menu' here anymore.  Only free the menu when leaving the
10654         context.
10656         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10657         leak.
10659 2006-12-11  Marco Gerards  <marco@gnu.org>
10661         * normal/menu_entry.c (run): Fix off by one bug so the last line
10662         is executed.  Move the loader check to outside the loop.
10664 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10666         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10668 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10670         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10671         the number of sectors.  Reported by Andrey Shuvikov
10672         <mr_hyro@yahoo.com>.
10674 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10676         * kern/disk.c (grub_disk_read): When there is a read error, always
10677         try to read only the necessary data.
10679         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10680         disk/raid.c.
10681         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10682         prototype.
10683         [GRUB_UTIL] (grub_raid_fini): Likewise.
10684         [GRUB_UTIL] (grub_lvm_init): Likewise.
10685         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10686         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10687         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10688         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10689         and grub_raid_fini().
10691 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10693         * include/grub/types.h (__unused): Rename to UNUSED.
10694         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10695         (grub_elf64_size): Likewise.
10697 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10699         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10700         grub_error_push and grub_error_pop in the error-handling path.
10701         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10702         length.
10704 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10706         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10707         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10708         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10709         (kernel_elf_SOURCES): Likewise.
10710         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10711         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10712         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10713         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10714         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10715         (elf_mod_SOURCES): New variable.
10716         (elf_mod_CFLAGS): Likewise.
10717         (elf_mod_LDFLAGS): Likewise.
10718         * include/grub/types.h (__unused): New macro.
10719         * include/grub/elfload.h: New file.
10720         * kern/elf.c: Likewise.
10721         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10722         (ELF32_LOADMASK): New macro.
10723         (ELF64_LOADMASK): Likewise.
10724         (vmlinux): Removed.
10725         (grub_linux_load32): New function.
10726         (grub_linux_load64): Likewise.
10727         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10728         Use grub_elf_t instead of grub_file_t.
10730 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10732         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10733         `catch_result' to struct set_color_args.
10735 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10737         * normal/menu.c: Include grub/script.h.
10738         * normal/menu_entry.c: Likewise.
10739         * include/grub/normal.h: Do not include grub/script.h.
10741 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10743         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10745 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10747         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10748         disk.
10749         (grub_disk_close): Print debug messages when closing a disk.
10750         (grub_disk_read): Print debug messages when disk read fails.
10751         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10752         filesystem type.
10753         * kern/partition.c: Include misc.h.
10754         (grub_partition_iterate): Print debug messages when detecting
10755         partition type.
10757 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10759         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10760         is negative.
10761         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10763 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10765         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10766         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10768 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10770         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10771         instead of sizeof(lv). Patch by Michael Guntsche.
10773 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10775         * disk/lvm.c: Rename VGS to VG_LIST.
10776         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10777         (grub_lvm_open): Likewise.
10778         Thanks to Michael Guntsche for finding this bug.
10780 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10782         * configure.ac (AC_INIT): Bumped to 1.95.
10784 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10786         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10787         with "/dev/.static/dev/md".
10789 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10791         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10792         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10793         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10794         DRIVE_NAME are always freed.
10796         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10797         DOS_PART, as a DOS partition is counted from one instead of zero
10798         now. Reported by Robert Millan.
10800 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10802         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10803         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10804         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10805         string returned by grub_guess_root_device.
10806         * util/i386/pc/grub-setup.c: Likewise.
10807         * util/i386/pc/grub-probefs.c: Likewise.
10809         * util/i386/pc/grub-probefs.c: Rename to ...
10810         * util/i386/pc/grub-probe.c: ... this.
10811         * DISTLIST: Remove grub-probefs, add grub-probe.
10812         * conf/i386-efi.rmk: Likewise.
10813         * conf/i386-pc.rmk: Likewise.
10814         * util/i386/pc/grub-install.in: Likewise.
10816         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10817         choose which information we want to print.
10819 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10821         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10822         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10823         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10824         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10825         video/readers/tga.c and video/i386/pc/vbeutil.c.
10827 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10829         Added support for RAID and LVM.
10831         * disk/lvm.c: New file.
10832         * disk/raid.c: Likewise.
10833         * include/grub/lvm.h: Likewise.
10834         * include/grub/raid.h: Likewise.
10835         * include/grub/util/lvm.h: Likewise.
10836         * include/grub/util/raid.h: Likewise.
10837         * util/lvm.c: Likewise.
10838         * util/raid.c: Likewise.
10840         * include/grub/disk.h (grub_disk_dev_id): Add
10841         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10842         (grub_disk_get_size): New prototype.
10843         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10844         returns a partition.
10845         (grub_disk_get_size): New function.
10847         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10848         verbatim if grub_install_dos_part is -2.
10850         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10851         and LVM devices.
10853         * util/i386/pc/grub-setup.c (setup): New argument
10854         MUST_EMBED. Force embedding of GRUB when the argument is
10855         true. Close FILE before returning.
10856         (main): Add support for RAID and LVM.
10858         * conf/common.rmk: Add RAID and LVM modules.
10859         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10860         util/lvm.c.
10861         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10863         * kern/misc.c (grub_strstr): New function.
10864         * include/grub/misc.h (grub_strstr): New prototype.
10866 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10868         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10870 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10872         * kern/misc.c (grub_strtoull): Guess the base only if not
10873         specified.
10875 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10877         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10878         PowerMac support.
10880 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10882         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10884         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10885         Remove `flags' argument.  All callers changed.
10886         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10887         (IEEE1275_IHANDLE_INVALID): New variable.
10888         (IEEE1275_CELL_INVALID): New variable.
10889         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10890         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10891         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10892         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10893         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10894         codes from Open Firmware.  All callers updated.
10895         (grub_ieee1275_next_property): Directly return Open Firmware return
10896         code.
10897         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10898         Standardize error checking from `grub_ieee1275_get_property'.
10899         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10900         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10902 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10904         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10905         `instance_to_package_args' to `instance_to_path_args'.
10907         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10908         `grub_ieee1275_chosen'.
10910         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10911         `grub_ieee1275_interpret'.
10913 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10915         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10917 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10919         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10920         (__cmpdi): Likewise.
10922         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10923         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10924         `grub_ssize_t'.
10926         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10928         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10929         to type `grub_ssize_t'.
10930         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10932 2006-09-22  Marco Gerards  <marco@gnu.org>
10934         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10935         newlines.
10937 2006-09-22  Marco Gerards  <marco@gnu.org>
10939         * commands/echo.c: New file.
10941         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10943         * conf/common.rmk (echo_mod_SOURCES): New variable.
10944         (echo_mod_CFLAGS): Likewise.
10945         (echo_mod_LDFLAGS): Likewise.
10947 2006-09-22  Marco Gerards  <marco@gnu.org>
10949         * normal/main.c (get_line): Malloc memory instead of using
10950         preallocated memory.  Removed the arguments `cmdline' and
10951         `max_len'.  Updated all callers.
10953 2006-09-22  Marco Gerards  <marco@gnu.org>
10955         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10956         (normal_mod_DEPENDENCIES): Likewise.
10958         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10959         (normal_mod_DEPENDENCIES): Likewise.
10961         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10963 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10965         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10966         programs.
10967         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10968         (normal_mod_DEPENDENCIES): Likewise.
10969         * conf/i386-pc.mk: Regenerate.
10970         * conf/i386-efi.mk: Likewise
10971         * conf/common.mk: Likewise.
10972         * conf/powerpc-ieee1275.mk: Likewise.
10973         * conf/sparc64-ieee1275.mk: Likewise.
10975 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10977         Sync with i386 version.
10978         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10979         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10981 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10983         Import from GRUB Legacy (lib/device.c):
10984         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10985         (init_device_map) [__linux__]: Add support for I2O devices.
10987 2006-09-14  Marco Gerards  <marco@gnu.org>
10989         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10990         `-melf_i386'.
10992 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10994         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10995         /boot/grub/*.lst.
10997         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10999         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11000         before adding it to device.map.
11002 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11004         * genmk.rb: Let GCC generate dependencies the first time it
11005         compiles a file; using the -MD option.
11006         * conf/common.mk: Regenerate.
11007         * conf/i386-pc.mk: Likewise.
11008         * conf/i386-efi.mk: Likewise.
11009         * conf/powerpc-ieee1275.mk: Likewise.
11010         * conf/sparc64-ieee1275.mk: Likewise.
11012 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11014         Move the prototypes of grub_setjmp and grub_longjmp to
11015         cpu/setjmp.h, so that each architecture may specify different
11016         attributes.
11018         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11019         (grub_longjmp): Likewise.
11020         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11021         (grub_longjmp): Likewise.
11022         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11023         (grub_longjmp): Likewise.
11025         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11026         [!GRUB_UTIL] (grub_longjmp): Removed.
11028 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11030         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11031         "color!" method does not return any value.
11033 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11035         * include/grub/bitmap.h: New file.
11037         * include/grub/i386/pc/vbeutil.h: Likewise.
11039         * video/bitmap.c: Likewise.
11041         * video/readers/tga.c: Likewise.
11043         * video/i386/pc/vbeutil.c: Likewise.
11045         * commands/videotest.c: Code cleanup and updated to reflect to new
11046         video API.
11048         * term/gfxterm.c: Likewise.
11050         * video/video.c: Likewise.
11052         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11053         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11054         (bitmap_mod_SOURCES): New entry.
11055         (bitmap_mod_CFLAGS): Likewise.
11056         (bitmap_mod_LDFLAGS): Likewise.
11057         (tga_mod_SOURCES): Likewise.
11058         (tga_mod_CFLAGS): Likewise.
11059         (tga_mod_LDFLAGS): Likewise.
11061         * include/grub/video.h (grub_video_blit_operators): New enum type.
11062         (grub_video_render_target): Changed as forward declaration and moved
11063         actual definition to be video driver specific.
11064         (grub_video_adapter.blit_bitmap): Added blitting operator.
11065         (grub_video_adapter.blit_render_target): Likewise.
11066         (grub_video_blit_bitmap): Likewise.
11067         (grub_video_blit_render_target): Likewise.
11069         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11070         driver specific render target definition.
11071         (grub_video_vbe_map_rgba): Added driver internal helper.
11072         (grub_video_vbe_unmap_color): Updated to use
11073         grub_video_i386_vbeblit_info.
11074         (grub_video_vbe_get_video_ptr): Likewise.
11076         * include/grub/i386/pc/vbeblit.h
11077         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11078         grub_video_i386_vbeblit_info.
11079         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11080         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11081         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11082         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11083         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11084         (grub_video_i386_vbeblit_index_index): Likewise.
11085         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11086         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11087         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11088         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11089         operator.
11090         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11091         operator.
11093         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11094         include/grub/i386/pc/vbeblit.h.
11096         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11097         Updated to use grub_video_i386_vbeblit_info.
11098         (grub_video_i386_vbefill_R8G8B8): Likewise.
11099         (grub_video_i386_vbefill_index): Likewise.
11100         (grub_video_i386_vbefill): Added generic filler.
11102         * video/i386/pc/vbefill.c: Updated to reflect changes on
11103         include/grub/i386/pc/vbefill.h.
11105         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11106         grub_video_i386_vbeblit_info.
11107         (grub_video_vbe_unmap_color): Likewise.
11108         (grub_video_vbe_blit_glyph): Likewise.
11109         (grub_video_vbe_scroll): Likewise.
11110         (grub_video_vbe_draw_pixel): Removed function.
11111         (grub_video_vbe_get_pixel): Likewise.
11112         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11113         updated code to use it.
11114         (common_blitter): Added common blitter for render target and bitmap.
11115         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11116         (grub_video_vbe_blit_render_target): Likewise.
11118 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11120         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11121         is in text mode if there is no console control protocol instance
11122         available.
11124 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11126         * include/grub/video.h: Code cleanup.
11128         * include/grub/i386/pc/vbe.h: Likewise.
11130         * video/i386/pc/vbe.c: Likewise.
11132         * video/i386/pc/vbeblit.c: Likewise.
11134         * video/i386/pc/vbefill.c: Likewise.
11136         * video/video.c: Likewise.  Also added more comments.
11138 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11140         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11141         (struct grub_biosdisk_dap): Likewise.
11143         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11144         linkage settings for all functions.
11146 2006-07-12  Marco Gerards  <marco@gnu.org>
11148         * configure.ac (--enable-mm-debug): Fix typo.
11150         * genkernsyms.sh.in: Use proper quoting for `CC'.
11152 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11154         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11155         (normal_mod_ASFLAGS): Remove "-m32".
11157 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11159         * util/misc.c: Include config.h.
11160         [!HAVE_MEMALIGN]: Do not include malloc.h.
11161         (grub_memalign): Use posix_memalign, if present. Then, use
11162         memalign, if present. Otherwise, emit an error.
11164         * util/grub-emu.c: Do not include malloc.h.
11166         * include/grub/util/misc.h: Include unistd.h. This is required for
11167         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11168         D. Eades III <hde@foobar-qux.org>.
11170         * configure.ac (AC_GNU_SOURCE): Added.
11171         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11172         type.
11174 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11176         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11177         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11179 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11181         * include/grub/types.h (grub_host_addr_t): Rename to
11182         grub_target_addr_t.
11183         (grub_host_off_t): Rename to grub_target_off_t.
11184         (grub_host_size_t): Rename to grub_target_size_t.
11185         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11186         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11188         * include/grub/kernel.h (struct grub_module_header): Change type
11189         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11190         (grub_module_info): Likewise.
11192 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11194         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11195         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11196         Velazquez <jesus.velazquez@gmail.com>.
11198 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11200         Count partitions from 1 instead of 0 in the string representation
11201         of partitions. Still use 0-based internally.
11203         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11204         (sun_partition_map_iterate): Use grub_partition_t instead of
11205         struct grub_partition *. Cast DESC->START_CYLINDER to
11206         grub_uint64_t after converting the endian.
11207         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11208         (sun_partition_map_get_name): Add 1 to P->INDEX.
11210         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11211         PCDATA->DOS_PART.
11212         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11214         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11215         zero instead of one.
11216         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11217         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11219         * partmap/apple.c (apple_partition_map_iterate): Change the type
11220         of POS to unsigned.
11221         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11222         (apple_partition_map_get_name): Add 1 into P->INDEX.
11224         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11225         of POS to unsigned.
11226         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11227         calculate the offset of a partition.
11228         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11229         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11231         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11232         SECTOR to grub_disk_addr_t.
11233         (acorn_partition_map_iterate): Likewise.
11234         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11235         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11236         top.
11237         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11239         * kern/i386/pc/init.c (make_install_device): Add 1 into
11240         GRUB_INSTALL_DOS_PART.
11242         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11243         conditional.
11245 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11247         Clean up the code to support 64-bit addressing in disks and
11248         files. This change is not enough for filesystems yet.
11250         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11251         type of "start" to grub_uint64_t.
11252         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11253         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11254         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11255         convert addresses.
11257         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11258         to grub_disk_addr_t.
11260         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11261         string.
11263         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11265         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11266         to char *.
11268         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11270         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11272         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11274         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11275         to grub_off_t, to detect an error from grub_file_seek.
11276         (grub_multiboot_load_elf32): Likewise.
11278         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11279         maximum unsigned long value when an overflow is detected.
11280         (grub_strtoull): New function.
11281         (grub_divmod64): Likewise.
11282         (grub_lltoa): use grub_divmod64.
11284         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11285         grub_disk_addr_t.
11286         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11287         the pointer to next character. Use grub_strtoull instead of
11288         grub_strtoul.
11289         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11290         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11291         respectively.
11293         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11294         return value is signed.
11295         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11296         test if OFFSET is less than zero, as OFFSET is unsigned now.
11298         * kern/disk.c (struct grub_disk_cache): Change the type of
11299         "sector" to grub_disk_addr_t.
11300         (grub_disk_cache_get_index): Change the type of SECTOR to
11301         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11302         unsigned after shifting.
11303         (grub_disk_cache_invalidate): Change the type of SECTOR to
11304         grub_disk_addr_t.
11305         (grub_disk_cache_unlock): Likewise.
11306         (grub_disk_cache_store): Likewise.
11307         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11308         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11309         grub_disk_addr_t and grub_uint64_t, respectively.
11310         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11311         body, as the value of OFFSET is tweaked by
11312         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11313         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11314         respectively.
11315         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11316         body, as the value of OFFSET is tweaked by
11317         grub_disk_check_range. Change the types of LEN and N to
11318         grub_size_t.
11320         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11321         and "saved_offset" to grub_off_t.
11322         (test_header): Cast BUF to char *.
11323         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11324         to char *.
11325         (grub_gzio_read): Change the types of OFFSET and SIZE to
11326         grub_off_t and grub_size_t, respectively.
11328         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11329         Removed.
11330         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11331         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11332         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11333         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11334         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11336         * include/grub/types.h (grub_off_t): Unconditionally set to
11337         grub_uint64_t.
11338         (grub_disk_addr_t): Changed to grub_uint64_t.
11340         * include/grub/partition.h (struct grub_partition): Change the
11341         types of "start", "len" and "offset" to grub_disk_addr_t,
11342         grub_uint64_t and grub_disk_addr_t, respectively.
11343         (grub_partition_get_start): Return grub_disk_addr_t.
11344         (grub_partition_get_len): Return grub_uint64_t.
11346         * include/grub/misc.h (grub_strtoull): New prototype.
11347         (grub_divmod64): Likewise.
11349         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11350         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11351         grub_off_t, respectively.
11352         All callers and references changed.
11354         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11355         grub_size_t in "read".
11356         All callers and references changed.
11358         * include/grub/file.h (struct grub_file): Change the types of
11359         "offset" and "size" to grub_off_t and grub_off_t,
11360         respectively. Change the type of SECTOR to grub_disk_addr_t in
11361         "read_hook".
11362         (grub_file_read): Change the type of LEN to grub_size_t.
11363         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11364         grub_off_t.
11365         (grub_file_size): Return grub_off_t.
11366         (grub_file_tell): Likewise.
11367         All callers and references changed.
11369         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11370         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11371         "write".
11372         (struct grub_disk): Change the type of "total_sectors" to
11373         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11374         "read_hook".
11375         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11376         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11377         (grub_disk_write): Likewise.
11378         All callers and references changed.
11380         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11381         char * for grub_strncmp to silence gcc.
11382         (grub_iso9660_mount): Likewise.
11383         (grub_iso9660_mount): Likewise.
11384         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11385         return statement.
11386         (grub_iso9660_iterate_dir): Likewise.
11387         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11389         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11390         LEN to grub_disk_addr_t and grub_size_t, respectively.
11392         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11394         * fs/jfs.c (grub_jfs_read_file): Likewise.
11396         * fs/minix.c (grub_jfs_read_file): Likewise.
11398         * fs/sfs.c (grub_jfs_read_file): Likewise.
11400         * fs/ufs.c (grub_jfs_read_file): Likewise.
11402         * fs/xfs.c (grub_jfs_read_file): Likewise.
11404         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11405         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11406         respectively.
11408         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11409         BLKNR to -1 instead of returning GRUB_ERRNO.
11410         (grub_ext2_read_file): Change the types of SECTOR and
11411         LEN to grub_disk_addr_t and grub_size_t, respectively.
11413         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11414         LEN to grub_disk_addr_t and grub_size_t, respectively.
11416         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11417         grub_file_read.
11419         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11420         string. Do not cast SECTOR explicitly.
11422         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11423         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11424         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11425         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11426         over 2TB and LBA mode is not supported, raise an error.
11427         (get_safe_sectors): New function.
11428         (grub_biosdisk_read): Use get_safe_sectors.
11429         (grub_biosdisk_write): Likewise.
11431         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11432         (grub_efidisk_write): Likewise.
11434         * disk/loopback.c (delete_loopback): Cosmetic changes.
11435         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11436         correctly.
11437         (grub_loopback_open): Likewise.
11438         (grub_loopback_read): Likewise. Also, change the type of POS to
11439         grub_off_t, and fix the usage of grub_memset.
11441         * commands/i386/pc/play.c: Include grub/machine/time.h.
11443         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11444         print FILE->SIZE.
11446         * commands/configfile.c: Include grub/env.h.
11448         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11449         GRUB_ERRNO directly instead. Change the type of POS to
11450         grub_off_t. Follow the coding standard.
11452         * commands/blocklist.c: Include grub/partition.h.
11453         (grub_cmd_blocklist): Return an error if the underlying device is
11454         not a disk. Take the starting sector of a partition into account,
11455         if a partition is used.
11457         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11458         a length field.
11459         (lba_mode): Support 64-bit addresses.
11460         (chs_mode): Likewise.
11461         (copy_buffer): Adapted to the new offsets of a length field and a
11462         segment field.
11463         (blocklist_default_start): Allocate 64-bit space.
11465         * boot/i386/pc/boot.S (force_lba): Removed.
11466         (boot_drive): Moved to under KERNEL_SECTOR.
11467         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11468         space.
11469         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11470         is useless.
11471         (lba_mode): Refactored to support a 64-bit address. More size
11472         optimization.
11473         (setup_sectors): Likewise.
11475 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11477         * DISTLIST: Added include/grub/i386/linux.h. Removed
11478         include/grub/i386/pc/linux.h
11480         * configure.ac (AC_INIT): Bumped to 1.94.
11482         * config.guess: Updated from gnulib.
11483         * config.sub: Likewise.
11484         * install-sh: Likewise.
11485         * mkinstalldirs: Likewise.
11487 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11489         * conf/common.rmk (grub_modules_init.lst): Depended on
11490         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11491         MODSRCFILES.
11493         * genmk.rb (PModule::rule): Reverted the previous change.
11495 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11497         * conf/common.rmk (grub_modules_init.lst): Depends on
11498         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11499         that the target does not exist before producing.
11500         (grub_modules_init.h): Remove the target before generating.
11501         (grub_emu_init.c): Likewise.
11503         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11505 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11507         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11508         for the target-specific tests. Make sure that we also have the
11509         up-to-date target variables for those tests.
11511 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11513         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11514         (PModule::rule): Likewise.
11516 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11518         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11519         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11520         target-specific flags should be prefixed.
11521         (PModule::rule): Likewise.
11523 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11525         * configure.ac (CMP): Check if cmp is available explicitly.
11527 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11529         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11530         (target_cpu): New variable.
11531         (pkglibdir): Use target_cpu instead of host_cpu.
11533         * util/i386/pc/grub-install.in (host_cpu): Removed.
11534         (target_cpu): New variable.
11535         (pkglibdir): Use target_cpu instead of host_cpu.
11537         * util/genmoddep.c: Removed.
11539         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11540         instead of GRUB_HOST_SIZEOF_VOID_P.
11541         * kern/dl.c: Likewise.
11543         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11544         ...
11545         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11546         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11547         (GRUB_TARGET_SIZEOF_LONG): ... this.
11548         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11549         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11550         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11551         to ...
11552         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11553         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11554         (GRUB_TARGET_SIZEOF_LONG): ... this.
11555         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11556         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11557         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11558         to ...
11559         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11560         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11561         (GRUB_TARGET_SIZEOF_LONG): ... this.
11562         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11563         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11565         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11566         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11567         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11568         instead of GRUB_HOST_SIZEOF_LONG.
11569         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11570         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11571         GRUB_CPU_WORDS_BIGENDIAN.
11572         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11573         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11574         grub_host_ssize_t.
11576         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11577         (genmoddep_SOURCES): Likewise.
11578         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11579         (genmoddep_SOURCES): Likewise.
11580         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11581         (genmoddep_SOURCES): Likewise.
11582         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11583         Likewise.
11584         (genmoddep_SOURCES): Likewise.
11586         * genmoddep.awk: New file.
11588         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11589         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11590         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11591         (PModule::rule): Likewise.
11592         (Program::rule): Likewise.
11593         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11594         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11595         respectively.
11597         * configure.ac: Rewritten intensively to use host and target
11598         instead of build and host, respectively.
11600         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11601         (host_cpu): Removed.
11602         (target_cpu): New variable.
11603         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11604         (BUILD_CC): Removed.
11605         (BUILD_CFLAGS): Likewise.
11606         (BUILD_CPPFLAGS): Likewise.
11607         (TARGET_CC): New variable.
11608         (TARGET_CFLAGS): Likewise.
11609         (TARGET_CPPFLAGS): Likewise.
11610         (TARGET_LDFLAGS): Likewise.
11611         (AWK): Likewise.
11612         (include): Use target_cpu instead of host_cpu.
11613         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11615         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11617 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11619         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11620         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11621         field 'false' to 'exec_on_false'.
11622         (grub_script_create_cmdif): Renamed argument names to reflect above
11623         changes.
11625         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11627         * normal/script.c (grub_script_create_cmdif): Likewise.
11629 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11631         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11632         top.
11633         (grub_hfsplus_btree_recptr): Likewise.
11634         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11635         FILEBLOCK both to pass a block number and store next block
11636         number.
11637         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11638         overflow file correctly. Specify errors appropriately, because
11639         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11640         grub_hfsplus_btree_recptr to get the pointer to a found key.
11641         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11642         is found.
11644         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11645         linux.mod.
11646         (_linux_mod_SOURCES): New variable.
11647         (_linux_mod_CFLAGS): Likewise.
11648         (_linux_mod_LDFLAGS): Likewise.
11649         (linux_mod_SOURCES): Likewise.
11650         (linux_mod_CFLAGS): Likewise.
11651         (linux_mod_LDFLAGS): Likewise.
11653         * DISTLIST: Added loader/i386/efi/linux.c,
11654         loader/i386/efi/linux_normal.c and
11655         include/grub/i386/efi/loader.h.
11657         * loader/i386/efi/linux.c: New file.
11658         * loader/i386/efi/linux_normal.c: Likewise.
11659         * include/grub/i386/efi/loader.h: Likewise.
11661 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11663         * commands/blocklist.c: New file.
11665         * DISTLIST: Added commands/blocklist.c.
11667         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11668         color for the background, and a darker color for the foreground.
11669         (grub_console_checkkey): Return READ_KEY.
11670         (grub_console_cls): Set the background to
11671         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11673         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11675         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11676         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11678         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11679         prototype.
11681         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11682         BG. The spec is wrong again.
11684         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11685         prototype.
11686         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11688         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11689         commands/blocklist.c.
11690         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11692         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11693         (blocklist_mod_SOURCES): New variable.
11694         (blocklist_mod_CFLAGS): Likewise.
11695         (blocklist_mod_LDFLAGS): Likewise.
11697 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11699         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11700         duplication.
11701         (lba_mode): Use %eax more intensively to reduce the code size.
11703 2006-05-20  Marco Gerards  <marco@gnu.org>
11705         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11707         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11708         for `menuentry'.
11709         (script): Accept leading newlines.
11710         (newlines): New rule to describe 0 or more newlines.
11711         (commands): Accept `command' with trailing newline.  Fixed the
11712         order in which arguments were passed to `grub_script_add_cmd'.
11713         Accept commands separated by newlines.
11714         (function): Changed to accept newlines.
11715         (menuentry) Rewritten.
11717         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11718         front of the list, instead of to the end.
11720 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11722         * util/i386/pc/grub-install.in (bindir): New variable.
11723         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11724         Shaver <lbgwjl@gmail.com>.
11726 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11728         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11729         grub/machine/linux.h
11730         * loader/i386/pc/linux.c: Likewise.
11732         * include/grub/i386/pc/linux.h: Moved to ...
11733         * include/grub/i386/linux.h: ... here.
11735         * include/grub/i386/linux.h (struct linux_kernel_params): New
11736         struct.
11738 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11740         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11741         checking.
11742         (grub_video_vbe_blit_glyph): Likewise.
11743         (grub_video_vbe_blit_bitmap): Likewise.
11744         (grub_video_vbe_blit_render_target): Likewise.
11746 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11748         * configure.ac (--with-platform): Properly quote the square
11749         brackets.
11751 2006-05-08  Marco Gerards  <marco@gnu.org>
11753         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11754         this...
11755         (kernel_elf_HEADERS): ...to this.  Updated all users.
11756         (grubof_symlist.c): Renamed from this...
11757         (kernel_elf_symlist.c): ...to this.  Updated all users.
11758         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11759         (grubof_SOURCES): Renamed from this...
11760         (kernel_elf_SOURCES): ...to this.
11761         (grubof_HEADERS): Renamed from this...
11762         (kernel_elf_HEADERS): ...to this.
11763         (grubof_CFLAGS): Renamed from this...
11764         (kernel_elf_CFLAGS): ...to this.
11765         (grubof_ASFLAGS): Renamed from this...
11766         (kernel_elf_ASFLAGS): ...to this.
11767         (grubof_LDFLAGS): Renamed from this...
11768         (kernel_elf_LDFLAGS): ...to this.
11770         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11771         this...
11772         (kernel_elf_HEADERS): ...to this.  Updated all users.
11773         (grubof_symlist.c): Renamed from this...
11774         (kernel_elf_symlist.c): ...to this.  Updated all users.
11775         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11776         (grubof_SOURCES): Renamed from this...
11777         (kernel_elf_SOURCES): ...to this.
11778         (grubof_HEADERS): Renamed from this...
11779         (kernel_elf_HEADERS): ...to this.
11780         (grubof_CFLAGS): Renamed from this...
11781         (kernel_elf_CFLAGS): ...to this.
11782         (grubof_ASFLAGS): Renamed from this...
11783         (kernel_elf_ASFLAGS): ...to this.
11784         (grubof_LDFLAGS): Renamed from this...
11785         (kernel_elf_LDFLAGS): ...to this.
11787         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11788         `kernel.elf' instead of `grubof'.
11790 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11792         Add --with-platform to configure. Use pkglibdir instead of
11793         pkgdatadir. This is reported by Roger Leigh.
11795         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11796         (host_vendor): Likewise.
11797         (host_os): Likewise.
11798         (pkgdatadir): Likewise.
11799         (platform): New variable.
11800         (pkglibdir): Likewise.
11801         Use PKGLIBDIR instead of PKGDATADIR.
11803         * util/i386/pc/grub-install.in (datadir): Removed.
11804         (host_vendor): Likewise.
11805         (host_os): Likewise.
11806         (pkgdatadir): Likewise.
11807         (platform): New variable.
11808         (pkglibdir): Likewise.
11809         Use PKGLIBDIR instead of PKGDATADIR.
11811         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11812         instead of GRUB_DATADIR.
11813         (main): Likewise.
11814         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11815         (main): Likewise.
11816         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11817         (main): Likewise.
11819         * configure.ac (--with-platform): New option.
11820         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11822         * Makefile.in: Include a makefile based on PLATFORM instead of
11823         HOST_VENDOR.
11824         (pkgdatadir): Not appended by the machine type.
11825         (pkglibdir): Appended by the machine type.
11826         (host_vendor): Removed.
11827         (platform): New variable.
11828         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11829         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11830         (uninstall): Likewise.
11832 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11834         Use the environment context in the menu. Remove the commands
11835         "default" and "timeout", and use variables instead.
11837         * normal/menu.c: Include grub/env.h.
11838         (print_entry): Cast TITLE to silence gcc.
11839         (get_timeout): New function.
11840         (set_timeout): Likewise.
11841         (get_entry_number): Likewise.
11842         (run_menu): Use a default entry, a fallback entry and a timeout
11843         in the environment variables "default", "fallback" and
11844         "timeout". Also, tweak the default entry if it is not within the
11845         current menu entries.
11846         (grub_menu_run): Use a fallback entry in the environment variable
11847         "fallback".
11849         * normal/main.c (read_config_file): Do not initialize
11850         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11851         NEWMENU->TIMEOUT.
11852         (grub_normal_execute): Use a data slot to store the menu.
11854         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11855         fallback_entry and timeout.
11856         (struct grub_menu_list): Removed.
11857         (grub_menu_list_t): Likewise.
11858         (struct grub_context): Likewise.
11859         (grub_context_t): Likewise.
11860         (grub_context_get): Likewise.
11861         (grub_context_get_current_menu): Likewise.
11862         (grub_context_push_menu): Likewise.
11863         (grub_context_pop_menu): Likewise.
11864         (grub_default_init): Likewise.
11865         (grub_default_fini): Likewise.
11866         (grub_timeout_init): Likewise.
11867         (grub_timeout_fini): Likewise.
11869         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11870         and timeout.mod.
11871         (normal_mod_SOURCES): Removed normal/context.c.
11873         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11874         commands/default.c, commands/timeout.c and normal/context.c.
11875         (normal_mod_SOURCES): Removed normal/context.c.
11877         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11878         commands/timeout.c and normal/context.c.
11879         (normal_mod_SOURCES): Removed normal/context.c.
11881         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11882         commands/default.c, commands/timeout.c and normal/context.c.
11883         (normal_mod_SOURCES): Removed normal/context.c.
11885         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11886         timeout.mod.
11887         (default_mod_SOURCES): Removed.
11888         (default_mod_CFLAGS): Likewise.
11889         (default_mod_LDFLAGS): Likewise.
11890         (timeout_mod_SOURCES): Removed.
11891         (timeout_mod_CFLAGS): Likewise.
11892         (timeout_mod_LDFLAGS): Likewise.
11894         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11895         normal/context.c.
11897         * commands/default.c: Removed.
11898         * commands/timeout.c: Likewise.
11899         * normal/context.c: Likewise.
11901 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11903         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11905 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11907         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11908         "next" to "prev" for readability.
11909         (struct grub_env_sorted_var): New struct.
11910         (grub_env_context): Renamed to ...
11911         (initial_context): ... this.
11912         (grub_env_var_context): Renamed to ...
11913         (current_context): ... this.
11914         (grub_env_find): Look only at CURRENT_CONTEXT.
11915         (grub_env_context_open): Rewritten to copy exported variables from
11916         previous context.
11917         (grub_env_context_close): Rewritten according to the new
11918         scheme. Also, add an assertion to prevent the initial context from
11919         removed.
11920         (grub_env_insert): Removed the code for the sorted list.
11921         (grub_env_remove): Likewise.
11922         (grub_env_export): Simply mark the variable with
11923         GRUB_ENV_VAR_GLOBAL.
11924         (grub_env_set): A cosmetic change for naming consistency.
11925         (grub_env_get): Likewise.
11926         (grub_env_unset): Likewise.
11927         (grub_env_iterate): Rewritten to sort variables within this
11928         function.
11929         (grub_register_variable_hook): Fixed for naming consistency. Call
11930         grub_env_find again, only if NAME is not found at the first time.
11931         (mangle_data_slot_name): New function.
11932         (grub_env_set_data_slot): Likewise.
11933         (grub_env_get_data_slot): Likewise.
11934         (grub_env_unset_data_slot): Likewise.
11936         * include/grub/env.h (grub_env_var_type): New enum.
11937         (GRUB_ENV_VAR_LOCAL): New constant.
11938         (GRUB_ENV_VAR_GLOBAL): Likewise.
11939         (GRUB_ENV_VAR_DATA): Likewise.
11940         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11941         "type".
11942         (grub_env_set): Replace VAR with NAME for consistency.
11943         (grub_register_variable_hook): Likewise.
11944         (grub_env_export): Specify the name of the argument.
11945         (grub_env_set_data_slot): New prototype.
11946         (grub_env_get_data_slot): Likewise.
11947         (grub_env_unset_data_slot): Likewise.
11949 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11951         Extend the loader so that GRUB can accept a loader which comes
11952         back to GRUB when a loaded image exits. Also, this change adds
11953         support for a chainloader on EFI.
11955         * term/efi/console.c: Include grub/misc.h.
11956         (grub_console_checkkey): Display a scan code on the top for
11957         debugging. This will be removed once the EFI port gets stable.
11958         Correct the scan code mapping.
11960         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11961         allocate memory from larger regions, in order to reduce the number
11962         of allocated regions. Otherwise, the MacOSX loader panics.
11963         (filter_memory_map): Avoid less than 1MB for compatibility with
11964         other loaders.
11965         (add_memory_regions): Allocate from the tail of a region, if
11966         possible, to avoid allocating a region near to 1MB, for the MacOSX
11967         loader.
11969         * kern/efi/init.c (grub_efi_set_prefix): Specify
11970         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11972         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11973         argument IMAGE_HANDLE and specify it to get a loaded image.
11974         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11975         grub_efi_get_loaded_image.
11976         (grub_efi_get_filename): Divide the length by the size of
11977         grub_efi_char16_t.
11978         (grub_efi_get_device_path): New function.
11979         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11980         the length by the size of grub_efi_char16_t for a file path device
11981         path node.
11983         * kern/loader.c (grub_loader_noreturn): New variable.
11984         (grub_loader_set): Accept a new argument NORETURN. Set
11985         GRUB_LOADER_NORETURN to NORETURN.
11986         All callers changed.
11987         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11988         grub_machine_fini.
11990         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11991         prototype.
11992         (grub_efi_get_loaded_image): Take an argument to specify an image
11993         handle.
11995         * include/grub/loader.h (grub_loader_set): Added one more argument
11996         NORETURN.
11998         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11999         instead of grub_efi_open_protocol.
12000         (grub_efidisk_get_device_name): Likewise.
12001         (grub_efidisk_close): Print a newline.
12002         (grub_efidisk_get_device_handle): Fixed to use
12003         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12004         GRUB_EFI_DEVICE_PATH_TYPE.
12006         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12007         * kern/efi/efi.c (device_path_guid): ... here.
12009         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12010         chain.mod.
12011         (kernel_mod_HEADERS): Added efi/disk.h.
12012         (_chain_mod_SOURCES): New variable.
12013         (_chain_mod_CFLAGS): Likewise.
12014         (_chain_mod_LDFLAGS): Likewise.
12015         (chain_mod_SOURCES): Likewise.
12016         (chain_mod_CFLAGS): Likewise.
12017         (chain_mod_LDFLAGS): Likewise.
12019         * DISTLIST: Added include/grub/efi/chainloader.h,
12020         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12022         * include/grub/efi/chainloader.h: New file.
12023         * loader/efi/chainloader.c: Likewise.
12024         * loader/efi/chainloader_normal.c: Likewise.
12026 2006-04-30  Marco Gerards  <marco@gnu.org>
12028         * commands/configfile.c (grub_cmd_source): New function.
12029         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12030         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12032 2006-04-30  Marco Gerards  <marco@gnu.org>
12034         * normal/execute.c (grub_script_execute_cmd): Change the return
12035         type to `grub_err_t'.  Correctly return the error.
12036         (grub_script_execute_cmdline): In case a command line is not a
12037         command or a function, try to interpret it as an assignment.
12039 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12041         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12042         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12043         skip a node whose name is obviously invalid as UTF-16,
12044         i.e. contains a NUL character. Stop the iteration when the last
12045         directory entry is found. Instead of using the return value of
12046         grub_hfsplus_btree_iterate_node, store the value in RET and use
12047         it, because the iterator can be stopped by the last directory
12048         entry.
12050 2006-04-30  Marco Gerards  <marco@gnu.org>
12052         * include/grub/env.h (grub_env_export): New prototype.  Reported
12053         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12055 2006-04-30  Marco Gerards  <marco@gnu.org>
12057         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12058         size of the extents in a catalog file record.
12060 2006-04-29  Marco Gerards  <marco@gnu.org>
12062         * commands/configfile.c (grub_cmd_configfile): Execute the
12063         configfile within its own context.
12065         * include/grub/env.h (grub_env_context_open): New prototype.
12066         (grub_env_context_close): Likewise.
12068         * kern/env.c (grub_env): Removed.
12069         (grub_env_sorted): Likewise.
12070         (grub_env_context): New variable.
12071         (grub_env_var_context): Likewise.
12072         (grub_env_find): Search both the active context and the global
12073         context.
12074         (grub_env_context_open): New function.
12075         (grub_env_context_close): Likewise.
12076         (grub_env_insert): Likewise.
12077         (grub_env_remove): Likewise.
12078         (grub_env_export): Likewise.
12079         (grub_env_set): Changed to use helper functions to avoid code
12080         duplication.
12081         (grub_env_iterate): Rewritten so both the current context and the
12082         global context are being used.
12084         * normal/command.c (export_command): New function.
12085         (grub_command_init): Register the `export' function.
12087 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12089         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12090         explicitly to suppress gcc's warnings.
12091         * fs/fat.c (grub_fat_find_dir): Likewise.
12092         (grub_fat_label): Likewise.
12093         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12094         (grub_xfs_mount): Likewise.
12095         (grub_xfs_label): Likewise.
12096         * fs/affs.c (grub_affs_mount): Likewise.
12097         (grub_affs_label): Likewise.
12098         (grub_affs_iterate_dir): Likewise.
12099         * fs/sfs.c (grub_sfs_mount): Likewise.
12100         (grub_sfs_iterate_dir): Likewise.
12101         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12102         * fs/hfs.c (grub_hfs_mount): Likewise.
12103         (grub_hfs_cmp_catkeys): Likewise.
12104         (grub_hfs_find_dir): Likewise.
12105         (grub_hfs_dir): Likewise.
12106         (grub_hfs_label): Likewise.
12107         * fs/jfs.c (grub_jfs_mount): Likewise.
12108         (grub_jfs_opendir): Likewise.
12109         (grub_jfs_getent): Likewise.
12110         (grub_jfs_lookup_symlink): Likewise.
12111         (grub_jfs_label): Likewise.
12112         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12113         (grub_hfsplus_iterate_dir): Likewise.
12114         (grub_hfsplus_btree_iterate_node): Made static.
12116         * util/grub-emu.c (prefix): New variable.
12117         (grub_machine_set_prefix): New function.
12118         (main): Do not set the environment variable "prefix" here. Only
12119         set PREFIX, which is used later by grub_machine_set_prefix.
12121         * include/grub/video.h: Do not include grub/symbol.h.
12122         (grub_video_register): Not exported. This symbol is not defined in
12123         the kernel.
12124         (grub_video_unregister): Likewise.
12125         (grub_video_iterate): Likewise.
12126         (grub_video_setup): Likewise.
12127         (grub_video_restore): Likewise.
12128         (grub_video_get_info): Likewise.
12129         (grub_video_get_blit_format): Likewise.
12130         (grub_video_set_palette): Likewise.
12131         (grub_video_get_palette): Likewise.
12132         (grub_video_set_viewport): Likewise.
12133         (grub_video_get_viewport): Likewise.
12134         (grub_video_map_color): Likewise.
12135         (grub_video_map_rgb): Likewise.
12136         (grub_video_map_rgba): Likewise.
12137         (grub_video_fill_rect): Likewise.
12138         (grub_video_blit_glyph): Likewise.
12139         (grub_video_blit_bitmap): Likewise.
12140         (grub_video_blit_render_target): Likewise.
12141         (grub_video_scroll): Likewise.
12142         (grub_video_swap_buffers): Likewise.
12143         (grub_video_create_render_target): Likewise.
12144         (grub_video_delete_render_target): Likewise.
12145         (grub_video_set_active_render_target): Likewise.
12147         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12148         Undefined.
12149         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12151         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12152         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12153         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12154         instead of $(srcdir)/genkernsyms.sh.
12156         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12157         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12158         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12159         instead of $(srcdir)/genkernsyms.sh.
12161         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12162         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12163         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12164         instead of $(srcdir)/genkernsyms.sh.
12166         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12167         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12168         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12169         instead of $(srcdir)/genkernsyms.sh.
12171         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12172         genkernsyms.sh.
12174         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12175         genkernsyms.sh.
12176         (gensymlist.sh): New target.
12177         (genkernsyms.sh): Likewise.
12179         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12180         genkernsyms.sh.in and gensymlist.sh.in.
12182         * genkernsyms.sh: Removed.
12183         * gensymlist.sh: Likewise.
12185         * genkernsyms.sh.in: New file.
12186         * gensymlist.sh.in: Likewise.
12188 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12190         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12191         clobber "prefix", since we may have already set it manually.
12193 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12195         * kern/misc.c (abort): New alias for grub_abort.
12197 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12199         A new machine-specific function "grub_machine_set_prefix" is
12200         defined. This is called after loading modules, so that a prefix
12201         initialization can use modules. Also, this change adds an
12202         intensive debugging feature for the memory manager via the
12203         configure option "--enable-mm-debug".
12205         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12206         PART.LEN.
12208         * kern/sparc64/ieee1275/init.c (abort): Removed.
12209         (grub_stop): Likewise.
12210         (grub_exit): New function.
12211         (grub_set_prefix): Renamed to ...
12212         (grub_machine_set_prefix): ... this.
12213         (grub_machine_init): Do not call grub_set_prefix.
12215         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12216         (grub_machine_set_prefix): ... this.
12217         (grub_machine_init): Do not call grub_set_prefix.
12219         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12220         (grub_machine_init): Do not set the prefix here.
12222         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12224         * kern/efi/init.c: Include grub/mm.h.
12225         (grub_efi_set_prefix): New function.
12227         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12228         (grub_efi_get_filename): New function.
12229         (grub_print_device_path): Renamed to ...
12230         (grub_efi_print_device_path): ... this.
12232         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12233         [MM_DEBUG] (grub_realloc): Likewise.
12234         [MM_DEBUG] (grub_free): Likewise.
12235         [MM_DEBUG] (grub_memalign): Likewise.
12236         [MM_DEBUG] (grub_mm_debug): New variable.
12237         [MM_DEBUG] (grub_debug_malloc): New function.
12238         [MM_DEBUG] (grub_debug_free): New function.
12239         [MM_DEBUG] (grub_debug_realloc): New function.
12240         [MM_DEBUG] (grub_debug_memalign): New function.
12242         * kern/misc.c (grub_abort): Print a newline to distinguish
12243         the message.
12245         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12246         grub_set_root_dev after loading modules. This is necessary when
12247         setting a prefix depends on modules.
12249         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12250         (grub_efi_print_device_path): ... this.
12251         (grub_efi_get_filename): New prototype.
12252         (grub_efi_set_prefix): Likewise.
12254         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12255         and grub/disk.h.
12256         (grub_efidisk_get_device_handle): New prototype.
12257         (grub_efidisk_get_device_name): Likewise.
12259         * include/grub/mm.h: Include config.h.
12260         (MM_DEBUG): Removed.
12261         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12262         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12263         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12264         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12265         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12266         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12267         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12268         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12269         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12271         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12273         * disk/efi/efidisk.c: Include grub/partition.h.
12274         (iterate_child_devices): New function.
12275         (add_device): First, compare only last device path nodes, so that
12276         devices are sorted by the types.
12277         (grub_efidisk_get_device_handle): New function.
12278         (grub_efidisk_get_device_name): Likewise.
12280         * configure.ac (--enable-mm-debug): New option to enable the
12281         memory manager debugging feature. This makes the binary much
12282         bigger, so is disabled by default.
12284 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12286         Use grub_abort instead of grub_stop, and grub_exit must be
12287         define in each architecture now. Also, this change adds support
12288         for EFI disks.
12290         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12291         (grub_getkey): New function.
12292         (grub_term_get_current): Likewise.
12294         * util/i386/pc/grub-setup.c: Include grub/term.h.
12295         (grub_getkey): New function.
12296         (grub_term_get_current): Likewise.
12298         * util/misc.c (grub_stop): Renamed to ...
12299         (grub_exit): ... this.
12301         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12302         (grub_exit): ... this.
12303         (grub_machine_init): Use grub_abort instead of abort.
12304         (grub_stop): Removed.
12306         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12307         abort.
12309         * kern/i386/pc/startup.S (grub_exit): New function.
12310         (cold_reboot): New label.
12312         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12313         (grub_efi_init): Call grub_efidisk_init.
12314         (grub_efi_fini): Call grub_efidisk_fini.
12316         * kern/efi/efi.c: Include grub/mm.h.
12317         (grub_efi_console_control_guid): Renamed to ...
12318         (console_control_guid): ... this.
12319         (grub_efi_loaded_image_guid): Renamed to ...
12320         (loaded_image_guid): ... this.
12321         (grub_efi_locate_handle): New function.
12322         (grub_efi_open_protocol): Likewise.
12323         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12324         GRUB_EFI_CONSOLE_CONTROL_GUID.
12325         (grub_efi_exit): Removed.
12326         (grub_stop): Likewise.
12327         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12328         (grub_exit): New function.
12329         (grub_print_device_path): Likewise.
12331         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12332         (grub_enter_rescue_mode): Register "exit".
12334         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12335         (grub_abort): New function.
12337         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12339         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12341         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12343         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12344         (grub_print_device_path): New prototype.
12345         (grub_efi_locate_handle): Likewise.
12346         (grub_efi_open_protocol): Likewise.
12348         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12349         * disk/efi/efidisk.c: Likewise.
12351         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12353         * include/grub/efi/console_control.h
12354         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12356         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12357         last 8 bytes as an array.
12358         (GRUB_EFI_DISK_IO_GUID): New macro.
12359         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12360         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12361         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12362         grub_uint8_t.
12363         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12364         (struct grub_efi_device_path): Rename the member "sub_type" to
12365         "subtype".
12366         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12367         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12368         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12369         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12370         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12371         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12372         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12373         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12374         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12375         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12376         (struct grub_efi_pci_device_path): New structure.
12377         (grub_efi_pci_device_path_t): New type.
12378         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12379         (struct grub_efi_pccard_device_path): New structure.
12380         (grub_efi_pccard_device_path_t): New type.
12381         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12382         (struct grub_efi_memory_mapped_device_path): New structure.
12383         (grub_efi_memory_mapped_device_path_t): New type.
12384         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12385         (struct grub_efi_vendor_device_path): New structure.
12386         (grub_efi_vendor_device_path_t): New type.
12387         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12388         (struct grub_efi_controller_device_path): New structure.
12389         (grub_efi_controller_device_path_t): New type.
12390         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12391         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12392         (struct grub_efi_acpi_device_path): New structure.
12393         (grub_efi_acpi_device_path_t): New type.
12394         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12395         (struct grub_efi_expanded_acpi_device_path): New structure.
12396         (grub_efi_expanded_acpi_device_path_t): New type.
12397         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12398         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12399         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12400         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12401         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12402         (struct grub_efi_atapi_device_path): New structure.
12403         (grub_efi_atapi_device_path_t): New type.
12404         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12405         (struct grub_efi_fibre_channel_device_path): New structure.
12406         (grub_efi_fibre_channel_device_path_t): New type.
12407         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12408         (struct grub_efi_1394_device_path): New structure.
12409         (grub_efi_1394_device_path_t): New type.
12410         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12411         (struct grub_efi_usb_device_path): New structure.
12412         (grub_efi_usb_device_path_t): New type.
12413         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12414         (struct grub_efi_usb_class_device_path): New structure.
12415         (grub_efi_usb_class_device_path_t): New type.
12416         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12417         (struct grub_efi_i2o_device_path): New structure.
12418         (grub_efi_i2o_device_path_t): New type.
12419         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12420         (struct grub_efi_mac_address_device_path): New structure.
12421         (grub_efi_mac_address_device_path_t): New type.
12422         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12423         (struct grub_efi_ipv4_device_path): New structure.
12424         (grub_efi_ipv4_device_path_t): New type.
12425         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12426         (struct grub_efi_ipv6_device_path): New structure.
12427         (grub_efi_ipv6_device_path_t): New type.
12428         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12429         (struct grub_efi_infiniband_device_path): New structure.
12430         (grub_efi_infiniband_device_path_t): New type.
12431         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12432         (struct grub_efi_uart_device_path): New structure.
12433         (grub_efi_uart_device_path_t): New type.
12434         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12435         (struct grub_efi_vendor_messaging_device_path): New structure.
12436         (grub_efi_vendor_messaging_device_path_t): New type.
12437         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12438         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12439         (struct grub_efi_hard_drive_device_path): New structure.
12440         (grub_efi_hard_drive_device_path_t): New type.
12441         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12442         (struct grub_efi_cdrom_device_path): New structure.
12443         (grub_efi_cdrom_device_path_t): New type.
12444         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12445         (struct grub_efi_vendor_media_device_path): New structure.
12446         (grub_efi_vendor_media_device_path_t): New type.
12447         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12448         (struct grub_efi_file_path_device_path): New structure.
12449         (grub_efi_file_path_device_path_t): New type.
12450         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12451         (struct grub_efi_protocol_device_path): New structure.
12452         (grub_efi_protocol_device_path_t): New type.
12453         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12454         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12455         (struct grub_efi_bios_device_path): New structure.
12456         (grub_efi_bios_device_path_t): New type.
12457         (struct grub_efi_disk_io): New structure.
12458         (grub_efi_disk_io_t): New type.
12459         (struct grub_efi_block_io_media): New structure.
12460         (grub_efi_block_io_media_t): New type.
12461         (struct grub_efi_block_io): New structure.
12462         (grub_efi_block_io_t): New type.
12464         * include/grub/misc.h (grub_stop): Removed.
12465         (grub_exit): New prototype.
12466         (grub_abort): Likewise.
12468         * include/grub/disk.h (enum grub_disk_dev_id): Added
12469         GRUB_DISK_DEVICE_EFIDISK_ID.
12471         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12472         disk/efi/efidisk.c.
12473         (kernel_syms.lst): Remove the target if an error occurs.
12475 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12477         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12478         as it was simply too buggy.
12480 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12482         * kern/misc.c (grub_lltoa): New function.
12483         (grub_vsprintf): Added support for the long long suffix,
12484         i.e. "ll".
12486 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12488         * Makefile.in (LDFLAGS): Add variable.
12489         (LD): Remove variable.
12490         * configure.ac: Add -m32 to LDFLAGS.
12491         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12492         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12493         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12494         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12495         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12496         variables.
12497         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12498         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12499         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12501 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12503         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12504         length for unknown glyph.
12506 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12508         Add support for pre-loaded modules into the EFI port.
12510         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12511         completely. Accept one more argument DIR. The caller has changed.
12513         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12515         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12516         (grub_efi_loaded_image_guid): New variable.
12517         (grub_efi_get_loaded_image): New function.
12518         (grub_arch_modules_addr): Likewise.
12520         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12521         prototype.
12523         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12524         (struct grub_efi_loaded_image): New structure.
12525         (grub_efi_loaded_image_t): New type.
12527 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12529         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12530         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12531         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12533 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12535         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12537 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12539         * DISTLIST: Added include/grub/efi/console.h,
12540         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12541         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12543         * include/grub/efi/console.h: New file.
12544         * include/grub/efi/time.h: Likewise.
12545         * include/grub/i386/efi/kernel.h: Likewise.
12546         * kern/efi/init.c: Likewise.
12547         * kern/efi/mm.c: Likewise.
12548         * term/efi/console.c: Likewise.
12550         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12551         (grub_stop): Removed.
12552         (grub_get_rtc): Likewise.
12553         (grub_machine_init): Simply call grub_efi_init.
12554         (grub_machine_fini): Call grub_efi_fini.
12556         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12557         (grub_efi_output_string): Removed.
12558         (grub_efi_stall): New function.
12559         (grub_stop): Likewise.
12560         (grub_get_rtc): Likewise.
12562         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12563         (grub_efi_stall): New prototype.
12564         (grub_efi_allocate_pages): Likewise.
12565         (grub_efi_free_pages): Likewise.
12566         (grub_efi_get_memory_map): Likewise.
12567         (grub_efi_mm_init): Likewise.
12568         (grub_efi_mm_fini): Likewise.
12569         (grub_efi_init): Likewise.
12570         (grub_efi_fini): Likewise.
12572         * include/grub/i386/efi/time.h: Do not include
12573         grub/symbol.h. Include grub/efi/time.h.
12574         (GRUB_TICKS_PER_SECOND): Removed.
12575         (grub_get_rtc): Likewise.
12577         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12578         Added padding. The EFI spec is buggy.
12579         (GRUB_EFI_BLACK): New macro.
12580         (GRUB_EFI_BLUE): Likewise.
12581         (GRUB_EFI_GREEN): Likewise.
12582         (GRUB_EFI_CYAN): Likewise.
12583         (GRUB_EFI_RED): Likewise.
12584         (GRUB_EFI_MAGENTA): Likewise.
12585         (GRUB_EFI_BROWN): Likewise.
12586         (GRUB_EFI_LIGHTGRAY): Likewise.
12587         (GRUB_EFI_BRIGHT): Likewise.
12588         (GRUB_EFI_DARKGRAY): Likewise.
12589         (GRUB_EFI_LIGHTBLUE): Likewise.
12590         (GRUB_EFI_LIGHTGREEN): Likewise.
12591         (GRUB_EFI_LIGHTCYAN): Likewise.
12592         (GRUB_EFI_LIGHTRED): Likewise.
12593         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12594         (GRUB_EFI_YELLOW): Likewise.
12595         (GRUB_EFI_WHITE): Likewise.
12596         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12597         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12598         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12599         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12600         (GRUB_EFI_BACKGROUND_RED): Likewise.
12601         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12602         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12603         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12604         (GRUB_EFI_TEXT_ATTR): Likewise.
12606         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12607         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12608         (kernel_mod_HEADERS): Added efi/time.h.
12610 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12612         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12613         include/grub/efi/api.h, include/grub/efi/console_control.h,
12614         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12615         include/grub/i386/efi/time.h, kern/efi/efi.c,
12616         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12617         and util/i386/efi/grub-mkimage.c.
12619         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12621         * genmk.rb (PModule#rule): Do not export symbols if
12622         #{prefix}_EXPORTS is set to "no".
12624         * conf/i386-efi.mk: New file.
12625         * conf/i386-efi.rmk: Likewise.
12626         * include/grub/efi/api.h: Likewise.
12627         * include/grub/efi/console_control.h: Likewise.
12628         * include/grub/efi/efi.h: Likewise.
12629         * include/grub/efi/pe32.h: Likewise.
12630         * include/grub/i386/efi/time.h: Likewise.
12631         * kern/efi/efi.c: Likewise.
12632         * kern/i386/efi/init.c: Likewise.
12633         * kern/i386/efi/startup.S: Likewise.
12634         * util/i386/efi/grub-mkimage.c: Likewise.
12636 2006-04-17  Marco Gerards  <marco@gnu.org>
12638         * include/grub/script.h: Include <grub/parser.h> and
12639         "grub_script.tab.h".
12640         (struct grub_lexer_param): New struct.
12641         (struct grub_parser_param): Likewise.
12642         (grub_script_create_arglist): Pass the state in an argument.
12643         (grub_script_add_arglist): Likewise.
12644         (grub_script_create_cmdline): Likewise.
12645         (grub_script_create_cmdblock): Likewise.
12646         (grub_script_create_cmdif): Likewise.
12647         (grub_script_create_cmdmenu): Likewise.
12648         (grub_script_add_cmd): Likewise.
12649         (grub_script_arg_add): Likewise.
12650         (grub_script_lexer_ref): Likewise.
12651         (grub_script_lexer_deref): Likewise.
12652         (grub_script_lexer_record_start): Likewise.
12653         (grub_script_lexer_record_stop): Likewise.
12654         (grub_script_mem_record): Likewise.
12655         (grub_script_mem_record_stop): Likewise.
12656         (grub_script_malloc): Likewise.
12657         (grub_script_yylex): Likewise.
12658         (grub_script_yyparse): Likewise.
12659         (grub_script_yyerror): Likewise.
12660         (grub_script_yylex): Likewise.
12661         (grub_script_lexer_init): Return the state.
12663         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12664         (grub_script_lexer_done): Likewise.
12665         (grub_script_lexer_getline): Likewise.
12666         (grub_script_lexer_refs): Likewise.
12667         (script): Likewise.
12668         (newscript): Likewise.
12669         (record): Likewise.
12670         (recording): Likewise.
12671         (recordpos): Likewise.
12672         (recordlen): Likewise.
12673         (grub_script_lexer_init): Return the state instead of setting
12674         global variables.
12675         (grub_script_lexer_ref): Use the newly added argument for state
12676         instead of globals.
12677         (grub_script_lexer_deref): Likewise.
12678         (grub_script_lexer_record_start): Likewise.
12679         (grub_script_lexer_record_stop): Likewise.
12680         (recordchar): Likewise.
12681         (nextchar): Likewise.
12682         (grub_script_yylex2): Likewise.
12683         (grub_script_yylex): Likewise.
12684         (grub_script_yyerror): Likewise.
12686         * normal/parser.y (func_mem): Removed variable.
12687         (menu_entry): Likewise.
12688         (err): Likewise.
12689         (%lex-param): New parser option.
12690         (%parse-param): Likewise.
12691         (script): Always return the AST.
12692         (argument): Pass the state around.
12693         (arguments): Likewise.
12694         (grubcmd): Likewise.
12695         (commands): Likewise.
12696         (function): Likewise.
12697         (menuentry): Likewise.
12698         (if_statement): Likewise.
12699         (if): Likewise.
12701         * normal/script.c (grub_script_memused): Removed variable.
12702         (grub_script_parsed): Likewise.
12703         (grub_script_malloc): Added a state argument.  Use that instead of
12704         global variables.
12705         (grub_script_mem_record): Likewise.
12706         (grub_script_mem_record_stop): Likewise.
12707         (grub_script_arg_add): Likewise.
12708         (grub_script_add_arglist): Likewise.
12709         (grub_script_create_cmdline): Likewise.
12710         (grub_script_create_cmdif): Likewise.
12711         (grub_script_create_cmdmenu): Likewise.
12712         (grub_script_add_cmd): Likewise.
12713         (grub_script_parse): Setup the state before calling the parser.
12715 2006-04-16  Marco Gerards  <marco@gnu.org>
12717         * normal/command.c (grub_command_init): Remove the title command.
12719         * normal/lexer.c (grub_script_yylex): Renamed from this...
12720         (grub_script_yylex2): ... to this.
12721         (grub_script_yylex): New function.  Temporary
12722         introduced to filter some tokens.
12723         (grub_script_yyerror): Print a newline.
12725         * normal/main.c (read_config_file): Output information about the
12726         lines that contain errors.  Wait for a key after all lines have
12727         been processed.  Don't return an empty menu.
12729         * normal/parser.y (func_mem): Don't initialize.
12730         (menu_entry): Likewise.
12731         (err): New variable.
12732         (script): Don't return anything when an error was encountered.
12733         (ws, returns): Removed rules.
12734         (argument): Disabled concatenated variable support.
12735         (arguments): Remove explicit separators.
12736         (grubcmd): Likewise.
12737         (function): Likewise.
12738         (menuentry): Likewise.
12739         (if): Likewise.
12740         (commands): Likewise.  Add error handling.
12742         * normal/script.c (grub_script_create_cmdline): If
12743         `grub_script_parsed' is 0, assume the parser encountered an error.
12745 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12747         * configure.ac: Add support for EFI. Fix the typo
12748         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12750 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12752         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12753         foreign multibyte characters should be shown correctly.
12755 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12757         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12758         calculation.
12759         (read_config_file): Made it to close file before returning.
12761 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12763         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12764         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12765         video/i386/pc/vbefill.c.
12767         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12768         video/i386/pc/vbefill.c.
12770         * include/grub/video.h (grub_video_blit_format): New enum.
12771         (grub_video_mode_info): Added new member blit_format.
12772         (grub_video_get_blit_format): New function prototype.
12774         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12775         function prototype.
12776         (grub_video_vbe_map_rgb): Likewise.
12777         (grub_video_vbe_unmap_color): Likewise.
12779         * include/grub/i386/pc/vbeblit.h: New file.
12781         * include/grub/i386/pc/vbefill.h: New file.
12783         * video/video.c (grub_video_get_blit_format): New function.
12784         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12785         (grub_video_vbe_map_rgb): Likewise.
12786         (grub_video_vbe_unmap_color): Likewise.
12788         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12789         optimized fills.
12790         (grub_video_vbe_blit_render_target): Changed to use more optimized
12791         blits.
12792         (grub_video_vbe_setup): Added detection for optimized settings.
12793         (grub_video_vbe_create_render_target): Likewise.
12795         * video/i386/pc/vbeblit.c: New file.
12797         * video/i386/pc/vbefill.c: New file.
12799 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12801         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12802         here...
12804         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12805         parsing to support both hex and dec ranges.  If filename was missing
12806         show usage information.
12808 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12810         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12811         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12813         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12814         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12815         (video_mod_SOURCES): Added.
12816         (video_mod_CFLAGS): Likewise.
12817         (video_mod_LDFLAGS): Likewise.
12818         (gfxterm_mod_SOURCES): Likewise.
12819         (gfxterm_mod_CFLAGS): Likewise.
12820         (gfxterm_mod_LDFLAGS): Likewise.
12821         (videotest_mod_SOURCES): Likewise.
12822         (videotest_mod_CFLAGS): Likewise.
12823         (videotest_mod_LDFLAGS): Likewise.
12824         (vesafb_mod_SOURCES): Removed.
12825         (vesafb_mod_CFLAGS): Likewise.
12826         (vesafb_mod_LDFLAGS): Likewise.
12827         (vga_mod_SOURCES): Likewise.
12828         (vga_mod_CFLAGS): Likewise.
12829         (vga_mod_LDFLAGS): Likewise.
12831         * commands/videotest.c: New file.
12833         * font/manager.c (fill_with_default_glyph): Modified to use
12834         grub_font_glyph.
12835         (grub_font_get_glyph): Likewise.
12836         (fontmanager): Renamed from this...
12837         (font_manager): ... to this.
12839         * include/grub/font.h (grub_font_glyph): Added new structure.
12840         (grub_font_get_glyph): Modified to use grub_font_glyph.
12842         * include/grub/misc.h (grub_abs): Added as inline function.
12844         * include/grub/video.h: New file.
12846         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12847         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12848         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12849         (grub_vbe_get_controller_info): Renamed from this...
12850         (grub_vbe_bios_get_controller_info): ... to this.
12851         (grub_vbe_get_mode_info): Renamed from this...
12852         (grub_vbe_bios_get_mode_info): ... to this.
12853         (grub_vbe_set_mode): Renamed from this...
12854         (grub_vbe_bios_set_mode): ... to this.
12855         (grub_vbe_get_mode): Renamed from this...
12856         (grub_vbe_bios_get_mode): ... to this.
12857         (grub_vbe_set_memory_window): Renamed from this...
12858         (grub_vbe_bios_set_memory_window): ... to this.
12859         (grub_vbe_get_memory_window): Renamed from this...
12860         (grub_vbe_bios_get_memory_window): ... to this.
12861         (grub_vbe_set_scanline_length): Renamed from this...
12862         (grub_vbe_set_scanline_length): ... to this.
12863         (grub_vbe_get_scanline_length): Renamed from this...
12864         (grub_vbe_bios_get_scanline_length): ... to this.
12865         (grub_vbe_set_display_start): Renamed from this...
12866         (grub_vbe_bios_set_display_start): ... to this.
12867         (grub_vbe_get_display_start): Renamed from this...
12868         (grub_vbe_bios_get_display_start): ... to this.
12869         (grub_vbe_set_palette_data): Renamed from this...
12870         (grub_vbe_bios_set_palette_data): ... to this.
12871         (grub_vbe_set_pixel_rgb): Removed.
12872         (grub_vbe_set_pixel_index): Likewise.
12874         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12875         from this...
12876         (grub_vbe_bios_get_controller_info): ... to this.
12877         (grub_vbe_get_mode_info): Renamed from this...
12878         (grub_vbe_bios_get_mode_info): ... to this.
12879         (grub_vbe_set_mode): Renamed from this...
12880         (grub_vbe_bios_set_mode): ... to this.
12881         (grub_vbe_get_mode): Renamed from this...
12882         (grub_vbe_bios_get_mode): ... to this.
12883         (grub_vbe_set_memory_window): Renamed from this...
12884         (grub_vbe_bios_set_memory_window): ... to this.
12885         (grub_vbe_get_memory_window): Renamed from this...
12886         (grub_vbe_bios_get_memory_window): ... to this.
12887         (grub_vbe_set_scanline_length): Renamed from this...
12888         (grub_vbe_set_scanline_length): ... to this.
12889         (grub_vbe_get_scanline_length): Renamed from this...
12890         (grub_vbe_bios_get_scanline_length): ... to this.
12891         (grub_vbe_set_display_start): Renamed from this...
12892         (grub_vbe_bios_set_display_start): ... to this.
12893         (grub_vbe_get_display_start): Renamed from this...
12894         (grub_vbe_bios_get_display_start): ... to this.
12895         (grub_vbe_set_palette_data): Renamed from this...
12896         (grub_vbe_bios_set_palette_data): ... to this.
12897         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12898         getting corrupted after calling it.  Added more pushes and pops.
12899         (grub_vbe_bios_set_mode): Likewise.
12900         (grub_vbe_bios_get_mode): Likewise.
12901         (grub_vbe_bios_get_memory_window): Likewise.
12902         (grub_vbe_bios_set_scanline_length): Likewise.
12903         (grub_vbe_bios_get_scanline_length): Likewise.
12904         (grub_vbe_bios_get_display_start): Likewise.
12905         (grub_vbe_bios_set_palette_data): Likewise.
12907         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12908         (cl_insert): Likewise.
12909         (cl_delete): Likewise.
12911         * term/gfxterm.c: New file.
12913         * term/i386/pc/vesafb.c: Removed file.
12915         * video/video.c: New file.
12917         * video/i386/pc/vbe.c (real2pm): Added new function.
12918         (grub_video_vbe_draw_pixel): Likewise.
12919         (grub_video_vbe_get_video_ptr): Likewise.
12920         (grub_video_vbe_get_pixel): Likewise
12921         (grub_video_vbe_init): Likewise.
12922         (grub_video_vbe_fini): Likewise.
12923         (grub_video_vbe_setup): Likewise.
12924         (grub_video_vbe_get_info): Likewise.
12925         (grub_video_vbe_set_palette): Likewise.
12926         (grub_video_vbe_get_palette): Likewise.
12927         (grub_video_vbe_set_viewport): Likewise.
12928         (grub_video_vbe_get_viewport): Likewise.
12929         (grub_video_vbe_map_color): Likewise.
12930         (grub_video_vbe_map_rgb): Likewise.
12931         (grub_video_vbe_map_rgba): Likewise.
12932         (grub_video_vbe_unmap_color): Likewise.
12933         (grub_video_vbe_fill_rect): Likewise.
12934         (grub_video_vbe_blit_glyph): Likewise.
12935         (grub_video_vbe_blit_bitmap): Likewise.
12936         (grub_video_vbe_blit_render_target): Likewise.
12937         (grub_video_vbe_scroll): Likewise.
12938         (grub_video_vbe_swap_buffers): Likewise.
12939         (grub_video_vbe_create_render_target): Likewise.
12940         (grub_video_vbe_delete_render_target): Likewise.
12941         (grub_video_vbe_set_active_render_target): Likewise.
12942         (grub_vbe_set_pixel_rgb): Remove function.
12943         (grub_vbe_set_pixel_index): Likewise.
12944         (index_color_mode): Remove static variable.
12945         (active_mode): Likewise.
12946         (framebuffer): Likewise.
12947         (bytes_per_scan_line): Likewise.
12948         (grub_video_vbe_adapter): Added new static variable.
12949         (framebuffer): Likewise.
12950         (render_target): Likewise.
12951         (initial_mode): Likewise.
12952         (mode_in_use): Likewise.
12953         (mode_list): Likewise.
12955 2006-03-10  Marco Gerards  <marco@gnu.org>
12957         * configure.ac (AC_INIT): Bumped to 1.93.
12959         * DISTLIST: Added `include/grub/hfs.h'.
12961 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12963         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12964         18H, which might help the BIOS falling back to next boot media.
12966 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12968         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12969         Poe Chen <poe.poechen@gmail.com>.
12971 2006-01-17  Marco Gerards  <marco@gnu.org>
12973         * include/grub/normal.h: Include <grub/script.h>.
12974         (grub_command_list): Removed struct.
12975         (grub_command_list_t): Removed type.
12976         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12977         members `commands' and `sourcecode'.
12978         * include/grub/script.h: Add inclusion guards.
12979         (grub_script_cmd_menuentry): New struct.
12980         (grub_script_execute_menuentry): New prototype.
12981         (grub_script_lexer_record_start): Likewise.
12982         (grub_script_lexer_record_stop): Likewise.
12983         * normal/execute.c (grub_script_execute_menuentry): New function.
12984         * normal/lexer.c (record, recording, recordpos, recordlen): New
12985         variables.
12986         (grub_script_lexer_record_start): New function.
12987         (grub_script_lexer_record_stop): Likewise.
12988         (recordchar): Likewise.
12989         (nextchar): Likewise.
12990         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12991         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12992         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12993         (current_menu): New variable.
12994         (free_menu): Mainly rewritten.
12995         (grub_normal_menu_addentry): New function.
12996         (read_config_file): Rewritten.
12997         * normal/menu.c (run_menu_entry): Mainly rewritten.
12998         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12999         the menu entry.
13000         (run): Mainly rewritten.
13001         * normal/parser.y (menu_entry): New variable.
13002         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13003         (menuentry): New rule.
13004         (command): Add `menuentry'.
13005         (if_statement): Allow additional returns before `fi'.
13006         * normal/script.c (grub_script_create_cmdmenu): New function.
13008 2006-01-03  Marco Gerards  <marco@gnu.org>
13010         * INSTALL: GNU Bison is required.
13011         * configure.ac: Rewritten the test to detect Bison.
13012         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13013         <xun.sun.cn@gmail.com>.
13015 2006-01-03  Marco Gerards  <marco@gnu.org>
13017         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13018         the HFS+ filesystem to filesystem blocks.
13019         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13020         GCC warning is silenced.
13022 2006-01-03  Marco Gerards  <marco@gnu.org>
13024         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13025         read from disk from big endian to host byte order.
13027 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13029         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13030         documentation.
13031         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13032         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13033         embedded HFS+ filesystem.
13034         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13035         (grub_hfs_sblock): Move from here...
13036         * include/grub/hfs.h: To here...  New file.
13037         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13038         documentation.
13039         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13040         New macros.
13041         (grub_hfsplus_volheader): Change type of member `magic' to
13042         `grub_uint16_t'.
13043         (grub_hfsplus_data): Add new member `embedded_offset'.
13044         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13045         returned block.
13046         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13047         Calculate the offset.
13049 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13051         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13052         Removed.
13053         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13055 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13057         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13058         ENV->NAME is NULL after allocating ENV->VALUE.
13060 2005-12-25  Marco Gerards  <marco@gnu.org>
13062         * kern/env.c (grub_env_set): Rewritten the error handling code.
13064 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13066         * geninit.sh: Made more robust, and more portable.
13068 2005-12-25  Marco Gerards  <marco@gnu.org>
13070         Add support for Apple HFS+ filesystems.
13072         * fs/hfsplus.c: New file.
13074         * DISTLIST: Added `fs/hfsplus.c'.
13076         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13077         (hfsplus_mod_SOURCES): New variable.
13078         (hfsplus_mod_CFLAGS): Likewise.
13079         (hfsplus_mod_LDFLAGS): Likewise.
13080         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13081         (grub_setup_SOURCES): Likewise.
13082         (grub_mkdevicemap_SOURCES): Likewise.
13083         (grub_emu_SOURCES): Likewise.
13084         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13086         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13088         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13090 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13092         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13093         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13094         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13095         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13096         normal/lexer.c, normal/parser.y, normal/script.c, and
13097         partmap/gpt.c.
13098         Removed kern/sparc64/cache.c.
13100         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13101         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13102         grub_emu_init.c.
13104         * configure.ac (AC_INIT): Bumped to 1.92.
13106 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13108         * kern/err.c (grub_error_push): Added new function to support error
13109         stacks.
13110         (grub_error_pop): Likewise.
13111         (grub_error_stack_items): New local variable to support error stacks.
13112         (grub_error_stack_pos): Likewise.
13113         (grub_error_stack_assert): Likewise.
13114         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13115         stack depth.
13116         (grub_print_error): Added support to print errors from error stack.
13118         * include/grub/err.h (grub_error_push): Added function prototype.
13119         (grub_error_pop): Likewise.
13121 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13123         * configure.ac: Accept `powerpc64' as host_cpu.
13124         (amd64): Rename to `biarch32'.
13126         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13127         non-cacheline-aligned addresses.
13129         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13130         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13131         if `size' is non-zero.
13133 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13135         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13136         and `cd' to make sure the filename is not prefixed with a
13137         directory name.
13138         (pkgdata_MODULES): Add `gpt.mod'.
13139         (gpt_mod_SOURCES): New variable.
13140         (gpt_mod_CFLAGS): Likewise.
13141         (gpt_mod_LDFLAGS): Likewise.
13143         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13145         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13146         New macro.
13148         * partmap/gpt.c: New file.
13150         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13151         GPT partition map is detected.
13153 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13155         * commands/i386/pc/play.c: New file.
13156         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13157         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13158         macros.
13160 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13162         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13163         ((unused))' to silence gcc warning.
13165 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13167         * configure.ac: Correct `AC_PROG_YACC' test.
13169 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13171         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13172         check before installing files.
13174 2005-11-22  Mike Small  <smallm@panix.com>
13176         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13177         number regex so multidigit numbers are recognized correctly.
13179 2005-11-22  Mike Small  <smallm@panix.com>
13181         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13182         debugging message before attempting to claim memory.
13183         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13184         multiple addresses in case of failure.
13186 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13188         * term/tparm.c (get_space): Remove empty `if' statement.
13190         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13192         * kern/parser.c (check_varstate): Rename `state' to 's'.
13194 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13196         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13197         variable definitions to the beginning of each function.  Sort stack
13198         variables by size.
13199         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13200         `buf' argument to `char *'.
13202 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13204         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13205         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13206         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13207         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13208         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13209         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13210         configfile.mod, search.mod, gzio.mod and test.mod.
13211         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13212         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13213         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13214         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13215         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13216         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13217         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13218         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13219         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13220         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13221         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13222         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13223         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13224         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13225         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13226         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13227         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13228         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13229         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13230         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13231         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13232         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13233         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13235         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13236         `grep --include'.
13237         (pkgdata_MODULES): Add test.mod.
13239 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13241         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13242         appending to variables with "+=".
13243         (PModule): Use full pathname to generate *.lst filenames.
13245         * Makefile.in: Fixed list rules moved from genmk.rb.
13246         (.DELETE_ON_ERROR): New special target.
13247         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13249         * conf/i386-pc.rmk: Include conf/common.mk.
13250         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13251         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13252         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13253         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13254         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13255         configfile.mod, search.mod, gzio.mod and test.mod.
13256         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13257         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13258         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13259         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13260         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13261         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13262         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13263         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13264         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13265         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13266         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13267         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13268         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13269         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13270         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13271         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13272         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13273         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13274         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13275         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13276         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13277         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13278         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13279         here...
13280         * conf/common.rmk: ... to here.  New file.
13282         * conf/common.mk: New file.
13284 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13286         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13287         (grub_script.tab.c): ... here.
13289         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13290         (grub_script.tab.c): ... here.
13292         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13293         (grub_script.tab.c): ... here.
13295         * normal/command.c (grub_command_find): Fixed a memory leak of
13296         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13298 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13300         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13301         "@" which marks the start of a comment on ARM.
13302         (VARIABLE): Likewise.
13304 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13306         Add support for Linux/ADFS partition tables.
13308         * partmap/acorn.c: New file.
13310         * include/grub/acorn_filecore.h: Likewise.
13312         * DISTLIST: Added `partmap/acorn.c' and
13313         `include/grub/acorn_filecore.h'.
13315         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13316         `partmap/acorn.c'.
13317         (pkgdata_MODULES): Add `acorn.mod'.
13318         (acorn_mod_SOURCES): New variable.
13319         (acorn_mod_CFLAGS): Likewise.
13321         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13322         `partmap/acorn.c'.
13323         (pkgdata_MODULES): Add `acorn.mod'.
13324         (acorn_mod_SOURCES): New variable.
13325         (acorn_mod_CFLAGS): Likewise.
13327         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13328         (pkgdata_MODULES): Add `acorn.mod'.
13329         (acorn_mod_SOURCES): New variable.
13330         (acorn_mod_CFLAGS): Likewise.
13331         (acorn_mod_LDFLAGS): Likewise.
13333         * include/types.h (grub_disk_addr_t): New typedef.
13335 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13337         * geninit.sh: New file.
13339         * geninitheader.sh: Likewise.
13341         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13342         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13343         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13344         * commands/configfile.c (grub_configfile_init)
13345         (grub_configfile_fini): Likewise.
13346         * commands/default.c (grub_default_init, grub_default_fini):
13347         Likewise.
13348         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13349         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13350         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13351         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13352         Likewise.
13353         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13354         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13355         Likewise.
13356         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13357         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13358         Likewise.
13359         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13360         Likewise.
13361         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13362         Likewise.
13363         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13364         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13365         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13366         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13367         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13368         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13369         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13370         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13371         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13372         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13373         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13374         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13375         * partmap/amiga.c (grub_amiga_partition_map_init)
13376         (grub_amiga_partition_map_fini): Likewise.
13377         * partmap/apple.c (grub_apple_partition_map_init)
13378         (grub_apple_partition_map_fini): Likewise.
13379         * partmap/pc.c (grub_pc_partition_map_init)
13380         (grub_pc_partition_map_fini): Likewise.
13381         * partmap/sun.c (grub_sun_partition_map_init,
13382         grub_sun_partition_map_fini): Likewise.
13383         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13384         Likewise.
13386         * util/grub-emu.c: Include <grub_modules_init.h>.
13387         (main): Don't initialize and de-initialize any modules directly,
13388         use `grub_init_all' and `grub_fini_all' instead.
13390         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13391         `grub_vesafb_mod_init'.
13392         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13393         all users.
13394         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13395         `grub_vga_mod_init'.  Updated all users.
13396         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13398         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13399         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13400         rules.
13402         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13403         Generate a function to initialize the module in utilities.
13404         Updated all callers.
13405         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13406         initialize the module in utilities.  Updated all callers.
13408 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13410         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13411         escape sequence and a literal ^L to clear the screen.
13413         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13414         when returning from Open Firmware.
13416 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13418         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13419         (grub_ofconsole_height): Likewise.
13420         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13421         manually insert a '\n'.
13422         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13423         `grub_ofconsole_height'.  Return early if these are already set.
13425 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13427         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13428         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13429         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13430         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13431         and `normal/script.c'.
13432         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13433         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13434         (test_mod_SOURCES): New variable.
13435         (test_mod_CFLAGS): Likewise.
13436         (test_mod_LDFLAGS): Likewise.
13437         (pkgdata_MODULES): Add `test.mod'.
13438         (grub_script.tab.c): New rule.
13439         (grub_script.tab.h): Likewise.
13441 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13443         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13444         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13445         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13446         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13447         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13448         (test_mod_SOURCES): New variable.
13449         (test_mod_CFLAGS): Likewise.
13450         (pkgdata_MODULES): Add `test.mod'.
13451         (grub_script.tab.c): New rule.
13452         (grub_script.tab.h): Likewise.
13454 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13456         Add initial scripting support.
13458         * commands/test.c: New file.
13459         * include/grub/script.h: Likewise.
13460         * normal/execute.c: Likewise.
13461         * normal/function.c: Likewise.
13462         * normal/lexer.c: Likewise.
13463         * normal/parser.y: Likewise.
13464         * normal/script.c: Likewise.
13466         * configure.ac: Add `AC_PROG_YACC' test.
13468         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13469         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13470         `normal/function.c' and `normal/script.c'.
13471         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13472         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13473         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13474         variables.
13475         (pkgdata_MODULES): Add `test.mod'.
13476         (grub_script.tab.c): New rule.
13477         (grub_script.tab.h): Likewise.
13479         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13481         * include/grub/normal.h (grub_test_init): New prototype.
13482         (grub_test_fini): Likewise.
13484         * normal/command.c: Include <grub/script.h>.
13485         (grub_command_execute): Rewritten.
13487         * util/grub-emu.c (main): Call `grub_test_init' and
13488         `grub_test_fini'.
13490 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13492         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13493         to 0.
13494         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13495         there are no pending characters.
13497 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13499         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13500         `grub_strndup' to drop device arguments. Replace unnecessary
13501         `grub_strndup' with `grub_strdup'.
13503 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13505         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13506         `debug' environment variable has been set.
13508 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13510         * Makefile.in (install-local): Use $(DATA).
13511         (uninstall): Likewise.
13512         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13513         (sbin_UTILITIES): ... to here.
13514         (sbin_SCRIPTS): New variable.
13515         (grub_install_SOURCES): New variable.
13516         * util/powerpc/ieee1275/grub-install.in: New file.
13517         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13518         variable.
13519         (add_segments): Call `grub_util_get_path'.
13521 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13523         From Timothy Baldwin:
13524         * commands/ls.c (grub_ls_list_files): Close FILE with
13525         grub_file_close.
13526         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13528 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13530         * include/grub/parser.h: New file.
13532         * kern/parser.c: Likewise.
13534         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13535         (grub_setup_SOURCES): Likewise.
13536         (grub_probefs_SOURCES): Likewise.
13537         (grub_emu_SOURCES): Likewise.
13538         (kernel_img_HEADERS): Add `parser.h'.
13540         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13541         (grub_emu_SOURCES): Add `kern/parser.c'.
13542         (grubof_SOURCES): Likewise.
13544         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13545         (grubof_SOURCES): Add `kern/parser.c'.
13547         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13549         * kern/misc.c (grub_split_cmdline): Removed function.
13551         * kern/rescue.c: Include <grub/parser.h>.
13552         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13553         of `grub_split_cmdline'.
13555         * normal/command.c: Include <grub/parser.h>.
13556         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13557         of `grub_split_cmdline'.
13559         * normal/completion.c: Include <grub/parser.h>.
13560         (cmdline_state): New variable.
13561         (iterate_dir): End the filename with a quote depending on the
13562         command line state.
13563         (get_state): new function.
13564         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13565         split the arguments and determine the current argument.  When the
13566         argument string is not quoted, escape all spaces.
13568 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13570         * normal/sparc64/setjmp.S: New file.
13572 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13574         * include/grub/sparc64/libgcc.h: New file.
13575         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13576         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13577         normal/sparc64/setjmp.c.
13579 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13581         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13582         * kern/sparc64/cache.S: New file.
13583         * kern/sparc64/cache.c: Removed.
13584         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13585         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13586         -mtune=ultrasparc.
13587         (COMMON_LDFLAGS): Add -melf64_sparc.
13588         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13589         (grubof_SOURCES): Use cache.S instead of cache.c.
13590         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13591         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13592         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13593         commented though.
13594         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13595         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13596         (linux_mod_CFLAGS): Commented out.
13597         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13598         out because module isn't built.
13599         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13600         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13601         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13602         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13603         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13604         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13605         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13606         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13607         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13608         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13609         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13610         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13611         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13612         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13614 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13616         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13617         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13618         longer, because HFS should not be used on PC.
13620 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13622         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13623         consistently within the loop.
13625 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13627         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13628         directory can not be read.
13630 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13632         * configure.ac (AC_INIT): Increase the version number to 1.91.
13634         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13635         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13636         term/i386/pc/serial.c.
13638 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13640         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13641         file size must be permitted.
13643         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13644         between %ah and %al.
13646 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13648         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13649         grub_uint64_t.
13650         Call the hook with a NUL-terminated filename.
13651         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13652         grub_cpu_to_be32.
13654         * kern/term.c (cursor_state): New variable.
13655         (grub_term_set_current): Reset the cursor state on a new
13656         terminal.
13657         (grub_setcursor): Rewritten to use CURSOR_STATE.
13658         (grub_getcursor): New function.
13660         * include/grub/term.h (grub_getcursor): New prototype.
13662         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13663         integers on ARM. Reported by Timothy Baldwin
13664         <T.E.Baldwin99@members.leeds.ac.uk>.
13666 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13668         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13669         allocated.
13670         (grub_sfs_dir): Likewise.
13672 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13674         Add support for the SFS filesystem.
13676         * fs/sfs.c: New file.
13678         * DISTLIST: Added `fs/sfs.c'.
13680         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13681         (grub_probefs_SOURCES): Likewise.
13682         (grub_emu_SOURCES): Likewise.
13683         (pkgdata_MODULES): Add `sfs.mod'.
13684         (sfs_mod_SOURCES): New variable.
13685         (sfs_mod_CFLAGS): Likewise.
13686         (sfs_mod_LDFLAGS): Likewise.
13688         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13689         (pkgdata_MODULES): Add `sfs.mod'.
13690         (sfs_mod_SOURCES): New variable.
13691         (sfs_mod_CFLAGS): Likewise.
13693         * util/grub-emu.c (main): Call `grub_sfs_init' and
13694         `grub_sfs_fini'.
13696         * include/grub/fs.h (grub_sfs_init): New prototype.
13697         (grub_sfs_fini): Likewise.
13699 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13701         Add support for the AFFS filesystem.
13703         * fs/affs.c: New file.
13705         * DISTLIST: Added `fs/affs.c'.
13707         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13708         (grub_probefs_SOURCES): Likewise.
13709         (grub_emu_SOURCES): Likewise.
13710         (pkgdata_MODULES): Add `affs.mod'.
13711         (affs_mod_SOURCES): New variable.
13712         (affs_mod_CFLAGS): Likewise.
13713         (affs_mod_LDFLAGS): Likewise.
13715         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13716         (pkgdata_MODULES): Add `affs.mod'.
13717         (affs_mod_SOURCES): New variable.
13718         (affs_mod_CFLAGS): Likewise.
13720         * util/grub-emu.c (main): Call `grub_affs_init' and
13721         `grub_affs_fini'.
13723         * include/grub/fs.h (grub_affs_init): New prototype.
13724         (grub_affs_fini): Likewise.
13726 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13728         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13730 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13732         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13733         `-m32' to CFLAGS.
13735         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13736         linking.
13738         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13739         (COMMON_LDFLAGS): New variable.
13740         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13741         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13742         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13743         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13744         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13745         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13746         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13747         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13748         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13749         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13750         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13751         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13752         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13753         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13754         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13755         variables.
13756         (normal_mod_ASFLAGS): Add `-m32'.
13758         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13759         (grub_host_size_t, grub_host_ssize_t): New types.
13760         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13761         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13762         `GRUB_HOST_SIZEOF_VOID_P'.
13764         * include/grub/kernel.h (struct grub_module_header): Type of
13765         member offset changed to `grub_host_off_t'.  Type of member size
13766         changed to `grub_host_size_t'.
13767         (struct grub_module_info): Type of member offset changed to
13768         `grub_host_off_t'.  Type of member size changed to
13769         `grub_host_size_t'.
13771 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13773         Make GRUB's kernel compliant to Multiboot Specification.
13775         * kern/i386/pc/startup.S (multiboot_header): New label.
13776         (multiboot_entry): Likewise.
13777         (multiboot_trampoline): Likewise.
13779         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13780         Increased to 0x4A0.
13782         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13783         put parentheses after a question mark.
13784         [!GRUB_UTIL] (my_mod): New variable.
13786         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13788 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13790         Adds support for the XFS filesystem.  Btrees are not supported
13791         yet.
13793         * fs/xfs.c: New file.
13795         * DISTLIST: Added `fs/xfs.c'.
13797         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13798         (grub_probefs_SOURCES): Likewise.
13799         (grub_emu_SOURCES): Likewise.
13800         (pkgdata_MODULES): Add `xfs.mod'.
13801         (xfs_mod_SOURCES): New variable.
13802         (xfs_mod_CFLAGS): Likewise.
13804         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13805         (pkgdata_MODULES): Add `xfs.mod'.
13806         (xfs_mod_SOURCES): New variable.
13807         (xfs_mod_CFLAGS): Likewise.
13809         * util/grub-emu.c (main): Call `grub_xfs_init' and
13810         `grub_xfs_fini'.
13812         * include/grub/fs.h (grub_xfs_init): New prototype.
13813         (grub_xfs_fini): Likewise.
13816 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13818         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13819         color modes, allow greater than 16 colors to be configured as
13820         a default palette.
13822 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13824         * normal/completion.c (complete_arguments): Add the qualifier
13825         const into OPTIONS.
13827         From Omniflux <omniflux+lists@omniflux.com>:
13828         * include/grub/terminfo.h: New file.
13829         * include/grub/tparm.h: Likewise.
13830         * include/grub/i386/pc/serial.h: Likewise.
13831         * term/terminfo.c: Likewise.
13832         * term/tparm.c: Likewise.
13833         * term/i386/pc/serial.c: Likewise.
13834         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13835         serial.mod.
13836         (terminfo_mod_SOURCES): New variable.
13837         (terminfo_mod_CFLAGS): Likewise.
13838         (serial_mod_SOURCES): Likewise.
13839         (serial_mod_CFLAGS): Likewise.
13841 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13843         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13844         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13845         and kern/powerpc/ieee1275/cmain.c, respectively.
13847         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13848         * kern/powerpc/ieee1275/crt0.S: ... here.
13850         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13851         * kern/powerpc/ieee1275/cmain.c: ... here.
13853         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13854         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13855         instead of boot/powerpc/ieee1275/crt0.S and
13856         boot/powerpc/ieee1275/cmain.c, respectively.
13858         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13859         sectors. It was not used anyway.
13861 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13863         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13864         `unused parameter' warning.
13866 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13868         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13869         function.
13870         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13871         getcharwidth.
13873 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13875         * include/grub/normal.h (enum grub_completion_type): Added
13876         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13878         * normal/cmdline.c (print_completion): Handle
13879         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13880         * normal/menu_entry.c (store_completion): Likewise.
13882         * normal/completion.c (complete_arguments): New function.
13883         (grub_normal_do_completion): Call `complete_arguments' when the
13884         current words start with a dash.
13886 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13888         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13889         `gzio.mod' instead of `io.mod').
13891 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13893         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13894         (DISTDIRS): Added io and video.
13895         Rewrite the search routine to make an output consistently.
13897         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13898         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13899         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13900         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13901         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13902         util/powerpc/ieee1275/misc.c.
13904         * include/grub/gzio.h: New file.
13905         * io/gzio.c: Likewise.
13907         * kern/file.c (grub_file_close): Call grub_device_close only if
13908         FILE->DEVICE is not NULL.
13910         * include/grub/mm.h [!NULL] (NULL): New macro.
13912         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13914         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13915         (pkgdata_MODULES): Added gzio.mod.
13916         (gzio_mod_SOURCES): New variable.
13917         (gzio_mod_CFLAGS): Likewise.
13919         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13920         (pkgdata_MODULES): Added gzio.mod.
13921         (gzio_mod_SOURCES): New variable.
13922         (gzio_mod_CFLAGS): Likewise.
13924         * commands/cat.c: Include grub/gzio.h.
13925         (grub_cmd_cat): Use grub_gzfile_open instead of
13926         grub_file_open.
13928         * commands/cmp.c: Include grub/gzio.h.
13929         (grub_cmd_cmp): Use grub_gzfile_open instead of
13930         grub_file_open.
13932         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13933         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13934         grub_file_open.
13935         (grub_rescue_cmd_module): Likewise.
13937 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13939         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13940         kern/sparc64/ieee1275/init.c because it contains _start.
13941         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13943 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13945         * configure.ac: Add support for sparc64 host with ieee1275
13946         firmware.
13947         * configure: Generated from configure.ac.
13948         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13949         instead of int.
13950         (grub_ofdisk_read): Likewise.
13951         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13952         pointers as (void *) to remove a warning.
13953         (grub_ofdisk_close): Likewise.
13954         (grub_ofdisk_read): Likewise.
13955         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13956         returns, so make it return void to remove a warning.
13957         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13958         Corresponding prototype change.
13959         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13960         values, and cast the pointers as (void *) to remove a warning.
13961         (grub_mm_dump): Likewise.
13962         * conf/sparc64-ieee1275.mk: New file.
13963         * conf/sparc64-ieee1275.rmk: Likewise.
13964         * include/grub/sparc64/setjmp.h: Likewise.
13965         * include/grub/sparc64/types.h: Likewise.
13966         * include/grub/sparc64/ieee1275/console.h: Likewise.
13967         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13968         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13969         * include/grub/sparc64/ieee1275/time.h: Likewise.
13970         * kern/sparc64/cache.c: Likewise.
13971         * kern/sparc64/dl.c: Likewise.
13972         * kern/sparc64/ieee1275/init.c: Likewise.
13973         * kern/sparc64/ieee1275/openfw.c: Likewise.
13975 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13977         * util/console.c (grub_ncurses_putchar): If C is greater than
13978         0x7f, set C to a question mark.
13979         (grub_ncurses_getcharwidth): New function.
13980         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13981         getcharwidth.
13983         * normal/menu.c (print_entry): Made aware of Unicode. First,
13984         convert TITLE to UCS-4, and predict the cursor position by
13985         grub_getcharwidth.
13987         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13988         const to SRC.
13989         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13991 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13993         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13994         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13995         grub_strcat.
13997         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13998         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13999         grub_strcpy and grub_strlen. Take it into account that a space
14000         character is inserted as a delimiter.
14002 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14004         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14005         invalid magic in the error.
14007         * commands/search.c: New file.
14009         * util/grub-emu.c (main): Call grub_search_init and
14010         grub_search_fini.
14012         * kern/rescue.c (grub_rescue_print_disks): Removed.
14013         (grub_rescue_print_devices): New function.
14014         (grub_rescue_cmd_ls): Use grub_device_iterate with
14015         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14016         grub_rescue_print_disks.
14018         * kern/partition.c (grub_partition_iterate): Return the result of
14019         PARTMAP->ITERATE instead of GRUB_ERRNO.
14021         * kern/device.c: Include grub/partition.h.
14022         (grub_device_iterate): New function.
14024         * include/grub/partition.h (grub_partition_iterate): Return int
14025         instead of grub_err_t.
14027         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14028         prototype.
14029         [GRUB_UTIL] (grub_search_fini): Likewise.
14031         * include/grub/device.h (grub_device_iterate): New prototype.
14033         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14034         commands/search.c.
14035         (pkgdata_MODULES): Added search.mod.
14036         (search_mod_SOURCES): New variable.
14037         (search_mod_CFLAGS): Likewise.
14039         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14040         (pkgdata_MODULES): Added search.mod.
14041         (search_mod_SOURCES): New variable.
14042         (search_mod_CFLAGS): Likewise.
14044         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14045         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14046         All callers changed.
14048         * DISTLIST: Added commands/search.c.
14050 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14052         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14053         conversion.
14054         (grub_getcharwidth): New function.
14056         * kern/misc.c (grub_utf8_to_ucs4): New function.
14058         * include/grub/term.h (struct grub_term): Added a new member
14059         "getcharwidth".
14060         (grub_getcharwidth): New prototype.
14062         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14064         * term/i386/pc/console.c (map_char): New function. Segregated from
14065         grub_console_putchar.
14066         (grub_console_putchar): Use map_char.
14067         (grub_console_getcharwidth): New function.
14068         (grub_console_term): Specified grub_console_getcharwidth as
14069         getcharwidth.
14071         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14072         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14074         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14075         GRUB_ERRNO.
14076         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14077         on grub_strtoul completely.
14078         (write_char): Declare local variables in the beginning of the
14079         function.
14080         (grub_vesafb_getcharwidth): New function.
14081         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14082         getcharwidth.
14084 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14086         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14087         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14088         commands/i386/pc/vbetest.c.
14090         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14091         call grub_vbe_get_controller_info again, because the returned
14092         information is volatile.
14093         (grub_vbe_set_video_mode): Mostly rewritten.
14094         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14095         grub_vbe_status_t correctly.
14096         (grub_vbe_get_video_mode_info): Likewise.
14097         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14098         several if statements.
14100         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14101         * commands/i386/pc/vbeinfo.c: ... this.
14103         * commands/i386/pc/vbe_test.c: Renamed to ...
14104         * commands/i386/pc/vbetest.c: ... this.
14106         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14107         ...
14108         (grub_cmd_vbeinfo): ... this. Save video modes before
14109         iterating. Skip a video mode, if it is not available, not enough
14110         information is given or it is monochrome. Show the memory
14111         model. Leave the interpretation of MODEVAR to grub_strtoul
14112         completely.
14113         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14114         (GRUB_MOD_FINI): Likewise.
14116         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14117         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14118         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14119         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14120         grub_strtoul completely.
14121         (real2pm): Removed.
14122         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14123         (GRUB_MOD_FINI): Likewise.
14125         * normal/misc.c: Include grub/mm.h.
14127         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14128         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14129         (vbe_list_modes_mod_SOURCES): Removed.
14130         (vbe_list_modes_mod_CFLAGS): Likewise.
14131         (vbe_test_mod_SOURCES): Likewise.
14132         (vbe_test_mod_CFLAGS): Likewise.
14133         (vbeinfo_mod_SOURCES): New variable.
14134         (vbeinfo_mod_CFLAGS): Likewise.
14135         (vbetest_mod_SOURCES): Likewise.
14136         (vbetest_mod_CFLAGS): Likewise.
14138 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14140         * normal/misc.c: New file.
14142         * DISTLIST: Added normal/misc.c.
14144         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14145         DISK to HOOK. Call HOOK with DISK.
14146         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14147         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14148         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14150         * normal/menu_entry.c (struct screen): Added a new member
14151         "completion_shown".
14152         (completion_buffer): New global variable.
14153         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14154         (store_completion): New function.
14155         (complete): Likewise.
14156         (clear_completions): Likewise.
14157         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14158         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14159         a tab, call complete.
14161         * normal/completion.c (disk_dev): Removed.
14162         (print_simple_completion): Likewise.
14163         (print_partition_completion): Likewise.
14164         (print_func): New global variable.
14165         (add_completion): Do not take the arguments WHAT or PRINT any
14166         longer. Added a new argument TYPE. Instead of printing directly,
14167         call PRINT_FUNC if not NULL.
14168         All callers changed.
14169         (complete_device): Use a local variable DEV instead of
14170         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14171         (grub_normal_do_completion): Take a new argument HOOK. Do not
14172         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14173         empty string, return NULL instead.
14174         All callers changed.
14176         * normal/cmdline.c (print_completion): New function.
14178         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14179         to HOOK.
14180         All callers changed.
14182         * kern/disk.c (grub_print_partinfo): Removed.
14184         * include/grub/partition.h (struct grub_partition_map): Add a new
14185         argument DISK into HOOK of ITERATE.
14186         (grub_partition_iterate): Add a new argument DISK to HOOK.
14188         * include/grub/normal.h (enum grub_completion_type): New enum.
14189         (grub_completion_type_t): New type.
14190         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14191         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14192         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14193         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14194         (grub_normal_do_completion): Added a new argument HOOK.
14195         (grub_normal_print_device_info): New prototype.
14197         * include/grub/disk.h (grub_print_partinfo): Removed.
14199         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14200         (normal_mod_SOURCES): Likewise.
14201         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14202         (normal_mod_SOURCES): Likewise.
14204         * commands/ls.c (grub_ls_list_disks): Use
14205         grub_normal_print_device_info instead of grub_print_partinfo. Free
14206         PNAME.
14207         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14208         duplicating the code.
14210 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14212         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14213         follow GCS more precisely.
14214         * commands/i386/pc/vbe_test.c: Likewise.
14215         * include/grub/i386/pc/vbe.h: Likewise.
14216         * term/i386/pc/vesafb.c: Likewise.
14217         * video/i386/pc/vbe.c: Likewise.
14219 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14221         * DISTLIST: Added term/i386/pc/vesafb.c
14222         DISTLIST: Added video/i386/pc/vbe.c
14223         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14224         DISTLIST: Added commands/i386/pc/vbe_test.c.
14225         * commands/i386/pc/vbe_list_modes.c: New file.
14226         * commands/i386/pc/vbe_test.c: Likewise.
14227         * term/i386/pc/vesafb.c: Likewise.
14228         * video/i386/pc/vbe.c: Likewise.
14229         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14230         (grub_vbe_probe) Added prototype.
14231         (grub_vbe_set_video_mode) Likewise.
14232         (grub_vbe_get_video_mode) Likewise.
14233         (grub_vbe_get_video_mode_info) Likewise.
14234         (grub_vbe_set_pixel_rgb) Likewise.
14235         (grub_vbe_set_pixel_index) Likewise.
14236         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14237         (pkgdata_MODULES): Added vesafb.mod.
14238         (pkgdata_MODULES): Added vbe_list_modes.mod.
14239         (pkgdata_MODULES): Added vbe_test.mod.
14240         (vbe_mod_SOURCES): Added.
14241         (vbe_mod_CFLAGS): Likewise.
14242         (vesafb_mod_SOURCES): Likewise.
14243         (vesafb_mod_CFLAGS): Likewise.
14244         (vbe_list_modes_mod_SOURCES): Likewise.
14245         (vbe_list_modes_mod_CFLAGS): Likewise.
14246         (vbe_test_mod_SOURCES): Likewise.
14247         (vbe_test_mod_CFLAGS): Likewise.
14249 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14251         * normal/command.c (grub_command_execute): If INTERACTIVE is
14252         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14253         CMDLINE. Disable the pager if INTERACTIVE is true.
14254         All callers are changed.
14256         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14257         before reading a config file.
14258         * normal/main.c (read_config_file): Even if a command is not
14259         found, register it if it is within an entry.
14261         * util/grub-emu.c: Include sys/types.h and unistd.h.
14262         (options): Added --hold.
14263         (struct arguments): Added a new member "hold".
14264         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14265         missing.
14266         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14267         cleared by a debugger, if it is not zero.
14269         * include/grub/normal.h (grub_command_execute): Add an argument
14270         INTERACTIVE.
14272 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14274         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14276 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14278         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14279         program with another one, because the old one didn't detect a bug
14280         in gcc-3.4. Always use regparm 2, because the new test is still
14281         not enough for gcc-4.0. Someone must investigate a simple test
14282         case which detects a bug in gcc-4.0.
14284 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14286         * DISTLIST: Added normal/completion.c.
14288         * normal/completion.c: New file.
14290         * term/i386/pc/console.c (grub_console_getwh): New function.
14291         (grub_console_term): Assign grub_console_getwh to getwh.
14293         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14294         function is defined in normal/completion.c as
14295         grub_normal_do_completion.
14296         (grub_cmdline_get): Use grub_normal_do_completion instead of
14297         grub_tab_complete.
14299         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14300         returns non-zero, otherwise return 0.
14301         (grub_partition_iterate): First, probe the partition map. Then,
14302         call ITERATE only for this partition map.
14304         * kern/misc.c (grub_strncmp): Rewritten.
14306         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14307         returns non-zero. Otherwise return 0.
14309         * include/grub/partition.h (grub_partition_map_iterate): Return
14310         int instead of void.
14312         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14314         * include/grub/misc.h (grub_strncmp): Change the type of N to
14315         grub_size_t.
14317         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14318         of void.
14320         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14321         unsigned explicitly before comparing it with I.
14323         * kern/main.c (grub_env_write_root): Add the attribute unused into
14324         VAR.
14326         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14327         normal/completion.c.
14328         (normal_mod_SOURCES): Likewise.
14329         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14330         (normal_mod_SOURCES): Likewise.
14332         * normal/command.c (grub_iterate_commands): If ITERATE returns
14333         non-zero, return one immediately.
14335 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14337         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14338         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14339         descriptions.
14340         (grub_vbe_get_controller_info): New function.
14341         (grub_vbe_get_mode_info): Likewise.
14342         (grub_vbe_set_mode): Likewise.
14343         (grub_vbe_get_mode): Likewise.
14344         (grub_vbe_set_memory_window): Likewise.
14345         (grub_vbe_get_memory_window): Likewise.
14346         (grub_vbe_set_scanline_length): Likewise.
14347         (grub_vbe_get_scanline_length): Likewise.
14348         (grub_vbe_set_display_start): Likewise.
14349         (grub_vbe_get_display_start): Likewise.
14350         (grub_vbe_set_palette_data): Likewise.
14351         * include/grub/i386/pc/vbe.h: New file.
14353 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14355         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14356         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14357         * DISTLIST: Likewise.
14358         * kern/ieee1275/of.c: Moved to ...
14359         * kern/ieee1275/ieee1275.c: ... here.
14361 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14363         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14364         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14365         Pass 0 as `end' parameter to grub_strtoul().
14367 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14369         * include/grub/powerpc/ieee1275/console.h: Do not include
14370         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14371         ifdef.
14372         (grub_console_cur_color): Remove i386-specific prototype.
14373         (grub_console_real_putchar): Likewise.
14374         (grub_console_checkkey): Likewise.
14375         (grub_console_getkey): Likewise.
14376         (grub_console_getxy): Likewise.
14377         (grub_console_gotoxy): Likewise.
14378         (grub_console_cls): Likewise.
14379         (grub_console_setcursor): Likewise.
14380         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14381         Include <grub/machine/console.h>.
14382         * term/ieee1275/ofconsole.c: Likewise.
14384 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14386         * Makefile.in (LIBLZO): New variable.
14388         * configure.ac: Check for LZO version 2.
14390         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14391         lzo/lzo1x.h instead of lzo1x.h.
14393         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14394         of -llzo.
14396         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14397         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14399         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14400         copying the data from PARTITION to P.
14402 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14404         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14405         negative, unload the module.
14407         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14408         map is "pc_partition_map" but not "pc".
14409         (usage): Fix the description. The options are --boot-image and
14410         --core-image but not --boot-file or --core-file.
14411         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14412         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14413         DEFAULT_DIRECTORY.
14415         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14416         --core-file. Specify INSTALL_DEVICE as an argument.
14418         * util/console.c: Include config.h.
14419         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14420         [HAVE_NCURSES_H]: Include ncurses.h.
14421         [HAVE_CURSES_H]: Include curses.h.
14422         [!A_NORMAL] (A_NORMAL): Defined as zero.
14423         [!A_STANDOUT] (A_STANDOUT): Likewise.
14425         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14426         -lncurses.
14427         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14429         * configure.ac: Check for curses libraries and headers.
14431         * Makefile.in (LIBCURSES): New variable.
14433         * genmk.rb (Script::rule): Set the executable bits.
14435         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14436         name of the PC partition map is "pc_partition_map" but not "pc".
14438 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14440         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14441         (modules): Likewise.
14442         (usage): Added descriptions for --modules and --grub-probefs.
14443         Handle --modules and --grub-probefs. Save the arguments in MODULES
14444         and GRUB_PROBEFS, respectively.
14445         Auto-detect a filesystem module against GRUBDIR. If the result is
14446         empty and modules are not specified explicitly, abort the
14447         installation. Add the result to MODULES.
14449         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14450         disk/powerpc/ieee1275/ofdisk.c,
14451         include/grub/powerpc/ieee1275/init.h and
14452         term/powerpc/ieee1275/ofconsole.c.
14453         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14454         term/ieee1275/ofconsole.c.
14456         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14458         * COPYING: Upgraded to the latest version. Only the address of the
14459         FSF office has changed.
14461 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14463         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14464         kern/ieee1275.c with kern/ieee1275/of.c.
14466         * kern/ieee1275.c: Moved to ...
14467         * kern/ieee1275/of.c: ... here.
14469 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14471         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14472         readability.
14474         * config.guess: Updated to the latest version from gnulib.
14475         * config.sub: Likewise.
14476         * install.sh: Likewise.
14477         * mkinstalldirs: Likewise.
14479         * include/grub/console.h: Removed. This file is arch-specific. Do
14480         not put this in include/grub.
14482         * include/grub/i386/pc/console.h: Resurrected.
14484         * util/console.c: Include grub/machine/console.h instead of
14485         grub/console.h.
14486         * util/grub-emu.c: Likewise.
14488 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14490         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14491         hardcoded value.
14493         From Vincent Pelletier  <subdino2004@yahoo.fr>
14494         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14495         Redefined to use grub_getwh.
14496         (grub_term): New member named getwh.
14497         (grub_getwh): New prototype.
14498         * kern/term.c (grub_getwh): New function.
14499         * term/i386/pc/console.c (grub_console_getwh): New function.
14500         (grub_console_term): New member `getwh'.
14501         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14502         (grub_vga_term): New member `getwh'.
14503         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14504         grub_ssize_t.
14505         (grub_ofconsole_getw): New function.
14506         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14507         (grub_ofconsole_term): New field named getwh and new initial
14508         value.
14510 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14512         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14513         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14514         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14515         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14516         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14517         of <grub/machine/ieee1275.h>.
14518         * commands/ieee1275/reboot.c: Likewise.
14519         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14520         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14521         parameter structs to use new type `grub_ieee1275_cell_t'.
14522         * term/powerpc/ieee1275/ofconsole.c: Move ...
14523         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14524         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14525         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14526         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14527         to return int.
14528         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14529         Remove unused prototypes.  All users updated.
14530         * include/grub/powerpc/ieee1275/console.h: Removed.
14531         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14532         `grub_ieee1275_cell_t'.
14533         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14534         Cast comparisons with -1 to the correct type.
14535         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14536         type to match `grub_ieee1275_entry_fn'.
14538 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14540         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14542         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14543         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14544         partmap/sun.c.
14545         (grub_probefs_SOURCES): New variable.
14547         * util/i386/pc/grub-probefs.c: New file.
14549         * util/i386/pc/grub-setup.c (main): Call
14550         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14551         grub_hfs_init and grub_jfs_init to initialize the system. Call
14552         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14553         grub_pc_partition_map_fini to finish the system.
14555 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14557         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14558         function.
14559         (grub_multiboot_load_elf32): Likewise.
14560         (grub_multiboot_is_elf64): Likewise.
14561         (grub_multiboot_load_elf64): Likewise.
14562         (grub_multiboot_load_elf): Likewise.
14563         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14564         an ELF32 or ELF64 file.
14565         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14567         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14568         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14569         NULL before calling FS->LABEL.
14570         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14571         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14572         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14573         before calling FS->LABEL.
14575 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14577         * util/i386/pc/grub-install.in (datadir): New variable.
14578         (libdir): Removed.
14579         (pkgdatadir): New variable.
14580         (pkglibdir): Removed.
14582 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14584         * DISTLIST: Added util/i386/pc/grub-install.in.
14586         * util/i386/pc/grub-install.in: New file.
14588         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14589         (grub_install_SOURCES): Likewise.
14591         * genmk.rb: Added support for scripts.
14592         (Script): New class.
14593         (scripts): New variable.
14595         * Makefile.in (install-local): Install sbin_SCRIPTS by
14596         INSTALL_SCRIPT.
14597         (uninstall): Remove sbin_SCRIPTS.
14599         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14600         device, try to get a GRUB device by
14601         grub_util_biosdisk_get_grub_dev.
14602         Free DEST_DEV.
14604         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14605         description for --device-map.
14607 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14609         Change the semantics of variable hooks. They now return strings
14610         instead of error values.
14612         * util/i386/pc/grub-setup.c: Include grub/env.h.
14613         (setup): Use grub_device_set_root instead of grub_env_set.
14615         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14616         grub_env_get instead of grub_device_set_root and
14617         grub_device_get_root, respectively.
14619         * kern/main.c (grub_env_write_root): New function.
14620         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14621         grub_env_set instead of grub_device_set_root.
14623         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14624         many variables.
14625         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14626         rather than calling ENV->WRITE_HOOK afterwards.
14627         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14628         passing a pointer of a pointer.
14629         (grub_register_variable_hook): Change the types of "read_hook" and
14630         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14631         respectively.
14632         Allocate the default empty string on the heap, because this string
14633         may be freed later.
14635         * kern/device.c: Include grub/env.h.
14636         (grub_device_set_root): Removed.
14637         (grub_device_get_root): Likewise.
14638         (grub_device_open): Use grub_env_get instead of
14639         grub_device_get_root.
14641         * include/grub/env.h (grub_env_read_hook_t): New type.
14642         (grub_env_write_hook_t): Likewise.
14643         (grub_env_var): Change the types of "read_hook" and "write_hook"
14644         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14645         (grub_register_variable_hook): Likewise.
14647         * include/grub/device.h (grub_device_set_root): Removed.
14648         (grub_device_set_root): Likewise.
14650         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14651         make sure that DIRNAME terminates with '/', so that
14652         grub_fat_find_dir will fail if PATH is not a directory.
14654         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14655         from DIRNAME.
14656         Use the qualifier auto for print_files and print_files_long.
14657         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14658         as a regular file.
14659         Put a newline only if there is no error.
14660         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14661         used.
14663 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14665         * kern/partition.c (grub_partition_probe): Initialize PART to
14666         NULL. Otherwise, when no partition map is registered, this returns
14667         a garbage.
14669 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14671         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14672         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14673         valid.
14675 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14677         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14678         information on each device, if it does not have partitions. Print
14679         "Device" instead of "Disk", because this function is not specific
14680         to disk devices.
14682         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14683         static to ensure that it is put on the memory rather than a
14684         register.
14686 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14688         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14689         (grub_cat_init): Likewise.
14690         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14691         (options): Likewise.
14692         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14693         (grub_configfile_init): Likewise.
14694         * font/manager.c (GRUB_MOD_INIT): Likewise.
14695         * commands/help.c (GRUB_MOD_INIT): Likewise.
14696         (grub_help_init): Likewise.
14697         * normal/command.c (grub_command_init): Likewise.
14698         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14699         * disk/loopback.c (grub_loop_init): Likewise.
14700         (GRUB_MOD_INIT): Likewise.
14701         * commands/ls.c (grub_ls_init): Likewise.
14702         (GRUB_MOD_INIT): Likewise.
14703         (options): Likewise.
14704         * commands/boot.c (grub_boot_init): Likewise.
14705         (GRUB_MOD_INIT): Likewise.
14706         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14707         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14708         (GRUB_MOD_INIT): Likewise.
14709         * commands/cmp.c (grub_cmp_init): Likewise.
14710         (GRUB_MOD_INIT): Likewise.
14712         * normal/arg.c: Use <> instead of "" to include header files.
14713         (SHORT_ARG_HELP): New macro.
14714         (SHORT_ARG_USAGE): Likewise.
14715         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14716         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14717         descriptions.
14718         (find_short): Check if C is 'h' or 'u' explicitly.
14719         (grub_arg_show_help): Use space characters instead of tabs. Treat
14720         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14721         are shown with --help and --usage only if they are not used for
14722         the command itself.
14723         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14724         'h' and 'u'.
14726         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14727         const into "longarg". Change the type of "shortarg" to int.
14729 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14731         * boot/i386/pc/boot.S (boot_drive_check): New label.
14733         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14734         macro.
14736         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14737         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14739 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14741         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14742         When turning off Gate A20, skip the check and return immediately,
14743         because this is not fatal usually.
14745 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14747         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14748         be 0x7C00 instead of 0x8000.
14750         * boot/i386/pc/pxeboot.S: Rewritten.
14752         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14753         EXT_C.
14754         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14755         result.
14757 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14759         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14760         robustness. This routine now supports a BIOS call and System
14761         Control Port A to modify the gate A20.
14763         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14764         Increased to 0x440.
14766 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14768         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14769         device path and resulting ihandle.
14770         (grub_ofdisk_close): dprintf the ihandle being closed.
14771         (grub_ofdisk_read): dprintf function parameters.
14772         * kern/mm.c (grub_mm_init_region): Likewise.
14773         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14774         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14775         size, and boot arguments.
14776         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14777         before loading into memory.
14778         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14779         before loading into memory.
14781 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14783         * kern/mm.c: Added much documentation.
14784         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14785         8, set to 5 instead of 8.
14787 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14789         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14791         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14792         (grub_mkdevicemap_SOURCES): New variable.
14794         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14795         lib/device.c of GRUB Legacy.
14797 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14799         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14800         instead of PATH is NULL.
14802 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14804         * commands/cmp.c (BUFFER_SIZE): New macro.
14805         (grub_cmd_cmp): Close the right file at the right time.  Compare
14806         only data just read.  Don't report files of different  size as
14807         identical.  Dynamically allocate buffers.  Move variable
14808         declarations at the beginning of function.
14810 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14812         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14813         reverse.
14815 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14817         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14818         when backspace is pressed at beginning of line.
14820 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14822         * DISTLIST: Added genfslist.sh.
14824         * normal/main.c (fs_module_list): New variable.
14825         (autoload_fs_module): New function.
14826         (read_fs_list): Likewise.
14827         (grub_normal_execute): Call read_fs_list.
14829         * kern/fs.c (grub_fs_autoload_hook): New variable.
14830         (grub_fs_probe): Added support for auto-loading.
14832         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14833         (grub_fs_module_list_t): New type.
14835         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14836         (grub_fs_autoload_hook): New prototype.
14838         * genfslist.sh: New file.
14840         * genmk.rb: Added a rule to generate a filesystem list.
14842 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14844         * configure.ac: Fix the test for cross-compiling.
14846         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14847         define GRUB_UTIL anymore.
14849         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14850         so this function works on other systems than just big endian.
14851         (load_modules): Likewise.
14852         (add_segments): Likewise.
14854 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14856         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14857         contains `l' modifier, get a long from va_arg().
14859 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14861         * kern/mm.c (grub_free): If the next free block which is being
14862         merged is the first free block, set the first block to the block
14863         being freed.
14864         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14866 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14868         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14869         `grub_ieee1275_chosen'.
14871 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14873         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14874         (grub_ieee1275_chosen): New variable.
14875         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14876         `chosen'.
14877         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14878         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14879         Rename first argument to `phandle' for consistency.
14880         (grub_ieee1275_get_property_length): Likewise.
14881         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14882         to grub_ieee1275_phandle_t.
14883         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14884         Move export next to declaration.
14885         (grub_ieee1275_chosen): New variable.
14886         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14887         Correct cosmetic typo.
14888         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14889         `grub_ieee1275_chosen'.
14890         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14891         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14892         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14893         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14894         `grub_ieee1275_chosen'.
14896 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14898         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14899         /chosen/bootargs.
14900         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14901         /chosen/bootargs as "variable=value" pairs.
14903 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14905         * include/grub/misc.h (grub_dprintf): New macro.
14906         (grub_real_dprintf): New prototype.
14907         (grub_strword): Likewise.
14908         (grub_iswordseparator): Likewise.
14909         * kern/misc.c (grub_real_dprintf): New function.
14910         (grub_strword): Likewise.
14911         (grub_iswordseparator): Likewise.
14913 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14915         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14916         (roundup): Remove macro.
14917         (grub_ieee1275_flags): Make static.
14918         (grub_ieee1275_realmode): Remove.
14919         (grub_ieee1275_test_flag): New function.
14920         (grub_ieee1275_set_flag): Likewise.
14921         (find_options): Rename to `grub_ieee1275_find_options'; update
14922         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14923         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14924         (cmain): New prototype.
14925         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14926         `grub_ieee1275_flags' directly.
14927         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14928         machine/biosdisk.h.
14929         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14930         Don't include grub/machine/init.h.
14931         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14932         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14933         Remove prototype.
14934         (grub_ieee1275_realmode): Likewise.
14935         (grub_ieee1275_flag): New enum.
14936         (grub_ieee1275_test_flag): New prototype.
14937         (grub_ieee1275_set_flag): New prototype.
14938         * include/grub/powerpc/ieee1275/init.h: Remove file.
14939         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14940         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14941         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14942         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14943         comment.
14944         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14945         `grub_ieee1275_test_flag'.
14946         (grub_ieee1275_encode_devname): Likewise.
14948 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14950         * include/grub/powerpc/ieee1275/ieee1275.h
14951         (grub_ieee1275_encode_devname): New prototype.
14952         (grub_ieee1275_get_filename): Likewise.
14953         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14954         function.
14955         (grub_set_prefix): Likewise.
14956         (grub_machine_init): Call grub_set_prefix.
14957         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14958         (grub_parse_type): New enum.
14959         (grub_ieee1275_get_devargs): New function.
14960         (grub_ieee1275_get_devname): Likewise.
14961         (grub_ieee1275_parse_args): Likewise.
14962         (grub_ieee1275_get_filename): Likewise.
14963         (grub_ieee1275_encode_devname): Likewise.
14965 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14967         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14968         `grub_loader_unset'.
14970 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14972         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14973         instead of grub_ieee1275_interpret.
14974         (grub_halt_init): New function.
14975         (grub_halt_fini): Likewise.
14976         (GRUB_MOD_INIT): Correct message grammar.
14977         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14978         instead of grub_ieee1275_interpret.
14979         (grub_reboot_init): New function.
14980         (grub_reboot_fini): Likewise.
14981         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14982         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14983         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14984         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14985         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14986         function.
14987         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14988         Add prototype.
14989         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14990         prototype.
14991         (grub_halt): Likewise.
14992         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14993         (cmain): Remove __attribute__((unused)).
14994         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14995         (grub_heap_len): Likewise.
14996         (grub_machine_fini): New function.
14997         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14998         (grub_halt): Likewise.
14999         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15000         function.
15001         * util/powerpc/ieee1275/misc.c: New file.
15003 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15005         * DISTLIST: New file.
15006         * gendistlist.sh: Likewise.
15008         * Makefile.in (COMMON_DISTFILES): Removed.
15009         (BOOT_DISTFILES): Likewise.
15010         (CONF_DISTFILES): Likewise.
15011         (DISK_DISTFILES): Likewise.
15012         (FS_DISTFILES): Likewise.
15013         (INCLUDE_DISTFILES): Likewise.
15014         (KERN_DISTFILES): Likewise.
15015         (LOADER_DISTFILES): Likewise.
15016         (TERM_DISTFILES): Likewise.
15017         (UTIL_DISTFILES): Likewise.
15018         (DISTFILES): Likewise.
15019         (uninstall): Uninstall files in $(pkgdata_DATA).
15020         (DISTLIST): New target.
15021         (distdir): Use the contents of the file DISTLIST to get a list of
15022         distributed files.
15024 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15026         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15027         descriptor. This is ported from GRUB Legacy.
15029         * gencmdlist.sh: Added an extra semicolon to make it work with
15030         old sed versions. Reported by Robert Bihlmeyer
15031         <robbe@orcus.priv.at>.
15033 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15035         Automatic loading of commands is supported.
15037         * normal/main.c (read_command_list): New function.
15038         (grub_normal_execute): Call read_command_list.
15040         * normal/command.c (grub_register_command): Return zero or CMD.
15041         Allocate CMD->NAME from the heap.
15042         Initialize CMD->MODULE_NAME to zero.
15043         Find the same name as well. If the same command is found and it is
15044         a dummy command, overwrite members. If it is not a dummy command,
15045         return zero.
15046         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15047         (grub_command_find): If a dummy command is found, load a module
15048         and retry to find a command only once.
15050         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15051         make sure that each command is loaded.
15053         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15054         macro.
15055         (struct grub_command): Remove const from the member `name'.
15056         Add a new member `module_name'.
15057         (grub_register_command): Return grub_command_t.
15059         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15060         sure that each command is loaded.
15062         * genmk.rb (PModule::rule): Specify a module name without the
15063         suffix ".mod" to gencmdlist.sh.
15065 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15067         * gencmdlist.sh: New file.
15069         * genmk.rb (PModule::rule): Generate a rule for a command list.
15070         Clean command.lst.
15071         Generate command.lst from $(COMMANDFILES).
15073         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15074         (DATA): Added $(pkgdata_DATA).
15075         (install-local): Install files in $(pkgdata_DATA).
15077 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15079         * term/i386/pc/vga.c (debug_command): Removed.
15080         (GRUB_MOD_INIT): Do not register the command "debug".
15082         From Hollis Blanchard:
15083         * commands/configfile.c: New file.
15084         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15085         commands/configfile.c.
15086         (pkgdata_MODULES): Added configfile.mod.
15087         (configfile_mod_SOURCES): New variable.
15088         (configfile_mod_CFLAGS): Likewise.
15089         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15090         commands/configfile.c.
15091         (pkgdata_MODULES): Added configfile.mod.
15092         (configfile_mod_SOURCES): New variable.
15093         (configfile_mod_CFLAGS): Likewise.
15094         * util/grub-emu.c (main): Call grub_configfile_init and
15095         grub_configfile_fini.
15096         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15097         prototype.
15098         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15100 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15102         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15103         address.
15105         * commands/help.c (grub_cmd_help): Do not print newlines after
15106         the last command in print_command_help.
15108 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15110         * commands/default.h: New file.
15111         * commands/timeout.h: Likewise.
15112         * normal/context.c: Likewise.
15114         * util/misc.c: Do not include sys/times.h.
15115         Include sys/time.h and grub/machine/time.h.
15116         (grub_get_rtc): Rewritten with gettimeofday.
15118         * util/grub-emu.c (main): Call grub_default_init and
15119         grub_timeout_init before grub_normal_init, and call
15120         grub_timeout_fini and grub_default_fini after grub_main.
15122         * util/console.c (grub_ncurses_checkkey): Return the read
15123         character or -1.
15125         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15126         timeouts.
15128         * normal/main.c (read_config_file): Push MENU. If this fails,
15129         print an error and wait for a user input.
15130         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15131         If a menu is empty or an error occurs, pop MENU.
15132         (grub_normal_execute): Pop and free MENU after grub_menu_run
15133         returns.
15135         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15137         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15138         include time.h.
15139         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15140         without GRUB_UTIL.
15141         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15142         time.h.
15143         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15144         without GRUB_UTIL.
15146         * include/grub/normal.h (struct grub_menu_list): New struct.
15147         (grub_menu_list_t): New type.
15148         (struct grub_context): New struct.
15149         (grub_context_t): New type.
15150         (grub_register_command): Got rid of EXPORT_FUNC.
15151         (grub_unregister_command): Likewise.
15152         (grub_context_get): New prototype.
15153         (grub_context_get_current_menu): Likewise.
15154         (grub_context_push_menu): Likewise.
15155         (grub_context_pop_menu): Likewise.
15156         [GRUB_UTIL] (grub_default_init): Likewise.
15157         [GRUB_UTIL] (grub_default_fini): Likewise.
15158         [GRUB_UTIL] (grub_timeout_init): Likewise.
15159         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15161         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15162         commands/timeout.c and normal/context.c.
15163         (pkgdata_MODULES): Added default.mod and timeout.mod.
15164         (normal_mod_SOURCES): Added normal/context.c.
15165         (default_mod_SOURCES): New variable.
15166         (default_mod_CFLAGS): Likewise.
15167         (timeout_mod_SOURCES): Likewise.
15168         (timeout_mod_CFLAGS): Likewise.
15169         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15170         conf/i386-pc.rmk.
15171         (pkgdata_MODULES): Added default.mod and timeout.mod.
15172         (normal_mod_SOURCES): Added normal/context.c.
15173         (default_mod_SOURCES): New variable.
15174         (default_mod_CFLAGS): Likewise.
15175         (timeout_mod_SOURCES): Likewise.
15176         (timeout_mod_CFLAGS): Likewise.
15178         * Makefile.in (all-local): Added $(MKFILES).
15180 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15182         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15183         (grub_emu_SOURCES): Likewise.
15184         (pkgdata_MODULES): Add `sun.mod'.
15185         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15186         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15187         `partmap/sun.c'.
15188         (pkgdata_MODULES): Add `sun.mod'.
15189         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15190         * include/grub/partition.h (grub_sun_partition_map_init): New
15191         prototype.
15192         (grub_sun_partition_map_fini): Likewise.
15193         * partmap/sun.c: New file.
15194         * util/grub-emu.c (main): Initialize and de-initialize the sun
15195         partitionmap support.
15197 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15199         This implements an Emacs-like menu entry editor.
15201         * normal/menu_entry.c: New file.
15203         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15204         characters to ASCII.
15205         (saved_char): New variable.
15206         (grub_ncurses_checkkey): Rewritten completely.
15207         (grub_ncurses_getkey): Likewise.
15208         (grub_ncurses_init): Call raw instead of cbreak.
15210         * normal/menu.c (print_entry): Do not put a space.
15211         (init_page): Renamed to ...
15212         (grub_menu_init_page): ... this. All callers changed.
15213         (edit_menu_entry): Removed.
15214         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15216         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15218         * kern/misc.c (grub_vprintf): Call grub_refresh.
15220         * normal/menu.c (DISP_LEFT): Renamed to ...
15221         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15222         * normal/menu.c (DISP_UP): Renamed to ...
15223         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15224         * normal/menu.c (DISP_RIGHT): Renamed to ...
15225         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15226         * normal/menu.c (DISP_DOWN): Renamed to ...
15227         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15228         * normal/menu.c (DISP_HLINE): Renamed to ...
15229         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15230         * normal/menu.c (DISP_VLINE): Renamed to ...
15231         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15232         * normal/menu.c (DISP_UL): Renamed to ...
15233         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15234         * normal/menu.c (DISP_UR): Renamed to ...
15235         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15236         * normal/menu.c (DISP_LL): Renamed to ...
15237         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15238         * normal/menu.c (DISP_LR): Renamed to ...
15239         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15240         * normal/menu.c (TERM_WIDTH): Renamed to ...
15241         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15242         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15243         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15244         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15245         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15246         * normal/menu.c (TERM_MARGIN): Renamed to ...
15247         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15248         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15249         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15250         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15251         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15252         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15253         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15254         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15255         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15256         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15257         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15258         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15259         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15260         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15261         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15262         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15263         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15264         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15265         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15266         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15267         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15268         All callers changed.
15270         * include/grub/normal.h: New prototype.
15272         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15273         normal/menu_entry.c.
15274         (normal_mod_SOURCES): Likewise.
15275         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15276         (normal_mod_SOURCES): Likewise.
15278 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15280         * include/grub/normal.h (grub_halt_init): New prototype.
15281         (grub_halt_fini): Likewise.
15282         (grub_reboot_init): Likewise.
15283         (grub_reboot_fini): Likewise.
15285         * util/grub-emu.c: Include signal.h.
15286         (main_env): New global variable.
15287         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15288         catch C-c.
15289         (grub_machine_fini): New function.
15290         (main): Call grub_halt_init and grub_reboot_init before
15291         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15292         Call setjmp with MAIN_ENV to go back afterwards.
15293         Call grub_machine_fini right before return.
15295         * include/grub/util/misc.h: Include setjmp.h.
15296         (main_env): New prototype.
15298         * include/grub/kernel.h (grub_machine_fini): New prototype.
15299         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15300         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15302         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15303         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15304         * term/i386/pc/console.c (grub_console_fini): Likewise.
15306         * util/i386/pc/misc.c: New file.
15308         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15309         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15310         commands/i386/pc/reboot.c.
15312 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15314         * include/grub/dl.h (grub_dl_check_header): New prototype.
15315         (grub_arch_dl_check_header): Change return type to grub_err_t,
15316         remove size parameter and export function.  Update all callers.
15317         * kern/dl.c (grub_dl_check_header): New function.
15318         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15319         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15320         are inside the core.
15321         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15322         independent ELF header checks.
15323         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15324         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15325         `grub_dl_check_header' instead of explicit checks.  Check for the
15326         ELF type.
15327         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15328         `grub_dl_check_header' instead of explicit checks.  Remove arch
15329         specific ELF header checks.
15331         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15332         argument SIZE.
15334 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15336         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15337         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15339 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15341         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15342         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15343         (part_map_iterate): Clear `grub_errno' and return 0 if
15344         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15345         * partmap/amiga.c (amiga_partition_map_iterate): Return
15346         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15347         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15349 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15351         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15352         help info.
15354 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15356         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15357         Removed prototype.
15358         (grub_rescue_cmd_linux): New prototype.
15359         (grub_rescue_cmd_initrd): Likewise.
15360         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15361         `bi_rec'.
15362         (grub_linux_release_mem): Release the memory for the initrd.
15363         (grub_load_linux): Renamed from this...
15364         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15365         Changed `entry' not to be static.  Loop over memory regions to
15366         find another one when the default fails.
15367         (grub_rescue_cmd_initrd): New function.
15368         (grub_linux_init): Remove function.
15369         (grub_linux_fini): Likewise.
15370         (GRUB_MOD_INIT): Register `initrd'.
15371         (GRUB_MOD_FINI): Unregister `initrd'.
15372         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15373         Function removed.
15374         (grub_linux_normal_fini): Likewise.
15375         (GRUB_MOD_INIT): Register `initrd'.
15376         (GRUB_MOD_FINI): Unregister `initrd'.
15378 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15380         * commands/help.c: New file.
15381         * normal/arg.c (show_help): Renamed to...
15382         (grub_arg_show_help): ... this.
15383         * commands/i386/pc/halt.c: New file.
15384         * commands/i386/pc/reboot.c: Likewise.
15385         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15386         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15387         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15388         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15389         variables.
15390         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15391         `commands/help.c'.
15392         (pkgdata_MODULES): Add `help.mod'.
15393         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15394         * grub/i386/pc/init.h (grub_reboot): New prototype.
15395         (grub_halt): Likewise.
15396         * include/grub/normal.h (grub_arg_show_help): New prototype.
15397         (grub_help_init): Likewise.
15398         (grub_help_fini): Likewise.
15399         * util/grub-emu.c (main): Initialize and deinitialize the help
15400         command.
15402         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15404         * normal/command.c (grub_command_init): Fixed the description of
15405         the `set' and `unset' commands.
15407 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15409         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15410         function.
15411         * commands/ieee1275/halt.c: New file.
15412         * commands/ieee1275/reboot.c: Likewise.
15413         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15414         `__attribute__ ((unused))'.  Some GCS related fixed.
15415         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15416         (grub_suspend_fini): Likewise.
15417         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15418         and `halt.mod'.
15419         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15420         (halt_mod_CFLAGS): New variables.
15421         * include/grub/powerpc/ieee1275/ieee1275.h
15422         (grub_ieee1275_interpret): New prototype.
15424 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15426         * include/grub/misc.h (memmove): New prototype.
15427         (memcpy): Likewise.
15429 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15431         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15432         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15434 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15436         * kern/misc.c (grub_strndup): Function rewritten.
15438 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15440         * normal/menu.c (TERM_WIDTH): Macro redefined.
15441         (TERM_TOP_BORDER_Y): Likewise.
15442         (draw_border): Replaced while-loop by a for-loop.  Make the number
15443         of lines consistent with the number of lines displayed in
15444         print_entries.  Added a margin below the rectangle.
15445         (print_entry): Make the entry fit in the rectangle.
15446         (print_entries): Display the scroll arrows next to the right
15447         border.
15449 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15451         * fs/minix.c (grub_minix_find_file): Reserve more space for
15452         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15453         `grub_strncpy' to copy `path' into it.
15455 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15457         Add the loopback device, a device via which files can be accessed
15458         as devices.
15460         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15461         (pkgdata_MODULES): Add loopback.mod.
15462         (loopback_mod_SOURCES): New variable.
15463         (loopback_mod_CFLAGS): Likewise.
15464         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15465         `disk/loopback.c'.
15466         (pkgdata_MODULES): Add loopback.mod.
15467         (loopback_mod_SOURCES): New variable.
15468         (loopback_mod_CFLAGS): Likewise.
15469         * disk/loopback.c: new file.
15470         * include/grub/normal.h (grub_loop_init): New prototype.
15471         (grub_loop_fini): New prototype.
15472         * util/grub-emu.c (main): Initialize and de-initialize loopback
15473         support.
15474         * include/grub/disk.h (grub_disk_dev_id): Add
15475         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15477 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15479         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15480         function.
15481         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15482         (suspend_mod_SOURCES): New variable.
15483         (suspend_mod_CFLAGS): Likewise.
15484         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15485         New prototype.
15486         * commands/ieee1275/suspend.c: New file.
15488 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15490         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15491         ((unused))' to `__attribute__ ((used))'.
15492         (GRUB_MOD_FINI): Likewise.
15493         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15494         * genmk.rb (PModule): Assign space to common symbols when linking
15495         modules.
15497 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15499         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15500         `unsigned' arguments to `grub_size_t'.
15501         (grub_malloc): Likewise.
15502         (grub_realloc): Likewise.
15503         (grub_memalign): Likewise.
15504         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15505         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15506         * util/misc.c (grub_malloc): Likewise.
15507         (grub_realloc): Likewise.
15508         * kern/mm.c (get_header_from_pointer): Change the casts to
15509         `unsigned' into a cast to `grub_size_t'.
15511         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15512         point to `currnode' when `currnode' is changed.
15514         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15515         Schottelius <nico-linux@schottelius.org>.
15517 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15519         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15520         (note_path): Remove variable.
15521         (GRUB_IEEE1275_NOTE_NAME): New macro.
15522         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15523         (grub_ieee1275_note_hdr): New structure.
15524         (grub_ieee1275_note_desc): Likewise.
15525         (grub_ieee1275_note): Likewise.
15526         (load_note): Remove `dir' argument.  All callers updated.  Remove
15527         `note_img' and `path'.  Do not load a file from `note_path'.
15528         Initialize a struct grub_ieee1275_note and write that to `out'.
15529         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15531 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15533         * util/misc.c (grub_util_read_image): Revert last change.  It
15534         called `grub_util_read_at', which seeks from the beginning of the
15535         file.
15537 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15539         * TODO: Add note about endianness in grub-mkimage.
15540         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15541         section.
15542         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15543         (grub_mkimage_SOURCES): New target.
15544         * include/grub/kernel.h (grub_start_addr): Remove variable.
15545         (grub_end_addr): Likewise.
15546         (grub_total_module_size): Likewise.
15547         (grub_kernel_image_size): Likewise.
15548         (GRUB_MODULE_MAGIC): New constant.
15549         (grub_module_info): New structure.
15550         (grub_arch_modules_addr): New prototype.
15551         (grub_get_end_addr): Remove prototype.
15552         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15553         * include/grub/powerpc/ieee1275/kernel.h: New file.
15554         * include/grub/util/misc.h (grub_util_get_fp_size): New
15555         prototype.
15556         (grub_util_read_at): Likewise.
15557         (grub_util_write_image_at): Likewise.
15558         * kern/main.c (grub_get_end_addr): Remove function.
15559         (grub_load_modules): Call grub_arch_modules_addr instead of using
15560         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15561         the grub_module_info fields instead of calling grub_get_end_addr
15562         as loop conditions.  Move grub_add_unused_region code here.
15563         (grub_add_unused_region): Remove function.
15564         * kern/i386/pc/init.c: Include grub/cache.h.
15565         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15566         one call to add_mem_region.
15567         (grub_arch_modules_addr): New function.
15568         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15569         (grub_total_module_size): Likewise.
15570         Include grub/machine/kernel.h.
15571         (grub_arch_modules_addr): New function.
15572         * util/grub-emu.c (grub_end_addr): Remove variable.
15573         (grub_total_module_size): Likewise.
15574         (grub_arch_modules_addr): New function.
15575         * util/misc.c: Include unistd.h.
15576         (grub_util_get_fp_size): New function.
15577         (grub_util_read_at): Likewise.
15578         (grub_util_write_image_at): Likewise.
15579         (grub_util_read_image): Call grub_util_read_at.
15580         (grub_util_write_image): Call grub_util_write_image_at.
15581         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15582         additional memory in kernel_img for a struct grub_module_info.
15583         Fill in that grub_module_info.
15584         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15586 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15588         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15589         New function.
15590         * include/grub/powerpc/ieee1275/ieee1275.h
15591         (grub_ieee1275_milliseconds): New prototype.
15592         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15593         Change to 1000.
15594         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15595         grub_ieee1275_milliseconds.
15597 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15599         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15600         variable.
15601         (find_options): New function.
15602         (cmain): Call find_options.
15603         * include/grub/powerpc/ieee1275/ieee1275.h
15604         (grub_ieee1275_realmode): New extern variable.
15605         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15606         grub_map if grub_ieee1275_realmode is false.
15608 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15610         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15611         lines are inserted and make it work like readline.  Reported by
15612         Vincent Pelletier <subdino2004@yahoo.fr>.
15614 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15616         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15618         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15619         `kern/powerpc/cache.S'.
15621 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15623         * genmk.rb: Handle the `Program' class in the main loop.  Written
15624         by Johan Rydberg <jrydberg@gnu.org>.
15625         (Program): New class.
15626         (programs): New variable.
15627         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15628         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15629         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15630         (help_arch): Function removed.
15631         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15632         `powerpc/libgcc.h' and `loader.h'.
15633         (pkgdata_PROGRAMS): New variable.
15634         (sbin_UTILITIES): Variable removed.
15635         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15636         (grubof_SOURCES): Variable re-defined so it only includes the
15637         core functionality.
15638         (grubof_CFLAGS): Remove `-DGRUBOF'.
15639         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15640         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15641         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15642         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15643         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15644         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15645         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15646         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15647         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15648         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15649         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15650         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15651         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15652         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15653         (pc_mod_CFLAGS): New variables.
15654         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15655         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15656         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15657         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15658         Moved from here...
15659         * include/grub/i386/pc/init.h (grub_os_area_addr)
15660         (rub_os_area_size): ... to here.
15661         * include/grub/powerpc/ieee1275/ieee1275.h
15662         (grub_ieee1275_entry_fn): Export symbol.
15663         * include/grub/powerpc/ieee1275/init.h: New file.
15664         * include/grub/powerpc/libgcc.h: Likewise.
15665         * include/grub/cache.h: Likewise.
15666         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15667         <hollis@penguinppc.org>.
15668         * kern/dl.c: Include <grub/cache.h>.
15669         (grub_dl_flush_cache): New function.
15670         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15671         for this module.
15672         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15673         (grub_console_init): Removed prototypes.
15674         (grub_machine_init): Don't initialize the modules anymore.
15675         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15676         static.
15677         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15678         Macro undef removed.
15679         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15680         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15681         relocation `R_PPC_REL32'.  Return an error when the relocation is
15682         unknown.
15683         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15684         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15685         * util/misc.c (grub_arch_sync_caches): Likewise.
15687 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15689         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15690         `symlist.c', add `grubof_symlist.c'.
15691         (symlist.c): Variable removed.
15692         (grubof_HEADERS): Variable added.
15693         (grubof_symlist.c): New target.
15694         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15695         `kernel_img_HEADERS'.
15696         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15697         * kern/powerpc/dl.c: New file.
15698         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15699         Function removed.
15700         (grub_arch_dl_relocate_symbols): Likewise.
15701         (grub_register_exported_symbols): Likewise.
15703 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15705         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15706         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15707         to fail instead.  Reported by Vincent Pelletier
15708         <subdino2004@yahoo.fr>.
15710         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15711         it is not allocated.  Reported by Vincent Pelletier
15712         <subdino2004@yahoo.fr>.
15714         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15715         output so the output looks better.
15717 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15719         Modulize the partition map support and add support for the amiga
15720         partition map.
15722         * commands/ls.c: Include <grub/partition.h> instead of
15723         <grub/machine/partition.h>.
15724         * kern/disk.c: Likewise.
15725         * kern/rescue.c: Likewise.
15726         * loader/i386/pc/chainloader.c: Likewise.
15727         * normal/cmdline.c: Likewise.
15728         * kern/powerpc/ieee1275/init.c: Likewise.
15729         (grub_machine_init): Call `grub_pc_partition_map_init',
15730         `grub_amiga_partition_map_init' and
15731         `grub_apple_partition_map_init'.
15732         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15733         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15734         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15735         `partition.h' and `pc_partition.h'.
15736         (grub_setup_SOURCES): Remove
15737         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15738         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15739         (grub_emu_SOURCES): Likewise.
15740         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15741         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15742         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15743         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15744         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15745         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15746         (grubof_SOURCES): Likewise.
15747         * disk/i386/pc/partition.c: File removed.
15748         * disk/powerpc/ieee1275/partition.c: Likewise.
15749         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15750         * include/grub/i386/pc/partition.h: Likewise.
15751         * kern/partition.c: New file.
15752         * partmap/amiga.c: Likewise.
15753         * partmap/apple.c: Likewise.
15754         * partmap/pc.c: Likewise.
15755         * include/grub/partition.h: Likewise..
15756         * include/grub/pc_partition.h: Likewise.
15757         * util/grub-emu.c: Include <grub/partition.h> instead of
15758         <grub/machine/partition.h>.
15759         (main): Call `grub_pc_partition_map_init',
15760         `grub_amiga_partition_map_init' and
15761         `grub_apple_partition_map_init' and deinitialize afterwards.
15762         * util/i386/pc/biosdisk.c: Include `#include
15763         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15764         `<grub/machine/partition.h>'.
15765         * util/i386/pc/grub-setup.c: Likewise.
15766         * util/i386/pc/biosdisk.c: Likewise.
15767         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15768         partition information in case of a PC partition.
15769         * util/i386/pc/grub-setup.c: Include `#include
15770         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15771         `<grub/machine/partition.h>'.
15772         (setup): Only access the PC specific partition information in case
15773         of a PC partition.
15775 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15777         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15778         (grub_longjmp): Likewise.
15779         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15780         20.
15781         * normal/powerpc/setjmp.S: New file.
15782         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15783         `normal/powerpc/setjmp.S'.
15784         (grubof_CFLAGS): Add `-DGRUBOF'.
15785         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15786         [GRUB_UTIL && !GRUBOF].
15788 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15790         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15791         property named `name'.  Correctly handle the error returned by
15792         `grub_ieee1275_finddevice' if a device can not be opened.
15794 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15796         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15797         `actual' for negativity.
15798         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15799         kern/fshelp.c.
15801 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15803         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15804         (PAGE_OFFSET): New macro.
15805         (CRTC_ADDR_PORT): Likewise.
15806         (CRTC_DATA_PORT): Likewise.
15807         (START_ADDR_HIGH_REGISTER): Likewise.
15808         (START_ADDR_LOW_REGISTER): Likewise.
15809         (GRAPHICS_ADDR_PORT): Likewise.
15810         (GRAPHICS_DATA_PORT): Likewise.
15811         (READ_MAP_REGISTER): Likewise.
15812         (INPUT_STATUS1_REGISTER): Likewise.
15813         (INPUT_STATUS1_VERTR_BIT): Likewise.
15814         (page): New variable.
15815         (wait_vretrace): New function.
15816         (set_read_map): Likewise.
15817         (set_start_address): Likewise.
15818         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15819         the right page.
15820         (check_vga_mem): Take the page into account.
15821         (write_char): Likewise.
15822         (write_cursor): Likewise.
15823         (scroll_up): Likewise.  Copy the page to the page that is not
15824         shown and switch between both pages.
15825         (grub_vga_putchar): Fix off by one error.
15826         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15827         account.
15829 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15831         Add support for iso9660 (including rockridge).
15833         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15834         (iso9660_mod_SOURCES): New variable.
15835         (iso9660_mod_CFLAGS): Likewise.
15836         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15837         * include/grub/fs.h (grub_iso9660_init): New prototype.
15838         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15839         * fs/iso9660.c: New file.
15841         * include/grub/misc.h (grub_strncat): New prototype.
15842         * kern/misc.c (grub_strncat): New function.
15844         * fs/hfs.c (grub_hfs_mount): Translate the error
15845         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15846         * fs/jfs.c (grub_jfs_mount): Likewise.
15847         * fs/ufs.c (grub_ufs_mount): Likewise.
15849 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15851         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15852         which initialized BAT registers.
15853         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15854         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15855         Move from here...
15856         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15857         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15858         ... to here.
15859         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15860         (grub_mapclaim): Likewise.
15861         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15862         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15863         hand.
15865 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15867         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15868         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15869         -ffreestanding and -msoft-float.
15871 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15873         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15874         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15875         set in grub_ieee1275_flags.
15877 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15879         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15880         prototype.
15881         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15882         grub_console_init first.
15883         Change the memory range used for grub_ieee1275_claim and
15884         grub_mm_init_region.
15885         Print an error message if the claim fails.
15886         Include <grub/misc.h>.
15888 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15890         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15891         Call grub_children_iterate for device nodes of type `scsi',
15892         `ide', or `ata'.
15893         (grub_ofdisk_open): Remove manual device alias resolution.
15894         Fix memory leak when device cannot be opened.
15895         * include/grub/powerpc/ieee1275/ieee1275.h
15896         (grub_children_iterate): New prototype.
15897         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15898         New function.
15899         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15900         Return -1 if args.size was -1.
15902 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15904         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15905         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15906         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15907         Open Firmware's memory for it; claim memory from _start to _end.
15908         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15909         (_end): New extern.
15910         (_start): Zero BSS from __bss_start to _end.
15911         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15912         New extern.
15913         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15915 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15917         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15918         -1 if args.base was -1.
15920 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15922         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15923         escape sequence instead of a literal ^L. Also call
15924         grub_ofconsole_gotoxy.
15926 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15928         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15929         void *  arguments to grub_addr_t.  All callers updated.  Also make
15930         the `result' argument optional.
15931         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15932         All callers updated.
15934 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15936         * commands/ls.c (grub_ls_list_files): Use the string following the
15937         initial ')', if present, as the filesystem path.
15938         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15940         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15942 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15944         Make the source code of the menu interface more readable.
15946         * normal/menu.c: Include grub/mm.h.
15947         (TERM_WIDTH): New macro.
15948         (TERM_HEIGHT): Likewise.
15949         (TERM_INFO_HEIGHT): Likewise.
15950         (TERM_MARGIN): Likewise.
15951         (TERM_SCROLL_WIDTH): Likewise.
15952         (TERM_TOP_BORDER_Y): Likewise.
15953         (TERM_LEFT_BORDER_X): Likewise.
15954         (TERM_BORDER_WIDTH): Likewise.
15955         (TERM_MESSAGE_HEIGHT): Likewise.
15956         (TERM_BORDER_HEIGHT): Likewise.
15957         (TERM_NUM_ENTRIES): Likewise.
15958         (TERM_FIRST_ENTRY_Y): Likewise.
15959         (TERM_ENTRY_WIDTH): Likewise.
15960         (TERM_CURSOR_X): Likewise.
15961         (draw_border): Use macros instead of magic numbers.
15962         (print_entry): Likewise.
15963         (print_entries): Likewise.
15964         (run_menu): Likewise. Also, handle the key 'e'.
15965         (run_menu_entry): Ignore empty command lines.
15966         (print_message): Added a new argument EDIT. If EDIT is true,
15967         print a different message.
15968         (init_page): Likewise.
15969         (edit_menu_entry): New function. Not implemented yet.
15971 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15973         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15974         can be loaded from normal mode.
15976         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15977         `multiboot.mod'.
15978         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15979         (multiboot_mod_CFLAGS): New variables.
15980         * loader/i386/pc/linux_normal.c: New file.
15981         * loader/i386/pc/multiboot_normal.c: Likewise.
15983         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15984         attribute `unused'.
15986         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15987         `fdiro' to read the mode information from instead of `diro'.
15989         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15990         looking up a symlink.
15992         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15993         macro.
15994         * normal/command.c (grub_command_execute): Don't parse the
15995         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15996         flags of the command.
15998         * normal/menu.c (grub_menu_run): Fix typo.
16000 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16002         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16004         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16005         `y + 1' instead of `y - 1'.
16007         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16009 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16011         From Hollis Blanchard <hollis@penguinppc.org>:
16012         * kern/misc.c (memmove): New alias for grub_memmove.
16013         (memcmp): New alias for grub_memcmp.
16014         (memset): New alias for grub_memset.
16015         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16016         Change "int handle" to "grub_ieee1275_phandle_t handle".
16017         * include/grub/powerpc/ieee1275/ieee1275.h
16018         (grub_ieee1275_get_property): Likewise.
16020 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16022         Added normal mode command `chainloader' as module chain.mod, which
16023         depends on normal.mod and _chain.mod.
16025         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16026         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16027         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16028         Deleted prototype.
16029         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16030         but arguments parsing moved to ...
16031         (grub_chainloader_cmd): ... here.  New function.
16032         * include/grub/i386/pc/chainloader.h: New file.
16033         * loader/i386/pc/chainloader_normal.c: Likewise.
16035 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16037         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16038         (grub_mkimage_LDFLAGS): Likewise.
16039         (grub_emu_SOURCES): Likewise.
16040         (kernel_img_HEADERS): Added fshelp.h.
16041         * fs/ext2.c: Include <grub/fshelp.h>.
16042         (FILETYPE_REG): New macro.
16043         (FILETYPE_INO_REG): Likewise.
16044         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16045         Changed all users.
16046         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16047         all users.
16048         (grub_fshelp_node): New struct.
16049         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16050         to a pointer.
16051         (grub_ext2_get_file_block): Removed function.
16052         (grub_ext2_read_block): New function.
16053         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16054         This function was written.
16055         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16056         (grub_ext2_find_file): Removed function.
16057         (grub_ext2_read_symlink): New function.
16058         (grub_ext2_iterate_dir): Likewise.
16059         (grub_ext2_open): Rewritten.
16060         (grub_ext2_dir): Rewritten.
16061         * include/grub/fshelp.h: New file.
16062         * fs/fshelp.c: Likewise.
16064 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16066         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16067         (print_message): Add a missing newline.
16068         (run_menu): Added timeout support.
16069         (run_menu_entry): New local function.
16070         (grub_menu_run): Added support for booting.
16072         * kern/loader.c (grub_loader_is_loaded): New function.
16074         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16075         (grub_get_rtc): Exported.
16077         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16078         (grub_get_rtc): Exported.
16080         * include/grub/normal.h (struct grub_command_list): Remove
16081         constant from the member `command'.
16083         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16085         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16087         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16089 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16091         Add support for the JFS filesystem.
16093         * fs/jfs.c: New file.
16094         * include/grub/fs.h (grub_jfs_init): New prototype.
16095         (grub_jfs_fini): New prototype.
16096         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16097         (grub_emu_SOURCES): Likewise.
16098         (pkgdata_MODULES): Add jfs.mod.
16099         (jfs_mod_SOURCES): New variable.
16100         (jfs_mod_CFLAGS): Likewise.
16101         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16102         (grubof_SOURCES): Likewise.
16103         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16105         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16106         endian to the host endian.
16107         (grub_fat_utf16_to_utf8): Move function from there...
16108         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16109         the endianness of the source string anymore.
16110         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16112 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16114         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16115         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16116         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16117         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16119         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16120         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16121         for `node_found' and `it_dir'.
16122         (grub_hfs_dir): Add prototype for `dir_hook'.
16124         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16125         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16126         and `indir32' to silence a gcc warning.
16128         * include/grub/fs.h (grub_hfs_init): New prototype.
16129         (grub_hfs_fini): Likewise.
16132 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16134         Each disk device has its own id now. This is useful to make use
16135         of multiple disk devices.
16137         * include/grub/disk.h (grub_disk_dev_id): New enum.
16138         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16139         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16141         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16142         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16144         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16145         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16147         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16148         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16150         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16151         "id" which is used by the cache manager.
16153         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16154         of just "GRUB".
16156 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16158         * fs/hfs.c: New file.
16159         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16160         (grub_emu_SOURCES): Likewise.
16161         (pkgdata_MODULES): Add hfs.mod.
16162         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16163         (grubof_SOURCES): Likewise.
16164         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16166         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16167         * kern/misc.c (grub_strncasecmp): Add function.
16169 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16171         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16172         with parentheses.
16174         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16175         (grub_ext2_dir): In case the directory entry type is unknown, read
16176         it from the inode.
16178 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16180         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16181         grub_load_linux instead of grub_rescue_cmd_linux as second
16182         argument of grub_rescue_register_command.
16184         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16186 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16188         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16189         function.
16190         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16191         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16192         `loader/powerpc/ieee1275/linux.c',
16193         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16194         * include/grub/powerpc/ieee1275/ieee1275.h
16195         (grub_ieee1275_release): New prototype.
16196         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16197         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16198         normal, boot, linux and linux_normal.
16199         * loader/powerpc/ieee1275/linux.c: New file.
16200         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16202 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16204         * normal/arg.c (grub_arg_parse): Correct error handling after
16205         reallocating the argumentlist (check if `argl' is not null instead
16206         of checking if `args' is not null).
16207         * kern/mm.c (grub_realloc): Return the same pointer when using the
16208         same region, instead of returning the header address.
16210 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16212         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16213         one block instead of two when looking for the initial partition.
16214         (grub_partition_probe): Initialize the local variable `p' with 0.
16215         Use base 10 for the grub_strtoul call.
16216         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16217         need for one local variable.
16218         (grub_strtoul): Don't add the new value to `num', instead of that
16219         just assign it.
16221 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16223         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16224         (pxeboot_img_SOURCES): New variable.
16225         (pxeboot_img_ASFLAGS): Likewise.
16226         (pxeboot_img_LDFLAGS): Likewise.
16227         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16228         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16229         <lode_leroy@hotmail.com>.
16231 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16233         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16234         there was no input.
16236 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16238         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16239         the history buffer logic.
16241 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16243         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16244         (FILETYPE_INO_SYMLINK): New macros.
16245         (grub_ext2_find_file): Check if the node is a directory using the
16246         inode stat information instead of using the filetype in the
16247         dirent.  Exclude the first character of an absolute symlink.
16248         (grub_ext2_dir): Mask out the filetype part of the mode member of
16249         the inode.
16251 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16253         Add support for UFS version 1 and 2.  Add support for the minix
16254         filesystem version 1 and 2, both the variants with 14 and 30 long
16255         filenames.
16257         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16258         fs/minix.c.
16259         (grub_emu_SOURCES): Likewise.
16260         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16261         (ufs_mod_SOURCES): New variable.
16262         (ufs_mod_CFLAGS): Likewise.
16263         (minix_mod_SOURCES): Likewise.
16264         (minix_mod_CFLAGS): Likewise.
16265         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16266         fs/minix.c.
16267         (grubof_SOURCES): Likewise.
16268         * fs/ufs.c: New file.
16269         * fs/minix.c: New file.
16270         * include/grub/fs.h (grub_ufs_init): New prototype.
16271         (grub_ufs_fini): Likewise.
16272         (grub_minix_init): Likewise.
16273         (grub_minix_fini): Likewise.
16274         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16275         minix fs.
16277 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16279         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16280         commands/ls.c, commands/terminal.c, commands/boot.c,
16281         commands/cmp.c and commands/cat.c.
16282         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16284         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16285         "env.h"
16287 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16289         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16290         and grub_, respectively. Because the conversion is trivial and
16291         mechanical, I omit the details here. Please refer to the CVS
16292         if you need more information.
16294 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16296         * include/pupa: Renamed to ...
16297         * include/grub: ... this.
16298         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16299         * util/i386/pc/grub-mkimage.c: ... this.
16300         * util/i386/pc/pupa-setup.c: Renamed to ...
16301         * util/i386/pc/grub-setup.c: ... this.
16302         * util/pupa-emu.c: Renamed to ...
16303         * util/grub-emu.c: ... this.
16305 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16307         Add support for the newworld apple macintosh (PPC).  This has been
16308         tested on the powerbook 2000 only.  It only adds support for
16309         generic ieee1275 functions, console and disk support.  This should
16310         be easy to port to other architectures with support for Open
16311         Firmware.
16313         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16314         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16315         specific tests are only executed while building for the i386.
16316         Inverse test for crosscompile.
16317         * genmk.rb (Utility): Allow assembler files.
16318         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16319         * conf/powerpc-ieee1275.rmk: New file.
16320         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16321         * disk/powerpc/ieee1275/partition.c: Likewise.
16322         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16323         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16324         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16325         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16326         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16327         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16328         * include/pupa/powerpc/ieee1275/loader.h
16329         * include/pupa/powerpc/setjmp.h: Likewise.
16330         * include/pupa/powerpc/types.h: Likewise.
16331         * kern/powerpc/ieee1275/init.c: Likewise.
16332         * kern/powerpc/ieee1275/openfw.c: Likewise.
16333         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16335         These files were written by Johan Rydberg
16336         (jrydberg@night.trouble.net) and I only modified them slightly.
16338         * boot/powerpc/ieee1275/cmain.c: New file.
16339         * boot/powerpc/ieee1275/crt0.S: Likewise.
16340         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16341         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16343 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16345         * Makefile.in: Update copyright.
16346         * genmodsrc.sh: Likewise.
16347         * gensymlist.sh: Likewise.
16348         * term/i386/pc/vga.c: Indent correctly.
16350         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16351         bugreporting address.
16352         * util/i386/pc/pupa-setup.c (usage): Likewise,
16353         (main): Call pupa_ext2_init and pupa_ext2_fini.
16355         * fs/fat.c (log2): Renamed to ...
16356         (fat_log2): ... this.
16357         All callers changed.
16358         * kern/misc.c (memcpy): Alias to pupa_memmove.
16359         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16360         lvalue cast.
16361         * util/console.c (pupa_ncurses_fini): Return 0.
16363         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16364         Move fail label here.
16365         [__GNU__]: Don't warn when using stat.
16366         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16367         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16368         long int. Use strtol instead of strtoul.
16370 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16372         * commands/boot.c: New file.
16373         * commands/cat.c: Likewise.
16374         * commands/cmp.c: Likewise.
16375         * commands/ls.c: Likewise.
16376         * commands/terminal.c: Likewise.
16377         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16378         (pupa_register_command): Changed interface to match the new
16379         argument parser.
16380         (pupa_command_execute): Changed (almost rewritten) so it uses
16381         pupa_split_command.  Added support for setting variables using the
16382         syntax `foo=bar'.
16383         (rescue_command): Changed to work with the new argument parser.
16384         (terminal_command): Moved from here to commands/terminal.c.
16385         (set_command): New function.
16386         (unset_command): New function.
16387         (insmod_command): New function.
16388         (rmmod_command): New function.
16389         (lsmod_command): New function.
16390         (pupa_command_init): Don't initialize the command terminal
16391         anymore.  Initialize the commands set, unset, insmod, rmmod and
16392         lsmod.
16393         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16394         (kernel_img_HEADERS): Add arg.h and env.h.
16395         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16396         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16397         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16398         normal/arg.c.
16399         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16400         terminal.mod.
16401         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16402         (boot_mod_SOURCES): New variable.
16403         (terminal_mod_SOURCES): Likewise.
16404         (ls_mod_SOURCES): Likewise.
16405         (cmp_mod_SOURCES): Likewise.
16406         (cat_mod_SOURCES): Likewise.
16408         * normal/arg.c: New file.
16409         * kern/env.c: Likewise.
16410         * include/pupa/arg.h: Likewise.
16411         * include/pupa/env.h: Likewise.
16412         * font/manager.c (font_command): Changed to match argument parsing
16413         interface changes.
16414         (PUPA_MOD_INIT): Likewise.
16415         * hello/hello.c (pupa_cmd_hello): Likewise.
16416         (PUPA_MOD_INIT): Likewise.
16417         * include/pupa/disk.h: Include <pupa/device.h>.
16418         (pupa_print_partinfo): New prototype.
16419         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16420         (pupa_dl_get_prefix): Likewise.
16421         * include/pupa/misc.h: Include <pupa/err.h>.
16422         (pupa_isgraph): New prototype.
16423         (pupa_isdigit): Likewise.
16424         (pupa_split_cmdline): Likewise.
16425         * include/pupa/normal.h: Include <pupa/arg.h>.
16426         (pupa_command): Changed the prototype of the member `func' to
16427         match the argument parsing interface.  Added member `options'.
16428         (pupa_register_command): Updated to match function.
16429         (pupa_arg_parse): New prototype.
16430         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16431         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16432         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16433         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16434         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16435         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16436         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16437         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16438         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16439         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16440         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16441         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16442         * kern/disk.c: Include <pupa/file.h>.
16443         (pupa_print_partinfo): New function.
16444         * kern/dl.c: Include <pupa/env.h>.
16445         (pupa_dl_dir): Variable removed.
16446         (pupa_dl_load): Use the environment variable `prefix' instead of
16447         the variable pupa_dl_dir.
16448         (pupa_dl_set_prefix): Function removed.
16449         (pupa_dl_get_prefix): Likewise.
16450         * kern/i386/pc/init.c: Include <pupa/env.h>.
16451         (pupa_machine_init): Use the environment variable `prefix' instead of
16452         using pupa_dl_set_prefix to set the prefix.
16453         * kern/main.c: Include <pupa/env.h>.
16454         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16455         using pupa_dl_get_prefix to get the prefix.
16456         * kern/misc.c: Include <pupa/env.h>.
16457         (pupa_isdigit): New function.
16458         (pupa_isgraph): Likewise.
16459         (pupa_ftoa): Likewise.
16460         (pupa_vsprintf): Added support for printing values of the type
16461         `double'.  Make it possible to format variable output when using
16462         formatting like `%1.2%f'.
16463         (pupa_split_cmdline): New function.
16464         * kern/rescue.c: Include <pupa/env.h>.
16465         (next_word): Removed function.
16466         (pupa_rescue_cmd_prefix): Likewise.
16467         (pupa_rescue_cmd_set): New function.
16468         (pupa_rescue_cmd_unset): New function.
16469         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16470         split the command line instead of splitting it here.  Added
16471         support for setting variables using the syntax `foo=bar'.  Don't
16472         initialize the prefix command anymore.  Initialized the set and
16473         unset commands.
16474         * normal/cmdline.c: Include <pupa/env.h>.
16475         (pupa_tab_complete): Added prototypes for print_simple_completion,
16476         print_partition_completion, add_completion, iterate_commands,
16477         iterate_dev, iterate_part and iterate_dir. Moved code to print
16478         partition information from here to kern/disk.c.
16479         (pupa_cmdline_run): Don't check if the function exists anymore.
16480         * normal/main.c: Include <pupa/env.h>.
16481         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16482         instead of using pupa_dl_get_prefix to get the prefix.
16483         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16484         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16485         warning.
16486         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16487         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16488         ((unused))' to silence a gcc warning.
16489         (pupa_vga_setcolor): Likewise.
16490         (debug_command): Changed to match argument parsing
16491         interface changes.
16492         * util/pupa-emu.c: Include <pupa/env.h>.
16493         (options): Added 0's for unused fields to silence a gcc warning.
16494         (argp): Likewise.
16495         (main): Use the environment variable `prefix' instead of using
16496         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16497         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16498         and terminal.
16500         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16501         * util/misc.c: Include <malloc.h>.
16502         (pupa_malloc): Rewritten so errors are correctly reported.
16503         (pupa_realloc): Likewise.
16504         (pupa_memalign): Likewise.
16505         (pupa_mm_init_region): Declare unused variables with
16506         `__attribute__ ((unused))' to silence a gcc warning.
16507         * normal/i386/setjmp.S: Remove tab at the end of the file to
16508         silence a gcc warning.
16509         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16510         variables with `__attribute__ ((unused))' to silence a gcc
16511         warning.
16512         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16513         local variable i unsigned to silence a gcc warning.
16515         * kern/term.c: Include <pupa/misc.h>.
16516         (pupa_more_lines): New variable.
16517         (pupa_more): Likewise.
16518         (pupa_putcode): When the pager is active pause at the end of every
16519         screen.
16520         (pupa_set_more): New function.
16521         * include/pupa/term.h (pupa_set_more): New prototype.
16524 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16526         Now this project is GRUB 2 rather than PUPA. The location of
16527         the CVS repository was moved to GRUB's.
16529         * configure.ac: Use bug-grub as the reporting address.
16530         Use GRUB instead of PUPA.
16531         Change the version number to 1.90.
16533 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16535         * genkernsyms.sh: Updated copyright information.
16536         * genmk.rb: Likewise.
16537         * genmodsrc.sh: Likewise.
16538         * gensymlist.sh: Likewise.
16539         * boot/i386/pc/boot.S: Likewise.
16540         * boot/i386/pc/diskboot.S: Likewise.
16541         * disk/i386/pc/biosdisk.c: Likewise.
16542         * disk/i386/pc/partition.c: Likewise.
16543         * font/manager.c: Likewise.
16544         * fs/ext2.c: Likewise.
16545         * fs/fat.c: Likewise.
16546         * include/pupa/boot.h: Likewise.
16547         * include/pupa/device.h: Likewise.
16548         * include/pupa/disk.h: Likewise.
16549         * include/pupa/dl.h: Likewise.
16550         * include/pupa/elf.h: Likewise.
16551         * include/pupa/err.h: Likewise.
16552         * include/pupa/file.h: Likewise.
16553         * include/pupa/font.h: Likewise.
16554         * include/pupa/fs.h: Likewise.
16555         * include/pupa/kernel.h: Likewise.
16556         * include/pupa/loader.h: Likewise.
16557         * include/pupa/misc.h: Likewise.
16558         * include/pupa/mm.h: Likewise.
16559         * include/pupa/net.h: Likewise.
16560         * include/pupa/normal.h: Likewise.
16561         * include/pupa/rescue.h: Likewise.
16562         * include/pupa/setjmp.h: Likewise.
16563         * include/pupa/symbol.h: Likewise.
16564         * include/pupa/term.h: Likewise.
16565         * include/pupa/types.h: Likewise.
16566         * include/pupa/i386/setjmp.h: Likewise.
16567         * include/pupa/i386/types.h: Likewise.
16568         * include/pupa/i386/pc/biosdisk.h: Likewise.
16569         * include/pupa/i386/pc/boot.h: Likewise.
16570         * include/pupa/i386/pc/console.h: Likewise.
16571         * include/pupa/i386/pc/init.h: Likewise.
16572         * include/pupa/i386/pc/kernel.h: Likewise.
16573         * include/pupa/i386/pc/linux.h: Likewise.
16574         * include/pupa/i386/pc/loader.h: Likewise.
16575         * include/pupa/i386/pc/memory.h: Likewise.
16576         * include/pupa/i386/pc/multiboot.h: Likewise.
16577         * include/pupa/i386/pc/partition.h: Likewise.
16578         * include/pupa/i386/pc/time.h: Likewise.
16579         * include/pupa/i386/pc/vga.h: Likewise.
16580         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16581         * include/pupa/util/getroot.h: Likewise.
16582         * include/pupa/util/misc.h: Likewise.
16583         * include/pupa/util/resolve.h: Likewise.
16584         * kern/device.c: Likewise.
16585         * kern/disk.c: Likewise.
16586         * kern/dl.c: Likewise.
16587         * kern/err.c: Likewise.
16588         * kern/file.c: Likewise.
16589         * kern/fs.c: Likewise.
16590         * kern/loader.c: Likewise.
16591         * kern/main.c: Likewise.
16592         * kern/misc.c: Likewise.
16593         * kern/mm.c: Likewise.
16594         * kern/rescue.c: Likewise.
16595         * kern/term.c: Likewise.
16596         * kern/i386/dl.c: Likewise.
16597         * kern/i386/pc/init.c: Likewise.
16598         * kern/i386/pc/lzo1x.S: Likewise.
16599         * kern/i386/pc/startup.S: Likewise.
16600         * loader/i386/pc/chainloader.c: Likewise.
16601         * loader/i386/pc/linux.c: Likewise.
16602         * loader/i386/pc/multiboot.c: Likewise.
16603         * normal/cmdline.c: Likewise.
16604         * normal/command.c: Likewise.
16605         * normal/main.c: Likewise.
16606         * normal/menu.c: Likewise.
16607         * normal/i386/setjmp.S: Likewise.
16608         * term/i386/pc/console.c: Likewise.
16609         * term/i386/pc/vga.c: Likewise.
16610         * util/console.c: Likewise.
16611         * util/genmoddep.c: Likewise.
16612         * util/misc.c: Likewise.
16613         * util/pupa-emu.c: Likewise.
16614         * util/resolve.c: Likewise.
16615         * util/unifont2pff.rb: Likewise.
16616         * util/i386/pc/biosdisk.c: Likewise.
16617         * util/i386/pc/getroot.c: Likewise.
16618         * util/i386/pc/pupa-mkimage.c: Likewise.
16619         * util/i386/pc/pupa-setup.c: Likewise.
16621 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16623         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16624         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16625         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16626         reading and reset it after reading.
16627         (pupa_ext2_close): Return PUPA_ERR_NONE.
16629         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16630         Correct value.
16631         (struct linux_kernel_header): Add kernel_version and
16632         initrd_addr_max.
16633         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16634         pupa_file_read succeeds.
16635         (pupa_rescue_cmd_initrd): Implement.
16637 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16639         * fs/ext2.c (pupa_ext2_label): New function.
16640         (pupa_ext2_fs): Added label.
16641         * fs/fat.c (pupa_fat_label): New function.
16642         (pupa_fat_fs): Added label.
16643         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16645         * kern/misc.c (pupa_strndup): New function.
16646         * include/pupa/misc.h (pupa_strndup): New prototype.
16648         * include/pupa/normal.h: Include <pupa/err.h>.
16649         (pupa_set_history): New prototype.
16650         (pupa_iterate_commands): New prototype.
16651         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16652         <pupa/disk.h>, <pupa/file.h>.
16653         (hist_size): New variable.
16654         (hist_lines): Likewise.
16655         (hist_end): Likewise.
16656         (hist_used): Likewise.
16657         (pupa_set_history): New function.
16658         (pupa_history_get): Likewise.
16659         (pupa_history_add): Likewise.
16660         (pupa_history_replace): Likewise.
16661         (pupa_tab_complete): Likewise.
16662         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16663         completion shows partitionnames while completing partitions, this
16664         feature was suggested by Jeff Bailey.
16665         * normal/command.c (pupa_iterate_commands): New function.
16666         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16667         (pupa_normal_init): Initialize history buffer.
16668         (PUPA_MOD_INIT): Likewise.
16669         (pupa_normal_fini): Free the history buffer.
16670         (PUPA_MOD_FINI): Likewise.
16672         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16673         key.
16675         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16676         * configure.ac [i386]: Check for regparam bug.
16677         (NESTED_FUNC_ATTR) [! i386]: Defined.
16679 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16681         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16682         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16683         (pupa_emu_SOURCES): New variable.
16684         (pupa_emu_LDFLAGS): Likewise.
16685         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16686         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16687         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16688         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16689         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16690         (pupa_jmp_buf): New typedef.
16691         (pupa_setjmp) [PUPA_UTIL]: New macro.
16692         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16693         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16694         (pupa_refresh): New prototype.
16695         * include/pupa/util/getroot.h: New file.
16696         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16697         it.
16698         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16699         (pupa_rescue_cmd_cat): Likewise.
16700         (pupa_rescue_cmd_ls): Likewise.
16701         (pupa_rescue_cmd_testload): Likewise.
16702         (pupa_rescue_cmd_lsmod): Likewise.
16703         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16704         * normal/menu.c (run_menu): Likewise.
16705         * kern/term.c (pupa_cls): Likewise.
16706         (pupa_refresh): New function.
16707         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16708         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16709         * util/console.c: New file.
16711         * util/i386/pc/getroot.c: New file.
16712         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16713         (pupa_putchar): New function.
16714         (pupa_refresh): Likewise.
16715         (xgetcwd): Function moved to ...
16716         (strip_extra_slashes): Likewise.
16717         (get_prefix): Likewise.
16718         * util/i386/pc/getroot.c: ... here.
16719         (find_root_device): Function moved and renamed to...
16720         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16721         Changed all callers.
16722         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16723         and renamed to...
16724         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16725         Changed all callers.
16726         * util/misc.c (pupa_memalign): New function.
16727         (pupa_mm_init_region): Likewise.
16728         (pupa_register_exported_symbols): Likewise.
16729         (pupa_putchar): Function removed.
16730         * util/pupa-emu.c: New file.
16732 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16734         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16735         (_multiboot_mod_SOURCES): New variable.
16736         (_multiboot_mod_CFLAGS): Likewise.
16737         * loader/i386/pc/multiboot.c: New file.
16738         * include/pupa/i386/pc/multiboot.h: Likewise.
16739         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16740         (pupa_multiboot_real_boot): New function.
16741         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16742         (pupa_multiboot_real_boot): New prototype.
16743         (pupa_rescue_cmd_multiboot): Likewise
16744         (pupa_rescue_cmd_module): Likewise.
16746         * kern/loader.c (pupa_loader_set): Continue when
16747         pupa_loader_unload_func() fails.
16748         (pupa_loader_unset): New function.
16749         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16751         * kern/misc.c (pupa_stpcpy): New function.
16752         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16754 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16756         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16757         for available extensions.
16759         * include/pupa/i386/pc/time.h: New file.
16760         * kern/disk.c: Include <pupa/machine/time.h>.
16761         (PUPA_CACHE_TIMEOUT): New macro.
16762         (pupa_last_time): New variable.
16763         (pupa_disk_open): Flush the cache when there was a timeout.
16764         (pupa_disk_close): Reset the timer.
16765         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16766         pupa_currticks.
16767         * util/misc.c: Include <sys/times.h>
16768         (pupa_get_rtc): New function.
16770 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16772         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16773         as blocks.
16774         (pupa_ext2_get_file_block): Use blocks member.
16776         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16777         first block. Return -1 instead of pupa_errno on error.
16779 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16781         * README: In the pupa-mkimage example use _chain instead of chain
16782         and ext2 instead of fat.
16783         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16784         adding journal playback for ext2fs.
16785         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16786         (pkgdata_MODULES): Added ext2.mod.
16787         (ext2_mod_SOURCES): New variable.
16788         (ext2_mod_CFLAGS): Likewise.
16789         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16790         * include/pupa/misc.h (pupa_strncpy): New prototype.
16791         (pupa_strcat): Likewise.
16792         (pupa_strncmp): Likewise.
16793         * kern/misc.c (pupa_strcat): Enable function.
16794         (pupa_strncpy): New function.
16795         (pupa_strncmp): Likewise.
16796         * fs/ext2.c: New file.
16798         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16799         when the read failed before retrying.
16800         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16801         (_FILE_OFFSET_BITS): Likewise.
16802         * configure.ac: Added AC_SYS_LARGEFILE.
16804 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16806         * genmk.rb (PModule#rule): Make sure to get only symbol names
16807         from the output of nm.
16808         Reported by Robert Millan <zeratul2@wanadoo.es>.
16810 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16812         I forgot to check in these changes for a long time. This adds
16813         incomplete support for VGA console, and this is still very
16814         buggy. Also, a lot of consideration is required for I18N,
16815         UNICODE, and VGA font issues. Therefore, assume that this is
16816         such that "better than nothing".
16818         * font/manager.c: New file.
16819         * include/pupa/font.h: Likewise.
16820         * include/pupa/i386/pc/vga.h: Likewise.
16821         * term/i386/pc/vga.c: Likewise.
16822         * util/unifont2pff.rb: Likewise.
16824         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16825         (pkgdata_MODULES): Added vga.mod and font.mod.
16826         (vga_mod_SOURCES): New variables.
16827         (vga_mod_CFLAGS): Likewise.
16828         (font_mod_SOURCES): Likewise.
16829         (font_mod_CFLAGS): Likewise.
16831         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16833         * include/pupa/term.h: Include pupa/err.h.
16834         (struct pupa_term): Added init and fini.
16835         Changed the argument of putchar to pupa_uint32_t.
16837         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16838         (pupa_console_real_putchar): New prototype.
16839         (pupa_console_putchar): Removed.
16840         (pupa_console_checkkey): Exported.
16841         (pupa_console_getkey): Likewise.
16843         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16844         characters.
16846         * kern/term.c (pupa_term_set_current): Rewritten.
16847         (pupa_putchar): Likewise.
16848         (pupa_putcode): New function.
16850         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16851         (pupa_console_real_putchar): ... this.
16852         (pupa_vga_set_mode): New function.
16853         (pupa_vga_get_font): Likewise.
16855         * normal/command.c: Include pupa/term.h.
16856         (terminal_command): New function.
16857         (pupa_command_init): Register the command "terminal".
16859         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16860         (DISP_UP): Likewise.
16861         (DISP_RIGHT): Likewise.
16862         (DISP_DOWN): Likewise.
16863         (DISP_HLINE): Likewise.
16864         (DISP_VLINE): Likewise.
16865         (DISP_UL): Likewise.
16866         (DISP_UR): Likewise.
16867         (DISP_LL): Likewise.
16868         (DISP_LR): Likewise.
16870         * term/i386/pc/console.c (pupa_console_putchar): New function.
16872 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16874         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16875         FIX. Reverse the path_list.
16877         * include/pupa/normal.h: Export pupa_register_command and
16878         pupa_unregister_command.
16880         * hello/hello.c (pupa_cmd_hello): New module.
16881         * conf/i386-pc.rmk: Added hello.mod.
16883 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16885         * kern/i386/pc/lzo1x.S: New file.
16887         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16888         (compress_kernel): New variable.
16889         (generate_image): Heavily modified to support compressing a
16890         large part of the core image.
16892         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16893         leak.
16894         (pupa_util_load_image): New function.
16896         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16897         (pupa_compressed_size): New variable.
16898         (codestart): Enable Gate A20 here.
16899         Decompress the compressed part of the core image.
16900         Rearrange the code to put functions and variables which are
16901         required for initialization in the non-compressed part.
16902         Include lzo1x.S.
16904         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16905         here.
16907         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16909         * include/pupa/i386/pc/kernel.h
16910         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16911         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16912         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16913         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16914         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16916         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16918         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16919         (Utility#rule): Likewise.
16921         * configure.ac: Check if LZO is available.
16923 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16925         * include/pupa/normal.h: New file.
16926         * include/pupa/setjmp.h: Likewise.
16927         * include/pupa/i386/setjmp.h: Likewise.
16928         * normal/cmdline.c: Likewise.
16929         * normal/command.c: Likewise.
16930         * normal/main.c: Likewise.
16931         * normal/menu.c: Likewise.
16932         * normal/i386/setjmp.S: Likewise.
16934         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16935         (pupa_rescue_cmd_initrd): Likewise.
16937         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16938         Likewise.
16940         * kern/i386/pc/startup.S (translation_table): New variable.
16941         (translate_keycode): New function.
16942         (pupa_console_getkey): Call translate_keycode.
16944         * kern/rescue.c (attempt_normal_mode): New function.
16945         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16946         it failed, print a message.
16948         * kern/mm.c (pupa_real_malloc): Print more information when a
16949         free magic is broken.
16950         (pupa_free): If the first free header is not free actually, set
16951         it to P.
16953         * kern/main.c (pupa_load_normal_mode): Just load the module
16954         "normal".
16955         (pupa_main): Don't print the message
16956         "Entering into rescue mode..." here.
16958         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16959         Declared.
16960         (pupa_rescue_cmd_initrd): Likewise.
16961         (pupa_rescue_cmd_initrd): Likewise.
16963         * include/pupa/symbol.h (FUNCTION): Specify the type.
16964         (VARIABLE): Likewise.
16966         * include/pupa/err.h (pupa_err_t): Added
16967         PUPA_ERR_UNKNOWN_COMMAND.
16969         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16970         (pupa_dl_get_prefix): Likewise.
16972         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16973         Added _chain.mod and _linux.mod instead of chain.mod and
16974         linux.mod.
16975         (chain_mod_SOURCES): Renamed to ...
16976         (_chain_mod_SOURCES): ... this.
16977         (chain_mod_CFLAGS): Renamed to ...
16978         (_chain_mod_CFLAGS): ... this.
16979         (linux_mod_SOURCES): Renamed to ...
16980         (_linux_mod_SOURCES): ... this.
16981         (linux_mod_CFLAGS): Renamed to ...
16982         (_linux_mod_CFLAGS): ... this.
16983         (normal_mod_SOURCES): New variable.
16984         (normal_mod_CFLAGS): Likewise.
16985         (normal_mod_ASFLAGS): Likewise.
16987 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16989         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16990         possible.
16992         * kern/dl.c (pupa_dl_ref): Refer depending modules
16993         recursively.
16994         (pupa_dl_unref): Unrefer depending modules recursively.
16995         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16996         a module is unloaded before one depending on that module is
16997         unloaded.
16998         (pupa_dl_unload): Unload depending modules explicitly,
16999         if possible.
17001 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17003         * include/pupa/i386/pc/linux.h: New file.
17004         * loader/i386/pc/linux.c: Likewise.
17006         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17007         Removed.
17008         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17009         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17010         of PUPA_CHAINLOADER_BOOT_SECTOR.
17012         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17013         (pupa_linux_prot_size): New variable.
17014         (pupa_linux_tmp_addr): Likewise.
17015         (pupa_linux_real_addr): Likewise.
17016         (pupa_linux_boot_zimage): New function.
17017         (pupa_linux_boot_bzimage): Likewise.
17019         * kern/i386/pc/init.c (struct mem_region): New structure.
17020         (MAX_REGIONS): New macro.
17021         (mem_regions): New variable.
17022         (num_regions): Likewise.
17023         (pupa_os_area_addr): Likewise.
17024         (pupa_os_area_size): Likewise.
17025         (pupa_lower_mem): Likewise.
17026         (pupa_upper_mem): Likewise.
17027         (add_mem_region): New function.
17028         (compact_mem_regions): Likewise.
17029         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17030         the size of the conventional memory and that of so-called upper
17031         memory (before the first memory hole).
17032         Instead of adding each found region to free memory, use
17033         add_mem_region and add them after removing overlaps.
17034         Also, add only 1/4 of the upper memory to free memory. The rest
17035         is used for loading OS images. Maybe this is ad hoc, but this
17036         makes it much easier to relocate OS images when booting.
17038         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17039         (pupa_enter_rescue_mode): Don't register initrd and module.
17041         * kern/mm.c: Include pupa/dl.h.
17043         * kern/main.c: Include pupa/file.h and pupa/device.h.
17045         * kern/loader.c (pupa_loader_load_module_func): Removed.
17046         (pupa_loader_load_module): Likewise.
17048         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17049         ``.o''.
17051         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17052         (pupa_linux_tmp_addr): Likewise.
17053         (pupa_linux_real_addr): Likewise.
17054         (pupa_linux_boot_zimage): Likewise.
17055         (pupa_linux_boot_bzimage): Likewise.
17057         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17058         (pupa_upper_mem): Likewise.
17059         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17060         module is too dangerous.
17062         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17063         (pupa_os_area_size): Likewise.
17064         (pupa_loader_set): Remove the first argument. Loader doesn't
17065         manage modules or initrd any longer.
17066         (pupa_loader_load_module): Removed.
17068         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17069         (linux_mod_SOURCES): New variable.
17070         (linux_mod_CFLAGS): Likewise.
17072 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17074         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17075         the length of a blocklist correctly.
17077         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17078         Use ioctl only if the OS file is a block device.
17079         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17080         not very useful for normal files.
17082         * kern/main.c (pupa_set_root_dev): New function.
17083         (pupa_load_normal_mode): Likewise.
17084         (pupa_main): Call those above.
17086         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17087         pupa_uint16_t.
17089         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17091 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17093         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17094         (setup): Configure the installed partition information and the
17095         dl prefix.
17097         * loader/i386/pc/chainloader.c (my_mod): New variable.
17098         (pupa_chainloader_unload): New function.
17099         (pupa_rescue_cmd_chainloader): Refer itself.
17100         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17102         * kern/i386/pc/startup.S (install_partition): Removed.
17103         (version_string): Likewise.
17104         (config_file): Likewise.
17105         (pupa_install_dos_part): New variable.
17106         (pupa_install_bsd_part): Likewise.
17107         (pupa_prefix): Likewise.
17108         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17110         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17111         and pupa/misc.h.
17112         (make_install_device): New function.
17113         (pupa_machine_init): Set the dl prefix.
17115         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17116         (buf): Renamed to ...
17117         (linebuf): ... this.
17118         (pupa_rescue_cmd_prefix): New function.
17119         (pupa_rescue_cmd_insmod): Likewise.
17120         (pupa_rescue_cmd_rmmod): Likewise.
17121         (pupa_rescue_cmd_lsmod): Likewise.
17122         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17123         rmmod and lsmod.
17125         * kern/mm.c (pupa_memalign): If failed even after invalidating
17126         disk caches, unload unneeded modules and retry.
17128         * kern/misc.c (pupa_memmove): New function.
17129         (pupa_memcpy): Removed.
17130         (pupa_strcpy): New function.
17131         (pupa_itoa): Made static.
17133         * kern/dl.c (pupa_dl_iterate): New function.
17134         (pupa_dl_ref): Likewise.
17135         (pupa_dl_unref): Likewise.
17136         (pupa_dl_unload): Return if succeeded or not.
17137         (pupa_dl_unload_unneeded): New function.
17138         (pupa_dl_unload_all): Likewise.
17139         (pupa_dl_init): Renamed to ...
17140         (pupa_dl_set_prefix): ... this.
17141         (pupa_dl_get_prefix): New function.
17143         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17144         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17145         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17146         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17147         (pupa_install_dos_part): Declared.
17148         (pupa_install_bsd_part): Likewise.
17149         (pupa_prefix): Likewise.
17150         (pupa_boot_drive): Likewise.
17152         * include/pupa/types.h: Fix a typo.
17154         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17155         pupa_memmove.
17156         (pupa_memmove): Declared.
17157         (pupa_strcpy): Likewise.
17159         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17160         pupa_mod_init takes one argument, its own module.
17161         (pupa_dl_unload_unneeded): Declared.
17162         (pupa_dl_unload_all): Likewise.
17163         (pupa_dl_ref): Likewise.
17164         (pupa_dl_unref): Likewise.
17165         (pupa_dl_iterate): Likewise.
17166         (pupa_dl_init): Renamed to ...
17167         (pupa_dl_set_prefix): ... this.
17168         (pupa_dl_get_prefix): Declared.
17170         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17171         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17172         unloaded.
17173         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17174         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17176         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17177         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17179 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17181         * util/i386/pc/pupa-setup.c (setup): Define the internal
17182         function find_first_partition_start at the top level, because GCC
17183         3.0.x cannot compile internal functions in deeper scopes
17184         correctly.
17185         (find_root_device): Use lstat instead of stat.
17186         Don't follow symbolic links.
17187         Fix the path-constructing code.
17189         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17190         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17191         by a BLKGETSIZE ioctl first, because block devices don't fill
17192         the member st_mode of the structure stat on Linux.
17193         [__linux__] (linux_find_partition): Use a temporary buffer
17194         REAL_DEV for the working space. Copy it to DEV before returning.
17195         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17196         buffer cache consistent.
17197         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17198         strncmp. The previous value was merely wrong.
17199         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17201         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17202         FAT size is 12. The previous value was merely wrong.
17204         * kern/main.c (pupa_main): Don't split the starting message from
17205         newlines.
17207         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17208         LF, because BIOS goes crazy about character attributes in this
17209         case.
17211 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17213         * include/i386/pc/util/biosdisk.h: New file.
17214         * util/i386/pc/biosdisk.c: Likewise.
17215         * util/i386/pc/pupa-setup.c: Likewise.
17217         * Makefile.in (INCLUDE_DISTFILES): Added
17218         include/pupa/i386/pc/util/biosdisk.h.
17219         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17220         directory util/i386/pc.
17221         (install-local): Added a rule for sbin_UTILITIES.
17222         (uninstall): Likewise.
17224         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17226         * util/misc.c (xrealloc): New function.
17227         (pupa_malloc): Likewise.
17228         (pupa_free): Likewise.
17229         (pupa_realloc): Likewise.
17230         (pupa_stop): Likewise.
17231         (pupa_putchar): Likewise.
17233         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17235         * include/pupa/util/misc.h (xrealloc): Declared.
17237         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17238         macro.
17239         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17240         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17242         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17243         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17245         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17246         way should be implemented.
17247         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17249         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17250         the size of NAME for safety.
17251         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17252         0x88.
17254         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17255         (pupa_setup_SOURCES): Likewise.
17257         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17259 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17261         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17262         bunch of pushl's from pusha, because this destroys the return
17263         value.
17265 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17267         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17268         This means that any missing prototypes could be fatal. Also, you
17269         must take care when writing assembly code. See the comments at
17270         the beginning of startup.S, for more details.
17272         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17273         compilation mechanism.
17274         (pupa_chainloader_real_boot): Likewise.
17275         (pupa_biosdisk_rw_int13_extensions): Likewise.
17276         (pupa_biosdisk_rw_standard): Likewise.
17277         (pupa_biosdisk_check_int13_extensions): Likewise.
17278         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17279         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17280         (pupa_get_memsize): Likewise.
17281         (pupa_get_mmap_entry): Likewise.
17282         (pupa_console_putchar): Likewise.
17283         (pupa_console_setcursor): Likewise.
17284         (pupa_getrtsecs): Use pushl instead of push.
17286         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17287         memory instead of the stack for a mmap entry, because some
17288         BIOSes may ignore the maximum size and overflow.
17290         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17292         * genmk.rb (PModule#rule): Compile automatically generated
17293         sources with module-specific CFLAGS as well as other sources.
17295 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17297         * configure.ac: Check ld.
17298         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17299         respectively, before checking endianness and sizes.
17301         * Makefile.in (LD): New variable.
17303 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17305         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17307 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17309         * Changelog: New file.