2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
[grub2/phcoder.git] / ChangeLog
blob60ed1a6b3cadb7c0599834594d60ad8e3fdc9aea
1 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
3         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
4         * conf/common.rmk (search_mod_CFLAGS): likewise
6 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
8         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to 
9         compensate a compiler bug
11 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
13         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitely define as 8
14         instead of '\b'
15         
16 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
18         Definitions for creating asm symbols with Apple's CC
20         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
21         [APPLE_CC] (VARIABLE): likewise
23 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
25         Disable lnxboot.img when compiled
26         with Apple's CC
28         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
29         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
30         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
31         [! APPLE_CC] (CODE_LENG): skip
32         [! APPLE_CC] (setup_sects): likewise
33         [! APPLE_CC]: skip filling
34         
35 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
37         Address in trampolines based on 32-bit registers when compiled
38         with Apple's CC
40         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers 
41         for addresses
42         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
44 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
46         Avoid aliases when compiling with Apple's CC for PCBIOS machine
48         * kern/misc.c [APPLE_CC] (memcpy): new function
49         [APPLE_CC] (memmove): likewise
50         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
51         (memcpy): define alias conditionaly on !APPLE_CC
52         (memset): likewise
53         (abort): likewise
54         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
55         APPLE_CC are defined
56         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
57         (grub_assert_fail): make prototype conditional
59 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
61         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
63         * conf/common.rmk (bin_UTILITIES): add (on false on condition) 
64         grub-macho2img 
65         (CLEANFILES): add grub-macho2img
66         (grub_macho2img_SOURCES): new variable
67         * kern/i386/pc/startup.S (bss_start): new variable
68         (bss_end): likewise
69         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
70         * util/grub-macho2img.c: new file
72 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
74         Use objconv when compiling with Apple's CC
76         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
77         (efiemu64.o): likewise
78         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
79         when compiling with Apple's CC
80         (efiemu64_s.o): likewise
81         * configure.ac: check for objconv when compiling with Apple's CC
82         * genmk.rb: use objconv for modules when compiled with Apple's CC
83         
84 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
86         Define segment as well as section when compiling with
87         Apple's CC
89         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
90         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
91         (efiemu_convert_pointer): likewise
92         (efiemu_set_virtual_address_map): likewise
93         (efiemu_convert_pointer): likewise
94         (efiemu_getcrc32): likewise
95         (init_crc32_table): likewise
96         (reflect): likewise
97         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
98         (GRUB_MOD_DEP): likewise
99         
100 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
102         Allow a compilation without -mcmodel=large
104         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
105         when compiled without -mcmodel=large
106         (filter_memory_map): remove memory post 4 GiB when compiled 
107         without -mcmodel=large
108         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to 
109         TARGET_CFLAGS when -mcmodel=large isn't supported
110         
111 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
113         Remove nested functions in efiemu core
115         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
116         
117 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
119         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
121         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
122         temporary storage
123         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when 
124         using Apple's CC 
125         (grub_cpu_is_tsc_supported): likewise
126         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
127         
128 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
130         Absolute addressing through constant with Apple's cc
132         * kern/i386/pc/startup.S: Define necessary constants
133         and address through it when using ABS with Apple's CC
134         * boot/i386/pc/diskboot.S: likewise
135         * boot/i386/pc/boot.S: likewise
136         * boot/i386/pc/lnxboot.S: likewise
137         * boot/i386/pc/cdboot.S: likewise
138         * mmap/i386/pc/mmap_helper.S: likewise
139         * commands/i386/pc/drivemap_int13h.S: likewise
141 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
143         Check if compiler is apple cc
145         * Makefile.in (ASFLAGS): new variable
146         (TARGET_ASFLAGS): likewise
147         (TARGET_MODULE_FORMAT): likewise
148         (TARGET_APPLE_CC): likewise
149         (OBJCONV): likewise
150         (TARGET_IMG_CFLAGS): likewise
151         (TARGET_CPPFLAGS): add includedir
152         * configure.ac: call grub_apple_cc and grub_apple_target_cc
153         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
154         Check for linker script only if compiler isn't Apple's CC
155         (TARGET_MODULE_FORMAT): set
156         (TARGET_APPLE_CC): likewise
157         (TARGET_ASFLAGS): likewise
158         (ASFLAGS): likewise
159         Check for objcopy only if compiler isn't Apple's CC
160         Check for BSS symbol only if compiler isn't Apple's CC
161         * genmk.rb: adapt nm options if we use Apple's utils
162         * aclocal.m4 (grub_apple_cc): new test
163         (grub_apple_target_cc): likewise
164         
165 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
167         Simplify sed expressions and improve awk
169         * Makefile.in (install-local): simplify sed expression
170         * gencmdlist.sh: likewise
171         * genmoddep.awk: avoid adding module as a dependency of itself
173 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
175         Add missing start symbols
177         * boot/i386/pc/boot.S: add start
178         * boot/i386/pc/pxeboot.S: likewise
179         
180 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
182         Fix wrong assumptions with grub-mkimage on EFI
183         
184         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
185         (relocate_addresses): consider both r_addend and value at offset
186         (make_mods_section): zerofill modinfo and header
187         (convert_elf): write prefix here
188         
189 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
191         Use .asciz instead of .string
193         * i386/pc/diskboot.S: use .asciz instead of .string
194         * i386/pc/boot.S: likewise
195         * include/grub/dl.h (GRUB_MOD_DEP): likewise
196         (GRUB_MOD_NAME): likewise
197         
198 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
200         gfxpayload support
202         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
203         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
204         (grub_video_setup): remove
205         (grub_video_set_mode): new prototype
206         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
207         (vid_mode): remove
208         (linux_vesafb_res): compile only on PCBIOS
209         (grub_linux_boot): support gfxpayload
210         * loader/i386/pc/xnu.c (video_hook): new function
211         (grub_xnu_set_video): support gfxpayload
212         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
213         (DEFAULT_VIDEO_HEIGHT): likewise
214         (DEFAULT_VIDEO_FLAGS): likewise
215         (DEFAULT_VIDEO_MODE): new definition
216         (video_hook): new function
217         (grub_gfxterm_init): use grub_video_set_mode
218         * util/grub.d/30_os-prober.in: remove explicit modesetting before 
219         loading xnu
220         * video/video.c (grub_video_setup): removed
221         (grub_video_set_mode): new function based on grub_gfxterm_init and 
222         grub_video_setup
224 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
226         Avoid calling biosdisk in drivemap
228         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
229         (revparse_biosdisk): likewise
230         (list_mappings): derive name from id directly
231         (grub_cmd_drivemap): use tryparse_diskstring
232         
233 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
235         Script fixes
237         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
238         (grub_lexer_param): add tokenonhold
239         (grub_script_create_cmdline): remove cmdline. All callers updated
240         (grub_script_function_create): make functionname
241         grub_script_arg. All callers updated
242         (grub_script_execute_argument_to_string): new prototype
243         * kern/parser.c (state_transitions): reorder
244         (grub_parser_cmdline_state): fix a bug and make more compact
245         * script/sh/execute.c (grub_script_execute_argument_to_string): 
246         make global
247         (grub_script_execute_cmdline): use new format
248         * script/sh/function.c (grub_script_function_create): make functionname
249         grub_script_arg. All callers updated
250         * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
251         (grub_script_yylex): remove
252         (grub_script_yylex2): renamed to ...
253         (grub_script_yylex): ...renamed
254         parse the expressions like a${b}c
255         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
256         (GRUB_PARSER_TOKEN_VAR): remove
257         (GRUB_PARSER_TOKEN_NAME): likewise
258         ("if"): declare as typeless
259         ("while"): likewise
260         ("function"): likewise
261         ("else"): likewise
262         ("then"): likewise
263         ("fi"): likewise
264         (text): remove
265         (argument): likewise
266         (script): accept empty scripts and make exit on error
267         (arguments): use GRUB_PARSER_TOKEN_ARG
268         (function): likewise
269         (command): move error handling to script
270         (menuentry): move grub_script_lexer_ref before
271         * script/sh/script.c (grub_script_create_cmdline): remove cmdline 
272         argument. All callers updated
274 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
276         Prevent GRUB from probing floppies during boot.
278         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
279         * commands/search.c (options): Add --no-floppy.
280         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
281         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
282         --no-floppy when searching for UUIDs.
284 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
286         Simplify the code duplication in commands/search.c.
288         * commands/search.c (search_label, search_fs_uuid): Merge into ...
289         (search_fs): ... this.  Update all users.
291 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
293         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
295 2009-05-28  Pavel Roskin  <proski@gnu.org>
297         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
298         Remove the original symlink explicitly.
300         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
301         just one slash.  That's how grub_fshelp_find_file() does it.
303 2009-05-26  Pavel Roskin  <proski@gnu.org>
305         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
306         to `str'.
308         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
309         possibly unused.
311 2009-05-25  Christian Franke  <franke@computer.org>
313         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
314         register.
315         (grub_atapi_identify): Add wait after drive select.
316         (grub_ata_identify): Do more strict status register check before
317         calling grub_atapi_identify ().  Suppress error message if status
318         register is 0x00 after command failure.  Add status register
319         check after PIO read to avoid bogus identify due to stuck DRQ.
320         Thanks to Pavel Roskin for testing.
321         (grub_device_initialize): Remove unsafe status register check.
322         Thanks to 'phcoder' for problem report and patch.
323         Prevent sign extension in debug message.
325 2009-05-23  Colin D Bennett  <colin@gibibit.com>
327         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
328         definition file, and functions defined in `normal/menu.c' have had
329         their prototypes moved to `include/grub/menu.h' for consistency.
331         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
332         from normal.h.
333         (grub_menu_get_entry): Likewise.
334         (grub_menu_get_timeout): Likewise.
335         (grub_menu_set_timeout): Likewise.
336         (grub_menu_execute_entry): Likewise.
337         (grub_menu_execute_with_fallback): Likewise.
338         (grub_menu_entry_run): Likewise.
340         * include/grub/normal.h: Re-ordered and grouped function
341         prototypes by file that the function is defined in.
342         (grub_menu_execute_callback): Removed; moved to menu.h.
343         (grub_menu_get_entry): Likewise.
344         (grub_menu_get_timeout): Likewise.
345         (grub_menu_set_timeout): Likewise.
346         (grub_menu_execute_entry): Likewise.
347         (grub_menu_execute_with_fallback): Likewise.
348         (grub_menu_entry_run): Likewise.
349         (grub_menu_addentry): Renamed from this ...
350         (grub_normal_add_menu_entry): ... to this.
352         * normal/main.c (grub_menu_addentry): Renamed from this ...
353         (grub_normal_add_menu_entry): ... to this.
355         * script/sh/execute.c (grub_script_execute_menuentry): Update
356         reference to renamed grub_menu_addentry function.
358 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
360         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
362 2009-05-22  Pavel Roskin  <proski@gnu.org>
364         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
365         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
366         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
367         compiling for the i386 targets, but not for the utilities.
369         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
370         to grub_uint8_t.
371         (grub_root_drive): Likewise.
372         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
373         remove alignment.
374         (grub_root_drive): Change size to byte.
375         (grub_start_addr): Remove.
376         (grub_end_addr): Likewise.
377         (grub_apm_bios_info): Likewise.
379 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
381         * normal/i386: Remove.
382         * normal/powerpc: Likewise.
383         * normal/sparc64: Likewise.
384         * normal/x86_64: Likewise.
386 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
388         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
389         * loader/i386/linux_trampoline.S: Fix identation
390         * loader/i386/xnu_helper.S: Likewise
392 2009-05-18  Colin D Bennett  <colin@gibibit.com>
394         Display error messages when parsing a Lua statement fails.
395         Previously, executing a syntactically invalid statement like
396         ")foo" or "bar;" would silently fail.
398         * script/lua/grub_main.c (handle_lua_error): New function.
399         (grub_lua_parse_line): Improved reporting of Lua parser and
400         execution errors.
402 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
404         Remove -Werror which causes build to fail on some systems
406         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
407         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
408         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
410 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
412         trampoline for linux on 64-bit platform
414         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
415         loader/i386/efi/linux_trampoline.S
416         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
417         declration
418         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
419         here
420         * loader/i386/linux_trampoline.S: moved here
421         * loader/i386/efi/linux.c (allocate_pages): reserve space for
422         trampoline
423         (jumpvector): removed
424         (grub_linux_trampoline_start): new declaration
425         (grub_linux_trampoline_end): likewise
426         (grub_linux_boot): use trampoline when on 64-bit platform
427         * loader/i386/linux.c: likewise
429 2009-05-16  Pavel Roskin  <proski@gnu.org>
431         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
432         const to avoid a warning.
433         (grub_lua_setenv): Likewise.
434         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
435         lmsg to fix a warning.
437 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
439         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
440         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
441         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
442         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
443         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
444         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
445         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
446         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
448 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
450         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
452 2009-05-16  Bean  <bean123ch@gmail.com>
454         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
455         (lua_mod_SOURCES): New variable.
456         (lua_mod_CFLAGS): Likewise.
457         (lua_mod_LDFLAGS): Likewise.
459         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
460         (setjmp_mod_SOURCES): New variable.
461         (setjmp_mod_CFLAGS): Likewise.
462         (setjmp_LDFLAGS): Likewise.
464         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
465         (setjmp_mod_SOURCES): New variable.
466         (setjmp_mod_CFLAGS): Likewise.
467         (setjmp_LDFLAGS): Likewise.
469         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
470         (setjmp_mod_SOURCES): New variable.
471         (setjmp_mod_CFLAGS): Likewise.
472         (setjmp_LDFLAGS): Likewise.
474         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
475         (setjmp_mod_SOURCES): New variable.
476         (setjmp_mod_CFLAGS): Likewise.
477         (setjmp_LDFLAGS): Likewise.
479         * normal/i386/setjmp.S: Moved from here ...
480         * lib/i386/setjmp.S: ... Moved here
481         * normal/x86_64/setjmp.S: Moved from here ...
482         * lib/x86_64/setjmp.S: ... Moved here
483         * normal/powerpc/setjmp.S: Moved from here ...
484         * lib/powerpc/setjmp.S: ... Moved here
485         * normal/sparc64/setjmp.S: Moved from here ...
486         * lib/sparc64/setjmp.S: ... Moved here
488         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
489         returns_twice in mingw.
491         * script/lua/grub_lib.c: New file.
492         * script/lua/grub_lib.h: Likewise.
493         * script/lua/grub_lua.h: Likewise.
494         * script/lua/grub_main.c: Likewise.
495         * script/lua/lapi.c: Likewise.
496         * script/lua/lapi.h: Likewise.
497         * script/lua/lauxlib.c: Likewise.
498         * script/lua/lauxlib.h: Likewise.
499         * script/lua/lbaselib.c: Likewise.
500         * script/lua/lcode.c: Likewise.
501         * script/lua/lcode.h: Likewise.
502         * script/lua/ldblib.c: Likewise.
503         * script/lua/ldebug.c: Likewise.
504         * script/lua/ldebug.h: Likewise.
505         * script/lua/ldo.c: Likewise.
506         * script/lua/ldo.h: Likewise.
507         * script/lua/ldump.c: Likewise.
508         * script/lua/lfunc.c: Likewise.
509         * script/lua/lfunc.h: Likewise.
510         * script/lua/lgc.c: Likewise.
511         * script/lua/lgc.h: Likewise.
512         * script/lua/linit.c: Likewise.
513         * script/lua/liolib.c: Likewise.
514         * script/lua/llex.c: Likewise.
515         * script/lua/llex.h: Likewise.
516         * script/lua/llimits.h: Likewise.
517         * script/lua/lmathlib.c: Likewise.
518         * script/lua/lmem.c: Likewise.
519         * script/lua/lmem.h: Likewise.
520         * script/lua/loadlib.c: Likewise.
521         * script/lua/lobject.c: Likewise.
522         * script/lua/lobject.h: Likewise.
523         * script/lua/lopcodes.c: Likewise.
524         * script/lua/lopcodes.h: Likewise.
525         * script/lua/loslib.c: Likewise.
526         * script/lua/lparser.c: Likewise.
527         * script/lua/lparser.h: Likewise.
528         * script/lua/lstate.c: Likewise.
529         * script/lua/lstate.h: Likewise.
530         * script/lua/lstring.c: Likewise.
531         * script/lua/lstring.h: Likewise.
532         * script/lua/lstrlib.c: Likewise.
533         * script/lua/ltable.c: Likewise.
534         * script/lua/ltable.h: Likewise.
535         * script/lua/ltablib.c: Likewise.
536         * script/lua/ltm.c: Likewise.
537         * script/lua/ltm.h: Likewise.
538         * script/lua/lua.h: Likewise.
539         * script/lua/luaconf.h: Likewise.
540         * script/lua/lualib.h: Likewise.
541         * script/lua/lundump.c: Likewise.
542         * script/lua/lundump.h: Likewise.
543         * script/lua/lvm.c: Likewise.
544         * script/lua/lvm.h: Likewise.
545         * script/lua/lzio.c: Likewise.
546         * script/lua/lzio.h: Likewise.
548 2009-05-16  Bean  <bean123ch@gmail.com>
550         * include/grub/kernel.h (grub_module_header_types): Add type
551         OBJ_TYPE_CONFIG.
553         * kern/main.c (grub_load_config): New function.
554         (grub_main): Call grub_load_config to read boot config.
556         * grub-mkimage (generate_image): New parameter config_path.
557         (options): New option --config.
558         (main): Parse --config option, and pass it to generate_image.
560 2009-05-14  Christian Franke  <franke@computer.org>
562         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
563         This fixes build on Cygwin.
565 2009-05-14  Pavel Roskin  <proski@gnu.org>
567         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
568         jump.  This saves two bytes, so the typical case of 2 swapped
569         drives would fit 32 bytes.
571 2009-05-13  Pavel Roskin  <proski@gnu.org>
573         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
574         grub_uint32_t to avoid a warning.
576         * loader/i386/linux.c (allocate_pages): When assigning
577         real_mode_mem, cast through grub_size_t to fix a warning.  The
578         code already makes sure that the value would fit a pointer.
579         (grub_linux_setup_video): Cast render_target->data to
580         grub_size_t to fix a warning.
582 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
584         * commands/i386/pc/drivemap.c: New file - implement drivemap
585         command.
586         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
587         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
589 2009-05-13  Pavel Roskin  <proski@gnu.org>
591         * util/i386/pc/grub-setup.c (setup): Remove unused variable
592         embedding_area_exists.
594 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
596         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
597         it easier to understand / work with.
598         Improve warning messages for cases where there's no embedding area,
599         or when it is too small (or core.img too large).
601 2009-05-13  Pavel Roskin  <proski@gnu.org>
603         * loader/i386/pc/multiboot2.c: Add necessary includes for
604         grub_multiboot2_real_boot().
606         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
607         PX record is always little-endian.  We only need the lower 2
608         bytes of the mode.
610         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
611         facilitate code reuse.
612         (grub_cpio_mount): Use "struct head", not a char buffer.  This
613         fixes a warning reported by gcc 4.4.
615         * kernel/disk.c (grub_disk_read): Use void pointer for the
616         buffer.
617         (grub_disk_write): Use const void pointer for the buffer.
618         Adjust all callers.  Remove unnecessary casts.
620 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
622         * util/i386/pc/grub-install.in: Update copyright year.
624 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
626         gptsync
628         * commands/gptsync.c: new file
629         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
630         (gptsync_mod_SOURCES): new variable
631         (gptsync_mod_CFLAGS): likewise
632         (gptsync_mod_LDFLAGS): likewise
633         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
634         new definition
635         (GRUB_PC_PARTITION_TYPE_HFS): likewise
636         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
637         * conf/i386-ieee1275.rmk: likewise
638         * conf/i386-pc.rmk: likewise
639         * conf/powerpc-ieee1275.rmk: likewise
641 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
643         Fixed grub-emu
645         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
646         (grub_dl_ref): likewise
648 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
650         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
651         split in two functions (one for msdos and one for gpt).
653 2009-05-08  Pavel Roskin  <proski@gnu.org>
655         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
656         not modified.
658         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
659         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
660         Initialize them with -1.  Add sanity check for bad1.  Eliminate
661         nerr variable.
663 2009-05-08  David S. Miller  <davem@davemloft.net>
665         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
667 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
669         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
670         existance.
672 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
674         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
675         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
677 2009-05-05  David S. Miller  <davem@davemloft.net>
679         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
681 2009-05-05  Pavel Roskin  <proski@gnu.org>
683         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
684         of grub_dl_ref() and grub_dl_unref().
685         * commands/parttool.c: Remove preprocessor conditionals around
686         grub_dl_ref() and grub_dl_unref().
687         * fs/affs.c: Likewise.
688         * fs/afs.c: Likewise.
689         * fs/cpio.c: Likewise.
690         * fs/ext2.c: Likewise.
691         * fs/fat.c: Likewise.
692         * fs/hfs.c: Likewise.
693         * fs/hfsplus.c: Likewise.
694         * fs/iso9660.c: Likewise.
695         * fs/jfs.c: Likewise.
696         * fs/minix.c: Likewise.
697         * fs/ntfs.c: Likewise.
698         * fs/reiserfs.c: Likewise.
699         * fs/sfs.c: Likewise.
700         * fs/udf.c: Likewise.
701         * fs/ufs.c: Likewise.
702         * fs/xfs.c: Likewise.
703         * include/grub/dl.h: Likewise.
704         * loader/xnu.c: Likewise.
706 2009-05-04  Pavel Roskin  <proski@gnu.org>
708         * commands/acpi.c: Remove unused variable my_mod.
709         * partmap/amiga.c: Likewise.
710         * partmap/apple.c: Likewise.
711         * partmap/gpt.c: Likewise.
712         * partmap/pc.c: Likewise.
713         * partmap/sun.c: Likewise.
714         * term/gfxterm.c: Likewise.
715         * term/i386/pc/vesafb.c: Likewise.
716         * term/i386/pc/vga.c: Likewise.
718 2009-05-04  David S. Miller  <davem@davemloft.net>
720         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
721         pointer args to grub_ieee1275_get_property().
723         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
725         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
726         devices, and do not traverse down under controller nodes.
728         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
729         (grub_ofdisk_open): Use it to un-escape "," characters.
730         * kern/disk.c (find_part_sep): New.
731         (grub_disk_open): Use it to find the first non-escaped ','
732         character in the disk name.
733         * util/ieee1275/devicemap.c (escape_of_path): New.
734         (grub_util_emit_devicemap_entry): Use it.
735         * util/sparc64/ieee1275/grub-install.in: Update script to
736         strip partition specifiers properly by not triggering on
737         '\' escaped ',' characters.
739 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
741         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
742         to 0x300.
743         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
744         resolutions.
745         (linux_vesafb_modes): Add a lot of additional modes to the list (based
746         on documentation from Wikipedia).
748 2009-05-04  Pavel Roskin  <proski@gnu.org>
750         * disk/ata.c: Spelling fixes.
751         * disk/raid.c: Likewise.
752         * disk/usbms.c: Likewise.
753         * disk/dmraid_nvidia.c: Likewise.
754         * kern/ieee1275/openfw.c: Likewise.
755         * kern/ieee1275/init.c: Likewise.
756         * kern/ieee1275/cmain.c: Likewise.
757         * boot/i386/pc/cdboot.S: Likewise.
758         * video/readers/png.c: Likewise.
759         * video/i386/pc/vbe.c: Likewise.
760         * fs/udf.c: Likewise.
761         * fs/hfs.c: Likewise.
762         * fs/reiserfs.c: Likewise.
763         * efiemu/runtime/efiemu.c: Likewise.
764         * efiemu/main.c: Likewise.
765         * efiemu/mm.c: Likewise.
766         * include/grub/elf.h: Likewise.
767         * include/grub/xnu.h: Likewise.
768         * include/grub/usbdesc.h: Likewise.
769         * include/grub/usb.h: Likewise.
770         * include/grub/script_sh.h: Likewise.
771         * include/grub/lib/LzmaEnc.h: Likewise.
772         * include/grub/efiemu/efiemu.h: Likewise.
773         * include/grub/command.h: Likewise.
774         * normal/menu.c: Likewise.
775         * normal/main.c: Likewise.
776         * normal/datetime.c: Likewise.
777         * bus/usb/uhci.c: Likewise.
778         * mmap/i386/uppermem.c: Likewise.
779         * mmap/mmap.c: Likewise.
780         * commands/acpi.c: Likewise.
781         * commands/test.c: Likewise.
782         * partmap/apple.c: Likewise.
783         * font/font.c: Likewise.
784         * loader/sparc64/ieee1275/linux.c: Likewise.
785         * loader/macho.c: Likewise.
786         * loader/i386/bsd_trampoline.S: Likewise.
787         * loader/i386/bsd.c: Likewise.
788         * loader/xnu.c: Likewise.
789         * term/i386/pc/vesafb.c: Likewise.
790         * term/usb_keyboard.c: Likewise.
791         * util/resolve.c: Likewise.
792         * util/getroot.c: Likewise.
794 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
796         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
798 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
800         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
801         build error.
803 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
805         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
806         parameter only available on BIOS.
808 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
810         Removed wrong semicolon in declaration
812         * grub/misc.h (grub_dprintf): remove semicolon
814 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
816         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
817         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
818         is done by grub_cmd_linux() now).
819         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
820         restore video to text mode.
821         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
822         indicates lack of "vga=" parameter.  "vga=0" is mapped to
823         `GRUB_LINUX_VID_MODE_NORMAL'.
825 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
827         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
828         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
829         and `normal/script.c'.  Add `kern/rescue_reader.c',
830         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
831         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
832         `grub_script.tab.c'.
834         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
835         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
836         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
837         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
838         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
840         * Makefile.in: Remove duplicated 2008 in Copyright line.
842 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
844         * util/misc.c (grub_util_warn): New function.  Emmits a warning
845         unconditionally.
846         * include/grub/util/misc.h (grub_util_warn): New declaration.
848         * util/i386/pc/grub-install.in: Understand --force and pass it down
849         to grub-setup.
851         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
852         down to setup().
853         (setup): Improve error messages and add warnings when requested to
854         install in odd layouts.  Refuse to install using blocklists unless
855         --force was set.
857 2009-05-04  martin f. krafft  <madduck@madduck.net>
859         * disk/raid.c (grub_raid_scan_device): Improve debug message.
861 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
863         Updated copyright year
865         * fs/hfsplus.c: updated copyright year
867 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
869         HFS+ UUID
871         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
872         in the space previously used by unused3
873         (grub_hfsplus_uuid): new function
874         (grub_hfsplus_fs): added uuid field
876 2009-05-03  Pavel Roskin  <proski@gnu.org>
878         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
879         suppress warnings.  It's no longer needed.
880         * disk/host.c: Likewise.
881         * disk/ata_pthru.c: Likewise.
882         * disk/loopback.c: Likewise.
883         * hook/datehook.c: Likewise.
884         * parttool/pcpart.c: Likewise.
885         * fs/i386/pc/pxe.c: Likewise.
886         * fs/ntfscomp.c: Likewise.
887         * efiemu/main.c: Likewise.
888         * mmap/mmap.c: Likewise.
889         * commands/crc.c: Likewise.
890         * commands/hexdump.c: Likewise.
891         * commands/hdparm.c: Likewise.
892         * commands/acpi.c: Likewise.
893         * commands/echo.c: Likewise.
894         * commands/minicmd.c: Likewise.
895         * commands/blocklist.c: Likewise.
896         * commands/memrw.c: Likewise.
897         * commands/loadenv.c: Likewise.
898         * commands/usbtest.c: Likewise.
899         * commands/lsmmap.c: Likewise.
900         * commands/boot.c: Likewise.
901         * commands/parttool.c: Likewise.
902         * commands/configfile.c: Likewise.
903         * commands/search.c: Likewise.
904         * commands/ieee1275/suspend.c: Likewise.
905         * commands/cat.c: Likewise.
906         * commands/i386/pc/pxecmd.c: Likewise.
907         * commands/i386/pc/play.c: Likewise.
908         * commands/i386/pc/halt.c: Likewise.
909         * commands/i386/pc/vbeinfo.c: Likewise.
910         * commands/i386/pc/vbetest.c: Likewise.
911         * commands/lspci.c: Likewise.
912         * commands/date.c: Likewise.
913         * commands/handler.c: Likewise.
914         * commands/ls.c: Likewise.
915         * commands/test.c: Likewise.
916         * commands/cmp.c: Likewise.
917         * commands/efi/loadbios.c: Likewise.
918         * commands/efi/fixvideo.c: Likewise.
919         * commands/halt.c: Likewise.
920         * commands/help.c: Likewise.
921         * commands/reboot.c: Likewise.
922         * hello/hello.c: Likewise.
923         * script/sh/main.c: Likewise.
924         * loader/xnu.c: Likewise.
925         * term/terminfo.c: Likewise.
926         * term/i386/pc/serial.c: Likewise.
927         * term/usb_keyboard.c: Likewise.
929 2009-05-03  David S. Miller  <davem@davemloft.net>
931         * normal/menu.c: Include grub/parser.h
933 2009-05-03  Pavel Roskin  <proski@gnu.org>
935         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
936         not char*.
937         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
938         Suggested by Javier Martín <lordhabbit@gmail.com>
940         * util/i386/pc/grub-mkrescue.in: Allow for the case when
941         efiemu??.o doesn't exist.
942         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
943         copying.
945 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
947         FreeBSD 64-bit support
949         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
950         and loader/i386/bsd_trampoline.S
951         (bsd_mod_ASFLAGS): new variable
952         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
953         (FREEBSD_MODTYPE_KERNEL64): likewise
954         (grub_bsd64_trampoline_start): likewise
955         (grub_bsd64_trampoline_end): likewise
956         (grub_bsd64_trampoline_selfjump): likewise
957         (grub_bsd64_trampoline_gdt): likewise
958         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
959         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
960         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
961         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
962         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
963         of "attrib" member
964         * loader/i386/bsd_pagetable.c: new file
965         * loader/i386/bsd_trampoline.S: likewise
966         * loader/i386/bsd.c (ALIGN_QWORD): new macro
967         (ALIGN_VAR): likewise
968         (entry_hi): new variable
969         (kern_end_mdofs): likewise
970         (is_64bit): likewise
971         (grub_freebsd_add_meta): use ALIGN_VAR
972         (grub_e820_mmap): new declaration
973         (grub_freebsd_add_mmap): new function
974         (grub_freebsd_add_meta_module): support 64 bit kernels
975         (grub_freebsd_list_modules): use ALIGN_VAR
976         (gdt_descriptor): new declaration
977         (grub_freebsd_boot): support 64 bit kernels
978         (grub_bsd_elf64_hook): new function
979         (grub_bsd_load_elf): support elf64
981 2009-05-03  Bean  <bean123ch@gmail.com>
983         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
984         after we get the result of if statement.
986 2009-05-03  Bean  <bean123ch@gmail.com>
988         * Makefile.in (enable_efiemu): New variable.
990         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
991         set.
992         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
993         path.
994         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
995         path, add -mno-red-zone option.
996         (efiemu64_s.o): Likewise.
997         (efiemu64.o): Use macro $^ for source file.
999         * configure.ac (--enable-efiemu): New option.
1001 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1003         xnu support
1005         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1006         (pkglib_MODULES): add xnu.mod
1007         (xnu_mod_SOURCES): new variable
1008         (xnu_mod_CFLAGS): likewise
1009         (xnu_mod_LDFLAGS): likewise
1010         (xnu_mod_ASFLAGS): likewise
1011         * conf/i386-pc.rmk: likewise
1012         * conf/x86_64-efi.rmk: likewise
1013         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1014         new declaration
1015         * include/grub/i386/macho.h: new file
1016         * include/grub/i386/xnu.h: likewise
1017         * include/grub/macho.h: likewise
1018         * include/grub/machoload.h: likewise
1019         * include/grub/x86_64/macho.h: likewise
1020         * include/grub/x86_64/xnu.h: likewise
1021         * include/grub/xnu.h: likewise
1022         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1023         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1024         * loader/i386/efi/xnu.c: new file
1025         * loader/i386/pc/xnu.c: likewise
1026         * loader/i386/xnu.c: likewise
1027         * loader/i386/xnu_helper.S: likewise
1028         * loader/macho.c: likewise
1029         * loader/xnu.c: likewise
1030         * loader/xnu_resume.c: likewise
1031         * util/grub-dumpdevtree: likewise
1032         * include/grub/i386/pit.h: include grub/err.h
1033         (grub_pit_wait): export
1034         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1036 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1038         Efiemu
1040         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1041         _linux_efi, linux_efi.
1042         new files in grub-emu
1043         new targets efiemu32.o and efiemu64.o
1044         * loader/linux_normal_efiemu.c: likewise
1045         * loader/i386/efi/linux.c: added preliminary efiemu support
1046         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1047         files to copy
1048         * include/grub/autoefi.h: new file
1049         * include/grub/i386/efiemu.h: likewise
1050         * include/grub/i386/pc/efiemu.h: likewise
1051         * include/grub/efi/api.h: add LL suffix when necessary
1052         new definitions relating to tables
1053         * include/grub/efiemu/efiemu.h: new file
1054         * include/grub/efiemu/runtime.h: likewise
1055         * efiemu/prepare.c: likewise
1056         * efiemu/loadcore_common.c: likewise
1057         * efiemu/loadcore64.c: likewise
1058         * efiemu/runtime/efiemu.sh: likewise
1059         * efiemu/runtime/efiemu.S: likewise
1060         * efiemu/runtime/efiemu.c: likewise
1061         * efiemu/runtime/config.h: likewise
1062         * efiemu/prepare32.c: likewise
1063         * efiemu/main.c: likewise
1064         * efiemu/modules/pnvram.c: likewise
1065         * efiemu/modules/i386: likewise
1066         * efiemu/modules/i386/pc: likewise
1067         * efiemu/modules/acpi.c: likewise
1068         * efiemu/i386/pc/cfgtables.c: likewise
1069         * efiemu/i386/loadcore64.c: likewise
1070         * efiemu/i386/loadcore32.c: likewise
1071         * efiemu/prepare64.c: likewise
1072         * efiemu/loadcore.c: likewise
1073         * efiemu/symbols.c: likewise
1074         * efiemu/mm.c: likewise
1075         * efiemu/loadcore32.c: likewise
1077 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1079         ACPI spoofing
1081         * commands/acpi.c: new file
1082         * commands/i386/pc/acpi.c: likewise
1083         * commands/efi/acpi.c: likewise
1084         * include/grub/acpi.h: likewise
1085         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1086         (acpi_mod_SOURCES): new variable
1087         (acpi_mod_CFLAGS): likewise
1088         (acpi_mod_LDFLAGS): likewise
1089         * conf/i386-efi.rmk: likewise
1090         * conf/x86_64-efi.rmk: likewise
1092 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1094         Missing part from mmap patch
1096         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1097         (grub_mmap_unregister)
1098         (grub_mmap_free_and_unregister): use grub_mmap_register
1100 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1102         Mmap services
1104         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1105         * loader/i386/linux.c (find_mmap_size): likewise
1106         (allocate_pages): likewise
1107         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1108         (grub_fill_multiboot_mmap): likewise
1109         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1110         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1111         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1112         (OPENBSD_MMAP_RESERVED): likewise
1113         * include/grub/i386/pc/memory.h: include grub/memory.h
1114         (grub_lower_mem): removed
1115         (grub_upper_mem): likewise
1116         (GRUB_MACHINE_MEMORY_ACPI): new definition
1117         (GRUB_MACHINE_MEMORY_NVS): likewise
1118         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1119         (GRUB_MACHINE_MEMORY_HOLE): likewise
1120         (grub_machine_mmap_register): likewise
1121         (grub_machine_mmap_unregister): likewise
1122         (grub_machine_get_upper): likewise
1123         (grub_machine_get_lower): likewise
1124         (grub_machine_get_post64): likewise
1125         * include/grub/i386/efi/memory.h: new file
1126         * include/grub/x86_64/efi/memory.h: likewise
1127         * include/grub/efi/memory.h: likewise
1128         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1129         (mmap_mod_SOURCES): new variable
1130         (mmap_mod_LDFLAGS): likewise
1131         (mmap_mod_ASFLAGS): likewise
1132         * conf/i386-coreboot.rmk: likewise
1133         * conf/i386-ieee1275.rmk: likewise
1134         * conf/i386-efi.rmk: likewise
1135         * conf/x86_64-efi.rmk: likewise
1136         * include/grub/types.h (UINT_TO_PTR): new macro
1137         (PTR_TO_UINT32): likewise
1138         (PTR_TO_UINT64): likewise
1139         * include/grub/memory.h: new file
1140         * mmap/i386/pc/mmap.c: likewise
1141         * mmap/i386/pc/mmap_helper.S: likewise
1142         * mmap/i386/uppermem.c: likewise
1143         * mmap/mmap.c: likewise
1144         * mmap/efi/mmap.c: likewise
1145         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1146         grub_upper_mem
1147         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1148         (grub_upper_mem): likewise
1149         (grub_machine_init): don't use grub_upper_mem,
1150         make grub_lower_mem local
1151         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1152         grub_mmap_iterate and grub_mmap_get_upper
1153         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1155 2009-05-02  Bean  <bean123ch@gmail.com>
1157         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1158         script/sh/parser.y.
1159         (pkglib_MODULES): Add normal.mod and sh.mod.
1160         (normal_SOURCES): New variable.
1161         (normal_mod_CFLAGS): Likewise.
1162         (normal_mod_LDFLAGS): Likewise.
1163         (sh_mod_SOURCES): Likewise.
1164         (sh_mod_CFLAGS): Likewise.
1165         (sh_mod_LDFLAGS): Likewise.
1167         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1168         script/sh/lexer.c_DEPENDENCIES.
1169         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1170         kern/rescue_reader.c and kern/rescue_parser.c.
1171         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1172         (grub_emu_SOURCES): Change source files.
1173         (pkglib_MODULES): Remove normal.mod.
1174         (normal_SOURCES): Removed.
1175         (normal_mod_CFLAGS): Likewise.
1176         (normal_mod_LDFLAGS): Likewise.
1177         * conf/i386-coreboot.rmk: Likewise.
1178         * conf/i386-efi.rmk: Likewise.
1179         * conf/i386-ieee1276.rmk: Likewise.
1180         * conf/powerpc-ieee1275.rmk: Likewise.
1181         * conf/sparc64-ieee1275.rmk: Likewise.
1182         * conf/x86_64-efi.rmk: Likewise.
1184         * include/grub/command.h (grub_command_execute): New inline function.
1186         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1188         * include/grub/normal.h: Remove <grub/setjmp.h>.
1189         (grub_fs_module_list): Moved to normal/autofs.c.
1190         (grub_exit_env): Removed.
1191         (grub_command_execute): Likewise.
1192         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1193         parameter script.
1194         (read_command_list): New function declaration.
1195         (read_fs_list): Likewise.
1197         * include/parser.h: Include <grub/reader.h>.
1198         (grub_parser_split_cmdline): Change type of getline parameter.
1199         (grub_parser): New structure.
1200         (grub_parser_class): New variable.
1201         (grub_parser_execute): New function declaration.
1202         (grub_register_rescue_parser): Likewise.
1203         (grub_parser_register): New inline function.
1204         (grub_parser_unregister): Likewise.
1205         (grub_parser_get_current): Likewise.
1206         (grub_parser_set_current): Likewise.
1208         * include/grub/reader.h: New file.
1209         * kern/reader.c: Likewise.
1210         * kern/rescue_parser.c: Likewise.
1211         * kern/rescue_reader.c: Likewise.
1212         * normal/autofs.c: Likewise.
1213         * normal/dyncmd.c: Likewise.
1215         * include/grub/rescue.h: Removed.
1216         * normal/command.h: Likewise.
1218         * include/grub/script.h: Moved to ...
1219         * include/grub/script_sh.h: ... Moved here.
1220         * normal/execute.c: Moved to ...
1221         * script/sh/execute.c: ... Moved here.
1222         * normal/function.c: Moved to ...
1223         * script/sh/function.c: ... Moved here.
1224         * normal/lexer.c: Moved to ...
1225         * script/sh/lexer.c: ... Moved here.
1226         * normal/parser.y: Moved to ...
1227         * script/sh/parser.y: ... Moved here.
1228         * normal/script.c: Moved to ...
1229         * script/sh/script.c: ... Moved here.
1231         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1232         <grub/reader.h>.
1233         (grub_exit_env): Removed.
1234         (fs_module_list): Moved to normal/autofs.c.
1235         (grub_file_getline): Don't handle comment here.
1236         (free_menu): Skip removed field entry->commands.
1237         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1238         script parameter.
1239         (read_config_file): Removed nested parameter, change getline function.
1240         (grub_enter_normal_mode): Removed.
1241         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1242         (read_command_list): Likewise.
1243         (autoload_fs_module): Moved to normal/autofs.c.
1244         (read_fs_list): Likewise.
1245         (reader_nested): New variable.
1246         (grub_normal_execute): Run parser.sh to switch to sh parser.
1247         (grub_cmd_rescue): Removed.
1248         (cmd_normal): Removed.
1249         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1250         rescue command.
1251         (grub_cmdline_run): New function.
1252         (grub_normal_reader_init): Likewise.
1253         (grub_normal_read_line): Likewise.
1254         (grub_env_write_pager): Likewise.
1255         (cmdline): New variable.
1256         (grub_normal_reader): Likewise.
1257         (GRUB_MOD_INIT): Register normal reader and set as current, register
1258         pager hook, register normal command with grub_register_command_prio,
1259         so that it won't show up in command.lst.
1260         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1261         grub_fs_autoload_hook.
1263         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1264         (grub_menu_execute_entry): Replace grub_script_execute with
1265         grub_parser_execute, change parameter to grub_command_execute.
1267         * normal/menu_text.c: Remove <grub/script.h>.
1269         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1270         and <grub/parser.h>.
1271         (run): Change editor_getline to use new parser interface. Change
1272         parameter to grub_command_execute.
1274         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1275         <grub/reader.h> and <grub/parser.h>.
1276         (grub_load_normal_mode): Execute normal command.
1277         (grub_main): Call grub_register_core_commands,
1278         grub_register_rescue_parser and grub_register_rescue_reader, use
1279         grub_reader_loop to enter input loop.
1281         * kern/parser.c (grub_parser_split_cmdline): Change type of
1282         getline parameter.
1283         (grub_parser_class): New variable.
1284         (grub_parser_execute): New function.
1286         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1287         * loader/multiboot2.c: Likewise.
1288         * loader/sparc64/ieee1275/linux.c: Likewise.
1290         * util/grub-emu.c (read_command_list): New dummy function.
1292 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1294         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1295         count to 16 for CCISS and IDA.
1297 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1299         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1300         after waiting for user input.
1302         * loader/i386/linux.c: Include `<grub/normal.h>'.
1303         (grub_cmd_linux): Improve the error message about `ask' mode, by
1304         waiting for user input so it's not missed (we can do this, since
1305         user requested interaction).
1307 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1309         Added missing lst to grub-mkrescue
1311         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1312         and ${input_dir}/parttool.lst
1314 2009-04-30  David S. Miller  <davem@davemloft.net>
1316         * util/hostdisk.c (device_is_wholedisk): New function.
1317         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1318         zero only if device_is_wholedisk() returns true.
1320         * util/hostdisk.c (convert_system_partition_to_system_disk):
1321         Handle virtual disk devices named /dev/vdiskX as found on sparc
1322         and powerpc.
1324         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1325         lettered partition specifier is found, convert to numbered.
1327 2009-04-29  David S. Miller  <davem@davemloft.net>
1329         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1330         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1332         * normal/command.c: Add missing newline at end of file.
1334         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1335         warnings.
1336         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1337         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1338         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1339         ihandles have a 32-bit type but need to be stored in a "void *".
1341 2009-04-28  Pavel Roskin  <proski@gnu.org>
1343         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1344         not disk.  Adjust all dependencies.
1345         (grub_fs_uuid_close): Use grub_device_close(), not
1346         grub_disk_close().
1348         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1349         parent's partition, don't copy it by reference, as it gets freed
1350         on close.
1352 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1354         Preboot hooks support
1356         * commands/boot.c (struct grub_preboot_t): new declaration
1357         (preboots_head): new variable
1358         (preboots_tail): likewise
1359         (grub_loader_register_preboot_hook): new function
1360         (grub_loader_unregister_preboot_hook): likewise
1361         (grub_loader_set): launch preboot hooks
1362         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1363         (grub_loader_register_preboot_hook): new declaration
1364         (grub_loader_unregister_preboot_hook): likewise
1366 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1368         Warning fix
1370         * disk/scsi.c (grub_scsi_open): added missing cast when
1371         calling grub_dprintf
1373 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1375         Bug and warning fixes
1377         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1378         declaration
1379         * commands/test.c (test_parse): fixed bug with file tests and corrected
1380         declaration of find_file
1382 2009-04-26  Pavel Roskin  <proski@gnu.org>
1384         * Makefile.in: Don't install empty manual pages if help2man is
1385         missing.  Use help2man option for output, not shell redirection.
1387 2009-04-26  David S. Miller  <davem@davemloft.net>
1389         * util/grub-mkdevicemap.c (make_device_map): Add missing
1390         NESTED_FUNC_ATTR to process_device().
1392 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1394         Test command
1396         * commands/test.c: rewritten to use bash-like test
1398 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1400         Parttool autoloading and improvements
1402         * Makefile.in (pkglib_DATA): add parttool.lst
1403         (parttool.lst): new target
1404         * genmk.rb: generate parttool-*
1405         (CLEANFILES): add #{parttool}
1406         (PARTTOOLFILES): new variable
1407         * genparttoollist.sh: new file
1408         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1409         (grub_pcpart_type): likewise
1410         * commands/parttool.c (helpmsg): new variable
1411         (grub_cmd_parttool): output help if not enough arguments are supplied
1412         autoload modules
1413         (GRUB_MOD_INIT(parttool)): use helpmsg
1415 2009-04-24  David S. Miller  <davem@davemloft.net>
1417         Avoiding opening same device multiple times in device iterator.
1419         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1420         and use it to build a list of partitions in iterate_disk() and
1421         iterate_partition().
1423         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1424         on disk->data.
1426         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1427         grub_devalias_iterate() result instead of unconditional 0.
1428         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1429         Also, capture hook return value, either directly or via
1430         grub_children_iterate(), and propagate to caller.
1431         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1432         grub_children_iterate): Return value is now 'int' instead of
1433         'grub_err_t'.
1434         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1435         like a proper iterator, stopping when hooks return non-zero.
1436         (grub_devalias_iterate): Likewise.
1438 2009-04-23  David S. Miller  <davem@davemloft.net>
1440         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1442 2009-04-22  David S. Miller  <davem@davemloft.net>
1444         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1445         is larger than address_cells, use that value for address_cells too.
1447         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1448         IEEE1275_MAX_PATH_LEN): Define.
1449         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1450         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1451         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1452         'devtype'.  Explicitly NULL terminate devalias expansion.
1454         * util/sparc64/ieee1275/misc.c: New file.
1455         * util/sparc64/ieee1275/grub-setup.c: New file.
1456         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1457         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1458         * util/sparc64/ieee1275/grub-install.in: New file.
1459         * util/ieee1275/ofpath.c: New file.
1460         * util/ieee1275/devicemap.c: New file.
1461         * util/devicemap.c: New file.
1462         * util/deviceiter.c: New file.
1463         * kern/sparc64/ieee1275/init.c: New file.
1464         * include/grub/util/ofpath.h: New file.
1465         * include/grub/util/deviceiter.h: New file.
1466         * util/grub-mkdevicemap.c: Include deviceiter.h.
1467         Implement using grub_util_emit_devicemap_entry and
1468         grub_util_iterate_devices.
1469         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1470         util/devicemap.c into grub-mkdevicemap
1471         * conf/i386-efi.rmk: Likewise.
1472         * conf/i386-ieee1275.rmk: Likewise.
1473         * conf/i386-pc.rmk: Likewise.
1474         * conf/powerpc-ieee1275.rmk: Likewise.
1475         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1476         images and installation utilities.  Build kernel as image
1477         instead of as elf binary.  Use common rules as much as possible.
1479 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1481         Correct GPT definition
1483         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1484         of "attrib" member
1486 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1488         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1490 2009-04-19  David S. Miller  <davem@davemloft.net>
1492         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1493         (grub_rescue_cmd_linux): Rename to...
1494         (grub_cmd_linux): and fix prototype.
1495         (grub_rescue_cmd_initrd): Rename to...
1496         (grub_cmd_initrd): and fix prototype.
1497         (cmd_linux, cmd_initrd): New.
1498         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1499         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1501 2009-04-17  Pavel Roskin  <proski@gnu.org>
1503         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1504         format.
1505         (grub_ohci_transfer): Likewise.
1507         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1509         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1510         return without a value.  Fix inconsistent indentation.
1512         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1513         match struct grub_fs.
1515         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1516         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1517         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1518         * commands/lspci.c (grub_lspci_iter): Likewise.
1520 2009-04-16  Bean  <bean123ch@gmail.com>
1522         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1523         value.
1525 2009-04-15  Pavel Roskin  <proski@gnu.org>
1527         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1528         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1529         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1530         definitions.
1532 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1534         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1535         that no multiple data or metadata areas are supported and `Unknown
1536         metadata header'.
1538 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1540         Move loader out of the kernel
1542         * kern/loader.c: moved to ...
1543         * commands/boot.c: ... moved here
1544         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1545         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1546         * include/grub/kernel.h (grub_machine_fini): export
1547         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1548         (grub_loader_set): likewise
1549         (grub_loader_unset): likewise
1550         (grub_loader_boot): likewise
1551         * conf/common.rmk: new module boot.mod
1552         (pkglib_MODULES): add boot.mod
1553         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1554         (grub_emu_SOURCES): likewise
1555         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1556         (grub_emu_SOURCES): likewise
1557         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1558         (grub_emu_SOURCES): likewise
1559         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1560         (grub_emu_SOURCES): likewise
1561         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1562         (grub_emu_SOURCES): likewise
1563         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1564         (grub_emu_SOURCES): likewise
1565         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1566         (grub_emu_SOURCES): likewise
1568 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1570         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1572         * kern/misc.c (grub_itoa): Removed function
1573         (grub_ltoa): likewise
1574         (grub_vsprintf): use grub_lltoa
1576 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1578         Restore grub-emu
1580         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1581         * conf/i386-coreboot.rmk: likewise
1582         * conf/i386-ieee1275.rmk: likewise
1583         * conf/powerpc-ieee1275.rmk: likewise
1585 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1587         * INSTALL: Add that `./autogen.sh' needs to be run before
1588         `./configure.'.
1590 2009-04-14  Bean  <bean123ch@gmail.com>
1592         * Makefile.in (pkglib_DATA): Add handler.lst.
1593         (handler.lst): New rule.
1595         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1596         * conf/i386-coreboot.rmk: Likewise.
1597         * conf/i386-ieee1275.rmk: Likewise.
1598         * conf/i386-efi.rmk: Likewise.
1599         * conf/x86_64-efi.rmk: Likewise.
1600         * conf/powerpc-ieee1275.rmk: Likewise.
1601         * conf/sparc64-ieee1275.rmk: Likewise.
1603         * genhandlerlist.sh: New file.
1605         * genmk.rb: Add rules to generate handler.lst.
1607         * include/grub/normal.h (grub_file_getline): New function definition.
1608         (read_handler_list): Likewise.
1609         (free_handler_list): Likewise.
1611         * include/grub/term.h (grub_term_register_input): Add name parameter
1612         for auto generation of handler.lst.
1613         (grub_term_register_output): Likewise.
1615         * normal/handler.c: New file.
1617         * normal/main.c (get_line): Renamed to grub_file_getline.
1618         (read_config_file): Use the newly renamed grub_file_getline.
1619         (read_command_list): Likewise.
1620         (read_fs_list): Likewise.
1621         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1622         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1624         * term/efi/console.c (grub_console_init): Add name parameter for auto
1625         generation of handler.lst.
1626         * term/gfxterm.c: Likewise.
1627         * term/i386/pc/at_keyboard.c: Likewise.
1628         * term/i386/pc/console.c: Likewise.
1629         * term/i386/pc/serial.c: Likewise.
1630         * term/i386/pc/vesafb.c: Likewise.
1631         * term/i386/pc/vga.c: Likewise.
1632         * term/i386/pc/vga_text.c: Likewise.
1633         * term/ieee1275/ofconsole.c: Likewise.
1634         * term/usb_keyboard.c: Likewise.
1636 2009-04-14  Bean  <bean123ch@gmail.com>
1638         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1639         properly with null character.
1641 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1643         * configure: Remove.
1644         * config.h.in: Likewise.
1645         * stamp-h.in: Likewise.
1646         * DISTLIST: Likewise.
1647         * conf/common.mk: Likewise.
1648         * conf/i386-coreboot.mk: Likewise.
1649         * conf/i386-efi.mk: Likewise.
1650         * conf/i386-ieee1275.mk: Likewise.
1651         * conf/i386.mk: Likewise.
1652         * conf/i386-pc.mk: Likewise.
1653         * conf/powerpc-ieee1275.mk: Likewise.
1654         * conf/sparc64-ieee1275.mk: Likewise.
1655         * conf/x86_64-efi.mk: Likewise.
1657         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1658         develop on GRUB.
1660 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1661             David S. Miller  <davem@davemloft.net>
1663         * util/hostdisk.c (make_device_name): Fix buffer length
1664         calculations.
1666 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1668         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1669         <sys/param.h> and <sys/sysctl.h>.
1670         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1671         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1672         opening the device and reset them afterwards.
1674 2009-04-13  Pavel Roskin  <proski@gnu.org>
1676         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1677         Reported by John Stanley <jpsinthemix@verizon.net>
1679 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1681         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1682         that name for menuentries when appropriate.
1684 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1686         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1688 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1690         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1691         to Linux, simply abort telling the user it's no longer supported.
1693 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1695         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1696         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1697         `freebsd_loadenv' only when devices.hints exist.
1699 2009-04-13  Pavel Roskin  <proski@gnu.org>
1701         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1703 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1705         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1706         partition number.
1707         (grub_drive): Likewise.
1709 2009-04-13  David S. Miller  <davem@davemloft.net>
1711         * kern/sparc64/ieee1275/ieee1275.c: New file.
1712         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1713         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1714         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1715         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1716         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1717         grub_ieee1275_alloc_physmem): Declare new exported functions.
1719         * include/grub/sparc64/ieee1275/loader.h: New file.
1720         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1721         * include/grub/sparc64/kernel.h: Likewise.
1722         * loader/sparc64/ieee1275/linux.c: Likewise.
1724         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1725         (grub_fstest_SOURCES): Likewise.
1727         * util/hostdisk.c (make_device_name): Do not make any assumptions
1728         about the length of drive names.
1730         * kern/dl.c (grub_dl_load_file): Close file immediately when
1731         we are done using it.
1733 2009-04-12  David S. Miller  <davem@davemloft.net>
1735         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1736         values.  Noticed by Pavel Roskin.
1738         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1739         target compiler.
1741         * genmk.rb: Add more flexible image type specification, also
1742         pass --strip-unneeded to objcopy.
1743         * conf/i386-pc.rmk: Use *_FORMAT.
1744         * conf/i386-pc.mk: Rebuilt.
1746         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1747         (OFDISK_HASH_SZ): Define.
1748         (ofdisk_hash): New hash table.
1749         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1750         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1751         instead of device phandle which is not unique.
1753         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1754         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1755         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1756         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1757         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1758         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1759         GRUB_KERNEL_MACHINE_DATA_END): Define.
1760         (grub_kernel_image_size, grub_total_module_size): Declare.
1762 2009-04-12  Pavel Roskin  <proski@gnu.org>
1764          * configure.ac: Change the logic when we check for target tools.
1765          Do it when the target is specified and it's different from the
1766          specified value of the host.
1768 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1770         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1771         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1772         GNU/kFreeBSD. Check if a device is a character device. Use
1773         DIOCGMEDIASIZE to get the size.
1774         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1775         support for GNU/kFreeBSD.
1776         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1777         is a character device instead of a block device. Add support for
1778         FreeBSD device names.
1780         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1781         is a character device instead of a block device.
1783         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1784         is a character device instead of a block device.
1786 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1788         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1789         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1790         FreeBSD. Check if a device is a character device. Use
1791         DIOCGMEDIASIZE to get the size.
1792         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1793         support for FreeBSD.
1794         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1795         is a character device instead of a block device. Add support for
1796         FreeBSD device names.
1798         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1799         a character device instead of a block device.
1800         (grub_util_check_char_device): New function.
1802         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1803         a character device instead of a block device.
1805         * include/grub/util/getroot.h (grub_util_check_char_device): New
1806         prototype.
1808 2009-04-11  David S. Miller  <davem@davemloft.net>
1810         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1811         static libgcc.
1812         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1813         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1814         function, if present.
1815         (__bswapdi2): Likewise.
1817         * include/grub/sparc64/ieee1275/boot.h: New file.
1818         * boot/sparc64/ieee1275/boot.S: Likewise.
1819         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1821         * kern/misc.c (grub_ltoa): New function.
1822         (grub_vsprintf): Use it to format 'long' integers.
1824 2009-04-10  David S. Miller  <davem@davemloft.net>
1826         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1827         slots are of type grub_ieee1275_cell_t.
1828         (grub_nand_read): Likewise.
1829         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1830         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1831         macros are used to compare values in arg/ret block of the call.
1832         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1833         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1834         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1835         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1836         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1837         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1838         grub_ieee1275_close, grub_ieee1275_set_property,
1839         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1840         grub_ieee1275_cell_t.
1841         * kern/ieee1275/openfw.c (grub_map): Likewise.
1842         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1843         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1845         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1846         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1847         (grub_devalias_iterate): Likewise.
1849 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1851         UFS improvements
1853         * fs/ufs.c (INODE_NBLOCKS): new definition
1854         (struct grub_ufs_dirent): added fields for non-BSD dirents
1855         (grub_ufs_get_file_block): fixed double indirect handling
1856         (grub_ufs_lookup_symlink): use more robust way to determine whether
1857         symlink is inline
1858         (grub_ufs_find_file): support for non-BSD dirents
1859         (grub_ufs_dir): support for non-BSD dirents
1861 2009-04-10  Bean  <bean123ch@gnail.com>
1863         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1864         attribute, otherwise the size would be wrong for i386 platform.
1866         * include/grub/pci.h (grub_pci_read_word): New inline function.
1867         (grub_pci_read_byte): Likewise.
1868         (grub_pci_write): Likewise.
1869         (grub_pci_write_word): Likewise.
1870         (grub_pci_write_byte): Likewise.
1872         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1874         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1875         (find_framebuf): Scan pci to locate the frame buffer address.
1877         * commands/efi/fixvideo.c: New file.
1879         * commands/efi/loadbios.c: Likewise.
1881         * commands/memrw.c: Likewise.
1883         * util/grub-dumpbios.in: Likewise.
1885         * conf/common.rmk (grub-dumpbios): New utility.
1886         (pkglib_MODULES): New module memrw.mod.
1887         (memrw_mod_SOURCE): New macro.
1888         (memrw_mod_CFLAGS): Likewise.
1889         (memrw_mod_LDFLAGS): Likewise.
1891         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1892         fixvideo.mod.
1893         (loadbios_mod_SOURCE): New macro.
1894         (loadbios_mod_CFLAGS): Likewise.
1895         (loadbios_mod_LDFLAGS): Likewise.
1896         (fixvideo_mod_SOURCE): Likewise.
1897         (fixvideo_mod_CFLAGS): Likewise.
1898         (fixvideo_mod_LDFLAGS): Likewise.
1900         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1901         fixvideo.mod.
1902         (loadbios_mod_SOURCE): New macro.
1903         (loadbios_mod_CFLAGS): Likewise.
1904         (loadbios_mod_LDFLAGS): Likewise.
1905         (fixvideo_mod_SOURCE): Likewise.
1906         (fixvideo_mod_CFLAGS): Likewise.
1907         (fixvideo_mod_LDFLAGS): Likewise.
1909 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1911         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1913 2009-04-07  David S. Miller  <davem@davemloft.net>
1915         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1916         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1917         R_SPARC_WDISP30 case.
1918         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1920 2009-04-06  Pavel Roskin  <proski@gnu.org>
1922         * include/grub/misc.h (ARRAY_SIZE): New macro.
1923         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1924         New macro.
1925         * loader/i386/linux.c (allocate_pages): Use free_pages().
1926         (grub_linux_unload): Don't use free_pages().
1927         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1928         wrong index.  Treat all other modes as text modes.
1929         (grub_cmd_linux): Initialize vid_mode unconditionally to
1930         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1932         * commands/help.c (print_command_help): Use cmd->prio, not
1933         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1935 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1937         Parttool
1939         * parttool/pcpart.c: new file
1940         * commands/parttool.c: likewise
1941         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1942         (parttool_mod_SOURCES): new variable
1943         (parttool_mod_CFLAGS): likewise
1944         (parttool_mod_LDFLAGS): likewise
1945         (pcpart_mod_SOURCES): likewise
1946         (pcpart_mod_CFLAGS): likewise
1947         (pcpart_mod_LDFLAGS): likewise
1948         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1949         and parttool/pcpart.c
1950         * conf/i386-efi.rmk: likewise
1951         * conf/i386-ieee1275.rmk: likewise
1952         * conf/i386-pc.rmk: likewise
1953         * conf/powerpc-ieee1275.rmk: likewise
1954         * conf/sparc64-ieee1275.rmk: likewise
1955         * conf/x86_64-ieee1275.rmk: likewise
1957 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1959         Support for mtime and further expandability of dir command
1961         * include/grub/lib/datetime.h: moved to ...
1962         * include/grub/datetime.h: ... moved here and added
1963         declaration of grub_unixtime2datetime. All users updated
1964         * include/grub/fs.h: new syntax for dir and mtime functions in
1965         struct grub_fs
1966         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1967         and GRUB_FSHELP_FLAGS_MASK
1968         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1969         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1970         (grub_ext2_mtime): new function
1971         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1972         (grub_hfsplus_mtime): new function
1973         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1974         (GRUB_UFS_ATTR_FILE): likewise
1975         (GRUB_UFS_ATTR_LNK): likewise
1976         (struct grub_ufs_sblock): new fields mtime
1977         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1978         all users updated
1979         (grub_ufs_dir): mtime support
1980         (grub_ufs_mtime): new function
1981         * fs/affs.c (grub_affs_dir): use new dir syntax
1982         * fs/afs.c (grub_afs_dir): likewise
1983         * fs/cpio.c (grub_cpio_dir): likewise
1984         * fs/fat.c (grub_fat_find_dir): likewise
1985         * fs/hfs.c (grub_hfs_dir): likewise
1986         * fs/iso9660.c (grub_iso9660_dir): likewise
1987         * fs/jfs.c (grub_jfs_dir): likewise
1988         * fs/minix.c (grub_minix_dir): likewise
1989         * fs/ntfs.c (grub_ntfs_dir): likewise
1990         * fs/reiserfs.c (grub_reiserfs_dir): likewise
1991         * fs/sfs.c (grub_sfs_dir): likewise
1992         * fs/xfs.c (grub_xfs_dir): likewise
1993         * util/hostfs.c (grub_hostfs_dir): likewise
1994         * lib/datetime.c: moved to ...
1995         * normal/datetime.c: ... moved here
1996         (grub_unixtime2datetime): new function
1997         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1998         * normal/completion.c (iterate_dir): use new dir syntax
1999         * normal/misc.c (grub_normal_print_device_info): tell the
2000         last modification time of a volume
2001         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2002         * conf/common.rmk: added lib/datetime.c to ls.mod
2003         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2004         (normal_mod_SOURCES): likewise
2005         (datetime_mod_SOURCES): Removed lib/datetime.c
2006         * conf/i386-efi.rmk: likewise
2007         * conf/i386-ieee1275.rmk: likewise
2008         * conf/i386-pc.rmk: likewise
2009         * conf/powerpc-ieee1275.rmk: likewise
2010         * conf/sparc64-ieee1275.rmk: likewise
2011         * conf/x86_64-efi.rmk: likewise
2013 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2015         Trim trailing spaces in FAT label and support mtools-like labels
2017         * fs/fat.c (grub_fat_iterate_dir): New function based
2018         on grub_fat_find_dir
2019         (grub_fat_find_dir): use grub_fat_iterate_dir
2020         (grub_fat_label): likewise
2022 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2024         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2025         and command.h
2026         remove extraneous kernel_elf_HEADERS
2028 2009-04-04  Bean  <bean123ch@gnail.com>
2030         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2032         * util/misc.c: Likewise.
2034 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2036         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2037         instead of grub_printf.
2039 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2041         * loader/i386/linux.c (grub_linux_setup_video): Fill
2042         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2043         values from `mode info' structure instead of hardcoded
2044         values.
2046 2009-04-01  Pavel Roskin  <proski@gnu.org>
2048         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2049         unused now.
2050         * genmk.rb: Likewise.
2051         * configure.ac: Likewise.
2053 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2055         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2056         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2058 2009-04-01  David S. Miller  <davem@davemloft.net>
2060         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2061         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2062         (grub_setjmp): Mark with 'returns_twice' attribute.
2063         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2064         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2065         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2067 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2069         Reapply fix from 2008-07-28 which was accidentally reverted; also
2070         perform the same fix to a similar check in same function.
2072         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2073         with the same number are found, just use issue a warning with
2074         grub_dprintf(), as this error has been reported to be non-fatal.
2076 2009-03-31  Pavel Roskin  <proski@gnu.org>
2078         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2079         for cross-compilation.
2081 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2083         Fix i386-ieee1275 build.
2085         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2086         Remove declaration.
2088 2009-03-30  Pavel Roskin  <proski@gnu.org>
2090         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2091         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2092         zero-terminated, rely only on the strlen value.  Fix comparison
2093         of strings differing in length.
2095 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2097         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2098         checking for abi version.  Improve error messages on BIOS to notify
2099         user about `linux16' command.
2101 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2103         Leak fixes
2105         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2106         in case of collision
2107         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2109 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2111         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2112         set `vid_mode' accordingly.
2113         (grub_linux_boot): Process `vid_mode' and set video mode.
2115 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2117         * util/grub.d/10_linux.in (linux_entry): New function.
2118         Factorize generation of Linux boot entries.
2120 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2122         Make the format of Environment Block plain text. The boot loader
2123         part is not tested well yet.
2125         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2126         (buffer): Removed.
2127         (envblk): Likewise.
2128         (usage): Remove "info" and "clear". Add "unset". Update the
2129         description of "set", as this does not delete variables any
2130         longer.
2131         (create_envblk_file): Complete rewrite.
2132         (open_envblk_file): Likewise.
2133         (cmd_info): Removed.
2134         (cmd_list): Likewise.
2135         (cmd_set): Likewise.
2136         (cmd_clear): Likewise.
2137         (list_variables): New function.
2138         (write_envblk): Likewise.
2139         (set_variables): Likewise.
2140         (unset_variables): Likewise.
2141         (main): Complete rewrite.
2143         * commands/loadenv.c (buffer): Removed.
2144         (envblk): Likewise.
2145         (open_envblk_file): New function.
2146         (read_envblk_file): Complete rewrite.
2147         (grub_cmd_load_env): Likewise.
2148         (grub_cmd_list_env): Likewise.
2149         (struct blocklist): New struct.
2150         (free_blocklists): New function.
2151         (check_blocklists): Likewise.
2152         (write_blocklists): Likewise.
2153         (grub_cmd_save_env): Complete rewrite.
2155         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2156         a plain text signature.
2157         (GRUB_ENVBLK_MAXLEN): Removed.
2158         (struct grub_envblk): Complete rewrite.
2159         (grub_envblk_find): Removed.
2160         (grub_envblk_insert): Likewise.
2161         (grub_envblk_open): New prototype.
2162         (grub_envblk_set): Likewise.
2163         (grub_envblk_delete): Put const to VALUE.
2164         (grub_envblk_iterate): Put const to NAME and VALUE.
2165         (grub_envblk_close): New prototype.
2166         (grub_envblk_buffer): New inline function.
2167         (grub_envblk_size): Likewise.
2169         * lib/envblk.c: Include grub/mm.h.
2170         (grub_env_find): Removed.
2171         (grub_envblk_open): New function.
2172         (grub_envblk_close): Likewise.
2173         (escaped_value_len): Likewise.
2174         (find_next_line): Likewise.
2175         (grub_envblk_insert): Removed.
2176         (grub_envblk_set): New function.
2177         (grub_envblk_delete): Complete rewrite.
2178         (grub_envblk_iterate): Likewise.
2180 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2182         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2183         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2184         variables.  Use 16-bit loader.
2185         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2186         loader.
2187         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2188         (grub_linux16_boot): ... this.  Update all users.
2189         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2190         (grub_linux_boot): ... this.  Update all users.
2192         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2193         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2194         commands to `linux16' and `initrd16'.
2195         (GRUB_MOD_FINI(linux)): Rename to ...
2196         (GRUB_MOD_FINI(linux16)): ... this.
2198 2009-03-24  Pavel Roskin  <proski@gnu.org>
2200         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2201         not just for compilation.
2203 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2205         Move multiboot helper out of kernel
2207         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2208         `loader/i386/multiboot_helper.S'.
2209         * conf/i386-coreboot.rmk: Likewise
2210         * conf/i386-ieee1275.rmk: Likewise
2212         * kern/i386/loader.S: Move multiboot helpers from here...
2213         * loader/i386/multiboot_helper.S: ...moved here
2214         * include/grub/i386/loader.h: Move declarations of multiboot
2215         helpers from here...
2216         * include/grub/i386/multiboot.h: ...moved here
2217         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2219 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2221         * kern/env.c (grub_env_context_open): Added an argument to specify
2222         whether a new context inherits exported variables from current
2223         one. This is useful when making a sandbox to interpret a config
2224         file.
2225         All callers updated.
2227         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2229 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2231         * kern/env.c (grub_env_context_close): Fix memory leaks.
2233 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2235         * normal/main.c (grub_normal_execute): Added an argument
2236         BATCH to specify if an interactive interface should be provided
2237         after reading a config file.
2238         All callers updated.
2239         (read_command_list): Prevent being executed twice.
2240         (read_fs_list): Likewise.
2242         * include/grub/normal.h (grub_normal_execute): Updated the
2243         prototype.
2245 2009-03-22  Pavel Roskin  <proski@gno.org>
2247         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2248         _start.
2249         * kern/i386/pc/startup.S: Likewise.
2250         * kern/i386/efi/startup.S: Likewise.
2251         * kern/i386/ieee1275/startup.S: Likewise.
2252         * kern/i386/coreboot/startup.S: Likewise.
2253         * kern/x86_64/efi/startup.S: Likewise.
2255         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2256         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2257         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2259 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2261         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2263         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2264         limit detection.
2265         Use vaddr of correct segment for entry_point.
2267 2009-03-21  Bean  <bean123ch@gmail.com>
2269         * commands/blocklist.c: Add include file <grub/command.h>, remove
2270         <grub/normal.h> and <grub/arg.h>.
2271         (grub_cmd_blocklist): Use the new command interface.
2272         (GRUB_MOD_INIT): Likewise.
2273         (GRUB_MOD_FINI): Likewise.
2274         * commands/boot.c: Likewise.
2275         * commands/cat.c: Likewise.
2276         * commands/cmp.c: Likewise.
2277         * commands/configfile.c: Likewise.
2278         * commands/crc.c: Likewise.
2279         * commands/echo.c: Likewise.
2280         * commands/halt.c: Likewise.
2281         * commands/handler.c: Likewise.
2282         * commands/hdparm.c: Likewise.
2283         * commands/help.c: Likewise.
2284         * commands/hexdump.c: Likewise.
2285         * commands/loadenv.c: Likewise.
2286         * commands/ls.c: Likewise.
2287         * commands/lsmmap.c: Likewise.
2288         * commands/lspci.c: Likewise.
2289         * commands/loadenv.c: Likewise.
2290         * commands/read.c: Likewise.
2291         * commands/reboot.c: Likewise.
2292         * commands/search.c: Likewise.
2293         * commands/sleep.c: Likewise.
2294         * commands/test.c: Likewise.
2295         * commands/usbtest.c: Likewise.
2296         * commands/videotest.c: Likewise.
2297         * commands/i386/cpuid.c: Likewise.
2298         * commands/i386/pc/halt.c: Likewise.
2299         * commands/i386/pc/play.c: Likewise.
2300         * commands/i386/pc/pxecmd.c: Likewise.
2301         * commands/i386/pc/vbeinfo.c: Likewise.
2302         * commands/i386/pc/vbetest.c: Likewise.
2303         * commands/ieee1275/suspend.c: Likewise.
2304         * disk/loopback.c: Likewise.
2305         * font/font_cmd.c: Likewise.
2306         * hello/hello.c: Likewise.
2307         * loader/efi/appleloader.c: Likewise.
2308         * loader/efi/chainloader.c: Likewise.
2309         * loader/i386/bsd.c: Likewise.
2310         * loader/i386/efi/linux.c: Likewise.
2311         * loader/i386/ieee1275/linux.c: Likewise.
2312         * loader/i386/linux.c: Likewise.
2313         * loader/i386/pc/chainloader.c: Likewise.
2314         * loader/i386/pc/linux.c: Likewise.
2315         * loader/powerpc/ieee1275/linux.c: Likewise.
2316         * loader/multiboot_loader.c: Likewise.
2317         * term/gfxterm.c: Likewise.
2318         * term/i386/pc/serial.c: Likewise.
2319         * term/terminfo.c: Likewise.
2321         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2322         * term/i386/pc/vga.c: Likewise.
2323         * video/readers/jpeg.c: Likewise.
2324         * video/readers/png.c: Likewise.
2325         * video/readers/tga.c: Likewise.
2327         * util/grub-fstest (cmd_loopback): Removed.
2328         (cmd_blocklist): Likewise.
2329         (cmd_ls): Likewise.
2330         (grub_register_command): Likewise.
2331         (grub_unregister_command): Likewise.
2332         (execute_command): Use grub_command_find to locate command and execute
2333         it.
2335         * include/grub/efi/chainloader.h: Removed.
2336         * loader/efi/chainloader_normal.c: Likewise.
2337         * loader/i386/bsd_normal.c: Likewise.
2338         * loader/i386/pc/chainloader_normal.c: Likewise.
2339         * loader/i386/pc/multiboot_normal.c: Likewise.
2340         * loader/linux_normal.c: Likewise.
2341         * loader/multiboot_loader_normal.c: Likewise.
2342         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2344         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2345         and grub_register_command_p1.
2347         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2348         kern/command.c, lib/arg.c and commands/extcmd.c.
2349         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2350         (minicmd_mod_SOURCES): New variable.
2351         (minicmd_mod_CFLAGS): Likewise.
2352         (minicmd_mod_LDFLAGS): Likewise.
2353         (extcmd_mod_SOURCES): Likewise.
2354         (extcmd_mod_CFLAGS): Likewise.
2355         (extcmd_mod_LDFLAGS): Likewise.
2356         (boot_mod_SOURCES): Removed.
2357         (boot_mod_CFLAGS): Likewise.
2358         (boot_mod_LDFLAGS): Likewise.
2360         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2361         kern/corecmd.c.
2362         (kernel_img_HEADERS): Add command.h.
2363         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2364         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2365         and lib/arg.c.
2366         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2367         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2368         remove the corresponding normal mode command.
2369         (normal_mod_SOURCES): Remove normal/arg.c.
2370         * conf/i386-coreboot.rmk: Likewise.
2371         * conf/i386-efi.rmk: Likewise.
2372         * conf/i386-ieee1275.rmk: Likewise.
2373         * conf/powerpc-ieee1275.rmk: Likewise.
2374         * conf/x86_64-efi.rmk: Likewise.
2376         * include/grub/arg.h: Move from here ...
2377         * include/grub/lib/arg.h: ... to here.
2379         * normal/arg.c: Move from here ...
2380         * lib/arg.c: ... to here.
2382         * commands/extcmd.c: New file.
2383         * commands/minicmd.c: Likewise.
2384         * include/grub/command.h: Likewise.
2385         * include/grub/extcmd.h: Likewise.
2386         * kern/command.c: Likewise.
2387         * kern/corecmd.c: Likewise.
2389         * kern/list.c (grub_list_iterate): Return int instead of void.
2390         (grub_list_insert): New function.
2391         (grub_prio_list_insert): Likewise.
2393         * kern/rescue.c (grub_rescue_command): Removed.
2394         (grub_rescue_command_list): Likewise.
2395         (grub_rescue_register_command): Likewise.
2396         (grub_rescue_unregister_command): Likewise.
2397         (grub_rescue_cmd_boot): Move to minicmd.c
2398         (grub_rescue_cmd_help): Likewise.
2399         (grub_rescue_cmd_info): Likewise.
2400         (grub_rescue_cmd_boot): Likewise.
2401         (grub_rescue_cmd_testload): Likewise.
2402         (grub_rescue_cmd_dump): Likewise.
2403         (grub_rescue_cmd_rmmod): Likewise.
2404         (grub_rescue_cmd_lsmod): Likewise.
2405         (grub_rescue_cmd_exit): Likewise.
2406         (grub_rescue_print_devices): Moved to corecmd.c.
2407         (grub_rescue_print_files): Likewise.
2408         (grub_rescue_cmd_ls): Likewise.
2409         (grub_rescue_cmd_insmod): Likewise.
2410         (grub_rescue_cmd_set): Likewise.
2411         (grub_rescue_cmd_unset): Likewise.
2412         (attempt_normal_mode): Use grub_command_find to get normal module.
2413         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2414         commands, remove grub_rescue_register_command calls.
2416         * normal/command.c (grub_register_command): Removed.
2417         (grub_unregister_command): Likewise.
2418         (grub_command_find): Likewise.
2419         (grub_iterate_commands): Likewise.
2420         (rescue_command): Likewise.
2421         (export_command): Moved to corecmd.c.
2422         (set_command): Removed.
2423         (unset_command): Likewise.
2424         (insmod_command): Likewise.
2425         (rmmod_command): Likewise.
2426         (lsmod_command): Likewise.
2427         (grub_command_init): Likewise.
2429         * normal/completion.c (iterate_command): Use cmd->prio to check for
2430         active command.
2431         (complete_arguments): Use grub_extcmd_t structure to find options.
2432         (grub_normal_do_completion): Change function grub_iterate_commands to
2433         grub_command_iterate.
2435         * normal/execute.c (grub_script_execute_cmd): No need to parse
2436         argument here.
2438         * normal/main.c (grub_dyncmd_dispatcher): New function.
2439         (read_command_list): Register unload commands as dyncmd.
2440         (grub_cmd_normal): Use new command interface, register rescue,
2441         unregister normal at entry, register normal, unregister rescue at exit.
2443         * include/grub/list.h (grub_list_test_t): New type.
2444         (grub_list_iterate): Return int instead of void.
2445         (grub_list_insert): New function.
2446         (GRUB_AS_NAMED_LIST_P): New macro.
2447         (GRUB_AS_PRIO_LIST): Likewise.
2448         (GRUB_AS_PRIO_LIST_P): Likewise.
2449         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2450         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2451         (grub_prio_list): New structure.
2452         (grub_prio_list_insert): New function.
2453         (grub_prio_list_remove): New inline function.
2455         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2456         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2457         (GRUB_COMMAND_FLAG_MENU): Likewise.
2458         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2459         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2460         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2461         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2462         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2463         (grub_command): Likewise.
2464         (grub_register_command): Likewise.
2465         (grub_command_find): Likewise.
2466         (grub_iterate_commands): Likewise.
2467         (grub_command_init): Likewise.
2468         (grub_arg_parse): Likewise.
2469         (grub_arg_show_help): Likewise.
2471         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2472         (grub_rescue_unregister_command): Likewise.
2474         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2475         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2476         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2478         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2479         grub_rescue_cmd_initrd.
2480         * include/grub/i386/loader.h: Likewise.
2481         * include/grub/x86_64/loader.h: Likewise.
2483         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2485 2009-03-21  Bean  <bean123ch@gmail.com>
2487         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2488         instead of stat in mingw environment.
2490         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2492         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2494         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2495         AC_CONFIG_LINKS.
2497 2009-03-21  Bean  <bean123ch@gmail.com>
2499         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2500         out of range error.
2502 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2504         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2505         checking inode flags for EXT4_EXTENTS_FLAG.
2507 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2509         * loader/i386/linux.c: Include `<grub/video.h>' and
2510         `<grub/i386/pc/vbe.h>'..
2511         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2512         (grub_linux32_boot): Attempt to configure video settings with
2513         grub_linux_setup_video().
2514         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2515         to avoid grub_console_fini() which would step out of graphical mode
2516         unconditionally.
2518 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2520         Fix build on powerpc.
2521         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2523 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2525         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2526         background image command.
2528 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2530         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2531         (grub_gfxterm_putchar): Extract pairs of identical calls to
2532         draw_cursor out of conditional blocks.
2534 2009-03-11  Pavel Roskin  <proski@gnu.org>
2536         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2537         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2539 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2541         * loader/i386/multiboot_elfxx.c
2542         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2544 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2546         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2547         `kern/handler.c'.
2549 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2551         * loader/i386/multiboot.c (code_size): New variable.
2552         (grub_multiboot): Define offsets by adding to `code_size' rather
2553         than subtracting from `grub_multiboot_payload_size'.  Provide
2554         4-byte alignment to MBI and others by increasing
2555         `boot_loader_name_length' appropriately.
2557         * loader/i386/multiboot_elfxx.c
2558         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2560 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2562         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2563         `fs/ext2.c'.
2565 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2567         Make loader/i386/linux.c usable on i386-pc again.
2569         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2570         memory to heap.
2571         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2572         `#error' stanza.
2574 2009-03-07  Bean  <bean123ch@gmail.com>
2576         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2577         allocation.
2579 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2581         Fix display issue on terminals with screen size other than 80x25
2582         (e.g. gfxterm with resolution higher than 640x480).
2584         * normal/main.c (grub_normal_init_page): Display title text in a
2585         position relative to the center of the terminal instead of relying
2586         on a hardcoded offset.
2588 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2590         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2591         installed.
2593         * Makefile.in (host_kernel): New variable.
2594         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2595         scripts instead of just the windows one.
2596         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2598 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2600         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2601         `kern/handler.c'.
2602         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2603         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2604         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2605         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2606         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2607         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2609 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2611         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2612         or if there's no space for the disk label and print the partition number on a
2613         invalid magic.
2615 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2617         * util/misc.c: Include <time.h>.
2618         (grub_millisleep): New function.
2620 2009-03-04  Bean  <bean123ch@gmail.com>
2622         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2623         another option -mno-red-zone.
2625         * commands/handler.c: Change module description.
2627         * kern/handler.c: Add missing space at the end of description line.
2629         * kern/list.c: Likewise.
2631 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2633         Move more components to the relocation area, and fix mbi pointer
2634         handling to use the destination rather than the origin (thanks to
2635         Vladimir Serbinenko for spotting).
2637         * loader/i386/multiboot.c (mbi_dest): New variable.
2638         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2639         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2640         relocation area.
2642 2009-03-01  Bean  <bean123ch@gmail.com>
2644         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2645         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2646         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2647         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2649         * loader/i386/efi/linux.c (acpi_guid): New variable.
2650         (acpi_guid): Likewise.
2651         (EBDA_SEG_ADDR): New constant.
2652         (LOW_MEM_ADDR): Likewise.
2653         (FAKE_EBDA_SEG): Likewise.
2654         (fake_bios_data): New function.
2655         (grub_linux_boot): Call fake_bios_data.
2657 2009-03-01  Bean  <bean123ch@gmail.com>
2659         * commands/terminal.c: Removed.
2661         * commands/handler.c: New file.
2663         * include/grub/list.h: Likewise.
2665         * include/grub/handler.h: Likewise.
2667         * kern/list.c: Likewise.
2669         * kern/handler.c: Likewise.
2671         * kern/term.h: Include header file <grub/handler.h>.
2672         (grub_term_input): Move next field to the beginning.
2673         (grub_term_output): Likewise.
2674         (grub_term_input_class): New variable.
2675         (grub_term_output_class): Likewise.
2676         (grub_term_register_input): Changed to inline function.
2677         (grub_term_register_output): Likewise.
2678         (grub_term_unregister_input): Likewise.
2679         (grub_term_unregister_output): Likewise.
2680         (grub_term_set_current_input): Likewise.
2681         (grub_term_set_current_output): Likewise.
2682         (grub_term_get_current_input): Likewise.
2683         (grub_term_get_current_output): Likewise.
2684         (grub_term_iterate_input): Removed.
2685         (grub_term_iterate_output): Likewise.
2687         * kern/term.c (grub_term_list_input): Removed.
2688         (grub_term_list_output): Likewise.
2689         (grub_term_input_class): New variable.
2690         (grub_term_output_class): Likewise.
2691         (grub_cur_term_input): Change variable as macro.
2692         (grub_cur_term_output): Likewise.
2693         (grub_term_register_input): Removed.
2694         (grub_term_register_output): Likewise.
2695         (grub_term_unregister_input): Likewise.
2696         (grub_term_unregister_output): Likewise.
2697         (grub_term_set_current_input): Likewise.
2698         (grub_term_set_current_output): Likewise.
2699         (grub_term_iterate_input): Likewise.
2700         (grub_term_iterate_output): Likewise.
2701         (grub_term_get_current_input): Likewise.
2702         (grub_term_get_current_output): Likewise.
2704         * util/grub-editenv.c: Include header file <grub/handler.h>.
2705         (grub_term_get_current_input): Removed.
2706         (grub_term_get_current_output): Likewise.
2707         (grub_term_input_class): New variable.
2708         (grub_term_output_class): Likewise.
2710         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2711         (grub_term_get_current_output): Likewise.
2712         (grub_term_input_class): New variable.
2713         (grub_term_output_class): Likewise.
2715         * util/grub-probe.c (grub_term_get_current_input): Removed.
2716         (grub_term_get_current_output): Likewise.
2717         (grub_term_input_class): New variable.
2718         (grub_term_output_class): Likewise.
2720         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2721         (grub_term_get_current_output): Likewise.
2722         (grub_term_input_class): New variable.
2723         (grub_term_output_class): Likewise.
2725         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2726         (terminal_mod_SOURCES): Likewise.
2727         (terminal_mod_CFLAGS): Likewise.
2728         (terminal_mod_LDFLAGS): Likewise.
2730         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2731         handler.c.
2732         (kernel_img_SOURCES): Add list.c and handler.c.
2733         (kernel_img_HEADERS): Add list.h and handler.h.
2735         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2736         handler.c.
2737         (kernel_mod_SOURCES): Add list.c and handler.c.
2738         (kernel_mod_HEADERS): Add list.h and handler.h.
2740         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2741         handler.c.
2742         (kernel_elf_SOURCES): Add list.c and handler.c.
2743         (kernel_elf_HEADERS): Add list.h and handler.h.
2745         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2746         handler.c.
2747         (kernel_elf_SOURCES): Add list.c and handler.c.
2748         (kernel_elf_HEADERS): Add list.h and handler.h.
2750         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2751         handler.c.
2752         (kernel_mod_SOURCES): Add list.c and handler.c.
2753         (kernel_mod_HEADERS): Add list.h and handler.h.
2755         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2756         handler.c.
2757         (kernel_elf_SOURCES): Add list.c and handler.c.
2758         (kernel_elf_HEADERS): Add list.h and handler.h.
2760 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2762         Factorize elf32 / elf64 code in Multiboot loader.  This will
2763         prevent it from getting out of sync again.
2765         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2766         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2767         grub_multiboot_load_elf64): Move from here ...
2768         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2769         grub_multiboot_load_elf): ... to here (new file).
2771 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2773         * util/grub.d/10_linux.in: Rename "single-user mode" to
2774         "recovery mode".
2776 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2778         Don't leak in SCSI code.
2779         * disk/scsi.c (grub_scsi_close): free `scsi'.
2781 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2783         * loader/i386/pc/multiboot.c: Move from here ...
2784         * loader/i386/multiboot.c: ... to here.  Update all users.
2786 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2788         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2789         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2791 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2793         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2794         b-tree.
2796 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2798         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2799         `0x' qualifier as 0 when base is specified as parameter).
2801 2009-02-24  Bean  <bean123ch@gmail.com>
2803         * configure.ac: Check for -mcmodel=large in x86_64 target.
2805         * include/grub/efi/api.h (efi_call_10): New macro.
2806         (efi_wrap_10): New function.
2808         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2809         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2810         (GRUB_PE32_REL_BASED_LOW): Likewise.
2811         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2812         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2813         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2814         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2815         (GRUB_PE32_REL_BASED_REL): Likewise.
2816         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2817         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2818         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2820         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2821         issue.
2823         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2824         (efi_wrap_10): New function.
2826         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2828         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2829         MB/MBP model (NV chipset).
2830         (devdata_devs): Add devpath_5 to the list.
2832         * load/i386/efi/linux.c (video_base): Remove variable.
2833         (RGB_MASK): New macro.
2834         (RGB_MAGIC): Likewise.
2835         (LINE_MIN): Likewise.
2836         (LINE_MAX): Likewise.
2837         (FBTEST_STEP): Likewise.
2838         (FBTEST_COUNT): Likewise.
2839         (fb_list): New variable.
2840         (grub_find_video_card): Remove function.
2841         (find_framebuf): New function.
2842         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2843         line length.
2845         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2846         problem for x86_64.
2848 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2850         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2852         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2853         coding tool name.
2855 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2857         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2858         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2859         in our relocation, instead of using it directly from heap.  Also
2860         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2862 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2864         Implement USB keyboard support (based on patch by Marco Gerards)
2866         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2867         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2868         (usb_keyboard_mod_LDFLAGS): New variables.
2870         * term/usb_keyboard.c: New file.
2872 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2874         Corrected wrong declaration
2876         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2878 2009-02-14  Christian Franke  <franke@computer.org>
2880         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2881         (grub_lspci_iter): Print class code and programming interface byte.
2883 2009-02-14  Christian Franke  <franke@computer.org>
2885         * gendistlist.sh: Ignore `.svn' directories.
2887 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2889         * fs/fat.c: Add 2009 to Copyright line.
2891 2009-02-14  Christian Franke  <franke@computer.org>
2893         * commands/hdparm.c: New file.  Provides `hdparm' command
2894         which sends ATA commands via grub_disk_ata_pass_through ().
2896         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2898         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2899         and <grub/cpu/io.h> to include/grub/ata.h.
2900         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2901         (GRUB_CDROM_SECTOR_SIZE): Remove.
2902         (GRUB_ATA_*): Move to include/grub/ata.h.
2903         (GRUB_ATAPI_*): Likewise.
2904         (enum grub_ata_commands): Likewise.
2905         (enum grub_ata_timeout_milliseconds): Likewise.
2906         (struct grub_ata_device): Likewise.
2907         (grub_ata_regset): Likewise.
2908         (grub_ata_regget): Likewise.
2909         (grub_ata_regset2): Likewise.
2910         (grub_ata_regget2): Likewise.
2911         (grub_ata_check_ready): Likewise.
2912         (grub_ata_wait_not_busy): Remove static, exported in
2913         include/grub/ata.h.
2914         (grub_ata_wait_drq): Likewise.
2915         (grub_ata_pio_read): Likewise.
2917         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2918         function for hdparm.mod.
2920         * include/grub/ata.h: New file, contains declarations from
2921         disk/ata.c.
2922         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2924         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2925         (grub_disk_ata_pass_through): New exported variable.
2927         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2929 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2931         Support multiple fallback entries, and provide an API to support
2932         executing default+fallback menu entries.  Renamed the `terminal' menu
2933         viewer to `text'.
2935         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2936         variable declaration.
2937         (grub_menu_execute_callback): New structure declaration.
2938         (grub_menu_execute_callback_t): New typedef.
2939         (grub_menu_execute_with_fallback): New function declaration.
2940         (grub_menu_get_entry): Likewise.
2941         (grub_menu_get_timeout): Likewise.
2942         (grub_menu_set_timeout): Likewise.
2944         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2946         * normal/menu.c (grub_wait_after_message): Moved to
2947         `normal/menu_text.c'.
2948         (draw_border): Likewise.
2949         (print_message): Likewise.
2950         (print_entry): Likewise.
2951         (print_entries): Likewise.
2952         (grub_menu_init_page): Likewise.
2953         (get_entry_number): Likewise.
2954         (print_timeout): Likewise.
2955         (run_menu): Likewise.
2956         (grub_menu_execute_entry): Likewise.
2957         (show_text_menu): Likewise.
2958         (get_and_remove_first_entry_number): New function.
2959         (grub_menu_execute_with_fallback): Likewise.
2960         (get_entry): Renamed to ...
2961         (grub_menu_get_entry): .. this and made it global.
2962         (get_timeout): Renamed to ...
2963         (grub_menu_get_timeout): ... this and made it global.
2964         (set_timeout): Renamed to ...
2965         (grub_menu_set_timeout): ... this and made it global.
2966         (grub_normal_terminal_menu_viewer): Renamed to ...
2967         (grub_normal_text_menu_viewer): ... this.
2969         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2970         from normal/menu.c.
2972         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2973         (normal_mod_SOURCES): Likewise.
2975         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2976         (normal_mod_SOURCES): Likewise.
2978         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2979         (normal_mod_SOURCES): Likewise.
2981         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2982         (normal_mod_SOURCES): Likewise.
2984         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2985         (normal_mod_SOURCES): Likewise.
2987         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2988         (normal_mod_SOURCES): Likewise.
2990         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2991         (normal_mod_SOURCES): Likewise.
2993 2009-02-11  Robert Millan  <rmh@aybabtu.com>
2995         * util/grub.d/00_header.in: Update old reference to `font' command.
2997 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
2999         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3001         Based on patch from Javier Martín.
3003 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3005         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3006         to avoid false positives with FAT.
3007         (grub_fstest_SOURCES): Likewise.
3008         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3009         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3010         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3011         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3012         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3013         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3015 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3017         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3018         bpb.version_specific.fat12_or_fat16.fstype and
3019         bpb.version_specific.fat32.fstype.
3021 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3023         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3025 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3027         * Makefile.in (host_os, host_cpu): New variables.
3028         (target_os): Remove.  Update all users.
3030 2009-02-08  Marco Gerards  <marco@gnu.org>
3032         * Makefile.in (enable_grub_emu_usb): New variable.
3033         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3034         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3035         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3036         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3037         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3038         `usbtest.mod' and `usbms.mod'.
3039         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3040         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3041         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3042         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3043         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3044         variables.
3046         * disk/usbms.c: New file.
3048         * include/grub/usb.h: Likewise.
3050         * include/grub/usbtrans.h: Likewise.
3052         * include/grub/usbdesc.h: Likewise.
3054         * bus/usb/usbtrans.c: Likewise.
3056         * bus/usb/ohci.c: Likewise.
3058         * bus/usb/uhci.c: Likewise.
3060         * bus/usb/usbhub.c: Likewise.
3062         * bus/usb/usb.c: Likewise.
3064         * commands/usbtest.c: Likewise.
3066         * util/usb.c: Likewise.
3068         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3070         * configure.ac: Test for libusb presence.
3072         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3074 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3076         * kern/mm.c: Add more comments.
3078 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3080         Patch from Javier Martín.
3081         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3082         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3084 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3086         * fs/cpio.c: Split tar functionality to ...
3087         * fs/tar.c: ... here (new file).  Update all users.
3089 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3091         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3092         backward-incompatible features.
3094         Based on patch from Javier Martín, with some adjustments.
3096 2009-02-07  Michael Scherer  <misc@mandriva.org>
3098         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3100 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3102         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3103         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3104         after the RAID stuff.
3106 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3108         Fixes problem when running vbetest command as reported by
3109         Vladimir Serbinenko <phcoder@gmail.com>.
3111         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3113 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3115         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3116         /dev/md/NpN style mdraid devices.
3118 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3120         * util/unifont2pff.rb: Remove.
3122 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3124         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3125         `#'.
3127 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3129         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3130         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3131         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3132         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3133         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3134         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3135         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3137 2009-02-02  Christian Franke  <franke@computer.org>
3139         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3141 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3143         * INSTALL: Note that we now require at least autoconf 2.59 and
3144         that LZO is optional.
3146 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3148         Base on patch on bug #24154 created by Tomas Tintera
3149         <trosos@seznam.cz>.
3151         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3153 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3155         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3156         <bero@arklinux.org>.
3158         * normal/parser.y (script_init): Add missing semicolon.
3160 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3162         * normal/main.c: Add include to grub/menu_viewer.h.
3163         (free_menu_entry_classes): Added.
3164         (grub_normal_menu_addentry): Added class property handling.
3165         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3166         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3168         * normal/menu_viewer.c: New file.
3170         * normal/menu.c (run_menu_entry): Renamed to ...
3171         (grub_menu_execute_entry): ... this and made it as global.
3172         (grub_menu_run): Renamed to ...
3173         (show_text_menu): ... this and made it local.
3174         (show_text_menu): Adapt to new function names.
3175         (grub_normal_terminal_menu_viewer): New global variable.
3177         * include/grub/menu.h: New file.
3179         * include/grub/menu_viewer.h: New file.
3181         * include/grub/normal.h: Added include to grub/menu.h.
3182         (grub_menu_entry): Moved to include/grub/menu.h.
3183         (grub_menu_entry_t): Likewise.
3184         (grub_menu): Likewise.
3185         (grub_menu_t): Likewise.
3186         (grub_normal_terminal_menu_viewer): Added.
3187         (grub_menu_execute_entry): Likewise.
3188         (grub_menu_run): Removed.
3190         * DISTLIST: Added include/grub/menu.h.
3191         Added include/grub/menu_viewer.h.
3192         Added normal/menu_viewer.c.
3194 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3196         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3197         arglist for menutitle arguments.
3199         * normal/main.c (grub_normal_menu_addentry): Likewise.
3201         * normal/parser.y (menuentry): Likewise.
3203         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3205         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3206         (grub_script_create_cmdmenu): Likewise.
3208         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3210         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3211         changes.
3213         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3215         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3217         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3219         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3221         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3223         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3225 2009-01-30  Christian Franke  <franke@computer.org>
3227         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3228         in option help text.
3230 2009-01-27  Pavel Roskin  <proski@gnu.org>
3232         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3234 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3236         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3238         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3240         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3241         unregister function.
3243 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3245         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3247         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3249         * util/grub-mkfont.c (usage): Fix typo.
3251         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3253 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3255         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3257         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3259         * kern/misc.c (grub_strcasecmp): New function.
3260         (grub_strcasecmp): Use grub_size_t instead of int for length.
3261         Fix return value.
3262         * include/grub/misc.h: Update function prototypes.
3264 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3266         * configure.ac: Fix cross-compilation check.
3268 2009-01-22  Christian Franke  <franke@computer.org>
3270         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3271         (precision) digit string.  Allow `.format2' without `format1' (width).
3272         Limit input chars for `%s' output to `format2' if specified.  This is
3273         compatible with standard printf ().
3275 2009-01-22  Christian Franke  <franke@computer.org>
3277         * disk/ata.c (grub_ata_wait_status): Replace by ...
3278         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3279         other status bits may be invalid while BSY is asserted.
3280         (grub_ata_check_ready): New function.
3281         (grub_ata_cmd): Removed.
3282         (grub_ata_wait_drq): New function.
3283         (grub_ata_strncpy): Remove inline.
3284         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3285         and error check now done by grub_ata_wait_drq ().
3286         (grub_ata_pio_write): Likewise.
3287         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3288         grub_ata_wait_drq () to wait for data.
3289         (grub_ata_device_initialize): Add status register check to
3290         detect missing SATA slave devices.  Add debug messages.
3291         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3292         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3293         transfer loop by grub_ata_pio_write ().
3294         (grub_ata_identify): Set DEV before check for !BSY. Use
3295         grub_ata_wait_drq () to wait for data.
3296         (grub_ata_setaddress): Set DEV before check for !BSY.
3297         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3298         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3299         command on (size % batch) == 0.  Add missing error check after write of
3300         last block.  Add debug messages.
3301         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3303 2009-01-19  Christian Franke  <franke@computer.org>
3305         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3306         (GRUB_ATAPI_IREASON_*): Likewise.
3307         (grub_ata_pio_write): Fix timeout error return.
3308         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3309         (grub_atapi_wait_drq): New function.
3310         (grub_atapi_packet): New parameter `size'.
3311         Use grub_atapi_wait_drq () and direct write instead of
3312         grub_ata_pio_write ().
3313         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3314         reads the number of bytes requested by the device for each DRQ
3315         assertion.
3316         (grub_atapi_write): Remove old implementation, return not
3317         implemented instead.
3319 2009-01-19  Christian Franke  <franke@computer.org>
3321         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3322         of 512 to calculate data size.
3323         (grub_scsi_read12): Likewise.
3324         (grub_scsi_write10): Likewise.
3325         (grub_scsi_write12): Likewise.
3326         (grub_scsi_read): Adjust size according to blocksize.
3327         Add checks for invalid blocksize and unaligned transfer.
3329 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3331         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3333         * term/gfxterm.c (write_char): Fix background rendering for wide
3334         width glyphs.
3336 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3338         * config.guess: Update to latest version from config git.
3339         * config.sub: Likewise.
3341 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3343         * Makefile.in: Change font compilation to use new grub-mkfont instead
3344         of java version.
3346         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3347         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3348         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3349         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3350         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3351         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3352         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3353         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3354         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3356 2009-01-16  Christian Franke  <franke@computer.org>
3358         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3359         (enum grub_ata_timeout_milliseconds): New enum.
3360         (grub_ata_wait_status): Add parameter milliseconds.
3361         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3362         recovery from timed-out commands.
3363         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3364         return grub_errno instead of REG_ERROR.
3365         (grub_ata_pio_write): Add parameter milliseconds.
3366         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3367         Pass milliseconds to grub_ata_wait_status () and
3368         grub_ata_pio_read ().
3369         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3370         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3371         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3372         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3373         It is not suitable for device detection, because DEV bit is ignored,
3374         the command may run too long, and not all devices set the signature
3375         properly.
3376         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3377         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3378         Fix device selection, DEV bit must be set first to address the registers
3379         of the correct device.
3380         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3381         grub_ata_pio_read/write ().
3382         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3383         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3385 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3387         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3389 2009-01-13  Bean  <bean123ch@gmail.com>
3391         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3393 2009-01-13  Bean  <bean123ch@gmail.com>
3395         * Makefile.in: (enable_grub_mkfont): New variable.
3396         (freetype_cflags): Likewise.
3397         (freetype_libs): Likewise.
3399         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3400         (grub_mkfont_SOURCES): New variable.
3401         (grub_mkfont_CFLAGS): Likewise.
3402         (grub_mkfont_LDFLAGS): Likewise.
3404         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3405         library if `--enable-grub-mkfont' is requested.
3406         (enable_grub_mkfont): New variable.
3407         (freetype_cflags): Likewise.
3408         (freetype_libs): Likewise.
3410         * util/grub-mkfont.c: New file.
3412 2009-01-12  Christian Franke  <franke@computer.org>
3414         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3415         mode check.  Fix setting of compat_use[].
3417 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3419         Update a few copyright years which we forgot to do in 2008 (only for
3420         files whose changes made in 2008 were copyright-significant)
3422         * Makefile.in: Add 2008 to Copyright line.
3423         * disk/ieee1275/ofdisk.c: Likewise.
3424         * disk/efi/efidisk.c: Likewise.
3425         * kern/dl.c: Likewise.
3426         * kern/sparc64/ieee1275/init.c: Likewise.
3427         * kern/mm.c: Likewise.
3428         * kern/efi/mm.c: Likewise.
3429         * boot/i386/pc/boot.S: Likewise.
3430         * genfslist.sh: Likewise.
3431         * fs/iso9660.c: Likewise.
3432         * fs/hfs.c: Likewise.
3433         * fs/jfs.c: Likewise.
3434         * fs/minix.c: Likewise.
3435         * fs/ufs.c: Likewise.
3436         * gensymlist.sh.in: Likewise.
3437         * genkernsyms.sh.in: Likewise.
3438         * include/grub/misc.h: Likewise.
3439         * include/grub/types.h: Likewise.
3440         * include/grub/symbol.h: Likewise.
3441         * include/grub/elf.h: Likewise.
3442         * include/grub/kernel.h: Likewise.
3443         * include/grub/disk.h: Likewise.
3444         * include/grub/dl.h: Likewise.
3445         * include/grub/i386/linux.h: Likewise.
3446         * include/grub/i386/pc/biosdisk.h: Likewise.
3447         * include/grub/efi/api.h: Likewise.
3448         * include/grub/efi/pe32.h: Likewise.
3449         * include/grub/util/misc.h: Likewise.
3450         * normal/execute.c: Likewise.
3451         * normal/arg.c: Likewise.
3452         * normal/completion.c: Likewise.
3453         * normal/lexer.c: Likewise.
3454         * normal/parser.y: Likewise.
3455         * normal/misc.c: Likewise.
3456         * commands/i386/pc/vbeinfo.c: Likewise.
3457         * commands/hexdump.c: Likewise.
3458         * commands/terminal.c: Likewise.
3459         * commands/ls.c: Likewise.
3460         * commands/help.c: Likewise.
3461         * partmap/pc.c: Likewise.
3462         * loader/efi/chainloader.c: Likewise.
3463         * loader/multiboot_loader.c: Likewise.
3464         * loader/i386/pc/multiboot2.c: Likewise.
3465         * term/efi/console.c: Likewise.
3466         * term/i386/pc/serial.c: Likewise.
3467         * util/lvm.c: Likewise.
3468         * util/console.c: Likewise.
3469         * util/i386/efi/grub-mkimage.c: Likewise.
3470         * util/raid.c: Likewise.
3472 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3474         * commands/videotest.c: Removed include to grub/machine/memory.h.
3476         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3477         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3478         (video_mod_SOURCES): Removed.
3479         (video_mod_CFLAGS): Likewise.
3480         (video_mod_LDFLAGS): Likewise.
3481         (gfxterm_mod_SOURCES): Likewise.
3482         (gfxterm_mod_CFLAGS): Likewise.
3483         (gfxterm_mod_LDFLAGS): Likewise.
3484         (videotest_mod_SOURCES): Likewise.
3485         (videotest_mod_CFLAGS): Likewise.
3486         (videotest_mod_LDFLAGS): Likewise.
3487         (bitmap_mod_SOURCES): Likewise.
3488         (bitmap_mod_CFLAGS): Likewise.
3489         (bitmap_mod_LDFLAGS): Likewise.
3490         (tga_mod_SOURCES): Likewise.
3491         (tga_mod_CFLAGS): Likewise.
3492         (tga_mod_LDFLAGS): Likewise.
3493         (jpeg_mod_SOURCES): Likewise.
3494         (jpeg_mod_CFLAGS): Likewise.
3495         (jpeg_mod_LDFLAGS): Likewise.
3496         (png_mod_SOURCES): Likewise.
3497         (png_mod_CFLAGS): Likewise.
3498         (png_mod_LDFLAGS): Likewise.
3500         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3501         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3502         (video_mod_SOURCES): Added.
3503         (video_mod_CFLAGS): Likewise.
3504         (video_mod_LDFLAGS): Likewise.
3505         (videotest_mod_SOURCES): Likewise.
3506         (videotest_mod_CFLAGS): Likewise.
3507         (videotest_mod_LDFLAGS): Likewise.
3508         (bitmap_mod_SOURCES): Likewise.
3509         (bitmap_mod_CFLAGS): Likewise.
3510         (bitmap_mod_LDFLAGS): Likewise.
3511         (tga_mod_SOURCES): Likewise.
3512         (tga_mod_CFLAGS): Likewise.
3513         (tga_mod_LDFLAGS): Likewise.
3514         (jpeg_mod_SOURCES): Likewise.
3515         (jpeg_mod_CFLAGS): Likewise.
3516         (jpeg_mod_LDFLAGS): Likewise.
3517         (png_mod_SOURCES): Likewise.
3518         (png_mod_CFLAGS): Likewise.
3519         (png_mod_LDFLAGS): Likewise.
3520         (gfxterm_mod_SOURCES): Likewise.
3521         (gfxterm_mod_CFLAGS): Likewise.
3522         (gfxterm_mod_LDFLAGS): Likewise.
3524         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3525         grub/machine/console.h.
3527 2009-01-04  Jerone Young  <jerone@gmail.com>
3529         Make on screen instructions clearer
3531         Based on patch created by Jidanni <jidanni@jidanni.org>
3533         * normal/menu.c: print clearer instructions on the screen
3535 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3537         New font engine.
3539         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3540         build system and fixed gfxterm.c to work with different sized fonts.
3542         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3544         * configure: Re-generated.
3546         * DISTLIST: Removed font/manager.c.
3547         Added font/font.c.
3548         Added font/font_cmd.c.
3550         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3551         compilation.
3553         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3555         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3557         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3559         * normal/menu.c: Likewise.
3561         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3562         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3564         * include/grub/font.h: Replaced with new file.
3566         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3567         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3568         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3569         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3570         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3571         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3572         fg_red, fg_green, fg_blue, fg_alpha.
3573         (grub_video_adapter): Removed blit_glyph.
3574         (grub_video_blit_glyph): Removed.
3576         * font/manager.c: Removed file.
3578         * font/font.c: New file.
3580         * font/font_cmd.c: Likewise.
3582         * video/video.c (grub_video_blit_glyph): Removed.
3584         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3585         (grub_video_vbe_map_rgba): Likewise.
3586         (grub_video_vbe_unmap_color_int): Likewise.
3587         (grub_video_vbe_blit_glyph): Removed.
3588         (grub_video_vbe_adapter): Removed blit_glyph.
3590         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3591         (get_pixel): Likewise.
3592         (set_pixel): Likewise.
3594         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3596         * term/gfxterm.c: Adapted to new font engine.
3598         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3600         * term/i386/pc/vga.c: Likewise.
3602         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3604         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3606         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3608         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3610         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3612         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3614         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3616         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3618         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3620         * util/grub.d/00_header.in: Changed to use new loadfont command.
3622         * util/grub-mkconfig_lib.in: Changed font extension.
3624 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3626         * util/getroot.c (grub_util_get_grub_dev): Add support for
3627         /dev/md/dNNpNN style partitionable mdraid devices.
3629 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3631         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3632         at a time limit of the PXE TFTP API correctly.
3633         (grub_pxefs_close): Likewise.
3635 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3637         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3638         grub_ata_device_initialize() calls.
3640 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3642         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3643         iteration failed.
3644         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3646 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3648         Fix build on powerpc-ieee1275.  Based on patch created by
3649         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3650         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3651         `kern/ieee1275/mmap.c'.
3652         * include/grub/powerpc/ieee1275/memory.h: New file.
3654         Provide grub-install on coreboot.
3655         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3656         (grub_install_SOURCES): New variable.
3657         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3658         usable on coreboot.
3660 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3662         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3663         to `grub_term_input_t'.
3664         (grub_term_get_current_output): Change return type to
3665         `grub_term_output_t'.
3667 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3669         Fix breakage on coreboot due to declaration mismatch.
3670         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3671         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3672         grub_vga_text_cls().
3674         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3675         comments.  Avoid copying one more byte than necessary (just in case).
3677         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3678         to 0x200000 (avoids trouble with some OFW implementations, and matches
3679         with the one in Yaboot).
3680         Reported by Manoel Abranches
3682 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3684         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3685         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3687         * util/grub-mkconfig_lib.in (grub_warn): New function.
3688         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3689         warnings, to obtain consistent formatting.
3690         * util/grub.d/00_header.in: Likewise.
3691         * util/update-grub_lib.in: Likewise.
3693         * loader/i386/linux.c (allocate_pages): Fix a warning.
3694         Move comment text to `#error' stanza.
3696         Harmonize ieee1275's grub_available_iterate() with the generic
3697         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3698         build problem on i386-ieee1275):
3699         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3700         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3701         parameter `type'.  Update all users of this function.
3702         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3703         `kern/ieee1275/mmap.c'.
3704         * kern/ieee1275/init.c
3705         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3706         with ...
3707         (grub_machine_mmap_iterate): ... this.
3708         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3709         return type to `grub_err_t'.  Update all implementations of this
3710         function prototype.
3711         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3712         Likewise.
3714         Add `lsmmap' command (lists firmware-provided memory map):
3715         * commands/lsmmap.c: New file.
3716         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3717         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3718         variables.
3719         * conf/powerpc-ieee1275.rmk: Likewise.
3720         * conf/i386-coreboot.rmk: Likewise.
3721         * conf/i386-ieee1275.rmk: Likewise.
3723 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3725         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3726         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3727         constraints to initrd allocation (based on code from
3728         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3729         for Linux to find it.
3731 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3733         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3734         order to cope with duplicate slashes.
3736 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3738         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3739         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3740         don't want to mess with lower memory, because it is used in the Linux
3741         loader.
3743         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3744         an appropriate place in lower memory, between 0x10000 and 0x90000,
3745         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3746         is in our heap (probably as a result of it being corrupted during
3747         decompression).  Add #error instance with comment to explain why this
3748         loader isn't currently usable on PC/BIOS.
3750 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3752         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3753         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3755 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3757         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3759         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3760         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3761         from here ...
3762         * include/grub/i386/pc/memory.h: ... to here.
3764 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3766         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3767         split).
3769         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3770         (grub_console_cur_color, grub_console_real_putchar)
3771         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3772         (grub_console_setcolorstate, grub_console_setcolor)
3773         (grub_console_getcolor): Move from here ...
3774         * include/grub/i386/vga_common.h: ... to here (new file).
3776         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3777         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3778         `<grub/i386/io.h>'.
3779         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3780         `<grub/i386/vga_common.h>'.
3782 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3784         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3785         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3786         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3787         variables.
3788         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3789         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3791         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3792         grub_console_init() with call to grub_vga_text_init().
3793         (grub_machine_fini): Replace call to
3794         grub_console_fini() with call to grub_vga_text_fini() and
3795         grub_at_keyboard_fini().
3797         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3798         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3799         (grub_console_setcolorstate, grub_console_setcolor)
3800         (grub_console_getcolor): New function prototypes.
3802         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3803         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3804         (grub_vga_text_setcursor): Static-ize.
3805         (grub_vga_text_term): New structure.
3806         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3808         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3809         (grub_console_cur_color, grub_console_standard_color)
3810         (grub_console_normal_color, grub_console_highlight_color)
3811         (map_char, grub_console_putchar, grub_console_getcharwidth)
3812         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3813         (grub_console_getcolor): Move from here ...
3814         * term/i386/vga_common.c: ... to here (same function names).
3816 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3818         Use newly-added Multiboot support in coreboot.
3820         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3821         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3823         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3824         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3825         (codestart): Store the MBI in `startup_multiboot_info' when we're
3826         being loaded using Multiboot.
3828         * kern/i386/coreboot/init.c (grub_machine_init): Move
3829         grub_at_keyboard_init() call to beginning of function (useful for
3830         debugging).  Call grub_machine_mmap_init() before attempting to use
3831         grub_machine_mmap_iterate().
3832         (grub_lower_mem, grub_upper_mem): Move from here ...
3833         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3834         here (new file).
3836         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3837         function prototype.
3839 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3841         Fix a regression introduced by the at_keyboard.mod split.  Because
3842         some terminals are default on some platforms and non-default on
3843         others, the first terminal being registered determines which is
3844         going to be default.
3846         * kern/term.c (grub_term_register_input): If this is the first
3847         terminal being registered, set it as the current one.
3848         (grub_term_register_output): Likewise.
3850         * term/efi/console.c (grub_console_init): Do not call
3851         grub_term_set_current_output() or grub_term_set_current_input().
3852         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3853         * term/i386/pc/console.c (grub_console_init): Likewise.
3854         (grub_console_fini): Do not call grub_term_set_current_input()
3855         (but leave grub_term_set_current_output() to restore text mode).
3857 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3859         * util/grub.d/00_header.in: Add backward compatibility check for
3860         versions of terminal.mod that don't understand `terminal_input' or
3861         `terminal_output'.
3863 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3865         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3866         `terminal_input' / `terminal_output', not `terminal'.
3868 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3870         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3871         (DISTCLEANFILES): Add `build_env.mk'.
3873 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3875         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3876         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3877         members.  Update all users.
3878         * util/console.c (grub_ncurses_term): Split in ...
3879         (grub_ncurses_term_input): ... this, and ...
3880         (grub_ncurses_term_output): ... this.  Update all users.
3881         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3883 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3885         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3886         (PKGDATA): Add $(pkgdata_SRCDIR).
3887         (pkglib_BUILDDIR): New variable.
3888         (pkgdata_SRCDIR): New variable.
3889         (build_env.mk): New target.
3890         (include_DATA): New variable.
3891         (install-local): Install $(include_DATA) files in $(includedir).
3893 2008-11-07  Pavel Roskin  <proski@gnu.org>
3895         * gendistlist.sh: Use C locale for sorting to ensure consistent
3896         output on all systems.
3898         * util/grub.d/00_header.in: Remove incorrect space before
3899         "serial".
3901 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3903         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3904         per specification.
3905         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3906         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3907         (based on find_multi_boot1_header).
3908         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3909         using find_multi_boot2_header(), and abort if neither Multiboot or
3910         Multiboot headers were found.
3912 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3914         Modularize at_keyboard.mod:
3916         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3917         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3918         (at_keyboard_mod_LDFLAGS): New variables.
3920         Actual terminal split:
3922         * include/grub/term.h (struct grub_term): Split in ...
3923         (struct grub_term_input): ... this, and ...
3924         (struct grub_term_output): ... this.  Update all users.
3925         (grub_term_set_current): Split in ...
3926         (grub_term_set_current_input): ... this, and ...
3927         (grub_term_set_current_output): ... this.
3928         (grub_term_get_current): Split in ...
3929         (grub_term_get_current_input): ... this, and ...
3930         (grub_term_get_current_output): ... this.
3931         (grub_term_register): Split in ...
3932         (grub_term_register_input): ... this, and ...
3933         (grub_term_register_output): ... this.
3934         (grub_term_unregister): Split in ...
3935         (grub_term_unregister_input): ... this, and ...
3936         (grub_term_unregister_output): ... this.
3937         (grub_term_iterate): Split in ...
3938         (grub_term_iterate_input): ... this, and ...
3939         (grub_term_iterate_output): ... this.
3941         * kern/term.c (grub_term_list): Split in ...
3942         (grub_term_list_input): ... this, and ...
3943         (grub_term_list_output): ... this.  Update all users.
3944         (grub_cur_term): Split in ...
3945         (grub_cur_term_input): ... this, and ...
3946         (grub_cur_term_output): ... this.  Update all users.
3947         (grub_term_set_current): Split in ...
3948         (grub_term_set_current_input): ... this, and ...
3949         (grub_term_set_current_output): ... this.
3950         (grub_term_get_current): Split in ...
3951         (grub_term_get_current_input): ... this, and ...
3952         (grub_term_get_current_output): ... this.
3953         (grub_term_register): Split in ...
3954         (grub_term_register_input): ... this, and ...
3955         (grub_term_register_output): ... this.
3956         (grub_term_unregister): Split in ...
3957         (grub_term_unregister_input): ... this, and ...
3958         (grub_term_unregister_output): ... this.
3959         (grub_term_iterate): Split in ...
3960         (grub_term_iterate_input): ... this, and ...
3961         (grub_term_iterate_output): ... this.
3963         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3964         a check for input and one for output (and only attempt to get keys
3965         from user when input works).
3967         * util/grub-probe.c (grub_term_get_current): Split in ...
3968         (grub_term_get_current_input): ... this, and ...
3969         (grub_term_get_current_output): ... this.
3970         * util/grub-fstest.c: Likewise.
3971         * util/i386/pc/grub-setup.c: Likewise.
3972         * util/grub-editenv.c: Likewise.
3974         Portability adjustments:
3976         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3977         `term/i386/pc/at_keyboard.c'.
3978         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3979         grub_keyboard_controller_init() (now handled by terminal .init).
3980         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3981         grub_at_keyboard_init().
3982         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3983         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3984         at_keyboard.mod via input terminal interface).
3985         * include/grub/i386/coreboot/console.h: Convert into a stub for
3986         `<grub/i386/pc/console.h>'.
3988         Migrate full terminals to new API:
3990         * term/efi/console.c (grub_console_term): Split into ...
3991         (grub_console_term_input): ... this, and ...
3992         (grub_console_term_output): ... this.  Update all users.
3993         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3994         (grub_ofconsole_init): Split into ...
3995         (grub_ofconsole_init_input): ... this, and ...
3996         (grub_ofconsole_init_output): ... this.
3997         (grub_ofconsole_term): Split into ...
3998         (grub_ofconsole_term_input): ... this, and ...
3999         (grub_ofconsole_term_output): ... this.  Update all users.
4000         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4001         (grub_serial_term_input): ... this, and ...
4002         (grub_serial_term_output): ... this.  Update all users.
4003         * term/i386/pc/console.c (grub_console_term): Split into ...
4004         (grub_console_term_input): ... this, and ...
4005         (grub_console_term_output): ... this.  Update all users.
4006         (grub_console_term_input): Only enable it on PC/BIOS platform.
4007         (grub_console_init): Remove grub_keyboard_controller_init() call.
4009         Migrate input terminals to new API:
4011         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4012         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4013         i386-specific anyway).
4014         (grub_console_checkkey): Rename to ...
4015         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4016         users.
4017         (grub_keyboard_controller_orig): New variable.
4018         (grub_console_getkey): Rename to ...
4019         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4020         users.
4021         (grub_keyboard_controller_init): Static-ize.  Save original
4022         controller value so that it can be restored ...
4023         (grub_keyboard_controller_fini): ... here (new function).
4024         (grub_at_keyboard_term): New structure.
4025         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4026         functions.
4028         Migrate output terminals to new API:
4030         * term/i386/pc/vga.c (grub_vga_term): Change type to
4031         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4032         members.  Update all users.
4033         * term/gfxterm.c (grub_video_term): Change type to
4034         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4035         members.  Update all users.
4036         * include/grub/i386/pc/console.h (grub_console_checkkey)
4037         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4038         etc).
4040         Migrate `terminal' command and userland tools to new API:
4042         * commands/terminal.c (grub_cmd_terminal): Split into ...
4043         (grub_cmd_terminal_input): ... this, and ...
4044         (grub_cmd_terminal_output): ... this.
4045         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4046         `terminal_input' and `terminal_output'.
4047         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4048         `terminal_input' / `terminal_output' API.
4049         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4050         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4051         provided ${GRUB_TERMINAL}, convert it).
4053 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4055         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4056         for FreeBSD.
4057         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4059 2008-11-03  Bean  <bean123ch@gmail.com>
4061         * kern/elf.c (grub_elf32_load): Revert to previous code.
4062         (grub_elf64_load): Likewise.
4064         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4066 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4068         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4069         (TARGET_CPPFLAGS): Likewise.
4070         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4072 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4074         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4076 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4078         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4079         addition of objects until the code is not going to be able to fail.
4081 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4083         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4084         (add a missing NULL check, and correct them by moving the pointer
4085         operations after the actual check).
4087 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4089         * util/i386/pc/grub-install.in: Handle empty string as output from
4090         make_system_path_relative_to_its_root().
4092 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4094         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4095         circular metadata worst case scenario. If the metadata is circular
4096         then copy the wrap in place.
4097         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4098         project lib/format_text/layout.h
4099         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4101 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4103         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4105 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4107         * util/update-grub_lib.in: Mention filename in warning message.
4109 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4111         * NEWS: Update for rename of update-grub to grub-mkconfig.
4113 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4115         * util/update-grub_lib.in: Copy to ...
4116         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4117         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4118         * util/update-grub.in: Rename to ...
4119         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4120         option. Add `--output' option to allow users to specify the generated
4121         configuration file.  Default to stdout.
4122         (update_grub_dir): Rename to ...
4123         (grub_mkconfig_dir): ... this.
4124         (grub_cfg): Default to an empty string.
4125         * conf/common.rmk (update-grub): Rename to ...
4126         (grub-mkconfig): ... this.
4127         (update-grub_lib): Copy to ...
4128         (grub-mkconfig_lib): ... this.
4129         (update-grub_SCRIPTS): Copy to ...
4130         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4131         (update-grub_DATA): Rename to ...
4132         (grub-mkconfig_DATA): ... this.
4134 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4136         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4137         to `modified'.  Add the real `created' field.
4138         (grub_iso9660_uuid): Use `modified' rather than `created' for
4139         constructing the UUID.
4141 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4143         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4144         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4146 2008-09-28  Bean  <bean123ch@gmail.com>
4148         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4149         Thanks to Christian Franke for finding this bug.
4151 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4153         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4154         instances of grub_util_get_disk_name() (see previous commit).
4156 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4158         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4159         `util/i386/get_disk_name.c'.
4160         * conf/i386-efi.rmk: Likewise.
4161         * conf/x86_64-efi.rmk: Likewise.
4162         * conf/i386-coreboot.rmk: Likewise.
4163         * conf/i386-ieee1275.rmk: Likewise.
4164         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4165         `util/ieee1275/get_disk_name.c'.
4166         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4167         * util/ieee1275/get_disk_name.c: Remove file.
4168         * util/i386/get_disk_name.c: Remove file.
4169         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4170         "hd%d" for device.map entries, rather than using
4171         grub_util_get_disk_name().
4173 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4175         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4176         warning.
4177         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4179 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4181         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4182         Changed to 0x5100.
4183         (GRUB_TERM_PPAGE): Changed to 0x4900.
4185 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4187         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4188         macros (they were i386-pc specific).
4189         * include/grub/sparc64/ieee1275/console.h: Likewise.
4190         * include/grub/efi/console.h: Likewise.
4192 2008-09-22  Bean  <bean123ch@gmail.com>
4194         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4195         resident and in attribute list.
4197         * include/grub/ntfs.h (BMP_LEN): Removed.
4199 2008-09-22  Bean  <bean123ch@gmail.com>
4201         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4202         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4204         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4205         error occurs, as grub_disk_open will call grub_disk_close, which will
4206         call p->close (scsi).
4208 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4210         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4211         (AC_PREREQ): Bumped to 2.59.
4212         (AC_TRY_COMPILE): Replace obsolete macro with ...
4213         (AC_COMPILE_IFELSE): ... this.
4214         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4215         (AC_LINK_IFELSE): ... this.
4217 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4219         * autogen.sh: Add a call to `gendistlist.sh'.
4221 2008-09-19  Christian Franke  <franke@computer.org>
4223         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4224         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4225         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4226         Export __enable_execute_stack() to modules.
4227         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4228         New function.
4230 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4232         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4233         Sort the list.
4235 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4237         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4238         #include <grub/util/hostdisk.h>.
4240 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4242         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4243         segments when their filesz is zero (grub_file_read() interprets
4244         zero-size as "read until EOF", which results in memory corruption).
4245         Use `lowest_segment' rather than 0 for calculating the current
4246         segment load address.
4248 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4250         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4251         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4252         clobbered useful information.
4254 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4256         * include/grub/util/biosdisk.h: Move to ...
4257         * include/grub/util/hostdisk.h: ... here.  Update all users.
4258         * util/biosdisk.c: Move to ...
4259         * util/hostdisk.c: ... here.  Update all users.
4261 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4263         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4264         variables.
4265         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4266         and length can be stored directly in the `mbi->mmap_addr' and
4267         `mbi->mmap_length' struct fields.
4269 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4271         * conf/i386.rmk: New file.  Provides declaration for building
4272         `cpuid.mod'.
4273         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4274         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4275         variables.
4276         Include `conf/i386.mk'.
4277         * conf/i386-efi.rmk: Likewise.
4278         * conf/x86_64-efi.rmk: Likewise.
4279         * conf/i386-coreboot.rmk: Likewise.
4280         * conf/i386-ieee1275.rmk: Likewise.
4282 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4284         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4285         Adds optimization support for BGR based modes.
4287         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4288         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4289         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4290         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4291         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4292         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4293         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4294         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4295         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4296         (grub_video_i386_vbeblit_index_index): Likewise.
4297         (grub_video_i386_vbeblit_replace_directN): Added.
4298         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4299         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4300         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4301         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4302         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4303         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4304         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4305         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4306         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4307         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4308         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4309         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4310         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4312         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4313         (grub_video_i386_vbefill_R8G8B8): Likewise.
4314         (grub_video_i386_vbefill_index): Likewise.
4315         (grub_video_i386_vbefill_direct32): Added.
4316         (grub_video_i386_vbefill_direct24): Likewise.
4317         (grub_video_i386_vbefill_direct16): Likewise.
4318         (grub_video_i386_vbefill_direct8): Likewise.
4320         * include/grub/video.h (grub_video_blit_format): Removed
4321         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4322         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4323         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4324         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4325         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4327         * video/video.c (grub_video_get_blit_format): Updated to use new
4328         blit formats.  Added handling for 16 bit color modes.
4330         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4331         fillers.
4332         (common_blitter): Updated to use new blitters.
4334         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4335         Removed.
4336         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4337         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4338         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4339         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4340         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4341         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4342         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4343         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4344         (grub_video_i386_vbeblit_index_index): Likewise.
4345         (grub_video_i386_vbeblit_replace_directN): Added.
4346         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4347         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4348         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4349         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4350         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4351         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4352         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4353         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4354         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4355         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4356         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4357         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4358         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4360         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4361         (grub_video_i386_vbefill_R8G8B8): Likewise.
4362         (grub_video_i386_vbefill_index): Likewise.
4363         (grub_video_i386_vbefill_direct32): Added.
4364         (grub_video_i386_vbefill_direct24): Likewise.
4365         (grub_video_i386_vbefill_direct16): Likewise.
4366         (grub_video_i386_vbefill_direct8): Likewise.
4368         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4369         types.
4371         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4372         types.
4374         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4375         blitter types.
4377         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4378         types.
4380 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4382         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4383         RAID level 1.
4385 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4387         * fs/iso9660.c (grub_iso9660_date): New structure.
4388         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4389         (grub_iso9660_uuid): New function.
4391 2008-09-05  Bean  <bean123ch@gmail.com>
4393         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4395         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4396         insensitive bit for names in Win32 and Win32 & DOS namespace.
4398         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4400         * include/grub/types.h (LONG_MAX): Likewise.
4402 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4404         * util/getroot.c: Include <config.h>.
4405         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4406         add support for /dev/md/N devices and handle LVM double dash escaping.
4408 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4410         * config.guess: Update to latest version from config git.
4411         * config.sub: Likewise.
4413 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4415         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4416         `disk->total_sectors'.
4418 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4420         * include/grub/normal.h: Fixed incorrect comment for
4421         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4423 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4425         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4426         values with defines.
4428         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4429         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4430         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4431         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4432         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4433         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4434         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4435         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4436         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4437         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4438         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4439         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4440         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4441         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4442         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4443         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4444         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4445         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4446         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4448 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4450         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4451         declaration.
4452         (grub_multiboot): Fix a few warnings.
4454 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4456         * loader/i386/pc/multiboot.c: Update comment not to say that
4457         boot_device support is unimplemented.
4459 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4461         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4462         or memory map support are unimplemented.
4464 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4466         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4468 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4470         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4471         total video memory in 'vbeinfo' output; show color format details for
4472         each video mode.
4474 2008-08-30  Pavel Roskin  <proski@gnu.org>
4476         * util/genmoddep.c: Remove for real this time.
4477         * DISTLIST: Remove util/genmoddep.c.
4479 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4481         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4482         as required by Multiboot spec (it was already 4-byte aligned, but
4483         only by chance).
4485 2008-08-29  Pavel Roskin  <proski@gnu.org>
4487         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4488         * kern/powerpc/ieee1275/startup.S: ... this.
4489         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4490         * DISTLIST: Likewise.
4492         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4493         grub/cpu/kernel.h.  Add start label for consistency with other
4494         platforms.  Add grub_prefix immediately after start.  Add jump
4495         to the code after grub_prefix.
4496         * include/grub/powerpc/kernel.h: Provide valid values for
4497         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4499 2008-08-29  Bean  <bean123ch@gmail.com>
4501         * configure.ac: Change host_os to cygwin for mingw.
4502         (asprintf): New check for function.
4504         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4505         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4507         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4508         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4509         sync, sleep and grub_util_get_disk_size for mingw.
4511         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4512         to get size in mingw.
4513         (open_device): Use flag O_BINARY if it's defined.
4514         (find_root_device): Add dummy code for mingw.
4516         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4517         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4518         (get_scsi_disk_name): Return 0 for mingw.
4520         * util/hostfs.c: #include <grub/util/misc.h>.
4521         (grub_hostfs_open): Use "rb" flag to open file, use
4522         grub_util_get_disk_size to get disk size for mingw.
4524         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4525         (asprintf): New function if HAVE_ASPRINTF is not set.
4526         (sync): New function for mingw.
4527         (sleep): Likewise.
4528         (grub_util_get_disk_size): Likewise.
4530 2008-08-28  Pavel Roskin  <proski@gnu.org>
4532         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4533         kern/time.c.
4535 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4537         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4539 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4541         Change find_grub_drive() syntax so it doesn't prevent it from
4542         detecting NULL names as errors.
4544         * util/biosdisk.c (find_grub_drive): Move free slot search code
4545         from here ...
4546         (find_free_slot): ... to here.
4547         (read_device_map): Use find_free_slot() to search for free slots.
4549 2008-08-27  Marco Gerards  <marco@gnu.org>
4551         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4552         (scsi_mod_SOURCES): New variable.
4553         (scsi_mod_CFLAGS): Likewise
4554         (scsi_mod_LDFLAGS): Likewise.
4556         * disk/scsi.c: New file.
4558         * include/grub/scsi.h: Likewise.
4560         * include/grub/scsicmd.h: Likewise.
4562         * disk/ata.c: Include <grub/scsi.h>.
4563         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4564         instead.
4565         (grub_ata_iterate): Skip ATAPI devices.
4566         (grub_ata_open): Only handle ATAPI devices.
4567         (struct grub_atapi_read): Removed.
4568         (grub_atapi_readsector): Likewise.
4569         (grub_ata_read): No longer handle ATAPI devices.
4570         (grub_ata_write): Likewise.
4571         (grub_atapi_iterate): New function.
4572         (grub_atapi_read): Likewise.
4573         (grub_atapi_write): Likewise.
4574         (grub_atapi_open): Likewise.
4575         (grub_atapi_close): Likewise.
4576         (grub_atapi_dev): New variable.
4577         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4578         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4580         * include/grub/disk.h (enum grub_disk_dev_id): Add
4581         `GRUB_DISK_DEVICE_SCSI_ID'.
4583 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4585         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4586         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4587         descriptive.
4589 2008-08-23  Bean  <bean123ch@gmail.com>
4591         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4592         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4593         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4594         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4595         dm_nv.mod.
4596         (raid5rec_mod_SOURCES): New macro.
4597         (raid5rec_mod_CFLAGS): Likewise.
4598         (raid5rec_mod_LDFLAGS): Likewise.
4599         (raid6rec_mod_SOURCES): Likewise.
4600         (raid6rec_mod_CFLAGS): Likewise.
4601         (raid6rec_mod_LDFLAGS): Likewise.
4602         (mdraid_mod_SOURCES): Likewise.
4603         (mdraid_mod_CFLAGS): Likewise.
4604         (mdraid_mod_LDFLAGS): Likewise.
4605         (dm_nv_mod_SOURCES): Likewise.
4606         (dm_nv_mod_CFLAGS): Likewise.
4607         (dm_nv_mod_LDFLAGS): Likewise.
4609         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4610         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4611         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4613         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4614         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4616         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4618         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4620         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4622         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4624         * disk/raid5_recover.c: New file.
4626         * disk/raid6_recover.c: Likewise.
4628         * disk/mdraid_linux.c: Likewise.
4630         * disk/dmraid_nvidia.c: Likewise.
4632         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4633         ULONG_MAX.
4635         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4636         calculate the size of raid device.
4637         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4638         different layout of raid5.
4639         (grub_raid_scan_device): Remove code specific to mdraid.
4640         (grub_raid_list): New variable.
4641         (free_array): New function.
4642         (grub_raid_register): Likewise.
4643         (grub_raid_unregister): Likewise.
4644         (grub_raid_rescan): Likewise.
4645         (GRUB_MOD_INIT): Don't iterate device here.
4646         (GRUB_MOD_FINI): Use free_array to release resource.
4648         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4649         (grub_raid5_recover_func_t): New function variable type.
4650         (grub_raid6_recover_func_t): Likewise.
4651         (grub_raid5_recover_func): New variable.
4652         (grub_raid6_recover_func): Likewise.
4653         (grub_raid_register): New function.
4654         (grub_raid_unregister): Likewise.
4655         (grub_raid_rescan): Likewise.
4656         (grub_raid_block_xor): Likewise.
4658         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4659         (CMD_CRC): New macro.
4660         (part): Removed.
4661         (read_file): Handle device as well as file.
4662         (cmd_crc): New function.
4663         (fstest): Handle multiple disks.
4664         (options): Remove part, raw and long, add root and diskcount.
4665         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4666         (main): Find the first non option entry and ignore subsequent options,
4667         add handling for the new options, support multiple disks.
4669         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4671 2008-08-23  Bean  <bean123ch@gmail.com>
4673         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4675         * genfslist.sh: Ignore kernel.mod.
4677         * genpartmaplist.sh: Likewise.
4679 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4681         * util/getroot.c (find_root_device): Skip anything that starts with
4682         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4684 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4686         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4687         * util/grub.d/00_header.in: Allow the administrator to change default
4688         gfxmode via ${GRUB_GFXMODE}.
4690 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4692         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4694 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4696         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4697         loader.
4698         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4699         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4701 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4703         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4704         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4706 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4708         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4709         (struct grub_virtual_screen): Remove `cursor_color'.
4710         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4711         initialization.
4712         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4714 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4716         Unify (identical) linux_normal.c files.
4717         * loader/i386/efi/linux_normal.c: Move from here ...
4718         * loader/linux_normal.c: ... to here.  Update all users.
4719         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4720         * loader/i386/ieee1275/linux_normal.c: Likewise.
4722 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4724         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4725         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4726         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4727         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4728         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4729         New macros.
4730         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4731         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4732         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4733         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4734         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4735         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4736         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4737         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4738         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4739         portably using grub_getxy().
4740         Replace `-EFI' with `-bzImage' in boot message.
4742 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4744         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4746 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4748         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4750         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4751         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4752         (grub_machine_mmap_iterate): New function declaration.
4753         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4754         structure.
4755         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4756         macros.
4758         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4759         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4760         Move e820 parsing from here ...
4761         * kern/i386/pc/mmap.c: New file.
4762         (grub_machine_mmap_iterate): ... to here.
4764         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4765         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4766         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4767         (grub_available_iterate): Redeclare to return `void', and redeclare
4768         its hook to use grub_uint64_t as addr and size parameters, and rename
4769         to ...
4770         (grub_machine_mmap_iterate): ... this.  Update all users.
4772         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4773         to make it more readable.  Rename to ...
4774         (grub_machine_mmap_iterate): ... this.
4776         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4777         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4778         (grub_multiboot): Allocate an extra region after the payload, and fill
4779         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4780         with the extra space.
4781         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4782         with the extra space.
4784 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4786         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4788 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4790         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4791         mdate-sh to the list `find' searches for.
4792         * DISTLIST: Regenerated.
4794 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4796         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4797         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4798         genmoddep.awk, gensymlist.sh.in.
4799         (DISTDIRS): Add bus, docs, hook, lib.
4800         * DISTLIST: Regenerated.
4801         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4803 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4805         * disk/raid.c (grub_raid_init): Handle/report errors set by
4806         grub_device_iterate().
4807         * disk/lvm.c (grub_lvm_init): Likewise.
4809 2008-08-15  Bean  <bean123ch@gmail.com>
4811         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4812         and datehook.mod.
4813         (datetime_mod_SOURCES): New macro.
4814         (datetime_mod_CFLAGS): Likewise.
4815         (datetime_mod_LDFLAGS): Likewise.
4816         (date_mod_SOURCES): Likewise.
4817         (date_mod_CFLAGS): Likewise.
4818         (date_mod_LDFLAGS): Likewise.
4819         (datehook_mod_SOURCES): Likewise.
4820         (datehook_mod_CFLAGS): Likewise.
4821         (datehook_mod_LDFLAGS): Likewise.
4823         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4824         and datehook.mod.
4825         (datetime_mod_SOURCES): New macro.
4826         (datetime_mod_CFLAGS): Likewise.
4827         (datetime_mod_LDFLAGS): Likewise.
4828         (date_mod_SOURCES): Likewise.
4829         (date_mod_CFLAGS): Likewise.
4830         (date_mod_LDFLAGS): Likewise.
4831         (datehook_mod_SOURCES): Likewise.
4832         (datehook_mod_CFLAGS): Likewise.
4833         (datehook_mod_LDFLAGS): Likewise.
4835         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4836         and datehook.mod.
4837         (datetime_mod_SOURCES): New macro.
4838         (datetime_mod_CFLAGS): Likewise.
4839         (datetime_mod_LDFLAGS): Likewise.
4840         (date_mod_SOURCES): Likewise.
4841         (date_mod_CFLAGS): Likewise.
4842         (date_mod_LDFLAGS): Likewise.
4843         (datehook_mod_SOURCES): Likewise.
4844         (datehook_mod_CFLAGS): Likewise.
4845         (datehook_mod_LDFLAGS): Likewise.
4847         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4848         and datehook.mod.
4849         (datetime_mod_SOURCES): New macro.
4850         (datetime_mod_CFLAGS): Likewise.
4851         (datetime_mod_LDFLAGS): Likewise.
4852         (date_mod_SOURCES): Likewise.
4853         (date_mod_CFLAGS): Likewise.
4854         (date_mod_LDFLAGS): Likewise.
4855         (datehook_mod_SOURCES): Likewise.
4856         (datehook_mod_CFLAGS): Likewise.
4857         (datehook_mod_LDFLAGS): Likewise.
4859         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4860         and datehook.mod.
4861         (datetime_mod_SOURCES): New macro.
4862         (datetime_mod_CFLAGS): Likewise.
4863         (datetime_mod_LDFLAGS): Likewise.
4864         (date_mod_SOURCES): Likewise.
4865         (date_mod_CFLAGS): Likewise.
4866         (date_mod_LDFLAGS): Likewise.
4867         (datehook_mod_SOURCES): Likewise.
4868         (datehook_mod_CFLAGS): Likewise.
4869         (datehook_mod_LDFLAGS): Likewise.
4871         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4873         * commands/date.c: New file.
4875         * hook/datehook.c: Likewise.
4877         * include/grub/lib/datetime.h: Likewise.
4879         * include/grub/i386/cmos.h: Likewise.
4881         * lib/datetime.c: Likewise.
4883         * lib/i386/datetime.c: Likewise.
4885         * lib/efi/datetime.c: Likewise.
4887 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4889         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4890         (grub_mkelfimage_SOURCES): New variable.
4891         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4893         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4894         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4895         * conf/powerpc-ieee1275.rmk: Likewise.
4896         * conf/i386-ieee1275.rmk: Likewise.
4898         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4899         * kern/i386/coreboot/init.c: Likewise.
4901         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4902         with `<grub/cpu/kernel.h>'.
4903         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4904         to ...
4905         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4906         * kern/i386/coreboot/startup.S: Likewise.
4908         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4909         (GRUB_MOD_GAP): Remove.
4910         * include/grub/powerpc/kernel.h: New file.
4911         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4912         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4913         * include/grub/i386/kernel.h: New file.
4914         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4915         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4916         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4918         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4919         `grub-mkelfimage'.
4920         Use --directory when invoking grub_mkimage.
4922         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4923         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4924         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4925         and GRUB_KERNEL_CPU_PREFIX.
4927 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4929         * include/grub/err.h (grub_err_printf): New function prototype.
4930         * util/misc.c (grub_err_printf): New function.
4931         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4932         grub_printf.
4933         * kern/err.c (grub_print_error): Use grub_err_printf.
4935 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4937         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4939 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4941         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4942         boot entry.
4944 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4946         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4947         of the relocation code from here ...
4948         (grub_multiboot): ... to here.
4949         (forward_relocator, backward_relocator): Move from here ...
4950         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4951         (grub_multiboot_backward_relocator): ... to here.
4952         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4953         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4954         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4955         (grub_multiboot_forward_relocator_end)
4956         (grub_multiboot_backward_relocator)
4957         (grub_multiboot_backward_relocator_end): New variables.
4959 2008-08-12  Bean  <bean123ch@gmail.com>
4961         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4963 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4965         * kern/i386/linuxbios/startup.S: Move from here ...
4966         * kern/i386/coreboot/startup.S: ... to here.
4968         * kern/i386/linuxbios/init.c: Move from here ...
4969         * kern/i386/coreboot/init.c: ... to here.
4971         * kern/i386/linuxbios/table.c: Move from here ...
4972         * kern/i386/coreboot/mmap.c: ... to here.
4974         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4976 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4978         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4979         errors.  Leave it to the upper layer to handle them.
4981 2008-08-09  Christian Franke  <franke@computer.org>
4983         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4984         * conf/common.rmk: Install `grub-pe2elf' only if requested.
4985         Install `grub.d/10_windows' only on Cygwin.
4986         * configure.ac: Add subst of `target_os'.
4987         Check `target_os' also before setting TARGET_OBJ2ELF.
4988         Add `--enable-grub-pe2elf'.
4990 2008-08-08  Robert Millan  <rmh@aybabtu.com>
4992         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4993         (grub_last_time): Change type to grub_uint64_t.
4994         (grub_disk_open): Migrate code from to using grub_get_time_ms().
4995         (grub_disk_close): Likewise.
4997         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4998         (run_menu): Migrate code from to using grub_get_time_ms().
5000         * util/misc.c (grub_get_time_ms): New function.
5002 2008-08-08  Marco Gerards  <marco@gnu.org>
5004         * disk/ata.c (grub_ata_regget): Change return type to
5005         `grub_uint8_t'.
5006         (grub_ata_regget2): Likewise.
5007         (grub_ata_wait_status): New function.
5008         (grub_ata_wait_busy): Removed function, updated all users to use
5009         `grub_ata_wait_status'.
5010         (grub_ata_wait_drq): Likewise.
5011         (grub_ata_cmd): New function.
5012         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5013         error handling.
5014         (grub_ata_pio_write): Add error handling.
5015         (grub_atapi_identify): Likewise.
5016         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5017         handling.
5018         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5019         handling.  Actually use the detected registers.  Reorder the
5020         detection logic such that it is easier to read.
5021         (grub_ata_pciinit): Do not assign the same ID to each controller.
5022         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5023         handling.
5024         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5026         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5028 2008-08-08  Marco Gerards  <marco@gnu.org>
5030         * NEWS: Update.
5032 2008-08-07  Bean  <bean123ch@gmail.com>
5034         * include/grub/x86_64/pci.h: New file.
5036 2008-08-07  Christian Franke  <franke@computer.org>
5038         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5039         (TIMER2_GATE): Likewise.
5040         (grub_pit_wait): Add enable/disable of the timer2 gate
5041         bit of port 0x61.  This fixes a possible infinite loop.
5043 2008-08-07  Bean  <bean123ch@gmail.com>
5045         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5046         kern/i386/tsc.c and kern/i386/pit.c.
5048         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5049         x86_64 platform.
5051         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5052         <grub/i386/tsc.h>.
5054         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5056 2008-08-07  Bean  <bean123ch@gmail.com>
5058         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5060         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5062         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5063         multiple inclusion. Add #include <grub/types.h>.
5065 2008-08-06  Christian Franke  <franke@computer.org>
5067         * conf/common.rmk: Build and install `10_windows'.
5068         * util/grub.d/10_windows.in: New script.
5070 2008-08-06  Pavel Roskin  <proski@gnu.org>
5072         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5074 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5076         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5077         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5079 2008-08-06  Bean  <bean123ch@gmail.com>
5081         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5082         (grub_pxefs_fs_int): Remove dummy definition.
5083         (grub_pxefs_open): Use data->block_size to store the current block
5084         size setting.
5085         (grub_pxefs_read): Use block size stored in data->block_size. As the
5086         value of grub_pxe_blksize can be changed after the file is opened.
5088 2008-08-06  Bean  <bean123ch@gmail.com>
5090         * fs/i386/pc/pxe.c (curr_file): new variable.
5091         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5092         require the dummy internal file system anymore.
5093         (grub_pxefs_read): Removed.
5094         (grub_pxefs_close): Likewise.
5095         (grub_pxefs_fs_int): Likewise.
5096         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5097         connection when we switch file.
5098         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5100 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5102         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5103         `halt.mod'.
5104         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5105         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5107         * kern/i386/halt.c: New file.
5108         * kern/i386/reboot.c: Likewise.
5109         * include/grub/i386/reboot.h: Likewise.
5110         * include/grub/i386/halt.h: Likewise.
5112         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5113         Include `<grub/cpu/halt.h>'.
5114         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5115         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5117         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5118         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5119         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5120         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5121         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5122         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5123         from here ...
5124         * include/grub/i386/at_keyboard.h: ... to here.
5126 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5128         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5129         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5130         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5131         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5132         `kern/generic/millisleep.c'.
5134         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5135         instead of grub_get_rtc().
5136         (grub_tsc_init): Initialize `tsc_boot_time'.
5138         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5139         (grub_machine_init): Use grub_tsc_init() rather than
5140         installing an RTC-based handler via grub_install_get_time_ms().
5142         * kern/i386/pit.c: New file.
5143         * include/grub/i386/pit.h: Likewise.
5145 2008-08-05  Bean  <bean123ch@gmail.com>
5147         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5149         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5150         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5151         (pxe_mod_SOURCES): New macro.
5152         (pxe_mod_CFLAGS): Likewise.
5153         (pxe_mod_LDFLAGS): Likewise.
5154         (pxecmd_mod_SOURCES): Likewise.
5155         (pxecmd_mod_CFLAGS): Likewise.
5156         (pxecmd_mod_LDFLAGS): Likewise.
5158         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5159         (grub_pxe_call): Likewise.
5161         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5163         * commands/i386/pc/pxecmd.c: New file.
5165         * fs/i386/pc/pxe.c: Likewise.
5167         * include/grub/i386/pc/pxe.h: Likewise.
5169 2008-08-05  Bean  <bean123ch@gmail.com>
5171         * util/console.c (grub_console_cur_color): New variable.
5172         (grub_console_standard_color): Likewise.
5173         (grub_console_normal_color): Likewise.
5174         (grub_console_highlight_color): Likewise.
5175         (color_map): Likewise.
5176         (use_color): Likewise.
5177         (NUM_COLORS): New macro.
5178         (grub_ncurses_setcolorstate): Handle color properly.
5179         (grub_ncurses_setcolor): Don't change color here, just remember the
5180         settings, color will be set in grub_ncurses_setcolorstate.
5181         (grub_ncurses_getcolor): New function.
5182         (grub_ncurses_init): Initialize color pairs.
5183         (grub_ncurses_term): New member grub_ncurses_getcolor.
5185 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5187         High resolution timer support.  Implemented for x86 CPUs using TSC.
5188         Extracted generic grub_millisleep() so it's linked in only as needed.
5189         This requires a Pentium compatible CPU; if the RDTSC instruction is
5190         not supported, then it falls back on the generic grub_get_time_ms()
5191         implementation that uses the machine's RTC.
5193         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5194         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5195         `kern/generic/millisleep.c'.
5197         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5198         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5200         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5201         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5203         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5205         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5206         `kern/generic/millisleep.c'.
5208         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5210         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5212         * kern/generic/rtc_get_time_ms.c: New file.
5214         * kern/generic/millisleep.c: New file.
5216         * kern/misc.c: Don't include
5217         <kern/time.h> anymore.
5218         (grub_millisleep_generic): Removed.
5220         * commands/sleep.c (grub_interruptible_millisleep): Uses
5221         grub_get_time_ms() instead of grub_get_rtc().
5223         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5224         function.
5225         (grub_cpu_is_cpuid_supported): New inline function.
5226         (grub_cpu_is_tsc_supported): New inline function.
5227         (grub_tsc_init): New function prototype.
5228         (grub_tsc_get_time_ms): New function prototype.
5230         * kern/i386/tsc.c (grub_get_time_ms): New file.
5232         * include/grub/time.h: Include <grub/types.h.
5233         (grub_millisleep_generic): Removed.
5234         (grub_get_time_ms): New prototype.
5235         (grub_install_get_time_ms): New prototype.
5236         (grub_rtc_get_time_ms): New prototype.
5238         * kern/time.c (grub_get_time_ms): New function.
5239         (grub_install_get_time_ms): New function.
5241         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5242         <grub/time.h> anymore.
5243         (grub_millisleep): Removed.
5244         (grub_machine_init): Call grub_tsc_init.
5246         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5247         get_time_ms() implementation.
5249         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5250         (ieee1275_get_time_ms): New function.
5251         (grub_machine_init): Install get_time_ms() implementation.
5253         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5254         (grub_machine_init): Call grub_tsc_init().
5255         (grub_millisleep): Removed.
5257         * kern/ieee1275/init.c (grub_millisleep): Removed.
5258         (grub_machine_init): Install ieee1275_get_time_ms()
5259         implementation.
5260         (ieee1275_get_time_ms): New function.
5261         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5262         real work.
5264 2008-08-05  Marco Gerards  <marco@gnu.org>
5266         * disk/ata.c: Include <grub/pci.h>.
5267         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5268         (grub_ata_initialize): Rewritten.
5269         (grub_ata_device_initialize): New function.
5271 2008-08-04  Pavel Roskin  <proski@gnu.org>
5273         * kern/main.c: Include grub/mm.h.
5275 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5277         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5278         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5279         corruption problem).
5281 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5283         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5284         warnings introduced in my last commit.
5286 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5288         Make PCI available on all i386 architectures.
5290         * include/grub/i386/pc/pci.h: Move from here ...
5291         * include/grub/i386/pci.h: ... to here.
5293         * include/grub/i386/pc/pci.h: Remove.
5294         * include/grub/i386/efi/pci.h: Remove.
5295         * include/grub/x86_64/efi/pci.h: Remove.
5297         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5298         `<grub/cpu/pci.h>'.
5300         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5301         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5302         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5304         * conf/i386-ieee1275.rmk: Likewise.
5306 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5308         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5309         (grub_console_setcursor): Make it possible to set cursor off.
5311 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5313         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5314         of modules instead of assuming which platform provides what.
5315         * util/update-grub.in: Likewise.
5317 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5319         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5320         instead of `grub_install_dos_part' to determine whether a drive needs
5321         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5322         because it can be overridden when loading GRUB via Multiboot).
5324 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5326         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5328 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5330         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5331         of informational grub_dprintf() calls.
5333 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5335         * disk/memdisk.c (memdisk_size): Don't initialize.
5336         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5338         * include/grub/i386/pc/kernel.h
5339         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5340         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5341         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5342         (grub_arch_memdisk_size): Remove.
5344         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5345         field (was only used to transfer a constant).  Add `type' field to
5346         support multiple module types.
5347         (grub_module_iterate): New function.
5349         * kern/device.c (grub_device_open): Do not hide error messages
5350         when grub_disk_open() fails.  Use grub_print_error() instead.
5352         * kern/i386/pc/init.c (grub_arch_modules_addr)
5353         (grub_arch_memdisk_size): Remove functions.
5354         (grub_arch_modules_addr): Return the module address in high memory
5355         (now that it isn't copied anymore).
5357         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5358         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5359         decompression routine (grub_total_module_size already includes that
5360         now).  Don't copy modules back to low memory.
5362         * kern/main.c: Include `<grub/mm.h>'.
5363         (grub_load_modules): Split out (and use) ...
5364         (grub_module_iterate): ... this function, which iterates through
5365         module objects and runs a hook.
5366         Comment out grub_mm_init_region() call, as it would cause non-ELF
5367         modules to be overwritten.
5369         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5370         the memdisk image in its own region, make it part of the module list.
5371         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5372         (main): Parse --memdisk|-m option, and pass user-provided path as
5373         parameter to generate_image().
5374         (add_segments): Pass `memdisk_path' down to load_modules().
5375         (load_modules): Embed memdisk image in module section when requested.
5376         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5377         `header.type' instead of `header.offset'.
5379         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5380         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5381         (memdisk_mod_LDFLAGS): New variables.
5382         * conf/i386-coreboot.rmk: Likewise.
5383         * conf/i386-ieee1275.rmk: Likewise.
5385 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5387         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5388         (backward_relocator): New variables.  Used to allocate and relocate
5389         the payload, respectively.
5390         (grub_multiboot_load_elf32): Load into heap instead of requested
5391         address, install the appropriate relocator code in each bound of
5392         the payload, and set the entry point such that
5393         grub_multiboot_real_boot() will jump to one of them.
5395         * kern/i386/loader.S (grub_multiboot_payload_size)
5396         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5397         (grub_multiboot_payload_entry_offset): New variables.
5398         (grub_multiboot_real_boot): Set cpu context to what the relocator
5399         expects, and jump to the relocator instead of the payload.
5401         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5402         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5403         (grub_multiboot_payload_entry_offset): Export.
5405 2008-08-01  Bean  <bean123ch@gmail.com>
5407         * normal/menu_entry.c (editor_getline): Don't return the original
5408         string as result, as it will be released by lexer once it has done
5409         using it.
5411 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5413         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5414         within menuentries, not before them.
5415         util/grub.d/10_hurd.in: Likewise.
5417 2008-08-01  Bean  <bean123ch@gmail.com>
5419         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5420         (bufio_mod_SOURCES): New macro.
5421         (bufio_mod_CFLAGS): Likewise.
5422         (bufio_mod_LDFLAGS): Likewise.
5424         * include/grub/bufio.h: New file.
5426         * io/bufio.c: Likewise.
5428         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5429         (grub_video_reader_png): Use grub_buffile_open to open file.
5431         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5432         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5434         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5435         (grub_video_reader_tga): Use grub_buffile_open to open file.
5437         * font/manager.c: Include <grub/bufio.h>.
5438         (add_font): Use grub_buffile_open to open file.
5440 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5442         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5443         ELF segments, use a macro for arbitrarily accessing any of them instead
5444         of preparing a pointer that allows access to one at a time.
5445         (grub_multiboot_load_elf64): Likewise.
5447 2008-07-31  Bean  <bean123ch@gmail.com>
5449         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5450         GRUB_KERNEL_MACHINE_DATA_END.
5452 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5454         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5455         Increase from 0x50 to 0x60.
5456         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5457         use UUIDs to identify the root drive for them.  If that's not
5458         possible, abort.
5459         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5460         check, for cross-disk installs.
5462 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5464         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5465         is non-empty, use it to set the `prefix' environment variable instead
5466         of the usual approach.
5467         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5468         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5469         environment variable instead of dummy make_install_device().
5471         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5472         (start): Insert a data section, with `grub_prefix' variable.
5473         * kern/i386/linuxbios/startup.S: Likewise.
5475         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5476         New variable reference.
5477         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5478         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5479         to `start').
5480         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5481         section within startup.S (relative to `start').
5482         * include/grub/i386/coreboot/kernel.h: Likewise.
5484         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5485         Overwrite grub_prefix with its contents, at the beginning of the
5486         first segment.
5487         (main): Understand -p|--prefix.
5489 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5491         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5493 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5495         * term/i386/pc/vga_text.c (grub_console_cls): Use
5496         grub_console_gotoxy() to go back to beginning of the screen.
5497         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5499 2008-07-29  Christian Franke  <franke@computer.org>
5501         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5502         Add conversion of emulated mount points on Cygwin.
5504 2008-07-29  Christian Franke  <franke@computer.org>
5506         * util/update-grub.in: Add a check for admin
5507         group on Cygwin.
5508         Remove old `grub.cfg.new' before creation.
5509         Add `-f' to `mv' to handle the different filesystem
5510         semantics of Windows.
5512 2008-07-29  Bean  <bean123ch@gmail.com>
5514         * normal/main.c (get_line): Fix buffer overflow bug.
5516 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5518         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5519         (struct grub_apple_header): New struct.  Describes the layout of
5520         the partmap header.
5521         (apple_partition_map_iterate): Check the header magic as well as the
5522         partition magic (which was already being checked).
5524 2008-07-28  Pavel Roskin  <proski@gnu.org>
5526         * genmk.rb: Add a warning to the beginning of the output that
5527         it's a generated file and should not be edited.
5529 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5531         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5532         with the same number are found, just use issue a warning with
5533         grub_dprintf(), as this error has been reported to be non-fatal.
5535 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5537         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5538         information.
5540 2008-07-27  Bean  <bean123ch@gmail.com>
5542         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5543         (grub_fat_find_dir): Ignore case when comparing filename.
5545 2008-07-27  Bean  <bean123ch@gmail.com>
5547         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5548         smallino, as it's more descriptive, and i8count can be confused with
5549         the other field count.
5550         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5551         inode type.
5553 2008-07-27  Bean  <bean123ch@gmail.com>
5555         * commands/crc.c: New file.
5557         * lib/crc.c: Likewise.
5559         * include/grub/lib/crc.h: Likewise.
5561         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5563         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5564         (hexdump): Move this function to ...
5566         * lib/hexdump.c: ... here.
5568         * include/grub/hexdump.h: Renamed to ...
5570         * include/grub/lib/hexdump.h: ... this.
5572         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5574         * util/grub-editenv.c: Likewise.
5576         * include/envblk.h: Renamed to ...
5578         * include/lib/envblk.h: ... this.
5580         * util/envblk.c: Renamed to ...
5582         * lib/envblk.c: ... this.
5584         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5585         lib/hexdump.c.
5586         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5587         (pkglib_MODULES): Add crc.mod.
5588         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5589         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5590         (crc_mod_SOURCES): New macro.
5591         (crc_mod_CFLAGS): Likewise.
5592         (crc_mod_LDFLAGS): Likewise.
5594         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5596         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5598         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5600         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5602         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5604 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5606         * commands/help.c: Include <grub/term.h>.
5607         (TERM_WIDTH): Removed.  Updated all users.
5609 2008-07-27  Pavel Roskin  <proski@gnu.org>
5611         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5612         spurious warnings about a comment within a comment.
5614 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5616         * util/getroot.c (find_root_device): Skip devices that match
5617         /dev/dm-[0-9].  This lets the real device be found for any type of
5618         abstraction (LVM, EVMS, RAID..).
5619         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5620         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5621         device is found first, find_root_device() will now skip it.
5623 2008-07-24  Pavel Roskin  <proski@gnu.org>
5625         * include/grub/types.h: Use __builtin_bswap32() and
5626         __builtin_bswap64() with gcc 4.3 and newer.
5628 2008-07-24  Christian Franke  <franke@computer.org>
5630         * util/i386/pc/grub-install.in: If `--debug' is specified,
5631         pass `--verbose' to grub-setup.
5632         Abort script if make_system_path_relative_to_its_root() fails.
5634 2008-07-24  Bean  <bean123ch@gmail.com>
5636         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5637         variable `target_platform' should be `platform'.
5639 2008-07-24  Bean  <bean123ch@gmail.com>
5641         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5642         (grub_png_init_fixed_block): New function.
5643         (grub_png_decode_image_data): Handle fixed huffman code compression.
5645 2008-07-24  Bean  <bean123ch@gmail.com>
5647         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5648         (grub_pe2elf_SOURCES): New macro.
5649         (CLEANFILES): Add grub-pe2elf.
5651         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5652         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5653         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5654         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5655         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5656         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5657         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5658         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5659         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5660         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5661         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5662         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5663         (GRUB_PE32_DT_FUNCTION): Likewise.
5664         (GRUB_PE32_REL_I386_DIR32): Likewise.
5665         (GRUB_PE32_REL_I386_REL32): Likewise.
5666         (grub_pe32_symbol): New structure.
5667         (grub_pe32_reloc): Likewise.
5669         * util/grub-pe2elf.c: New file.
5671         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5672         start symbol in non pc platform.
5674         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5676         The following patches are from Christian Franke.
5678         * include/grub/dl.h: Remove .previous, gas supports this only
5679         for ELF format.
5681         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5682         Remove .type, gas supports this only for ELF format.
5684         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5685         nullbytes in symbol table. This fixes an infinite loop if table is
5686         zero filled.
5688         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5689         TARGET_IMG_LDFLAGS and EXEEXT.
5691         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5692         TARGET_IMG_LDFLAGS_AC.
5693         (grub_CHECK_STACK_ARG_PROBE): New function.
5695         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5697         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5699         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5700         to set TARGET_IMG_LD* accordingly.
5701         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5702         Add call to grub_CHECK_STACK_ARG_PROBE.
5703         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5705         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5707         * genmk.rb: Add EXEEXT to CLEANFILES.
5709 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5711         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5712         define the codes for arrows and lines used for the menu).
5713         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5714         as well.
5716         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5717         fonts, because the latter are too slow.
5719 2008-07-21  Bean  <bean123ch@gmail.com>
5721         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5722         a20. Run keyboard test last, as it will cause macbook to halt.
5724 2008-07-18  Pavel Roskin  <proski@gnu.org>
5726         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5727         load foreign architecture modules correctly anyway.  Keep
5728         support for loading host architecture modules, whether we
5729         compile them or not.
5731 2008-07-17  Pavel Roskin  <proski@gnu.org>
5733         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5734         change target_cpu.  The compiler default can mismatch target_cpu
5735         in any case.
5737         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5738         * kern/efi/efi.c: Likewise.
5740         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5741         target compiler is functional.
5742         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5743         are set up.
5745         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5746         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5747         adjustments from the rest, only do them if target is not
5748         explicitly given.  Merge other adjustments with the final sanity
5749         check.  Remove an extraneous check for supported CPU.  Be
5750         specific which CPU and which platform is not supported.
5752         * configure.ac: Default to pc platform for x86_64.
5754 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5756         Partial LinuxBIOS -> Coreboot rename.
5758         * conf/i386-linuxbios.rmk: Renamed to ...
5759         * conf/i386-coreboot.rmk: ... this.
5760         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5761         * configure.ac: Accept "coreboot" as input platform (but maintain
5762         compatibility with "linuxbios").
5763         * include/grub/i386/linuxbios: Renamed to ...
5764         * include/grub/i386/coreboot: ... this.
5766 2008-07-17  Bean  <bean123ch@gmail.com>
5768         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5769         (appleldr_mod_SOURCE): New variable.
5770         (appleldr_mod_CFLAGS): Likewise.
5771         (appleldr_mod_LDFLAGS): Likewise.
5772         (pci_mod_SOURCES): Likewise.
5773         (pci_mod_CFLAGS): Likewise.
5774         (pci_mod_LDFLAGS): Likewise.
5775         (lspci_mod_SOURCES): Likewise.
5776         (lspci_mod_CFLAGS): Likewise.
5777         (lspci_mod_LDFLAGS): Likewise.
5779         * conf/x86_64-efi.rmk: New file.
5781         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5782         macro.
5783         (grub_efidisk_write): Likewise.
5785         * include/efi/api.h (efi_call_0): New macro.
5786         (efi_call_1): Likewise.
5787         (efi_call_2): Likewise.
5788         (efi_call_3): Likewise.
5789         (efi_call_4): Likewise.
5790         (efi_call_5): Likewise.
5791         (efi_call_6): Likewise.
5793         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5794         grub_rescue_cmd_chainloader.
5796         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5797         (grub_pe32_optional_header): Change some fields based on i386 or
5798         x86_64 platform.
5799         (GRUB_PE32_PE32_MAGIC): Likewise.
5801         * include/grub/efi/uga_draw.h: New file.
5803         * include/grub/elf.h (STN_ABS): New constant.
5804         (R_X86_64_NONE): Relocation constant for x86_64.
5805         (R_X86_64_64): Likewise.
5806         (R_X86_64_PC32): Likewise.
5807         (R_X86_64_GOT32): Likewise.
5808         (R_X86_64_PLT32): Likewise.
5809         (R_X86_64_COPY): Likewise.
5810         (R_X86_64_GLOB_DAT): Likewise.
5811         (R_X86_64_JUMP_SLOT): Likewise.
5812         (R_X86_64_RELATIVE): Likewise.
5813         (R_X86_64_GOTPCREL): Likewise.
5814         (R_X86_64_32): Likewise.
5815         (R_X86_64_32S): Likewise.
5816         (R_X86_64_16): Likewise.
5817         (R_X86_64_PC16): Likewise.
5818         (R_X86_64_8): Likewise.
5819         (R_X86_64_PC8): Likewise.
5821         * include/grub/i386/efi/pci.h: New file.
5823         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5824         Change it value based on platform.
5825         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5826         (GRUB_E820_RAM): Likewise.
5827         (GRUB_E820_RESERVED): Likewise.
5828         (GRUB_E820_ACPI): Likewise.
5829         (GRUB_E820_NVS): Likewise.
5830         (GRUB_E820_EXEC_CODE): Likewise.
5831         (GRUB_E820_MAX_ENTRY): Likewise.
5832         (grub_e820_mmap): New structure.
5833         (linux_kernel_header): Change the efi field according to different
5834         kernel version, also field from linux_kernel_header.
5836         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5838         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5839         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5840         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5841         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5842         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5843         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5844         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5845         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5846         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5847         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5849         * include/grub/x86_64/efi/kernel.h: New file.
5851         * include/grub/x86_64/efi/loader.h: Likewise.
5853         * include/grub/x86_64/efi/machine.h: Likewise.
5855         * include/grub/x86_64/efi/pci.h: Likewise.
5857         * include/grub/x86_64/efi/time.h: Likewise.
5859         * include/grub/x86_64/linux.h: Likewise.
5861         * include/grub/x86_64/setjmp.h: Likewise.
5863         * include/grub/x86_64/time.h: Likewise.
5865         * include/grub/x86_64/types.h: Likewise.
5867         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5868          GRUB_TARGET_SIZEOF_VOID_P.
5870         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5871         (grub_efi_locate_handle): Likewise.
5872         (grub_efi_open_protocol): Likewise.
5873         (grub_efi_set_text_mode): Likewise.
5874         (grub_efi_stall): Likewise.
5875         (grub_exit): Likewise.
5876         (grub_reboot): Likewise.
5877         (grub_halt): Likewise.
5878         (grub_efi_exit_boot_services): Likewise.
5879         (grub_get_rtc): Likewise.
5881         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5882         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5883         (grub_efi_allocate_pages): Wrap efi calls.
5884         (grub_efi_free_pages): Wrap efi calls.
5885         (grub_efi_get_memory_map): Wrap efi calls.
5887         * kern/x86_64/dl.c: New file.
5889         * kern/x86_64/efi/callwrap.S: Likewise.
5891         * kern/x86_64/efi/startup.S: Likewise.
5893         * loader/efi/appleloader.c: Likewise.
5895         * loader/efi/chainloader.c (cmdline): New variable.
5896         (grub_chainloader_unload): Wrap efi calls.
5897         (grub_chainloader_boot): Likewise.
5898         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5899         command line.
5901         * loader/efi/chainloader_normal.c (chainloader_command):
5902         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5903         command line.
5905         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5906         method.
5907         (grub_e820_add_region): New function.
5908         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5909         booting.
5910         (grub_find_video_card): New function.
5911         (grub_linux_setup_video): New function.
5912         (grub_rescue_cmd_linux): Probe for video information.
5914         * normal/x86_64/setjmp.S: New file.
5916         * term/efi/console.c (map_char): New function.
5917         (grub_console_putchar): Map unicode char.
5918         (grub_console_checkkey): Wrap efi calls.
5919         (grub_console_getkey): Likewise.
5920         (grub_console_getwh): Likewise.
5921         (grub_console_gotoxy): Likewise.
5922         (grub_console_cls): Likewise.
5923         (grub_console_setcolorstate): Likewise.
5924         (grub_console_setcursor): Likewise.
5926         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5928 2008-07-16  Pavel Roskin  <proski@gnu.org>
5930         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5931         format strings.
5933         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5934         pointer, not an integer.  This fixes a warning and prevents
5935         precision loss on 64-bit systems.
5936         (relocate_addresses): Remove unneeded cast.
5938 2008-07-15  Pavel Roskin  <proski@gnu.org>
5940         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5942         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5944         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5945         Fix comparison between signed and unsigned.
5947         * include/grub/i386/ieee1275/console.h: Declare
5948         grub_console_init() and grub_console_fini().
5950         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5951         It's empty and unused.
5953         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5954         beginning to avoid warnings with some compilers.
5956         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5957         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5959 2008-07-14  Pavel Roskin  <proski@gnu.org>
5961         * kern/env.c (grub_register_variable_hook): Don't copy empty
5962         string, it leaks memory.  Pass "" to grub_env_set(), it should
5963         handle constant strings.
5965         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5966         * commands/cmp.c (grub_cmd_cmp): Likewise.
5967         * kern/dl.c (grub_dl_flush_cache): Likewise.
5968         (grub_dl_load_core): Likewise.
5969         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5970         (grub_elf64_load_phdrs): Likewise.
5972 2008-07-13  Pavel Roskin  <proski@gnu.org>
5974         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5975         between signed and unsigned.
5976         (LzmaEnc_Finish): Fix warning about an unused parameter.
5978 2008-07-13  Bean  <bean123ch@gmail.com>
5980         * Makefile.in (enable_lzo): New rule.
5982         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5984         * configure.ac (ENABLE_LZO): New option --enable-lzo.
5986         * boot/i386/pc/lnxboot.S: #include <config.h>.
5988         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5989         its value according to the compression algorithm used, lzo or lzma.
5991         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5992         compression algorithm according to configure macro.
5994         * kern/i386/pc/startup.S (codestart): Likewise.
5996         * kern/i386/pc/lzma_decode.S: New file.
5998         * include/grub/lib/LzFind.h: Likewise.
6000         * include/grub/lib/LzHash.h: Likewise.
6002         * include/grub/lib/LzmaDec.h: Likewise.
6004         * include/grub/lib/LzmaEnc.h: Likewise.
6006         * include/grub/lib/LzmaTypes.h: Likewise.
6008         * lib/LzFind.c: Likewise.
6010         * lib/LzmaDec.c: Likewise.
6012         * lib/LzmaEnc.c: Likewise.
6014 2008-07-13  Bean  <bean123ch@gmail.com>
6016         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6017         (grub_ext4_extent_header): New structure.
6018         (grub_ext4_extent): Likewise.
6019         (grub_ext4_extent_idx): Likewise.
6020         (grub_ext4_find_leaf): New function.
6021         (grub_ext2_read_block): Handle extents.
6023 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6025         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6027 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6029         * util/grub.d/40_custom.in: New file. Example on how to add custom
6030         entries to /etc/grub.d.
6031         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6032         40_custom (implicitly, by merging all the grub.d rules).
6034 2008-07-11  Pavel Roskin  <proski@gnu.org>
6036         * commands/read.c (grub_getline): Fix invalid memory access.
6037         Don't add newline to the variable value.
6039         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6040         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6041         (serial_hw_get_port): Check validity of the port number.
6042         (grub_cmd_serial): Check return value of serial_hw_get_port().
6044 2008-07-07  Pavel Roskin  <proski@gnu.org>
6046         * boot/i386/pc/diskboot.S (notification_string): Replace
6047         "Loading kernel" with just "loading".  This is shorter, less
6048         confusing and saves a few bytes for possible future changes.
6050 2008-07-05  Pavel Roskin  <proski@gnu.org>
6052         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6053         size for ATAPI devices, they are undefined.  Output sector
6054         number in decimal form.
6056         * disk/ata.c: Use named constants for status bits.
6058 2008-07-04  Pavel Roskin  <proski@gnu.org>
6060         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6061         grub_addr_t before casting it to the void pointer to fix a
6062         warning.  Non-addressable regions are discarded earlier.
6063         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6064         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6065         (check_signature): Don't shadow table_header.
6066         (grub_linuxbios_table_iterate): Cast numeric constants to
6067         grub_linuxbios_table_header_t.
6068         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6069         grub_stop().
6071         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6072         prevent warnings.
6074         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6075         pointer, which can cause warnings.  Support 64-bit addresses.
6077         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6078         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6080 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6082         This fixes a performance issue when pc & gpt partmap iterators
6083         didn't abort iteration even after our hook found what it was
6084         looking for (often causing expensive probes of non-existent drives).
6086         Some callers relied on previous buggy behaviour, since they would
6087         raise an error when their own hooks caused early abortion of its
6088         iteration.
6090         * kern/device.c (grub_device_open): Improve error message.
6091         * disk/lvm.c (grub_lvm_open): Likewise.
6092         * disk/raid.c (grub_raid_open): Likewise.
6094         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6095         when hook requests it, independently of grub_errno.
6096         (pc_partition_map_probe): Do not fail when find_func() caused
6097         early abortion of pc_partition_map_iterate().
6099         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6100         when hook requests it, independently of grub_errno.
6101         (gpt_partition_map_probe): Do not fail when find_func() caused
6102         early abortion of gpt_partition_map_iterate().
6104         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6105         when hook requests it, independently of grub_errno.  Do not fail when
6106         part_map_iterate_hook() caused early abortion of p->iterate().
6108         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6109         when grub_partition_iterate() returned with non-zero.
6111 2008-07-03  Pavel Roskin  <proski@gnu.org>
6113         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6114         like we do in grub_ata_pio_read().
6115         (grub_ata_readwrite): Always write individual sectors.  Fix the
6116         sector count for the remainder.
6117         (grub_ata_write): Enable writing to ATA devices.  Correctly
6118         report error for ATAPI devices.
6120 2008-07-02  Pavel Roskin  <proski@gnu.org>
6122         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6123         warning.
6125         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6126         for every read sector, we already increment it for the whole
6127         batch.  This fixes reading more than 256 sectors at once.
6129         * util/grub-editenv.c (cmd_info): Cast argument to long
6130         explicitly.  ptrdiff_t reduces to int on i386.
6132         * util/grub-editenv.c (main): Be specific which parameter is
6133         missing.
6135         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6136         (memdisk): Make memdisk_orig_addr a pointer.
6138         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6139         for file offsets, use grub_off_t instead.  Fix printf format
6140         warnings.
6142         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6143         there.  Real unexpected warnings should not drown in the noise
6144         about known problems.
6146         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6147         grub_disk_addr_t for memory addresses.
6149         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6150         explicitly to fix a warning.
6152         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6154         * Makefile.in (MODULE_LDFLAGS): New variable.
6155         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6156         the linker accepts --build-id=none.
6157         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6158         MODULE_LDFLAGS.
6159         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6161         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6162         those in Linux XFS code.  Provide a way to access 64-bit parent
6163         inode.
6164         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6165         the end of struct grub_xfs_dir_header.
6167 2008-07-02  Bean  <bean123ch@gmail.com>
6169         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6170         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6171         and GRUB_IEEE1275_FLAG_NO_ANSI.
6173         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6174         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6175         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6177         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6178         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6180         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6181         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6183         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6184         esc sequence on non ANSI terminal.
6185         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6187         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6188         beginning of file.
6190 2008-07-02  Bean  <bean123ch@gmail.com>
6192         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6193         (grub_editenv_SOURCES): New variable.
6194         (pkglib_MODULES): Add loadenv.mod.
6195         (loadenv_mod_SOURCES): New variable.
6196         (loadenv_mod_CFLAGS): Likewise.
6197         (loadenv_mod_LDFLAGS): Likewise.
6199         * include/grub/envblk.h: New file.
6201         * util/envblk.c: New file.
6203         * util/grub-editenv.c: New file.
6205         * commands/loadenv.c: New file.
6207 2008-07-01  Pavel Roskin  <proski@gnu.org>
6209         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6210         not unsigned char.  This fixes warnings and is consistent with
6211         other tags.
6213         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6215         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6217         * term/tparm.c (analyze): Always set *popcount.
6219         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6220         cast to fix a warning.
6222         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6223         cast to suppress a warning.
6225         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6226         grub_fshelp_read_file() expects.
6228         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6229         write uuid as a 32-bit value in CPU byte order, so declare and
6230         use it as such.
6232         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6233         long if the format specifier expects it.
6234         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6235         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6236         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6237         long to fix a warning.
6238         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6239         grub_dprintf() arguments to fix warnings.
6241 2008-06-30  Pavel Roskin  <proski@gnu.org>
6243         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6244         install_bsd_part immediately before core.img is embedded or
6245         modified on disk.  This fixes core.img verification if core.img
6246         cannot be embedded.
6248         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6249         core_path to calculate the blocklist.
6250         Patch from Javier Martín <lordhabbit@gmail.com>
6252 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6254         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6255         block to disk block.
6256         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6257         Patch from Niels Böhm <bitbucket@arcor.de>
6259 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6261         * util/update-grub_lib.in (font_path): Search for fonts in
6262         /boot/grub first, which is more likely to be readable (we aren't
6263         deciding where fonts live, just looking for them).
6265 2008-06-26  Pavel Roskin  <proski@gnu.org>
6267         * util/biosdisk.c (read_device_map): Don't leave dead map
6268         entries for devices failing stat() check.
6270         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6271         core_path_dev for the core.img path on the target device.
6273 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6275         * disk/fs_uuid.c: New file.
6276         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6277         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6278         (fs_uuid_mod_LDFLAGS): New variables.
6279         * include/grub/disk.h (grub_disk_dev_id): Add
6280         `GRUB_DISK_DEVICE_UUID_ID'.
6281         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6282         implement iterate().
6284 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6286         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6287         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6288         Linux image includes no initrd.
6290 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6292         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6293         call to resolve the core image location that effectively appended the
6294         name twice.
6296 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6298         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6299         call from here ...
6301         * util/grub.d/10_hurd.in: ... to here ...
6302         * util/grub.d/10_linux.in: ... and here.
6304 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6306         * kern/main.c (grub_main): Export `prefix' variable immediately
6307         after it has been set by grub_machine_set_prefix().
6309 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6311         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6312         search result when not saving to variable, not the other way around.
6313         When saving to variable, abort iteration as soon as a match is found.
6315 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6317         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6318         check for partition that provides /boot/grub.  Its logic is flawed,
6319         as it prevents prepare_grub_to_access_device() from being called
6320         multiple times.
6322 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6324         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6325         "insmod" command directly when abstraction modules are needed,
6326         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6327         since it had already been processed).
6329 2008-06-19  Pavel Roskin  <proski@gnu.org>
6331         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6332         changed.  This is needed in case GRUB_LIBDIR changes.
6333         * conf/i386-ieee1275.rmk: Likewise.
6334         * conf/i386-linuxbios.rmk: Likewise.
6335         * conf/i386-pc.rmk: Likewise.
6336         * conf/powerpc-ieee1275.rmk: Likewise.
6338 2008-06-18  Pavel Roskin  <proski@gnu.org>
6340         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6341         kernel_elf_symlist.c to symlist.c for consistency with other
6342         architectures.  Update all users.
6343         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6345 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6347         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6348         it in prefix.
6350         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6351         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6352         a RAID device, run setup() for all members independently on whether
6353         LVM abstraction is being used.
6354         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6355         If grub-mkimage has set `*install_dos_part == -2', don't override this
6356         value.
6357         Perform *install_dos_part adjustments independently on whether
6358         we're embedding or not.
6359         Clarify error message when image is too big for embedding.
6360         Remove duplicate *install_dos_part stanza.
6362 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6364         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6365         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6366         variables.
6367         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6368         values in grub_ofconsole_normal_color and
6369         grub_ofconsole_highlight_color (they're not directly related to
6370         background and foreground).
6371         (grub_ofconsole_setcolorstate): Extract background and foreground
6372         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6374 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6376         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6377         /boot/grub for the check in last commit, not /boot (they could be
6378         different partitions).
6380 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6382         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6383         asked to setup access for the same partition that provides /boot,
6384         don't bother using UUIDs since our root already has the value we
6385         want.
6387 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6389         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6390         I2O devices.
6391         Patch from Sven Mueller <sven@debian.org>.
6393 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6395         * util/update-grub.in: Check for $EUID instead of $UID.
6396         Reported by Vincent Zweije.
6398 2008-06-16  Bean  <bean123ch@gmail.com>
6400         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6401         (grub_ext2_read_block): Likewise.
6402         (grub_ext2_read_inode): Likewise.
6403         (grub_ext2_mount): Likewise.
6404         (grub_ext2_close): Likewise.
6405         (grub_ext3_get_journal): Removed.
6407         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6408         (grub_reiserfs_read_symlink): Likewise.
6409         (grub_reiserfs_mount): Likewise.
6410         (grub_reiserfs_open): Likewise.
6411         (grub_reiserfs_read): Likewise.
6412         (grub_reiserfs_close): Likewise.
6413         (grub_reiserfs_get_journal): Removed.
6415         * fs/fshelp.c (grub_fshelp_read): Removed.
6416         (grub_fshelp_map_block): Likewise.
6418         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6419         (grub_fshelp_journal): Likewise.
6420         (grub_fshelp_read): Likewise.
6421         (grub_fshelp_map_block): Likewise.
6423 2008-06-16  Pavel Roskin  <proski@gnu.org>
6425         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6426         floating point anymore.
6427         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6429 2008-06-15  Pavel Roskin  <proski@gnu.org>
6431         * commands/ls.c (grub_ls_list_files): Use integer calculations
6432         for human readable format, avoid floating point use.
6433         * kern/misc.c (grub_ftoa): Remove.
6434         (grub_vsprintf): Remove floating point support.
6436 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6438         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6439         devices.
6440         Reported by Max Vozeler.
6442 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6444         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6445         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6446         skipped later.
6447         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6448         the beginning of the prefix.
6450         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6451         It is assumed that if we have a memdisk, grub-mkimage has set
6452         grub_prefix to include the "(memdisk)" drive in it.
6454 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6456         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6457         Initialize keyboard controller after registering the terminal, so that
6458         grub_printf() can be called from grub_keyboard_controller_init().
6460 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6462         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6463         extent-btree which is written as big endian on disk.
6464         Reported by Alain Greppin  <al@chilibi.org>.
6466 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6468         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6469         * util/i386/pc/grub-install.in (modules): Likewise.
6471 2008-06-13  Pavel Roskin  <proski@gnu.org>
6473         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6475 2008-06-13  Bean  <bean123ch@gmail.com>
6477         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6479         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6481         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6482         to indicate sparse block.
6484 2008-06-12  Pavel Roskin  <proski@gnu.org>
6486         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6487         number, grub_fshelp_read() does it for us.
6489         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6490         linear disk read with journal translation.
6491         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6492         * include/grub/fshelp.h: Declare grub_fshelp_read().
6494 2008-06-09  Pavel Roskin  <proski@gnu.org>
6496         * fs/minix.c (grub_minix_mount): Handle error reading
6497         superblock.
6499 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6501         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6502         don't append the RAID prefix afterwards.
6503         Reported by Clint Adams.
6505 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6507         Based on description from Pavel:
6508         * kern/disk.c (grub_disk_check_range): Rename to ...
6509         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6510         tasks performed by this function.
6512 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6514         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6515         `num_serial' (for consistency with other variables).
6516         (struct grub_ntfs_data): Add `uuid' member.
6517         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6518         (grub_ntfs_uuid): New function.
6519         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6521 2008-06-07  Pavel Roskin  <proski@gnu.org>
6523         * util/biosdisk.c (open_device): Revert last change to the
6524         function, it broke installation.  The sector needs to be
6525         different dependent on which device is opened.
6527 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6529         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6530         rest of GRUB, and breakage doesn't happen if its value were modified.
6532         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6533         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6534         a constant (same value).
6535         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6536         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6538 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6540         * util/biosdisk.c (open_device): Do not modify sector offset when
6541         accessing a partition.  kern/disk.c already handles this for us.
6543 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6545         * util/grub-emu.c (grub_machine_init): Move code in this function from
6546         here ...
6547         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6548         segfault in case grub_printf() is called).
6550         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6551         grub_probe.  Update all users not to explicitly add it again.
6552         (grub_device): New variable; contains corresponding device for grubdir.
6553         (fs_module, partmap_module, devabstraction_module): Pass
6554         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6555         every time.
6557 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6559         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6560         is found, print it (same layout as with labels).
6562 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6564         * util/biosdisk.c (get_drive): Rename to ...
6565         (find_grub_drive): ... this.  Update all users.
6567         (get_os_disk): Rename to ...
6568         (convert_system_partition_to_system_disk): ... this.  Update all users.
6570         (find_drive): Rename to ...
6571         (find_system_device): ... this.  Update all users.
6573 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6575         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6576         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6577         (make_device_map): Likewise.
6579 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6581         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6582         before dereferencing it.
6584         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6585         union with fat12/fat16-specific ones.  Add some new fields, including
6586         `num_serial' for both versions.
6587         (struct grub_fat_data): Add `uuid' member.
6588         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6589         names.  Initialize `data->uuid' using `num_serial'.
6590         (grub_fat_uuid): New function.
6591         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6593         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6594         (grub_reiserfs_uuid): New function.
6595         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6596         member.
6598         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6599         (grub_xfs_uuid): New function.
6600         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6602 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6604         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6605         code that is backward compatible with pre-uuid search command.
6607 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6609         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6610         floppies after everything else, to ensure floppy drive isn't accessed
6611         unnecessarily (patch from Bean).
6613 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6615         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6616         not print device names when we were asked to set a variable.
6618 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6620         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6621         using "cursor-on" and "cursor-off" commands (understood at least by
6622         the Open Firmware flavour on OLPC).
6624 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6626         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6627         on and off sequences.
6629 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6631         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6632         * util/update-grub.in: Likewise.
6634 2008-05-30  Pavel Roskin  <proski@gnu.org>
6636         * util/biosdisk.c (linux_find_partition): Simplify logic and
6637         make the code more universal.  Keep special processing for
6638         devfs, but use a simple rule for all other devices.  If the
6639         device ends with a number, append 'p' and the partition number.
6640         Otherwise, append only the partition number.
6642 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6644         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6645         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6646         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6647         the `root' parameter to Linux.
6649 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6651         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6652         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6653         --fs_uuid with --fs-uuid.
6654         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6655         all filesystems support them).
6657 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6659         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6660         grub_printf() flags, since we're printing in units of 2 bytes.
6662 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6664         * util/grub.d/00_header.in: Remove obsolete comment referencing
6665         convert_system_path_to_grub_path().
6666         * util/update-grub.in: Likewise.
6667         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6668         (convert_system_path_to_grub_path): Add a warning message explaining
6669         that this function is deprecated.  Rely on is_path_readable_by_grub()
6670         for the readability checks.
6671         (font_path): Use is_path_readable_by_grub() for the readability
6672         check rather than convert_system_path_to_grub_path().
6674 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6676         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6677         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6678         converting it first.
6679         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6680         grub.cfg for access to font file, and afterwards call it again to set
6681         the root device.
6683 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6685         * commands/search.c (options): Add --fs_uuid option.
6686         (search_fs_uuid): New function.
6687         (grub_cmd_search): Fix --set argument passing.
6688         Use search_fs_uuid() when requested via --fs_uuid.
6689         (grub_search_init): Update help message.
6690         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6691         and redeclare it as an array of 16-bit words.
6692         (grub_ext2_uuid): New function.
6693         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6694         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6695         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6696         (GRUB_DEVICE_BOOT_UUID): New variables.
6697         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6698         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6699         whenever possible.
6700         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6701         just assume `root' variable has the right value.
6702         * util/grub.d/10_linux.in: Likewise.
6703         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6704         via PRINT_FS_UUID.
6705         (main): Recognise `-t fs_uuid' argument.
6707 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6709         * util/biosdisk.c (map): Redefine structure to hold information
6710         about GRUB drive name.
6711         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6712         drive names.
6713         (call_hook): Remove.
6714         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6715         member.  Assume drive has partitions.
6716         (grub_util_biosdisk_open): Access device names via `.device' struct
6717         member.
6718         (open_device): Likewise.
6719         (find_drive): Likewise.
6720         (read_device_map): Adjust map[] usage to match the new struct
6721         definition.  Don't check for duplicates (still possible, but not cheap
6722         anymore).
6723         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6724         (make_device_name): Remove assumption of BIOS-like drive names.
6726 2008-05-30  Pavel Roskin  <proski@gnu.org>
6728         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6729         compiling execute.c doesn't need grub_script.tab.h anymore.
6730         (normal/command.c_DEPENDENCIES): Likewise.
6731         (normal/function.c_DEPENDENCIES): Likewise.
6732         * conf/i386-ieee1275.rmk: Likewise.
6733         * conf/i386-linuxbios.rmk: Likewise.
6734         * conf/i386-pc.rmk: Likewise.
6735         * conf/powerpc-ieee1275.rmk: Likewise.
6736         * conf/sparc64-ieee1275.rmk: Likewise.
6738 2008-05-29  Pavel Roskin  <proski@gnu.org>
6740         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6741         when scanning metadata for volume group name.
6743         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6744         a generated file, which may only be included from the files with
6745         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6746         use union YYSTYPE, as the later allows forward declaration.
6747         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6749 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6751         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6752         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6753         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6754         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6755         scan codes.
6757 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6759         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6760         control key combinations.
6762 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6764         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6765         * util/ieee1275/grub-install.in: ... to here.
6766         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6767         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6768         (grub_install_SOURCES): Likewise.
6770 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6772         * fs/affs.c: Update copyright year.
6773         * fs/ext2.c: Likewise.
6774         * fs/fshelp.c: Likewise.
6775         * fs/hfsplus.c: Likewise.
6776         * fs/ntfs.c: Likewise.
6777         * fs/xfs.c: Likewise.
6778         * include/grub/fshelp.h: Likewise.
6779         * util/grub-mkdevicemap.c: Likewise.
6781 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6783         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6784         might need to be fatfs to support some firmware implementations
6785         (e.g. OFW or EFI).
6787 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6789         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6790         devices.
6791         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6792         (make_device_map): Likewise.
6794 2008-05-20  Bean  <bean123ch@gmail.com>
6796         * fs/fshelp.c (grub_fshelp_map_block): New function.
6797         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6798         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6800         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6801         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6802         (grub_fshelp_journal): New structure.
6803         (grub_fshelp_map_block): New function prototype.
6804         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6805         (grub_fshelp_map_block): Likewise.
6807         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6808         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6809         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6810         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6811         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6812         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6813         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6814         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6815         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6816         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6817         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6818         (grub_ext2_sblock): New members for journal support.
6819         (grub_ext3_journal_header): New structure.
6820         (grub_ext3_journal_revoke_header): Likewise.
6821         (grub_ext3_journal_block_tag): Likewise.
6822         (grub_ext3_journal_sblock): Likewise.
6823         (grub_fshelp_node): New members logfile and journal.
6824         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6825         grub_fshelp_map_block to get real block number.
6826         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6827         number.
6828         (grub_ext2_read_inode): Likewise.
6829         (grub_ext3_get_journal): New function.
6830         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6831         (grub_ext2_close): Release memory used by journal.
6833         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6834         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6835         (grub_reiserfs_transaction_header): Renamed to
6836         grub_reiserfs_description_block, replace field data with real_blocks.
6837         (grub_reiserfs_commit_block): New structure.
6838         (grub_reiserfs_data): New member journal.
6839         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6840         number.
6841         (grub_reiserfs_read_symlink): Likewise.
6842         (grub_reiserfs_iterate_dir): Likewise.
6843         (grub_reiserfs_open): Likewise.
6844         (grub_reiserfs_read): Likewise.
6845         (grub_reiserfs_get_journal): New function.
6846         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6847         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6848         using grub_reiserfs_get_journal.
6849         (grub_reiserfs_close): Release memory used by journal.
6851         * fs/affs.c (grub_affs_read_block): Change block type to
6852         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6854         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6856         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6858         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6860         * fs/udf.c (grub_udf_read_block): Change block type to
6861         grub_disk_addr_t. Use type cast to avoid warning.
6863         * fs/xfs.c (grub_xfs_read_block): Likewise.
6865 2008-05-16  Christian Franke  <franke@computer.org>
6867         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6868         to ensure that break with ESC will always work.
6869         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6870         Remove ESC from keyboard queue.
6872 2008-05-16  Christian Franke  <franke@computer.org>
6874         * util/biosdisk.c: [__CYGWIN__] Add includes.
6875         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6876         (get_os_disk): Move variable declarations to OS specific
6877         parts to avoid warning.
6878         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6879         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6880         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6881         Cygwin.
6882         * util/getroot.c: [__CYGWIN__] Add includes.
6883         (strip_extra_slashes): Fix "/" case.
6884         [__CYGWIN__] (get_win32_path): New function.
6885         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6886         [__CYGWIN__] (find_root_device): Disable.
6887         [__CYGWIN__] (get_bootsec_serial): New function.
6888         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6889         [__linux__] (grub_guess_root_device): Add early returns to simplify
6890         structure.
6891         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6892         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6893         check for Linux only.
6895 2008-05-15  Bean  <bean123ch@gmail.com>
6897         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6898         keyboard hang problem in apple's intel mac.
6900 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6902         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6903         devices.
6904         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6905         (make_device_map): Likewise.
6906         Reported by Aurelien Jarno <aurel32@debian.org>
6908 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6910         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6911         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6912         (make_device_map): Output entries for xvd type disks.
6914 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6916         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6917         devices.
6918         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6919         (make_device_map): Likewise.
6920         Reported by Roland Dreier <rdreier@cisco.com>
6922 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6924         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6925         grub_strstr() call.  Correct a few mistakes in failure path handling.
6927 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6929         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6930         Do not print a trailing slash (therefore, the root directory is an
6931         empty string).
6932         (convert_system_path_to_grub_path): Do not remove trailing slash
6933         from make_system_path_relative_to_its_root() output.
6935         * util/i386/pc/grub-install.in: Add trailing slash to output from
6936         make_system_path_relative_to_its_root().
6938 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6940         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6941         ensures that output lines aren't intermangled with those sent to
6942         stderr (via grub_util_info()).
6943         * util/grub-probe.c (grub_refresh): Likewise.
6944         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6946 2008-05-05  Christian Franke  <franke@computer.org>
6948         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6949         Add Cygwin device names.
6950         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6951         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6952         (check_device): Return error instead of success on empty name.
6953         (make_device_map): Move label inside linux specific code to
6954         prevent compiler warning.
6956 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6958         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6959         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6960         first boot option.
6961         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6963 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6965         * docs/grub.cfg: New file (example GRUB configuration).
6967 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6969         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6970         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6971         and `disk/ieee1275/nand.c'.
6973 2008-04-25  Bean  <bean123ch@gmail.com>
6975         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6976         i386-linuxbios.
6978         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6979         change the buffer size to 4096 for cdrom device.
6981         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6982         and nand.mod.
6983         (_linux_mod_SOURCES): New variable.
6984         (_linux_mod_CFLAGS): Likewise.
6985         (_linux_mod_LDFLAGS): Likewise.
6986         (linux_mod_SOURCES): Likewise.
6987         (linux_mod_CFLAGS): Likewise.
6988         (linux_mod_LDFLAGS): Likewise.
6989         (nand_mod_SOURCES): Likewise.
6990         (nand_mod_CFLAGS): Likewise.
6991         (nand_mod_LDFLAGS): Likewise.
6993         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6994         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6995         type property. (nand device in olpc don't have this property)
6997         * include/grub/disk.h (grub_disk_dev_id): New macro
6998         GRUB_DISK_DEVICE_NAND_ID.
7000         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7001         function prototype.
7002         (grub_rescue_cmd_initrd): Likewise.
7004         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7005         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7006         ofw_cif_handler and ofw_idt, adjust padding number.
7008         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7009         GRUB_MACHINE_IEEE1275 is defined.
7011         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7012         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7014         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7015         on nested function heap_init.
7016         (grub_upper_mem): New variable for i386-ieee1275.
7017         (grub_get_extended_memory): New function for i386-ieee1275.
7018         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7020         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7021         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7022         property.
7024         * loader/i386/ieee1275/linux.c: New file.
7026         * loader/i386/ieee1275/linux_normal.c: New file.
7028         * disk/ieee1275/nand.c: New file.
7030 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7032         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7033         value.
7034         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7036 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7038         Restructures early code path on ieee1275 to unify grub_main() as
7039         the first C function that is executed in every platform.
7041         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7042         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7043         cmain().
7044         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7045         * kern/ieee1275/cmain.c (cmain): Rename to ...
7046         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7047         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7048         at the beginning.
7050 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7052         * util/update-grub.in: Fix syntax error when setting
7053         `GRUB_PRELOAD_MODULES'.
7054         Reported by Stephane Chazelas <stephane@artesyncp.com>
7056 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7058         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7059         section into account, newer toolchains generate unique build ids
7060         * configure.ac: remove the test for --build-id=none acceptance,
7061         we want build ids to be preserved
7062         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7063         far from other sections don't cause the raw binary images grow
7064         size
7066 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7068         * disk/lvm.c: Update copyright year.
7069         * kern/misc.c: Likewise.
7071 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7073         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7074         there is no memory left for physical volume name.
7076 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7078         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7079         volume name mapping to support bigger than 9 character names properly.
7081 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7083         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7084         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7086 2008-04-13  Christian Franke  <franke@computer.org>
7088         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7089         to create a floppy emulation boot CD when non emulation mode
7090         does not work.
7091         Enable Joliet CD filesystem extension.
7093 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7095         * kern/misc.c (grub_strncat): Fix off-by-one error.
7096         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7098         * kern/env.c (grub_env_context_close): Clear current context, not
7099         previous one.
7100         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7102         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7104 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7106         Improve robustness when handling LVM.
7108         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7109         (and leave `*p' unmodified).
7110         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7111         through it.
7112         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7113         iterating through it.
7114         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7115         through it.
7116         (grub_lvm_scan_device): Check the return value (and fail gracefully
7117         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7118         Don't assume `vg->pvs != NULL' when iterating through it.
7120 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7122         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7123         * genmk.rb (partmap): New variable.
7124         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7125         (#{partmap}): New target rule.
7126         * genpartmaplist.sh: New file.
7127         * Makefile.in (pkglib_DATA): Add partmap.lst.
7128         (partmap.lst): New target rule.
7129         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7130         modules (including all partition maps), instead of preloading them.
7132 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7134         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7135         `linux-boot-prober' (if installed) to detect other operating
7136         systems which are installed on the computer and add them to
7137         the boot menu.
7138         * conf/common.rmk: Build and install 30_os-prober.
7140 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7142         * kern/powerpc/ieee1275/init.c: Move from here ...
7143         * kern/ieee1275/init.c: ... to here.  Update all users.
7145         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7146         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7148         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7149         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7151         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7152         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7154 2008-04-10  Pavel Roskin  <proski@gnu.org>
7156         * configure.ac: Always use "_cv_" in cache variables for
7157         compatibility with Autoconf 2.62.
7159 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7161         Revert grub/machine/init.h addition by Pavel (since it breaks on
7162         i386-ieee1275 and others):
7163         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7164         * util/powerpc/ieee1275/misc.c: Likewise.
7166 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7168         * util/grub-probe.c (probe): Improve error message.
7170 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7172         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7173         (this prevents the presence of a bogus entry from ruining the whole
7174         thing).
7176 2008-04-06  Pavel Roskin  <proski@gnu.org>
7178         * util/biosdisk.c: Include grub/util/biosdisk.h.
7179         * util/grub-fstest.c (execute_command): Make static.
7180         * util/grub-mkdevicemap.c (check_device): Likewise.
7181         * util/i386/pc/misc.c: Include grub/machine/init.h.
7182         * util/powerpc/ieee1275/misc.c: Likewise.
7183         * util/lvm.c: Include grub/util/lvm.h.
7184         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7185         grub/cache.h.
7186         * util/raid.c: Include grub/util/raid.h.
7187         (grub_util_getdiskname): Make static.
7189         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7190         grub_hostfs_fini(), as they are called from grub_init_all() and
7191         grub_fini_all() respectively.  This fixes an infinite loop in
7192         grub-fstest due to double registration of hostfs.
7193         Reported by Christian Franke <Christian.Franke@t-online.de>
7195 2008-04-05  Pavel Roskin  <proski@gnu.org>
7197         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7198         all 8 functions.  Otherwise, probe function 0 only.
7200 2008-04-04  Pavel Roskin  <proski@gnu.org>
7202         * commands/lspci.c (grub_lspci_iter): Print the bus number
7203         correctly.
7205         * commands/lspci.c (grub_pci_classes): Fix typos.
7206         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7207         before device ID, as it's normally done.
7209         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7210         Fix signedness warnings.
7211         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7212         Likewise.
7213         * util/ieee1275/get_disk_name.c: Include config.h so that
7214         _GNU_SOURCE is defined and getline() is declared.  Mark an
7215         unused argument as such.  Fix a signedness warning.
7217 2008-04-02  Pavel Roskin  <proski@gnu.org>
7219         * genkernsyms.sh.in: Use more robust assignments for CC and
7220         srcdir.  Quote srcdir.
7221         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7222         the symbol table is not empty.
7224         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7225         * fs/cpio.c (grub_cpio_read): Likewise.
7227 2008-04-01  Pavel Roskin  <proski@gnu.org>
7229         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7230         * disk/host.c (grub_host_open): Likewise.
7231         * disk/loopback.c (grub_loopback_open): Likewise.
7232         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7233         disk->id as in disk/host.c, not a multi-character constant.
7235         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7236         later is obsolete, potentially dangerous and sets a bad example.
7237         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7238         * util/misc.c (grub_util_get_image_size): Likewise.
7240         * disk/loopback.c (options): Improve help for "--partitions".
7242         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7243         options to align them with the short options, e.g. "echo -e".
7245 2008-03-31  Bean  <bean123ch@gmail.com>
7247         * video/reader/png.c (grub_png_data): New member is_16bit and
7248         image_data.
7249         (grub_png_decode_image_header): Detect 16 bit png image.
7250         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7251         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7252         (grub_video_reader_png): Release memory occupied by image_data.
7254         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7255         4096 bytes.
7256         (grub_nfs_mount): Skip the test for sector per cluster.
7258         * include/grub/ntfs.h (MAX_SPC): Removed.
7260 2008-03-31  Bean  <bean123ch@gmail.com>
7262         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7263         (grub_probe_SOURCES): Add fs/afs.c.
7264         (grub_fstest_SOURCES): Likewise.
7265         (afs_mod_SOURCES): New variable.
7266         (afs_mod_CFLAGS): Likewise.
7267         (afs_mod_LDFLAGS): Likewise.
7269         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7270         (grub_emu_SOURCES): Likewise.
7272         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7274         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7276         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7278         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7280         * fs/afs.c: New file.
7282 2008-03-30  Pavel Roskin  <proski@gnu.org>
7284         * disk/host.c: Include grub/misc.h to fix a warning.
7285         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7286         warnings about implicit declarations.
7288         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7289         variable.
7290         * include/grub/i386/loader.h: Change declaration of
7291         grub_linux_boot() to match what grub_loader_set() expects.
7292         * util/getroot.c (grub_guess_root_device): Return const char* to
7293         fix a warning.
7294         * util/grub-probe.c (probe): Fix a warning about uninitialized
7295         abstraction_name variable.
7296         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7297         second argument as unused to fix a warning.
7299         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7300         missing grub_error() call.
7302         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7303         2.60 and newer uses it to define datadir.
7305         * commands/sleep.c: Fix warning about implicit declaration.
7306         * disk/memdisk.c: Likewise.
7307         * loader/aout.c: Likewise.
7308         * loader/i386/bsd_normal.c: Likewise.
7309         * util/grub-probe.c: Likewise.
7311         * commands/i386/cpuid.c (has_longmode): Make static.
7312         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7313         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7315         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7316         GDT.  This is more robust, as %ds can change.
7317         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7318         calling real_to_prot().
7319         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7321 2008-03-28  Pavel Roskin  <proski@gnu.org>
7323         * kern/i386/pc/startup.S: Assert that uncompressed functions
7324         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7325         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7326         code, as they push parts of the code (error handlers) beyond
7327         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7328         code as correctness and size.
7330 2008-03-28  Pavel Roskin  <proski@gnu.org>
7332         * kern/i386/pc/startup.S
7333         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7334         data block address to the real mode, keep offset minimal.  This
7335         works around a bug in AWARD BIOS on old Athlon systems, which
7336         makes CD detection hang.
7338 2008-03-26  Pavel Roskin  <proski@gnu.org>
7340         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7341         const.
7342         * include/grub/normal.h: Add grub_parse_color_name_pair()
7343         declaration.
7345 2008-03-24  Bean  <bean123ch@gmail.com>
7347         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7348         (cd_count): Removed.
7349         (cd_drive): New variable.
7350         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7351         (grub_biosdisk_call_hook): Likewise.
7352         (grub_biosdisk_iterate): Change cdrom detection method.
7353         (grub_biosdisk_open): Replace cd_start with cd_drive.
7354         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7355         detect cdrom device.
7357         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7358         Removed.
7359         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7360         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7361         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7362         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7363         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7364         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7365         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7366         (grub_biosdisk_cdrp): New structure.
7367         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7369         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7371         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7372         device.
7374         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7375         New function.
7377 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7379         Remove 2 TiB limit in ata.mod.
7380         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7381         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7382         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7383         grub_uint64_t instead of grub_uint32_t.
7385 2008-03-05  Bean  <bean123ch@gmail.com>
7387         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7388         (grub_multiboot): Set boot device.
7390         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7392 2008-03-02  Bean  <bean123ch@gmail.com>
7394         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7395         symlink_buffer.
7397 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7399         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7400         texinfo.tex.
7402         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7403         modified.
7405         * docs/fdl.texi: New file.
7407         * docs/mdate-sh: New file. Copied from gnulib.
7408         * docs/texinfo.tex: Likewise.
7410         * config.guess: Updated from gnulib.
7411         * install-sh: Likewise.
7413 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7415         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7416         (aout_mod_SOURCES): New variable.
7417         (aout_mod_CFLAGS): Likewise.
7418         (aout_mod_LDFLAGS): Likewise.
7420         * conf/i386-ieee1275.rmk: Likewise.
7422 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7424         * util/update-grub.in: Reorganise terminal validity check.  Accept
7425         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7426         Based on suggestion by Franklin PIAT.
7428 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7430         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7431         function.
7432         * util/getroot.c (grub_util_check_block_device): New function that
7433         returns the given argument if it is a block device and returns NULL else.
7434         * util/grub-probe.c (argument_is_device): New variable.
7435         (probe): Promote device_name from a variable to an argument. Receive
7436         device_name from grub_util_check_block_device() if path is NULL and from
7437         grub_guess_root_device() else. Do not free() device_name anymore.
7438         (options): Introduce new parameter '-d, --device'.
7439         (main): Add description of the new parameter to the help screen.
7440         Rename path variable to argument. Set argument_is_device if the '-d'
7441         option is given. Pass argument to probe() depending on
7442         argument_is_device.
7444 2008-02-24  Bean  <bean123ch@gmail.com>
7446         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7447         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7448         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7449         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7450         (GRUB_ISO9660_VOLDESC_END): Likewise.
7451         (grub_iso9660_primary_voldesc): New member escape.
7452         (grub_iso9660_data): New member joliet.
7453         (grub_iso9660_convert_string): New function.
7454         (grub_iso9660_mount): Detect joliet extension.
7455         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7456         (grub_iso9660_iso9660_label): Likewise.
7458         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7459         (grub_setup_SOURCES): Add fs/udf.c.
7460         (grub_fstest_SOURCES): Likewise.
7461         (udf_mod_SOURCES): New variable.
7462         (udf_mod_CFLAGS): Likewise.
7463         (udf_mod_LDFLAGS): Likewise.
7465         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7466         (grub_emu_SOURCES): Likewise.
7468         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7470         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7472         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7474         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7476         * fs/udf.c: New file.
7478 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7480         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7481         (normal/lexer.c_DEPENDENCIES): New variables.
7482         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7483         (normal/lexer.c_DEPENDENCIES): Likewise.
7484         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7485         (normal/lexer.c_DEPENDENCIES): Likewise.
7486         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7487         (normal/lexer.c_DEPENDENCIES): Likewise.
7488         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7489         (normal/lexer.c_DEPENDENCIES): Likewise.
7490         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7491         (normal/lexer.c_DEPENDENCIES): Likewise.
7493 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7495         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7496         since they were intended to be in hex.  This didn't break previously
7497         because of a bug in gpt_partition_map_iterate() (see below).
7499         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7500         when checking the validity of GPT header.
7501         Remove `partno', since it always provides the same information as `i'.
7503 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7505         * include/grub/efi/time.h: Fix a wrong comment.
7507 2008-02-19  Pavel Roskin  <proski@gnu.org>
7509         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7510         message.
7512 2008-02-19  Bean  <bean123ch@gmail.com>
7514         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7515         (aout_mod_SOURCES): New variable.
7516         (aout_mod_CFLAGS): Likewise.
7517         (aout_mod_LDFLAGS): Likewise.
7518         (_bsd_mod_SOURCES): New variable.
7519         (_bsd_mod_CFLAGS): Likewise.
7520         (_bsd_mod_LDFLAGS): Likewise.
7521         (bsd_mod_SOURCES): New variable.
7522         (bsd_mod_CFLAGS): Likewise.
7523         (bsd_mod_LDFLAGS): Likewise.
7525         * include/grub/aout.h: New file.
7527         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7529         * include/grub/i386/bsd.h: New file.
7531         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7532         to make it public.
7534         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7535         function is called, so that it's possible to change it inside the hook.
7536         (grub_elf64_load): Likewise.
7537         (grub_elf_file): Don't close the file if elf header is not found.
7538         (grub_elf_close): Close the file if grub_elf_file fails (The new
7539         grub_elf_file won't close it).
7540         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7541         (grub_elf64_size): Likewise.
7543         * kern/i386/loader.S (grub_unix_real_boot): New function.
7545         * loader/aout.c: New file.
7547         * loader/i386/bsd.c: New file.
7549         * loader/i386/bsd_normal.c: New file.
7551         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7553         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7554         can test other formats.
7556 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7558         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7559         (grub_gpt_partition_type_empty): Redefine with macro from
7560         `<grub/gpt_partition.h>'.
7561         (gpt_partition_map_iterate): Adjust partition type comparison.
7563         Export `entry' as partmap-specific `part.data' struct.
7564         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7566         * include/grub/gpt_partition.h (grub_gpt_header)
7567         (grub_gpt_partentry): ... to here (new file).
7569         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7571         (grub_gpt_partition_type_bios_boot): New const variable, defined
7572         with macro from `<grub/gpt_partition.h>'.
7574         (setup): Replace `first_start' with `embed_region', which keeps
7575         track of the embed region (and is partmap-agnostic).
7577         Replace find_first_partition_start() with find_usable_region(),
7578         which finds a usable region for embedding using partmap-specific
7579         knowledge (supports PC/MSDOS and GPT).
7581         Fix all assumptions that the embed region start at sector 1, using
7582         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7583         rather than `first_start' to calculate available size.
7585         In grub_util_info() message, replace "into after the MBR" with an
7586         indication of the specific sector our embed region starts at.
7588 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7590         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7591         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7592         `commands/reboot.c'.
7593         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7594         (halt_mod_SOURCES): Likewise.
7595         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7596         (halt_mod_SOURCES): Likewise.
7598 2008-02-17  Christian Franke  <franke@computer.org>
7600         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7602 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7604         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7605         set `first_start' to 0 for non-PC/MSDOS partition maps.
7607 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7609         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7610         do not assume partition map is PC/MSDOS before performing checks that
7611         are specific to that layout.
7613 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7615         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7616         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7617         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7619 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7621         * configure.ac: Only a cosmetic change on the handling of
7622         -fno-stack-protector.
7624 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7626         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7627         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7628         reboot.c.
7629         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7630         (halt_mod_SOURCES): New variable.
7631         (halt_mod_CFLAGS): Likewise.
7632         (halt_mod_LDFLAGS): Likewise.
7633         (reboot_mod_SOURCES): Likewise.
7634         (reboot_mod_CFLAGS): Likewise.
7635         (reboot_mod_LDFLAGS): Likewise.
7637         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7638         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7639         reboot.c.
7640         (halt_mod_SOURCES): Likewise.
7641         (reboot_mod_SOURCES): Likewise.
7643         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7644         commands/i386/pc/reboot.c by commands/reboot.c.
7645         (reboot_mod_SOURCES): Likewise.
7647         * commands/i386/pc/reboot.c: merge this file ...
7649         * commands/ieee1275/reboot.c: ... and this file ...
7651         * commands/reboot.c: ... to this file.
7652         Add some precompiler directive to include the correct header for
7653         each machine.
7655         * commands/ieee1275/halt.c: move this file ...
7657         * commands/halt.c: ... to here.
7658         Add some precompiler directive to include the correct header for
7659         each machine.
7661         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7662         (grub_halt): Likewise.
7664         * kern/efi/efi.c (grub_reboot): New function.
7665         (grub_halt): Likewise.
7667 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7669         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7670         /dev (like it is done for /dev/mapper).  This doesn't provide support
7671         for EVMS, but at least it is now easy to identify the problem when it
7672         arises.
7674 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7676         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7677         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7678         comparing it with -1, not 0.
7680 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7682         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7683         `disk/lvm.c'.
7684         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7685         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7687         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7688         `disk/lvm.c' to the end of the list.
7689         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7690         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7692 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7694         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7695         grub_print_error() instead.  This will let user know why we're entering
7696         rescue mode.
7697         Based on suggestions from Sam Morris.
7699 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7701         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7702         on remaining N args, instead of "--" arg N times.
7704 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7706         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7707         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7708         pattern for unknown glyphs.
7710 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7712         * configure.ac: Probe for `help2man'.
7713         * Makefile.in (builddir): New variable.
7714         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7715         or otherwise add a few flags/options to it.
7716         (install-local): For every executable utility or script that is
7717         installed, invoke $(HELP2MAN) to install a manpage based on --help
7718         output.
7720         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7721         that it doesn't prevent --help from working in build tree.
7723         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7724         with `bug-grub@gnu.org'.
7725         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7726         * util/update-grub.in (usage): New function.
7727         Implement proper argument check, with support for --help and --version
7728         (as well as existing -y).
7730 2008-02-09  Christian Franke  <franke@computer.org>
7732         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7733         avoid overwriting previous output.
7734         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7736 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7738         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7739         drawing the menu.
7741 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7743         * commands/sleep.c: New file.
7744         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7745         (sleep_mod_SOURCES): New variable.
7746         (sleep_mod_CFLAGS): Likewise.
7747         (sleep_mod_LDFLAGS): Likewise.
7749 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7751         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7752         situations in which we can deduce the RAID size and the superblock
7753         doesn't match it.
7755 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7757         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7758         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7759         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7761         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7762         and return a grub_diskmemberlist_t composed of physical array members.
7763         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7765         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7766         prototype.
7767         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7768         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7769         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7771         * util/grub-probe.c (probe): Move partmap probing code from here ...
7772         (probe_partmap): ... to here.
7773         (probe): Use probe_partmap() once for the disk we're probing, and
7774         additionally, when such disk contains a memberlist() struct member,
7775         once for each disk that is contained in the structure returned by
7776         memberlist().
7778 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7780         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7781         environment variable to 'all' in order to obtain debug output from
7782         non-util/ code.
7783         * util/i386/pc/grub-setup.c (main): Likewise.
7785 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7787         * disk/raid.c (grub_raid_scan_device): Check for
7788         `array->device[sb.this_disk.number]' rather than for
7789         `array->device[sb.this_disk.number]->name', since the latter is not
7790         guaranteed to be accessible.
7792 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7794         * disk/raid.c: Update copyright.
7795         * fs/cpio.c: Likewise.
7796         * include/grub/raid.h: Likewise.
7797         * loader/i386/pc/multiboot.c: Likewise.
7798         * util/hostfs.c: Likewise.
7800 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7802         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7803         to a grub_disk_t array.
7804         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7805         `device[x]'.
7806         (grub_raid_scan_device): Replace `device[x].name' accesses with
7807         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7809 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7811         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7812         grub_dprintf() calls.
7813         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7814         error message.
7816 2008-02-07  Christian Franke  <franke@computer.org>
7818         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7819         instead of fseek and ftell to support large files.
7820         (grub_hostfs_read): Likewise.
7822 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7824         Patch from Jeroen Dekkers.
7825         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7826         failure, since successfully reading all array members might not be
7827         required.
7829 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7831         * util/grub-probe.c (probe): Simplify partmap probing (with the
7832         assumption that the first word up to the underscore equals to
7833         the module name).
7835 2008-02-06  Christian Franke  <franke@computer.org>
7837         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7838         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7839         last block of a cpio or tar stream.
7840         Check for "TRAILER!!!" instead of any empty data
7841         block to detect last block of a cpio stream.
7842         (grub_cpio_dir): Fix constness of variable np.
7843         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7844         cpio or tar trailer is detected.  This fixes a crash
7845         on open of a non existing file.
7847 2008-02-05  Bean  <bean123ch@gmail.com>
7849         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7850         address of entry.
7851         (grub_multiboot_load_elf64): Likewise.
7852         (grub_multiboot): Initialize mbi structure.
7854         * util/grub-fstest.c: Don't include unused header file script.h.
7856         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7857         of file.
7858         (grub_fstest_SOURCES): Likewise.
7860 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7862         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7863         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7864         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7865         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7867         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7868         (translation_table): Replace hardcoded values with macros
7869         provided by `<grub/term.h>'.
7871         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7872         (keyboard_map): Correct/add a few values, with macros provided
7873         by `<grub/term.h>'.
7874         (keyboard_map_shift): Zero values that don't differ from their
7875         `keyboard_map' equivalents.
7876         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7877         Discard the second scan code that is always sent by Caps lock.
7878         Only use `keyboard_map_shift' when it provides a non-zero value,
7879         otherwise fallback to `keyboard_map'.
7881 2008-02-04  Bean  <bean123ch@gmail.com>
7883         * Makefile.in (enable_grub_fstest): New variable.
7885         * conf/common.rmk (grub_fstest_init.lst): New rule.
7886         (grub_fstest_init.h): Likewise.
7887         (grub_fstest_init.c): Likewise.
7888         (util/grub-fstest.c_DEPENDENCIES): New variable.
7889         (grub_fstest_SOURCES): Likewise.
7891         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7893         * util/grub-fstest.c: New file.
7895 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7897         Make grub-setup handle a separate root device.
7899         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7900         so that the root device can be compared with the destination
7901         device.
7902         When embedding the core image, if the root and destination devices
7903         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7904         0xFF.
7905         When not embedding, set ROOT_DRIVE to 0xFF.
7907 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7909         Add support for having a grub directory in a different drive. This
7910         is still only the data handling part.
7912         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7913         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7914         (grub_root_drive): New variable.
7916         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7917         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7918         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7919         as it was.
7921         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7923         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7924         macro.
7925         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7927         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7928         is bogus, because PXE booting does not specify any drive
7929         correctly.
7931         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7932         am not sure if this is really correct.
7934         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7935         is always identical to the boot drive when booting from a CD.
7937         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7938         longer.
7939         (root_drive): New variable.
7940         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7941         (setup_sectors): Push %dx right after popping it, because %dh will
7942         be modified later.
7943         (copy_buffer): Restore %dx.
7945 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7947         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7948         use `cdboot.img' for cdrom images.
7950 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7952         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7953         only setup gfxterm when `font' command has succeeded.
7955 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7957         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7958         (grub_rescue_cmd_multiboot_loader)
7959         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7961 2008-02-03  Pavel Roskin  <proski@gnu.org>
7963         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7964         %edx and %esi from stack only after grub_gate_a20() is called.
7965         grub_gate_a20() clobbers %edx.
7967 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7969         * configure.ac (AC_INIT): Bumped to 1.96.
7971         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7972         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7973         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7974         video/readers/png.c.
7976 2008-02-03  Bean  <bean123ch@gmail.com>
7978         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7979         (cdboot_img_SOURCES): New variable.
7980         (cdboot_img_ASFLAGS): New variable.
7981         (cdboot_img_LDFLAGS): New variable.
7983         * boot/i386/pc/cdboot.S: New file.
7985         * disk/i386/pc/biosdisk.c (cd_start): New variable.
7986         (cd_count): Likewise.
7987         (grub_biosdisk_get_drive): Add support for cd device.
7988         (grub_biosdisk_call_hook): Likewise.
7989         (grub_biosdisk_iterate): Likewise.
7990         (grub_biosdisk_open): Likewise.
7991         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7992         (grub_biosdisk_rw): Support reading from cd device.
7993         (GRUB_MOD_INIT): Iterate cd devices.
7995         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7996         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7997         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7999         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8001 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8003         * commands/read.c: New file.
8004         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8005         (read_mod_SOURCES): New variable.
8006         (read_mod_CFLAGS): Likewise.
8007         (read_mod_LDFLAGS): Likewise.
8009 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8011         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8012         determining whether menu has to be displayed.
8014 2008-02-02  Marco Gerards  <marco@gnu.org>
8016         * bus/pci.c: New file.
8018         * include/grub/pci.h: Likewise.
8020         * include/grub/i386/pc/pci.h: Likewise.
8022         * commands/lspci.c: Likewise.
8024         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8025         `lspci.mod'.
8026         (pci_mod_SOURCES): New variable.
8027         (pci_mod_CFLAGS): Likewise.
8028         (pci_mod_LDFLAGS): Likewise.
8029         (lspci_mod_SOURCES): Likewise.
8030         (lspci_mod_CFLAGS): Likewise.
8031         (lspci_mod_LDFLAGS): Likewise.
8033 2008-02-02  Bean  <bean123ch@gmail.com>
8035         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8036         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8038         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8039         (grub_xfs_btree_node): New structure.
8040         (grub_xfs_btree_root): New structure.
8041         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8042         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8043         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8044         (GRUB_XFS_EXTENT_SIZE): Likewise.
8045         (grub_xfs_read_block): Support btree format type.
8046         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8047         Use directory block as basic unit.
8049         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8051         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8052         __attribute__ ((__regparm__ (1))).
8054 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8056         Correct a mistake in previous commit.
8058         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8059         top.
8060         (normal/command.c_DEPENDENCIES): New variable.
8062 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8064         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8065         top.
8066         (normal/command.c_DEPENDENCIES): New variable.
8067         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8068         * conf/i386-ieee1275.rmk: Likewise.
8069         * conf/i386-linuxbios.rmk: Likewise.
8070         * conf/i386-pc.rmk: Likewise.
8071         * conf/sparc64-ieee1275.rmk: Likewise.
8072         * conf/powerpc-ieee1275.rmk: Likewise.
8073         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8075         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8077 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8079         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8080         call at beginning of function.
8082 2008-01-31  Pavel Roskin  <proski@gnu.org>
8084         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8085         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8086         (grub_mkrescue_SOURCES): Likewise.
8087         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8089 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8091         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8092         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8093         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8094         (grub_probe_SOURCES): ... to here.
8096         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8097         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8098         * conf/i386-ieee1275.rmk: Likewise.
8099         * conf/i386-linuxbios.rmk: Likewise.
8100         * conf/powerpc-ieee1275.rmk: Likewise.
8102 2008-01-30  Tristan Gingold  <gingold@free.fr>
8104         * kern/rescue.c: Silently accept empty lines.
8106 2008-01-29  Bean  <bean123ch@gmail.com>
8108         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8109         (real_code_2): Code cleanup and change comment style.
8110         (move_memory): Avoid using 32-bit address mode.
8112 2008-01-29  Bean  <bean123ch@gmail.com>
8114         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8115         (png_mod_SOURCES): New variable.
8116         (png_mod_CFLAGS): Likewise.
8117         (png_mod_LDFLAGS): Likewise.
8119         * video/readers/png.c: New file.
8121 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8123         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8124         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8125         `ifndef GRUB_MOD_GAP' hack.
8126         * util/elf/grub-mkimage.c (add_segments): Likewise.
8128 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8130         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8131         `GRUB_MOD_GAP' for platforms in which it's not defined.
8132         * util/elf/grub-mkimage.c (add_segments): Likewise.
8134 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8136         Get grub-emu to build again (including parallel builds).
8138         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8139         Split into ...
8140         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8141         (normal/execute.c_DEPENDENCIES): ... this, ...
8142         (grub-emu_DEPENDENCIES): ... and this.
8144         * conf/i386-efi.rmk: Likewise.
8145         * conf/i386-linuxbios.rmk: Likewise.
8146         * conf/i386-ieee1275.rmk: Likewise.
8147         * conf/powerpc-ieee1275.rmk: Likewise.
8148         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8150 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8152         * NEWS: Add a few items.
8154 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8156         Fix parallel builds with grub-emu.  Based on earlier commit for
8157         grub-probe and grub-setup.
8159         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8160         (util/grub-emu.c_DEPENDENCIES): ... this.
8161         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8162         (util/grub-emu.c_DEPENDENCIES): ... this.
8163         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8164         (util/grub-emu.c_DEPENDENCIES): ... this.
8165         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8166         (util/grub-emu.c_DEPENDENCIES): ... this.
8167         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8168         (util/grub-emu.c_DEPENDENCIES): ... this.
8170 2008-01-27  Pavel Roskin  <proski@gnu.org>
8172         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8173         to create a gap between _end and the modules added to the image
8174         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8175         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8176         * util/elf/grub-mkimage.c (add_segments): Likewise.
8178 2008-01-26  Pavel Roskin  <proski@gnu.org>
8180         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8181         just return an error.
8183 2008-01-26  Bean  <bean123ch@gmail.com>
8185         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8186         (grub_reiserfs_get_item): Save offset of the next item.
8187         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8189 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8191         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8192         make all filesystem sources appear together (possibly fixing omissions
8193         while at it).
8194         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8195         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8196         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8197         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8199         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8200         add `kern/file.c'.
8201         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8202         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8203         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8204         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8206         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8207         (probe): Add a sanity check to make sure of our ability to read
8208         requested files when probing for filesystem type.
8210         * genmk.rb: Update copyright year (2007).
8212         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8213         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8214         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8215         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8216         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8217         : Remove function prototypes.
8219 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8221         Revert my previous commits (based on wrong assumption of how grub_errno
8222         works).
8224         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8225         * kern/file.c (grub_file_open): Likewise.
8227 2008-01-24  Pavel Roskin  <proski@gnu.org>
8229         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8230         that hang if GRUB tries to setup colors.
8231         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8232         colors for firmwares that don't support it.
8233         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8234         Recognize Open Hack'Ware, set flags to work around its
8235         limitations.
8237 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8239         * kern/file.c (grub_file_open): Do not account previous failures of
8240         unrelated functions when grub_errno is checked for.
8241         Reported by Oleg Strikov.
8243 2008-01-24  Bean  <bean123ch@gmail.com>
8245         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8246         (grub_ufs_sblock): New member volume name.
8247         (grub_ufs_find_file): Fix string copy bug.
8248         (grub_ufs_label): Implement this function properly.
8250         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8251         (grub_hfs_iterate_records): Use the correct file number for extents
8252         and catalog file. Fix problem in next index calculation.
8253         (grub_hfs_find_node): Replace recursive function call with loop.
8254         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8256 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8258         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8259         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8260         (grub_multiboot2_real_boot): New function prototype.
8262         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8263         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8265         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8266         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8268 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8270         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8271         #ifdef'ed out grub_printf().
8273 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8275         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8276         grub_dprintf calls, since they make "debug=all" mode unusable.
8277         (grub_console_checkkey): Likewise.
8279 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8281         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8282         `term/i386/pc/at_keyboard.c'.
8283         (pkglib_MODULES): Add `serial.mod'.
8284         (serial_mod_SOURCES): New variable.
8285         (serial_mod_CFLAGS): Likewise.
8286         (serial_mod_LDFLAGS): Likewise.
8288         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8289         `<grub/powerpc/ieee1275/console.h>'.
8290         (grub_keyboard_controller_init): New function prototype.
8291         (grub_console_checkkey): Likewise.
8292         (grub_console_getkey): Likewise.
8294         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8295         keyboard on i386.
8297         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8298         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8300 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8302         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8303         present, "(memdisk)/boot/grub" becomes the default prefix.
8305         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8306         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8307         allows users to overlay additional files into the image.
8309 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8311         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8312         and `machine/memory.h'.
8313         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8314         (_multiboot_mod_SOURCES): New variable.
8315         (_multiboot_mod_CFLAGS): Likewise.
8316         (_multiboot_mod_LDFLAGS): Likewise.
8317         (multiboot_mod_SOURCES): Likewise.
8318         (multiboot_mod_CFLAGS): Likewise.
8319         (multiboot_mod_LDFLAGS): Likewise.
8321         * include/grub/i386/ieee1275/loader.h: New file.
8323         * include/grub/i386/ieee1275/machine.h: Likewise.
8325         * include/grub/i386/ieee1275/memory.h: Likewise.
8327         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8328         variable declaration.
8329         (grub_os_area_size): Likewise.
8331         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8332         (grub_lower_mem, grub_upper_mem): New variables.
8333         (grub_stop_floppy): New function (just to make
8334         grub_multiboot2_real_boot() happy).
8336         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8337         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8338         (grub_stop): New function.
8339         Include `"../realmode.S"' and `"../loader.S"'.
8341         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8342         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8344         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8345         rely on grub_multiboot2_real_boot() for final boot.
8347 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8349         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8350         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8351         device that doesn't look like an SD card.
8352         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8353         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8354         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8355         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8356         found.
8358 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8360         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8361         avoid claiming over our own code.
8363 2008-01-22  Bean  <bean123ch@gmail.com>
8365         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8366         (jpeg_mod_SOURCES): New variable.
8367         (jpeg_mod_CFLAGS): Likewise.
8368         (jpeg_mod_LDFLAGS): Likewise.
8370         * video/readers/jpeg.c : New file.
8372 2008-01-22  Bean  <bean123ch@gmail.com>
8374         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8375         there are no more items.
8377 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8379         * kern/mm.c (grub_mm_init_region): Improve debug message.
8381 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8383         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8384         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8385         address.
8386         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8387         a C macro.
8388         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8389         Indicates start of upper memory.
8390         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8391         (generate_image): Abort when image size is big enough to corrupt
8392         upper memory.
8394         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8395         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8396         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8397         instead of hardcoding 0xA0000.
8398         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8399         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8400         instead of hardcoding 0xA0000.
8402 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8404         * disk/memdisk.c (memdisk_size): New variable.
8405         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8406         `memdisk_size'.
8407         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8408         image to dynamic memory.
8409         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8410         `memdisk_size'.  Free memdisk block.
8412 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8414         Fix detection of very small filesystems (like tar).
8416         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8417         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8418         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8419         a problem with this disk).
8421 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8423         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8424         on grub_biosdisk_rw_standard() error.
8426 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8428         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8429         recent changes.
8430         * kern/elf.c: Likewise.
8431         * kern/ieee1275/ieee1275.c: Likewise.
8432         * kern/powerpc/ieee1275/openfw.c: Likewise.
8433         * term/ieee1275/ofconsole.c: Likewise.
8435 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8437         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8439         * include/grub/kernel.h (grub_arch_memdisk_addr)
8440         (grub_arch_memdisk_size): Moved from here ...
8442         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8443         (grub_arch_memdisk_size): ... to here.
8445 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8447         Mostly based on bugfix from Bean.
8449         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8450         attribute with hook() parameter.
8451         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8452         declaration.
8453         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8454         attribute with hook() parameter.
8455         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8456         declaration.
8458 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8460         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8461         (pkglib_MODULES): Add `memdisk.mod'.
8462         (memdisk_mod_SOURCES): New variable.
8463         (memdisk_mod_CFLAGS): Likewise.
8464         (memdisk_mod_LDFLAGS): Likewise.
8466         * disk/memdisk.c: New file.
8468         * include/grub/disk.h (grub_disk_dev_id): Add
8469         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8471         * include/grub/i386/pc/kernel.h
8472         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8473         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8474         (grub_kernel_image_size): New variable declaration.
8475         (grub_total_module_size): Likewise.
8476         (grub_memdisk_image_size): Likewise.
8478         * include/grub/i386/pc/memory.h
8479         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8481         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8482         (grub_arch_memdisk_addr): New variable declaration.
8483         (grub_arch_memdisk_size): Likewise.
8485         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8486         (grub_arch_memdisk_size): Likewise.
8488         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8489         (codestart): Replace hardcoded `0x100000' with
8490         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8492         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8493         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8494         not NULL, append the contents of the file it refers to, at the end of
8495         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8496         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8497         (options): Add "memdisk"|'m' option.
8498         (main): Parse --memdisk|-m option, and pass user-provided path as
8499         parameter to generate_image().
8501 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8503         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8504         grub_dprintf() calls from here ...
8505         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8507 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8509         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8511         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8512         declaration.
8513         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8514         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8515         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8516         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8517         property).
8518         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8519         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8521 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8523         Get rid of confusing function (superseded by
8524         `grub_ieee1275_get_integer_property')
8525         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8526         prototype.
8527         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8528         function.
8529         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8530         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8531         in native endianness from grub_ieee1275_get_integer_property().
8533 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8535         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8536         command after "shut-down", since implementations differ on which
8537         the command for halt is.
8539 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8541         * include/grub/i386/linuxbios/console.h: Add header protection.
8542         (grub_keyboard_controller_init): New function prototype.
8543         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8544         (KEYBOARD_COMMAND_READ): Likewise.
8545         (KEYBOARD_COMMAND_WRITE): Likewise.
8546         (KEYBOARD_SCANCODE_SET1): Likewise.
8547         (grub_keyboard_controller_write): New function.
8548         (grub_keyboard_controller_read): Likewise.
8549         (grub_keyboard_controller_init): Likewise.
8551         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8552         (grub_console_init): On coreboot/LinuxBIOS, call
8553         grub_keyboard_controller_init().
8555 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8557         PowerPC changes provided by Pavel Roskin.
8559         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8560         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8561         don't rely on cmain() doing it.
8562         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8563         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8565 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8567         * include/grub/i386/linuxbios/memory.h
8568         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8569         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8570         receive `table_header' as argument.  Instead, probe for it in the
8571         known memory ranges where it can be present.
8572         (grub_available_iterate): Do not pass a fixed `table_header' address
8573         to grub_linuxbios_table_iterate().
8575 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8577         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8578         * conf/i386-ieee1275.rmk: New file.
8579         * include/grub/i386/ieee1275/console.h: Likewise.
8580         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8581         * include/grub/i386/ieee1275/kernel.h: Likewise.
8582         * include/grub/i386/ieee1275/time.h: Likewise.
8583         * kern/i386/ieee1275/init.c: Likewise.
8584         * kern/i386/ieee1275/startup.S: Likewise.
8586 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8588         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8589         when pointers are 32-bit (but still do set it to one when they are
8590         64-bit).
8592 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8594         * include/grub/ieee1275/ieee1275.h
8595         (grub_ieee1275_get_integer_property): New function prototype.
8597         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8598         (grub_ieee1275_get_integer_property): New function.  Wraps around
8599         grub_ieee1275_get_property() to handle endianness.
8601         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8602         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8603         where appropriate.
8604         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8605         (grub_map): Likewise.
8606         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8608 2008-01-15  Bean  <bean123ch@gmail.com>
8610         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8611         (grub_script_execute_cmdline): Reset grub_errno.
8613         * normal/main.c (read_config_file): Reset grub_errno.
8615         * normal/parse.y (script_init): New.
8616         (script): Move function and menuentry here.
8617         (delimiter): New.
8618         (command): Add delimiter at the end of command.
8619         (commands): Adjust to match the new command.
8620         (commandblock): Remove grub_script_lexer_record_start.
8621         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8622         (if): Use the new commands.
8624         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8626 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8628         * normal/menu.c (run_menu): Move timeout message from here ...
8629         (print_timeout): ... to here.
8630         (run_menu): Use print_timeout() once during initial draw to print
8631         the whole message, and again in every clock tick to update only
8632         the number of seconds.
8634 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8636         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8637         actual size of `available' from grub_ieee1275_get_property(), and
8638         restrict parsing to that bound.
8640 2008-01-15  Christian Franke  <franke@computer.org>
8642         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8643         (argp_program_version): Remove variable.
8644         (argp_program_bug_address): Likewise.
8645         (options): Convert from struct argp_option to struct option.
8646         (struct arguments): Remove.
8647         (parse_opt): Remove.
8648         (usage): New function.
8649         (main): Replace struct args members by simple variables.
8650         Replace argp_parse() by getopt_long().
8651         Add switch to evaluate options.
8652         Add missing "(...)" around root_dev in prefix string.
8654 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8656         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8657         for grub_ieee1275_exit(), in order to improve portability.
8659 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8661         * util/grub.d/10_linux.in (prefix): Define.
8662         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8664 2008-01-13  Pavel Roskin  <proski@gnu.org>
8666         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8667         grub_errno if no errors have been detected.
8669 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8671         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8672         (grub_util_get_dev_abstraction): New function prototype.
8674         * util/getroot.c: Include `<grub/util/getroot.h>'
8675         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8676         (grub_util_get_dev_abstraction): ... here (new function).
8678         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8679         `PRINT_ABSTRACTION'.
8680         (probe): Probe for abstraction type when requested.
8681         (main): Understand `--target=abstraction'.
8683         * util/i386/efi/grub-install.in: Add abstraction module to core
8684         image when it is found to be necessary.
8685         * util/i386/pc/grub-install.in: Likewise.
8686         * util/powerpc/ieee1275/grub-install.in: Likewise.
8688         * util/update-grub_lib.in (font_path): Return system path without
8689         converting to GRUB path.
8690         * util/update-grub.in: Convert system path returned by font_path()
8691         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8692         abstraction module is needed for loading fonts (if any).  Export
8693         that as `GRUB_PRELOAD_MODULES'.
8694         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8695         insmod commands).
8697 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8699         Remove some unused code from reiserfs.
8701         * fs/reiserfs.c (struct grub_reiserfs_key)
8702         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8703         (struct grub_reiserfs_node_body): Removed.
8704         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8705         Likewise.
8706         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8707         Likewise.
8708         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8709         Likewise.
8710         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8711         Likewise.
8712         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8713         Likewise.
8714         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8715         Likewise.
8716         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8717         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8718         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8720 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8722         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8723         Determines if a file is garbage left by packaging systems, etc.
8724         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8725         for processing /etc/grub.d scripts.
8726         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8727         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8728         as a condition for processing Linux images.
8730 2008-01-10  Pavel Roskin  <proski@gnu.org>
8732         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8733         to compile reiserfs.c on PowerPC.
8735 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8737         * kern/device.c (grub_device_iterate): Do not abort device iteration
8738         when one of the devices cannot be opened.
8739         * kern/disk.c (grub_disk_open): Do not account previous failures of
8740         unrelated functions when grub_errno is checked for.
8742 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8744         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8745         `! grub_linux_is_bzimage', change order of address comparison to make
8746         it more intuitive, and improve "too big zImage" error message.
8748 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8750         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8751         `$(update-grub_DATA)'.
8752         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8753         targets.
8755 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8757         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8758         which instruction is modified by grub-setup during installation
8759         (since it wasn't obvious by only looking at this file).
8761 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8763         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8764         listing actual TODO items.
8766 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8768         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8769         correctly.
8770         (grub_reiserfs_get_key_offset): Likewise.
8771         (grub_reiserfs_set_key_offset): Likewise.
8772         (grub_reiserfs_set_key_type): Likewise.
8773         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8775         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8776         better to remove the bitfield version completely.
8778 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8780         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8781         allocated from the heap, due to the fshelp implementation.
8782         (grub_reiserfs_dir): Free NODE, due to the same reason.
8784 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8786         Mostly from Vincent Pelletier:
8788         * fs/reiserfs.c: New file.
8790         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8791         (reiserfs_mod_SOURCES): New variable.
8792         (reiserfs_mod_CFLAGS): Likewise.
8793         (reiserfs_mod_LDFLAGS): Likewise.
8795         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8796         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8797         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8798         normal/color.c.
8800 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8802         * normal/color.c: Remove `<grub/env.h>'.
8804 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8806         * include/grub/normal.h: Include <grub/env.h>.
8808 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8810         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8811         usage example with `(hd0,1)'.
8812         Reported by Samuel Thibault.
8814 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8816         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8817         (grub_linux_boot_zimage): Rename to ...
8818         (grub_linux_boot): ... this.
8819         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8820         (grub_linux_boot_zimage): Conditionalize zImage copy.
8822         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8823         (grub_linux_boot_bzimage): Remove prototype.
8824         (grub_linux_boot_zimage): Rename to ...
8825         (grub_linux_boot): ... this.
8827         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8828         (grub_linux_boot): Remove function.
8830 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8832         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8833         (grub_env_write_color_highlight): Likewise.
8834         (grub_wait_after_message): Likewise.
8836         * normal/color.c: New file.
8838         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8839         (normal_mod_DEPENDENCIES): Likewise.
8841         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8842         (normal_mod_DEPENDENCIES): Likewise.
8844         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8845         (normal_mod_DEPENDENCIES): Likewise.
8847         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8848         (normal_mod_DEPENDENCIES): Likewise.
8850         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8851         for waiting after a message is printed.
8852         * normal/main.c (read_config_file): Likewise.
8853         (grub_normal_init): Register grub_env_write_color_normal() and
8854         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8855         `color_highlight' variables as global.
8857         * normal/menu.c (grub_wait_after_message): New function.
8858         (grub_color_menu_normal): New variable.  Replaces ...
8859         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8860         (grub_color_menu_highlight): New variable.  Replaces ...
8861         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8862         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8863         `GRUB_TERM_COLOR_STANDARD'.
8864         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8865         `normal_code' and `highlight_code' to `old_color_normal' and
8866         `old_color_highlight', respectively.
8867         (grub_menu_init_page): Update colors when drawing the menu, based on
8868         `menu_color_normal' and `menu_color_highlight' variables.
8869         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8870         a message is printed.
8872 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8874         * kern/env.c (grub_env_context_open): Propagate hooks for global
8875         variables to new context.
8877         * kern/main.c (grub_set_root_dev): Export `root' variable.
8879 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8881         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8882         discs unconditionally, since udev and others have options to provide
8883         them.
8885 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8887         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8889 2008-01-04  Christian Franke  <franke@computer.org>
8891         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8892         of eisa_mmap.
8894 2008-01-03  Pavel Roskin  <proski@gnu.org>
8896         * kern/i386/linuxbios/init.c: Put "void" to all function
8897         declarations with no arguments.
8898         * kern/powerpc/ieee1275/init.c: Likewise.
8899         * term/i386/pc/at_keyboard.c: Likewise.
8900         * term/i386/pc/vga_text.c: Likewise.
8901         * util/grub-mkdevicemap.c: Likewise.
8903 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8905         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8906         message when loaded image is out of bounds.
8907         (grub_multiboot_load_elf64): Likewise.
8909 2008-01-02  Pavel Roskin  <proski@gnu.org>
8911         * util/grub.d/10_linux.in: Try version without ".old" when
8912         looking for initrd.  It's better to use initrd from the newer
8913         kernel of the same version than no initrd at all.
8915 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8917         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8919 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8921         * include/grub/video.h: Added grub_video_unmap_color and
8922         grub_video_get_active_render_target.
8923         (grub_video_adapter): Added unmap_color and get_active_render_target.
8925         * video/video.c: Added grub_video_unmap_color and
8926         grub_video_get_active_render_target.
8927         (grub_video_get_info): Changed method to accept NULL pointer as an
8928         argument to allow detection of active video adapter.
8930         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8931         grub_video_vbe_unmap_color_int.
8932         Added grub_video_vbe_unmap_color and
8933         grub_video_vbe_get_active_render_target.
8934         (grub_video_vbe_adapter): Added unmap_color and
8935         get_active_render_target.
8937         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8938         with grub_video_vbe_unmap_color_int.
8940         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8941         (DEFAULT_NORMAL_COLOR): Likewise.
8942         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8943         (DEFAULT_FG_COLOR): Removed.
8944         (DEFAULT_BG_COLOR): Likewise.
8945         (DEFAULT_CURSOR_COLOR): Changed value.
8946         (grub_virtual_screen): Added standard_color_setting,
8947         normal_color_setting, highlight_color_setting and term_color.
8948         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8949         (bitmap_width): Added.
8950         (bitmap_height): Likewise.
8951         (bitmap): Likewise.
8952         (set_term_color): Likewise.
8953         (grub_virtual_screen_setup): Changed to use new terminal coloring
8954         settings.
8955         (grub_gfxterm_init): Added init for bitmap.
8956         (grub_gfxterm_fini): Added destroy for bitmap.
8957         (redraw_screen_rect): Updated to use background bitmap and new
8958         terminal coloring.
8959         (scroll_up): Added optimization for case when there is no bitmap.
8960         (grub_gfxterm_cls): Fixed to use correct background color.
8961         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8962         coloring.
8963         (grub_virtual_screen_setcolor): Likewise.
8964         (grub_virtual_screen_getcolor): Added.
8965         (grub_gfxterm_background_image_cmd): Likewise.
8966         (grub_video_term): Added setcolor and getcolor.
8967         (MOD_INIT): Added registration of background_image command.
8968         (MOD_TERM): Added unregistration for background_image command.
8970 2007-12-30  Pavel Roskin  <proski@gnu.org>
8972         * loader/multiboot_loader.c: Fix multiboot command
8973         unregistration.  Fix all typos in the word "multiboot".
8975 2007-12-29  Pavel Roskin  <proski@gnu.org>
8977         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8978         support for initrd names used in Fedora.
8980 2007-12-26  Bean  <bean123ch@gmail.com>
8982         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8983         (cpio_mod_SOURCES): New variable.
8984         (cpio_mod_CFLAGS): Likewise.
8985         (cpio_mod_LDFLAGS): Likewise.
8987         * fs/cpio.c: New file.
8989         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8991         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8993         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8995         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8997 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8999         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9000         (grub_getcolor): New function.
9002         * kern/term.c (grub_getcolor): New function.
9003         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9004         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9005         (print_entry): Set normal and highlight colors to
9006         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9007         respectively, before printing and restore them to old
9008         values afterwards.
9009         (grub_menu_init_page): Likewise.  Fill an additional colored space
9010         that would otherwise be left blank.
9012         * term/efi/console.c (grub_console_getcolor): New function.
9013         (struct grub_console_term.getcolor): New variable.
9014         * term/i386/pc/console.c (grub_console_getcolor): New function.
9015         (struct grub_console_term.getcolor): New variable.
9016         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9017         (struct grub_console_term.getcolor): New variable.
9019         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9020         (struct grub_console_term.setcolor): Remove variable.
9021         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9022         (struct grub_console_term.setcolor): Remove variable.
9023         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9024         (struct grub_console_term.setcolor): Remove variable.
9025         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9026         (struct grub_console_term.setcolor): Remove variable.
9028 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9030         * configure.ac: Search for possible unifont.hex locations, and
9031         define UNIFONT_HEX if found.
9033         * Makefile.in (UNIFONT_HEX): Define variable.
9034         (DATA): Rename to ...
9035         (PKGLIB): ... this.  Update all users.
9036         (PKGDATA): New variable.
9037         (pkgdata_IMAGES): Rename to ...
9038         (pkglib_IMAGES): ... this. Update all users.
9039         (pkgdata_MODULES): Rename to ...
9040         (pkglib_MODULES): ... this. Update all users.
9041         (pkgdata_PROGRAMS): Rename to ...
9042         (pkglib_PROGRAMS): ... this. Update all users.
9043         (pkgdata_DATA): Rename to ...
9044         (pkglib_DATA): ... this. Update all users.
9045         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9046         (unicode.pff, ascii.pff): New rules.
9047         (all-local): Add `$(PKGDATA)' dependency.
9048         (install-local): Process `$(PKGDATA)'.
9050         * util/update-grub_lib.in (font_path): Search for *.pff files in
9051         a few more locations, including `${pkgdata}'.
9053 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9055         Patch from Bean  <bean123ch@gmail.com>:
9056         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9057         `size'.
9059 2007-12-21  Bean  <bean123ch@gmail.com>
9061         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9062         (ntfscomp_mod_SOURCES): New variable.
9063         (ntfscomp_mod_CFLAGS): Likewise.
9064         (ntfscomp_mod_LDFLAGS): Likewise.
9066         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9067         (grub_probe_SOURCES): Likewise.
9068         (grub_emu_SOURCES): Likewise.
9070         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9071         (grub_emu_SOURCES): Likewise.
9073         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9074         (grub_emu_SOURCES): Likewise.
9076         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9077         (grub_emu_SOURCES): Likewise.
9079         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9080         (read_run_list): Renamed to grub_ntfs_read_run_list.
9081         (decomp_nextvcn): Moved to ntfscomp.c.
9082         (decomp_getch): Likewise.
9083         (decomp_get16): Likewise.
9084         (decomp_block): Likewise.
9085         (read_block): Likewise.
9086         (read_data): Partially moved to ntfscomp.c.
9087         (fixup): Change unsigned to grub_uint16_t.
9088         (read_mft): Change unsigned long to grub_uint32_t.
9089         (read_attr): Likewise.
9090         (read_data): Likewise.
9091         (read_run_data): Likewise.
9092         (read_run_list): Likewise.
9093         (read_mft): Likewise.
9095         * fs/ntfscomp.c: New file.
9097         * include/grub/ntfs.h: New file.
9099 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9101         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9102         IDE disk check, since Linux is known to support 20 IDE disks.
9103         Reported by Colin Watson.
9105 2007-12-15  Bean  <bean123ch@gmail.com>
9107         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9108         (lnxboot_img_SOURCES): New variable.
9109         (lnxboot_img_ASFLAGS): Likewise.
9110         (lnxboot_img_LDFLAGS): Likewise.
9112         * boot/i386/pc/lnxboot.S: New file.
9114 2007-11-24  Pavel Roskin  <proski@gnu.org>
9116         * configure.ac: Test if '--build-id=none' is supported by the
9117         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9118         objcopy to generate incorrect binary files (binutils
9119         2.17.50.0.18-1 as shipped by Fedora 8).
9120         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9121         linking, so that build ID doesn't break the test.
9123 2007-11-24  Pavel Roskin  <proski@gnu.org>
9125         * include/grub/i386/time.h: use "void" in the argument list
9126         of grub_cpu_idle().
9127         * include/grub/powerpc/time.h: Likewise.
9128         * include/grub/sparc64/time.h: Likewise.
9130 2007-11-18  Christian Franke  <franke@computer.org>
9132         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9133         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9134         This fixes the problem that function keys did not work in grub-emu.
9136 2007-11-18  Christian Franke  <franke@computer.org>
9138         * disk/host.c (grub_host_open): Remove attribute unused from
9139         name parameter. Add check for "host". This fixes the problem
9140         that grub-emu does not find partitions.
9142 2007-11-18  Christian Franke  <franke@computer.org>
9144         * util/hostfs.c (is_dir): New function.
9145         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9146         (grub_hostfs_read): Add missing fseek().
9147         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9148         of grub-emu on "ls (host)".
9150 2007-11-18  Christian Franke  <franke@computer.org>
9152         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9153         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9154         to 64 bit boundary by default.
9156 2007-11-18  Bean  <bean123ch@gmail.com>
9158         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9159         (hexdump_mod_SOURCES): New variable.
9160         (hexdump_mod_CFLAGS): Likewise.
9161         (hexdump_mod_LDFLAGS): Likewise.
9163         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9165         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9167         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9169         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9171         * include/grub/hexdump.h: New file.
9173         * commands/hexdump.c: New file.
9175 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9177         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9178         in grub_outb() calls.
9179         (beep_on): Likewise.
9181 2007-11-10  Christian Franke  <franke@computer.org>
9183         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9184         (grub_menu_run): Likewise.
9186 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9188         * include/grub/i386/efi/machine.h: New file.
9189         * include/grub/i386/linuxbios/machine.h: Likewise.
9190         * include/grub/i386/pc/machine.h: Likewise.
9191         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9192         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9194         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9195         (serial_hw_io_addr): New variable.
9196         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9197         instead of `(unsigned short *) 0x400'.
9199 2007-11-10  Bean  <bean123ch@gmail.com>
9201         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9203 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9205         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9206         (vga_mod_SOURCES): Added.
9207         (vga_mod_CFLAGS): Likewise.
9208         (vga_mod_LDFLAGS): Likewise.
9210         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9211         grub_outb() calls.
9212         (set_map_mask): Likewise.
9213         (set_read_map): Likewise.
9214         (set_read_address): Likewise.
9215         (vga_font): Removed variable.
9216         (get_vga_glyph): Removed function.
9217         (invalidate_char): Likewise.
9218         (write_char): Changed to use grub_font_get_glyph() for font
9219         information.
9220         (grub_vga_putchar): Likewise.
9221         (grub_vga_getcharwidth): Likewise.
9223 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9225         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9226         flags.
9227         (pxeboot_img_LDFLAGS): Likewise.
9228         (diskboot_img_LDFLAGS): Likewise.
9229         (kernel_img_LDFLAGS): Likewise.
9231 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9233         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9234         in grub_outb() calls.
9235         (serial_hw_init): Likewise.
9237 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9239         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9240         spaces.  Skip non-regular files.
9242 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9244         * kern/disk.c (grub_disk_firmware_fini)
9245         (grub_disk_firmware_is_tainted): New variables.
9247         * include/grub/disk.h (grub_disk_firmware_fini)
9248         (grub_disk_firmware_is_tainted): Likewise.
9250         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9251         (grub_disk_biosdisk_fini): ... to here.
9252         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9253         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9254         is set.  Register grub_disk_biosdisk_fini() in
9255         `grub_disk_firmware_fini'.
9257         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9258         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9259         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9260         to finish existing firmware disk interface.
9262         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9263         (ata_mod_SOURCES): New variable.
9264         (ata_mod_CFLAGS): Likewise.
9265         (ata_mod_LDFLAGS): Likewise.
9267 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9269         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9270         (grub_ata_wait): Reimplement using grub_millisleep().
9272         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9273         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9275 2007-11-03  Marco Gerards  <marco@gnu.org>
9277         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9278         (CRTC_ADDR_PORT): New macro.
9279         (CRTC_DATA_PORT): Likewise.
9280         (CRTC_CURSOR): Likewise.
9281         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9282         (CRTC_CURSOR_ADDR_LOW): Likewise.
9283         (update_cursor): New function.
9284         (grub_console_real_putchar): Call `update_cursor'.
9285         (grub_console_gotoxy): Likewise.
9286         (grub_console_cls): Set the default color when clearing the
9287         screen.
9288         (grub_console_setcursor): Implemented.
9290 2007-11-03  Marco Gerards  <marco@gnu.org>
9292         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9293         become activate.
9294         (grub_ata_pio_write): Likewise.
9296         (grub_atapi_identify): Wait after issuing an ATA command.
9297         (grub_atapi_packet): Likewise.
9298         (grub_ata_identify): Likewise.
9299         (grub_ata_readwrite): Likewise.
9301 2007-11-03  Marco Gerards  <marco@gnu.org>
9303         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9304         (grub_ata_pio_write): Likewise.
9305         (grub_ata_readwrite): Use `grub_error', instead of
9306         returning `grub_errno'.
9308 2007-11-03  Marco Gerards  <marco@gnu.org>
9310         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9311         grub_ata_pio_write once for every single sector, instead of for
9312         multiple sectors.
9314 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9316         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9318         * conf/i386-linuxbios.rmk: New file.
9320         * kern/i386/pc/hardware.c: Likewise.
9321         * term/i386/pc/at_keyboard.c: Likewise.
9322         * term/i386/pc/vga_text.c: Likewise.
9324         * include/grub/i386/linuxbios/boot.h: Likewise.
9325         * include/grub/i386/linuxbios/console.h: Likewise.
9326         * include/grub/i386/linuxbios/init.h: Likewise.
9327         * include/grub/i386/linuxbios/kernel.h: Likewise.
9328         * include/grub/i386/linuxbios/loader.h: Likewise.
9329         * include/grub/i386/linuxbios/memory.h: Likewise.
9330         * include/grub/i386/linuxbios/serial.h: Likewise.
9331         * include/grub/i386/linuxbios/time.h: Likewise.
9333         * kern/i386/linuxbios/init.c: Likewise.
9334         * kern/i386/linuxbios/startup.S: Likewise.
9335         * kern/i386/linuxbios/table.c: Likewise.
9337 2007-10-31  Marco Gerards  <marco@gnu.org>
9339         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9340         (ata_mod_SOURCES): New variable.
9341         (ata_mod_CFLAGS): Likewise.
9342         (ata_mod_LDFLAGS): Likewise.
9344         * disk/ata.c: New file.
9346         * include/grub/disk.h (grub_disk_dev_id): Add
9347         `GRUB_DISK_DEV_ATA_ID'.
9349 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9351         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9352         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9354         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9355         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9357         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9358         `<grub/types.h>'.
9360         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9362 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9364         * include/grub/types.h (ULONG_MAX): Define macro.
9366 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9368         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9369         `"../realmode.S"'.
9370         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9372 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9374         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9375         (pkgdata_MODULES): Add `biosdisk.mod'.
9376         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9377         variables.
9379         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9380         (grub_biosdisk_init): Replace with ...
9381         (GRUB_MOD_INIT(biosdisk)): ... this.
9382         (grub_biosdisk_fini): Replace with ...
9383         (GRUB_MOD_FINI(biosdisk)): ... this.
9385         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9386         (grub_machine_init): Remove call to grub_biosdisk_init().
9387         (grub_machine_fini): Remove call to grub_machine_fini().
9389         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9391 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9393         * include/grub/time.h: New file.
9394         * include/grub/i386/time.h: Likewise.
9395         * include/grub/powerpc/time.h: Likewise.
9396         * include/grub/sparc64/time.h: Likewise.
9398         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9399         instances to ...
9400         (KERNEL_MACHINE_TIME_HEADER): ... this.
9401         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9402         instances to ...
9403         (KERNEL_MACHINE_TIME_HEADER): ... this.
9404         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9405         instances to ...
9406         (KERNEL_MACHINE_TIME_HEADER): ... this.
9408         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9409         (grub_millisleep): New function.
9410         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9411         (grub_millisleep): New function.
9412         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9413         Remove `grub/machine/time.h' include.
9414         (grub_millisleep): New function.
9415         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9416         Remove `grub/machine/time.h' include.
9417         (grub_millisleep): New function.
9419         * include/grub/misc.h (grub_div_roundup): New function.
9421         * kern/misc.c: Include `<grub/time.h>'.
9422         (grub_millisleep_generic): New function.
9424         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9425         Add `time.h'.
9426         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9427         Add `time.h'.
9428         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9429         `machine/time.h'.  Add `time.h'.
9430         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9432 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9434         * include/grub/misc.h (grub_max): New function.
9436 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9438         * util/misc.c (grub_util_info): Call fflush() before returning.
9440 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9442         * genmk.rb (Image): Copy `extra_flags' from here ...
9443         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9445         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9446         to `argc' and `args' arguments.
9448 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9450         * kern/i386/loader.S: New file.
9452         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9453         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9454         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9455         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9456         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9457         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9458         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9459         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9460         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9461         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9462         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9463         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9464         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9465         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9467         * kern/i386/realmode.S: New file.
9469         * kern/i386/pc/startup.S (protstack): Moved from here ...
9470         * kern/i386/realmode.S (protstack)... to here.
9471         * kern/i386/pc/startup.S (gdt): Moved from here ...
9472         * kern/i386/realmode.S (gdt)... to here.
9473         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9474         * kern/i386/realmode.S (prot_to_real)... to here.
9476         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9477         `kern/i386/realmode.S'.
9479 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9481         * include/grub/i386/loader.h: New file.
9483         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9484         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9485         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9486         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9487         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9488         * include/grub/i386/loader.h (grub_linux_prot_size)
9489         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9490         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9491         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9492         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9494         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9496 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9498         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9499         filesystem when dev->disk is unset.
9500         Do probe for filesystem even when dev->disk->has_partitions is set.
9501         In case a filesystem is found, always report it.
9502         In case it isn't, if dev->disk->has_partitions is set, report that
9503         a partition table was found instead of reporting that no filesystem
9504         could be identified.
9506 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9508         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9509         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9511         * include/grub/types.h (grub_host_to_target16): New macro.
9512         (grub_host_to_target32): Likewise.
9513         (grub_host_to_target64): Likewise.
9514         (grub_target_to_host16): Likewise.
9515         (grub_target_to_host32): Likewise.
9516         (grub_target_to_host64): Likewise.
9518         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9519         Renamed from to ...
9520         (GRUB_MOD_ALIGN): ...this.  Update all users.
9522         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9523         grub_host_to_target32.
9524         Replace grub_be_to_cpu32 with grub_target_to_host32.
9525         (load_modules): Likewise.
9526         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9527         Replace grub_be_to_cpu32 with grub_target_to_host32.
9528         Replace grub_cpu_to_be16 with grub_host_to_target16.
9529         Replace grub_cpu_to_be32 grub_host_to_target32.
9531 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9533         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9534         * util/elf/grub-mkimage.c: ... here.
9536         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9537         `util/powerpc/ieee1275/grub-mkimage.c'.
9539 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9541         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9542         and make it easier to figure out.
9543         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9544         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9545         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9546         leave us with less than HEAP_MIN_SIZE total heap.
9547         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9549 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9551         * include/grub/i386/io.h: New file.
9552         * commands/i386/pc/play.c (inb): Removed.
9553         (outb): Removed.
9554         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9555         with grub_outb().
9556         * term/i386/pc/serial.c  (inb): Removed.
9557         (outb): Removed.
9558         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9559         with grub_outb().
9560         * term/i386/pc/vga.c  (inb): Removed.
9561         (outb): Removed.
9562         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9563         with grub_outb().
9565 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9567         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9568         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9569         Reported by Marcin Kurek.
9571 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9573         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9574         SmartFirmware version updates (as released by Sven Luther), and avoid
9575         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9576         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9577         known broken.
9579 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9581         From Hitoshi Ozeki:
9582         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9583         when merging two regions.
9585 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9587         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9588         * normal/completion.c (grub_normal_do_completion): Likewise.
9589         Reported by Hitoshi Ozeki.
9591 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9593         Do not use devices at boot in chainloading.
9595         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9596         (boot_part_addr): Likewise.
9597         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9598         with BOOT_DRIVE and BOOT_PART_ADDR.
9599         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9600         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9602 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9604         Patch from Simon Peter <dn.tlp@gmx.net>:
9605         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9606         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9607         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9608         util/i386/pc/grub-setup.c_DEPENDENCIES.
9609         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9610         util/grub-probe.c_DEPENDENCIES.
9611         * conf/powerpc-ieee1275.rmk: Likewise.
9613 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9615         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9616         to tell grub-mkdevicemap how to name devices.
9617         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9618         feature).
9620         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9621         util/i386/get_disk_name.c.
9622         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9623         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9624         util/ieee1275/get_disk_name.c.
9626         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9628         * DISTLIST: Add util/i386/get_disk_name.c and
9629         util/ieee1275/get_disk_name.c.
9631         * util/grub-mkdevicemap.c: Replace device naming logic with
9632         grub_util_get_disk_name() calls.
9634 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9636         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9637         (so that it works for both plural and singular quantities).
9639 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9641         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9642         so that [xz] isn't taken into account when determining order.
9644 2007-08-02  Marco Gerards  <marco@gnu.org>
9646         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9647         `include/multiboot2.h', `include/grub/elfload.h',
9648         `include/multiboot.h', `include/grub/multiboot.h',
9649         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9650         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9651         `kern/elf.c', `loader/multiboot_loader.c',
9652         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9653         `loader/i386/pc/multiboot2.c',
9654         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9655         `util/i386/pc/grub-mkrescue.in'.  Remove
9656         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9657         `include/grub/i386/pc/util/biosdisk.h' and
9658         `include/grub/powerpc/ieee1275/multiboot.h'.
9660 2007-08-02  Bean  <bean123ch@gmail.com>
9662         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9663         (ntfs_mod_SOURCES): New variable.
9664         (ntfs_mod_CFLAGS): Likewise.
9665         (ntfs_mod_LDFLAGS): Likewise.
9667         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9668         (grub_probe_SOURCES): Likewise.
9669         (grub_emu_SOURCES): Likewise.
9671         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9672         (grub_emu_SOURCES): Likewise.
9674         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9675         (grub_emu_SOURCES): Likewise.
9677         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9679         * fs/ntfs.c: New file.
9681 2007-08-02  Bean  <bean123ch@gmail.com>
9683         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9685         * file.h (grub_file): Likewise.
9687         * fshelp.h (grub_fshelp_read_file): Likewise.
9689         * util/i386/pc/grub-setup.c (setup): Likewise.
9690         (save_first_sector): Likewise.
9691         (save_blocklists): Likewise.
9693         * fs/affs.c (grub_affs_read_file): Likewise.
9695         * fs/ext2.c (grub_ext2_read_file): Likewise.
9697         * fs/fat.c (grub_fat_read_data): Likewise.
9699         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9701         * fs/hfs.c (grub_hfs_read_file): Likewise.
9703         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9705         * fs/jfs.c (grub_jfs_read_file): Likewise.
9707         * fs/minix.c (grub_minix_read_file): Likewise.
9709         * fs/sfs.c (grub_sfs_read_file): Likewise.
9711         * fs/ufs.c (grub_ufs_read_file): Likewise.
9713         * fs/xfs.c (grub_xfs_read_file): Likewise.
9715         * command/blocklist.c (read_blocklist): Likewise.
9716         (print_blocklist): Likewise.
9718 2007-08-02  Marco Gerards  <marco@gnu.org>
9720         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9721         `util/hostfs.c'.
9723         * disk/host.c: New file.
9725         * util/hostfs.c: Likewise.
9727         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9728         return `GRUB_ERR_BAD_FS'.
9729         * fs/sfs.c (grub_sfs_mount): Likewise.
9730         * fs/xfs.c (grub_xfs_mount): Likewise.
9732         * include/grub/disk.h (enum grub_disk_dev_id): Add
9733         `GRUB_DISK_DEVICE_HOST_ID'.
9735         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9737 2007-07-24  Jerone Young  <jerone@gmail.com>
9739         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9740         modules for compilation.
9741         * conf/powerpc-ieee1275.rmk: Likewise.
9743         * include/multiboot.h: Move multiboot definitions to one file. Rename
9744         many definitions to not get grub specific.
9745         * include/multiboot2.h: Create header with multiboot 2 definitions.
9746         * include/grub/multiboot.h: Header for grub specific function
9747         prototypes and definitions.
9748         * include/grub/multiboot2.h: Likewise.
9749         * include/grub/multiboot_loader.h: Likewise.
9750         * include/grub/i386/pc/multiboot.h: Removed.
9751         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9753         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9754         and 2 to allow for one multiboot and module commands.
9755         * loader/multiboot2.c: Add multiboot2 functionality.
9756         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9757         and definition names.
9758         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9759         2 functions.
9760         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9761         ieee1275 specific multiboot2 code.
9763         * kern/i386/pc/startup.S: Change headers and definition names for
9764         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9766 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9768         * geninitheader.sh: Process file specified in first parameter rather
9769         than hardcoding grub_modules_init.lst.
9770         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9771         than hardcoding grub_modules_init.h.
9773         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9774         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9775         grub_probe_init.[ch] and grub_setup_init.[ch].
9777         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9778         grub_modules_init.h with grub_emu_init.h.
9779         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9780         grub_probe_init.[ch] files.
9781         * conf/i386-efi.rmk: Likewise.
9782         * conf/i386-pc.rmk: Likewise.
9783         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9784         grub_setup_init.[ch] files.
9786         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9787         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9788         to initialize modules rather than a list of hardcoded functions.
9789         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9790         grub_init_all() to initialize modules rather than a list of hardcoded
9791         functions.
9793 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9795         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9796         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9798 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9800         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9801         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9802         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9803         flag when running on SmartFirmware.
9804         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9805         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9806         was set.
9808         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9809         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9810         rather than decreasing it.
9812         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9813         there's not enough space to do it, fail in the same way as when it
9814         can't be done because there are no partitions.
9816         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9817         when nvsetenv failed.
9819 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9821         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9822         because this rule is automatically generated.
9823         (grub-mkrescue): Removed for the same reason as above.
9825 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9827         Migrate to GNU General Public License Version 3.
9829         * COPYING: Replaced with the plain text version of GPLv3.
9831         * config.guess: Updated from gnulib.
9832         * config.sub: Likewise.
9834         * geninit.sh: Output a GPLv3 copyright notice.
9835         * geninitheader.sh: Likewise.
9836         * genmodsrc.sh: Likewise.
9837         * gensymlist.sh.in: Likewise.
9839         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9840         * boot/i386/pc/diskboot.S: Likewise.
9841         * boot/i386/pc/pxeboot.S: Likewise.
9842         * commands/blocklist.c: Likewise.
9843         * commands/boot.c: Likewise.
9844         * commands/cat.c: Likewise.
9845         * commands/cmp.c: Likewise.
9846         * commands/configfile.c: Likewise.
9847         * commands/echo.c: Likewise.
9848         * commands/help.c: Likewise.
9849         * commands/ls.c: Likewise.
9850         * commands/search.c: Likewise.
9851         * commands/terminal.c: Likewise.
9852         * commands/test.c: Likewise.
9853         * commands/videotest.c: Likewise.
9854         * commands/i386/cpuid.c: Likewise.
9855         * commands/i386/pc/halt.c: Likewise.
9856         * commands/i386/pc/play.c: Likewise.
9857         * commands/i386/pc/reboot.c: Likewise.
9858         * commands/i386/pc/vbeinfo.c: Likewise.
9859         * commands/i386/pc/vbetest.c: Likewise.
9860         * commands/ieee1275/halt.c: Likewise.
9861         * commands/ieee1275/reboot.c: Likewise.
9862         * commands/ieee1275/suspend.c: Likewise.
9863         * disk/loopback.c: Likewise.
9864         * disk/lvm.c: Likewise.
9865         * disk/raid.c: Likewise.
9866         * disk/efi/efidisk.c: Likewise.
9867         * disk/i386/pc/biosdisk.c: Likewise.
9868         * disk/ieee1275/ofdisk.c: Likewise.
9869         * font/manager.c: Likewise.
9870         * fs/affs.c: Likewise.
9871         * fs/ext2.c: Likewise.
9872         * fs/fat.c: Likewise.
9873         * fs/fshelp.c: Likewise.
9874         * fs/hfs.c: Likewise.
9875         * fs/hfsplus.c: Likewise.
9876         * fs/iso9660.c: Likewise.
9877         * fs/jfs.c: Likewise.
9878         * fs/minix.c: Likewise.
9879         * fs/sfs.c: Likewise.
9880         * fs/ufs.c: Likewise.
9881         * fs/xfs.c: Likewise.
9882         * hello/hello.c: Likewise.
9883         * include/grub/acorn_filecore.h: Likewise.
9884         * include/grub/arg.h: Likewise.
9885         * include/grub/bitmap.h: Likewise.
9886         * include/grub/boot.h: Likewise.
9887         * include/grub/cache.h: Likewise.
9888         * include/grub/device.h: Likewise.
9889         * include/grub/disk.h: Likewise.
9890         * include/grub/dl.h: Likewise.
9891         * include/grub/elfload.h: Likewise.
9892         * include/grub/env.h: Likewise.
9893         * include/grub/err.h: Likewise.
9894         * include/grub/file.h: Likewise.
9895         * include/grub/font.h: Likewise.
9896         * include/grub/fs.h: Likewise.
9897         * include/grub/fshelp.h: Likewise.
9898         * include/grub/gzio.h: Likewise.
9899         * include/grub/hfs.h: Likewise.
9900         * include/grub/kernel.h: Likewise.
9901         * include/grub/loader.h: Likewise.
9902         * include/grub/lvm.h: Likewise.
9903         * include/grub/misc.h: Likewise.
9904         * include/grub/mm.h: Likewise.
9905         * include/grub/net.h: Likewise.
9906         * include/grub/normal.h: Likewise.
9907         * include/grub/parser.h: Likewise.
9908         * include/grub/partition.h: Likewise.
9909         * include/grub/pc_partition.h: Likewise.
9910         * include/grub/raid.h: Likewise.
9911         * include/grub/rescue.h: Likewise.
9912         * include/grub/script.h: Likewise.
9913         * include/grub/setjmp.h: Likewise.
9914         * include/grub/symbol.h: Likewise.
9915         * include/grub/term.h: Likewise.
9916         * include/grub/terminfo.h: Likewise.
9917         * include/grub/tparm.h: Likewise.
9918         * include/grub/types.h: Likewise.
9919         * include/grub/video.h: Likewise.
9920         * include/grub/efi/api.h: Likewise.
9921         * include/grub/efi/chainloader.h: Likewise.
9922         * include/grub/efi/console.h: Likewise.
9923         * include/grub/efi/console_control.h: Likewise.
9924         * include/grub/efi/disk.h: Likewise.
9925         * include/grub/efi/efi.h: Likewise.
9926         * include/grub/efi/pe32.h: Likewise.
9927         * include/grub/efi/time.h: Likewise.
9928         * include/grub/i386/linux.h: Likewise.
9929         * include/grub/i386/setjmp.h: Likewise.
9930         * include/grub/i386/types.h: Likewise.
9931         * include/grub/i386/efi/kernel.h: Likewise.
9932         * include/grub/i386/efi/loader.h: Likewise.
9933         * include/grub/i386/efi/time.h: Likewise.
9934         * include/grub/i386/pc/biosdisk.h: Likewise.
9935         * include/grub/i386/pc/boot.h: Likewise.
9936         * include/grub/i386/pc/chainloader.h: Likewise.
9937         * include/grub/i386/pc/console.h: Likewise.
9938         * include/grub/i386/pc/init.h: Likewise.
9939         * include/grub/i386/pc/kernel.h: Likewise.
9940         * include/grub/i386/pc/loader.h: Likewise.
9941         * include/grub/i386/pc/memory.h: Likewise.
9942         * include/grub/i386/pc/multiboot.h: Likewise.
9943         * include/grub/i386/pc/serial.h: Likewise.
9944         * include/grub/i386/pc/time.h: Likewise.
9945         * include/grub/i386/pc/vbe.h: Likewise.
9946         * include/grub/i386/pc/vbeblit.h: Likewise.
9947         * include/grub/i386/pc/vbefill.h: Likewise.
9948         * include/grub/i386/pc/vbeutil.h: Likewise.
9949         * include/grub/i386/pc/vga.h: Likewise.
9950         * include/grub/ieee1275/ieee1275.h: Likewise.
9951         * include/grub/ieee1275/ofdisk.h: Likewise.
9952         * include/grub/powerpc/libgcc.h: Likewise.
9953         * include/grub/powerpc/setjmp.h: Likewise.
9954         * include/grub/powerpc/types.h: Likewise.
9955         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9956         * include/grub/powerpc/ieee1275/console.h: Likewise.
9957         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9958         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9959         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9960         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9961         * include/grub/powerpc/ieee1275/time.h: Likewise.
9962         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9963         * include/grub/sparc64/libgcc.h: Likewise.
9964         * include/grub/sparc64/setjmp.h: Likewise.
9965         * include/grub/sparc64/types.h: Likewise.
9966         * include/grub/sparc64/ieee1275/console.h: Likewise.
9967         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9968         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9969         * include/grub/sparc64/ieee1275/time.h: Likewise.
9970         * include/grub/util/biosdisk.h: Likewise.
9971         * include/grub/util/getroot.h: Likewise.
9972         * include/grub/util/lvm.h: Likewise.
9973         * include/grub/util/misc.h: Likewise.
9974         * include/grub/util/raid.h: Likewise.
9975         * include/grub/util/resolve.h: Likewise.
9976         * io/gzio.c: Likewise.
9977         * kern/device.c: Likewise.
9978         * kern/disk.c: Likewise.
9979         * kern/dl.c: Likewise.
9980         * kern/elf.c: Likewise.
9981         * kern/env.c: Likewise.
9982         * kern/err.c: Likewise.
9983         * kern/file.c: Likewise.
9984         * kern/fs.c: Likewise.
9985         * kern/loader.c: Likewise.
9986         * kern/main.c: Likewise.
9987         * kern/misc.c: Likewise.
9988         * kern/mm.c: Likewise.
9989         * kern/parser.c: Likewise.
9990         * kern/partition.c: Likewise.
9991         * kern/rescue.c: Likewise.
9992         * kern/term.c: Likewise.
9993         * kern/efi/efi.c: Likewise.
9994         * kern/efi/init.c: Likewise.
9995         * kern/efi/mm.c: Likewise.
9996         * kern/i386/dl.c: Likewise.
9997         * kern/i386/efi/init.c: Likewise.
9998         * kern/i386/efi/startup.S: Likewise.
9999         * kern/i386/pc/init.c: Likewise.
10000         * kern/i386/pc/lzo1x.S: Likewise.
10001         * kern/i386/pc/startup.S: Likewise.
10002         * kern/ieee1275/ieee1275.c: Likewise.
10003         * kern/powerpc/cache.S: Likewise.
10004         * kern/powerpc/dl.c: Likewise.
10005         * kern/powerpc/ieee1275/cmain.c: Likewise.
10006         * kern/powerpc/ieee1275/crt0.S: Likewise.
10007         * kern/powerpc/ieee1275/init.c: Likewise.
10008         * kern/powerpc/ieee1275/openfw.c: Likewise.
10009         * kern/sparc64/cache.S: Likewise.
10010         * kern/sparc64/dl.c: Likewise.
10011         * kern/sparc64/ieee1275/init.c: Likewise.
10012         * kern/sparc64/ieee1275/openfw.c: Likewise.
10013         * loader/efi/chainloader.c: Likewise.
10014         * loader/efi/chainloader_normal.c: Likewise.
10015         * loader/i386/efi/linux.c: Likewise.
10016         * loader/i386/efi/linux_normal.c: Likewise.
10017         * loader/i386/pc/chainloader.c: Likewise.
10018         * loader/i386/pc/chainloader_normal.c: Likewise.
10019         * loader/i386/pc/linux.c: Likewise.
10020         * loader/i386/pc/linux_normal.c: Likewise.
10021         * loader/i386/pc/multiboot.c: Likewise.
10022         * loader/i386/pc/multiboot_normal.c: Likewise.
10023         * loader/powerpc/ieee1275/linux.c: Likewise.
10024         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10025         * normal/arg.c: Likewise.
10026         * normal/cmdline.c: Likewise.
10027         * normal/command.c: Likewise.
10028         * normal/completion.c: Likewise.
10029         * normal/execute.c: Likewise.
10030         * normal/function.c: Likewise.
10031         * normal/lexer.c: Likewise.
10032         * normal/main.c: Likewise.
10033         * normal/menu.c: Likewise.
10034         * normal/menu_entry.c: Likewise.
10035         * normal/misc.c: Likewise.
10036         * normal/parser.y: Likewise.
10037         * normal/script.c: Likewise.
10038         * normal/i386/setjmp.S: Likewise.
10039         * normal/powerpc/setjmp.S: Likewise.
10040         * normal/sparc64/setjmp.S: Likewise.
10041         * partmap/acorn.c: Likewise.
10042         * partmap/amiga.c: Likewise.
10043         * partmap/apple.c: Likewise.
10044         * partmap/gpt.c: Likewise.
10045         * partmap/pc.c: Likewise.
10046         * partmap/sun.c: Likewise.
10047         * term/gfxterm.c: Likewise.
10048         * term/terminfo.c: Likewise.
10049         * term/efi/console.c: Likewise.
10050         * term/i386/pc/console.c: Likewise.
10051         * term/i386/pc/serial.c: Likewise.
10052         * term/i386/pc/vesafb.c: Likewise.
10053         * term/i386/pc/vga.c: Likewise.
10054         * term/ieee1275/ofconsole.c: Likewise.
10055         * util/biosdisk.c: Likewise.
10056         * util/console.c: Likewise.
10057         * util/genmoddep.c: Likewise.
10058         * util/getroot.c: Likewise.
10059         * util/grub-emu.c: Likewise.
10060         * util/grub-mkdevicemap.c: Likewise.
10061         * util/grub-probe.c: Likewise.
10062         * util/lvm.c: Likewise.
10063         * util/misc.c: Likewise.
10064         * util/raid.c: Likewise.
10065         * util/resolve.c: Likewise.
10066         * util/update-grub.in: Likewise.
10067         * util/update-grub_lib.in: Likewise.
10068         * util/grub.d/00_header.in: Likewise.
10069         * util/grub.d/10_hurd.in: Likewise.
10070         * util/grub.d/10_linux.in: Likewise.
10071         * util/i386/efi/grub-install.in: Likewise.
10072         * util/i386/efi/grub-mkimage.c: Likewise.
10073         * util/i386/pc/grub-install.in: Likewise.
10074         * util/i386/pc/grub-mkimage.c: Likewise.
10075         * util/i386/pc/grub-mkrescue.in: Likewise.
10076         * util/i386/pc/grub-setup.c: Likewise.
10077         * util/i386/pc/misc.c: Likewise.
10078         * util/powerpc/ieee1275/grub-install.in: Likewise.
10079         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10080         * util/powerpc/ieee1275/misc.c: Likewise.
10081         * video/bitmap.c: Likewise.
10082         * video/video.c: Likewise.
10083         * video/i386/pc/vbe.c: Likewise.
10084         * video/i386/pc/vbeblit.c: Likewise.
10085         * video/i386/pc/vbefill.c: Likewise.
10086         * video/i386/pc/vbeutil.c: Likewise.
10087         * video/readers/tga.c: Likewise.
10089 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10091         * conf/i386-efi.rmk: Replace obsolete reference to
10092         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10093         with util/getroot.c.
10094         * conf/powerpc-ieee1275.rmk: Likewise.
10095         * conf/sparc64-ieee1275.rmk: Likewise.
10097         * util/grub-emu.c (main): Fix unchecked pointer handling.
10099 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10101         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10102         invocation to fail, in order to support partition-less media.
10104         * util/i386/pc/grub-install.in: Likewise.
10106         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10107         which fs or partmap modules are needed (akin to its sister scripts).
10109         Also use grub-probe to get rid of unportable /proc/mounts check.
10111         Print the same informational message that the other scripts do, before
10112         exiting.
10114 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10116         * util/update-grub_lib.in (font_path): New function.  Determine whether
10117         a font file can be found and, if so, echo the GRUB path to it.
10119         * util/update-grub.in: Handle multiple terminals depending on user
10120         input, platform availability and font file presence.  Propagate
10121         variables of our findings to /etc/grub.d/ children.
10123         * util/grub.d/00_header.in: Handle multiple terminals, based on
10124         environment setup by update-grub.
10126 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10128         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10130 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10132         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10133         indicate end of data section in kernel image.
10134         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10135         GRUB_KERNEL_MACHINE_DATA_END.
10137         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10138         space for it.
10139         * kern/i386/efi/startup.S: Likewise.
10141         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10142         during image generation.  Implement --prefix option to override this
10143         patch.
10144         * util/i386/efi/grub-mkimage.c: Likewise.
10146         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10147         code to make path relative to its root into a separate function.
10149         * util/i386/pc/grub-install.in: Use newly provided
10150         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10151         pass the result to grub-install --prefix.
10153 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10155         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10156         DEFAULT_DEVICE_MAP.
10157         * util/grub-emu.c: Use above definitions from misc.h instead of
10158         defining them.
10159         * util/grub-mkdevicemap.c: Likewise.
10160         * util/i386/pc/grub-setup.c: Likewise.
10161         * util/grub-probe.c: Likewise.
10162         (probe): Abort with grub_util_error() when either
10163         grub_guess_root_device or grub_util_get_grub_dev fails.
10165 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10167         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10168         "pager" assignment.
10169         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10170         "pcdata".
10171         * util/grub-probe.c (probe): Likewise for "drive_name".
10173 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10175         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10176         not just the cdrom one.
10178 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10180         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10181         Add --pkglibdir=DIR option to override pkglibdir.
10182         Mention --image-type=TYPE in help output.
10183         Fix --grub-mkimage (it was a no-op).
10184         Abort gracefully when no parameter is given.
10186 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10188         * util/i386/pc/grub-mkrescue.in: New file.
10189         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10190         * Makefile.in: Handle bin_SCRIPTS.
10192 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10194         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10195         list of video modes.
10197 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10199         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10200         file doesn't exist, or if it is in a filesystem grub can't read.
10202         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10203         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10204         header comment to fit in 80 columns when the variables are resolved.
10206         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10207         could be identified by update-grub.  Remove redundant check for
10208         unifont.pff existence (since convert_system_path_to_grub_path now
10209         handles that).
10211 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10213         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10215         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10217         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10219 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10221         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10223         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10224         grub_apple_partition_map_fini.
10226         * util/biosdisk.c
10227         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10228         to access >2 TiB disks).
10230         Print disk->total_sectors with %llu instead of %lu, since this
10231         variable is always 64-bit (prevents wrong disk size from being displayed
10232         on either >2 TiB disk or big-endian CPU).
10234         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10235         into a generic case that supports all (sane) partition maps.
10237         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10238         breaks big-endian.
10240         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10241         and grub_apple_partition_map_fini() after that.
10243 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10245         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10247         * util/grub.d/00_header.in: Only enable gfxterm when
10248         convert_system_path_to_grub_path() succeeds.
10250 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10252         * util/update-grub_lib.in: New file.
10253         * DISTLIST: Add update-grub_lib.in.
10254         * conf/common.rmk: Generate update-grub_lib and install it in
10255         $(lib_DATA).
10256         * Makefile.in: Add install routine for $(lib_DATA).
10258         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10259         function provided by update-grub_lib to support arbitrary paths of
10260         unifont.pff.
10261         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10262         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10264 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10266         * commands/i386/cpuid.c: New module.
10267         * DISTLIST: Add it.
10268         * conf/i386-efi.rmk: Enable cpuid.mod.
10269         * conf/i386-pc.rmk: Likewise.
10271 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10273         * kern/disk.c (grub_disk_read): Check return value of
10274         grub_realloc().
10276 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10278         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10279         arrays.
10280         * disk/raid.c (grub_raid_open): Likewise.
10282 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10284         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10285         stack instead of on the heap.
10287         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10288         before doing a read on it.
10290         * configure.ac: Only use -fno-stack-protector for the target
10291         environment.
10293 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10295         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10296         __attribute_ ((unused)) to mode_type argument.
10298         * util/getroot.c (grub_guess_root_device): Fix #endif.
10300         * kern/misc.c (memcmp): Fix prototype.
10302         * include/grub/partition.h [GRUB_UTIL]
10303         (grub_gpt_partition_map_init): Add prototype.
10304         (grub_gpt_partition_map_fini): Likewise.
10306         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10307         at the right place.
10309         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10310         (grub_fat_read_data): Likewise.
10311         (grub_fat_find_dir): Likewise.
10313         * font/manager.c (find_glyph): Make table a const.
10314         (grub_font_get_glyph): Remove bitmap from if statement.
10316 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10318         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10319         code, first search for device in /dev/mapper, then in /dev.
10320         (grub_util_get_grub_dev): New function.
10321         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10322         prototype.
10323         * util/grub-probe.c (probe): Remove check for RAID, call
10324         grub_util_get_grub_dev() instead of
10325         grub_util_biosdisk_get_grub_dev().
10326         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10327         grub_util_biosdisk_get_grub_dev().
10328         * util/i386/pc/grub-setup.c (main): Likewise.
10330 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10332         * DISTLIST: Update for the latest changes.
10333         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10334         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10335         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10336         grub/util/biosdisk.h.
10337         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10338         grub/util/biosdisk.h.
10340 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10342         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10344 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10346         * util/i386/efi/grub-install.in: New.
10347         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10348         newly added grub-install.
10349         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10350         include.
10351         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10352         grub/util/biosdisk.h.
10353         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10354         grub/util/biosdisk.h.
10356 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10358         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10359         * include/grub/util/biosdisk.h: ... here.
10360         * util/i386/pc/biosdisk.c: Moved to ...
10361         * util/biosdisk.c: ... here.
10362         * util/i386/pc/getroot.c: Moved to ...
10363         * util/getroot.c: ... here.
10364         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10365         * util/grub-mkdevicemap.c: ... here.
10366         * util/i386/pc/grub-probe.c: Moved to ...
10367         * util/grub-probe.c: ... here.
10369 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10371         * util/update-grub.in: Remove duplicated line in grub.cfg header
10372         message.
10374 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10376         * util/update-grub.in: Fix a few assumptions about the devices holding
10377         /, /boot and /boot/grub being the same.
10378         * util/grub.d/00_header.in: Likewise.
10379         * util/grub.d/10_hurd.in: Likewise.
10380         * util/grub.d/10_linux.in: Likewise.
10382         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10383         patterns.  Use that to define the `.old' suffix as older than `'.
10385         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10387         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10388         the grub.cfg header message.
10390 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10392         * util/update-grub.in: Create device.map if it doesn't already exist,
10393         before attempting to run grub-probe.
10394         Check for grub-probe and grub-mkdevicemap with the same code
10395         grub-install is using.
10396         Remove test mode.
10398 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10400         * Makefile.in: Add the datarootdir autoconf variable.
10402 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10404         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10405         fail gracefully if dev->disk->partition == NULL.
10407 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10409         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10410         determine partition map module.
10411         * util/i386/pc/grub-install.in: Use this feature to decide which
10412         partition module to load, instead of hardcoding pc and gpt.
10414 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10416         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10417         source directory differs from build directory.
10419 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10421         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10422         initialisation.
10424 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10426         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10428 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10430         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10431         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10433 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10435         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10436         (grub_probe_SOURCES): Likewise.
10437         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10438         GPT and initialize dos_part and bsd_part accordingly.
10439         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10440         install_bsd_part.
10441         (main): Activate gpt module for use during partition identification,
10442         and deactivate it afterwards.
10443         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10444         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10445         partition identification, and deactivate it afterwards.
10447 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10449         * term/i386/pc/console.c (grub_console_fini): Call
10450         grub_term_set_current() before grub_term_unregister().
10452 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10454         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10455         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10456         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10457         and update-grub_DATA.
10458         * conf/common.rmk: Build and install update-grub components.
10459         * conf/common.mk: Regenerate.
10460         * util/update-grub.in: New.  Core of update-grub.
10461         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10462         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10463         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10464         * util/grub.d/README: New.  Document grub.d directory layout.
10466 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10468         * util/grub-emu.c: Move initialization functions
10469         grub_util_biosdisk_init() and grub_init_all() before
10470         grub_util_biosdisk_get_grub_dev(), which relies on them.
10472 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10474         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10475         it is used later.
10477 2007-04-18  Jerone Young  <jerone@gmail.com>
10479         * kernel/elf.c: Add missing parenthesis for conditional statement
10480         stanza.
10482 2007-04-10  Jerone Young  <jerone@gmail.com>
10484         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10485         continue on and look for device node with real device name.
10487 2007-04-10  Jerone Young  <jerone@gmail.com>
10489         * configure.ac: Add argument for autoconf to use transformation
10490         ability.
10491         * Makefile.in: Add autoconf package transformation code.
10492         * util/i386/pc/grub-install.in: Likewise.
10493         * util/powerpc/ieee1275/grub-install.in: Likewise.
10495 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10497         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10498         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10499         (EXT2_REVISION): Likewise.
10500         (EXT2_INODE_SIZE): Likewise.
10501         (struct grub_ext2_block_group): Added a missing member
10502         "used_dirs".
10503         (grub_ext2_read_inode): Divide by the inode size in a superblock
10504         instead of 128 to obtain INODES_PER_BLOCK.
10505         Use the macro EXT2_INODE_SIZE instead of directly using
10506         SBLOCK->INODE_SIZE.
10508 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10510         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10511         superblock instead of the structure size to compute an
10512         offset. This fixes the problem that GRUB could not read a
10513         filesystem when inode size is different from 128-byte.
10515 2007-03-05  Marco Gerards  <marco@gnu.org>
10517         * normal/main.c (read_config_file): When "menu" is not set, create
10518         an initial context.
10520 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10522         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10523         (HEAP_LIMIT): New macro.
10524         (grub_claim_heap): Claim memory up to `heaplimit'.
10526 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10528         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10529         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10530         (_start): Likewise.
10531         (grub_arch_modules_addr): Return address after `_end'.
10532         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10533         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10534         (add_segments): Calculate `_end' from phdr size and location.
10535         (ALIGN_UP): Moved to ...
10536         * include/grub/misc.h: here.
10537         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10538         New macro.
10539         (GRUB_IEEE1275_MODULE_BASE): Removed.
10541 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10543         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10544         loop boundary.
10546 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10548         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10549         All users updated.
10550         (grub_elf64_load_hook_t): Likewise.
10551         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10552         debug output.
10554 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10556         * kern/mm.c: Update copyright.
10557         (grub_mm_debug): Correct syntax error.
10558         (grub_mm_dump_free): New function.
10559         (grub_debug_free): Call `grub_free'.
10560         * include/grub/mm.h: Update copyright.
10561         (grub_mm_dump_free): Add declaration.
10563 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10565         * include/grub/ieee1275/ieee1275.h: Update copyright.
10566         * kern/powerpc/ieee1275/init.c: Likewise.
10567         * kern/powerpc/ieee1275/openfw.c: Likewise.
10569         * loader/powerpc/ieee1275/linux.c: Likewise.
10570         * include/grub/elfload.h: Likewise.
10571         * kern/elf.c: Likewise.
10572         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10573         callers.
10574         (grub_elf64_load): Likewise.
10575         (grub_elf32_load_segment): Move to a nested function.
10576         (grub_elf64_load_segment): Likewise.
10578 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10580         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10581         prototype.
10582         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10583         (grub_heap_len): Likewise.
10584         (HEAP_SIZE): New macro.
10585         (grub_claim_heap): New function.
10586         (grub_machine_init): Don't claim heap directly.  Call
10587         `grub_claim_heap'.
10588         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10589         (grub_available_iterate): New function.
10591 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10593         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10594         * configure.ac: Use it for testing the HOST and TARGET compilers.
10596 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10598         * Makefile.in (enable_grub_emu): New variable.
10599         * configure.ac (--enable-grub-emu): New option.
10600         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10601         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10602         * conf/i386-pc.rmk: Likewise.
10603         * conf/powerpc-ieee1275.rmk: Likewise.
10604         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10606 2006-12-12  Marco Gerards  <marco@gnu.org>
10608         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10610         * kern/env.c (grub_env_unset): Don't free the member `value' when
10611         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10612         pointer.
10614         * normal/main.c (current_menu): Removed.
10615         (free_menu): Unset the `menu' environment variable.
10616         (grub_normal_menu_addentry): Make use of the environment variable
10617         `menu', instead of using the global `current_menu'.  Allocate
10618         memory for the sourcecode of this entry.
10619         (read_config_file): New argument `nested', changed all callers.
10620         Only in the case of a new context, initialize a new menu.  Set the
10621         `menu' environment variable.
10622         (grub_normal_execute): Don't set and unset the environment
10623         variable `menu' here anymore.  Only free the menu when leaving the
10624         context.
10626         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10627         leak.
10629 2006-12-11  Marco Gerards  <marco@gnu.org>
10631         * normal/menu_entry.c (run): Fix off by one bug so the last line
10632         is executed.  Move the loader check to outside the loop.
10634 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10636         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10638 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10640         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10641         the number of sectors.  Reported by Andrey Shuvikov
10642         <mr_hyro@yahoo.com>.
10644 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10646         * kern/disk.c (grub_disk_read): When there is a read error, always
10647         try to read only the necessary data.
10649         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10650         disk/raid.c.
10651         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10652         prototype.
10653         [GRUB_UTIL] (grub_raid_fini): Likewise.
10654         [GRUB_UTIL] (grub_lvm_init): Likewise.
10655         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10656         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10657         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10658         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10659         and grub_raid_fini().
10661 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10663         * include/grub/types.h (__unused): Rename to UNUSED.
10664         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10665         (grub_elf64_size): Likewise.
10667 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10669         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10670         grub_error_push and grub_error_pop in the error-handling path.
10671         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10672         length.
10674 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10676         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10677         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10678         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10679         (kernel_elf_SOURCES): Likewise.
10680         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10681         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10682         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10683         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10684         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10685         (elf_mod_SOURCES): New variable.
10686         (elf_mod_CFLAGS): Likewise.
10687         (elf_mod_LDFLAGS): Likewise.
10688         * include/grub/types.h (__unused): New macro.
10689         * include/grub/elfload.h: New file.
10690         * kern/elf.c: Likewise.
10691         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10692         (ELF32_LOADMASK): New macro.
10693         (ELF64_LOADMASK): Likewise.
10694         (vmlinux): Removed.
10695         (grub_linux_load32): New function.
10696         (grub_linux_load64): Likewise.
10697         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10698         Use grub_elf_t instead of grub_file_t.
10700 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10702         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10703         `catch_result' to struct set_color_args.
10705 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10707         * normal/menu.c: Include grub/script.h.
10708         * normal/menu_entry.c: Likewise.
10709         * include/grub/normal.h: Do not include grub/script.h.
10711 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10713         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10715 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10717         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10718         disk.
10719         (grub_disk_close): Print debug messages when closing a disk.
10720         (grub_disk_read): Print debug messages when disk read fails.
10721         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10722         filesystem type.
10723         * kern/partition.c: Include misc.h.
10724         (grub_partition_iterate): Print debug messages when detecting
10725         partition type.
10727 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10729         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10730         is negative.
10731         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10733 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10735         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10736         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10738 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10740         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10741         instead of sizeof(lv). Patch by Michael Guntsche.
10743 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10745         * disk/lvm.c: Rename VGS to VG_LIST.
10746         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10747         (grub_lvm_open): Likewise.
10748         Thanks to Michael Guntsche for finding this bug.
10750 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10752         * configure.ac (AC_INIT): Bumped to 1.95.
10754 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10756         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10757         with "/dev/.static/dev/md".
10759 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10761         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10762         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10763         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10764         DRIVE_NAME are always freed.
10766         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10767         DOS_PART, as a DOS partition is counted from one instead of zero
10768         now. Reported by Robert Millan.
10770 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10772         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10773         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10774         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10775         string returned by grub_guess_root_device.
10776         * util/i386/pc/grub-setup.c: Likewise.
10777         * util/i386/pc/grub-probefs.c: Likewise.
10779         * util/i386/pc/grub-probefs.c: Rename to ...
10780         * util/i386/pc/grub-probe.c: ... this.
10781         * DISTLIST: Remove grub-probefs, add grub-probe.
10782         * conf/i386-efi.rmk: Likewise.
10783         * conf/i386-pc.rmk: Likewise.
10784         * util/i386/pc/grub-install.in: Likewise.
10786         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10787         choose which information we want to print.
10789 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10791         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10792         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10793         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10794         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10795         video/readers/tga.c and video/i386/pc/vbeutil.c.
10797 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10799         Added support for RAID and LVM.
10801         * disk/lvm.c: New file.
10802         * disk/raid.c: Likewise.
10803         * include/grub/lvm.h: Likewise.
10804         * include/grub/raid.h: Likewise.
10805         * include/grub/util/lvm.h: Likewise.
10806         * include/grub/util/raid.h: Likewise.
10807         * util/lvm.c: Likewise.
10808         * util/raid.c: Likewise.
10810         * include/grub/disk.h (grub_disk_dev_id): Add
10811         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10812         (grub_disk_get_size): New prototype.
10813         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10814         returns a partition.
10815         (grub_disk_get_size): New function.
10817         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10818         verbatim if grub_install_dos_part is -2.
10820         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10821         and LVM devices.
10823         * util/i386/pc/grub-setup.c (setup): New argument
10824         MUST_EMBED. Force embedding of GRUB when the argument is
10825         true. Close FILE before returning.
10826         (main): Add support for RAID and LVM.
10828         * conf/common.rmk: Add RAID and LVM modules.
10829         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10830         util/lvm.c.
10831         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10833         * kern/misc.c (grub_strstr): New function.
10834         * include/grub/misc.h (grub_strstr): New prototype.
10836 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10838         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10840 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10842         * kern/misc.c (grub_strtoull): Guess the base only if not
10843         specified.
10845 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10847         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10848         PowerMac support.
10850 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10852         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10854         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10855         Remove `flags' argument.  All callers changed.
10856         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10857         (IEEE1275_IHANDLE_INVALID): New variable.
10858         (IEEE1275_CELL_INVALID): New variable.
10859         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10860         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10861         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10862         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10863         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10864         codes from Open Firmware.  All callers updated.
10865         (grub_ieee1275_next_property): Directly return Open Firmware return
10866         code.
10867         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10868         Standardize error checking from `grub_ieee1275_get_property'.
10869         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10870         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10872 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10874         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10875         `instance_to_package_args' to `instance_to_path_args'.
10877         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10878         `grub_ieee1275_chosen'.
10880         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10881         `grub_ieee1275_interpret'.
10883 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10885         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10887 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10889         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10890         (__cmpdi): Likewise.
10892         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10893         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10894         `grub_ssize_t'.
10896         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10898         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10899         to type `grub_ssize_t'.
10900         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10902 2006-09-22  Marco Gerards  <marco@gnu.org>
10904         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10905         newlines.
10907 2006-09-22  Marco Gerards  <marco@gnu.org>
10909         * commands/echo.c: New file.
10911         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10913         * conf/common.rmk (echo_mod_SOURCES): New variable.
10914         (echo_mod_CFLAGS): Likewise.
10915         (echo_mod_LDFLAGS): Likewise.
10917 2006-09-22  Marco Gerards  <marco@gnu.org>
10919         * normal/main.c (get_line): Malloc memory instead of using
10920         preallocated memory.  Removed the arguments `cmdline' and
10921         `max_len'.  Updated all callers.
10923 2006-09-22  Marco Gerards  <marco@gnu.org>
10925         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10926         (normal_mod_DEPENDENCIES): Likewise.
10928         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10929         (normal_mod_DEPENDENCIES): Likewise.
10931         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10933 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10935         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10936         programs.
10937         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10938         (normal_mod_DEPENDENCIES): Likewise.
10939         * conf/i386-pc.mk: Regenerate.
10940         * conf/i386-efi.mk: Likewise
10941         * conf/common.mk: Likewise.
10942         * conf/powerpc-ieee1275.mk: Likewise.
10943         * conf/sparc64-ieee1275.mk: Likewise.
10945 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10947         Sync with i386 version.
10948         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10949         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10951 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10953         Import from GRUB Legacy (lib/device.c):
10954         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10955         (init_device_map) [__linux__]: Add support for I2O devices.
10957 2006-09-14  Marco Gerards  <marco@gnu.org>
10959         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10960         `-melf_i386'.
10962 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10964         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10965         /boot/grub/*.lst.
10967         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10969         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10970         before adding it to device.map.
10972 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10974         * genmk.rb: Let GCC generate dependencies the first time it
10975         compiles a file; using the -MD option.
10976         * conf/common.mk: Regenerate.
10977         * conf/i386-pc.mk: Likewise.
10978         * conf/i386-efi.mk: Likewise.
10979         * conf/powerpc-ieee1275.mk: Likewise.
10980         * conf/sparc64-ieee1275.mk: Likewise.
10982 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
10984         Move the prototypes of grub_setjmp and grub_longjmp to
10985         cpu/setjmp.h, so that each architecture may specify different
10986         attributes.
10988         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10989         (grub_longjmp): Likewise.
10990         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10991         (grub_longjmp): Likewise.
10992         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10993         (grub_longjmp): Likewise.
10995         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10996         [!GRUB_UTIL] (grub_longjmp): Removed.
10998 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11000         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11001         "color!" method does not return any value.
11003 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11005         * include/grub/bitmap.h: New file.
11007         * include/grub/i386/pc/vbeutil.h: Likewise.
11009         * video/bitmap.c: Likewise.
11011         * video/readers/tga.c: Likewise.
11013         * video/i386/pc/vbeutil.c: Likewise.
11015         * commands/videotest.c: Code cleanup and updated to reflect to new
11016         video API.
11018         * term/gfxterm.c: Likewise.
11020         * video/video.c: Likewise.
11022         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11023         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11024         (bitmap_mod_SOURCES): New entry.
11025         (bitmap_mod_CFLAGS): Likewise.
11026         (bitmap_mod_LDFLAGS): Likewise.
11027         (tga_mod_SOURCES): Likewise.
11028         (tga_mod_CFLAGS): Likewise.
11029         (tga_mod_LDFLAGS): Likewise.
11031         * include/grub/video.h (grub_video_blit_operators): New enum type.
11032         (grub_video_render_target): Changed as forward declaration and moved
11033         actual definition to be video driver specific.
11034         (grub_video_adapter.blit_bitmap): Added blitting operator.
11035         (grub_video_adapter.blit_render_target): Likewise.
11036         (grub_video_blit_bitmap): Likewise.
11037         (grub_video_blit_render_target): Likewise.
11039         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11040         driver specific render target definition.
11041         (grub_video_vbe_map_rgba): Added driver internal helper.
11042         (grub_video_vbe_unmap_color): Updated to use
11043         grub_video_i386_vbeblit_info.
11044         (grub_video_vbe_get_video_ptr): Likewise.
11046         * include/grub/i386/pc/vbeblit.h
11047         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11048         grub_video_i386_vbeblit_info.
11049         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11050         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11051         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11052         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11053         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11054         (grub_video_i386_vbeblit_index_index): Likewise.
11055         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11056         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11057         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11058         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11059         operator.
11060         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11061         operator.
11063         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11064         include/grub/i386/pc/vbeblit.h.
11066         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11067         Updated to use grub_video_i386_vbeblit_info.
11068         (grub_video_i386_vbefill_R8G8B8): Likewise.
11069         (grub_video_i386_vbefill_index): Likewise.
11070         (grub_video_i386_vbefill): Added generic filler.
11072         * video/i386/pc/vbefill.c: Updated to reflect changes on
11073         include/grub/i386/pc/vbefill.h.
11075         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11076         grub_video_i386_vbeblit_info.
11077         (grub_video_vbe_unmap_color): Likewise.
11078         (grub_video_vbe_blit_glyph): Likewise.
11079         (grub_video_vbe_scroll): Likewise.
11080         (grub_video_vbe_draw_pixel): Removed function.
11081         (grub_video_vbe_get_pixel): Likewise.
11082         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11083         updated code to use it.
11084         (common_blitter): Added common blitter for render target and bitmap.
11085         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11086         (grub_video_vbe_blit_render_target): Likewise.
11088 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11090         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11091         is in text mode if there is no console control protocol instance
11092         available.
11094 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11096         * include/grub/video.h: Code cleanup.
11098         * include/grub/i386/pc/vbe.h: Likewise.
11100         * video/i386/pc/vbe.c: Likewise.
11102         * video/i386/pc/vbeblit.c: Likewise.
11104         * video/i386/pc/vbefill.c: Likewise.
11106         * video/video.c: Likewise.  Also added more comments.
11108 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11110         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11111         (struct grub_biosdisk_dap): Likewise.
11113         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11114         linkage settings for all functions.
11116 2006-07-12  Marco Gerards  <marco@gnu.org>
11118         * configure.ac (--enable-mm-debug): Fix typo.
11120         * genkernsyms.sh.in: Use proper quoting for `CC'.
11122 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11124         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11125         (normal_mod_ASFLAGS): Remove "-m32".
11127 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11129         * util/misc.c: Include config.h.
11130         [!HAVE_MEMALIGN]: Do not include malloc.h.
11131         (grub_memalign): Use posix_memalign, if present. Then, use
11132         memalign, if present. Otherwise, emit an error.
11134         * util/grub-emu.c: Do not include malloc.h.
11136         * include/grub/util/misc.h: Include unistd.h. This is required for
11137         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11138         D. Eades III <hde@foobar-qux.org>.
11140         * configure.ac (AC_GNU_SOURCE): Added.
11141         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11142         type.
11144 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11146         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11147         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11149 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11151         * include/grub/types.h (grub_host_addr_t): Rename to
11152         grub_target_addr_t.
11153         (grub_host_off_t): Rename to grub_target_off_t.
11154         (grub_host_size_t): Rename to grub_target_size_t.
11155         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11156         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11158         * include/grub/kernel.h (struct grub_module_header): Change type
11159         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11160         (grub_module_info): Likewise.
11162 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11164         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11165         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11166         Velazquez <jesus.velazquez@gmail.com>.
11168 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11170         Count partitions from 1 instead of 0 in the string representation
11171         of partitions. Still use 0-based internally.
11173         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11174         (sun_partition_map_iterate): Use grub_partition_t instead of
11175         struct grub_partition *. Cast DESC->START_CYLINDER to
11176         grub_uint64_t after converting the endian.
11177         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11178         (sun_partition_map_get_name): Add 1 to P->INDEX.
11180         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11181         PCDATA->DOS_PART.
11182         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11184         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11185         zero instead of one.
11186         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11187         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11189         * partmap/apple.c (apple_partition_map_iterate): Change the type
11190         of POS to unsigned.
11191         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11192         (apple_partition_map_get_name): Add 1 into P->INDEX.
11194         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11195         of POS to unsigned.
11196         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11197         calculate the offset of a partition.
11198         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11199         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11201         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11202         SECTOR to grub_disk_addr_t.
11203         (acorn_partition_map_iterate): Likewise.
11204         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11205         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11206         top.
11207         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11209         * kern/i386/pc/init.c (make_install_device): Add 1 into
11210         GRUB_INSTALL_DOS_PART.
11212         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11213         conditional.
11215 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11217         Clean up the code to support 64-bit addressing in disks and
11218         files. This change is not enough for filesystems yet.
11220         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11221         type of "start" to grub_uint64_t.
11222         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11223         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11224         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11225         convert addresses.
11227         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11228         to grub_disk_addr_t.
11230         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11231         string.
11233         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11235         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11236         to char *.
11238         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11240         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11242         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11244         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11245         to grub_off_t, to detect an error from grub_file_seek.
11246         (grub_multiboot_load_elf32): Likewise.
11248         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11249         maximum unsigned long value when an overflow is detected.
11250         (grub_strtoull): New function.
11251         (grub_divmod64): Likewise.
11252         (grub_lltoa): use grub_divmod64.
11254         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11255         grub_disk_addr_t.
11256         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11257         the pointer to next character. Use grub_strtoull instead of
11258         grub_strtoul.
11259         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11260         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11261         respectively.
11263         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11264         return value is signed.
11265         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11266         test if OFFSET is less than zero, as OFFSET is unsigned now.
11268         * kern/disk.c (struct grub_disk_cache): Change the type of
11269         "sector" to grub_disk_addr_t.
11270         (grub_disk_cache_get_index): Change the type of SECTOR to
11271         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11272         unsigned after shifting.
11273         (grub_disk_cache_invalidate): Change the type of SECTOR to
11274         grub_disk_addr_t.
11275         (grub_disk_cache_unlock): Likewise.
11276         (grub_disk_cache_store): Likewise.
11277         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11278         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11279         grub_disk_addr_t and grub_uint64_t, respectively.
11280         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11281         body, as the value of OFFSET is tweaked by
11282         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11283         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11284         respectively.
11285         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11286         body, as the value of OFFSET is tweaked by
11287         grub_disk_check_range. Change the types of LEN and N to
11288         grub_size_t.
11290         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11291         and "saved_offset" to grub_off_t.
11292         (test_header): Cast BUF to char *.
11293         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11294         to char *.
11295         (grub_gzio_read): Change the types of OFFSET and SIZE to
11296         grub_off_t and grub_size_t, respectively.
11298         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11299         Removed.
11300         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11301         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11302         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11303         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11304         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11306         * include/grub/types.h (grub_off_t): Unconditionally set to
11307         grub_uint64_t.
11308         (grub_disk_addr_t): Changed to grub_uint64_t.
11310         * include/grub/partition.h (struct grub_partition): Change the
11311         types of "start", "len" and "offset" to grub_disk_addr_t,
11312         grub_uint64_t and grub_disk_addr_t, respectively.
11313         (grub_partition_get_start): Return grub_disk_addr_t.
11314         (grub_partition_get_len): Return grub_uint64_t.
11316         * include/grub/misc.h (grub_strtoull): New prototype.
11317         (grub_divmod64): Likewise.
11319         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11320         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11321         grub_off_t, respectively.
11322         All callers and references changed.
11324         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11325         grub_size_t in "read".
11326         All callers and references changed.
11328         * include/grub/file.h (struct grub_file): Change the types of
11329         "offset" and "size" to grub_off_t and grub_off_t,
11330         respectively. Change the type of SECTOR to grub_disk_addr_t in
11331         "read_hook".
11332         (grub_file_read): Change the type of LEN to grub_size_t.
11333         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11334         grub_off_t.
11335         (grub_file_size): Return grub_off_t.
11336         (grub_file_tell): Likewise.
11337         All callers and references changed.
11339         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11340         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11341         "write".
11342         (struct grub_disk): Change the type of "total_sectors" to
11343         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11344         "read_hook".
11345         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11346         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11347         (grub_disk_write): Likewise.
11348         All callers and references changed.
11350         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11351         char * for grub_strncmp to silence gcc.
11352         (grub_iso9660_mount): Likewise.
11353         (grub_iso9660_mount): Likewise.
11354         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11355         return statement.
11356         (grub_iso9660_iterate_dir): Likewise.
11357         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11359         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11360         LEN to grub_disk_addr_t and grub_size_t, respectively.
11362         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11364         * fs/jfs.c (grub_jfs_read_file): Likewise.
11366         * fs/minix.c (grub_jfs_read_file): Likewise.
11368         * fs/sfs.c (grub_jfs_read_file): Likewise.
11370         * fs/ufs.c (grub_jfs_read_file): Likewise.
11372         * fs/xfs.c (grub_jfs_read_file): Likewise.
11374         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11375         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11376         respectively.
11378         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11379         BLKNR to -1 instead of returning GRUB_ERRNO.
11380         (grub_ext2_read_file): Change the types of SECTOR and
11381         LEN to grub_disk_addr_t and grub_size_t, respectively.
11383         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11384         LEN to grub_disk_addr_t and grub_size_t, respectively.
11386         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11387         grub_file_read.
11389         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11390         string. Do not cast SECTOR explicitly.
11392         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11393         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11394         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11395         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11396         over 2TB and LBA mode is not supported, raise an error.
11397         (get_safe_sectors): New function.
11398         (grub_biosdisk_read): Use get_safe_sectors.
11399         (grub_biosdisk_write): Likewise.
11401         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11402         (grub_efidisk_write): Likewise.
11404         * disk/loopback.c (delete_loopback): Cosmetic changes.
11405         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11406         correctly.
11407         (grub_loopback_open): Likewise.
11408         (grub_loopback_read): Likewise. Also, change the type of POS to
11409         grub_off_t, and fix the usage of grub_memset.
11411         * commands/i386/pc/play.c: Include grub/machine/time.h.
11413         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11414         print FILE->SIZE.
11416         * commands/configfile.c: Include grub/env.h.
11418         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11419         GRUB_ERRNO directly instead. Change the type of POS to
11420         grub_off_t. Follow the coding standard.
11422         * commands/blocklist.c: Include grub/partition.h.
11423         (grub_cmd_blocklist): Return an error if the underlying device is
11424         not a disk. Take the starting sector of a partition into account,
11425         if a partition is used.
11427         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11428         a length field.
11429         (lba_mode): Support 64-bit addresses.
11430         (chs_mode): Likewise.
11431         (copy_buffer): Adapted to the new offsets of a length field and a
11432         segment field.
11433         (blocklist_default_start): Allocate 64-bit space.
11435         * boot/i386/pc/boot.S (force_lba): Removed.
11436         (boot_drive): Moved to under KERNEL_SECTOR.
11437         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11438         space.
11439         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11440         is useless.
11441         (lba_mode): Refactored to support a 64-bit address. More size
11442         optimization.
11443         (setup_sectors): Likewise.
11445 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11447         * DISTLIST: Added include/grub/i386/linux.h. Removed
11448         include/grub/i386/pc/linux.h
11450         * configure.ac (AC_INIT): Bumped to 1.94.
11452         * config.guess: Updated from gnulib.
11453         * config.sub: Likewise.
11454         * install-sh: Likewise.
11455         * mkinstalldirs: Likewise.
11457 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11459         * conf/common.rmk (grub_modules_init.lst): Depended on
11460         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11461         MODSRCFILES.
11463         * genmk.rb (PModule::rule): Reverted the previous change.
11465 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11467         * conf/common.rmk (grub_modules_init.lst): Depends on
11468         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11469         that the target does not exist before producing.
11470         (grub_modules_init.h): Remove the target before generating.
11471         (grub_emu_init.c): Likewise.
11473         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11475 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11477         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11478         for the target-specific tests. Make sure that we also have the
11479         up-to-date target variables for those tests.
11481 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11483         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11484         (PModule::rule): Likewise.
11486 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11488         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11489         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11490         target-specific flags should be prefixed.
11491         (PModule::rule): Likewise.
11493 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11495         * configure.ac (CMP): Check if cmp is available explicitly.
11497 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11499         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11500         (target_cpu): New variable.
11501         (pkglibdir): Use target_cpu instead of host_cpu.
11503         * util/i386/pc/grub-install.in (host_cpu): Removed.
11504         (target_cpu): New variable.
11505         (pkglibdir): Use target_cpu instead of host_cpu.
11507         * util/genmoddep.c: Removed.
11509         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11510         instead of GRUB_HOST_SIZEOF_VOID_P.
11511         * kern/dl.c: Likewise.
11513         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11514         ...
11515         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11516         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11517         (GRUB_TARGET_SIZEOF_LONG): ... this.
11518         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11519         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11520         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11521         to ...
11522         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11523         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11524         (GRUB_TARGET_SIZEOF_LONG): ... this.
11525         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11526         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11527         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11528         to ...
11529         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11530         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11531         (GRUB_TARGET_SIZEOF_LONG): ... this.
11532         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11533         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11535         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11536         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11537         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11538         instead of GRUB_HOST_SIZEOF_LONG.
11539         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11540         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11541         GRUB_CPU_WORDS_BIGENDIAN.
11542         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11543         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11544         grub_host_ssize_t.
11546         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11547         (genmoddep_SOURCES): Likewise.
11548         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11549         (genmoddep_SOURCES): Likewise.
11550         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11551         (genmoddep_SOURCES): Likewise.
11552         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11553         Likewise.
11554         (genmoddep_SOURCES): Likewise.
11556         * genmoddep.awk: New file.
11558         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11559         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11560         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11561         (PModule::rule): Likewise.
11562         (Program::rule): Likewise.
11563         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11564         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11565         respectively.
11567         * configure.ac: Rewritten intensively to use host and target
11568         instead of build and host, respectively.
11570         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11571         (host_cpu): Removed.
11572         (target_cpu): New variable.
11573         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11574         (BUILD_CC): Removed.
11575         (BUILD_CFLAGS): Likewise.
11576         (BUILD_CPPFLAGS): Likewise.
11577         (TARGET_CC): New variable.
11578         (TARGET_CFLAGS): Likewise.
11579         (TARGET_CPPFLAGS): Likewise.
11580         (TARGET_LDFLAGS): Likewise.
11581         (AWK): Likewise.
11582         (include): Use target_cpu instead of host_cpu.
11583         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11585         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11587 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11589         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11590         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11591         field 'false' to 'exec_on_false'.
11592         (grub_script_create_cmdif): Renamed argument names to reflect above
11593         changes.
11595         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11597         * normal/script.c (grub_script_create_cmdif): Likewise.
11599 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11601         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11602         top.
11603         (grub_hfsplus_btree_recptr): Likewise.
11604         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11605         FILEBLOCK both to pass a block number and store next block
11606         number.
11607         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11608         overflow file correctly. Specify errors appropriately, because
11609         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11610         grub_hfsplus_btree_recptr to get the pointer to a found key.
11611         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11612         is found.
11614         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11615         linux.mod.
11616         (_linux_mod_SOURCES): New variable.
11617         (_linux_mod_CFLAGS): Likewise.
11618         (_linux_mod_LDFLAGS): Likewise.
11619         (linux_mod_SOURCES): Likewise.
11620         (linux_mod_CFLAGS): Likewise.
11621         (linux_mod_LDFLAGS): Likewise.
11623         * DISTLIST: Added loader/i386/efi/linux.c,
11624         loader/i386/efi/linux_normal.c and
11625         include/grub/i386/efi/loader.h.
11627         * loader/i386/efi/linux.c: New file.
11628         * loader/i386/efi/linux_normal.c: Likewise.
11629         * include/grub/i386/efi/loader.h: Likewise.
11631 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11633         * commands/blocklist.c: New file.
11635         * DISTLIST: Added commands/blocklist.c.
11637         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11638         color for the background, and a darker color for the foreground.
11639         (grub_console_checkkey): Return READ_KEY.
11640         (grub_console_cls): Set the background to
11641         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11643         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11645         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11646         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11648         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11649         prototype.
11651         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11652         BG. The spec is wrong again.
11654         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11655         prototype.
11656         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11658         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11659         commands/blocklist.c.
11660         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11662         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11663         (blocklist_mod_SOURCES): New variable.
11664         (blocklist_mod_CFLAGS): Likewise.
11665         (blocklist_mod_LDFLAGS): Likewise.
11667 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11669         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11670         duplication.
11671         (lba_mode): Use %eax more intensively to reduce the code size.
11673 2006-05-20  Marco Gerards  <marco@gnu.org>
11675         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11677         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11678         for `menuentry'.
11679         (script): Accept leading newlines.
11680         (newlines): New rule to describe 0 or more newlines.
11681         (commands): Accept `command' with trailing newline.  Fixed the
11682         order in which arguments were passed to `grub_script_add_cmd'.
11683         Accept commands separated by newlines.
11684         (function): Changed to accept newlines.
11685         (menuentry) Rewritten.
11687         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11688         front of the list, instead of to the end.
11690 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11692         * util/i386/pc/grub-install.in (bindir): New variable.
11693         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11694         Shaver <lbgwjl@gmail.com>.
11696 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11698         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11699         grub/machine/linux.h
11700         * loader/i386/pc/linux.c: Likewise.
11702         * include/grub/i386/pc/linux.h: Moved to ...
11703         * include/grub/i386/linux.h: ... here.
11705         * include/grub/i386/linux.h (struct linux_kernel_params): New
11706         struct.
11708 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11710         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11711         checking.
11712         (grub_video_vbe_blit_glyph): Likewise.
11713         (grub_video_vbe_blit_bitmap): Likewise.
11714         (grub_video_vbe_blit_render_target): Likewise.
11716 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11718         * configure.ac (--with-platform): Properly quote the square
11719         brackets.
11721 2006-05-08  Marco Gerards  <marco@gnu.org>
11723         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11724         this...
11725         (kernel_elf_HEADERS): ...to this.  Updated all users.
11726         (grubof_symlist.c): Renamed from this...
11727         (kernel_elf_symlist.c): ...to this.  Updated all users.
11728         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11729         (grubof_SOURCES): Renamed from this...
11730         (kernel_elf_SOURCES): ...to this.
11731         (grubof_HEADERS): Renamed from this...
11732         (kernel_elf_HEADERS): ...to this.
11733         (grubof_CFLAGS): Renamed from this...
11734         (kernel_elf_CFLAGS): ...to this.
11735         (grubof_ASFLAGS): Renamed from this...
11736         (kernel_elf_ASFLAGS): ...to this.
11737         (grubof_LDFLAGS): Renamed from this...
11738         (kernel_elf_LDFLAGS): ...to this.
11740         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11741         this...
11742         (kernel_elf_HEADERS): ...to this.  Updated all users.
11743         (grubof_symlist.c): Renamed from this...
11744         (kernel_elf_symlist.c): ...to this.  Updated all users.
11745         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11746         (grubof_SOURCES): Renamed from this...
11747         (kernel_elf_SOURCES): ...to this.
11748         (grubof_HEADERS): Renamed from this...
11749         (kernel_elf_HEADERS): ...to this.
11750         (grubof_CFLAGS): Renamed from this...
11751         (kernel_elf_CFLAGS): ...to this.
11752         (grubof_ASFLAGS): Renamed from this...
11753         (kernel_elf_ASFLAGS): ...to this.
11754         (grubof_LDFLAGS): Renamed from this...
11755         (kernel_elf_LDFLAGS): ...to this.
11757         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11758         `kernel.elf' instead of `grubof'.
11760 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11762         Add --with-platform to configure. Use pkglibdir instead of
11763         pkgdatadir. This is reported by Roger Leigh.
11765         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11766         (host_vendor): Likewise.
11767         (host_os): Likewise.
11768         (pkgdatadir): Likewise.
11769         (platform): New variable.
11770         (pkglibdir): Likewise.
11771         Use PKGLIBDIR instead of PKGDATADIR.
11773         * util/i386/pc/grub-install.in (datadir): Removed.
11774         (host_vendor): Likewise.
11775         (host_os): Likewise.
11776         (pkgdatadir): Likewise.
11777         (platform): New variable.
11778         (pkglibdir): Likewise.
11779         Use PKGLIBDIR instead of PKGDATADIR.
11781         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11782         instead of GRUB_DATADIR.
11783         (main): Likewise.
11784         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11785         (main): Likewise.
11786         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11787         (main): Likewise.
11789         * configure.ac (--with-platform): New option.
11790         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11792         * Makefile.in: Include a makefile based on PLATFORM instead of
11793         HOST_VENDOR.
11794         (pkgdatadir): Not appended by the machine type.
11795         (pkglibdir): Appended by the machine type.
11796         (host_vendor): Removed.
11797         (platform): New variable.
11798         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11799         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11800         (uninstall): Likewise.
11802 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11804         Use the environment context in the menu. Remove the commands
11805         "default" and "timeout", and use variables instead.
11807         * normal/menu.c: Include grub/env.h.
11808         (print_entry): Cast TITLE to silence gcc.
11809         (get_timeout): New function.
11810         (set_timeout): Likewise.
11811         (get_entry_number): Likewise.
11812         (run_menu): Use a default entry, a fallback entry and a timeout
11813         in the environment variables "default", "fallback" and
11814         "timeout". Also, tweak the default entry if it is not within the
11815         current menu entries.
11816         (grub_menu_run): Use a fallback entry in the environment variable
11817         "fallback".
11819         * normal/main.c (read_config_file): Do not initialize
11820         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11821         NEWMENU->TIMEOUT.
11822         (grub_normal_execute): Use a data slot to store the menu.
11824         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11825         fallback_entry and timeout.
11826         (struct grub_menu_list): Removed.
11827         (grub_menu_list_t): Likewise.
11828         (struct grub_context): Likewise.
11829         (grub_context_t): Likewise.
11830         (grub_context_get): Likewise.
11831         (grub_context_get_current_menu): Likewise.
11832         (grub_context_push_menu): Likewise.
11833         (grub_context_pop_menu): Likewise.
11834         (grub_default_init): Likewise.
11835         (grub_default_fini): Likewise.
11836         (grub_timeout_init): Likewise.
11837         (grub_timeout_fini): Likewise.
11839         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11840         and timeout.mod.
11841         (normal_mod_SOURCES): Removed normal/context.c.
11843         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11844         commands/default.c, commands/timeout.c and normal/context.c.
11845         (normal_mod_SOURCES): Removed normal/context.c.
11847         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11848         commands/timeout.c and normal/context.c.
11849         (normal_mod_SOURCES): Removed normal/context.c.
11851         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11852         commands/default.c, commands/timeout.c and normal/context.c.
11853         (normal_mod_SOURCES): Removed normal/context.c.
11855         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11856         timeout.mod.
11857         (default_mod_SOURCES): Removed.
11858         (default_mod_CFLAGS): Likewise.
11859         (default_mod_LDFLAGS): Likewise.
11860         (timeout_mod_SOURCES): Removed.
11861         (timeout_mod_CFLAGS): Likewise.
11862         (timeout_mod_LDFLAGS): Likewise.
11864         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11865         normal/context.c.
11867         * commands/default.c: Removed.
11868         * commands/timeout.c: Likewise.
11869         * normal/context.c: Likewise.
11871 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11873         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11875 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11877         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11878         "next" to "prev" for readability.
11879         (struct grub_env_sorted_var): New struct.
11880         (grub_env_context): Renamed to ...
11881         (initial_context): ... this.
11882         (grub_env_var_context): Renamed to ...
11883         (current_context): ... this.
11884         (grub_env_find): Look only at CURRENT_CONTEXT.
11885         (grub_env_context_open): Rewritten to copy exported variables from
11886         previous context.
11887         (grub_env_context_close): Rewritten according to the new
11888         scheme. Also, add an assertion to prevent the initial context from
11889         removed.
11890         (grub_env_insert): Removed the code for the sorted list.
11891         (grub_env_remove): Likewise.
11892         (grub_env_export): Simply mark the variable with
11893         GRUB_ENV_VAR_GLOBAL.
11894         (grub_env_set): A cosmetic change for naming consistency.
11895         (grub_env_get): Likewise.
11896         (grub_env_unset): Likewise.
11897         (grub_env_iterate): Rewritten to sort variables within this
11898         function.
11899         (grub_register_variable_hook): Fixed for naming consistency. Call
11900         grub_env_find again, only if NAME is not found at the first time.
11901         (mangle_data_slot_name): New function.
11902         (grub_env_set_data_slot): Likewise.
11903         (grub_env_get_data_slot): Likewise.
11904         (grub_env_unset_data_slot): Likewise.
11906         * include/grub/env.h (grub_env_var_type): New enum.
11907         (GRUB_ENV_VAR_LOCAL): New constant.
11908         (GRUB_ENV_VAR_GLOBAL): Likewise.
11909         (GRUB_ENV_VAR_DATA): Likewise.
11910         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11911         "type".
11912         (grub_env_set): Replace VAR with NAME for consistency.
11913         (grub_register_variable_hook): Likewise.
11914         (grub_env_export): Specify the name of the argument.
11915         (grub_env_set_data_slot): New prototype.
11916         (grub_env_get_data_slot): Likewise.
11917         (grub_env_unset_data_slot): Likewise.
11919 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11921         Extend the loader so that GRUB can accept a loader which comes
11922         back to GRUB when a loaded image exits. Also, this change adds
11923         support for a chainloader on EFI.
11925         * term/efi/console.c: Include grub/misc.h.
11926         (grub_console_checkkey): Display a scan code on the top for
11927         debugging. This will be removed once the EFI port gets stable.
11928         Correct the scan code mapping.
11930         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11931         allocate memory from larger regions, in order to reduce the number
11932         of allocated regions. Otherwise, the MacOSX loader panics.
11933         (filter_memory_map): Avoid less than 1MB for compatibility with
11934         other loaders.
11935         (add_memory_regions): Allocate from the tail of a region, if
11936         possible, to avoid allocating a region near to 1MB, for the MacOSX
11937         loader.
11939         * kern/efi/init.c (grub_efi_set_prefix): Specify
11940         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11942         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11943         argument IMAGE_HANDLE and specify it to get a loaded image.
11944         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11945         grub_efi_get_loaded_image.
11946         (grub_efi_get_filename): Divide the length by the size of
11947         grub_efi_char16_t.
11948         (grub_efi_get_device_path): New function.
11949         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11950         the length by the size of grub_efi_char16_t for a file path device
11951         path node.
11953         * kern/loader.c (grub_loader_noreturn): New variable.
11954         (grub_loader_set): Accept a new argument NORETURN. Set
11955         GRUB_LOADER_NORETURN to NORETURN.
11956         All callers changed.
11957         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11958         grub_machine_fini.
11960         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11961         prototype.
11962         (grub_efi_get_loaded_image): Take an argument to specify an image
11963         handle.
11965         * include/grub/loader.h (grub_loader_set): Added one more argument
11966         NORETURN.
11968         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11969         instead of grub_efi_open_protocol.
11970         (grub_efidisk_get_device_name): Likewise.
11971         (grub_efidisk_close): Print a newline.
11972         (grub_efidisk_get_device_handle): Fixed to use
11973         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11974         GRUB_EFI_DEVICE_PATH_TYPE.
11976         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11977         * kern/efi/efi.c (device_path_guid): ... here.
11979         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11980         chain.mod.
11981         (kernel_mod_HEADERS): Added efi/disk.h.
11982         (_chain_mod_SOURCES): New variable.
11983         (_chain_mod_CFLAGS): Likewise.
11984         (_chain_mod_LDFLAGS): Likewise.
11985         (chain_mod_SOURCES): Likewise.
11986         (chain_mod_CFLAGS): Likewise.
11987         (chain_mod_LDFLAGS): Likewise.
11989         * DISTLIST: Added include/grub/efi/chainloader.h,
11990         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11992         * include/grub/efi/chainloader.h: New file.
11993         * loader/efi/chainloader.c: Likewise.
11994         * loader/efi/chainloader_normal.c: Likewise.
11996 2006-04-30  Marco Gerards  <marco@gnu.org>
11998         * commands/configfile.c (grub_cmd_source): New function.
11999         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12000         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12002 2006-04-30  Marco Gerards  <marco@gnu.org>
12004         * normal/execute.c (grub_script_execute_cmd): Change the return
12005         type to `grub_err_t'.  Correctly return the error.
12006         (grub_script_execute_cmdline): In case a command line is not a
12007         command or a function, try to interpret it as an assignment.
12009 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12011         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12012         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12013         skip a node whose name is obviously invalid as UTF-16,
12014         i.e. contains a NUL character. Stop the iteration when the last
12015         directory entry is found. Instead of using the return value of
12016         grub_hfsplus_btree_iterate_node, store the value in RET and use
12017         it, because the iterator can be stopped by the last directory
12018         entry.
12020 2006-04-30  Marco Gerards  <marco@gnu.org>
12022         * include/grub/env.h (grub_env_export): New prototype.  Reported
12023         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12025 2006-04-30  Marco Gerards  <marco@gnu.org>
12027         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12028         size of the extents in a catalog file record.
12030 2006-04-29  Marco Gerards  <marco@gnu.org>
12032         * commands/configfile.c (grub_cmd_configfile): Execute the
12033         configfile within its own context.
12035         * include/grub/env.h (grub_env_context_open): New prototype.
12036         (grub_env_context_close): Likewise.
12038         * kern/env.c (grub_env): Removed.
12039         (grub_env_sorted): Likewise.
12040         (grub_env_context): New variable.
12041         (grub_env_var_context): Likewise.
12042         (grub_env_find): Search both the active context and the global
12043         context.
12044         (grub_env_context_open): New function.
12045         (grub_env_context_close): Likewise.
12046         (grub_env_insert): Likewise.
12047         (grub_env_remove): Likewise.
12048         (grub_env_export): Likewise.
12049         (grub_env_set): Changed to use helper functions to avoid code
12050         duplication.
12051         (grub_env_iterate): Rewritten so both the current context and the
12052         global context are being used.
12054         * normal/command.c (export_command): New function.
12055         (grub_command_init): Register the `export' function.
12057 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12059         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12060         explicitly to suppress gcc's warnings.
12061         * fs/fat.c (grub_fat_find_dir): Likewise.
12062         (grub_fat_label): Likewise.
12063         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12064         (grub_xfs_mount): Likewise.
12065         (grub_xfs_label): Likewise.
12066         * fs/affs.c (grub_affs_mount): Likewise.
12067         (grub_affs_label): Likewise.
12068         (grub_affs_iterate_dir): Likewise.
12069         * fs/sfs.c (grub_sfs_mount): Likewise.
12070         (grub_sfs_iterate_dir): Likewise.
12071         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12072         * fs/hfs.c (grub_hfs_mount): Likewise.
12073         (grub_hfs_cmp_catkeys): Likewise.
12074         (grub_hfs_find_dir): Likewise.
12075         (grub_hfs_dir): Likewise.
12076         (grub_hfs_label): Likewise.
12077         * fs/jfs.c (grub_jfs_mount): Likewise.
12078         (grub_jfs_opendir): Likewise.
12079         (grub_jfs_getent): Likewise.
12080         (grub_jfs_lookup_symlink): Likewise.
12081         (grub_jfs_label): Likewise.
12082         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12083         (grub_hfsplus_iterate_dir): Likewise.
12084         (grub_hfsplus_btree_iterate_node): Made static.
12086         * util/grub-emu.c (prefix): New variable.
12087         (grub_machine_set_prefix): New function.
12088         (main): Do not set the environment variable "prefix" here. Only
12089         set PREFIX, which is used later by grub_machine_set_prefix.
12091         * include/grub/video.h: Do not include grub/symbol.h.
12092         (grub_video_register): Not exported. This symbol is not defined in
12093         the kernel.
12094         (grub_video_unregister): Likewise.
12095         (grub_video_iterate): Likewise.
12096         (grub_video_setup): Likewise.
12097         (grub_video_restore): Likewise.
12098         (grub_video_get_info): Likewise.
12099         (grub_video_get_blit_format): Likewise.
12100         (grub_video_set_palette): Likewise.
12101         (grub_video_get_palette): Likewise.
12102         (grub_video_set_viewport): Likewise.
12103         (grub_video_get_viewport): Likewise.
12104         (grub_video_map_color): Likewise.
12105         (grub_video_map_rgb): Likewise.
12106         (grub_video_map_rgba): Likewise.
12107         (grub_video_fill_rect): Likewise.
12108         (grub_video_blit_glyph): Likewise.
12109         (grub_video_blit_bitmap): Likewise.
12110         (grub_video_blit_render_target): Likewise.
12111         (grub_video_scroll): Likewise.
12112         (grub_video_swap_buffers): Likewise.
12113         (grub_video_create_render_target): Likewise.
12114         (grub_video_delete_render_target): Likewise.
12115         (grub_video_set_active_render_target): Likewise.
12117         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12118         Undefined.
12119         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12121         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12122         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12123         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12124         instead of $(srcdir)/genkernsyms.sh.
12126         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12127         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12128         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12129         instead of $(srcdir)/genkernsyms.sh.
12131         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12132         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12133         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12134         instead of $(srcdir)/genkernsyms.sh.
12136         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12137         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12138         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12139         instead of $(srcdir)/genkernsyms.sh.
12141         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12142         genkernsyms.sh.
12144         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12145         genkernsyms.sh.
12146         (gensymlist.sh): New target.
12147         (genkernsyms.sh): Likewise.
12149         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12150         genkernsyms.sh.in and gensymlist.sh.in.
12152         * genkernsyms.sh: Removed.
12153         * gensymlist.sh: Likewise.
12155         * genkernsyms.sh.in: New file.
12156         * gensymlist.sh.in: Likewise.
12158 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12160         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12161         clobber "prefix", since we may have already set it manually.
12163 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12165         * kern/misc.c (abort): New alias for grub_abort.
12167 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12169         A new machine-specific function "grub_machine_set_prefix" is
12170         defined. This is called after loading modules, so that a prefix
12171         initialization can use modules. Also, this change adds an
12172         intensive debugging feature for the memory manager via the
12173         configure option "--enable-mm-debug".
12175         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12176         PART.LEN.
12178         * kern/sparc64/ieee1275/init.c (abort): Removed.
12179         (grub_stop): Likewise.
12180         (grub_exit): New function.
12181         (grub_set_prefix): Renamed to ...
12182         (grub_machine_set_prefix): ... this.
12183         (grub_machine_init): Do not call grub_set_prefix.
12185         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12186         (grub_machine_set_prefix): ... this.
12187         (grub_machine_init): Do not call grub_set_prefix.
12189         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12190         (grub_machine_init): Do not set the prefix here.
12192         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12194         * kern/efi/init.c: Include grub/mm.h.
12195         (grub_efi_set_prefix): New function.
12197         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12198         (grub_efi_get_filename): New function.
12199         (grub_print_device_path): Renamed to ...
12200         (grub_efi_print_device_path): ... this.
12202         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12203         [MM_DEBUG] (grub_realloc): Likewise.
12204         [MM_DEBUG] (grub_free): Likewise.
12205         [MM_DEBUG] (grub_memalign): Likewise.
12206         [MM_DEBUG] (grub_mm_debug): New variable.
12207         [MM_DEBUG] (grub_debug_malloc): New function.
12208         [MM_DEBUG] (grub_debug_free): New function.
12209         [MM_DEBUG] (grub_debug_realloc): New function.
12210         [MM_DEBUG] (grub_debug_memalign): New function.
12212         * kern/misc.c (grub_abort): Print a newline to distinguish
12213         the message.
12215         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12216         grub_set_root_dev after loading modules. This is necessary when
12217         setting a prefix depends on modules.
12219         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12220         (grub_efi_print_device_path): ... this.
12221         (grub_efi_get_filename): New prototype.
12222         (grub_efi_set_prefix): Likewise.
12224         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12225         and grub/disk.h.
12226         (grub_efidisk_get_device_handle): New prototype.
12227         (grub_efidisk_get_device_name): Likewise.
12229         * include/grub/mm.h: Include config.h.
12230         (MM_DEBUG): Removed.
12231         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12232         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12233         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12234         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12235         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12236         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12237         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12238         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12239         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12241         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12243         * disk/efi/efidisk.c: Include grub/partition.h.
12244         (iterate_child_devices): New function.
12245         (add_device): First, compare only last device path nodes, so that
12246         devices are sorted by the types.
12247         (grub_efidisk_get_device_handle): New function.
12248         (grub_efidisk_get_device_name): Likewise.
12250         * configure.ac (--enable-mm-debug): New option to enable the
12251         memory manager debugging feature. This makes the binary much
12252         bigger, so is disabled by default.
12254 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12256         Use grub_abort instead of grub_stop, and grub_exit must be
12257         define in each architecture now. Also, this change adds support
12258         for EFI disks.
12260         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12261         (grub_getkey): New function.
12262         (grub_term_get_current): Likewise.
12264         * util/i386/pc/grub-setup.c: Include grub/term.h.
12265         (grub_getkey): New function.
12266         (grub_term_get_current): Likewise.
12268         * util/misc.c (grub_stop): Renamed to ...
12269         (grub_exit): ... this.
12271         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12272         (grub_exit): ... this.
12273         (grub_machine_init): Use grub_abort instead of abort.
12274         (grub_stop): Removed.
12276         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12277         abort.
12279         * kern/i386/pc/startup.S (grub_exit): New function.
12280         (cold_reboot): New label.
12282         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12283         (grub_efi_init): Call grub_efidisk_init.
12284         (grub_efi_fini): Call grub_efidisk_fini.
12286         * kern/efi/efi.c: Include grub/mm.h.
12287         (grub_efi_console_control_guid): Renamed to ...
12288         (console_control_guid): ... this.
12289         (grub_efi_loaded_image_guid): Renamed to ...
12290         (loaded_image_guid): ... this.
12291         (grub_efi_locate_handle): New function.
12292         (grub_efi_open_protocol): Likewise.
12293         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12294         GRUB_EFI_CONSOLE_CONTROL_GUID.
12295         (grub_efi_exit): Removed.
12296         (grub_stop): Likewise.
12297         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12298         (grub_exit): New function.
12299         (grub_print_device_path): Likewise.
12301         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12302         (grub_enter_rescue_mode): Register "exit".
12304         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12305         (grub_abort): New function.
12307         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12309         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12311         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12313         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12314         (grub_print_device_path): New prototype.
12315         (grub_efi_locate_handle): Likewise.
12316         (grub_efi_open_protocol): Likewise.
12318         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12319         * disk/efi/efidisk.c: Likewise.
12321         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12323         * include/grub/efi/console_control.h
12324         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12326         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12327         last 8 bytes as an array.
12328         (GRUB_EFI_DISK_IO_GUID): New macro.
12329         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12330         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12331         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12332         grub_uint8_t.
12333         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12334         (struct grub_efi_device_path): Rename the member "sub_type" to
12335         "subtype".
12336         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12337         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12338         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12339         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12340         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12341         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12342         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12343         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12344         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12345         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12346         (struct grub_efi_pci_device_path): New structure.
12347         (grub_efi_pci_device_path_t): New type.
12348         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12349         (struct grub_efi_pccard_device_path): New structure.
12350         (grub_efi_pccard_device_path_t): New type.
12351         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12352         (struct grub_efi_memory_mapped_device_path): New structure.
12353         (grub_efi_memory_mapped_device_path_t): New type.
12354         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12355         (struct grub_efi_vendor_device_path): New structure.
12356         (grub_efi_vendor_device_path_t): New type.
12357         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12358         (struct grub_efi_controller_device_path): New structure.
12359         (grub_efi_controller_device_path_t): New type.
12360         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12361         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12362         (struct grub_efi_acpi_device_path): New structure.
12363         (grub_efi_acpi_device_path_t): New type.
12364         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12365         (struct grub_efi_expanded_acpi_device_path): New structure.
12366         (grub_efi_expanded_acpi_device_path_t): New type.
12367         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12368         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12369         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12370         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12371         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12372         (struct grub_efi_atapi_device_path): New structure.
12373         (grub_efi_atapi_device_path_t): New type.
12374         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12375         (struct grub_efi_fibre_channel_device_path): New structure.
12376         (grub_efi_fibre_channel_device_path_t): New type.
12377         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12378         (struct grub_efi_1394_device_path): New structure.
12379         (grub_efi_1394_device_path_t): New type.
12380         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12381         (struct grub_efi_usb_device_path): New structure.
12382         (grub_efi_usb_device_path_t): New type.
12383         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12384         (struct grub_efi_usb_class_device_path): New structure.
12385         (grub_efi_usb_class_device_path_t): New type.
12386         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12387         (struct grub_efi_i2o_device_path): New structure.
12388         (grub_efi_i2o_device_path_t): New type.
12389         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12390         (struct grub_efi_mac_address_device_path): New structure.
12391         (grub_efi_mac_address_device_path_t): New type.
12392         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12393         (struct grub_efi_ipv4_device_path): New structure.
12394         (grub_efi_ipv4_device_path_t): New type.
12395         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12396         (struct grub_efi_ipv6_device_path): New structure.
12397         (grub_efi_ipv6_device_path_t): New type.
12398         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12399         (struct grub_efi_infiniband_device_path): New structure.
12400         (grub_efi_infiniband_device_path_t): New type.
12401         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12402         (struct grub_efi_uart_device_path): New structure.
12403         (grub_efi_uart_device_path_t): New type.
12404         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12405         (struct grub_efi_vendor_messaging_device_path): New structure.
12406         (grub_efi_vendor_messaging_device_path_t): New type.
12407         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12408         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12409         (struct grub_efi_hard_drive_device_path): New structure.
12410         (grub_efi_hard_drive_device_path_t): New type.
12411         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12412         (struct grub_efi_cdrom_device_path): New structure.
12413         (grub_efi_cdrom_device_path_t): New type.
12414         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12415         (struct grub_efi_vendor_media_device_path): New structure.
12416         (grub_efi_vendor_media_device_path_t): New type.
12417         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12418         (struct grub_efi_file_path_device_path): New structure.
12419         (grub_efi_file_path_device_path_t): New type.
12420         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12421         (struct grub_efi_protocol_device_path): New structure.
12422         (grub_efi_protocol_device_path_t): New type.
12423         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12424         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12425         (struct grub_efi_bios_device_path): New structure.
12426         (grub_efi_bios_device_path_t): New type.
12427         (struct grub_efi_disk_io): New structure.
12428         (grub_efi_disk_io_t): New type.
12429         (struct grub_efi_block_io_media): New structure.
12430         (grub_efi_block_io_media_t): New type.
12431         (struct grub_efi_block_io): New structure.
12432         (grub_efi_block_io_t): New type.
12434         * include/grub/misc.h (grub_stop): Removed.
12435         (grub_exit): New prototype.
12436         (grub_abort): Likewise.
12438         * include/grub/disk.h (enum grub_disk_dev_id): Added
12439         GRUB_DISK_DEVICE_EFIDISK_ID.
12441         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12442         disk/efi/efidisk.c.
12443         (kernel_syms.lst): Remove the target if an error occurs.
12445 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12447         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12448         as it was simply too buggy.
12450 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12452         * kern/misc.c (grub_lltoa): New function.
12453         (grub_vsprintf): Added support for the long long suffix,
12454         i.e. "ll".
12456 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12458         * Makefile.in (LDFLAGS): Add variable.
12459         (LD): Remove variable.
12460         * configure.ac: Add -m32 to LDFLAGS.
12461         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12462         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12463         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12464         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12465         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12466         variables.
12467         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12468         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12469         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12471 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12473         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12474         length for unknown glyph.
12476 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12478         Add support for pre-loaded modules into the EFI port.
12480         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12481         completely. Accept one more argument DIR. The caller has changed.
12483         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12485         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12486         (grub_efi_loaded_image_guid): New variable.
12487         (grub_efi_get_loaded_image): New function.
12488         (grub_arch_modules_addr): Likewise.
12490         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12491         prototype.
12493         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12494         (struct grub_efi_loaded_image): New structure.
12495         (grub_efi_loaded_image_t): New type.
12497 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12499         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12500         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12501         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12503 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12505         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12507 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12509         * DISTLIST: Added include/grub/efi/console.h,
12510         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12511         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12513         * include/grub/efi/console.h: New file.
12514         * include/grub/efi/time.h: Likewise.
12515         * include/grub/i386/efi/kernel.h: Likewise.
12516         * kern/efi/init.c: Likewise.
12517         * kern/efi/mm.c: Likewise.
12518         * term/efi/console.c: Likewise.
12520         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12521         (grub_stop): Removed.
12522         (grub_get_rtc): Likewise.
12523         (grub_machine_init): Simply call grub_efi_init.
12524         (grub_machine_fini): Call grub_efi_fini.
12526         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12527         (grub_efi_output_string): Removed.
12528         (grub_efi_stall): New function.
12529         (grub_stop): Likewise.
12530         (grub_get_rtc): Likewise.
12532         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12533         (grub_efi_stall): New prototype.
12534         (grub_efi_allocate_pages): Likewise.
12535         (grub_efi_free_pages): Likewise.
12536         (grub_efi_get_memory_map): Likewise.
12537         (grub_efi_mm_init): Likewise.
12538         (grub_efi_mm_fini): Likewise.
12539         (grub_efi_init): Likewise.
12540         (grub_efi_fini): Likewise.
12542         * include/grub/i386/efi/time.h: Do not include
12543         grub/symbol.h. Include grub/efi/time.h.
12544         (GRUB_TICKS_PER_SECOND): Removed.
12545         (grub_get_rtc): Likewise.
12547         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12548         Added padding. The EFI spec is buggy.
12549         (GRUB_EFI_BLACK): New macro.
12550         (GRUB_EFI_BLUE): Likewise.
12551         (GRUB_EFI_GREEN): Likewise.
12552         (GRUB_EFI_CYAN): Likewise.
12553         (GRUB_EFI_RED): Likewise.
12554         (GRUB_EFI_MAGENTA): Likewise.
12555         (GRUB_EFI_BROWN): Likewise.
12556         (GRUB_EFI_LIGHTGRAY): Likewise.
12557         (GRUB_EFI_BRIGHT): Likewise.
12558         (GRUB_EFI_DARKGRAY): Likewise.
12559         (GRUB_EFI_LIGHTBLUE): Likewise.
12560         (GRUB_EFI_LIGHTGREEN): Likewise.
12561         (GRUB_EFI_LIGHTCYAN): Likewise.
12562         (GRUB_EFI_LIGHTRED): Likewise.
12563         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12564         (GRUB_EFI_YELLOW): Likewise.
12565         (GRUB_EFI_WHITE): Likewise.
12566         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12567         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12568         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12569         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12570         (GRUB_EFI_BACKGROUND_RED): Likewise.
12571         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12572         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12573         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12574         (GRUB_EFI_TEXT_ATTR): Likewise.
12576         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12577         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12578         (kernel_mod_HEADERS): Added efi/time.h.
12580 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12582         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12583         include/grub/efi/api.h, include/grub/efi/console_control.h,
12584         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12585         include/grub/i386/efi/time.h, kern/efi/efi.c,
12586         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12587         and util/i386/efi/grub-mkimage.c.
12589         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12591         * genmk.rb (PModule#rule): Do not export symbols if
12592         #{prefix}_EXPORTS is set to "no".
12594         * conf/i386-efi.mk: New file.
12595         * conf/i386-efi.rmk: Likewise.
12596         * include/grub/efi/api.h: Likewise.
12597         * include/grub/efi/console_control.h: Likewise.
12598         * include/grub/efi/efi.h: Likewise.
12599         * include/grub/efi/pe32.h: Likewise.
12600         * include/grub/i386/efi/time.h: Likewise.
12601         * kern/efi/efi.c: Likewise.
12602         * kern/i386/efi/init.c: Likewise.
12603         * kern/i386/efi/startup.S: Likewise.
12604         * util/i386/efi/grub-mkimage.c: Likewise.
12606 2006-04-17  Marco Gerards  <marco@gnu.org>
12608         * include/grub/script.h: Include <grub/parser.h> and
12609         "grub_script.tab.h".
12610         (struct grub_lexer_param): New struct.
12611         (struct grub_parser_param): Likewise.
12612         (grub_script_create_arglist): Pass the state in an argument.
12613         (grub_script_add_arglist): Likewise.
12614         (grub_script_create_cmdline): Likewise.
12615         (grub_script_create_cmdblock): Likewise.
12616         (grub_script_create_cmdif): Likewise.
12617         (grub_script_create_cmdmenu): Likewise.
12618         (grub_script_add_cmd): Likewise.
12619         (grub_script_arg_add): Likewise.
12620         (grub_script_lexer_ref): Likewise.
12621         (grub_script_lexer_deref): Likewise.
12622         (grub_script_lexer_record_start): Likewise.
12623         (grub_script_lexer_record_stop): Likewise.
12624         (grub_script_mem_record): Likewise.
12625         (grub_script_mem_record_stop): Likewise.
12626         (grub_script_malloc): Likewise.
12627         (grub_script_yylex): Likewise.
12628         (grub_script_yyparse): Likewise.
12629         (grub_script_yyerror): Likewise.
12630         (grub_script_yylex): Likewise.
12631         (grub_script_lexer_init): Return the state.
12633         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12634         (grub_script_lexer_done): Likewise.
12635         (grub_script_lexer_getline): Likewise.
12636         (grub_script_lexer_refs): Likewise.
12637         (script): Likewise.
12638         (newscript): Likewise.
12639         (record): Likewise.
12640         (recording): Likewise.
12641         (recordpos): Likewise.
12642         (recordlen): Likewise.
12643         (grub_script_lexer_init): Return the state instead of setting
12644         global variables.
12645         (grub_script_lexer_ref): Use the newly added argument for state
12646         instead of globals.
12647         (grub_script_lexer_deref): Likewise.
12648         (grub_script_lexer_record_start): Likewise.
12649         (grub_script_lexer_record_stop): Likewise.
12650         (recordchar): Likewise.
12651         (nextchar): Likewise.
12652         (grub_script_yylex2): Likewise.
12653         (grub_script_yylex): Likewise.
12654         (grub_script_yyerror): Likewise.
12656         * normal/parser.y (func_mem): Removed variable.
12657         (menu_entry): Likewise.
12658         (err): Likewise.
12659         (%lex-param): New parser option.
12660         (%parse-param): Likewise.
12661         (script): Always return the AST.
12662         (argument): Pass the state around.
12663         (arguments): Likewise.
12664         (grubcmd): Likewise.
12665         (commands): Likewise.
12666         (function): Likewise.
12667         (menuentry): Likewise.
12668         (if_statement): Likewise.
12669         (if): Likewise.
12671         * normal/script.c (grub_script_memused): Removed variable.
12672         (grub_script_parsed): Likewise.
12673         (grub_script_malloc): Added a state argument.  Use that instead of
12674         global variables.
12675         (grub_script_mem_record): Likewise.
12676         (grub_script_mem_record_stop): Likewise.
12677         (grub_script_arg_add): Likewise.
12678         (grub_script_add_arglist): Likewise.
12679         (grub_script_create_cmdline): Likewise.
12680         (grub_script_create_cmdif): Likewise.
12681         (grub_script_create_cmdmenu): Likewise.
12682         (grub_script_add_cmd): Likewise.
12683         (grub_script_parse): Setup the state before calling the parser.
12685 2006-04-16  Marco Gerards  <marco@gnu.org>
12687         * normal/command.c (grub_command_init): Remove the title command.
12689         * normal/lexer.c (grub_script_yylex): Renamed from this...
12690         (grub_script_yylex2): ... to this.
12691         (grub_script_yylex): New function.  Temporary
12692         introduced to filter some tokens.
12693         (grub_script_yyerror): Print a newline.
12695         * normal/main.c (read_config_file): Output information about the
12696         lines that contain errors.  Wait for a key after all lines have
12697         been processed.  Don't return an empty menu.
12699         * normal/parser.y (func_mem): Don't initialize.
12700         (menu_entry): Likewise.
12701         (err): New variable.
12702         (script): Don't return anything when an error was encountered.
12703         (ws, returns): Removed rules.
12704         (argument): Disabled concatenated variable support.
12705         (arguments): Remove explicit separators.
12706         (grubcmd): Likewise.
12707         (function): Likewise.
12708         (menuentry): Likewise.
12709         (if): Likewise.
12710         (commands): Likewise.  Add error handling.
12712         * normal/script.c (grub_script_create_cmdline): If
12713         `grub_script_parsed' is 0, assume the parser encountered an error.
12715 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12717         * configure.ac: Add support for EFI. Fix the typo
12718         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12720 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12722         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12723         foreign multibyte characters should be shown correctly.
12725 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12727         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12728         calculation.
12729         (read_config_file): Made it to close file before returning.
12731 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12733         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12734         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12735         video/i386/pc/vbefill.c.
12737         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12738         video/i386/pc/vbefill.c.
12740         * include/grub/video.h (grub_video_blit_format): New enum.
12741         (grub_video_mode_info): Added new member blit_format.
12742         (grub_video_get_blit_format): New function prototype.
12744         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12745         function prototype.
12746         (grub_video_vbe_map_rgb): Likewise.
12747         (grub_video_vbe_unmap_color): Likewise.
12749         * include/grub/i386/pc/vbeblit.h: New file.
12751         * include/grub/i386/pc/vbefill.h: New file.
12753         * video/video.c (grub_video_get_blit_format): New function.
12754         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12755         (grub_video_vbe_map_rgb): Likewise.
12756         (grub_video_vbe_unmap_color): Likewise.
12758         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12759         optimized fills.
12760         (grub_video_vbe_blit_render_target): Changed to use more optimized
12761         blits.
12762         (grub_video_vbe_setup): Added detection for optimized settings.
12763         (grub_video_vbe_create_render_target): Likewise.
12765         * video/i386/pc/vbeblit.c: New file.
12767         * video/i386/pc/vbefill.c: New file.
12769 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12771         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12772         here...
12774         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12775         parsing to support both hex and dec ranges.  If filename was missing
12776         show usage information.
12778 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12780         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12781         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12783         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12784         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12785         (video_mod_SOURCES): Added.
12786         (video_mod_CFLAGS): Likewise.
12787         (video_mod_LDFLAGS): Likewise.
12788         (gfxterm_mod_SOURCES): Likewise.
12789         (gfxterm_mod_CFLAGS): Likewise.
12790         (gfxterm_mod_LDFLAGS): Likewise.
12791         (videotest_mod_SOURCES): Likewise.
12792         (videotest_mod_CFLAGS): Likewise.
12793         (videotest_mod_LDFLAGS): Likewise.
12794         (vesafb_mod_SOURCES): Removed.
12795         (vesafb_mod_CFLAGS): Likewise.
12796         (vesafb_mod_LDFLAGS): Likewise.
12797         (vga_mod_SOURCES): Likewise.
12798         (vga_mod_CFLAGS): Likewise.
12799         (vga_mod_LDFLAGS): Likewise.
12801         * commands/videotest.c: New file.
12803         * font/manager.c (fill_with_default_glyph): Modified to use
12804         grub_font_glyph.
12805         (grub_font_get_glyph): Likewise.
12806         (fontmanager): Renamed from this...
12807         (font_manager): ... to this.
12809         * include/grub/font.h (grub_font_glyph): Added new structure.
12810         (grub_font_get_glyph): Modified to use grub_font_glyph.
12812         * include/grub/misc.h (grub_abs): Added as inline function.
12814         * include/grub/video.h: New file.
12816         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12817         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12818         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12819         (grub_vbe_get_controller_info): Renamed from this...
12820         (grub_vbe_bios_get_controller_info): ... to this.
12821         (grub_vbe_get_mode_info): Renamed from this...
12822         (grub_vbe_bios_get_mode_info): ... to this.
12823         (grub_vbe_set_mode): Renamed from this...
12824         (grub_vbe_bios_set_mode): ... to this.
12825         (grub_vbe_get_mode): Renamed from this...
12826         (grub_vbe_bios_get_mode): ... to this.
12827         (grub_vbe_set_memory_window): Renamed from this...
12828         (grub_vbe_bios_set_memory_window): ... to this.
12829         (grub_vbe_get_memory_window): Renamed from this...
12830         (grub_vbe_bios_get_memory_window): ... to this.
12831         (grub_vbe_set_scanline_length): Renamed from this...
12832         (grub_vbe_set_scanline_length): ... to this.
12833         (grub_vbe_get_scanline_length): Renamed from this...
12834         (grub_vbe_bios_get_scanline_length): ... to this.
12835         (grub_vbe_set_display_start): Renamed from this...
12836         (grub_vbe_bios_set_display_start): ... to this.
12837         (grub_vbe_get_display_start): Renamed from this...
12838         (grub_vbe_bios_get_display_start): ... to this.
12839         (grub_vbe_set_palette_data): Renamed from this...
12840         (grub_vbe_bios_set_palette_data): ... to this.
12841         (grub_vbe_set_pixel_rgb): Removed.
12842         (grub_vbe_set_pixel_index): Likewise.
12844         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12845         from this...
12846         (grub_vbe_bios_get_controller_info): ... to this.
12847         (grub_vbe_get_mode_info): Renamed from this...
12848         (grub_vbe_bios_get_mode_info): ... to this.
12849         (grub_vbe_set_mode): Renamed from this...
12850         (grub_vbe_bios_set_mode): ... to this.
12851         (grub_vbe_get_mode): Renamed from this...
12852         (grub_vbe_bios_get_mode): ... to this.
12853         (grub_vbe_set_memory_window): Renamed from this...
12854         (grub_vbe_bios_set_memory_window): ... to this.
12855         (grub_vbe_get_memory_window): Renamed from this...
12856         (grub_vbe_bios_get_memory_window): ... to this.
12857         (grub_vbe_set_scanline_length): Renamed from this...
12858         (grub_vbe_set_scanline_length): ... to this.
12859         (grub_vbe_get_scanline_length): Renamed from this...
12860         (grub_vbe_bios_get_scanline_length): ... to this.
12861         (grub_vbe_set_display_start): Renamed from this...
12862         (grub_vbe_bios_set_display_start): ... to this.
12863         (grub_vbe_get_display_start): Renamed from this...
12864         (grub_vbe_bios_get_display_start): ... to this.
12865         (grub_vbe_set_palette_data): Renamed from this...
12866         (grub_vbe_bios_set_palette_data): ... to this.
12867         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12868         getting corrupted after calling it.  Added more pushes and pops.
12869         (grub_vbe_bios_set_mode): Likewise.
12870         (grub_vbe_bios_get_mode): Likewise.
12871         (grub_vbe_bios_get_memory_window): Likewise.
12872         (grub_vbe_bios_set_scanline_length): Likewise.
12873         (grub_vbe_bios_get_scanline_length): Likewise.
12874         (grub_vbe_bios_get_display_start): Likewise.
12875         (grub_vbe_bios_set_palette_data): Likewise.
12877         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12878         (cl_insert): Likewise.
12879         (cl_delete): Likewise.
12881         * term/gfxterm.c: New file.
12883         * term/i386/pc/vesafb.c: Removed file.
12885         * video/video.c: New file.
12887         * video/i386/pc/vbe.c (real2pm): Added new function.
12888         (grub_video_vbe_draw_pixel): Likewise.
12889         (grub_video_vbe_get_video_ptr): Likewise.
12890         (grub_video_vbe_get_pixel): Likewise
12891         (grub_video_vbe_init): Likewise.
12892         (grub_video_vbe_fini): Likewise.
12893         (grub_video_vbe_setup): Likewise.
12894         (grub_video_vbe_get_info): Likewise.
12895         (grub_video_vbe_set_palette): Likewise.
12896         (grub_video_vbe_get_palette): Likewise.
12897         (grub_video_vbe_set_viewport): Likewise.
12898         (grub_video_vbe_get_viewport): Likewise.
12899         (grub_video_vbe_map_color): Likewise.
12900         (grub_video_vbe_map_rgb): Likewise.
12901         (grub_video_vbe_map_rgba): Likewise.
12902         (grub_video_vbe_unmap_color): Likewise.
12903         (grub_video_vbe_fill_rect): Likewise.
12904         (grub_video_vbe_blit_glyph): Likewise.
12905         (grub_video_vbe_blit_bitmap): Likewise.
12906         (grub_video_vbe_blit_render_target): Likewise.
12907         (grub_video_vbe_scroll): Likewise.
12908         (grub_video_vbe_swap_buffers): Likewise.
12909         (grub_video_vbe_create_render_target): Likewise.
12910         (grub_video_vbe_delete_render_target): Likewise.
12911         (grub_video_vbe_set_active_render_target): Likewise.
12912         (grub_vbe_set_pixel_rgb): Remove function.
12913         (grub_vbe_set_pixel_index): Likewise.
12914         (index_color_mode): Remove static variable.
12915         (active_mode): Likewise.
12916         (framebuffer): Likewise.
12917         (bytes_per_scan_line): Likewise.
12918         (grub_video_vbe_adapter): Added new static variable.
12919         (framebuffer): Likewise.
12920         (render_target): Likewise.
12921         (initial_mode): Likewise.
12922         (mode_in_use): Likewise.
12923         (mode_list): Likewise.
12925 2006-03-10  Marco Gerards  <marco@gnu.org>
12927         * configure.ac (AC_INIT): Bumped to 1.93.
12929         * DISTLIST: Added `include/grub/hfs.h'.
12931 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12933         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12934         18H, which might help the BIOS falling back to next boot media.
12936 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12938         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12939         Poe Chen <poe.poechen@gmail.com>.
12941 2006-01-17  Marco Gerards  <marco@gnu.org>
12943         * include/grub/normal.h: Include <grub/script.h>.
12944         (grub_command_list): Removed struct.
12945         (grub_command_list_t): Removed type.
12946         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12947         members `commands' and `sourcecode'.
12948         * include/grub/script.h: Add inclusion guards.
12949         (grub_script_cmd_menuentry): New struct.
12950         (grub_script_execute_menuentry): New prototype.
12951         (grub_script_lexer_record_start): Likewise.
12952         (grub_script_lexer_record_stop): Likewise.
12953         * normal/execute.c (grub_script_execute_menuentry): New function.
12954         * normal/lexer.c (record, recording, recordpos, recordlen): New
12955         variables.
12956         (grub_script_lexer_record_start): New function.
12957         (grub_script_lexer_record_stop): Likewise.
12958         (recordchar): Likewise.
12959         (nextchar): Likewise.
12960         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12961         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12962         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12963         (current_menu): New variable.
12964         (free_menu): Mainly rewritten.
12965         (grub_normal_menu_addentry): New function.
12966         (read_config_file): Rewritten.
12967         * normal/menu.c (run_menu_entry): Mainly rewritten.
12968         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12969         the menu entry.
12970         (run): Mainly rewritten.
12971         * normal/parser.y (menu_entry): New variable.
12972         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12973         (menuentry): New rule.
12974         (command): Add `menuentry'.
12975         (if_statement): Allow additional returns before `fi'.
12976         * normal/script.c (grub_script_create_cmdmenu): New function.
12978 2006-01-03  Marco Gerards  <marco@gnu.org>
12980         * INSTALL: GNU Bison is required.
12981         * configure.ac: Rewritten the test to detect Bison.
12982         * Makefile.in (YACC): New variable.  Reported by Xun Sun
12983         <xun.sun.cn@gmail.com>.
12985 2006-01-03  Marco Gerards  <marco@gnu.org>
12987         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12988         the HFS+ filesystem to filesystem blocks.
12989         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12990         GCC warning is silenced.
12992 2006-01-03  Marco Gerards  <marco@gnu.org>
12994         * partmap/apple.c (apple_partition_map_iterate): Convert the data
12995         read from disk from big endian to host byte order.
12997 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12999         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13000         documentation.
13001         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13002         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13003         embedded HFS+ filesystem.
13004         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13005         (grub_hfs_sblock): Move from here...
13006         * include/grub/hfs.h: To here...  New file.
13007         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13008         documentation.
13009         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13010         New macros.
13011         (grub_hfsplus_volheader): Change type of member `magic' to
13012         `grub_uint16_t'.
13013         (grub_hfsplus_data): Add new member `embedded_offset'.
13014         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13015         returned block.
13016         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13017         Calculate the offset.
13019 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13021         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13022         Removed.
13023         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13025 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13027         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13028         ENV->NAME is NULL after allocating ENV->VALUE.
13030 2005-12-25  Marco Gerards  <marco@gnu.org>
13032         * kern/env.c (grub_env_set): Rewritten the error handling code.
13034 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13036         * geninit.sh: Made more robust, and more portable.
13038 2005-12-25  Marco Gerards  <marco@gnu.org>
13040         Add support for Apple HFS+ filesystems.
13042         * fs/hfsplus.c: New file.
13044         * DISTLIST: Added `fs/hfsplus.c'.
13046         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13047         (hfsplus_mod_SOURCES): New variable.
13048         (hfsplus_mod_CFLAGS): Likewise.
13049         (hfsplus_mod_LDFLAGS): Likewise.
13050         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13051         (grub_setup_SOURCES): Likewise.
13052         (grub_mkdevicemap_SOURCES): Likewise.
13053         (grub_emu_SOURCES): Likewise.
13054         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13056         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13058         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13060 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13062         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13063         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13064         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13065         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13066         normal/lexer.c, normal/parser.y, normal/script.c, and
13067         partmap/gpt.c.
13068         Removed kern/sparc64/cache.c.
13070         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13071         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13072         grub_emu_init.c.
13074         * configure.ac (AC_INIT): Bumped to 1.92.
13076 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13078         * kern/err.c (grub_error_push): Added new function to support error
13079         stacks.
13080         (grub_error_pop): Likewise.
13081         (grub_error_stack_items): New local variable to support error stacks.
13082         (grub_error_stack_pos): Likewise.
13083         (grub_error_stack_assert): Likewise.
13084         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13085         stack depth.
13086         (grub_print_error): Added support to print errors from error stack.
13088         * include/grub/err.h (grub_error_push): Added function prototype.
13089         (grub_error_pop): Likewise.
13091 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13093         * configure.ac: Accept `powerpc64' as host_cpu.
13094         (amd64): Rename to `biarch32'.
13096         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13097         non-cacheline-aligned addresses.
13099         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13100         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13101         if `size' is non-zero.
13103 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13105         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13106         and `cd' to make sure the filename is not prefixed with a
13107         directory name.
13108         (pkgdata_MODULES): Add `gpt.mod'.
13109         (gpt_mod_SOURCES): New variable.
13110         (gpt_mod_CFLAGS): Likewise.
13111         (gpt_mod_LDFLAGS): Likewise.
13113         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13115         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13116         New macro.
13118         * partmap/gpt.c: New file.
13120         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13121         GPT partition map is detected.
13123 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13125         * commands/i386/pc/play.c: New file.
13126         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13127         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13128         macros.
13130 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13132         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13133         ((unused))' to silence gcc warning.
13135 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13137         * configure.ac: Correct `AC_PROG_YACC' test.
13139 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13141         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13142         check before installing files.
13144 2005-11-22  Mike Small  <smallm@panix.com>
13146         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13147         number regex so multidigit numbers are recognized correctly.
13149 2005-11-22  Mike Small  <smallm@panix.com>
13151         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13152         debugging message before attempting to claim memory.
13153         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13154         multiple addresses in case of failure.
13156 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13158         * term/tparm.c (get_space): Remove empty `if' statement.
13160         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13162         * kern/parser.c (check_varstate): Rename `state' to 's'.
13164 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13166         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13167         variable definitions to the beginning of each function.  Sort stack
13168         variables by size.
13169         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13170         `buf' argument to `char *'.
13172 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13174         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13175         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13176         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13177         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13178         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13179         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13180         configfile.mod, search.mod, gzio.mod and test.mod.
13181         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13182         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13183         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13184         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13185         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13186         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13187         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13188         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13189         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13190         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13191         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13192         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13193         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13194         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13195         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13196         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13197         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13198         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13199         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13200         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13201         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13202         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13203         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13205         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13206         `grep --include'.
13207         (pkgdata_MODULES): Add test.mod.
13209 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13211         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13212         appending to variables with "+=".
13213         (PModule): Use full pathname to generate *.lst filenames.
13215         * Makefile.in: Fixed list rules moved from genmk.rb.
13216         (.DELETE_ON_ERROR): New special target.
13217         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13219         * conf/i386-pc.rmk: Include conf/common.mk.
13220         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13221         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13222         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13223         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13224         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13225         configfile.mod, search.mod, gzio.mod and test.mod.
13226         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13227         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13228         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13229         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13230         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13231         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13232         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13233         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13234         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13235         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13236         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13237         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13238         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13239         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13240         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13241         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13242         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13243         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13244         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13245         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13246         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13247         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13248         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13249         here...
13250         * conf/common.rmk: ... to here.  New file.
13252         * conf/common.mk: New file.
13254 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13256         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13257         (grub_script.tab.c): ... here.
13259         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13260         (grub_script.tab.c): ... here.
13262         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13263         (grub_script.tab.c): ... here.
13265         * normal/command.c (grub_command_find): Fixed a memory leak of
13266         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13268 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13270         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13271         "@" which marks the start of a comment on ARM.
13272         (VARIABLE): Likewise.
13274 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13276         Add support for Linux/ADFS partition tables.
13278         * partmap/acorn.c: New file.
13280         * include/grub/acorn_filecore.h: Likewise.
13282         * DISTLIST: Added `partmap/acorn.c' and
13283         `include/grub/acorn_filecore.h'.
13285         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13286         `partmap/acorn.c'.
13287         (pkgdata_MODULES): Add `acorn.mod'.
13288         (acorn_mod_SOURCES): New variable.
13289         (acorn_mod_CFLAGS): Likewise.
13291         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13292         `partmap/acorn.c'.
13293         (pkgdata_MODULES): Add `acorn.mod'.
13294         (acorn_mod_SOURCES): New variable.
13295         (acorn_mod_CFLAGS): Likewise.
13297         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13298         (pkgdata_MODULES): Add `acorn.mod'.
13299         (acorn_mod_SOURCES): New variable.
13300         (acorn_mod_CFLAGS): Likewise.
13301         (acorn_mod_LDFLAGS): Likewise.
13303         * include/types.h (grub_disk_addr_t): New typedef.
13305 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13307         * geninit.sh: New file.
13309         * geninitheader.sh: Likewise.
13311         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13312         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13313         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13314         * commands/configfile.c (grub_configfile_init)
13315         (grub_configfile_fini): Likewise.
13316         * commands/default.c (grub_default_init, grub_default_fini):
13317         Likewise.
13318         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13319         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13320         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13321         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13322         Likewise.
13323         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13324         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13325         Likewise.
13326         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13327         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13328         Likewise.
13329         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13330         Likewise.
13331         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13332         Likewise.
13333         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13334         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13335         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13336         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13337         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13338         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13339         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13340         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13341         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13342         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13343         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13344         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13345         * partmap/amiga.c (grub_amiga_partition_map_init)
13346         (grub_amiga_partition_map_fini): Likewise.
13347         * partmap/apple.c (grub_apple_partition_map_init)
13348         (grub_apple_partition_map_fini): Likewise.
13349         * partmap/pc.c (grub_pc_partition_map_init)
13350         (grub_pc_partition_map_fini): Likewise.
13351         * partmap/sun.c (grub_sun_partition_map_init,
13352         grub_sun_partition_map_fini): Likewise.
13353         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13354         Likewise.
13356         * util/grub-emu.c: Include <grub_modules_init.h>.
13357         (main): Don't initialize and de-initialize any modules directly,
13358         use `grub_init_all' and `grub_fini_all' instead.
13360         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13361         `grub_vesafb_mod_init'.
13362         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13363         all users.
13364         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13365         `grub_vga_mod_init'.  Updated all users.
13366         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13368         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13369         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13370         rules.
13372         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13373         Generate a function to initialize the module in utilities.
13374         Updated all callers.
13375         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13376         initialize the module in utilities.  Updated all callers.
13378 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13380         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13381         escape sequence and a literal ^L to clear the screen.
13383         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13384         when returning from Open Firmware.
13386 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13388         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13389         (grub_ofconsole_height): Likewise.
13390         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13391         manually insert a '\n'.
13392         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13393         `grub_ofconsole_height'.  Return early if these are already set.
13395 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13397         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13398         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13399         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13400         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13401         and `normal/script.c'.
13402         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13403         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13404         (test_mod_SOURCES): New variable.
13405         (test_mod_CFLAGS): Likewise.
13406         (test_mod_LDFLAGS): Likewise.
13407         (pkgdata_MODULES): Add `test.mod'.
13408         (grub_script.tab.c): New rule.
13409         (grub_script.tab.h): Likewise.
13411 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13413         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13414         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13415         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13416         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13417         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13418         (test_mod_SOURCES): New variable.
13419         (test_mod_CFLAGS): Likewise.
13420         (pkgdata_MODULES): Add `test.mod'.
13421         (grub_script.tab.c): New rule.
13422         (grub_script.tab.h): Likewise.
13424 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13426         Add initial scripting support.
13428         * commands/test.c: New file.
13429         * include/grub/script.h: Likewise.
13430         * normal/execute.c: Likewise.
13431         * normal/function.c: Likewise.
13432         * normal/lexer.c: Likewise.
13433         * normal/parser.y: Likewise.
13434         * normal/script.c: Likewise.
13436         * configure.ac: Add `AC_PROG_YACC' test.
13438         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13439         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13440         `normal/function.c' and `normal/script.c'.
13441         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13442         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13443         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13444         variables.
13445         (pkgdata_MODULES): Add `test.mod'.
13446         (grub_script.tab.c): New rule.
13447         (grub_script.tab.h): Likewise.
13449         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13451         * include/grub/normal.h (grub_test_init): New prototype.
13452         (grub_test_fini): Likewise.
13454         * normal/command.c: Include <grub/script.h>.
13455         (grub_command_execute): Rewritten.
13457         * util/grub-emu.c (main): Call `grub_test_init' and
13458         `grub_test_fini'.
13460 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13462         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13463         to 0.
13464         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13465         there are no pending characters.
13467 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13469         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13470         `grub_strndup' to drop device arguments. Replace unnecessary
13471         `grub_strndup' with `grub_strdup'.
13473 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13475         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13476         `debug' environment variable has been set.
13478 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13480         * Makefile.in (install-local): Use $(DATA).
13481         (uninstall): Likewise.
13482         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13483         (sbin_UTILITIES): ... to here.
13484         (sbin_SCRIPTS): New variable.
13485         (grub_install_SOURCES): New variable.
13486         * util/powerpc/ieee1275/grub-install.in: New file.
13487         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13488         variable.
13489         (add_segments): Call `grub_util_get_path'.
13491 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13493         From Timothy Baldwin:
13494         * commands/ls.c (grub_ls_list_files): Close FILE with
13495         grub_file_close.
13496         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13498 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13500         * include/grub/parser.h: New file.
13502         * kern/parser.c: Likewise.
13504         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13505         (grub_setup_SOURCES): Likewise.
13506         (grub_probefs_SOURCES): Likewise.
13507         (grub_emu_SOURCES): Likewise.
13508         (kernel_img_HEADERS): Add `parser.h'.
13510         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13511         (grub_emu_SOURCES): Add `kern/parser.c'.
13512         (grubof_SOURCES): Likewise.
13514         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13515         (grubof_SOURCES): Add `kern/parser.c'.
13517         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13519         * kern/misc.c (grub_split_cmdline): Removed function.
13521         * kern/rescue.c: Include <grub/parser.h>.
13522         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13523         of `grub_split_cmdline'.
13525         * normal/command.c: Include <grub/parser.h>.
13526         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13527         of `grub_split_cmdline'.
13529         * normal/completion.c: Include <grub/parser.h>.
13530         (cmdline_state): New variable.
13531         (iterate_dir): End the filename with a quote depending on the
13532         command line state.
13533         (get_state): new function.
13534         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13535         split the arguments and determine the current argument.  When the
13536         argument string is not quoted, escape all spaces.
13538 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13540         * normal/sparc64/setjmp.S: New file.
13542 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13544         * include/grub/sparc64/libgcc.h: New file.
13545         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13546         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13547         normal/sparc64/setjmp.c.
13549 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13551         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13552         * kern/sparc64/cache.S: New file.
13553         * kern/sparc64/cache.c: Removed.
13554         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13555         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13556         -mtune=ultrasparc.
13557         (COMMON_LDFLAGS): Add -melf64_sparc.
13558         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13559         (grubof_SOURCES): Use cache.S instead of cache.c.
13560         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13561         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13562         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13563         commented though.
13564         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13565         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13566         (linux_mod_CFLAGS): Commented out.
13567         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13568         out because module isn't built.
13569         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13570         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13571         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13572         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13573         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13574         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13575         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13576         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13577         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13578         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13579         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13580         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13581         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13582         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13584 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13586         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13587         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13588         longer, because HFS should not be used on PC.
13590 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13592         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13593         consistently within the loop.
13595 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13597         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13598         directory can not be read.
13600 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13602         * configure.ac (AC_INIT): Increase the version number to 1.91.
13604         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13605         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13606         term/i386/pc/serial.c.
13608 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13610         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13611         file size must be permitted.
13613         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13614         between %ah and %al.
13616 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13618         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13619         grub_uint64_t.
13620         Call the hook with a NUL-terminated filename.
13621         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13622         grub_cpu_to_be32.
13624         * kern/term.c (cursor_state): New variable.
13625         (grub_term_set_current): Reset the cursor state on a new
13626         terminal.
13627         (grub_setcursor): Rewritten to use CURSOR_STATE.
13628         (grub_getcursor): New function.
13630         * include/grub/term.h (grub_getcursor): New prototype.
13632         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13633         integers on ARM. Reported by Timothy Baldwin
13634         <T.E.Baldwin99@members.leeds.ac.uk>.
13636 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13638         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13639         allocated.
13640         (grub_sfs_dir): Likewise.
13642 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13644         Add support for the SFS filesystem.
13646         * fs/sfs.c: New file.
13648         * DISTLIST: Added `fs/sfs.c'.
13650         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13651         (grub_probefs_SOURCES): Likewise.
13652         (grub_emu_SOURCES): Likewise.
13653         (pkgdata_MODULES): Add `sfs.mod'.
13654         (sfs_mod_SOURCES): New variable.
13655         (sfs_mod_CFLAGS): Likewise.
13656         (sfs_mod_LDFLAGS): Likewise.
13658         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13659         (pkgdata_MODULES): Add `sfs.mod'.
13660         (sfs_mod_SOURCES): New variable.
13661         (sfs_mod_CFLAGS): Likewise.
13663         * util/grub-emu.c (main): Call `grub_sfs_init' and
13664         `grub_sfs_fini'.
13666         * include/grub/fs.h (grub_sfs_init): New prototype.
13667         (grub_sfs_fini): Likewise.
13669 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13671         Add support for the AFFS filesystem.
13673         * fs/affs.c: New file.
13675         * DISTLIST: Added `fs/affs.c'.
13677         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13678         (grub_probefs_SOURCES): Likewise.
13679         (grub_emu_SOURCES): Likewise.
13680         (pkgdata_MODULES): Add `affs.mod'.
13681         (affs_mod_SOURCES): New variable.
13682         (affs_mod_CFLAGS): Likewise.
13683         (affs_mod_LDFLAGS): Likewise.
13685         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13686         (pkgdata_MODULES): Add `affs.mod'.
13687         (affs_mod_SOURCES): New variable.
13688         (affs_mod_CFLAGS): Likewise.
13690         * util/grub-emu.c (main): Call `grub_affs_init' and
13691         `grub_affs_fini'.
13693         * include/grub/fs.h (grub_affs_init): New prototype.
13694         (grub_affs_fini): Likewise.
13696 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13698         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13700 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13702         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13703         `-m32' to CFLAGS.
13705         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13706         linking.
13708         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13709         (COMMON_LDFLAGS): New variable.
13710         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13711         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13712         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13713         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13714         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13715         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13716         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13717         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13718         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13719         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13720         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13721         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13722         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13723         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13724         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13725         variables.
13726         (normal_mod_ASFLAGS): Add `-m32'.
13728         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13729         (grub_host_size_t, grub_host_ssize_t): New types.
13730         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13731         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13732         `GRUB_HOST_SIZEOF_VOID_P'.
13734         * include/grub/kernel.h (struct grub_module_header): Type of
13735         member offset changed to `grub_host_off_t'.  Type of member size
13736         changed to `grub_host_size_t'.
13737         (struct grub_module_info): Type of member offset changed to
13738         `grub_host_off_t'.  Type of member size changed to
13739         `grub_host_size_t'.
13741 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13743         Make GRUB's kernel compliant to Multiboot Specification.
13745         * kern/i386/pc/startup.S (multiboot_header): New label.
13746         (multiboot_entry): Likewise.
13747         (multiboot_trampoline): Likewise.
13749         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13750         Increased to 0x4A0.
13752         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13753         put parentheses after a question mark.
13754         [!GRUB_UTIL] (my_mod): New variable.
13756         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13758 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13760         Adds support for the XFS filesystem.  Btrees are not supported
13761         yet.
13763         * fs/xfs.c: New file.
13765         * DISTLIST: Added `fs/xfs.c'.
13767         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13768         (grub_probefs_SOURCES): Likewise.
13769         (grub_emu_SOURCES): Likewise.
13770         (pkgdata_MODULES): Add `xfs.mod'.
13771         (xfs_mod_SOURCES): New variable.
13772         (xfs_mod_CFLAGS): Likewise.
13774         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13775         (pkgdata_MODULES): Add `xfs.mod'.
13776         (xfs_mod_SOURCES): New variable.
13777         (xfs_mod_CFLAGS): Likewise.
13779         * util/grub-emu.c (main): Call `grub_xfs_init' and
13780         `grub_xfs_fini'.
13782         * include/grub/fs.h (grub_xfs_init): New prototype.
13783         (grub_xfs_fini): Likewise.
13786 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13788         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13789         color modes, allow greater than 16 colors to be configured as
13790         a default palette.
13792 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13794         * normal/completion.c (complete_arguments): Add the qualifier
13795         const into OPTIONS.
13797         From Omniflux <omniflux+lists@omniflux.com>:
13798         * include/grub/terminfo.h: New file.
13799         * include/grub/tparm.h: Likewise.
13800         * include/grub/i386/pc/serial.h: Likewise.
13801         * term/terminfo.c: Likewise.
13802         * term/tparm.c: Likewise.
13803         * term/i386/pc/serial.c: Likewise.
13804         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13805         serial.mod.
13806         (terminfo_mod_SOURCES): New variable.
13807         (terminfo_mod_CFLAGS): Likewise.
13808         (serial_mod_SOURCES): Likewise.
13809         (serial_mod_CFLAGS): Likewise.
13811 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13813         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13814         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13815         and kern/powerpc/ieee1275/cmain.c, respectively.
13817         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13818         * kern/powerpc/ieee1275/crt0.S: ... here.
13820         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13821         * kern/powerpc/ieee1275/cmain.c: ... here.
13823         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13824         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13825         instead of boot/powerpc/ieee1275/crt0.S and
13826         boot/powerpc/ieee1275/cmain.c, respectively.
13828         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13829         sectors. It was not used anyway.
13831 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13833         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13834         `unused parameter' warning.
13836 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13838         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13839         function.
13840         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13841         getcharwidth.
13843 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13845         * include/grub/normal.h (enum grub_completion_type): Added
13846         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13848         * normal/cmdline.c (print_completion): Handle
13849         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13850         * normal/menu_entry.c (store_completion): Likewise.
13852         * normal/completion.c (complete_arguments): New function.
13853         (grub_normal_do_completion): Call `complete_arguments' when the
13854         current words start with a dash.
13856 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13858         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13859         `gzio.mod' instead of `io.mod').
13861 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13863         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13864         (DISTDIRS): Added io and video.
13865         Rewrite the search routine to make an output consistently.
13867         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13868         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13869         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13870         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13871         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13872         util/powerpc/ieee1275/misc.c.
13874         * include/grub/gzio.h: New file.
13875         * io/gzio.c: Likewise.
13877         * kern/file.c (grub_file_close): Call grub_device_close only if
13878         FILE->DEVICE is not NULL.
13880         * include/grub/mm.h [!NULL] (NULL): New macro.
13882         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13884         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13885         (pkgdata_MODULES): Added gzio.mod.
13886         (gzio_mod_SOURCES): New variable.
13887         (gzio_mod_CFLAGS): Likewise.
13889         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13890         (pkgdata_MODULES): Added gzio.mod.
13891         (gzio_mod_SOURCES): New variable.
13892         (gzio_mod_CFLAGS): Likewise.
13894         * commands/cat.c: Include grub/gzio.h.
13895         (grub_cmd_cat): Use grub_gzfile_open instead of
13896         grub_file_open.
13898         * commands/cmp.c: Include grub/gzio.h.
13899         (grub_cmd_cmp): Use grub_gzfile_open instead of
13900         grub_file_open.
13902         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13903         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13904         grub_file_open.
13905         (grub_rescue_cmd_module): Likewise.
13907 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13909         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13910         kern/sparc64/ieee1275/init.c because it contains _start.
13911         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13913 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13915         * configure.ac: Add support for sparc64 host with ieee1275
13916         firmware.
13917         * configure: Generated from configure.ac.
13918         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13919         instead of int.
13920         (grub_ofdisk_read): Likewise.
13921         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13922         pointers as (void *) to remove a warning.
13923         (grub_ofdisk_close): Likewise.
13924         (grub_ofdisk_read): Likewise.
13925         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13926         returns, so make it return void to remove a warning.
13927         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13928         Corresponding prototype change.
13929         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13930         values, and cast the pointers as (void *) to remove a warning.
13931         (grub_mm_dump): Likewise.
13932         * conf/sparc64-ieee1275.mk: New file.
13933         * conf/sparc64-ieee1275.rmk: Likewise.
13934         * include/grub/sparc64/setjmp.h: Likewise.
13935         * include/grub/sparc64/types.h: Likewise.
13936         * include/grub/sparc64/ieee1275/console.h: Likewise.
13937         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13938         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13939         * include/grub/sparc64/ieee1275/time.h: Likewise.
13940         * kern/sparc64/cache.c: Likewise.
13941         * kern/sparc64/dl.c: Likewise.
13942         * kern/sparc64/ieee1275/init.c: Likewise.
13943         * kern/sparc64/ieee1275/openfw.c: Likewise.
13945 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13947         * util/console.c (grub_ncurses_putchar): If C is greater than
13948         0x7f, set C to a question mark.
13949         (grub_ncurses_getcharwidth): New function.
13950         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13951         getcharwidth.
13953         * normal/menu.c (print_entry): Made aware of Unicode. First,
13954         convert TITLE to UCS-4, and predict the cursor position by
13955         grub_getcharwidth.
13957         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13958         const to SRC.
13959         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13961 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13963         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13964         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13965         grub_strcat.
13967         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13968         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13969         grub_strcpy and grub_strlen. Take it into account that a space
13970         character is inserted as a delimiter.
13972 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13974         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13975         invalid magic in the error.
13977         * commands/search.c: New file.
13979         * util/grub-emu.c (main): Call grub_search_init and
13980         grub_search_fini.
13982         * kern/rescue.c (grub_rescue_print_disks): Removed.
13983         (grub_rescue_print_devices): New function.
13984         (grub_rescue_cmd_ls): Use grub_device_iterate with
13985         grub_rescue_print_devices instead of grub_disk_dev_iterate with
13986         grub_rescue_print_disks.
13988         * kern/partition.c (grub_partition_iterate): Return the result of
13989         PARTMAP->ITERATE instead of GRUB_ERRNO.
13991         * kern/device.c: Include grub/partition.h.
13992         (grub_device_iterate): New function.
13994         * include/grub/partition.h (grub_partition_iterate): Return int
13995         instead of grub_err_t.
13997         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13998         prototype.
13999         [GRUB_UTIL] (grub_search_fini): Likewise.
14001         * include/grub/device.h (grub_device_iterate): New prototype.
14003         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14004         commands/search.c.
14005         (pkgdata_MODULES): Added search.mod.
14006         (search_mod_SOURCES): New variable.
14007         (search_mod_CFLAGS): Likewise.
14009         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14010         (pkgdata_MODULES): Added search.mod.
14011         (search_mod_SOURCES): New variable.
14012         (search_mod_CFLAGS): Likewise.
14014         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14015         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14016         All callers changed.
14018         * DISTLIST: Added commands/search.c.
14020 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14022         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14023         conversion.
14024         (grub_getcharwidth): New function.
14026         * kern/misc.c (grub_utf8_to_ucs4): New function.
14028         * include/grub/term.h (struct grub_term): Added a new member
14029         "getcharwidth".
14030         (grub_getcharwidth): New prototype.
14032         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14034         * term/i386/pc/console.c (map_char): New function. Segregated from
14035         grub_console_putchar.
14036         (grub_console_putchar): Use map_char.
14037         (grub_console_getcharwidth): New function.
14038         (grub_console_term): Specified grub_console_getcharwidth as
14039         getcharwidth.
14041         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14042         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14044         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14045         GRUB_ERRNO.
14046         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14047         on grub_strtoul completely.
14048         (write_char): Declare local variables in the beginning of the
14049         function.
14050         (grub_vesafb_getcharwidth): New function.
14051         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14052         getcharwidth.
14054 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14056         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14057         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14058         commands/i386/pc/vbetest.c.
14060         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14061         call grub_vbe_get_controller_info again, because the returned
14062         information is volatile.
14063         (grub_vbe_set_video_mode): Mostly rewritten.
14064         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14065         grub_vbe_status_t correctly.
14066         (grub_vbe_get_video_mode_info): Likewise.
14067         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14068         several if statements.
14070         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14071         * commands/i386/pc/vbeinfo.c: ... this.
14073         * commands/i386/pc/vbe_test.c: Renamed to ...
14074         * commands/i386/pc/vbetest.c: ... this.
14076         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14077         ...
14078         (grub_cmd_vbeinfo): ... this. Save video modes before
14079         iterating. Skip a video mode, if it is not available, not enough
14080         information is given or it is monochrome. Show the memory
14081         model. Leave the interpretation of MODEVAR to grub_strtoul
14082         completely.
14083         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14084         (GRUB_MOD_FINI): Likewise.
14086         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14087         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14088         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14089         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14090         grub_strtoul completely.
14091         (real2pm): Removed.
14092         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14093         (GRUB_MOD_FINI): Likewise.
14095         * normal/misc.c: Include grub/mm.h.
14097         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14098         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14099         (vbe_list_modes_mod_SOURCES): Removed.
14100         (vbe_list_modes_mod_CFLAGS): Likewise.
14101         (vbe_test_mod_SOURCES): Likewise.
14102         (vbe_test_mod_CFLAGS): Likewise.
14103         (vbeinfo_mod_SOURCES): New variable.
14104         (vbeinfo_mod_CFLAGS): Likewise.
14105         (vbetest_mod_SOURCES): Likewise.
14106         (vbetest_mod_CFLAGS): Likewise.
14108 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14110         * normal/misc.c: New file.
14112         * DISTLIST: Added normal/misc.c.
14114         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14115         DISK to HOOK. Call HOOK with DISK.
14116         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14117         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14118         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14120         * normal/menu_entry.c (struct screen): Added a new member
14121         "completion_shown".
14122         (completion_buffer): New global variable.
14123         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14124         (store_completion): New function.
14125         (complete): Likewise.
14126         (clear_completions): Likewise.
14127         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14128         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14129         a tab, call complete.
14131         * normal/completion.c (disk_dev): Removed.
14132         (print_simple_completion): Likewise.
14133         (print_partition_completion): Likewise.
14134         (print_func): New global variable.
14135         (add_completion): Do not take the arguments WHAT or PRINT any
14136         longer. Added a new argument TYPE. Instead of printing directly,
14137         call PRINT_FUNC if not NULL.
14138         All callers changed.
14139         (complete_device): Use a local variable DEV instead of
14140         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14141         (grub_normal_do_completion): Take a new argument HOOK. Do not
14142         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14143         empty string, return NULL instead.
14144         All callers changed.
14146         * normal/cmdline.c (print_completion): New function.
14148         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14149         to HOOK.
14150         All callers changed.
14152         * kern/disk.c (grub_print_partinfo): Removed.
14154         * include/grub/partition.h (struct grub_partition_map): Add a new
14155         argument DISK into HOOK of ITERATE.
14156         (grub_partition_iterate): Add a new argument DISK to HOOK.
14158         * include/grub/normal.h (enum grub_completion_type): New enum.
14159         (grub_completion_type_t): New type.
14160         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14161         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14162         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14163         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14164         (grub_normal_do_completion): Added a new argument HOOK.
14165         (grub_normal_print_device_info): New prototype.
14167         * include/grub/disk.h (grub_print_partinfo): Removed.
14169         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14170         (normal_mod_SOURCES): Likewise.
14171         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14172         (normal_mod_SOURCES): Likewise.
14174         * commands/ls.c (grub_ls_list_disks): Use
14175         grub_normal_print_device_info instead of grub_print_partinfo. Free
14176         PNAME.
14177         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14178         duplicating the code.
14180 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14182         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14183         follow GCS more precisely.
14184         * commands/i386/pc/vbe_test.c: Likewise.
14185         * include/grub/i386/pc/vbe.h: Likewise.
14186         * term/i386/pc/vesafb.c: Likewise.
14187         * video/i386/pc/vbe.c: Likewise.
14189 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14191         * DISTLIST: Added term/i386/pc/vesafb.c
14192         DISTLIST: Added video/i386/pc/vbe.c
14193         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14194         DISTLIST: Added commands/i386/pc/vbe_test.c.
14195         * commands/i386/pc/vbe_list_modes.c: New file.
14196         * commands/i386/pc/vbe_test.c: Likewise.
14197         * term/i386/pc/vesafb.c: Likewise.
14198         * video/i386/pc/vbe.c: Likewise.
14199         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14200         (grub_vbe_probe) Added prototype.
14201         (grub_vbe_set_video_mode) Likewise.
14202         (grub_vbe_get_video_mode) Likewise.
14203         (grub_vbe_get_video_mode_info) Likewise.
14204         (grub_vbe_set_pixel_rgb) Likewise.
14205         (grub_vbe_set_pixel_index) Likewise.
14206         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14207         (pkgdata_MODULES): Added vesafb.mod.
14208         (pkgdata_MODULES): Added vbe_list_modes.mod.
14209         (pkgdata_MODULES): Added vbe_test.mod.
14210         (vbe_mod_SOURCES): Added.
14211         (vbe_mod_CFLAGS): Likewise.
14212         (vesafb_mod_SOURCES): Likewise.
14213         (vesafb_mod_CFLAGS): Likewise.
14214         (vbe_list_modes_mod_SOURCES): Likewise.
14215         (vbe_list_modes_mod_CFLAGS): Likewise.
14216         (vbe_test_mod_SOURCES): Likewise.
14217         (vbe_test_mod_CFLAGS): Likewise.
14219 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14221         * normal/command.c (grub_command_execute): If INTERACTIVE is
14222         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14223         CMDLINE. Disable the pager if INTERACTIVE is true.
14224         All callers are changed.
14226         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14227         before reading a config file.
14228         * normal/main.c (read_config_file): Even if a command is not
14229         found, register it if it is within an entry.
14231         * util/grub-emu.c: Include sys/types.h and unistd.h.
14232         (options): Added --hold.
14233         (struct arguments): Added a new member "hold".
14234         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14235         missing.
14236         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14237         cleared by a debugger, if it is not zero.
14239         * include/grub/normal.h (grub_command_execute): Add an argument
14240         INTERACTIVE.
14242 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14244         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14246 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14248         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14249         program with another one, because the old one didn't detect a bug
14250         in gcc-3.4. Always use regparm 2, because the new test is still
14251         not enough for gcc-4.0. Someone must investigate a simple test
14252         case which detects a bug in gcc-4.0.
14254 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14256         * DISTLIST: Added normal/completion.c.
14258         * normal/completion.c: New file.
14260         * term/i386/pc/console.c (grub_console_getwh): New function.
14261         (grub_console_term): Assign grub_console_getwh to getwh.
14263         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14264         function is defined in normal/completion.c as
14265         grub_normal_do_completion.
14266         (grub_cmdline_get): Use grub_normal_do_completion instead of
14267         grub_tab_complete.
14269         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14270         returns non-zero, otherwise return 0.
14271         (grub_partition_iterate): First, probe the partition map. Then,
14272         call ITERATE only for this partition map.
14274         * kern/misc.c (grub_strncmp): Rewritten.
14276         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14277         returns non-zero. Otherwise return 0.
14279         * include/grub/partition.h (grub_partition_map_iterate): Return
14280         int instead of void.
14282         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14284         * include/grub/misc.h (grub_strncmp): Change the type of N to
14285         grub_size_t.
14287         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14288         of void.
14290         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14291         unsigned explicitly before comparing it with I.
14293         * kern/main.c (grub_env_write_root): Add the attribute unused into
14294         VAR.
14296         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14297         normal/completion.c.
14298         (normal_mod_SOURCES): Likewise.
14299         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14300         (normal_mod_SOURCES): Likewise.
14302         * normal/command.c (grub_iterate_commands): If ITERATE returns
14303         non-zero, return one immediately.
14305 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14307         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14308         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14309         descriptions.
14310         (grub_vbe_get_controller_info): New function.
14311         (grub_vbe_get_mode_info): Likewise.
14312         (grub_vbe_set_mode): Likewise.
14313         (grub_vbe_get_mode): Likewise.
14314         (grub_vbe_set_memory_window): Likewise.
14315         (grub_vbe_get_memory_window): Likewise.
14316         (grub_vbe_set_scanline_length): Likewise.
14317         (grub_vbe_get_scanline_length): Likewise.
14318         (grub_vbe_set_display_start): Likewise.
14319         (grub_vbe_get_display_start): Likewise.
14320         (grub_vbe_set_palette_data): Likewise.
14321         * include/grub/i386/pc/vbe.h: New file.
14323 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14325         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14326         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14327         * DISTLIST: Likewise.
14328         * kern/ieee1275/of.c: Moved to ...
14329         * kern/ieee1275/ieee1275.c: ... here.
14331 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14333         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14334         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14335         Pass 0 as `end' parameter to grub_strtoul().
14337 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14339         * include/grub/powerpc/ieee1275/console.h: Do not include
14340         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14341         ifdef.
14342         (grub_console_cur_color): Remove i386-specific prototype.
14343         (grub_console_real_putchar): Likewise.
14344         (grub_console_checkkey): Likewise.
14345         (grub_console_getkey): Likewise.
14346         (grub_console_getxy): Likewise.
14347         (grub_console_gotoxy): Likewise.
14348         (grub_console_cls): Likewise.
14349         (grub_console_setcursor): Likewise.
14350         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14351         Include <grub/machine/console.h>.
14352         * term/ieee1275/ofconsole.c: Likewise.
14354 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14356         * Makefile.in (LIBLZO): New variable.
14358         * configure.ac: Check for LZO version 2.
14360         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14361         lzo/lzo1x.h instead of lzo1x.h.
14363         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14364         of -llzo.
14366         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14367         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14369         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14370         copying the data from PARTITION to P.
14372 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14374         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14375         negative, unload the module.
14377         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14378         map is "pc_partition_map" but not "pc".
14379         (usage): Fix the description. The options are --boot-image and
14380         --core-image but not --boot-file or --core-file.
14381         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14382         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14383         DEFAULT_DIRECTORY.
14385         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14386         --core-file. Specify INSTALL_DEVICE as an argument.
14388         * util/console.c: Include config.h.
14389         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14390         [HAVE_NCURSES_H]: Include ncurses.h.
14391         [HAVE_CURSES_H]: Include curses.h.
14392         [!A_NORMAL] (A_NORMAL): Defined as zero.
14393         [!A_STANDOUT] (A_STANDOUT): Likewise.
14395         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14396         -lncurses.
14397         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14399         * configure.ac: Check for curses libraries and headers.
14401         * Makefile.in (LIBCURSES): New variable.
14403         * genmk.rb (Script::rule): Set the executable bits.
14405         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14406         name of the PC partition map is "pc_partition_map" but not "pc".
14408 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14410         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14411         (modules): Likewise.
14412         (usage): Added descriptions for --modules and --grub-probefs.
14413         Handle --modules and --grub-probefs. Save the arguments in MODULES
14414         and GRUB_PROBEFS, respectively.
14415         Auto-detect a filesystem module against GRUBDIR. If the result is
14416         empty and modules are not specified explicitly, abort the
14417         installation. Add the result to MODULES.
14419         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14420         disk/powerpc/ieee1275/ofdisk.c,
14421         include/grub/powerpc/ieee1275/init.h and
14422         term/powerpc/ieee1275/ofconsole.c.
14423         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14424         term/ieee1275/ofconsole.c.
14426         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14428         * COPYING: Upgraded to the latest version. Only the address of the
14429         FSF office has changed.
14431 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14433         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14434         kern/ieee1275.c with kern/ieee1275/of.c.
14436         * kern/ieee1275.c: Moved to ...
14437         * kern/ieee1275/of.c: ... here.
14439 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14441         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14442         readability.
14444         * config.guess: Updated to the latest version from gnulib.
14445         * config.sub: Likewise.
14446         * install.sh: Likewise.
14447         * mkinstalldirs: Likewise.
14449         * include/grub/console.h: Removed. This file is arch-specific. Do
14450         not put this in include/grub.
14452         * include/grub/i386/pc/console.h: Resurrected.
14454         * util/console.c: Include grub/machine/console.h instead of
14455         grub/console.h.
14456         * util/grub-emu.c: Likewise.
14458 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14460         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14461         hardcoded value.
14463         From Vincent Pelletier  <subdino2004@yahoo.fr>
14464         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14465         Redefined to use grub_getwh.
14466         (grub_term): New member named getwh.
14467         (grub_getwh): New prototype.
14468         * kern/term.c (grub_getwh): New function.
14469         * term/i386/pc/console.c (grub_console_getwh): New function.
14470         (grub_console_term): New member `getwh'.
14471         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14472         (grub_vga_term): New member `getwh'.
14473         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14474         grub_ssize_t.
14475         (grub_ofconsole_getw): New function.
14476         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14477         (grub_ofconsole_term): New field named getwh and new initial
14478         value.
14480 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14482         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14483         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14484         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14485         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14486         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14487         of <grub/machine/ieee1275.h>.
14488         * commands/ieee1275/reboot.c: Likewise.
14489         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14490         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14491         parameter structs to use new type `grub_ieee1275_cell_t'.
14492         * term/powerpc/ieee1275/ofconsole.c: Move ...
14493         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14494         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14495         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14496         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14497         to return int.
14498         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14499         Remove unused prototypes.  All users updated.
14500         * include/grub/powerpc/ieee1275/console.h: Removed.
14501         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14502         `grub_ieee1275_cell_t'.
14503         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14504         Cast comparisons with -1 to the correct type.
14505         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14506         type to match `grub_ieee1275_entry_fn'.
14508 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14510         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14512         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14513         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14514         partmap/sun.c.
14515         (grub_probefs_SOURCES): New variable.
14517         * util/i386/pc/grub-probefs.c: New file.
14519         * util/i386/pc/grub-setup.c (main): Call
14520         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14521         grub_hfs_init and grub_jfs_init to initialize the system. Call
14522         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14523         grub_pc_partition_map_fini to finish the system.
14525 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14527         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14528         function.
14529         (grub_multiboot_load_elf32): Likewise.
14530         (grub_multiboot_is_elf64): Likewise.
14531         (grub_multiboot_load_elf64): Likewise.
14532         (grub_multiboot_load_elf): Likewise.
14533         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14534         an ELF32 or ELF64 file.
14535         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14537         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14538         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14539         NULL before calling FS->LABEL.
14540         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14541         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14542         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14543         before calling FS->LABEL.
14545 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14547         * util/i386/pc/grub-install.in (datadir): New variable.
14548         (libdir): Removed.
14549         (pkgdatadir): New variable.
14550         (pkglibdir): Removed.
14552 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14554         * DISTLIST: Added util/i386/pc/grub-install.in.
14556         * util/i386/pc/grub-install.in: New file.
14558         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14559         (grub_install_SOURCES): Likewise.
14561         * genmk.rb: Added support for scripts.
14562         (Script): New class.
14563         (scripts): New variable.
14565         * Makefile.in (install-local): Install sbin_SCRIPTS by
14566         INSTALL_SCRIPT.
14567         (uninstall): Remove sbin_SCRIPTS.
14569         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14570         device, try to get a GRUB device by
14571         grub_util_biosdisk_get_grub_dev.
14572         Free DEST_DEV.
14574         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14575         description for --device-map.
14577 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14579         Change the semantics of variable hooks. They now return strings
14580         instead of error values.
14582         * util/i386/pc/grub-setup.c: Include grub/env.h.
14583         (setup): Use grub_device_set_root instead of grub_env_set.
14585         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14586         grub_env_get instead of grub_device_set_root and
14587         grub_device_get_root, respectively.
14589         * kern/main.c (grub_env_write_root): New function.
14590         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14591         grub_env_set instead of grub_device_set_root.
14593         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14594         many variables.
14595         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14596         rather than calling ENV->WRITE_HOOK afterwards.
14597         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14598         passing a pointer of a pointer.
14599         (grub_register_variable_hook): Change the types of "read_hook" and
14600         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14601         respectively.
14602         Allocate the default empty string on the heap, because this string
14603         may be freed later.
14605         * kern/device.c: Include grub/env.h.
14606         (grub_device_set_root): Removed.
14607         (grub_device_get_root): Likewise.
14608         (grub_device_open): Use grub_env_get instead of
14609         grub_device_get_root.
14611         * include/grub/env.h (grub_env_read_hook_t): New type.
14612         (grub_env_write_hook_t): Likewise.
14613         (grub_env_var): Change the types of "read_hook" and "write_hook"
14614         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14615         (grub_register_variable_hook): Likewise.
14617         * include/grub/device.h (grub_device_set_root): Removed.
14618         (grub_device_set_root): Likewise.
14620         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14621         make sure that DIRNAME terminates with '/', so that
14622         grub_fat_find_dir will fail if PATH is not a directory.
14624         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14625         from DIRNAME.
14626         Use the qualifier auto for print_files and print_files_long.
14627         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14628         as a regular file.
14629         Put a newline only if there is no error.
14630         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14631         used.
14633 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14635         * kern/partition.c (grub_partition_probe): Initialize PART to
14636         NULL. Otherwise, when no partition map is registered, this returns
14637         a garbage.
14639 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14641         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14642         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14643         valid.
14645 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14647         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14648         information on each device, if it does not have partitions. Print
14649         "Device" instead of "Disk", because this function is not specific
14650         to disk devices.
14652         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14653         static to ensure that it is put on the memory rather than a
14654         register.
14656 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14658         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14659         (grub_cat_init): Likewise.
14660         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14661         (options): Likewise.
14662         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14663         (grub_configfile_init): Likewise.
14664         * font/manager.c (GRUB_MOD_INIT): Likewise.
14665         * commands/help.c (GRUB_MOD_INIT): Likewise.
14666         (grub_help_init): Likewise.
14667         * normal/command.c (grub_command_init): Likewise.
14668         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14669         * disk/loopback.c (grub_loop_init): Likewise.
14670         (GRUB_MOD_INIT): Likewise.
14671         * commands/ls.c (grub_ls_init): Likewise.
14672         (GRUB_MOD_INIT): Likewise.
14673         (options): Likewise.
14674         * commands/boot.c (grub_boot_init): Likewise.
14675         (GRUB_MOD_INIT): Likewise.
14676         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14677         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14678         (GRUB_MOD_INIT): Likewise.
14679         * commands/cmp.c (grub_cmp_init): Likewise.
14680         (GRUB_MOD_INIT): Likewise.
14682         * normal/arg.c: Use <> instead of "" to include header files.
14683         (SHORT_ARG_HELP): New macro.
14684         (SHORT_ARG_USAGE): Likewise.
14685         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14686         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14687         descriptions.
14688         (find_short): Check if C is 'h' or 'u' explicitly.
14689         (grub_arg_show_help): Use space characters instead of tabs. Treat
14690         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14691         are shown with --help and --usage only if they are not used for
14692         the command itself.
14693         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14694         'h' and 'u'.
14696         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14697         const into "longarg". Change the type of "shortarg" to int.
14699 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14701         * boot/i386/pc/boot.S (boot_drive_check): New label.
14703         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14704         macro.
14706         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14707         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14709 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14711         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14712         When turning off Gate A20, skip the check and return immediately,
14713         because this is not fatal usually.
14715 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14717         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14718         be 0x7C00 instead of 0x8000.
14720         * boot/i386/pc/pxeboot.S: Rewritten.
14722         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14723         EXT_C.
14724         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14725         result.
14727 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14729         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14730         robustness. This routine now supports a BIOS call and System
14731         Control Port A to modify the gate A20.
14733         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14734         Increased to 0x440.
14736 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14738         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14739         device path and resulting ihandle.
14740         (grub_ofdisk_close): dprintf the ihandle being closed.
14741         (grub_ofdisk_read): dprintf function parameters.
14742         * kern/mm.c (grub_mm_init_region): Likewise.
14743         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14744         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14745         size, and boot arguments.
14746         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14747         before loading into memory.
14748         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14749         before loading into memory.
14751 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14753         * kern/mm.c: Added much documentation.
14754         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14755         8, set to 5 instead of 8.
14757 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14759         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14761         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14762         (grub_mkdevicemap_SOURCES): New variable.
14764         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14765         lib/device.c of GRUB Legacy.
14767 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14769         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14770         instead of PATH is NULL.
14772 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14774         * commands/cmp.c (BUFFER_SIZE): New macro.
14775         (grub_cmd_cmp): Close the right file at the right time.  Compare
14776         only data just read.  Don't report files of different  size as
14777         identical.  Dynamically allocate buffers.  Move variable
14778         declarations at the beginning of function.
14780 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14782         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14783         reverse.
14785 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14787         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14788         when backspace is pressed at beginning of line.
14790 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14792         * DISTLIST: Added genfslist.sh.
14794         * normal/main.c (fs_module_list): New variable.
14795         (autoload_fs_module): New function.
14796         (read_fs_list): Likewise.
14797         (grub_normal_execute): Call read_fs_list.
14799         * kern/fs.c (grub_fs_autoload_hook): New variable.
14800         (grub_fs_probe): Added support for auto-loading.
14802         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14803         (grub_fs_module_list_t): New type.
14805         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14806         (grub_fs_autoload_hook): New prototype.
14808         * genfslist.sh: New file.
14810         * genmk.rb: Added a rule to generate a filesystem list.
14812 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14814         * configure.ac: Fix the test for cross-compiling.
14816         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14817         define GRUB_UTIL anymore.
14819         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14820         so this function works on other systems than just big endian.
14821         (load_modules): Likewise.
14822         (add_segments): Likewise.
14824 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14826         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14827         contains `l' modifier, get a long from va_arg().
14829 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14831         * kern/mm.c (grub_free): If the next free block which is being
14832         merged is the first free block, set the first block to the block
14833         being freed.
14834         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14836 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14838         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14839         `grub_ieee1275_chosen'.
14841 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14843         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14844         (grub_ieee1275_chosen): New variable.
14845         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14846         `chosen'.
14847         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14848         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14849         Rename first argument to `phandle' for consistency.
14850         (grub_ieee1275_get_property_length): Likewise.
14851         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14852         to grub_ieee1275_phandle_t.
14853         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14854         Move export next to declaration.
14855         (grub_ieee1275_chosen): New variable.
14856         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14857         Correct cosmetic typo.
14858         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14859         `grub_ieee1275_chosen'.
14860         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14861         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14862         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14863         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14864         `grub_ieee1275_chosen'.
14866 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14868         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14869         /chosen/bootargs.
14870         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14871         /chosen/bootargs as "variable=value" pairs.
14873 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14875         * include/grub/misc.h (grub_dprintf): New macro.
14876         (grub_real_dprintf): New prototype.
14877         (grub_strword): Likewise.
14878         (grub_iswordseparator): Likewise.
14879         * kern/misc.c (grub_real_dprintf): New function.
14880         (grub_strword): Likewise.
14881         (grub_iswordseparator): Likewise.
14883 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14885         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14886         (roundup): Remove macro.
14887         (grub_ieee1275_flags): Make static.
14888         (grub_ieee1275_realmode): Remove.
14889         (grub_ieee1275_test_flag): New function.
14890         (grub_ieee1275_set_flag): Likewise.
14891         (find_options): Rename to `grub_ieee1275_find_options'; update
14892         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14893         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14894         (cmain): New prototype.
14895         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14896         `grub_ieee1275_flags' directly.
14897         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14898         machine/biosdisk.h.
14899         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14900         Don't include grub/machine/init.h.
14901         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14902         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14903         Remove prototype.
14904         (grub_ieee1275_realmode): Likewise.
14905         (grub_ieee1275_flag): New enum.
14906         (grub_ieee1275_test_flag): New prototype.
14907         (grub_ieee1275_set_flag): New prototype.
14908         * include/grub/powerpc/ieee1275/init.h: Remove file.
14909         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14910         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14911         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14912         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14913         comment.
14914         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14915         `grub_ieee1275_test_flag'.
14916         (grub_ieee1275_encode_devname): Likewise.
14918 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14920         * include/grub/powerpc/ieee1275/ieee1275.h
14921         (grub_ieee1275_encode_devname): New prototype.
14922         (grub_ieee1275_get_filename): Likewise.
14923         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14924         function.
14925         (grub_set_prefix): Likewise.
14926         (grub_machine_init): Call grub_set_prefix.
14927         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14928         (grub_parse_type): New enum.
14929         (grub_ieee1275_get_devargs): New function.
14930         (grub_ieee1275_get_devname): Likewise.
14931         (grub_ieee1275_parse_args): Likewise.
14932         (grub_ieee1275_get_filename): Likewise.
14933         (grub_ieee1275_encode_devname): Likewise.
14935 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14937         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14938         `grub_loader_unset'.
14940 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14942         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14943         instead of grub_ieee1275_interpret.
14944         (grub_halt_init): New function.
14945         (grub_halt_fini): Likewise.
14946         (GRUB_MOD_INIT): Correct message grammar.
14947         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14948         instead of grub_ieee1275_interpret.
14949         (grub_reboot_init): New function.
14950         (grub_reboot_fini): Likewise.
14951         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14952         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14953         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14954         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14955         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14956         function.
14957         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14958         Add prototype.
14959         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14960         prototype.
14961         (grub_halt): Likewise.
14962         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14963         (cmain): Remove __attribute__((unused)).
14964         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14965         (grub_heap_len): Likewise.
14966         (grub_machine_fini): New function.
14967         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14968         (grub_halt): Likewise.
14969         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14970         function.
14971         * util/powerpc/ieee1275/misc.c: New file.
14973 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14975         * DISTLIST: New file.
14976         * gendistlist.sh: Likewise.
14978         * Makefile.in (COMMON_DISTFILES): Removed.
14979         (BOOT_DISTFILES): Likewise.
14980         (CONF_DISTFILES): Likewise.
14981         (DISK_DISTFILES): Likewise.
14982         (FS_DISTFILES): Likewise.
14983         (INCLUDE_DISTFILES): Likewise.
14984         (KERN_DISTFILES): Likewise.
14985         (LOADER_DISTFILES): Likewise.
14986         (TERM_DISTFILES): Likewise.
14987         (UTIL_DISTFILES): Likewise.
14988         (DISTFILES): Likewise.
14989         (uninstall): Uninstall files in $(pkgdata_DATA).
14990         (DISTLIST): New target.
14991         (distdir): Use the contents of the file DISTLIST to get a list of
14992         distributed files.
14994 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
14996         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14997         descriptor. This is ported from GRUB Legacy.
14999         * gencmdlist.sh: Added an extra semicolon to make it work with
15000         old sed versions. Reported by Robert Bihlmeyer
15001         <robbe@orcus.priv.at>.
15003 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15005         Automatic loading of commands is supported.
15007         * normal/main.c (read_command_list): New function.
15008         (grub_normal_execute): Call read_command_list.
15010         * normal/command.c (grub_register_command): Return zero or CMD.
15011         Allocate CMD->NAME from the heap.
15012         Initialize CMD->MODULE_NAME to zero.
15013         Find the same name as well. If the same command is found and it is
15014         a dummy command, overwrite members. If it is not a dummy command,
15015         return zero.
15016         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15017         (grub_command_find): If a dummy command is found, load a module
15018         and retry to find a command only once.
15020         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15021         make sure that each command is loaded.
15023         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15024         macro.
15025         (struct grub_command): Remove const from the member `name'.
15026         Add a new member `module_name'.
15027         (grub_register_command): Return grub_command_t.
15029         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15030         sure that each command is loaded.
15032         * genmk.rb (PModule::rule): Specify a module name without the
15033         suffix ".mod" to gencmdlist.sh.
15035 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15037         * gencmdlist.sh: New file.
15039         * genmk.rb (PModule::rule): Generate a rule for a command list.
15040         Clean command.lst.
15041         Generate command.lst from $(COMMANDFILES).
15043         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15044         (DATA): Added $(pkgdata_DATA).
15045         (install-local): Install files in $(pkgdata_DATA).
15047 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15049         * term/i386/pc/vga.c (debug_command): Removed.
15050         (GRUB_MOD_INIT): Do not register the command "debug".
15052         From Hollis Blanchard:
15053         * commands/configfile.c: New file.
15054         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15055         commands/configfile.c.
15056         (pkgdata_MODULES): Added configfile.mod.
15057         (configfile_mod_SOURCES): New variable.
15058         (configfile_mod_CFLAGS): Likewise.
15059         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15060         commands/configfile.c.
15061         (pkgdata_MODULES): Added configfile.mod.
15062         (configfile_mod_SOURCES): New variable.
15063         (configfile_mod_CFLAGS): Likewise.
15064         * util/grub-emu.c (main): Call grub_configfile_init and
15065         grub_configfile_fini.
15066         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15067         prototype.
15068         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15070 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15072         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15073         address.
15075         * commands/help.c (grub_cmd_help): Do not print newlines after
15076         the last command in print_command_help.
15078 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15080         * commands/default.h: New file.
15081         * commands/timeout.h: Likewise.
15082         * normal/context.c: Likewise.
15084         * util/misc.c: Do not include sys/times.h.
15085         Include sys/time.h and grub/machine/time.h.
15086         (grub_get_rtc): Rewritten with gettimeofday.
15088         * util/grub-emu.c (main): Call grub_default_init and
15089         grub_timeout_init before grub_normal_init, and call
15090         grub_timeout_fini and grub_default_fini after grub_main.
15092         * util/console.c (grub_ncurses_checkkey): Return the read
15093         character or -1.
15095         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15096         timeouts.
15098         * normal/main.c (read_config_file): Push MENU. If this fails,
15099         print an error and wait for a user input.
15100         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15101         If a menu is empty or an error occurs, pop MENU.
15102         (grub_normal_execute): Pop and free MENU after grub_menu_run
15103         returns.
15105         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15107         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15108         include time.h.
15109         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15110         without GRUB_UTIL.
15111         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15112         time.h.
15113         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15114         without GRUB_UTIL.
15116         * include/grub/normal.h (struct grub_menu_list): New struct.
15117         (grub_menu_list_t): New type.
15118         (struct grub_context): New struct.
15119         (grub_context_t): New type.
15120         (grub_register_command): Got rid of EXPORT_FUNC.
15121         (grub_unregister_command): Likewise.
15122         (grub_context_get): New prototype.
15123         (grub_context_get_current_menu): Likewise.
15124         (grub_context_push_menu): Likewise.
15125         (grub_context_pop_menu): Likewise.
15126         [GRUB_UTIL] (grub_default_init): Likewise.
15127         [GRUB_UTIL] (grub_default_fini): Likewise.
15128         [GRUB_UTIL] (grub_timeout_init): Likewise.
15129         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15131         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15132         commands/timeout.c and normal/context.c.
15133         (pkgdata_MODULES): Added default.mod and timeout.mod.
15134         (normal_mod_SOURCES): Added normal/context.c.
15135         (default_mod_SOURCES): New variable.
15136         (default_mod_CFLAGS): Likewise.
15137         (timeout_mod_SOURCES): Likewise.
15138         (timeout_mod_CFLAGS): Likewise.
15139         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15140         conf/i386-pc.rmk.
15141         (pkgdata_MODULES): Added default.mod and timeout.mod.
15142         (normal_mod_SOURCES): Added normal/context.c.
15143         (default_mod_SOURCES): New variable.
15144         (default_mod_CFLAGS): Likewise.
15145         (timeout_mod_SOURCES): Likewise.
15146         (timeout_mod_CFLAGS): Likewise.
15148         * Makefile.in (all-local): Added $(MKFILES).
15150 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15152         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15153         (grub_emu_SOURCES): Likewise.
15154         (pkgdata_MODULES): Add `sun.mod'.
15155         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15156         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15157         `partmap/sun.c'.
15158         (pkgdata_MODULES): Add `sun.mod'.
15159         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15160         * include/grub/partition.h (grub_sun_partition_map_init): New
15161         prototype.
15162         (grub_sun_partition_map_fini): Likewise.
15163         * partmap/sun.c: New file.
15164         * util/grub-emu.c (main): Initialize and de-initialize the sun
15165         partitionmap support.
15167 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15169         This implements an Emacs-like menu entry editor.
15171         * normal/menu_entry.c: New file.
15173         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15174         characters to ASCII.
15175         (saved_char): New variable.
15176         (grub_ncurses_checkkey): Rewritten completely.
15177         (grub_ncurses_getkey): Likewise.
15178         (grub_ncurses_init): Call raw instead of cbreak.
15180         * normal/menu.c (print_entry): Do not put a space.
15181         (init_page): Renamed to ...
15182         (grub_menu_init_page): ... this. All callers changed.
15183         (edit_menu_entry): Removed.
15184         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15186         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15188         * kern/misc.c (grub_vprintf): Call grub_refresh.
15190         * normal/menu.c (DISP_LEFT): Renamed to ...
15191         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15192         * normal/menu.c (DISP_UP): Renamed to ...
15193         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15194         * normal/menu.c (DISP_RIGHT): Renamed to ...
15195         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15196         * normal/menu.c (DISP_DOWN): Renamed to ...
15197         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15198         * normal/menu.c (DISP_HLINE): Renamed to ...
15199         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15200         * normal/menu.c (DISP_VLINE): Renamed to ...
15201         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15202         * normal/menu.c (DISP_UL): Renamed to ...
15203         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15204         * normal/menu.c (DISP_UR): Renamed to ...
15205         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15206         * normal/menu.c (DISP_LL): Renamed to ...
15207         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15208         * normal/menu.c (DISP_LR): Renamed to ...
15209         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15210         * normal/menu.c (TERM_WIDTH): Renamed to ...
15211         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15212         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15213         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15214         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15215         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15216         * normal/menu.c (TERM_MARGIN): Renamed to ...
15217         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15218         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15219         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15220         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15221         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15222         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15223         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15224         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15225         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15226         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15227         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15228         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15229         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15230         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15231         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15232         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15233         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15234         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15235         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15236         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15237         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15238         All callers changed.
15240         * include/grub/normal.h: New prototype.
15242         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15243         normal/menu_entry.c.
15244         (normal_mod_SOURCES): Likewise.
15245         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15246         (normal_mod_SOURCES): Likewise.
15248 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15250         * include/grub/normal.h (grub_halt_init): New prototype.
15251         (grub_halt_fini): Likewise.
15252         (grub_reboot_init): Likewise.
15253         (grub_reboot_fini): Likewise.
15255         * util/grub-emu.c: Include signal.h.
15256         (main_env): New global variable.
15257         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15258         catch C-c.
15259         (grub_machine_fini): New function.
15260         (main): Call grub_halt_init and grub_reboot_init before
15261         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15262         Call setjmp with MAIN_ENV to go back afterwards.
15263         Call grub_machine_fini right before return.
15265         * include/grub/util/misc.h: Include setjmp.h.
15266         (main_env): New prototype.
15268         * include/grub/kernel.h (grub_machine_fini): New prototype.
15269         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15270         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15272         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15273         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15274         * term/i386/pc/console.c (grub_console_fini): Likewise.
15276         * util/i386/pc/misc.c: New file.
15278         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15279         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15280         commands/i386/pc/reboot.c.
15282 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15284         * include/grub/dl.h (grub_dl_check_header): New prototype.
15285         (grub_arch_dl_check_header): Change return type to grub_err_t,
15286         remove size parameter and export function.  Update all callers.
15287         * kern/dl.c (grub_dl_check_header): New function.
15288         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15289         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15290         are inside the core.
15291         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15292         independent ELF header checks.
15293         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15294         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15295         `grub_dl_check_header' instead of explicit checks.  Check for the
15296         ELF type.
15297         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15298         `grub_dl_check_header' instead of explicit checks.  Remove arch
15299         specific ELF header checks.
15301         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15302         argument SIZE.
15304 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15306         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15307         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15309 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15311         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15312         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15313         (part_map_iterate): Clear `grub_errno' and return 0 if
15314         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15315         * partmap/amiga.c (amiga_partition_map_iterate): Return
15316         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15317         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15319 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15321         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15322         help info.
15324 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15326         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15327         Removed prototype.
15328         (grub_rescue_cmd_linux): New prototype.
15329         (grub_rescue_cmd_initrd): Likewise.
15330         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15331         `bi_rec'.
15332         (grub_linux_release_mem): Release the memory for the initrd.
15333         (grub_load_linux): Renamed from this...
15334         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15335         Changed `entry' not to be static.  Loop over memory regions to
15336         find another one when the default fails.
15337         (grub_rescue_cmd_initrd): New function.
15338         (grub_linux_init): Remove function.
15339         (grub_linux_fini): Likewise.
15340         (GRUB_MOD_INIT): Register `initrd'.
15341         (GRUB_MOD_FINI): Unregister `initrd'.
15342         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15343         Function removed.
15344         (grub_linux_normal_fini): Likewise.
15345         (GRUB_MOD_INIT): Register `initrd'.
15346         (GRUB_MOD_FINI): Unregister `initrd'.
15348 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15350         * commands/help.c: New file.
15351         * normal/arg.c (show_help): Renamed to...
15352         (grub_arg_show_help): ... this.
15353         * commands/i386/pc/halt.c: New file.
15354         * commands/i386/pc/reboot.c: Likewise.
15355         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15356         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15357         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15358         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15359         variables.
15360         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15361         `commands/help.c'.
15362         (pkgdata_MODULES): Add `help.mod'.
15363         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15364         * grub/i386/pc/init.h (grub_reboot): New prototype.
15365         (grub_halt): Likewise.
15366         * include/grub/normal.h (grub_arg_show_help): New prototype.
15367         (grub_help_init): Likewise.
15368         (grub_help_fini): Likewise.
15369         * util/grub-emu.c (main): Initialize and deinitialize the help
15370         command.
15372         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15374         * normal/command.c (grub_command_init): Fixed the description of
15375         the `set' and `unset' commands.
15377 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15379         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15380         function.
15381         * commands/ieee1275/halt.c: New file.
15382         * commands/ieee1275/reboot.c: Likewise.
15383         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15384         `__attribute__ ((unused))'.  Some GCS related fixed.
15385         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15386         (grub_suspend_fini): Likewise.
15387         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15388         and `halt.mod'.
15389         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15390         (halt_mod_CFLAGS): New variables.
15391         * include/grub/powerpc/ieee1275/ieee1275.h
15392         (grub_ieee1275_interpret): New prototype.
15394 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15396         * include/grub/misc.h (memmove): New prototype.
15397         (memcpy): Likewise.
15399 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15401         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15402         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15404 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15406         * kern/misc.c (grub_strndup): Function rewritten.
15408 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15410         * normal/menu.c (TERM_WIDTH): Macro redefined.
15411         (TERM_TOP_BORDER_Y): Likewise.
15412         (draw_border): Replaced while-loop by a for-loop.  Make the number
15413         of lines consistent with the number of lines displayed in
15414         print_entries.  Added a margin below the rectangle.
15415         (print_entry): Make the entry fit in the rectangle.
15416         (print_entries): Display the scroll arrows next to the right
15417         border.
15419 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15421         * fs/minix.c (grub_minix_find_file): Reserve more space for
15422         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15423         `grub_strncpy' to copy `path' into it.
15425 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15427         Add the loopback device, a device via which files can be accessed
15428         as devices.
15430         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15431         (pkgdata_MODULES): Add loopback.mod.
15432         (loopback_mod_SOURCES): New variable.
15433         (loopback_mod_CFLAGS): Likewise.
15434         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15435         `disk/loopback.c'.
15436         (pkgdata_MODULES): Add loopback.mod.
15437         (loopback_mod_SOURCES): New variable.
15438         (loopback_mod_CFLAGS): Likewise.
15439         * disk/loopback.c: new file.
15440         * include/grub/normal.h (grub_loop_init): New prototype.
15441         (grub_loop_fini): New prototype.
15442         * util/grub-emu.c (main): Initialize and de-initialize loopback
15443         support.
15444         * include/grub/disk.h (grub_disk_dev_id): Add
15445         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15447 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15449         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15450         function.
15451         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15452         (suspend_mod_SOURCES): New variable.
15453         (suspend_mod_CFLAGS): Likewise.
15454         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15455         New prototype.
15456         * commands/ieee1275/suspend.c: New file.
15458 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15460         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15461         ((unused))' to `__attribute__ ((used))'.
15462         (GRUB_MOD_FINI): Likewise.
15463         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15464         * genmk.rb (PModule): Assign space to common symbols when linking
15465         modules.
15467 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15469         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15470         `unsigned' arguments to `grub_size_t'.
15471         (grub_malloc): Likewise.
15472         (grub_realloc): Likewise.
15473         (grub_memalign): Likewise.
15474         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15475         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15476         * util/misc.c (grub_malloc): Likewise.
15477         (grub_realloc): Likewise.
15478         * kern/mm.c (get_header_from_pointer): Change the casts to
15479         `unsigned' into a cast to `grub_size_t'.
15481         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15482         point to `currnode' when `currnode' is changed.
15484         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15485         Schottelius <nico-linux@schottelius.org>.
15487 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15489         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15490         (note_path): Remove variable.
15491         (GRUB_IEEE1275_NOTE_NAME): New macro.
15492         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15493         (grub_ieee1275_note_hdr): New structure.
15494         (grub_ieee1275_note_desc): Likewise.
15495         (grub_ieee1275_note): Likewise.
15496         (load_note): Remove `dir' argument.  All callers updated.  Remove
15497         `note_img' and `path'.  Do not load a file from `note_path'.
15498         Initialize a struct grub_ieee1275_note and write that to `out'.
15499         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15501 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15503         * util/misc.c (grub_util_read_image): Revert last change.  It
15504         called `grub_util_read_at', which seeks from the beginning of the
15505         file.
15507 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15509         * TODO: Add note about endianness in grub-mkimage.
15510         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15511         section.
15512         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15513         (grub_mkimage_SOURCES): New target.
15514         * include/grub/kernel.h (grub_start_addr): Remove variable.
15515         (grub_end_addr): Likewise.
15516         (grub_total_module_size): Likewise.
15517         (grub_kernel_image_size): Likewise.
15518         (GRUB_MODULE_MAGIC): New constant.
15519         (grub_module_info): New structure.
15520         (grub_arch_modules_addr): New prototype.
15521         (grub_get_end_addr): Remove prototype.
15522         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15523         * include/grub/powerpc/ieee1275/kernel.h: New file.
15524         * include/grub/util/misc.h (grub_util_get_fp_size): New
15525         prototype.
15526         (grub_util_read_at): Likewise.
15527         (grub_util_write_image_at): Likewise.
15528         * kern/main.c (grub_get_end_addr): Remove function.
15529         (grub_load_modules): Call grub_arch_modules_addr instead of using
15530         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15531         the grub_module_info fields instead of calling grub_get_end_addr
15532         as loop conditions.  Move grub_add_unused_region code here.
15533         (grub_add_unused_region): Remove function.
15534         * kern/i386/pc/init.c: Include grub/cache.h.
15535         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15536         one call to add_mem_region.
15537         (grub_arch_modules_addr): New function.
15538         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15539         (grub_total_module_size): Likewise.
15540         Include grub/machine/kernel.h.
15541         (grub_arch_modules_addr): New function.
15542         * util/grub-emu.c (grub_end_addr): Remove variable.
15543         (grub_total_module_size): Likewise.
15544         (grub_arch_modules_addr): New function.
15545         * util/misc.c: Include unistd.h.
15546         (grub_util_get_fp_size): New function.
15547         (grub_util_read_at): Likewise.
15548         (grub_util_write_image_at): Likewise.
15549         (grub_util_read_image): Call grub_util_read_at.
15550         (grub_util_write_image): Call grub_util_write_image_at.
15551         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15552         additional memory in kernel_img for a struct grub_module_info.
15553         Fill in that grub_module_info.
15554         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15556 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15558         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15559         New function.
15560         * include/grub/powerpc/ieee1275/ieee1275.h
15561         (grub_ieee1275_milliseconds): New prototype.
15562         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15563         Change to 1000.
15564         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15565         grub_ieee1275_milliseconds.
15567 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15569         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15570         variable.
15571         (find_options): New function.
15572         (cmain): Call find_options.
15573         * include/grub/powerpc/ieee1275/ieee1275.h
15574         (grub_ieee1275_realmode): New extern variable.
15575         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15576         grub_map if grub_ieee1275_realmode is false.
15578 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15580         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15581         lines are inserted and make it work like readline.  Reported by
15582         Vincent Pelletier <subdino2004@yahoo.fr>.
15584 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15586         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15588         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15589         `kern/powerpc/cache.S'.
15591 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15593         * genmk.rb: Handle the `Program' class in the main loop.  Written
15594         by Johan Rydberg <jrydberg@gnu.org>.
15595         (Program): New class.
15596         (programs): New variable.
15597         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15598         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15599         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15600         (help_arch): Function removed.
15601         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15602         `powerpc/libgcc.h' and `loader.h'.
15603         (pkgdata_PROGRAMS): New variable.
15604         (sbin_UTILITIES): Variable removed.
15605         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15606         (grubof_SOURCES): Variable re-defined so it only includes the
15607         core functionality.
15608         (grubof_CFLAGS): Remove `-DGRUBOF'.
15609         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15610         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15611         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15612         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15613         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15614         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15615         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15616         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15617         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15618         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15619         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15620         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15621         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15622         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15623         (pc_mod_CFLAGS): New variables.
15624         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15625         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15626         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15627         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15628         Moved from here...
15629         * include/grub/i386/pc/init.h (grub_os_area_addr)
15630         (rub_os_area_size): ... to here.
15631         * include/grub/powerpc/ieee1275/ieee1275.h
15632         (grub_ieee1275_entry_fn): Export symbol.
15633         * include/grub/powerpc/ieee1275/init.h: New file.
15634         * include/grub/powerpc/libgcc.h: Likewise.
15635         * include/grub/cache.h: Likewise.
15636         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15637         <hollis@penguinppc.org>.
15638         * kern/dl.c: Include <grub/cache.h>.
15639         (grub_dl_flush_cache): New function.
15640         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15641         for this module.
15642         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15643         (grub_console_init): Removed prototypes.
15644         (grub_machine_init): Don't initialize the modules anymore.
15645         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15646         static.
15647         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15648         Macro undef removed.
15649         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15650         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15651         relocation `R_PPC_REL32'.  Return an error when the relocation is
15652         unknown.
15653         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15654         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15655         * util/misc.c (grub_arch_sync_caches): Likewise.
15657 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15659         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15660         `symlist.c', add `grubof_symlist.c'.
15661         (symlist.c): Variable removed.
15662         (grubof_HEADERS): Variable added.
15663         (grubof_symlist.c): New target.
15664         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15665         `kernel_img_HEADERS'.
15666         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15667         * kern/powerpc/dl.c: New file.
15668         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15669         Function removed.
15670         (grub_arch_dl_relocate_symbols): Likewise.
15671         (grub_register_exported_symbols): Likewise.
15673 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15675         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15676         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15677         to fail instead.  Reported by Vincent Pelletier
15678         <subdino2004@yahoo.fr>.
15680         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15681         it is not allocated.  Reported by Vincent Pelletier
15682         <subdino2004@yahoo.fr>.
15684         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15685         output so the output looks better.
15687 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15689         Modulize the partition map support and add support for the amiga
15690         partition map.
15692         * commands/ls.c: Include <grub/partition.h> instead of
15693         <grub/machine/partition.h>.
15694         * kern/disk.c: Likewise.
15695         * kern/rescue.c: Likewise.
15696         * loader/i386/pc/chainloader.c: Likewise.
15697         * normal/cmdline.c: Likewise.
15698         * kern/powerpc/ieee1275/init.c: Likewise.
15699         (grub_machine_init): Call `grub_pc_partition_map_init',
15700         `grub_amiga_partition_map_init' and
15701         `grub_apple_partition_map_init'.
15702         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15703         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15704         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15705         `partition.h' and `pc_partition.h'.
15706         (grub_setup_SOURCES): Remove
15707         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15708         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15709         (grub_emu_SOURCES): Likewise.
15710         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15711         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15712         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15713         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15714         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15715         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15716         (grubof_SOURCES): Likewise.
15717         * disk/i386/pc/partition.c: File removed.
15718         * disk/powerpc/ieee1275/partition.c: Likewise.
15719         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15720         * include/grub/i386/pc/partition.h: Likewise.
15721         * kern/partition.c: New file.
15722         * partmap/amiga.c: Likewise.
15723         * partmap/apple.c: Likewise.
15724         * partmap/pc.c: Likewise.
15725         * include/grub/partition.h: Likewise..
15726         * include/grub/pc_partition.h: Likewise.
15727         * util/grub-emu.c: Include <grub/partition.h> instead of
15728         <grub/machine/partition.h>.
15729         (main): Call `grub_pc_partition_map_init',
15730         `grub_amiga_partition_map_init' and
15731         `grub_apple_partition_map_init' and deinitialize afterwards.
15732         * util/i386/pc/biosdisk.c: Include `#include
15733         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15734         `<grub/machine/partition.h>'.
15735         * util/i386/pc/grub-setup.c: Likewise.
15736         * util/i386/pc/biosdisk.c: Likewise.
15737         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15738         partition information in case of a PC partition.
15739         * util/i386/pc/grub-setup.c: Include `#include
15740         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15741         `<grub/machine/partition.h>'.
15742         (setup): Only access the PC specific partition information in case
15743         of a PC partition.
15745 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15747         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15748         (grub_longjmp): Likewise.
15749         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15750         20.
15751         * normal/powerpc/setjmp.S: New file.
15752         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15753         `normal/powerpc/setjmp.S'.
15754         (grubof_CFLAGS): Add `-DGRUBOF'.
15755         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15756         [GRUB_UTIL && !GRUBOF].
15758 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15760         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15761         property named `name'.  Correctly handle the error returned by
15762         `grub_ieee1275_finddevice' if a device can not be opened.
15764 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15766         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15767         `actual' for negativity.
15768         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15769         kern/fshelp.c.
15771 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15773         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15774         (PAGE_OFFSET): New macro.
15775         (CRTC_ADDR_PORT): Likewise.
15776         (CRTC_DATA_PORT): Likewise.
15777         (START_ADDR_HIGH_REGISTER): Likewise.
15778         (START_ADDR_LOW_REGISTER): Likewise.
15779         (GRAPHICS_ADDR_PORT): Likewise.
15780         (GRAPHICS_DATA_PORT): Likewise.
15781         (READ_MAP_REGISTER): Likewise.
15782         (INPUT_STATUS1_REGISTER): Likewise.
15783         (INPUT_STATUS1_VERTR_BIT): Likewise.
15784         (page): New variable.
15785         (wait_vretrace): New function.
15786         (set_read_map): Likewise.
15787         (set_start_address): Likewise.
15788         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15789         the right page.
15790         (check_vga_mem): Take the page into account.
15791         (write_char): Likewise.
15792         (write_cursor): Likewise.
15793         (scroll_up): Likewise.  Copy the page to the page that is not
15794         shown and switch between both pages.
15795         (grub_vga_putchar): Fix off by one error.
15796         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15797         account.
15799 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15801         Add support for iso9660 (including rockridge).
15803         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15804         (iso9660_mod_SOURCES): New variable.
15805         (iso9660_mod_CFLAGS): Likewise.
15806         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15807         * include/grub/fs.h (grub_iso9660_init): New prototype.
15808         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15809         * fs/iso9660.c: New file.
15811         * include/grub/misc.h (grub_strncat): New prototype.
15812         * kern/misc.c (grub_strncat): New function.
15814         * fs/hfs.c (grub_hfs_mount): Translate the error
15815         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15816         * fs/jfs.c (grub_jfs_mount): Likewise.
15817         * fs/ufs.c (grub_ufs_mount): Likewise.
15819 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15821         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15822         which initialized BAT registers.
15823         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15824         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15825         Move from here...
15826         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15827         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15828         ... to here.
15829         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15830         (grub_mapclaim): Likewise.
15831         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15832         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15833         hand.
15835 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15837         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15838         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15839         -ffreestanding and -msoft-float.
15841 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15843         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15844         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15845         set in grub_ieee1275_flags.
15847 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15849         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15850         prototype.
15851         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15852         grub_console_init first.
15853         Change the memory range used for grub_ieee1275_claim and
15854         grub_mm_init_region.
15855         Print an error message if the claim fails.
15856         Include <grub/misc.h>.
15858 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15860         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15861         Call grub_children_iterate for device nodes of type `scsi',
15862         `ide', or `ata'.
15863         (grub_ofdisk_open): Remove manual device alias resolution.
15864         Fix memory leak when device cannot be opened.
15865         * include/grub/powerpc/ieee1275/ieee1275.h
15866         (grub_children_iterate): New prototype.
15867         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15868         New function.
15869         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15870         Return -1 if args.size was -1.
15872 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15874         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15875         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15876         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15877         Open Firmware's memory for it; claim memory from _start to _end.
15878         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15879         (_end): New extern.
15880         (_start): Zero BSS from __bss_start to _end.
15881         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15882         New extern.
15883         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15885 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15887         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15888         -1 if args.base was -1.
15890 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15892         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15893         escape sequence instead of a literal ^L. Also call
15894         grub_ofconsole_gotoxy.
15896 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15898         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15899         void *  arguments to grub_addr_t.  All callers updated.  Also make
15900         the `result' argument optional.
15901         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15902         All callers updated.
15904 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15906         * commands/ls.c (grub_ls_list_files): Use the string following the
15907         initial ')', if present, as the filesystem path.
15908         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15910         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15912 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15914         Make the source code of the menu interface more readable.
15916         * normal/menu.c: Include grub/mm.h.
15917         (TERM_WIDTH): New macro.
15918         (TERM_HEIGHT): Likewise.
15919         (TERM_INFO_HEIGHT): Likewise.
15920         (TERM_MARGIN): Likewise.
15921         (TERM_SCROLL_WIDTH): Likewise.
15922         (TERM_TOP_BORDER_Y): Likewise.
15923         (TERM_LEFT_BORDER_X): Likewise.
15924         (TERM_BORDER_WIDTH): Likewise.
15925         (TERM_MESSAGE_HEIGHT): Likewise.
15926         (TERM_BORDER_HEIGHT): Likewise.
15927         (TERM_NUM_ENTRIES): Likewise.
15928         (TERM_FIRST_ENTRY_Y): Likewise.
15929         (TERM_ENTRY_WIDTH): Likewise.
15930         (TERM_CURSOR_X): Likewise.
15931         (draw_border): Use macros instead of magic numbers.
15932         (print_entry): Likewise.
15933         (print_entries): Likewise.
15934         (run_menu): Likewise. Also, handle the key 'e'.
15935         (run_menu_entry): Ignore empty command lines.
15936         (print_message): Added a new argument EDIT. If EDIT is true,
15937         print a different message.
15938         (init_page): Likewise.
15939         (edit_menu_entry): New function. Not implemented yet.
15941 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15943         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15944         can be loaded from normal mode.
15946         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15947         `multiboot.mod'.
15948         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15949         (multiboot_mod_CFLAGS): New variables.
15950         * loader/i386/pc/linux_normal.c: New file.
15951         * loader/i386/pc/multiboot_normal.c: Likewise.
15953         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15954         attribute `unused'.
15956         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15957         `fdiro' to read the mode information from instead of `diro'.
15959         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15960         looking up a symlink.
15962         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15963         macro.
15964         * normal/command.c (grub_command_execute): Don't parse the
15965         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15966         flags of the command.
15968         * normal/menu.c (grub_menu_run): Fix typo.
15970 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15972         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15974         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15975         `y + 1' instead of `y - 1'.
15977         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15979 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15981         From Hollis Blanchard <hollis@penguinppc.org>:
15982         * kern/misc.c (memmove): New alias for grub_memmove.
15983         (memcmp): New alias for grub_memcmp.
15984         (memset): New alias for grub_memset.
15985         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15986         Change "int handle" to "grub_ieee1275_phandle_t handle".
15987         * include/grub/powerpc/ieee1275/ieee1275.h
15988         (grub_ieee1275_get_property): Likewise.
15990 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
15992         Added normal mode command `chainloader' as module chain.mod, which
15993         depends on normal.mod and _chain.mod.
15995         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15996         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15997         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15998         Deleted prototype.
15999         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16000         but arguments parsing moved to ...
16001         (grub_chainloader_cmd): ... here.  New function.
16002         * include/grub/i386/pc/chainloader.h: New file.
16003         * loader/i386/pc/chainloader_normal.c: Likewise.
16005 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16007         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16008         (grub_mkimage_LDFLAGS): Likewise.
16009         (grub_emu_SOURCES): Likewise.
16010         (kernel_img_HEADERS): Added fshelp.h.
16011         * fs/ext2.c: Include <grub/fshelp.h>.
16012         (FILETYPE_REG): New macro.
16013         (FILETYPE_INO_REG): Likewise.
16014         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16015         Changed all users.
16016         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16017         all users.
16018         (grub_fshelp_node): New struct.
16019         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16020         to a pointer.
16021         (grub_ext2_get_file_block): Removed function.
16022         (grub_ext2_read_block): New function.
16023         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16024         This function was written.
16025         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16026         (grub_ext2_find_file): Removed function.
16027         (grub_ext2_read_symlink): New function.
16028         (grub_ext2_iterate_dir): Likewise.
16029         (grub_ext2_open): Rewritten.
16030         (grub_ext2_dir): Rewritten.
16031         * include/grub/fshelp.h: New file.
16032         * fs/fshelp.c: Likewise.
16034 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16036         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16037         (print_message): Add a missing newline.
16038         (run_menu): Added timeout support.
16039         (run_menu_entry): New local function.
16040         (grub_menu_run): Added support for booting.
16042         * kern/loader.c (grub_loader_is_loaded): New function.
16044         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16045         (grub_get_rtc): Exported.
16047         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16048         (grub_get_rtc): Exported.
16050         * include/grub/normal.h (struct grub_command_list): Remove
16051         constant from the member `command'.
16053         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16055         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16057         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16059 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16061         Add support for the JFS filesystem.
16063         * fs/jfs.c: New file.
16064         * include/grub/fs.h (grub_jfs_init): New prototype.
16065         (grub_jfs_fini): New prototype.
16066         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16067         (grub_emu_SOURCES): Likewise.
16068         (pkgdata_MODULES): Add jfs.mod.
16069         (jfs_mod_SOURCES): New variable.
16070         (jfs_mod_CFLAGS): Likewise.
16071         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16072         (grubof_SOURCES): Likewise.
16073         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16075         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16076         endian to the host endian.
16077         (grub_fat_utf16_to_utf8): Move function from there...
16078         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16079         the endianness of the source string anymore.
16080         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16082 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16084         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16085         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16086         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16087         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16089         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16090         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16091         for `node_found' and `it_dir'.
16092         (grub_hfs_dir): Add prototype for `dir_hook'.
16094         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16095         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16096         and `indir32' to silence a gcc warning.
16098         * include/grub/fs.h (grub_hfs_init): New prototype.
16099         (grub_hfs_fini): Likewise.
16102 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16104         Each disk device has its own id now. This is useful to make use
16105         of multiple disk devices.
16107         * include/grub/disk.h (grub_disk_dev_id): New enum.
16108         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16109         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16111         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16112         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16114         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16115         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16117         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16118         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16120         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16121         "id" which is used by the cache manager.
16123         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16124         of just "GRUB".
16126 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16128         * fs/hfs.c: New file.
16129         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16130         (grub_emu_SOURCES): Likewise.
16131         (pkgdata_MODULES): Add hfs.mod.
16132         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16133         (grubof_SOURCES): Likewise.
16134         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16136         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16137         * kern/misc.c (grub_strncasecmp): Add function.
16139 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16141         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16142         with parentheses.
16144         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16145         (grub_ext2_dir): In case the directory entry type is unknown, read
16146         it from the inode.
16148 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16150         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16151         grub_load_linux instead of grub_rescue_cmd_linux as second
16152         argument of grub_rescue_register_command.
16154         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16156 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16158         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16159         function.
16160         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16161         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16162         `loader/powerpc/ieee1275/linux.c',
16163         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16164         * include/grub/powerpc/ieee1275/ieee1275.h
16165         (grub_ieee1275_release): New prototype.
16166         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16167         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16168         normal, boot, linux and linux_normal.
16169         * loader/powerpc/ieee1275/linux.c: New file.
16170         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16172 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16174         * normal/arg.c (grub_arg_parse): Correct error handling after
16175         reallocating the argumentlist (check if `argl' is not null instead
16176         of checking if `args' is not null).
16177         * kern/mm.c (grub_realloc): Return the same pointer when using the
16178         same region, instead of returning the header address.
16180 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16182         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16183         one block instead of two when looking for the initial partition.
16184         (grub_partition_probe): Initialize the local variable `p' with 0.
16185         Use base 10 for the grub_strtoul call.
16186         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16187         need for one local variable.
16188         (grub_strtoul): Don't add the new value to `num', instead of that
16189         just assign it.
16191 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16193         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16194         (pxeboot_img_SOURCES): New variable.
16195         (pxeboot_img_ASFLAGS): Likewise.
16196         (pxeboot_img_LDFLAGS): Likewise.
16197         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16198         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16199         <lode_leroy@hotmail.com>.
16201 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16203         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16204         there was no input.
16206 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16208         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16209         the history buffer logic.
16211 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16213         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16214         (FILETYPE_INO_SYMLINK): New macros.
16215         (grub_ext2_find_file): Check if the node is a directory using the
16216         inode stat information instead of using the filetype in the
16217         dirent.  Exclude the first character of an absolute symlink.
16218         (grub_ext2_dir): Mask out the filetype part of the mode member of
16219         the inode.
16221 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16223         Add support for UFS version 1 and 2.  Add support for the minix
16224         filesystem version 1 and 2, both the variants with 14 and 30 long
16225         filenames.
16227         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16228         fs/minix.c.
16229         (grub_emu_SOURCES): Likewise.
16230         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16231         (ufs_mod_SOURCES): New variable.
16232         (ufs_mod_CFLAGS): Likewise.
16233         (minix_mod_SOURCES): Likewise.
16234         (minix_mod_CFLAGS): Likewise.
16235         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16236         fs/minix.c.
16237         (grubof_SOURCES): Likewise.
16238         * fs/ufs.c: New file.
16239         * fs/minix.c: New file.
16240         * include/grub/fs.h (grub_ufs_init): New prototype.
16241         (grub_ufs_fini): Likewise.
16242         (grub_minix_init): Likewise.
16243         (grub_minix_fini): Likewise.
16244         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16245         minix fs.
16247 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16249         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16250         commands/ls.c, commands/terminal.c, commands/boot.c,
16251         commands/cmp.c and commands/cat.c.
16252         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16254         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16255         "env.h"
16257 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16259         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16260         and grub_, respectively. Because the conversion is trivial and
16261         mechanical, I omit the details here. Please refer to the CVS
16262         if you need more information.
16264 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16266         * include/pupa: Renamed to ...
16267         * include/grub: ... this.
16268         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16269         * util/i386/pc/grub-mkimage.c: ... this.
16270         * util/i386/pc/pupa-setup.c: Renamed to ...
16271         * util/i386/pc/grub-setup.c: ... this.
16272         * util/pupa-emu.c: Renamed to ...
16273         * util/grub-emu.c: ... this.
16275 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16277         Add support for the newworld apple macintosh (PPC).  This has been
16278         tested on the powerbook 2000 only.  It only adds support for
16279         generic ieee1275 functions, console and disk support.  This should
16280         be easy to port to other architectures with support for Open
16281         Firmware.
16283         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16284         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16285         specific tests are only executed while building for the i386.
16286         Inverse test for crosscompile.
16287         * genmk.rb (Utility): Allow assembler files.
16288         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16289         * conf/powerpc-ieee1275.rmk: New file.
16290         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16291         * disk/powerpc/ieee1275/partition.c: Likewise.
16292         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16293         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16294         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16295         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16296         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16297         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16298         * include/pupa/powerpc/ieee1275/loader.h
16299         * include/pupa/powerpc/setjmp.h: Likewise.
16300         * include/pupa/powerpc/types.h: Likewise.
16301         * kern/powerpc/ieee1275/init.c: Likewise.
16302         * kern/powerpc/ieee1275/openfw.c: Likewise.
16303         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16305         These files were written by Johan Rydberg
16306         (jrydberg@night.trouble.net) and I only modified them slightly.
16308         * boot/powerpc/ieee1275/cmain.c: New file.
16309         * boot/powerpc/ieee1275/crt0.S: Likewise.
16310         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16311         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16313 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16315         * Makefile.in: Update copyright.
16316         * genmodsrc.sh: Likewise.
16317         * gensymlist.sh: Likewise.
16318         * term/i386/pc/vga.c: Indent correctly.
16320         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16321         bugreporting address.
16322         * util/i386/pc/pupa-setup.c (usage): Likewise,
16323         (main): Call pupa_ext2_init and pupa_ext2_fini.
16325         * fs/fat.c (log2): Renamed to ...
16326         (fat_log2): ... this.
16327         All callers changed.
16328         * kern/misc.c (memcpy): Alias to pupa_memmove.
16329         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16330         lvalue cast.
16331         * util/console.c (pupa_ncurses_fini): Return 0.
16333         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16334         Move fail label here.
16335         [__GNU__]: Don't warn when using stat.
16336         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16337         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16338         long int. Use strtol instead of strtoul.
16340 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16342         * commands/boot.c: New file.
16343         * commands/cat.c: Likewise.
16344         * commands/cmp.c: Likewise.
16345         * commands/ls.c: Likewise.
16346         * commands/terminal.c: Likewise.
16347         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16348         (pupa_register_command): Changed interface to match the new
16349         argument parser.
16350         (pupa_command_execute): Changed (almost rewritten) so it uses
16351         pupa_split_command.  Added support for setting variables using the
16352         syntax `foo=bar'.
16353         (rescue_command): Changed to work with the new argument parser.
16354         (terminal_command): Moved from here to commands/terminal.c.
16355         (set_command): New function.
16356         (unset_command): New function.
16357         (insmod_command): New function.
16358         (rmmod_command): New function.
16359         (lsmod_command): New function.
16360         (pupa_command_init): Don't initialize the command terminal
16361         anymore.  Initialize the commands set, unset, insmod, rmmod and
16362         lsmod.
16363         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16364         (kernel_img_HEADERS): Add arg.h and env.h.
16365         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16366         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16367         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16368         normal/arg.c.
16369         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16370         terminal.mod.
16371         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16372         (boot_mod_SOURCES): New variable.
16373         (terminal_mod_SOURCES): Likewise.
16374         (ls_mod_SOURCES): Likewise.
16375         (cmp_mod_SOURCES): Likewise.
16376         (cat_mod_SOURCES): Likewise.
16378         * normal/arg.c: New file.
16379         * kern/env.c: Likewise.
16380         * include/pupa/arg.h: Likewise.
16381         * include/pupa/env.h: Likewise.
16382         * font/manager.c (font_command): Changed to match argument parsing
16383         interface changes.
16384         (PUPA_MOD_INIT): Likewise.
16385         * hello/hello.c (pupa_cmd_hello): Likewise.
16386         (PUPA_MOD_INIT): Likewise.
16387         * include/pupa/disk.h: Include <pupa/device.h>.
16388         (pupa_print_partinfo): New prototype.
16389         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16390         (pupa_dl_get_prefix): Likewise.
16391         * include/pupa/misc.h: Include <pupa/err.h>.
16392         (pupa_isgraph): New prototype.
16393         (pupa_isdigit): Likewise.
16394         (pupa_split_cmdline): Likewise.
16395         * include/pupa/normal.h: Include <pupa/arg.h>.
16396         (pupa_command): Changed the prototype of the member `func' to
16397         match the argument parsing interface.  Added member `options'.
16398         (pupa_register_command): Updated to match function.
16399         (pupa_arg_parse): New prototype.
16400         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16401         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16402         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16403         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16404         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16405         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16406         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16407         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16408         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16409         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16410         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16411         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16412         * kern/disk.c: Include <pupa/file.h>.
16413         (pupa_print_partinfo): New function.
16414         * kern/dl.c: Include <pupa/env.h>.
16415         (pupa_dl_dir): Variable removed.
16416         (pupa_dl_load): Use the environment variable `prefix' instead of
16417         the variable pupa_dl_dir.
16418         (pupa_dl_set_prefix): Function removed.
16419         (pupa_dl_get_prefix): Likewise.
16420         * kern/i386/pc/init.c: Include <pupa/env.h>.
16421         (pupa_machine_init): Use the environment variable `prefix' instead of
16422         using pupa_dl_set_prefix to set the prefix.
16423         * kern/main.c: Include <pupa/env.h>.
16424         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16425         using pupa_dl_get_prefix to get the prefix.
16426         * kern/misc.c: Include <pupa/env.h>.
16427         (pupa_isdigit): New function.
16428         (pupa_isgraph): Likewise.
16429         (pupa_ftoa): Likewise.
16430         (pupa_vsprintf): Added support for printing values of the type
16431         `double'.  Make it possible to format variable output when using
16432         formatting like `%1.2%f'.
16433         (pupa_split_cmdline): New function.
16434         * kern/rescue.c: Include <pupa/env.h>.
16435         (next_word): Removed function.
16436         (pupa_rescue_cmd_prefix): Likewise.
16437         (pupa_rescue_cmd_set): New function.
16438         (pupa_rescue_cmd_unset): New function.
16439         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16440         split the command line instead of splitting it here.  Added
16441         support for setting variables using the syntax `foo=bar'.  Don't
16442         initialize the prefix command anymore.  Initialized the set and
16443         unset commands.
16444         * normal/cmdline.c: Include <pupa/env.h>.
16445         (pupa_tab_complete): Added prototypes for print_simple_completion,
16446         print_partition_completion, add_completion, iterate_commands,
16447         iterate_dev, iterate_part and iterate_dir. Moved code to print
16448         partition information from here to kern/disk.c.
16449         (pupa_cmdline_run): Don't check if the function exists anymore.
16450         * normal/main.c: Include <pupa/env.h>.
16451         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16452         instead of using pupa_dl_get_prefix to get the prefix.
16453         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16454         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16455         warning.
16456         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16457         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16458         ((unused))' to silence a gcc warning.
16459         (pupa_vga_setcolor): Likewise.
16460         (debug_command): Changed to match argument parsing
16461         interface changes.
16462         * util/pupa-emu.c: Include <pupa/env.h>.
16463         (options): Added 0's for unused fields to silence a gcc warning.
16464         (argp): Likewise.
16465         (main): Use the environment variable `prefix' instead of using
16466         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16467         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16468         and terminal.
16470         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16471         * util/misc.c: Include <malloc.h>.
16472         (pupa_malloc): Rewritten so errors are correctly reported.
16473         (pupa_realloc): Likewise.
16474         (pupa_memalign): Likewise.
16475         (pupa_mm_init_region): Declare unused variables with
16476         `__attribute__ ((unused))' to silence a gcc warning.
16477         * normal/i386/setjmp.S: Remove tab at the end of the file to
16478         silence a gcc warning.
16479         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16480         variables with `__attribute__ ((unused))' to silence a gcc
16481         warning.
16482         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16483         local variable i unsigned to silence a gcc warning.
16485         * kern/term.c: Include <pupa/misc.h>.
16486         (pupa_more_lines): New variable.
16487         (pupa_more): Likewise.
16488         (pupa_putcode): When the pager is active pause at the end of every
16489         screen.
16490         (pupa_set_more): New function.
16491         * include/pupa/term.h (pupa_set_more): New prototype.
16494 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16496         Now this project is GRUB 2 rather than PUPA. The location of
16497         the CVS repository was moved to GRUB's.
16499         * configure.ac: Use bug-grub as the reporting address.
16500         Use GRUB instead of PUPA.
16501         Change the version number to 1.90.
16503 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16505         * genkernsyms.sh: Updated copyright information.
16506         * genmk.rb: Likewise.
16507         * genmodsrc.sh: Likewise.
16508         * gensymlist.sh: Likewise.
16509         * boot/i386/pc/boot.S: Likewise.
16510         * boot/i386/pc/diskboot.S: Likewise.
16511         * disk/i386/pc/biosdisk.c: Likewise.
16512         * disk/i386/pc/partition.c: Likewise.
16513         * font/manager.c: Likewise.
16514         * fs/ext2.c: Likewise.
16515         * fs/fat.c: Likewise.
16516         * include/pupa/boot.h: Likewise.
16517         * include/pupa/device.h: Likewise.
16518         * include/pupa/disk.h: Likewise.
16519         * include/pupa/dl.h: Likewise.
16520         * include/pupa/elf.h: Likewise.
16521         * include/pupa/err.h: Likewise.
16522         * include/pupa/file.h: Likewise.
16523         * include/pupa/font.h: Likewise.
16524         * include/pupa/fs.h: Likewise.
16525         * include/pupa/kernel.h: Likewise.
16526         * include/pupa/loader.h: Likewise.
16527         * include/pupa/misc.h: Likewise.
16528         * include/pupa/mm.h: Likewise.
16529         * include/pupa/net.h: Likewise.
16530         * include/pupa/normal.h: Likewise.
16531         * include/pupa/rescue.h: Likewise.
16532         * include/pupa/setjmp.h: Likewise.
16533         * include/pupa/symbol.h: Likewise.
16534         * include/pupa/term.h: Likewise.
16535         * include/pupa/types.h: Likewise.
16536         * include/pupa/i386/setjmp.h: Likewise.
16537         * include/pupa/i386/types.h: Likewise.
16538         * include/pupa/i386/pc/biosdisk.h: Likewise.
16539         * include/pupa/i386/pc/boot.h: Likewise.
16540         * include/pupa/i386/pc/console.h: Likewise.
16541         * include/pupa/i386/pc/init.h: Likewise.
16542         * include/pupa/i386/pc/kernel.h: Likewise.
16543         * include/pupa/i386/pc/linux.h: Likewise.
16544         * include/pupa/i386/pc/loader.h: Likewise.
16545         * include/pupa/i386/pc/memory.h: Likewise.
16546         * include/pupa/i386/pc/multiboot.h: Likewise.
16547         * include/pupa/i386/pc/partition.h: Likewise.
16548         * include/pupa/i386/pc/time.h: Likewise.
16549         * include/pupa/i386/pc/vga.h: Likewise.
16550         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16551         * include/pupa/util/getroot.h: Likewise.
16552         * include/pupa/util/misc.h: Likewise.
16553         * include/pupa/util/resolve.h: Likewise.
16554         * kern/device.c: Likewise.
16555         * kern/disk.c: Likewise.
16556         * kern/dl.c: Likewise.
16557         * kern/err.c: Likewise.
16558         * kern/file.c: Likewise.
16559         * kern/fs.c: Likewise.
16560         * kern/loader.c: Likewise.
16561         * kern/main.c: Likewise.
16562         * kern/misc.c: Likewise.
16563         * kern/mm.c: Likewise.
16564         * kern/rescue.c: Likewise.
16565         * kern/term.c: Likewise.
16566         * kern/i386/dl.c: Likewise.
16567         * kern/i386/pc/init.c: Likewise.
16568         * kern/i386/pc/lzo1x.S: Likewise.
16569         * kern/i386/pc/startup.S: Likewise.
16570         * loader/i386/pc/chainloader.c: Likewise.
16571         * loader/i386/pc/linux.c: Likewise.
16572         * loader/i386/pc/multiboot.c: Likewise.
16573         * normal/cmdline.c: Likewise.
16574         * normal/command.c: Likewise.
16575         * normal/main.c: Likewise.
16576         * normal/menu.c: Likewise.
16577         * normal/i386/setjmp.S: Likewise.
16578         * term/i386/pc/console.c: Likewise.
16579         * term/i386/pc/vga.c: Likewise.
16580         * util/console.c: Likewise.
16581         * util/genmoddep.c: Likewise.
16582         * util/misc.c: Likewise.
16583         * util/pupa-emu.c: Likewise.
16584         * util/resolve.c: Likewise.
16585         * util/unifont2pff.rb: Likewise.
16586         * util/i386/pc/biosdisk.c: Likewise.
16587         * util/i386/pc/getroot.c: Likewise.
16588         * util/i386/pc/pupa-mkimage.c: Likewise.
16589         * util/i386/pc/pupa-setup.c: Likewise.
16591 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16593         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16594         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16595         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16596         reading and reset it after reading.
16597         (pupa_ext2_close): Return PUPA_ERR_NONE.
16599         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16600         Correct value.
16601         (struct linux_kernel_header): Add kernel_version and
16602         initrd_addr_max.
16603         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16604         pupa_file_read succeeds.
16605         (pupa_rescue_cmd_initrd): Implement.
16607 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16609         * fs/ext2.c (pupa_ext2_label): New function.
16610         (pupa_ext2_fs): Added label.
16611         * fs/fat.c (pupa_fat_label): New function.
16612         (pupa_fat_fs): Added label.
16613         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16615         * kern/misc.c (pupa_strndup): New function.
16616         * include/pupa/misc.h (pupa_strndup): New prototype.
16618         * include/pupa/normal.h: Include <pupa/err.h>.
16619         (pupa_set_history): New prototype.
16620         (pupa_iterate_commands): New prototype.
16621         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16622         <pupa/disk.h>, <pupa/file.h>.
16623         (hist_size): New variable.
16624         (hist_lines): Likewise.
16625         (hist_end): Likewise.
16626         (hist_used): Likewise.
16627         (pupa_set_history): New function.
16628         (pupa_history_get): Likewise.
16629         (pupa_history_add): Likewise.
16630         (pupa_history_replace): Likewise.
16631         (pupa_tab_complete): Likewise.
16632         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16633         completion shows partitionnames while completing partitions, this
16634         feature was suggested by Jeff Bailey.
16635         * normal/command.c (pupa_iterate_commands): New function.
16636         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16637         (pupa_normal_init): Initialize history buffer.
16638         (PUPA_MOD_INIT): Likewise.
16639         (pupa_normal_fini): Free the history buffer.
16640         (PUPA_MOD_FINI): Likewise.
16642         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16643         key.
16645         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16646         * configure.ac [i386]: Check for regparam bug.
16647         (NESTED_FUNC_ATTR) [! i386]: Defined.
16649 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16651         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16652         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16653         (pupa_emu_SOURCES): New variable.
16654         (pupa_emu_LDFLAGS): Likewise.
16655         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16656         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16657         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16658         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16659         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16660         (pupa_jmp_buf): New typedef.
16661         (pupa_setjmp) [PUPA_UTIL]: New macro.
16662         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16663         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16664         (pupa_refresh): New prototype.
16665         * include/pupa/util/getroot.h: New file.
16666         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16667         it.
16668         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16669         (pupa_rescue_cmd_cat): Likewise.
16670         (pupa_rescue_cmd_ls): Likewise.
16671         (pupa_rescue_cmd_testload): Likewise.
16672         (pupa_rescue_cmd_lsmod): Likewise.
16673         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16674         * normal/menu.c (run_menu): Likewise.
16675         * kern/term.c (pupa_cls): Likewise.
16676         (pupa_refresh): New function.
16677         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16678         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16679         * util/console.c: New file.
16681         * util/i386/pc/getroot.c: New file.
16682         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16683         (pupa_putchar): New function.
16684         (pupa_refresh): Likewise.
16685         (xgetcwd): Function moved to ...
16686         (strip_extra_slashes): Likewise.
16687         (get_prefix): Likewise.
16688         * util/i386/pc/getroot.c: ... here.
16689         (find_root_device): Function moved and renamed to...
16690         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16691         Changed all callers.
16692         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16693         and renamed to...
16694         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16695         Changed all callers.
16696         * util/misc.c (pupa_memalign): New function.
16697         (pupa_mm_init_region): Likewise.
16698         (pupa_register_exported_symbols): Likewise.
16699         (pupa_putchar): Function removed.
16700         * util/pupa-emu.c: New file.
16702 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16704         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16705         (_multiboot_mod_SOURCES): New variable.
16706         (_multiboot_mod_CFLAGS): Likewise.
16707         * loader/i386/pc/multiboot.c: New file.
16708         * include/pupa/i386/pc/multiboot.h: Likewise.
16709         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16710         (pupa_multiboot_real_boot): New function.
16711         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16712         (pupa_multiboot_real_boot): New prototype.
16713         (pupa_rescue_cmd_multiboot): Likewise
16714         (pupa_rescue_cmd_module): Likewise.
16716         * kern/loader.c (pupa_loader_set): Continue when
16717         pupa_loader_unload_func() fails.
16718         (pupa_loader_unset): New function.
16719         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16721         * kern/misc.c (pupa_stpcpy): New function.
16722         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16724 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16726         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16727         for available extensions.
16729         * include/pupa/i386/pc/time.h: New file.
16730         * kern/disk.c: Include <pupa/machine/time.h>.
16731         (PUPA_CACHE_TIMEOUT): New macro.
16732         (pupa_last_time): New variable.
16733         (pupa_disk_open): Flush the cache when there was a timeout.
16734         (pupa_disk_close): Reset the timer.
16735         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16736         pupa_currticks.
16737         * util/misc.c: Include <sys/times.h>
16738         (pupa_get_rtc): New function.
16740 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16742         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16743         as blocks.
16744         (pupa_ext2_get_file_block): Use blocks member.
16746         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16747         first block. Return -1 instead of pupa_errno on error.
16749 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16751         * README: In the pupa-mkimage example use _chain instead of chain
16752         and ext2 instead of fat.
16753         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16754         adding journal playback for ext2fs.
16755         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16756         (pkgdata_MODULES): Added ext2.mod.
16757         (ext2_mod_SOURCES): New variable.
16758         (ext2_mod_CFLAGS): Likewise.
16759         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16760         * include/pupa/misc.h (pupa_strncpy): New prototype.
16761         (pupa_strcat): Likewise.
16762         (pupa_strncmp): Likewise.
16763         * kern/misc.c (pupa_strcat): Enable function.
16764         (pupa_strncpy): New function.
16765         (pupa_strncmp): Likewise.
16766         * fs/ext2.c: New file.
16768         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16769         when the read failed before retrying.
16770         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16771         (_FILE_OFFSET_BITS): Likewise.
16772         * configure.ac: Added AC_SYS_LARGEFILE.
16774 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16776         * genmk.rb (PModule#rule): Make sure to get only symbol names
16777         from the output of nm.
16778         Reported by Robert Millan <zeratul2@wanadoo.es>.
16780 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16782         I forgot to check in these changes for a long time. This adds
16783         incomplete support for VGA console, and this is still very
16784         buggy. Also, a lot of consideration is required for I18N,
16785         UNICODE, and VGA font issues. Therefore, assume that this is
16786         such that "better than nothing".
16788         * font/manager.c: New file.
16789         * include/pupa/font.h: Likewise.
16790         * include/pupa/i386/pc/vga.h: Likewise.
16791         * term/i386/pc/vga.c: Likewise.
16792         * util/unifont2pff.rb: Likewise.
16794         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16795         (pkgdata_MODULES): Added vga.mod and font.mod.
16796         (vga_mod_SOURCES): New variables.
16797         (vga_mod_CFLAGS): Likewise.
16798         (font_mod_SOURCES): Likewise.
16799         (font_mod_CFLAGS): Likewise.
16801         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16803         * include/pupa/term.h: Include pupa/err.h.
16804         (struct pupa_term): Added init and fini.
16805         Changed the argument of putchar to pupa_uint32_t.
16807         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16808         (pupa_console_real_putchar): New prototype.
16809         (pupa_console_putchar): Removed.
16810         (pupa_console_checkkey): Exported.
16811         (pupa_console_getkey): Likewise.
16813         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16814         characters.
16816         * kern/term.c (pupa_term_set_current): Rewritten.
16817         (pupa_putchar): Likewise.
16818         (pupa_putcode): New function.
16820         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16821         (pupa_console_real_putchar): ... this.
16822         (pupa_vga_set_mode): New function.
16823         (pupa_vga_get_font): Likewise.
16825         * normal/command.c: Include pupa/term.h.
16826         (terminal_command): New function.
16827         (pupa_command_init): Register the command "terminal".
16829         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16830         (DISP_UP): Likewise.
16831         (DISP_RIGHT): Likewise.
16832         (DISP_DOWN): Likewise.
16833         (DISP_HLINE): Likewise.
16834         (DISP_VLINE): Likewise.
16835         (DISP_UL): Likewise.
16836         (DISP_UR): Likewise.
16837         (DISP_LL): Likewise.
16838         (DISP_LR): Likewise.
16840         * term/i386/pc/console.c (pupa_console_putchar): New function.
16842 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16844         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16845         FIX. Reverse the path_list.
16847         * include/pupa/normal.h: Export pupa_register_command and
16848         pupa_unregister_command.
16850         * hello/hello.c (pupa_cmd_hello): New module.
16851         * conf/i386-pc.rmk: Added hello.mod.
16853 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16855         * kern/i386/pc/lzo1x.S: New file.
16857         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16858         (compress_kernel): New variable.
16859         (generate_image): Heavily modified to support compressing a
16860         large part of the core image.
16862         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16863         leak.
16864         (pupa_util_load_image): New function.
16866         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16867         (pupa_compressed_size): New variable.
16868         (codestart): Enable Gate A20 here.
16869         Decompress the compressed part of the core image.
16870         Rearrange the code to put functions and variables which are
16871         required for initialization in the non-compressed part.
16872         Include lzo1x.S.
16874         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16875         here.
16877         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16879         * include/pupa/i386/pc/kernel.h
16880         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16881         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16882         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16883         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16884         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16886         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16888         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16889         (Utility#rule): Likewise.
16891         * configure.ac: Check if LZO is available.
16893 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16895         * include/pupa/normal.h: New file.
16896         * include/pupa/setjmp.h: Likewise.
16897         * include/pupa/i386/setjmp.h: Likewise.
16898         * normal/cmdline.c: Likewise.
16899         * normal/command.c: Likewise.
16900         * normal/main.c: Likewise.
16901         * normal/menu.c: Likewise.
16902         * normal/i386/setjmp.S: Likewise.
16904         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16905         (pupa_rescue_cmd_initrd): Likewise.
16907         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16908         Likewise.
16910         * kern/i386/pc/startup.S (translation_table): New variable.
16911         (translate_keycode): New function.
16912         (pupa_console_getkey): Call translate_keycode.
16914         * kern/rescue.c (attempt_normal_mode): New function.
16915         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16916         it failed, print a message.
16918         * kern/mm.c (pupa_real_malloc): Print more information when a
16919         free magic is broken.
16920         (pupa_free): If the first free header is not free actually, set
16921         it to P.
16923         * kern/main.c (pupa_load_normal_mode): Just load the module
16924         "normal".
16925         (pupa_main): Don't print the message
16926         "Entering into rescue mode..." here.
16928         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16929         Declared.
16930         (pupa_rescue_cmd_initrd): Likewise.
16931         (pupa_rescue_cmd_initrd): Likewise.
16933         * include/pupa/symbol.h (FUNCTION): Specify the type.
16934         (VARIABLE): Likewise.
16936         * include/pupa/err.h (pupa_err_t): Added
16937         PUPA_ERR_UNKNOWN_COMMAND.
16939         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16940         (pupa_dl_get_prefix): Likewise.
16942         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16943         Added _chain.mod and _linux.mod instead of chain.mod and
16944         linux.mod.
16945         (chain_mod_SOURCES): Renamed to ...
16946         (_chain_mod_SOURCES): ... this.
16947         (chain_mod_CFLAGS): Renamed to ...
16948         (_chain_mod_CFLAGS): ... this.
16949         (linux_mod_SOURCES): Renamed to ...
16950         (_linux_mod_SOURCES): ... this.
16951         (linux_mod_CFLAGS): Renamed to ...
16952         (_linux_mod_CFLAGS): ... this.
16953         (normal_mod_SOURCES): New variable.
16954         (normal_mod_CFLAGS): Likewise.
16955         (normal_mod_ASFLAGS): Likewise.
16957 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16959         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16960         possible.
16962         * kern/dl.c (pupa_dl_ref): Refer depending modules
16963         recursively.
16964         (pupa_dl_unref): Unrefer depending modules recursively.
16965         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16966         a module is unloaded before one depending on that module is
16967         unloaded.
16968         (pupa_dl_unload): Unload depending modules explicitly,
16969         if possible.
16971 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16973         * include/pupa/i386/pc/linux.h: New file.
16974         * loader/i386/pc/linux.c: Likewise.
16976         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16977         Removed.
16978         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16979         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16980         of PUPA_CHAINLOADER_BOOT_SECTOR.
16982         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16983         (pupa_linux_prot_size): New variable.
16984         (pupa_linux_tmp_addr): Likewise.
16985         (pupa_linux_real_addr): Likewise.
16986         (pupa_linux_boot_zimage): New function.
16987         (pupa_linux_boot_bzimage): Likewise.
16989         * kern/i386/pc/init.c (struct mem_region): New structure.
16990         (MAX_REGIONS): New macro.
16991         (mem_regions): New variable.
16992         (num_regions): Likewise.
16993         (pupa_os_area_addr): Likewise.
16994         (pupa_os_area_size): Likewise.
16995         (pupa_lower_mem): Likewise.
16996         (pupa_upper_mem): Likewise.
16997         (add_mem_region): New function.
16998         (compact_mem_regions): Likewise.
16999         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17000         the size of the conventional memory and that of so-called upper
17001         memory (before the first memory hole).
17002         Instead of adding each found region to free memory, use
17003         add_mem_region and add them after removing overlaps.
17004         Also, add only 1/4 of the upper memory to free memory. The rest
17005         is used for loading OS images. Maybe this is ad hoc, but this
17006         makes it much easier to relocate OS images when booting.
17008         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17009         (pupa_enter_rescue_mode): Don't register initrd and module.
17011         * kern/mm.c: Include pupa/dl.h.
17013         * kern/main.c: Include pupa/file.h and pupa/device.h.
17015         * kern/loader.c (pupa_loader_load_module_func): Removed.
17016         (pupa_loader_load_module): Likewise.
17018         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17019         ``.o''.
17021         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17022         (pupa_linux_tmp_addr): Likewise.
17023         (pupa_linux_real_addr): Likewise.
17024         (pupa_linux_boot_zimage): Likewise.
17025         (pupa_linux_boot_bzimage): Likewise.
17027         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17028         (pupa_upper_mem): Likewise.
17029         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17030         module is too dangerous.
17032         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17033         (pupa_os_area_size): Likewise.
17034         (pupa_loader_set): Remove the first argument. Loader doesn't
17035         manage modules or initrd any longer.
17036         (pupa_loader_load_module): Removed.
17038         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17039         (linux_mod_SOURCES): New variable.
17040         (linux_mod_CFLAGS): Likewise.
17042 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17044         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17045         the length of a blocklist correctly.
17047         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17048         Use ioctl only if the OS file is a block device.
17049         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17050         not very useful for normal files.
17052         * kern/main.c (pupa_set_root_dev): New function.
17053         (pupa_load_normal_mode): Likewise.
17054         (pupa_main): Call those above.
17056         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17057         pupa_uint16_t.
17059         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17061 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17063         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17064         (setup): Configure the installed partition information and the
17065         dl prefix.
17067         * loader/i386/pc/chainloader.c (my_mod): New variable.
17068         (pupa_chainloader_unload): New function.
17069         (pupa_rescue_cmd_chainloader): Refer itself.
17070         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17072         * kern/i386/pc/startup.S (install_partition): Removed.
17073         (version_string): Likewise.
17074         (config_file): Likewise.
17075         (pupa_install_dos_part): New variable.
17076         (pupa_install_bsd_part): Likewise.
17077         (pupa_prefix): Likewise.
17078         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17080         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17081         and pupa/misc.h.
17082         (make_install_device): New function.
17083         (pupa_machine_init): Set the dl prefix.
17085         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17086         (buf): Renamed to ...
17087         (linebuf): ... this.
17088         (pupa_rescue_cmd_prefix): New function.
17089         (pupa_rescue_cmd_insmod): Likewise.
17090         (pupa_rescue_cmd_rmmod): Likewise.
17091         (pupa_rescue_cmd_lsmod): Likewise.
17092         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17093         rmmod and lsmod.
17095         * kern/mm.c (pupa_memalign): If failed even after invalidating
17096         disk caches, unload unneeded modules and retry.
17098         * kern/misc.c (pupa_memmove): New function.
17099         (pupa_memcpy): Removed.
17100         (pupa_strcpy): New function.
17101         (pupa_itoa): Made static.
17103         * kern/dl.c (pupa_dl_iterate): New function.
17104         (pupa_dl_ref): Likewise.
17105         (pupa_dl_unref): Likewise.
17106         (pupa_dl_unload): Return if succeeded or not.
17107         (pupa_dl_unload_unneeded): New function.
17108         (pupa_dl_unload_all): Likewise.
17109         (pupa_dl_init): Renamed to ...
17110         (pupa_dl_set_prefix): ... this.
17111         (pupa_dl_get_prefix): New function.
17113         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17114         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17115         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17116         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17117         (pupa_install_dos_part): Declared.
17118         (pupa_install_bsd_part): Likewise.
17119         (pupa_prefix): Likewise.
17120         (pupa_boot_drive): Likewise.
17122         * include/pupa/types.h: Fix a typo.
17124         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17125         pupa_memmove.
17126         (pupa_memmove): Declared.
17127         (pupa_strcpy): Likewise.
17129         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17130         pupa_mod_init takes one argument, its own module.
17131         (pupa_dl_unload_unneeded): Declared.
17132         (pupa_dl_unload_all): Likewise.
17133         (pupa_dl_ref): Likewise.
17134         (pupa_dl_unref): Likewise.
17135         (pupa_dl_iterate): Likewise.
17136         (pupa_dl_init): Renamed to ...
17137         (pupa_dl_set_prefix): ... this.
17138         (pupa_dl_get_prefix): Declared.
17140         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17141         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17142         unloaded.
17143         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17144         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17146         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17147         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17149 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17151         * util/i386/pc/pupa-setup.c (setup): Define the internal
17152         function find_first_partition_start at the top level, because GCC
17153         3.0.x cannot compile internal functions in deeper scopes
17154         correctly.
17155         (find_root_device): Use lstat instead of stat.
17156         Don't follow symbolic links.
17157         Fix the path-constructing code.
17159         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17160         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17161         by a BLKGETSIZE ioctl first, because block devices don't fill
17162         the member st_mode of the structure stat on Linux.
17163         [__linux__] (linux_find_partition): Use a temporary buffer
17164         REAL_DEV for the working space. Copy it to DEV before returning.
17165         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17166         buffer cache consistent.
17167         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17168         strncmp. The previous value was merely wrong.
17169         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17171         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17172         FAT size is 12. The previous value was merely wrong.
17174         * kern/main.c (pupa_main): Don't split the starting message from
17175         newlines.
17177         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17178         LF, because BIOS goes crazy about character attributes in this
17179         case.
17181 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17183         * include/i386/pc/util/biosdisk.h: New file.
17184         * util/i386/pc/biosdisk.c: Likewise.
17185         * util/i386/pc/pupa-setup.c: Likewise.
17187         * Makefile.in (INCLUDE_DISTFILES): Added
17188         include/pupa/i386/pc/util/biosdisk.h.
17189         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17190         directory util/i386/pc.
17191         (install-local): Added a rule for sbin_UTILITIES.
17192         (uninstall): Likewise.
17194         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17196         * util/misc.c (xrealloc): New function.
17197         (pupa_malloc): Likewise.
17198         (pupa_free): Likewise.
17199         (pupa_realloc): Likewise.
17200         (pupa_stop): Likewise.
17201         (pupa_putchar): Likewise.
17203         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17205         * include/pupa/util/misc.h (xrealloc): Declared.
17207         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17208         macro.
17209         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17210         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17212         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17213         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17215         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17216         way should be implemented.
17217         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17219         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17220         the size of NAME for safety.
17221         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17222         0x88.
17224         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17225         (pupa_setup_SOURCES): Likewise.
17227         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17229 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17231         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17232         bunch of pushl's from pusha, because this destroys the return
17233         value.
17235 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17237         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17238         This means that any missing prototypes could be fatal. Also, you
17239         must take care when writing assembly code. See the comments at
17240         the beginning of startup.S, for more details.
17242         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17243         compilation mechanism.
17244         (pupa_chainloader_real_boot): Likewise.
17245         (pupa_biosdisk_rw_int13_extensions): Likewise.
17246         (pupa_biosdisk_rw_standard): Likewise.
17247         (pupa_biosdisk_check_int13_extensions): Likewise.
17248         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17249         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17250         (pupa_get_memsize): Likewise.
17251         (pupa_get_mmap_entry): Likewise.
17252         (pupa_console_putchar): Likewise.
17253         (pupa_console_setcursor): Likewise.
17254         (pupa_getrtsecs): Use pushl instead of push.
17256         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17257         memory instead of the stack for a mmap entry, because some
17258         BIOSes may ignore the maximum size and overflow.
17260         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17262         * genmk.rb (PModule#rule): Compile automatically generated
17263         sources with module-specific CFLAGS as well as other sources.
17265 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17267         * configure.ac: Check ld.
17268         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17269         respectively, before checking endianness and sizes.
17271         * Makefile.in (LD): New variable.
17273 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17275         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17277 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17279         * Changelog: New file.