1 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
3 * bus/usb/ohci.c: Set interf with correct field.
5 * bus/usb/uhci.c: Remove unneeded doubled lines.
6 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
7 Remove whitespace inside comment.
9 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
11 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
12 as fallback an equivalent option without depth.
14 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
16 Not fail if unable to retrieve C/H/S on LBA disks
18 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
19 if unable to retrieve C/H/S on LBA disks
21 2009-06-08 Pavel Roskin <proski@gnu.org>
23 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
26 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
28 * Makefile.in (uninstall): Remove all $lib_DATA files.
30 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
32 Bugfix: install on partitionless device
34 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
37 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
39 * Makefile.in (uninstall): Remove all $include_DATA files.
41 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
43 * commands/true.c: New file. Implement the true and false commands.
44 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
45 (true_mod_SOURCES): New variable.
46 (true_mod_CFLAGS): Likewise.
47 (true_mod_LDFLAGS): Likewise.
49 2009-06-05 Colin D Bennett <colin@gibibit.com>
51 Optimized font character lookup using binary search instead of linear
52 search. Fonts now are required to have the character index ordered by
55 * font/font.c (load_font_index): Verify that fonts have ordered
57 (find_glyph): Use binary search instead of linear search to find a
60 2009-06-05 Michael Scherer <misc@mandriva.org>
62 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
63 uses case sensitive btree.
64 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
65 only for case insensitive filesystems.
67 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
69 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
70 * conf/common.rmk (search_mod_CFLAGS): likewise
72 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
74 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
75 compensate a compiler bug
77 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
79 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitely define as 8
82 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
84 Definitions for creating asm symbols with Apple's CC
86 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
87 [APPLE_CC] (VARIABLE): likewise
89 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
91 Disable lnxboot.img when compiled
94 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
95 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
96 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
97 [! APPLE_CC] (CODE_LENG): skip
98 [! APPLE_CC] (setup_sects): likewise
99 [! APPLE_CC]: skip filling
101 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
103 Address in trampolines based on 32-bit registers when compiled
106 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
108 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
110 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
112 Avoid aliases when compiling with Apple's CC for PCBIOS machine
114 * kern/misc.c [APPLE_CC] (memcpy): new function
115 [APPLE_CC] (memmove): likewise
116 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
117 (memcpy): define alias conditionaly on !APPLE_CC
120 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
122 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
123 (grub_assert_fail): make prototype conditional
125 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
127 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
129 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
131 (CLEANFILES): add grub-macho2img
132 (grub_macho2img_SOURCES): new variable
133 * kern/i386/pc/startup.S (bss_start): new variable
135 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
136 * util/grub-macho2img.c: new file
138 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
140 Use objconv when compiling with Apple's CC
142 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
143 (efiemu64.o): likewise
144 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
145 when compiling with Apple's CC
146 (efiemu64_s.o): likewise
147 * configure.ac: check for objconv when compiling with Apple's CC
148 * genmk.rb: use objconv for modules when compiled with Apple's CC
150 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
152 Define segment as well as section when compiling with
155 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
156 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
157 (efiemu_convert_pointer): likewise
158 (efiemu_set_virtual_address_map): likewise
159 (efiemu_convert_pointer): likewise
160 (efiemu_getcrc32): likewise
161 (init_crc32_table): likewise
163 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
164 (GRUB_MOD_DEP): likewise
166 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
168 Allow a compilation without -mcmodel=large
170 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
171 when compiled without -mcmodel=large
172 (filter_memory_map): remove memory post 4 GiB when compiled
173 without -mcmodel=large
174 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
175 TARGET_CFLAGS when -mcmodel=large isn't supported
177 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
179 Remove nested functions in efiemu core
181 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
183 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
185 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
187 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
189 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
191 (grub_cpu_is_tsc_supported): likewise
192 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
194 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
196 Absolute addressing through constant with Apple's cc
198 * kern/i386/pc/startup.S: Define necessary constants
199 and address through it when using ABS with Apple's CC
200 * boot/i386/pc/diskboot.S: likewise
201 * boot/i386/pc/boot.S: likewise
202 * boot/i386/pc/lnxboot.S: likewise
203 * boot/i386/pc/cdboot.S: likewise
204 * mmap/i386/pc/mmap_helper.S: likewise
205 * commands/i386/pc/drivemap_int13h.S: likewise
207 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
209 Check if compiler is apple cc
211 * Makefile.in (ASFLAGS): new variable
212 (TARGET_ASFLAGS): likewise
213 (TARGET_MODULE_FORMAT): likewise
214 (TARGET_APPLE_CC): likewise
216 (TARGET_IMG_CFLAGS): likewise
217 (TARGET_CPPFLAGS): add includedir
218 * configure.ac: call grub_apple_cc and grub_apple_target_cc
219 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
220 Check for linker script only if compiler isn't Apple's CC
221 (TARGET_MODULE_FORMAT): set
222 (TARGET_APPLE_CC): likewise
223 (TARGET_ASFLAGS): likewise
225 Check for objcopy only if compiler isn't Apple's CC
226 Check for BSS symbol only if compiler isn't Apple's CC
227 * genmk.rb: adapt nm options if we use Apple's utils
228 * aclocal.m4 (grub_apple_cc): new test
229 (grub_apple_target_cc): likewise
231 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
233 Simplify sed expressions and improve awk
235 * Makefile.in (install-local): simplify sed expression
236 * gencmdlist.sh: likewise
237 * genmoddep.awk: avoid adding module as a dependency of itself
239 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
241 Add missing start symbols
243 * boot/i386/pc/boot.S: add start
244 * boot/i386/pc/pxeboot.S: likewise
246 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
248 Fix wrong assumptions with grub-mkimage on EFI
250 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
251 (relocate_addresses): consider both r_addend and value at offset
252 (make_mods_section): zerofill modinfo and header
253 (convert_elf): write prefix here
255 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
257 Use .asciz instead of .string
259 * i386/pc/diskboot.S: use .asciz instead of .string
260 * i386/pc/boot.S: likewise
261 * include/grub/dl.h (GRUB_MOD_DEP): likewise
262 (GRUB_MOD_NAME): likewise
264 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
268 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
269 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
270 (grub_video_setup): remove
271 (grub_video_set_mode): new prototype
272 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
274 (linux_vesafb_res): compile only on PCBIOS
275 (grub_linux_boot): support gfxpayload
276 * loader/i386/pc/xnu.c (video_hook): new function
277 (grub_xnu_set_video): support gfxpayload
278 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
279 (DEFAULT_VIDEO_HEIGHT): likewise
280 (DEFAULT_VIDEO_FLAGS): likewise
281 (DEFAULT_VIDEO_MODE): new definition
282 (video_hook): new function
283 (grub_gfxterm_init): use grub_video_set_mode
284 * util/grub.d/30_os-prober.in: remove explicit modesetting before
286 * video/video.c (grub_video_setup): removed
287 (grub_video_set_mode): new function based on grub_gfxterm_init and
290 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
292 Avoid calling biosdisk in drivemap
294 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
295 (revparse_biosdisk): likewise
296 (list_mappings): derive name from id directly
297 (grub_cmd_drivemap): use tryparse_diskstring
299 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
303 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
304 (grub_lexer_param): add tokenonhold
305 (grub_script_create_cmdline): remove cmdline. All callers updated
306 (grub_script_function_create): make functionname
307 grub_script_arg. All callers updated
308 (grub_script_execute_argument_to_string): new prototype
309 * kern/parser.c (state_transitions): reorder
310 (grub_parser_cmdline_state): fix a bug and make more compact
311 * script/sh/execute.c (grub_script_execute_argument_to_string):
313 (grub_script_execute_cmdline): use new format
314 * script/sh/function.c (grub_script_function_create): make functionname
315 grub_script_arg. All callers updated
316 * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
317 (grub_script_yylex): remove
318 (grub_script_yylex2): renamed to ...
319 (grub_script_yylex): ...renamed
320 parse the expressions like a${b}c
321 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
322 (GRUB_PARSER_TOKEN_VAR): remove
323 (GRUB_PARSER_TOKEN_NAME): likewise
324 ("if"): declare as typeless
326 ("function"): likewise
332 (script): accept empty scripts and make exit on error
333 (arguments): use GRUB_PARSER_TOKEN_ARG
335 (command): move error handling to script
336 (menuentry): move grub_script_lexer_ref before
337 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
338 argument. All callers updated
340 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
342 Prevent GRUB from probing floppies during boot.
344 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
345 * commands/search.c (options): Add --no-floppy.
346 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
347 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
348 --no-floppy when searching for UUIDs.
350 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
352 Simplify the code duplication in commands/search.c.
354 * commands/search.c (search_label, search_fs_uuid): Merge into ...
355 (search_fs): ... this. Update all users.
357 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
359 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
361 2009-05-28 Pavel Roskin <proski@gnu.org>
363 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
364 Remove the original symlink explicitly.
366 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
367 just one slash. That's how grub_fshelp_find_file() does it.
369 2009-05-26 Pavel Roskin <proski@gnu.org>
371 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
374 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
377 2009-05-25 Christian Franke <franke@computer.org>
379 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
381 (grub_atapi_identify): Add wait after drive select.
382 (grub_ata_identify): Do more strict status register check before
383 calling grub_atapi_identify (). Suppress error message if status
384 register is 0x00 after command failure. Add status register
385 check after PIO read to avoid bogus identify due to stuck DRQ.
386 Thanks to Pavel Roskin for testing.
387 (grub_device_initialize): Remove unsafe status register check.
388 Thanks to 'phcoder' for problem report and patch.
389 Prevent sign extension in debug message.
391 2009-05-23 Colin D Bennett <colin@gibibit.com>
393 Cleaned up `include/grub/normal.h'. Grouped prototypes by
394 definition file, and functions defined in `normal/menu.c' have had
395 their prototypes moved to `include/grub/menu.h' for consistency.
397 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
399 (grub_menu_get_entry): Likewise.
400 (grub_menu_get_timeout): Likewise.
401 (grub_menu_set_timeout): Likewise.
402 (grub_menu_execute_entry): Likewise.
403 (grub_menu_execute_with_fallback): Likewise.
404 (grub_menu_entry_run): Likewise.
406 * include/grub/normal.h: Re-ordered and grouped function
407 prototypes by file that the function is defined in.
408 (grub_menu_execute_callback): Removed; moved to menu.h.
409 (grub_menu_get_entry): Likewise.
410 (grub_menu_get_timeout): Likewise.
411 (grub_menu_set_timeout): Likewise.
412 (grub_menu_execute_entry): Likewise.
413 (grub_menu_execute_with_fallback): Likewise.
414 (grub_menu_entry_run): Likewise.
415 (grub_menu_addentry): Renamed from this ...
416 (grub_normal_add_menu_entry): ... to this.
418 * normal/main.c (grub_menu_addentry): Renamed from this ...
419 (grub_normal_add_menu_entry): ... to this.
421 * script/sh/execute.c (grub_script_execute_menuentry): Update
422 reference to renamed grub_menu_addentry function.
424 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
426 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
428 2009-05-22 Pavel Roskin <proski@gnu.org>
430 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
431 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
432 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
433 compiling for the i386 targets, but not for the utilities.
435 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
437 (grub_root_drive): Likewise.
438 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
440 (grub_root_drive): Change size to byte.
441 (grub_start_addr): Remove.
442 (grub_end_addr): Likewise.
443 (grub_apm_bios_info): Likewise.
445 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
447 * normal/i386: Remove.
448 * normal/powerpc: Likewise.
449 * normal/sparc64: Likewise.
450 * normal/x86_64: Likewise.
452 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
454 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
455 * loader/i386/linux_trampoline.S: Fix identation
456 * loader/i386/xnu_helper.S: Likewise
458 2009-05-18 Colin D Bennett <colin@gibibit.com>
460 Display error messages when parsing a Lua statement fails.
461 Previously, executing a syntactically invalid statement like
462 ")foo" or "bar;" would silently fail.
464 * script/lua/grub_main.c (handle_lua_error): New function.
465 (grub_lua_parse_line): Improved reporting of Lua parser and
468 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
470 Remove -Werror which causes build to fail on some systems
472 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
473 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
474 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
476 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
478 trampoline for linux on 64-bit platform
480 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
481 loader/i386/efi/linux_trampoline.S
482 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
484 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
486 * loader/i386/linux_trampoline.S: moved here
487 * loader/i386/efi/linux.c (allocate_pages): reserve space for
489 (jumpvector): removed
490 (grub_linux_trampoline_start): new declaration
491 (grub_linux_trampoline_end): likewise
492 (grub_linux_boot): use trampoline when on 64-bit platform
493 * loader/i386/linux.c: likewise
495 2009-05-16 Pavel Roskin <proski@gnu.org>
497 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
498 const to avoid a warning.
499 (grub_lua_setenv): Likewise.
500 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
501 lmsg to fix a warning.
503 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
505 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
506 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
507 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
508 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
509 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
510 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
511 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
512 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
514 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
516 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
518 2009-05-16 Bean <bean123ch@gmail.com>
520 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
521 (lua_mod_SOURCES): New variable.
522 (lua_mod_CFLAGS): Likewise.
523 (lua_mod_LDFLAGS): Likewise.
525 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
526 (setjmp_mod_SOURCES): New variable.
527 (setjmp_mod_CFLAGS): Likewise.
528 (setjmp_LDFLAGS): Likewise.
530 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
531 (setjmp_mod_SOURCES): New variable.
532 (setjmp_mod_CFLAGS): Likewise.
533 (setjmp_LDFLAGS): Likewise.
535 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
536 (setjmp_mod_SOURCES): New variable.
537 (setjmp_mod_CFLAGS): Likewise.
538 (setjmp_LDFLAGS): Likewise.
540 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
541 (setjmp_mod_SOURCES): New variable.
542 (setjmp_mod_CFLAGS): Likewise.
543 (setjmp_LDFLAGS): Likewise.
545 * normal/i386/setjmp.S: Moved from here ...
546 * lib/i386/setjmp.S: ... Moved here
547 * normal/x86_64/setjmp.S: Moved from here ...
548 * lib/x86_64/setjmp.S: ... Moved here
549 * normal/powerpc/setjmp.S: Moved from here ...
550 * lib/powerpc/setjmp.S: ... Moved here
551 * normal/sparc64/setjmp.S: Moved from here ...
552 * lib/sparc64/setjmp.S: ... Moved here
554 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
555 returns_twice in mingw.
557 * script/lua/grub_lib.c: New file.
558 * script/lua/grub_lib.h: Likewise.
559 * script/lua/grub_lua.h: Likewise.
560 * script/lua/grub_main.c: Likewise.
561 * script/lua/lapi.c: Likewise.
562 * script/lua/lapi.h: Likewise.
563 * script/lua/lauxlib.c: Likewise.
564 * script/lua/lauxlib.h: Likewise.
565 * script/lua/lbaselib.c: Likewise.
566 * script/lua/lcode.c: Likewise.
567 * script/lua/lcode.h: Likewise.
568 * script/lua/ldblib.c: Likewise.
569 * script/lua/ldebug.c: Likewise.
570 * script/lua/ldebug.h: Likewise.
571 * script/lua/ldo.c: Likewise.
572 * script/lua/ldo.h: Likewise.
573 * script/lua/ldump.c: Likewise.
574 * script/lua/lfunc.c: Likewise.
575 * script/lua/lfunc.h: Likewise.
576 * script/lua/lgc.c: Likewise.
577 * script/lua/lgc.h: Likewise.
578 * script/lua/linit.c: Likewise.
579 * script/lua/liolib.c: Likewise.
580 * script/lua/llex.c: Likewise.
581 * script/lua/llex.h: Likewise.
582 * script/lua/llimits.h: Likewise.
583 * script/lua/lmathlib.c: Likewise.
584 * script/lua/lmem.c: Likewise.
585 * script/lua/lmem.h: Likewise.
586 * script/lua/loadlib.c: Likewise.
587 * script/lua/lobject.c: Likewise.
588 * script/lua/lobject.h: Likewise.
589 * script/lua/lopcodes.c: Likewise.
590 * script/lua/lopcodes.h: Likewise.
591 * script/lua/loslib.c: Likewise.
592 * script/lua/lparser.c: Likewise.
593 * script/lua/lparser.h: Likewise.
594 * script/lua/lstate.c: Likewise.
595 * script/lua/lstate.h: Likewise.
596 * script/lua/lstring.c: Likewise.
597 * script/lua/lstring.h: Likewise.
598 * script/lua/lstrlib.c: Likewise.
599 * script/lua/ltable.c: Likewise.
600 * script/lua/ltable.h: Likewise.
601 * script/lua/ltablib.c: Likewise.
602 * script/lua/ltm.c: Likewise.
603 * script/lua/ltm.h: Likewise.
604 * script/lua/lua.h: Likewise.
605 * script/lua/luaconf.h: Likewise.
606 * script/lua/lualib.h: Likewise.
607 * script/lua/lundump.c: Likewise.
608 * script/lua/lundump.h: Likewise.
609 * script/lua/lvm.c: Likewise.
610 * script/lua/lvm.h: Likewise.
611 * script/lua/lzio.c: Likewise.
612 * script/lua/lzio.h: Likewise.
614 2009-05-16 Bean <bean123ch@gmail.com>
616 * include/grub/kernel.h (grub_module_header_types): Add type
619 * kern/main.c (grub_load_config): New function.
620 (grub_main): Call grub_load_config to read boot config.
622 * grub-mkimage (generate_image): New parameter config_path.
623 (options): New option --config.
624 (main): Parse --config option, and pass it to generate_image.
626 2009-05-14 Christian Franke <franke@computer.org>
628 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
629 This fixes build on Cygwin.
631 2009-05-14 Pavel Roskin <proski@gnu.org>
633 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
634 jump. This saves two bytes, so the typical case of 2 swapped
635 drives would fit 32 bytes.
637 2009-05-13 Pavel Roskin <proski@gnu.org>
639 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
640 grub_uint32_t to avoid a warning.
642 * loader/i386/linux.c (allocate_pages): When assigning
643 real_mode_mem, cast through grub_size_t to fix a warning. The
644 code already makes sure that the value would fit a pointer.
645 (grub_linux_setup_video): Cast render_target->data to
646 grub_size_t to fix a warning.
648 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
650 * commands/i386/pc/drivemap.c: New file - implement drivemap
652 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
653 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
655 2009-05-13 Pavel Roskin <proski@gnu.org>
657 * util/i386/pc/grub-setup.c (setup): Remove unused variable
658 embedding_area_exists.
660 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
662 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
663 it easier to understand / work with.
664 Improve warning messages for cases where there's no embedding area,
665 or when it is too small (or core.img too large).
667 2009-05-13 Pavel Roskin <proski@gnu.org>
669 * loader/i386/pc/multiboot2.c: Add necessary includes for
670 grub_multiboot2_real_boot().
672 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
673 PX record is always little-endian. We only need the lower 2
676 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
677 facilitate code reuse.
678 (grub_cpio_mount): Use "struct head", not a char buffer. This
679 fixes a warning reported by gcc 4.4.
681 * kernel/disk.c (grub_disk_read): Use void pointer for the
683 (grub_disk_write): Use const void pointer for the buffer.
684 Adjust all callers. Remove unnecessary casts.
686 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
688 * util/i386/pc/grub-install.in: Update copyright year.
690 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
694 * commands/gptsync.c: new file
695 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
696 (gptsync_mod_SOURCES): new variable
697 (gptsync_mod_CFLAGS): likewise
698 (gptsync_mod_LDFLAGS): likewise
699 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
701 (GRUB_PC_PARTITION_TYPE_HFS): likewise
702 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
703 * conf/i386-ieee1275.rmk: likewise
704 * conf/i386-pc.rmk: likewise
705 * conf/powerpc-ieee1275.rmk: likewise
707 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
711 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
712 (grub_dl_ref): likewise
714 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
716 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
717 split in two functions (one for msdos and one for gpt).
719 2009-05-08 Pavel Roskin <proski@gnu.org>
721 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
724 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
725 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
726 Initialize them with -1. Add sanity check for bad1. Eliminate
729 2009-05-08 David S. Miller <davem@davemloft.net>
731 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
733 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
735 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
738 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
741 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
743 2009-05-05 David S. Miller <davem@davemloft.net>
745 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
747 2009-05-05 Pavel Roskin <proski@gnu.org>
749 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
750 of grub_dl_ref() and grub_dl_unref().
751 * commands/parttool.c: Remove preprocessor conditionals around
752 grub_dl_ref() and grub_dl_unref().
753 * fs/affs.c: Likewise.
754 * fs/afs.c: Likewise.
755 * fs/cpio.c: Likewise.
756 * fs/ext2.c: Likewise.
757 * fs/fat.c: Likewise.
758 * fs/hfs.c: Likewise.
759 * fs/hfsplus.c: Likewise.
760 * fs/iso9660.c: Likewise.
761 * fs/jfs.c: Likewise.
762 * fs/minix.c: Likewise.
763 * fs/ntfs.c: Likewise.
764 * fs/reiserfs.c: Likewise.
765 * fs/sfs.c: Likewise.
766 * fs/udf.c: Likewise.
767 * fs/ufs.c: Likewise.
768 * fs/xfs.c: Likewise.
769 * include/grub/dl.h: Likewise.
770 * loader/xnu.c: Likewise.
772 2009-05-04 Pavel Roskin <proski@gnu.org>
774 * commands/acpi.c: Remove unused variable my_mod.
775 * partmap/amiga.c: Likewise.
776 * partmap/apple.c: Likewise.
777 * partmap/gpt.c: Likewise.
778 * partmap/pc.c: Likewise.
779 * partmap/sun.c: Likewise.
780 * term/gfxterm.c: Likewise.
781 * term/i386/pc/vesafb.c: Likewise.
782 * term/i386/pc/vga.c: Likewise.
784 2009-05-04 David S. Miller <davem@davemloft.net>
786 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
787 pointer args to grub_ieee1275_get_property().
789 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
791 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
792 devices, and do not traverse down under controller nodes.
794 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
795 (grub_ofdisk_open): Use it to un-escape "," characters.
796 * kern/disk.c (find_part_sep): New.
797 (grub_disk_open): Use it to find the first non-escaped ','
798 character in the disk name.
799 * util/ieee1275/devicemap.c (escape_of_path): New.
800 (grub_util_emit_devicemap_entry): Use it.
801 * util/sparc64/ieee1275/grub-install.in: Update script to
802 strip partition specifiers properly by not triggering on
803 '\' escaped ',' characters.
805 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
807 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
809 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
811 (linux_vesafb_modes): Add a lot of additional modes to the list (based
812 on documentation from Wikipedia).
814 2009-05-04 Pavel Roskin <proski@gnu.org>
816 * disk/ata.c: Spelling fixes.
817 * disk/raid.c: Likewise.
818 * disk/usbms.c: Likewise.
819 * disk/dmraid_nvidia.c: Likewise.
820 * kern/ieee1275/openfw.c: Likewise.
821 * kern/ieee1275/init.c: Likewise.
822 * kern/ieee1275/cmain.c: Likewise.
823 * boot/i386/pc/cdboot.S: Likewise.
824 * video/readers/png.c: Likewise.
825 * video/i386/pc/vbe.c: Likewise.
826 * fs/udf.c: Likewise.
827 * fs/hfs.c: Likewise.
828 * fs/reiserfs.c: Likewise.
829 * efiemu/runtime/efiemu.c: Likewise.
830 * efiemu/main.c: Likewise.
831 * efiemu/mm.c: Likewise.
832 * include/grub/elf.h: Likewise.
833 * include/grub/xnu.h: Likewise.
834 * include/grub/usbdesc.h: Likewise.
835 * include/grub/usb.h: Likewise.
836 * include/grub/script_sh.h: Likewise.
837 * include/grub/lib/LzmaEnc.h: Likewise.
838 * include/grub/efiemu/efiemu.h: Likewise.
839 * include/grub/command.h: Likewise.
840 * normal/menu.c: Likewise.
841 * normal/main.c: Likewise.
842 * normal/datetime.c: Likewise.
843 * bus/usb/uhci.c: Likewise.
844 * mmap/i386/uppermem.c: Likewise.
845 * mmap/mmap.c: Likewise.
846 * commands/acpi.c: Likewise.
847 * commands/test.c: Likewise.
848 * partmap/apple.c: Likewise.
849 * font/font.c: Likewise.
850 * loader/sparc64/ieee1275/linux.c: Likewise.
851 * loader/macho.c: Likewise.
852 * loader/i386/bsd_trampoline.S: Likewise.
853 * loader/i386/bsd.c: Likewise.
854 * loader/xnu.c: Likewise.
855 * term/i386/pc/vesafb.c: Likewise.
856 * term/usb_keyboard.c: Likewise.
857 * util/resolve.c: Likewise.
858 * util/getroot.c: Likewise.
860 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
862 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
864 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
866 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
869 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
871 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
872 parameter only available on BIOS.
874 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
876 Removed wrong semicolon in declaration
878 * grub/misc.h (grub_dprintf): remove semicolon
880 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
882 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
883 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
884 is done by grub_cmd_linux() now).
885 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
886 restore video to text mode.
887 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
888 indicates lack of "vga=" parameter. "vga=0" is mapped to
889 `GRUB_LINUX_VID_MODE_NORMAL'.
891 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
893 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
894 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
895 and `normal/script.c'. Add `kern/rescue_reader.c',
896 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
897 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
900 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
901 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
902 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
903 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
904 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
906 * Makefile.in: Remove duplicated 2008 in Copyright line.
908 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
910 * util/misc.c (grub_util_warn): New function. Emmits a warning
912 * include/grub/util/misc.h (grub_util_warn): New declaration.
914 * util/i386/pc/grub-install.in: Understand --force and pass it down
917 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
919 (setup): Improve error messages and add warnings when requested to
920 install in odd layouts. Refuse to install using blocklists unless
923 2009-05-04 martin f. krafft <madduck@madduck.net>
925 * disk/raid.c (grub_raid_scan_device): Improve debug message.
927 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
929 Updated copyright year
931 * fs/hfsplus.c: updated copyright year
933 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
937 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
938 in the space previously used by unused3
939 (grub_hfsplus_uuid): new function
940 (grub_hfsplus_fs): added uuid field
942 2009-05-03 Pavel Roskin <proski@gnu.org>
944 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
945 suppress warnings. It's no longer needed.
946 * disk/host.c: Likewise.
947 * disk/ata_pthru.c: Likewise.
948 * disk/loopback.c: Likewise.
949 * hook/datehook.c: Likewise.
950 * parttool/pcpart.c: Likewise.
951 * fs/i386/pc/pxe.c: Likewise.
952 * fs/ntfscomp.c: Likewise.
953 * efiemu/main.c: Likewise.
954 * mmap/mmap.c: Likewise.
955 * commands/crc.c: Likewise.
956 * commands/hexdump.c: Likewise.
957 * commands/hdparm.c: Likewise.
958 * commands/acpi.c: Likewise.
959 * commands/echo.c: Likewise.
960 * commands/minicmd.c: Likewise.
961 * commands/blocklist.c: Likewise.
962 * commands/memrw.c: Likewise.
963 * commands/loadenv.c: Likewise.
964 * commands/usbtest.c: Likewise.
965 * commands/lsmmap.c: Likewise.
966 * commands/boot.c: Likewise.
967 * commands/parttool.c: Likewise.
968 * commands/configfile.c: Likewise.
969 * commands/search.c: Likewise.
970 * commands/ieee1275/suspend.c: Likewise.
971 * commands/cat.c: Likewise.
972 * commands/i386/pc/pxecmd.c: Likewise.
973 * commands/i386/pc/play.c: Likewise.
974 * commands/i386/pc/halt.c: Likewise.
975 * commands/i386/pc/vbeinfo.c: Likewise.
976 * commands/i386/pc/vbetest.c: Likewise.
977 * commands/lspci.c: Likewise.
978 * commands/date.c: Likewise.
979 * commands/handler.c: Likewise.
980 * commands/ls.c: Likewise.
981 * commands/test.c: Likewise.
982 * commands/cmp.c: Likewise.
983 * commands/efi/loadbios.c: Likewise.
984 * commands/efi/fixvideo.c: Likewise.
985 * commands/halt.c: Likewise.
986 * commands/help.c: Likewise.
987 * commands/reboot.c: Likewise.
988 * hello/hello.c: Likewise.
989 * script/sh/main.c: Likewise.
990 * loader/xnu.c: Likewise.
991 * term/terminfo.c: Likewise.
992 * term/i386/pc/serial.c: Likewise.
993 * term/usb_keyboard.c: Likewise.
995 2009-05-03 David S. Miller <davem@davemloft.net>
997 * normal/menu.c: Include grub/parser.h
999 2009-05-03 Pavel Roskin <proski@gnu.org>
1001 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1003 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1004 Suggested by Javier MartÃn <lordhabbit@gmail.com>
1006 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1007 efiemu??.o doesn't exist.
1008 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1011 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1013 FreeBSD 64-bit support
1015 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1016 and loader/i386/bsd_trampoline.S
1017 (bsd_mod_ASFLAGS): new variable
1018 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1019 (FREEBSD_MODTYPE_KERNEL64): likewise
1020 (grub_bsd64_trampoline_start): likewise
1021 (grub_bsd64_trampoline_end): likewise
1022 (grub_bsd64_trampoline_selfjump): likewise
1023 (grub_bsd64_trampoline_gdt): likewise
1024 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1025 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1026 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1027 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1028 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1030 * loader/i386/bsd_pagetable.c: new file
1031 * loader/i386/bsd_trampoline.S: likewise
1032 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1033 (ALIGN_VAR): likewise
1034 (entry_hi): new variable
1035 (kern_end_mdofs): likewise
1036 (is_64bit): likewise
1037 (grub_freebsd_add_meta): use ALIGN_VAR
1038 (grub_e820_mmap): new declaration
1039 (grub_freebsd_add_mmap): new function
1040 (grub_freebsd_add_meta_module): support 64 bit kernels
1041 (grub_freebsd_list_modules): use ALIGN_VAR
1042 (gdt_descriptor): new declaration
1043 (grub_freebsd_boot): support 64 bit kernels
1044 (grub_bsd_elf64_hook): new function
1045 (grub_bsd_load_elf): support elf64
1047 2009-05-03 Bean <bean123ch@gmail.com>
1049 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1050 after we get the result of if statement.
1052 2009-05-03 Bean <bean123ch@gmail.com>
1054 * Makefile.in (enable_efiemu): New variable.
1056 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1058 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1060 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1061 path, add -mno-red-zone option.
1062 (efiemu64_s.o): Likewise.
1063 (efiemu64.o): Use macro $^ for source file.
1065 * configure.ac (--enable-efiemu): New option.
1067 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1071 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1072 (pkglib_MODULES): add xnu.mod
1073 (xnu_mod_SOURCES): new variable
1074 (xnu_mod_CFLAGS): likewise
1075 (xnu_mod_LDFLAGS): likewise
1076 (xnu_mod_ASFLAGS): likewise
1077 * conf/i386-pc.rmk: likewise
1078 * conf/x86_64-efi.rmk: likewise
1079 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1081 * include/grub/i386/macho.h: new file
1082 * include/grub/i386/xnu.h: likewise
1083 * include/grub/macho.h: likewise
1084 * include/grub/machoload.h: likewise
1085 * include/grub/x86_64/macho.h: likewise
1086 * include/grub/x86_64/xnu.h: likewise
1087 * include/grub/xnu.h: likewise
1088 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1089 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1090 * loader/i386/efi/xnu.c: new file
1091 * loader/i386/pc/xnu.c: likewise
1092 * loader/i386/xnu.c: likewise
1093 * loader/i386/xnu_helper.S: likewise
1094 * loader/macho.c: likewise
1095 * loader/xnu.c: likewise
1096 * loader/xnu_resume.c: likewise
1097 * util/grub-dumpdevtree: likewise
1098 * include/grub/i386/pit.h: include grub/err.h
1099 (grub_pit_wait): export
1100 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1102 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1106 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1107 _linux_efi, linux_efi.
1108 new files in grub-emu
1109 new targets efiemu32.o and efiemu64.o
1110 * loader/linux_normal_efiemu.c: likewise
1111 * loader/i386/efi/linux.c: added preliminary efiemu support
1112 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1114 * include/grub/autoefi.h: new file
1115 * include/grub/i386/efiemu.h: likewise
1116 * include/grub/i386/pc/efiemu.h: likewise
1117 * include/grub/efi/api.h: add LL suffix when necessary
1118 new definitions relating to tables
1119 * include/grub/efiemu/efiemu.h: new file
1120 * include/grub/efiemu/runtime.h: likewise
1121 * efiemu/prepare.c: likewise
1122 * efiemu/loadcore_common.c: likewise
1123 * efiemu/loadcore64.c: likewise
1124 * efiemu/runtime/efiemu.sh: likewise
1125 * efiemu/runtime/efiemu.S: likewise
1126 * efiemu/runtime/efiemu.c: likewise
1127 * efiemu/runtime/config.h: likewise
1128 * efiemu/prepare32.c: likewise
1129 * efiemu/main.c: likewise
1130 * efiemu/modules/pnvram.c: likewise
1131 * efiemu/modules/i386: likewise
1132 * efiemu/modules/i386/pc: likewise
1133 * efiemu/modules/acpi.c: likewise
1134 * efiemu/i386/pc/cfgtables.c: likewise
1135 * efiemu/i386/loadcore64.c: likewise
1136 * efiemu/i386/loadcore32.c: likewise
1137 * efiemu/prepare64.c: likewise
1138 * efiemu/loadcore.c: likewise
1139 * efiemu/symbols.c: likewise
1140 * efiemu/mm.c: likewise
1141 * efiemu/loadcore32.c: likewise
1143 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1147 * commands/acpi.c: new file
1148 * commands/i386/pc/acpi.c: likewise
1149 * commands/efi/acpi.c: likewise
1150 * include/grub/acpi.h: likewise
1151 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1152 (acpi_mod_SOURCES): new variable
1153 (acpi_mod_CFLAGS): likewise
1154 (acpi_mod_LDFLAGS): likewise
1155 * conf/i386-efi.rmk: likewise
1156 * conf/x86_64-efi.rmk: likewise
1158 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1160 Missing part from mmap patch
1162 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1163 (grub_mmap_unregister)
1164 (grub_mmap_free_and_unregister): use grub_mmap_register
1166 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1170 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1171 * loader/i386/linux.c (find_mmap_size): likewise
1172 (allocate_pages): likewise
1173 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1174 (grub_fill_multiboot_mmap): likewise
1175 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1176 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1177 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1178 (OPENBSD_MMAP_RESERVED): likewise
1179 * include/grub/i386/pc/memory.h: include grub/memory.h
1180 (grub_lower_mem): removed
1181 (grub_upper_mem): likewise
1182 (GRUB_MACHINE_MEMORY_ACPI): new definition
1183 (GRUB_MACHINE_MEMORY_NVS): likewise
1184 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1185 (GRUB_MACHINE_MEMORY_HOLE): likewise
1186 (grub_machine_mmap_register): likewise
1187 (grub_machine_mmap_unregister): likewise
1188 (grub_machine_get_upper): likewise
1189 (grub_machine_get_lower): likewise
1190 (grub_machine_get_post64): likewise
1191 * include/grub/i386/efi/memory.h: new file
1192 * include/grub/x86_64/efi/memory.h: likewise
1193 * include/grub/efi/memory.h: likewise
1194 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1195 (mmap_mod_SOURCES): new variable
1196 (mmap_mod_LDFLAGS): likewise
1197 (mmap_mod_ASFLAGS): likewise
1198 * conf/i386-coreboot.rmk: likewise
1199 * conf/i386-ieee1275.rmk: likewise
1200 * conf/i386-efi.rmk: likewise
1201 * conf/x86_64-efi.rmk: likewise
1202 * include/grub/types.h (UINT_TO_PTR): new macro
1203 (PTR_TO_UINT32): likewise
1204 (PTR_TO_UINT64): likewise
1205 * include/grub/memory.h: new file
1206 * mmap/i386/pc/mmap.c: likewise
1207 * mmap/i386/pc/mmap_helper.S: likewise
1208 * mmap/i386/uppermem.c: likewise
1209 * mmap/mmap.c: likewise
1210 * mmap/efi/mmap.c: likewise
1211 * kern/i386/coreboot/init.c (grub_machine_init): don't use
1213 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1214 (grub_upper_mem): likewise
1215 (grub_machine_init): don't use grub_upper_mem,
1216 make grub_lower_mem local
1217 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1218 grub_mmap_iterate and grub_mmap_get_upper
1219 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1221 2009-05-02 Bean <bean123ch@gmail.com>
1223 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1225 (pkglib_MODULES): Add normal.mod and sh.mod.
1226 (normal_SOURCES): New variable.
1227 (normal_mod_CFLAGS): Likewise.
1228 (normal_mod_LDFLAGS): Likewise.
1229 (sh_mod_SOURCES): Likewise.
1230 (sh_mod_CFLAGS): Likewise.
1231 (sh_mod_LDFLAGS): Likewise.
1233 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1234 script/sh/lexer.c_DEPENDENCIES.
1235 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1236 kern/rescue_reader.c and kern/rescue_parser.c.
1237 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1238 (grub_emu_SOURCES): Change source files.
1239 (pkglib_MODULES): Remove normal.mod.
1240 (normal_SOURCES): Removed.
1241 (normal_mod_CFLAGS): Likewise.
1242 (normal_mod_LDFLAGS): Likewise.
1243 * conf/i386-coreboot.rmk: Likewise.
1244 * conf/i386-efi.rmk: Likewise.
1245 * conf/i386-ieee1276.rmk: Likewise.
1246 * conf/powerpc-ieee1275.rmk: Likewise.
1247 * conf/sparc64-ieee1275.rmk: Likewise.
1248 * conf/x86_64-efi.rmk: Likewise.
1250 * include/grub/command.h (grub_command_execute): New inline function.
1252 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1254 * include/grub/normal.h: Remove <grub/setjmp.h>.
1255 (grub_fs_module_list): Moved to normal/autofs.c.
1256 (grub_exit_env): Removed.
1257 (grub_command_execute): Likewise.
1258 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1260 (read_command_list): New function declaration.
1261 (read_fs_list): Likewise.
1263 * include/parser.h: Include <grub/reader.h>.
1264 (grub_parser_split_cmdline): Change type of getline parameter.
1265 (grub_parser): New structure.
1266 (grub_parser_class): New variable.
1267 (grub_parser_execute): New function declaration.
1268 (grub_register_rescue_parser): Likewise.
1269 (grub_parser_register): New inline function.
1270 (grub_parser_unregister): Likewise.
1271 (grub_parser_get_current): Likewise.
1272 (grub_parser_set_current): Likewise.
1274 * include/grub/reader.h: New file.
1275 * kern/reader.c: Likewise.
1276 * kern/rescue_parser.c: Likewise.
1277 * kern/rescue_reader.c: Likewise.
1278 * normal/autofs.c: Likewise.
1279 * normal/dyncmd.c: Likewise.
1281 * include/grub/rescue.h: Removed.
1282 * normal/command.h: Likewise.
1284 * include/grub/script.h: Moved to ...
1285 * include/grub/script_sh.h: ... Moved here.
1286 * normal/execute.c: Moved to ...
1287 * script/sh/execute.c: ... Moved here.
1288 * normal/function.c: Moved to ...
1289 * script/sh/function.c: ... Moved here.
1290 * normal/lexer.c: Moved to ...
1291 * script/sh/lexer.c: ... Moved here.
1292 * normal/parser.y: Moved to ...
1293 * script/sh/parser.y: ... Moved here.
1294 * normal/script.c: Moved to ...
1295 * script/sh/script.c: ... Moved here.
1297 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1299 (grub_exit_env): Removed.
1300 (fs_module_list): Moved to normal/autofs.c.
1301 (grub_file_getline): Don't handle comment here.
1302 (free_menu): Skip removed field entry->commands.
1303 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1305 (read_config_file): Removed nested parameter, change getline function.
1306 (grub_enter_normal_mode): Removed.
1307 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1308 (read_command_list): Likewise.
1309 (autoload_fs_module): Moved to normal/autofs.c.
1310 (read_fs_list): Likewise.
1311 (reader_nested): New variable.
1312 (grub_normal_execute): Run parser.sh to switch to sh parser.
1313 (grub_cmd_rescue): Removed.
1314 (cmd_normal): Removed.
1315 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1317 (grub_cmdline_run): New function.
1318 (grub_normal_reader_init): Likewise.
1319 (grub_normal_read_line): Likewise.
1320 (grub_env_write_pager): Likewise.
1321 (cmdline): New variable.
1322 (grub_normal_reader): Likewise.
1323 (GRUB_MOD_INIT): Register normal reader and set as current, register
1324 pager hook, register normal command with grub_register_command_prio,
1325 so that it won't show up in command.lst.
1326 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1327 grub_fs_autoload_hook.
1329 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1330 (grub_menu_execute_entry): Replace grub_script_execute with
1331 grub_parser_execute, change parameter to grub_command_execute.
1333 * normal/menu_text.c: Remove <grub/script.h>.
1335 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1336 and <grub/parser.h>.
1337 (run): Change editor_getline to use new parser interface. Change
1338 parameter to grub_command_execute.
1340 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1341 <grub/reader.h> and <grub/parser.h>.
1342 (grub_load_normal_mode): Execute normal command.
1343 (grub_main): Call grub_register_core_commands,
1344 grub_register_rescue_parser and grub_register_rescue_reader, use
1345 grub_reader_loop to enter input loop.
1347 * kern/parser.c (grub_parser_split_cmdline): Change type of
1349 (grub_parser_class): New variable.
1350 (grub_parser_execute): New function.
1352 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1353 * loader/multiboot2.c: Likewise.
1354 * loader/sparc64/ieee1275/linux.c: Likewise.
1356 * util/grub-emu.c (read_command_list): New dummy function.
1358 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1360 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1361 count to 16 for CCISS and IDA.
1363 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1365 * normal/menu_text.c (grub_wait_after_message): Print a newline
1366 after waiting for user input.
1368 * loader/i386/linux.c: Include `<grub/normal.h>'.
1369 (grub_cmd_linux): Improve the error message about `ask' mode, by
1370 waiting for user input so it's not missed (we can do this, since
1371 user requested interaction).
1373 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1375 Added missing lst to grub-mkrescue
1377 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1378 and ${input_dir}/parttool.lst
1380 2009-04-30 David S. Miller <davem@davemloft.net>
1382 * util/hostdisk.c (device_is_wholedisk): New function.
1383 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1384 zero only if device_is_wholedisk() returns true.
1386 * util/hostdisk.c (convert_system_partition_to_system_disk):
1387 Handle virtual disk devices named /dev/vdiskX as found on sparc
1390 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1391 lettered partition specifier is found, convert to numbered.
1393 2009-04-29 David S. Miller <davem@davemloft.net>
1395 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1396 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1398 * normal/command.c: Add missing newline at end of file.
1400 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1402 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1403 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1404 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1405 ihandles have a 32-bit type but need to be stored in a "void *".
1407 2009-04-28 Pavel Roskin <proski@gnu.org>
1409 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1410 not disk. Adjust all dependencies.
1411 (grub_fs_uuid_close): Use grub_device_close(), not
1414 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1415 parent's partition, don't copy it by reference, as it gets freed
1418 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1420 Preboot hooks support
1422 * commands/boot.c (struct grub_preboot_t): new declaration
1423 (preboots_head): new variable
1424 (preboots_tail): likewise
1425 (grub_loader_register_preboot_hook): new function
1426 (grub_loader_unregister_preboot_hook): likewise
1427 (grub_loader_set): launch preboot hooks
1428 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1429 (grub_loader_register_preboot_hook): new declaration
1430 (grub_loader_unregister_preboot_hook): likewise
1432 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1436 * disk/scsi.c (grub_scsi_open): added missing cast when
1437 calling grub_dprintf
1439 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1441 Bug and warning fixes
1443 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1445 * commands/test.c (test_parse): fixed bug with file tests and corrected
1446 declaration of find_file
1448 2009-04-26 Pavel Roskin <proski@gnu.org>
1450 * Makefile.in: Don't install empty manual pages if help2man is
1451 missing. Use help2man option for output, not shell redirection.
1453 2009-04-26 David S. Miller <davem@davemloft.net>
1455 * util/grub-mkdevicemap.c (make_device_map): Add missing
1456 NESTED_FUNC_ATTR to process_device().
1458 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1462 * commands/test.c: rewritten to use bash-like test
1464 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1466 Parttool autoloading and improvements
1468 * Makefile.in (pkglib_DATA): add parttool.lst
1469 (parttool.lst): new target
1470 * genmk.rb: generate parttool-*
1471 (CLEANFILES): add #{parttool}
1472 (PARTTOOLFILES): new variable
1473 * genparttoollist.sh: new file
1474 * parttool/pcpart.c (grub_pcpart_boot): more feedback
1475 (grub_pcpart_type): likewise
1476 * commands/parttool.c (helpmsg): new variable
1477 (grub_cmd_parttool): output help if not enough arguments are supplied
1479 (GRUB_MOD_INIT(parttool)): use helpmsg
1481 2009-04-24 David S. Miller <davem@davemloft.net>
1483 Avoiding opening same device multiple times in device iterator.
1485 * kern/device.c: (grub_device_iterate): Define struct part_ent,
1486 and use it to build a list of partitions in iterate_disk() and
1487 iterate_partition().
1489 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1492 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1493 grub_devalias_iterate() result instead of unconditional 0.
1494 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1495 Also, capture hook return value, either directly or via
1496 grub_children_iterate(), and propagate to caller.
1497 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1498 grub_children_iterate): Return value is now 'int' instead of
1500 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1501 like a proper iterator, stopping when hooks return non-zero.
1502 (grub_devalias_iterate): Likewise.
1504 2009-04-23 David S. Miller <davem@davemloft.net>
1506 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1508 2009-04-22 David S. Miller <davem@davemloft.net>
1510 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1511 is larger than address_cells, use that value for address_cells too.
1513 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1514 IEEE1275_MAX_PATH_LEN): Define.
1515 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1516 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1517 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1518 'devtype'. Explicitly NULL terminate devalias expansion.
1520 * util/sparc64/ieee1275/misc.c: New file.
1521 * util/sparc64/ieee1275/grub-setup.c: New file.
1522 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1523 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1524 * util/sparc64/ieee1275/grub-install.in: New file.
1525 * util/ieee1275/ofpath.c: New file.
1526 * util/ieee1275/devicemap.c: New file.
1527 * util/devicemap.c: New file.
1528 * util/deviceiter.c: New file.
1529 * kern/sparc64/ieee1275/init.c: New file.
1530 * include/grub/util/ofpath.h: New file.
1531 * include/grub/util/deviceiter.h: New file.
1532 * util/grub-mkdevicemap.c: Include deviceiter.h.
1533 Implement using grub_util_emit_devicemap_entry and
1534 grub_util_iterate_devices.
1535 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1536 util/devicemap.c into grub-mkdevicemap
1537 * conf/i386-efi.rmk: Likewise.
1538 * conf/i386-ieee1275.rmk: Likewise.
1539 * conf/i386-pc.rmk: Likewise.
1540 * conf/powerpc-ieee1275.rmk: Likewise.
1541 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1542 images and installation utilities. Build kernel as image
1543 instead of as elf binary. Use common rules as much as possible.
1545 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
1547 Correct GPT definition
1549 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1552 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
1554 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1556 2009-04-19 David S. Miller <davem@davemloft.net>
1558 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1559 (grub_rescue_cmd_linux): Rename to...
1560 (grub_cmd_linux): and fix prototype.
1561 (grub_rescue_cmd_initrd): Rename to...
1562 (grub_cmd_initrd): and fix prototype.
1563 (cmd_linux, cmd_initrd): New.
1564 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1565 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1567 2009-04-17 Pavel Roskin <proski@gnu.org>
1569 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1571 (grub_ohci_transfer): Likewise.
1573 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1575 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1576 return without a value. Fix inconsistent indentation.
1578 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1579 match struct grub_fs.
1581 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1582 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1583 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1584 * commands/lspci.c (grub_lspci_iter): Likewise.
1586 2009-04-16 Bean <bean123ch@gmail.com>
1588 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1591 2009-04-15 Pavel Roskin <proski@gnu.org>
1593 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1594 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1595 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1598 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1600 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1601 that no multiple data or metadata areas are supported and `Unknown
1604 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1606 Move loader out of the kernel
1608 * kern/loader.c: moved to ...
1609 * commands/boot.c: ... moved here
1610 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1611 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1612 * include/grub/kernel.h (grub_machine_fini): export
1613 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1614 (grub_loader_set): likewise
1615 (grub_loader_unset): likewise
1616 (grub_loader_boot): likewise
1617 * conf/common.rmk: new module boot.mod
1618 (pkglib_MODULES): add boot.mod
1619 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1620 (grub_emu_SOURCES): likewise
1621 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1622 (grub_emu_SOURCES): likewise
1623 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1624 (grub_emu_SOURCES): likewise
1625 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1626 (grub_emu_SOURCES): likewise
1627 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1628 (grub_emu_SOURCES): likewise
1629 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1630 (grub_emu_SOURCES): likewise
1631 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1632 (grub_emu_SOURCES): likewise
1634 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1636 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1638 * kern/misc.c (grub_itoa): Removed function
1639 (grub_ltoa): likewise
1640 (grub_vsprintf): use grub_lltoa
1642 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1646 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1647 * conf/i386-coreboot.rmk: likewise
1648 * conf/i386-ieee1275.rmk: likewise
1649 * conf/powerpc-ieee1275.rmk: likewise
1651 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1653 * INSTALL: Add that `./autogen.sh' needs to be run before
1656 2009-04-14 Bean <bean123ch@gmail.com>
1658 * Makefile.in (pkglib_DATA): Add handler.lst.
1659 (handler.lst): New rule.
1661 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1662 * conf/i386-coreboot.rmk: Likewise.
1663 * conf/i386-ieee1275.rmk: Likewise.
1664 * conf/i386-efi.rmk: Likewise.
1665 * conf/x86_64-efi.rmk: Likewise.
1666 * conf/powerpc-ieee1275.rmk: Likewise.
1667 * conf/sparc64-ieee1275.rmk: Likewise.
1669 * genhandlerlist.sh: New file.
1671 * genmk.rb: Add rules to generate handler.lst.
1673 * include/grub/normal.h (grub_file_getline): New function definition.
1674 (read_handler_list): Likewise.
1675 (free_handler_list): Likewise.
1677 * include/grub/term.h (grub_term_register_input): Add name parameter
1678 for auto generation of handler.lst.
1679 (grub_term_register_output): Likewise.
1681 * normal/handler.c: New file.
1683 * normal/main.c (get_line): Renamed to grub_file_getline.
1684 (read_config_file): Use the newly renamed grub_file_getline.
1685 (read_command_list): Likewise.
1686 (read_fs_list): Likewise.
1687 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1688 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1690 * term/efi/console.c (grub_console_init): Add name parameter for auto
1691 generation of handler.lst.
1692 * term/gfxterm.c: Likewise.
1693 * term/i386/pc/at_keyboard.c: Likewise.
1694 * term/i386/pc/console.c: Likewise.
1695 * term/i386/pc/serial.c: Likewise.
1696 * term/i386/pc/vesafb.c: Likewise.
1697 * term/i386/pc/vga.c: Likewise.
1698 * term/i386/pc/vga_text.c: Likewise.
1699 * term/ieee1275/ofconsole.c: Likewise.
1700 * term/usb_keyboard.c: Likewise.
1702 2009-04-14 Bean <bean123ch@gmail.com>
1704 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1705 properly with null character.
1707 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1709 * configure: Remove.
1710 * config.h.in: Likewise.
1711 * stamp-h.in: Likewise.
1712 * DISTLIST: Likewise.
1713 * conf/common.mk: Likewise.
1714 * conf/i386-coreboot.mk: Likewise.
1715 * conf/i386-efi.mk: Likewise.
1716 * conf/i386-ieee1275.mk: Likewise.
1717 * conf/i386.mk: Likewise.
1718 * conf/i386-pc.mk: Likewise.
1719 * conf/powerpc-ieee1275.mk: Likewise.
1720 * conf/sparc64-ieee1275.mk: Likewise.
1721 * conf/x86_64-efi.mk: Likewise.
1723 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1726 2009-04-14 John Stanley <jpsinthemix@verizon.net>
1727 David S. Miller <davem@davemloft.net>
1729 * util/hostdisk.c (make_device_name): Fix buffer length
1732 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1734 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1735 <sys/param.h> and <sys/sysctl.h>.
1736 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1737 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1738 opening the device and reset them afterwards.
1740 2009-04-13 Pavel Roskin <proski@gnu.org>
1742 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1743 Reported by John Stanley <jpsinthemix@verizon.net>
1745 2009-04-13 Robert Millan <rmh@aybabtu.com>
1747 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1748 that name for menuentries when appropriate.
1750 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1752 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1754 2009-04-13 Robert Millan <rmh@aybabtu.com>
1756 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1757 to Linux, simply abort telling the user it's no longer supported.
1759 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1761 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1762 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
1763 `freebsd_loadenv' only when devices.hints exist.
1765 2009-04-13 Pavel Roskin <proski@gnu.org>
1767 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1769 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1771 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1773 (grub_drive): Likewise.
1775 2009-04-13 David S. Miller <davem@davemloft.net>
1777 * kern/sparc64/ieee1275/ieee1275.c: New file.
1778 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1779 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1780 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1781 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1782 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1783 grub_ieee1275_alloc_physmem): Declare new exported functions.
1785 * include/grub/sparc64/ieee1275/loader.h: New file.
1786 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1787 * include/grub/sparc64/kernel.h: Likewise.
1788 * loader/sparc64/ieee1275/linux.c: Likewise.
1790 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1791 (grub_fstest_SOURCES): Likewise.
1793 * util/hostdisk.c (make_device_name): Do not make any assumptions
1794 about the length of drive names.
1796 * kern/dl.c (grub_dl_load_file): Close file immediately when
1797 we are done using it.
1799 2009-04-12 David S. Miller <davem@davemloft.net>
1801 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1802 values. Noticed by Pavel Roskin.
1804 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1807 * genmk.rb: Add more flexible image type specification, also
1808 pass --strip-unneeded to objcopy.
1809 * conf/i386-pc.rmk: Use *_FORMAT.
1810 * conf/i386-pc.mk: Rebuilt.
1812 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1813 (OFDISK_HASH_SZ): Define.
1814 (ofdisk_hash): New hash table.
1815 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1816 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1817 instead of device phandle which is not unique.
1819 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1820 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1821 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1822 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1823 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1824 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1825 GRUB_KERNEL_MACHINE_DATA_END): Define.
1826 (grub_kernel_image_size, grub_total_module_size): Declare.
1828 2009-04-12 Pavel Roskin <proski@gnu.org>
1830 * configure.ac: Change the logic when we check for target tools.
1831 Do it when the target is specified and it's different from the
1832 specified value of the host.
1834 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1836 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1837 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1838 GNU/kFreeBSD. Check if a device is a character device. Use
1839 DIOCGMEDIASIZE to get the size.
1840 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1841 support for GNU/kFreeBSD.
1842 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1843 is a character device instead of a block device. Add support for
1844 FreeBSD device names.
1846 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1847 is a character device instead of a block device.
1849 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1850 is a character device instead of a block device.
1852 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1854 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1855 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1856 FreeBSD. Check if a device is a character device. Use
1857 DIOCGMEDIASIZE to get the size.
1858 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1859 support for FreeBSD.
1860 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1861 is a character device instead of a block device. Add support for
1862 FreeBSD device names.
1864 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1865 a character device instead of a block device.
1866 (grub_util_check_char_device): New function.
1868 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1869 a character device instead of a block device.
1871 * include/grub/util/getroot.h (grub_util_check_char_device): New
1874 2009-04-11 David S. Miller <davem@davemloft.net>
1876 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1878 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1879 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1880 function, if present.
1881 (__bswapdi2): Likewise.
1883 * include/grub/sparc64/ieee1275/boot.h: New file.
1884 * boot/sparc64/ieee1275/boot.S: Likewise.
1885 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1887 * kern/misc.c (grub_ltoa): New function.
1888 (grub_vsprintf): Use it to format 'long' integers.
1890 2009-04-10 David S. Miller <davem@davemloft.net>
1892 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1893 slots are of type grub_ieee1275_cell_t.
1894 (grub_nand_read): Likewise.
1895 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1896 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1897 macros are used to compare values in arg/ret block of the call.
1898 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1899 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1900 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1901 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1902 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1903 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1904 grub_ieee1275_close, grub_ieee1275_set_property,
1905 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1906 grub_ieee1275_cell_t.
1907 * kern/ieee1275/openfw.c (grub_map): Likewise.
1908 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1909 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1911 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1912 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1913 (grub_devalias_iterate): Likewise.
1915 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
1919 * fs/ufs.c (INODE_NBLOCKS): new definition
1920 (struct grub_ufs_dirent): added fields for non-BSD dirents
1921 (grub_ufs_get_file_block): fixed double indirect handling
1922 (grub_ufs_lookup_symlink): use more robust way to determine whether
1924 (grub_ufs_find_file): support for non-BSD dirents
1925 (grub_ufs_dir): support for non-BSD dirents
1927 2009-04-10 Bean <bean123ch@gnail.com>
1929 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1930 attribute, otherwise the size would be wrong for i386 platform.
1932 * include/grub/pci.h (grub_pci_read_word): New inline function.
1933 (grub_pci_read_byte): Likewise.
1934 (grub_pci_write): Likewise.
1935 (grub_pci_write_word): Likewise.
1936 (grub_pci_write_byte): Likewise.
1938 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1940 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1941 (find_framebuf): Scan pci to locate the frame buffer address.
1943 * commands/efi/fixvideo.c: New file.
1945 * commands/efi/loadbios.c: Likewise.
1947 * commands/memrw.c: Likewise.
1949 * util/grub-dumpbios.in: Likewise.
1951 * conf/common.rmk (grub-dumpbios): New utility.
1952 (pkglib_MODULES): New module memrw.mod.
1953 (memrw_mod_SOURCE): New macro.
1954 (memrw_mod_CFLAGS): Likewise.
1955 (memrw_mod_LDFLAGS): Likewise.
1957 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1959 (loadbios_mod_SOURCE): New macro.
1960 (loadbios_mod_CFLAGS): Likewise.
1961 (loadbios_mod_LDFLAGS): Likewise.
1962 (fixvideo_mod_SOURCE): Likewise.
1963 (fixvideo_mod_CFLAGS): Likewise.
1964 (fixvideo_mod_LDFLAGS): Likewise.
1966 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1968 (loadbios_mod_SOURCE): New macro.
1969 (loadbios_mod_CFLAGS): Likewise.
1970 (loadbios_mod_LDFLAGS): Likewise.
1971 (fixvideo_mod_SOURCE): Likewise.
1972 (fixvideo_mod_CFLAGS): Likewise.
1973 (fixvideo_mod_LDFLAGS): Likewise.
1975 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
1977 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1979 2009-04-07 David S. Miller <davem@davemloft.net>
1981 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1982 support for R_SPARC_OLO10 relocations. Fix compile warning for
1983 R_SPARC_WDISP30 case.
1984 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1986 2009-04-06 Pavel Roskin <proski@gnu.org>
1988 * include/grub/misc.h (ARRAY_SIZE): New macro.
1989 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1991 * loader/i386/linux.c (allocate_pages): Use free_pages().
1992 (grub_linux_unload): Don't use free_pages().
1993 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1994 wrong index. Treat all other modes as text modes.
1995 (grub_cmd_linux): Initialize vid_mode unconditionally to
1996 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1998 * commands/help.c (print_command_help): Use cmd->prio, not
1999 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2001 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2005 * parttool/pcpart.c: new file
2006 * commands/parttool.c: likewise
2007 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2008 (parttool_mod_SOURCES): new variable
2009 (parttool_mod_CFLAGS): likewise
2010 (parttool_mod_LDFLAGS): likewise
2011 (pcpart_mod_SOURCES): likewise
2012 (pcpart_mod_CFLAGS): likewise
2013 (pcpart_mod_LDFLAGS): likewise
2014 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2015 and parttool/pcpart.c
2016 * conf/i386-efi.rmk: likewise
2017 * conf/i386-ieee1275.rmk: likewise
2018 * conf/i386-pc.rmk: likewise
2019 * conf/powerpc-ieee1275.rmk: likewise
2020 * conf/sparc64-ieee1275.rmk: likewise
2021 * conf/x86_64-ieee1275.rmk: likewise
2023 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2025 Support for mtime and further expandability of dir command
2027 * include/grub/lib/datetime.h: moved to ...
2028 * include/grub/datetime.h: ... moved here and added
2029 declaration of grub_unixtime2datetime. All users updated
2030 * include/grub/fs.h: new syntax for dir and mtime functions in
2032 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2033 and GRUB_FSHELP_FLAGS_MASK
2034 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2035 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2036 (grub_ext2_mtime): new function
2037 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2038 (grub_hfsplus_mtime): new function
2039 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2040 (GRUB_UFS_ATTR_FILE): likewise
2041 (GRUB_UFS_ATTR_LNK): likewise
2042 (struct grub_ufs_sblock): new fields mtime
2043 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2045 (grub_ufs_dir): mtime support
2046 (grub_ufs_mtime): new function
2047 * fs/affs.c (grub_affs_dir): use new dir syntax
2048 * fs/afs.c (grub_afs_dir): likewise
2049 * fs/cpio.c (grub_cpio_dir): likewise
2050 * fs/fat.c (grub_fat_find_dir): likewise
2051 * fs/hfs.c (grub_hfs_dir): likewise
2052 * fs/iso9660.c (grub_iso9660_dir): likewise
2053 * fs/jfs.c (grub_jfs_dir): likewise
2054 * fs/minix.c (grub_minix_dir): likewise
2055 * fs/ntfs.c (grub_ntfs_dir): likewise
2056 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2057 * fs/sfs.c (grub_sfs_dir): likewise
2058 * fs/xfs.c (grub_xfs_dir): likewise
2059 * util/hostfs.c (grub_hostfs_dir): likewise
2060 * lib/datetime.c: moved to ...
2061 * normal/datetime.c: ... moved here
2062 (grub_unixtime2datetime): new function
2063 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2064 * normal/completion.c (iterate_dir): use new dir syntax
2065 * normal/misc.c (grub_normal_print_device_info): tell the
2066 last modification time of a volume
2067 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2068 * conf/common.rmk: added lib/datetime.c to ls.mod
2069 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2070 (normal_mod_SOURCES): likewise
2071 (datetime_mod_SOURCES): Removed lib/datetime.c
2072 * conf/i386-efi.rmk: likewise
2073 * conf/i386-ieee1275.rmk: likewise
2074 * conf/i386-pc.rmk: likewise
2075 * conf/powerpc-ieee1275.rmk: likewise
2076 * conf/sparc64-ieee1275.rmk: likewise
2077 * conf/x86_64-efi.rmk: likewise
2079 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2081 Trim trailing spaces in FAT label and support mtools-like labels
2083 * fs/fat.c (grub_fat_iterate_dir): New function based
2084 on grub_fat_find_dir
2085 (grub_fat_find_dir): use grub_fat_iterate_dir
2086 (grub_fat_label): likewise
2088 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2090 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2092 remove extraneous kernel_elf_HEADERS
2094 2009-04-04 Bean <bean123ch@gnail.com>
2096 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2098 * util/misc.c: Likewise.
2100 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2102 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2103 instead of grub_printf.
2105 2009-04-03 Robert Millan <rmh@aybabtu.com>
2107 * loader/i386/linux.c (grub_linux_setup_video): Fill
2108 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2109 values from `mode info' structure instead of hardcoded
2112 2009-04-01 Pavel Roskin <proski@gnu.org>
2114 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2116 * genmk.rb: Likewise.
2117 * configure.ac: Likewise.
2119 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2121 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2122 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2124 2009-04-01 David S. Miller <davem@davemloft.net>
2126 * normal/sparc64/setjmp.S: Fix setjmp implementation.
2127 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2128 (grub_setjmp): Mark with 'returns_twice' attribute.
2129 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2130 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2131 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2133 2009-04-01 Robert Millan <rmh@aybabtu.com>
2135 Reapply fix from 2008-07-28 which was accidentally reverted; also
2136 perform the same fix to a similar check in same function.
2138 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2139 with the same number are found, just use issue a warning with
2140 grub_dprintf(), as this error has been reported to be non-fatal.
2142 2009-03-31 Pavel Roskin <proski@gnu.org>
2144 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2145 for cross-compilation.
2147 2009-03-30 Robert Millan <rmh@aybabtu.com>
2149 Fix i386-ieee1275 build.
2151 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2154 2009-03-30 Pavel Roskin <proski@gnu.org>
2156 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2157 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2158 zero-terminated, rely only on the strlen value. Fix comparison
2159 of strings differing in length.
2161 2009-03-30 Robert Millan <rmh@aybabtu.com>
2163 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2164 checking for abi version. Improve error messages on BIOS to notify
2165 user about `linux16' command.
2167 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2171 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2172 in case of collision
2173 * disk/scsi.c (grub_scsi_open): free scsi in case of error
2175 2009-03-29 Robert Millan <rmh@aybabtu.com>
2177 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2178 set `vid_mode' accordingly.
2179 (grub_linux_boot): Process `vid_mode' and set video mode.
2181 2009-03-29 Robert Millan <rmh@aybabtu.com>
2183 * util/grub.d/10_linux.in (linux_entry): New function.
2184 Factorize generation of Linux boot entries.
2186 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2188 Make the format of Environment Block plain text. The boot loader
2189 part is not tested well yet.
2191 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2194 (usage): Remove "info" and "clear". Add "unset". Update the
2195 description of "set", as this does not delete variables any
2197 (create_envblk_file): Complete rewrite.
2198 (open_envblk_file): Likewise.
2199 (cmd_info): Removed.
2200 (cmd_list): Likewise.
2201 (cmd_set): Likewise.
2202 (cmd_clear): Likewise.
2203 (list_variables): New function.
2204 (write_envblk): Likewise.
2205 (set_variables): Likewise.
2206 (unset_variables): Likewise.
2207 (main): Complete rewrite.
2209 * commands/loadenv.c (buffer): Removed.
2211 (open_envblk_file): New function.
2212 (read_envblk_file): Complete rewrite.
2213 (grub_cmd_load_env): Likewise.
2214 (grub_cmd_list_env): Likewise.
2215 (struct blocklist): New struct.
2216 (free_blocklists): New function.
2217 (check_blocklists): Likewise.
2218 (write_blocklists): Likewise.
2219 (grub_cmd_save_env): Complete rewrite.
2221 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2222 a plain text signature.
2223 (GRUB_ENVBLK_MAXLEN): Removed.
2224 (struct grub_envblk): Complete rewrite.
2225 (grub_envblk_find): Removed.
2226 (grub_envblk_insert): Likewise.
2227 (grub_envblk_open): New prototype.
2228 (grub_envblk_set): Likewise.
2229 (grub_envblk_delete): Put const to VALUE.
2230 (grub_envblk_iterate): Put const to NAME and VALUE.
2231 (grub_envblk_close): New prototype.
2232 (grub_envblk_buffer): New inline function.
2233 (grub_envblk_size): Likewise.
2235 * lib/envblk.c: Include grub/mm.h.
2236 (grub_env_find): Removed.
2237 (grub_envblk_open): New function.
2238 (grub_envblk_close): Likewise.
2239 (escaped_value_len): Likewise.
2240 (find_next_line): Likewise.
2241 (grub_envblk_insert): Removed.
2242 (grub_envblk_set): New function.
2243 (grub_envblk_delete): Complete rewrite.
2244 (grub_envblk_iterate): Likewise.
2246 2009-03-28 Robert Millan <rmh@aybabtu.com>
2248 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2249 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2250 variables. Use 16-bit loader.
2251 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2253 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2254 (grub_linux16_boot): ... this. Update all users.
2255 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2256 (grub_linux_boot): ... this. Update all users.
2258 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2259 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2260 commands to `linux16' and `initrd16'.
2261 (GRUB_MOD_FINI(linux)): Rename to ...
2262 (GRUB_MOD_FINI(linux16)): ... this.
2264 2009-03-24 Pavel Roskin <proski@gnu.org>
2266 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2267 not just for compilation.
2269 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2271 Move multiboot helper out of kernel
2273 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2274 `loader/i386/multiboot_helper.S'.
2275 * conf/i386-coreboot.rmk: Likewise
2276 * conf/i386-ieee1275.rmk: Likewise
2278 * kern/i386/loader.S: Move multiboot helpers from here...
2279 * loader/i386/multiboot_helper.S: ...moved here
2280 * include/grub/i386/loader.h: Move declarations of multiboot
2281 helpers from here...
2282 * include/grub/i386/multiboot.h: ...moved here
2283 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2285 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2287 * kern/env.c (grub_env_context_open): Added an argument to specify
2288 whether a new context inherits exported variables from current
2289 one. This is useful when making a sandbox to interpret a config
2291 All callers updated.
2293 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2295 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2297 * kern/env.c (grub_env_context_close): Fix memory leaks.
2299 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2301 * normal/main.c (grub_normal_execute): Added an argument
2302 BATCH to specify if an interactive interface should be provided
2303 after reading a config file.
2304 All callers updated.
2305 (read_command_list): Prevent being executed twice.
2306 (read_fs_list): Likewise.
2308 * include/grub/normal.h (grub_normal_execute): Updated the
2311 2009-03-22 Pavel Roskin <proski@gno.org>
2313 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2315 * kern/i386/pc/startup.S: Likewise.
2316 * kern/i386/efi/startup.S: Likewise.
2317 * kern/i386/ieee1275/startup.S: Likewise.
2318 * kern/i386/coreboot/startup.S: Likewise.
2319 * kern/x86_64/efi/startup.S: Likewise.
2321 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2322 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2323 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2325 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2327 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2329 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2331 Use vaddr of correct segment for entry_point.
2333 2009-03-21 Bean <bean123ch@gmail.com>
2335 * commands/blocklist.c: Add include file <grub/command.h>, remove
2336 <grub/normal.h> and <grub/arg.h>.
2337 (grub_cmd_blocklist): Use the new command interface.
2338 (GRUB_MOD_INIT): Likewise.
2339 (GRUB_MOD_FINI): Likewise.
2340 * commands/boot.c: Likewise.
2341 * commands/cat.c: Likewise.
2342 * commands/cmp.c: Likewise.
2343 * commands/configfile.c: Likewise.
2344 * commands/crc.c: Likewise.
2345 * commands/echo.c: Likewise.
2346 * commands/halt.c: Likewise.
2347 * commands/handler.c: Likewise.
2348 * commands/hdparm.c: Likewise.
2349 * commands/help.c: Likewise.
2350 * commands/hexdump.c: Likewise.
2351 * commands/loadenv.c: Likewise.
2352 * commands/ls.c: Likewise.
2353 * commands/lsmmap.c: Likewise.
2354 * commands/lspci.c: Likewise.
2355 * commands/loadenv.c: Likewise.
2356 * commands/read.c: Likewise.
2357 * commands/reboot.c: Likewise.
2358 * commands/search.c: Likewise.
2359 * commands/sleep.c: Likewise.
2360 * commands/test.c: Likewise.
2361 * commands/usbtest.c: Likewise.
2362 * commands/videotest.c: Likewise.
2363 * commands/i386/cpuid.c: Likewise.
2364 * commands/i386/pc/halt.c: Likewise.
2365 * commands/i386/pc/play.c: Likewise.
2366 * commands/i386/pc/pxecmd.c: Likewise.
2367 * commands/i386/pc/vbeinfo.c: Likewise.
2368 * commands/i386/pc/vbetest.c: Likewise.
2369 * commands/ieee1275/suspend.c: Likewise.
2370 * disk/loopback.c: Likewise.
2371 * font/font_cmd.c: Likewise.
2372 * hello/hello.c: Likewise.
2373 * loader/efi/appleloader.c: Likewise.
2374 * loader/efi/chainloader.c: Likewise.
2375 * loader/i386/bsd.c: Likewise.
2376 * loader/i386/efi/linux.c: Likewise.
2377 * loader/i386/ieee1275/linux.c: Likewise.
2378 * loader/i386/linux.c: Likewise.
2379 * loader/i386/pc/chainloader.c: Likewise.
2380 * loader/i386/pc/linux.c: Likewise.
2381 * loader/powerpc/ieee1275/linux.c: Likewise.
2382 * loader/multiboot_loader.c: Likewise.
2383 * term/gfxterm.c: Likewise.
2384 * term/i386/pc/serial.c: Likewise.
2385 * term/terminfo.c: Likewise.
2387 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2388 * term/i386/pc/vga.c: Likewise.
2389 * video/readers/jpeg.c: Likewise.
2390 * video/readers/png.c: Likewise.
2391 * video/readers/tga.c: Likewise.
2393 * util/grub-fstest (cmd_loopback): Removed.
2394 (cmd_blocklist): Likewise.
2396 (grub_register_command): Likewise.
2397 (grub_unregister_command): Likewise.
2398 (execute_command): Use grub_command_find to locate command and execute
2401 * include/grub/efi/chainloader.h: Removed.
2402 * loader/efi/chainloader_normal.c: Likewise.
2403 * loader/i386/bsd_normal.c: Likewise.
2404 * loader/i386/pc/chainloader_normal.c: Likewise.
2405 * loader/i386/pc/multiboot_normal.c: Likewise.
2406 * loader/linux_normal.c: Likewise.
2407 * loader/multiboot_loader_normal.c: Likewise.
2408 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2410 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2411 and grub_register_command_p1.
2413 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2414 kern/command.c, lib/arg.c and commands/extcmd.c.
2415 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2416 (minicmd_mod_SOURCES): New variable.
2417 (minicmd_mod_CFLAGS): Likewise.
2418 (minicmd_mod_LDFLAGS): Likewise.
2419 (extcmd_mod_SOURCES): Likewise.
2420 (extcmd_mod_CFLAGS): Likewise.
2421 (extcmd_mod_LDFLAGS): Likewise.
2422 (boot_mod_SOURCES): Removed.
2423 (boot_mod_CFLAGS): Likewise.
2424 (boot_mod_LDFLAGS): Likewise.
2426 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2428 (kernel_img_HEADERS): Add command.h.
2429 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2430 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2432 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2433 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2434 remove the corresponding normal mode command.
2435 (normal_mod_SOURCES): Remove normal/arg.c.
2436 * conf/i386-coreboot.rmk: Likewise.
2437 * conf/i386-efi.rmk: Likewise.
2438 * conf/i386-ieee1275.rmk: Likewise.
2439 * conf/powerpc-ieee1275.rmk: Likewise.
2440 * conf/x86_64-efi.rmk: Likewise.
2442 * include/grub/arg.h: Move from here ...
2443 * include/grub/lib/arg.h: ... to here.
2445 * normal/arg.c: Move from here ...
2446 * lib/arg.c: ... to here.
2448 * commands/extcmd.c: New file.
2449 * commands/minicmd.c: Likewise.
2450 * include/grub/command.h: Likewise.
2451 * include/grub/extcmd.h: Likewise.
2452 * kern/command.c: Likewise.
2453 * kern/corecmd.c: Likewise.
2455 * kern/list.c (grub_list_iterate): Return int instead of void.
2456 (grub_list_insert): New function.
2457 (grub_prio_list_insert): Likewise.
2459 * kern/rescue.c (grub_rescue_command): Removed.
2460 (grub_rescue_command_list): Likewise.
2461 (grub_rescue_register_command): Likewise.
2462 (grub_rescue_unregister_command): Likewise.
2463 (grub_rescue_cmd_boot): Move to minicmd.c
2464 (grub_rescue_cmd_help): Likewise.
2465 (grub_rescue_cmd_info): Likewise.
2466 (grub_rescue_cmd_boot): Likewise.
2467 (grub_rescue_cmd_testload): Likewise.
2468 (grub_rescue_cmd_dump): Likewise.
2469 (grub_rescue_cmd_rmmod): Likewise.
2470 (grub_rescue_cmd_lsmod): Likewise.
2471 (grub_rescue_cmd_exit): Likewise.
2472 (grub_rescue_print_devices): Moved to corecmd.c.
2473 (grub_rescue_print_files): Likewise.
2474 (grub_rescue_cmd_ls): Likewise.
2475 (grub_rescue_cmd_insmod): Likewise.
2476 (grub_rescue_cmd_set): Likewise.
2477 (grub_rescue_cmd_unset): Likewise.
2478 (attempt_normal_mode): Use grub_command_find to get normal module.
2479 (grub_enter_rescue_mode): Use grub_register_core_commands to register
2480 commands, remove grub_rescue_register_command calls.
2482 * normal/command.c (grub_register_command): Removed.
2483 (grub_unregister_command): Likewise.
2484 (grub_command_find): Likewise.
2485 (grub_iterate_commands): Likewise.
2486 (rescue_command): Likewise.
2487 (export_command): Moved to corecmd.c.
2488 (set_command): Removed.
2489 (unset_command): Likewise.
2490 (insmod_command): Likewise.
2491 (rmmod_command): Likewise.
2492 (lsmod_command): Likewise.
2493 (grub_command_init): Likewise.
2495 * normal/completion.c (iterate_command): Use cmd->prio to check for
2497 (complete_arguments): Use grub_extcmd_t structure to find options.
2498 (grub_normal_do_completion): Change function grub_iterate_commands to
2499 grub_command_iterate.
2501 * normal/execute.c (grub_script_execute_cmd): No need to parse
2504 * normal/main.c (grub_dyncmd_dispatcher): New function.
2505 (read_command_list): Register unload commands as dyncmd.
2506 (grub_cmd_normal): Use new command interface, register rescue,
2507 unregister normal at entry, register normal, unregister rescue at exit.
2509 * include/grub/list.h (grub_list_test_t): New type.
2510 (grub_list_iterate): Return int instead of void.
2511 (grub_list_insert): New function.
2512 (GRUB_AS_NAMED_LIST_P): New macro.
2513 (GRUB_AS_PRIO_LIST): Likewise.
2514 (GRUB_AS_PRIO_LIST_P): Likewise.
2515 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2516 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2517 (grub_prio_list): New structure.
2518 (grub_prio_list_insert): New function.
2519 (grub_prio_list_remove): New inline function.
2521 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2522 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2523 (GRUB_COMMAND_FLAG_MENU): Likewise.
2524 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2525 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2526 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2527 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2528 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2529 (grub_command): Likewise.
2530 (grub_register_command): Likewise.
2531 (grub_command_find): Likewise.
2532 (grub_iterate_commands): Likewise.
2533 (grub_command_init): Likewise.
2534 (grub_arg_parse): Likewise.
2535 (grub_arg_show_help): Likewise.
2537 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2538 (grub_rescue_unregister_command): Likewise.
2540 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2541 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2542 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2544 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2545 grub_rescue_cmd_initrd.
2546 * include/grub/i386/loader.h: Likewise.
2547 * include/grub/x86_64/loader.h: Likewise.
2549 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2551 2009-03-21 Bean <bean123ch@gmail.com>
2553 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2554 instead of stat in mingw environment.
2556 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2558 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2560 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2563 2009-03-21 Bean <bean123ch@gmail.com>
2565 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2568 2009-03-18 Michel Dänzer <michel@daenzer.net>
2570 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2571 checking inode flags for EXT4_EXTENTS_FLAG.
2573 2009-03-18 Robert Millan <rmh@aybabtu.com>
2575 * loader/i386/linux.c: Include `<grub/video.h>' and
2576 `<grub/i386/pc/vbe.h>'..
2577 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2578 (grub_linux32_boot): Attempt to configure video settings with
2579 grub_linux_setup_video().
2580 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2581 to avoid grub_console_fini() which would step out of graphical mode
2584 2009-03-14 Robert Millan <rmh@aybabtu.com>
2586 Fix build on powerpc.
2587 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2589 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2591 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2592 background image command.
2594 2009-03-12 Colin D Bennett <colin@gibibit.com>
2596 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2597 (grub_gfxterm_putchar): Extract pairs of identical calls to
2598 draw_cursor out of conditional blocks.
2600 2009-03-11 Pavel Roskin <proski@gnu.org>
2602 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2603 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2605 2009-03-11 Robert Millan <rmh@aybabtu.com>
2607 * loader/i386/multiboot_elfxx.c
2608 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2610 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
2612 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2615 2009-03-11 Robert Millan <rmh@aybabtu.com>
2617 * loader/i386/multiboot.c (code_size): New variable.
2618 (grub_multiboot): Define offsets by adding to `code_size' rather
2619 than subtracting from `grub_multiboot_payload_size'. Provide
2620 4-byte alignment to MBI and others by increasing
2621 `boot_loader_name_length' appropriately.
2623 * loader/i386/multiboot_elfxx.c
2624 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2626 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
2628 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2631 2009-03-08 Robert Millan <rmh@aybabtu.com>
2633 Make loader/i386/linux.c usable on i386-pc again.
2635 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2637 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2640 2009-03-07 Bean <bean123ch@gmail.com>
2642 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2645 2009-03-06 Robert Millan <rmh@aybabtu.com>
2647 Fix display issue on terminals with screen size other than 80x25
2648 (e.g. gfxterm with resolution higher than 640x480).
2650 * normal/main.c (grub_normal_init_page): Display title text in a
2651 position relative to the center of the terminal instead of relying
2652 on a hardcoded offset.
2654 2009-03-04 Robert Millan <rmh@aybabtu.com>
2656 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2659 * Makefile.in (host_kernel): New variable.
2660 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2661 scripts instead of just the windows one.
2662 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2664 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2666 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2668 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2669 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2670 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2671 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2672 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2673 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2675 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2677 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2678 or if there's no space for the disk label and print the partition number on a
2681 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2683 * util/misc.c: Include <time.h>.
2684 (grub_millisleep): New function.
2686 2009-03-04 Bean <bean123ch@gmail.com>
2688 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2689 another option -mno-red-zone.
2691 * commands/handler.c: Change module description.
2693 * kern/handler.c: Add missing space at the end of description line.
2695 * kern/list.c: Likewise.
2697 2009-03-03 Robert Millan <rmh@aybabtu.com>
2699 Move more components to the relocation area, and fix mbi pointer
2700 handling to use the destination rather than the origin (thanks to
2701 Vladimir Serbinenko for spotting).
2703 * loader/i386/multiboot.c (mbi_dest): New variable.
2704 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2705 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2708 2009-03-01 Bean <bean123ch@gmail.com>
2710 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2711 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2712 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2713 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2715 * loader/i386/efi/linux.c (acpi_guid): New variable.
2716 (acpi_guid): Likewise.
2717 (EBDA_SEG_ADDR): New constant.
2718 (LOW_MEM_ADDR): Likewise.
2719 (FAKE_EBDA_SEG): Likewise.
2720 (fake_bios_data): New function.
2721 (grub_linux_boot): Call fake_bios_data.
2723 2009-03-01 Bean <bean123ch@gmail.com>
2725 * commands/terminal.c: Removed.
2727 * commands/handler.c: New file.
2729 * include/grub/list.h: Likewise.
2731 * include/grub/handler.h: Likewise.
2733 * kern/list.c: Likewise.
2735 * kern/handler.c: Likewise.
2737 * kern/term.h: Include header file <grub/handler.h>.
2738 (grub_term_input): Move next field to the beginning.
2739 (grub_term_output): Likewise.
2740 (grub_term_input_class): New variable.
2741 (grub_term_output_class): Likewise.
2742 (grub_term_register_input): Changed to inline function.
2743 (grub_term_register_output): Likewise.
2744 (grub_term_unregister_input): Likewise.
2745 (grub_term_unregister_output): Likewise.
2746 (grub_term_set_current_input): Likewise.
2747 (grub_term_set_current_output): Likewise.
2748 (grub_term_get_current_input): Likewise.
2749 (grub_term_get_current_output): Likewise.
2750 (grub_term_iterate_input): Removed.
2751 (grub_term_iterate_output): Likewise.
2753 * kern/term.c (grub_term_list_input): Removed.
2754 (grub_term_list_output): Likewise.
2755 (grub_term_input_class): New variable.
2756 (grub_term_output_class): Likewise.
2757 (grub_cur_term_input): Change variable as macro.
2758 (grub_cur_term_output): Likewise.
2759 (grub_term_register_input): Removed.
2760 (grub_term_register_output): Likewise.
2761 (grub_term_unregister_input): Likewise.
2762 (grub_term_unregister_output): Likewise.
2763 (grub_term_set_current_input): Likewise.
2764 (grub_term_set_current_output): Likewise.
2765 (grub_term_iterate_input): Likewise.
2766 (grub_term_iterate_output): Likewise.
2767 (grub_term_get_current_input): Likewise.
2768 (grub_term_get_current_output): Likewise.
2770 * util/grub-editenv.c: Include header file <grub/handler.h>.
2771 (grub_term_get_current_input): Removed.
2772 (grub_term_get_current_output): Likewise.
2773 (grub_term_input_class): New variable.
2774 (grub_term_output_class): Likewise.
2776 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2777 (grub_term_get_current_output): Likewise.
2778 (grub_term_input_class): New variable.
2779 (grub_term_output_class): Likewise.
2781 * util/grub-probe.c (grub_term_get_current_input): Removed.
2782 (grub_term_get_current_output): Likewise.
2783 (grub_term_input_class): New variable.
2784 (grub_term_output_class): Likewise.
2786 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2787 (grub_term_get_current_output): Likewise.
2788 (grub_term_input_class): New variable.
2789 (grub_term_output_class): Likewise.
2791 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2792 (terminal_mod_SOURCES): Likewise.
2793 (terminal_mod_CFLAGS): Likewise.
2794 (terminal_mod_LDFLAGS): Likewise.
2796 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2798 (kernel_img_SOURCES): Add list.c and handler.c.
2799 (kernel_img_HEADERS): Add list.h and handler.h.
2801 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2803 (kernel_mod_SOURCES): Add list.c and handler.c.
2804 (kernel_mod_HEADERS): Add list.h and handler.h.
2806 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2808 (kernel_elf_SOURCES): Add list.c and handler.c.
2809 (kernel_elf_HEADERS): Add list.h and handler.h.
2811 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2813 (kernel_elf_SOURCES): Add list.c and handler.c.
2814 (kernel_elf_HEADERS): Add list.h and handler.h.
2816 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2818 (kernel_mod_SOURCES): Add list.c and handler.c.
2819 (kernel_mod_HEADERS): Add list.h and handler.h.
2821 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2823 (kernel_elf_SOURCES): Add list.c and handler.c.
2824 (kernel_elf_HEADERS): Add list.h and handler.h.
2826 2009-02-27 Robert Millan <rmh@aybabtu.com>
2828 Factorize elf32 / elf64 code in Multiboot loader. This will
2829 prevent it from getting out of sync again.
2831 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2832 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2833 grub_multiboot_load_elf64): Move from here ...
2834 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2835 grub_multiboot_load_elf): ... to here (new file).
2837 2009-02-27 Robert Millan <rmh@aybabtu.com>
2839 * util/grub.d/10_linux.in: Rename "single-user mode" to
2842 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2844 Don't leak in SCSI code.
2845 * disk/scsi.c (grub_scsi_close): free `scsi'.
2847 2009-02-27 Robert Millan <rmh@aybabtu.com>
2849 * loader/i386/pc/multiboot.c: Move from here ...
2850 * loader/i386/multiboot.c: ... to here. Update all users.
2852 2009-02-27 Robert Millan <rmh@aybabtu.com>
2854 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2855 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2857 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2859 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2862 2009-02-27 Robert Millan <rmh@aybabtu.com>
2864 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2865 `0x' qualifier as 0 when base is specified as parameter).
2867 2009-02-24 Bean <bean123ch@gmail.com>
2869 * configure.ac: Check for -mcmodel=large in x86_64 target.
2871 * include/grub/efi/api.h (efi_call_10): New macro.
2872 (efi_wrap_10): New function.
2874 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2875 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2876 (GRUB_PE32_REL_BASED_LOW): Likewise.
2877 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2878 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2879 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2880 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2881 (GRUB_PE32_REL_BASED_REL): Likewise.
2882 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2883 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2884 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2886 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2889 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2890 (efi_wrap_10): New function.
2892 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2894 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2895 MB/MBP model (NV chipset).
2896 (devdata_devs): Add devpath_5 to the list.
2898 * load/i386/efi/linux.c (video_base): Remove variable.
2899 (RGB_MASK): New macro.
2900 (RGB_MAGIC): Likewise.
2901 (LINE_MIN): Likewise.
2902 (LINE_MAX): Likewise.
2903 (FBTEST_STEP): Likewise.
2904 (FBTEST_COUNT): Likewise.
2905 (fb_list): New variable.
2906 (grub_find_video_card): Remove function.
2907 (find_framebuf): New function.
2908 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2911 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2914 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2916 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2918 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2921 2009-02-22 Robert Millan <rmh@aybabtu.com>
2923 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2924 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2925 in our relocation, instead of using it directly from heap. Also
2926 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2928 2009-02-21 Robert Millan <rmh@aybabtu.com>
2930 Implement USB keyboard support (based on patch by Marco Gerards)
2932 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2933 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2934 (usb_keyboard_mod_LDFLAGS): New variables.
2936 * term/usb_keyboard.c: New file.
2938 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2940 Corrected wrong declaration
2942 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2944 2009-02-14 Christian Franke <franke@computer.org>
2946 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2947 (grub_lspci_iter): Print class code and programming interface byte.
2949 2009-02-14 Christian Franke <franke@computer.org>
2951 * gendistlist.sh: Ignore `.svn' directories.
2953 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
2955 * fs/fat.c: Add 2009 to Copyright line.
2957 2009-02-14 Christian Franke <franke@computer.org>
2959 * commands/hdparm.c: New file. Provides `hdparm' command
2960 which sends ATA commands via grub_disk_ata_pass_through ().
2962 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2964 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2965 and <grub/cpu/io.h> to include/grub/ata.h.
2966 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2967 (GRUB_CDROM_SECTOR_SIZE): Remove.
2968 (GRUB_ATA_*): Move to include/grub/ata.h.
2969 (GRUB_ATAPI_*): Likewise.
2970 (enum grub_ata_commands): Likewise.
2971 (enum grub_ata_timeout_milliseconds): Likewise.
2972 (struct grub_ata_device): Likewise.
2973 (grub_ata_regset): Likewise.
2974 (grub_ata_regget): Likewise.
2975 (grub_ata_regset2): Likewise.
2976 (grub_ata_regget2): Likewise.
2977 (grub_ata_check_ready): Likewise.
2978 (grub_ata_wait_not_busy): Remove static, exported in
2980 (grub_ata_wait_drq): Likewise.
2981 (grub_ata_pio_read): Likewise.
2983 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2984 function for hdparm.mod.
2986 * include/grub/ata.h: New file, contains declarations from
2988 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2990 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2991 (grub_disk_ata_pass_through): New exported variable.
2993 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2995 2009-02-13 Colin D Bennett <colin@gibibit.com>
2997 Support multiple fallback entries, and provide an API to support
2998 executing default+fallback menu entries. Renamed the `terminal' menu
3001 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3002 variable declaration.
3003 (grub_menu_execute_callback): New structure declaration.
3004 (grub_menu_execute_callback_t): New typedef.
3005 (grub_menu_execute_with_fallback): New function declaration.
3006 (grub_menu_get_entry): Likewise.
3007 (grub_menu_get_timeout): Likewise.
3008 (grub_menu_set_timeout): Likewise.
3010 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3012 * normal/menu.c (grub_wait_after_message): Moved to
3013 `normal/menu_text.c'.
3014 (draw_border): Likewise.
3015 (print_message): Likewise.
3016 (print_entry): Likewise.
3017 (print_entries): Likewise.
3018 (grub_menu_init_page): Likewise.
3019 (get_entry_number): Likewise.
3020 (print_timeout): Likewise.
3021 (run_menu): Likewise.
3022 (grub_menu_execute_entry): Likewise.
3023 (show_text_menu): Likewise.
3024 (get_and_remove_first_entry_number): New function.
3025 (grub_menu_execute_with_fallback): Likewise.
3026 (get_entry): Renamed to ...
3027 (grub_menu_get_entry): .. this and made it global.
3028 (get_timeout): Renamed to ...
3029 (grub_menu_get_timeout): ... this and made it global.
3030 (set_timeout): Renamed to ...
3031 (grub_menu_set_timeout): ... this and made it global.
3032 (grub_normal_terminal_menu_viewer): Renamed to ...
3033 (grub_normal_text_menu_viewer): ... this.
3035 * normal/menu_text.c: New file. Extracted text-menu-specific code
3038 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3039 (normal_mod_SOURCES): Likewise.
3041 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3042 (normal_mod_SOURCES): Likewise.
3044 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3045 (normal_mod_SOURCES): Likewise.
3047 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3048 (normal_mod_SOURCES): Likewise.
3050 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3051 (normal_mod_SOURCES): Likewise.
3053 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3054 (normal_mod_SOURCES): Likewise.
3056 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3057 (normal_mod_SOURCES): Likewise.
3059 2009-02-11 Robert Millan <rmh@aybabtu.com>
3061 * util/grub.d/00_header.in: Update old reference to `font' command.
3063 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3065 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3067 Based on patch from Javier MartÃn.
3069 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3071 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3072 to avoid false positives with FAT.
3073 (grub_fstest_SOURCES): Likewise.
3074 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3075 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3076 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3077 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3078 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3079 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3081 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3083 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3084 bpb.version_specific.fat12_or_fat16.fstype and
3085 bpb.version_specific.fat32.fstype.
3087 2009-02-08 Robert Millan <rmh@aybabtu.com>
3089 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3091 2009-02-08 Robert Millan <rmh@aybabtu.com>
3093 * Makefile.in (host_os, host_cpu): New variables.
3094 (target_os): Remove. Update all users.
3096 2009-02-08 Marco Gerards <marco@gnu.org>
3098 * Makefile.in (enable_grub_emu_usb): New variable.
3099 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3100 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3101 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3102 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3103 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3104 `usbtest.mod' and `usbms.mod'.
3105 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3106 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3107 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3108 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3109 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3112 * disk/usbms.c: New file.
3114 * include/grub/usb.h: Likewise.
3116 * include/grub/usbtrans.h: Likewise.
3118 * include/grub/usbdesc.h: Likewise.
3120 * bus/usb/usbtrans.c: Likewise.
3122 * bus/usb/ohci.c: Likewise.
3124 * bus/usb/uhci.c: Likewise.
3126 * bus/usb/usbhub.c: Likewise.
3128 * bus/usb/usb.c: Likewise.
3130 * commands/usbtest.c: Likewise.
3132 * util/usb.c: Likewise.
3134 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3136 * configure.ac: Test for libusb presence.
3138 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3140 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3142 * kern/mm.c: Add more comments.
3144 2009-02-08 Robert Millan <rmh@aybabtu.com>
3146 Patch from Javier MartÃn.
3147 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3148 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3150 2009-02-08 Robert Millan <rmh@aybabtu.com>
3152 * fs/cpio.c: Split tar functionality to ...
3153 * fs/tar.c: ... here (new file). Update all users.
3155 2009-02-07 Robert Millan <rmh@aybabtu.com>
3157 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3158 backward-incompatible features.
3160 Based on patch from Javier MartÃn, with some adjustments.
3162 2009-02-07 Michael Scherer <misc@mandriva.org>
3164 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3166 2009-02-07 Robert Millan <rmh@aybabtu.com>
3168 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3169 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3170 after the RAID stuff.
3172 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3174 Fixes problem when running vbetest command as reported by
3175 Vladimir Serbinenko <phcoder@gmail.com>.
3177 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3179 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
3181 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3182 /dev/md/NpN style mdraid devices.
3184 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3186 * util/unifont2pff.rb: Remove.
3188 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3190 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3193 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3195 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3196 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3197 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3198 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3199 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3200 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3201 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3203 2009-02-02 Christian Franke <franke@computer.org>
3205 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3207 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
3209 * INSTALL: Note that we now require at least autoconf 2.59 and
3210 that LZO is optional.
3212 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3214 Base on patch on bug #24154 created by Tomas Tintera
3217 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3219 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3221 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3222 <bero@arklinux.org>.
3224 * normal/parser.y (script_init): Add missing semicolon.
3226 2009-01-31 Colin D Bennett <colin@gibibit.com>
3228 * normal/main.c: Add include to grub/menu_viewer.h.
3229 (free_menu_entry_classes): Added.
3230 (grub_normal_menu_addentry): Added class property handling.
3231 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3232 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3234 * normal/menu_viewer.c: New file.
3236 * normal/menu.c (run_menu_entry): Renamed to ...
3237 (grub_menu_execute_entry): ... this and made it as global.
3238 (grub_menu_run): Renamed to ...
3239 (show_text_menu): ... this and made it local.
3240 (show_text_menu): Adapt to new function names.
3241 (grub_normal_terminal_menu_viewer): New global variable.
3243 * include/grub/menu.h: New file.
3245 * include/grub/menu_viewer.h: New file.
3247 * include/grub/normal.h: Added include to grub/menu.h.
3248 (grub_menu_entry): Moved to include/grub/menu.h.
3249 (grub_menu_entry_t): Likewise.
3250 (grub_menu): Likewise.
3251 (grub_menu_t): Likewise.
3252 (grub_normal_terminal_menu_viewer): Added.
3253 (grub_menu_execute_entry): Likewise.
3254 (grub_menu_run): Removed.
3256 * DISTLIST: Added include/grub/menu.h.
3257 Added include/grub/menu_viewer.h.
3258 Added normal/menu_viewer.c.
3260 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3262 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3263 arglist for menutitle arguments.
3265 * normal/main.c (grub_normal_menu_addentry): Likewise.
3267 * normal/parser.y (menuentry): Likewise.
3269 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3271 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3272 (grub_script_create_cmdmenu): Likewise.
3274 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3276 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3279 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3281 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3283 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3285 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3287 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3289 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3291 2009-01-30 Christian Franke <franke@computer.org>
3293 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3294 in option help text.
3296 2009-01-27 Pavel Roskin <proski@gnu.org>
3298 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3300 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3302 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3304 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3306 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3307 unregister function.
3309 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3311 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3313 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3315 * util/grub-mkfont.c (usage): Fix typo.
3317 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3319 2009-01-26 Daniel Mierswa <impulze@impulze.org>
3321 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3323 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3325 * kern/misc.c (grub_strcasecmp): New function.
3326 (grub_strcasecmp): Use grub_size_t instead of int for length.
3328 * include/grub/misc.h: Update function prototypes.
3330 2009-01-26 Robert Millan <rmh@aybabtu.com>
3332 * configure.ac: Fix cross-compilation check.
3334 2009-01-22 Christian Franke <franke@computer.org>
3336 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3337 (precision) digit string. Allow `.format2' without `format1' (width).
3338 Limit input chars for `%s' output to `format2' if specified. This is
3339 compatible with standard printf ().
3341 2009-01-22 Christian Franke <franke@computer.org>
3343 * disk/ata.c (grub_ata_wait_status): Replace by ...
3344 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3345 other status bits may be invalid while BSY is asserted.
3346 (grub_ata_check_ready): New function.
3347 (grub_ata_cmd): Removed.
3348 (grub_ata_wait_drq): New function.
3349 (grub_ata_strncpy): Remove inline.
3350 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3351 and error check now done by grub_ata_wait_drq ().
3352 (grub_ata_pio_write): Likewise.
3353 (grub_atapi_identify): Set DEV before check for !BSY. Use
3354 grub_ata_wait_drq () to wait for data.
3355 (grub_ata_device_initialize): Add status register check to
3356 detect missing SATA slave devices. Add debug messages.
3357 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3358 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3359 transfer loop by grub_ata_pio_write ().
3360 (grub_ata_identify): Set DEV before check for !BSY. Use
3361 grub_ata_wait_drq () to wait for data.
3362 (grub_ata_setaddress): Set DEV before check for !BSY.
3363 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3364 read/write in one loop. Fix invalid command on write. Fix incomplete
3365 command on (size % batch) == 0. Add missing error check after write of
3366 last block. Add debug messages.
3367 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3369 2009-01-19 Christian Franke <franke@computer.org>
3371 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3372 (GRUB_ATAPI_IREASON_*): Likewise.
3373 (grub_ata_pio_write): Fix timeout error return.
3374 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3375 (grub_atapi_wait_drq): New function.
3376 (grub_atapi_packet): New parameter `size'.
3377 Use grub_atapi_wait_drq () and direct write instead of
3378 grub_ata_pio_write ().
3379 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3380 reads the number of bytes requested by the device for each DRQ
3382 (grub_atapi_write): Remove old implementation, return not
3383 implemented instead.
3385 2009-01-19 Christian Franke <franke@computer.org>
3387 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3388 of 512 to calculate data size.
3389 (grub_scsi_read12): Likewise.
3390 (grub_scsi_write10): Likewise.
3391 (grub_scsi_write12): Likewise.
3392 (grub_scsi_read): Adjust size according to blocksize.
3393 Add checks for invalid blocksize and unaligned transfer.
3395 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3397 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3399 * term/gfxterm.c (write_char): Fix background rendering for wide
3402 2009-01-19 Robert Millan <rmh@aybabtu.com>
3404 * config.guess: Update to latest version from config git.
3405 * config.sub: Likewise.
3407 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
3409 * Makefile.in: Change font compilation to use new grub-mkfont instead
3412 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3413 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3414 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3415 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3416 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3417 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3418 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3419 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3420 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3422 2009-01-16 Christian Franke <franke@computer.org>
3424 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3425 (enum grub_ata_timeout_milliseconds): New enum.
3426 (grub_ata_wait_status): Add parameter milliseconds.
3427 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3428 recovery from timed-out commands.
3429 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3430 return grub_errno instead of REG_ERROR.
3431 (grub_ata_pio_write): Add parameter milliseconds.
3432 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3433 Pass milliseconds to grub_ata_wait_status () and
3434 grub_ata_pio_read ().
3435 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3436 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3437 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3438 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3439 It is not suitable for device detection, because DEV bit is ignored,
3440 the command may run too long, and not all devices set the signature
3442 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3443 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3444 Fix device selection, DEV bit must be set first to address the registers
3445 of the correct device.
3446 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3447 grub_ata_pio_read/write ().
3448 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3449 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3451 2009-01-13 Carles Pina i Estany <carles@pina.cat>
3453 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3455 2009-01-13 Bean <bean123ch@gmail.com>
3457 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3459 2009-01-13 Bean <bean123ch@gmail.com>
3461 * Makefile.in: (enable_grub_mkfont): New variable.
3462 (freetype_cflags): Likewise.
3463 (freetype_libs): Likewise.
3465 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3466 (grub_mkfont_SOURCES): New variable.
3467 (grub_mkfont_CFLAGS): Likewise.
3468 (grub_mkfont_LDFLAGS): Likewise.
3470 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3471 library if `--enable-grub-mkfont' is requested.
3472 (enable_grub_mkfont): New variable.
3473 (freetype_cflags): Likewise.
3474 (freetype_libs): Likewise.
3476 * util/grub-mkfont.c: New file.
3478 2009-01-12 Christian Franke <franke@computer.org>
3480 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3481 mode check. Fix setting of compat_use[].
3483 2009-01-10 Robert Millan <rmh@aybabtu.com>
3485 Update a few copyright years which we forgot to do in 2008 (only for
3486 files whose changes made in 2008 were copyright-significant)
3488 * Makefile.in: Add 2008 to Copyright line.
3489 * disk/ieee1275/ofdisk.c: Likewise.
3490 * disk/efi/efidisk.c: Likewise.
3491 * kern/dl.c: Likewise.
3492 * kern/sparc64/ieee1275/init.c: Likewise.
3493 * kern/mm.c: Likewise.
3494 * kern/efi/mm.c: Likewise.
3495 * boot/i386/pc/boot.S: Likewise.
3496 * genfslist.sh: Likewise.
3497 * fs/iso9660.c: Likewise.
3498 * fs/hfs.c: Likewise.
3499 * fs/jfs.c: Likewise.
3500 * fs/minix.c: Likewise.
3501 * fs/ufs.c: Likewise.
3502 * gensymlist.sh.in: Likewise.
3503 * genkernsyms.sh.in: Likewise.
3504 * include/grub/misc.h: Likewise.
3505 * include/grub/types.h: Likewise.
3506 * include/grub/symbol.h: Likewise.
3507 * include/grub/elf.h: Likewise.
3508 * include/grub/kernel.h: Likewise.
3509 * include/grub/disk.h: Likewise.
3510 * include/grub/dl.h: Likewise.
3511 * include/grub/i386/linux.h: Likewise.
3512 * include/grub/i386/pc/biosdisk.h: Likewise.
3513 * include/grub/efi/api.h: Likewise.
3514 * include/grub/efi/pe32.h: Likewise.
3515 * include/grub/util/misc.h: Likewise.
3516 * normal/execute.c: Likewise.
3517 * normal/arg.c: Likewise.
3518 * normal/completion.c: Likewise.
3519 * normal/lexer.c: Likewise.
3520 * normal/parser.y: Likewise.
3521 * normal/misc.c: Likewise.
3522 * commands/i386/pc/vbeinfo.c: Likewise.
3523 * commands/hexdump.c: Likewise.
3524 * commands/terminal.c: Likewise.
3525 * commands/ls.c: Likewise.
3526 * commands/help.c: Likewise.
3527 * partmap/pc.c: Likewise.
3528 * loader/efi/chainloader.c: Likewise.
3529 * loader/multiboot_loader.c: Likewise.
3530 * loader/i386/pc/multiboot2.c: Likewise.
3531 * term/efi/console.c: Likewise.
3532 * term/i386/pc/serial.c: Likewise.
3533 * util/lvm.c: Likewise.
3534 * util/console.c: Likewise.
3535 * util/i386/efi/grub-mkimage.c: Likewise.
3536 * util/raid.c: Likewise.
3538 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3540 * commands/videotest.c: Removed include to grub/machine/memory.h.
3542 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3543 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3544 (video_mod_SOURCES): Removed.
3545 (video_mod_CFLAGS): Likewise.
3546 (video_mod_LDFLAGS): Likewise.
3547 (gfxterm_mod_SOURCES): Likewise.
3548 (gfxterm_mod_CFLAGS): Likewise.
3549 (gfxterm_mod_LDFLAGS): Likewise.
3550 (videotest_mod_SOURCES): Likewise.
3551 (videotest_mod_CFLAGS): Likewise.
3552 (videotest_mod_LDFLAGS): Likewise.
3553 (bitmap_mod_SOURCES): Likewise.
3554 (bitmap_mod_CFLAGS): Likewise.
3555 (bitmap_mod_LDFLAGS): Likewise.
3556 (tga_mod_SOURCES): Likewise.
3557 (tga_mod_CFLAGS): Likewise.
3558 (tga_mod_LDFLAGS): Likewise.
3559 (jpeg_mod_SOURCES): Likewise.
3560 (jpeg_mod_CFLAGS): Likewise.
3561 (jpeg_mod_LDFLAGS): Likewise.
3562 (png_mod_SOURCES): Likewise.
3563 (png_mod_CFLAGS): Likewise.
3564 (png_mod_LDFLAGS): Likewise.
3566 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3567 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3568 (video_mod_SOURCES): Added.
3569 (video_mod_CFLAGS): Likewise.
3570 (video_mod_LDFLAGS): Likewise.
3571 (videotest_mod_SOURCES): Likewise.
3572 (videotest_mod_CFLAGS): Likewise.
3573 (videotest_mod_LDFLAGS): Likewise.
3574 (bitmap_mod_SOURCES): Likewise.
3575 (bitmap_mod_CFLAGS): Likewise.
3576 (bitmap_mod_LDFLAGS): Likewise.
3577 (tga_mod_SOURCES): Likewise.
3578 (tga_mod_CFLAGS): Likewise.
3579 (tga_mod_LDFLAGS): Likewise.
3580 (jpeg_mod_SOURCES): Likewise.
3581 (jpeg_mod_CFLAGS): Likewise.
3582 (jpeg_mod_LDFLAGS): Likewise.
3583 (png_mod_SOURCES): Likewise.
3584 (png_mod_CFLAGS): Likewise.
3585 (png_mod_LDFLAGS): Likewise.
3586 (gfxterm_mod_SOURCES): Likewise.
3587 (gfxterm_mod_CFLAGS): Likewise.
3588 (gfxterm_mod_LDFLAGS): Likewise.
3590 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3591 grub/machine/console.h.
3593 2009-01-04 Jerone Young <jerone@gmail.com>
3595 Make on screen instructions clearer
3597 Based on patch created by Jidanni <jidanni@jidanni.org>
3599 * normal/menu.c: print clearer instructions on the screen
3601 2009-01-02 Colin D Bennett <colin@gibibit.com>
3605 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3606 build system and fixed gfxterm.c to work with different sized fonts.
3608 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3610 * configure: Re-generated.
3612 * DISTLIST: Removed font/manager.c.
3614 Added font/font_cmd.c.
3616 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3619 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
3621 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3623 * kern/term.c: Changed users of grub_utf8_to_ucs4.
3625 * normal/menu.c: Likewise.
3627 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3628 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3630 * include/grub/font.h: Replaced with new file.
3632 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3633 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3634 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3635 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3636 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3637 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3638 fg_red, fg_green, fg_blue, fg_alpha.
3639 (grub_video_adapter): Removed blit_glyph.
3640 (grub_video_blit_glyph): Removed.
3642 * font/manager.c: Removed file.
3644 * font/font.c: New file.
3646 * font/font_cmd.c: Likewise.
3648 * video/video.c (grub_video_blit_glyph): Removed.
3650 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3651 (grub_video_vbe_map_rgba): Likewise.
3652 (grub_video_vbe_unmap_color_int): Likewise.
3653 (grub_video_vbe_blit_glyph): Removed.
3654 (grub_video_vbe_adapter): Removed blit_glyph.
3656 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3657 (get_pixel): Likewise.
3658 (set_pixel): Likewise.
3660 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3662 * term/gfxterm.c: Adapted to new font engine.
3664 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
3666 * term/i386/pc/vga.c: Likewise.
3668 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3670 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3672 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3674 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3676 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3678 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3680 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3682 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3684 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3686 * util/grub.d/00_header.in: Changed to use new loadfont command.
3688 * util/grub-mkconfig_lib.in: Changed font extension.
3690 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
3692 * util/getroot.c (grub_util_get_grub_dev): Add support for
3693 /dev/md/dNNpNN style partitionable mdraid devices.
3695 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
3697 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3698 at a time limit of the PXE TFTP API correctly.
3699 (grub_pxefs_close): Likewise.
3701 2008-11-29 Robert Millan <rmh@aybabtu.com>
3703 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3704 grub_ata_device_initialize() calls.
3706 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
3708 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3710 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3712 2008-11-28 Robert Millan <rmh@aybabtu.com>
3714 Fix build on powerpc-ieee1275. Based on patch created by
3715 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3716 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3717 `kern/ieee1275/mmap.c'.
3718 * include/grub/powerpc/ieee1275/memory.h: New file.
3720 Provide grub-install on coreboot.
3721 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3722 (grub_install_SOURCES): New variable.
3723 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3726 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
3728 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3729 to `grub_term_input_t'.
3730 (grub_term_get_current_output): Change return type to
3731 `grub_term_output_t'.
3733 2008-11-22 Robert Millan <rmh@aybabtu.com>
3735 Fix breakage on coreboot due to declaration mismatch.
3736 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3737 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3738 grub_vga_text_cls().
3740 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3741 comments. Avoid copying one more byte than necessary (just in case).
3743 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3744 to 0x200000 (avoids trouble with some OFW implementations, and matches
3745 with the one in Yaboot).
3746 Reported by Manoel Abranches
3748 2008-11-20 Robert Millan <rmh@aybabtu.com>
3750 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3751 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3753 * util/grub-mkconfig_lib.in (grub_warn): New function.
3754 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3755 warnings, to obtain consistent formatting.
3756 * util/grub.d/00_header.in: Likewise.
3757 * util/update-grub_lib.in: Likewise.
3759 * loader/i386/linux.c (allocate_pages): Fix a warning.
3760 Move comment text to `#error' stanza.
3762 Harmonize ieee1275's grub_available_iterate() with the generic
3763 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3764 build problem on i386-ieee1275):
3765 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3766 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3767 parameter `type'. Update all users of this function.
3768 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3769 `kern/ieee1275/mmap.c'.
3770 * kern/ieee1275/init.c
3771 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3773 (grub_machine_mmap_iterate): ... this.
3774 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3775 return type to `grub_err_t'. Update all implementations of this
3777 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3780 Add `lsmmap' command (lists firmware-provided memory map):
3781 * commands/lsmmap.c: New file.
3782 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3783 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3785 * conf/powerpc-ieee1275.rmk: Likewise.
3786 * conf/i386-coreboot.rmk: Likewise.
3787 * conf/i386-ieee1275.rmk: Likewise.
3789 2008-11-19 Robert Millan <rmh@aybabtu.com>
3791 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3792 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3793 constraints to initrd allocation (based on code from
3794 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3795 for Linux to find it.
3797 2008-11-14 Robert Millan <rmh@aybabtu.com>
3799 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3800 order to cope with duplicate slashes.
3802 2008-11-14 Robert Millan <rmh@aybabtu.com>
3804 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3805 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3806 don't want to mess with lower memory, because it is used in the Linux
3809 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3810 an appropriate place in lower memory, between 0x10000 and 0x90000,
3811 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3812 is in our heap (probably as a result of it being corrupted during
3813 decompression). Add #error instance with comment to explain why this
3814 loader isn't currently usable on PC/BIOS.
3816 2008-11-14 Robert Millan <rmh@aybabtu.com>
3818 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3819 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3821 2008-11-12 Robert Millan <rmh@aybabtu.com>
3823 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3825 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3826 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3828 * include/grub/i386/pc/memory.h: ... to here.
3830 2008-11-12 Robert Millan <rmh@aybabtu.com>
3832 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3835 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3836 (grub_console_cur_color, grub_console_real_putchar)
3837 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3838 (grub_console_setcolorstate, grub_console_setcolor)
3839 (grub_console_getcolor): Move from here ...
3840 * include/grub/i386/vga_common.h: ... to here (new file).
3842 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3843 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3845 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3846 `<grub/i386/vga_common.h>'.
3848 2008-11-12 Robert Millan <rmh@aybabtu.com>
3850 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3851 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3852 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3854 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3855 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3857 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3858 grub_console_init() with call to grub_vga_text_init().
3859 (grub_machine_fini): Replace call to
3860 grub_console_fini() with call to grub_vga_text_fini() and
3861 grub_at_keyboard_fini().
3863 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3864 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3865 (grub_console_setcolorstate, grub_console_setcolor)
3866 (grub_console_getcolor): New function prototypes.
3868 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3869 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3870 (grub_vga_text_setcursor): Static-ize.
3871 (grub_vga_text_term): New structure.
3872 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3874 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3875 (grub_console_cur_color, grub_console_standard_color)
3876 (grub_console_normal_color, grub_console_highlight_color)
3877 (map_char, grub_console_putchar, grub_console_getcharwidth)
3878 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3879 (grub_console_getcolor): Move from here ...
3880 * term/i386/vga_common.c: ... to here (same function names).
3882 2008-11-12 Robert Millan <rmh@aybabtu.com>
3884 Use newly-added Multiboot support in coreboot.
3886 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3887 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3889 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3890 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3891 (codestart): Store the MBI in `startup_multiboot_info' when we're
3892 being loaded using Multiboot.
3894 * kern/i386/coreboot/init.c (grub_machine_init): Move
3895 grub_at_keyboard_init() call to beginning of function (useful for
3896 debugging). Call grub_machine_mmap_init() before attempting to use
3897 grub_machine_mmap_iterate().
3898 (grub_lower_mem, grub_upper_mem): Move from here ...
3899 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3902 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3905 2008-11-12 Robert Millan <rmh@aybabtu.com>
3907 Fix a regression introduced by the at_keyboard.mod split. Because
3908 some terminals are default on some platforms and non-default on
3909 others, the first terminal being registered determines which is
3910 going to be default.
3912 * kern/term.c (grub_term_register_input): If this is the first
3913 terminal being registered, set it as the current one.
3914 (grub_term_register_output): Likewise.
3916 * term/efi/console.c (grub_console_init): Do not call
3917 grub_term_set_current_output() or grub_term_set_current_input().
3918 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3919 * term/i386/pc/console.c (grub_console_init): Likewise.
3920 (grub_console_fini): Do not call grub_term_set_current_input()
3921 (but leave grub_term_set_current_output() to restore text mode).
3923 2008-11-10 Robert Millan <rmh@aybabtu.com>
3925 * util/grub.d/00_header.in: Add backward compatibility check for
3926 versions of terminal.mod that don't understand `terminal_input' or
3929 2008-11-09 Robert Millan <rmh@aybabtu.com>
3931 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3932 `terminal_input' / `terminal_output', not `terminal'.
3934 2008-11-08 Robert Millan <rmh@aybabtu.com>
3936 * Makefile.in (include_DATA): Fix srcdir=. assumption.
3937 (DISTCLEANFILES): Add `build_env.mk'.
3939 2008-11-08 Robert Millan <rmh@aybabtu.com>
3941 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3942 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3943 members. Update all users.
3944 * util/console.c (grub_ncurses_term): Split in ...
3945 (grub_ncurses_term_input): ... this, and ...
3946 (grub_ncurses_term_output): ... this. Update all users.
3947 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3949 2008-11-08 Robert Millan <rmh@aybabtu.com>
3951 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3952 (PKGDATA): Add $(pkgdata_SRCDIR).
3953 (pkglib_BUILDDIR): New variable.
3954 (pkgdata_SRCDIR): New variable.
3955 (build_env.mk): New target.
3956 (include_DATA): New variable.
3957 (install-local): Install $(include_DATA) files in $(includedir).
3959 2008-11-07 Pavel Roskin <proski@gnu.org>
3961 * gendistlist.sh: Use C locale for sorting to ensure consistent
3962 output on all systems.
3964 * util/grub.d/00_header.in: Remove incorrect space before
3967 2008-11-07 Robert Millan <rmh@aybabtu.com>
3969 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3971 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3972 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3973 (based on find_multi_boot1_header).
3974 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3975 using find_multi_boot2_header(), and abort if neither Multiboot or
3976 Multiboot headers were found.
3978 2008-11-07 Robert Millan <rmh@aybabtu.com>
3980 Modularize at_keyboard.mod:
3982 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3983 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3984 (at_keyboard_mod_LDFLAGS): New variables.
3986 Actual terminal split:
3988 * include/grub/term.h (struct grub_term): Split in ...
3989 (struct grub_term_input): ... this, and ...
3990 (struct grub_term_output): ... this. Update all users.
3991 (grub_term_set_current): Split in ...
3992 (grub_term_set_current_input): ... this, and ...
3993 (grub_term_set_current_output): ... this.
3994 (grub_term_get_current): Split in ...
3995 (grub_term_get_current_input): ... this, and ...
3996 (grub_term_get_current_output): ... this.
3997 (grub_term_register): Split in ...
3998 (grub_term_register_input): ... this, and ...
3999 (grub_term_register_output): ... this.
4000 (grub_term_unregister): Split in ...
4001 (grub_term_unregister_input): ... this, and ...
4002 (grub_term_unregister_output): ... this.
4003 (grub_term_iterate): Split in ...
4004 (grub_term_iterate_input): ... this, and ...
4005 (grub_term_iterate_output): ... this.
4007 * kern/term.c (grub_term_list): Split in ...
4008 (grub_term_list_input): ... this, and ...
4009 (grub_term_list_output): ... this. Update all users.
4010 (grub_cur_term): Split in ...
4011 (grub_cur_term_input): ... this, and ...
4012 (grub_cur_term_output): ... this. Update all users.
4013 (grub_term_set_current): Split in ...
4014 (grub_term_set_current_input): ... this, and ...
4015 (grub_term_set_current_output): ... this.
4016 (grub_term_get_current): Split in ...
4017 (grub_term_get_current_input): ... this, and ...
4018 (grub_term_get_current_output): ... this.
4019 (grub_term_register): Split in ...
4020 (grub_term_register_input): ... this, and ...
4021 (grub_term_register_output): ... this.
4022 (grub_term_unregister): Split in ...
4023 (grub_term_unregister_input): ... this, and ...
4024 (grub_term_unregister_output): ... this.
4025 (grub_term_iterate): Split in ...
4026 (grub_term_iterate_input): ... this, and ...
4027 (grub_term_iterate_output): ... this.
4029 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4030 a check for input and one for output (and only attempt to get keys
4031 from user when input works).
4033 * util/grub-probe.c (grub_term_get_current): Split in ...
4034 (grub_term_get_current_input): ... this, and ...
4035 (grub_term_get_current_output): ... this.
4036 * util/grub-fstest.c: Likewise.
4037 * util/i386/pc/grub-setup.c: Likewise.
4038 * util/grub-editenv.c: Likewise.
4040 Portability adjustments:
4042 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4043 `term/i386/pc/at_keyboard.c'.
4044 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4045 grub_keyboard_controller_init() (now handled by terminal .init).
4046 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4047 grub_at_keyboard_init().
4048 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4049 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4050 at_keyboard.mod via input terminal interface).
4051 * include/grub/i386/coreboot/console.h: Convert into a stub for
4052 `<grub/i386/pc/console.h>'.
4054 Migrate full terminals to new API:
4056 * term/efi/console.c (grub_console_term): Split into ...
4057 (grub_console_term_input): ... this, and ...
4058 (grub_console_term_output): ... this. Update all users.
4059 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4060 (grub_ofconsole_init): Split into ...
4061 (grub_ofconsole_init_input): ... this, and ...
4062 (grub_ofconsole_init_output): ... this.
4063 (grub_ofconsole_term): Split into ...
4064 (grub_ofconsole_term_input): ... this, and ...
4065 (grub_ofconsole_term_output): ... this. Update all users.
4066 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4067 (grub_serial_term_input): ... this, and ...
4068 (grub_serial_term_output): ... this. Update all users.
4069 * term/i386/pc/console.c (grub_console_term): Split into ...
4070 (grub_console_term_input): ... this, and ...
4071 (grub_console_term_output): ... this. Update all users.
4072 (grub_console_term_input): Only enable it on PC/BIOS platform.
4073 (grub_console_init): Remove grub_keyboard_controller_init() call.
4075 Migrate input terminals to new API:
4077 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4078 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4079 i386-specific anyway).
4080 (grub_console_checkkey): Rename to ...
4081 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4083 (grub_keyboard_controller_orig): New variable.
4084 (grub_console_getkey): Rename to ...
4085 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4087 (grub_keyboard_controller_init): Static-ize. Save original
4088 controller value so that it can be restored ...
4089 (grub_keyboard_controller_fini): ... here (new function).
4090 (grub_at_keyboard_term): New structure.
4091 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4094 Migrate output terminals to new API:
4096 * term/i386/pc/vga.c (grub_vga_term): Change type to
4097 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4098 members. Update all users.
4099 * term/gfxterm.c (grub_video_term): Change type to
4100 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4101 members. Update all users.
4102 * include/grub/i386/pc/console.h (grub_console_checkkey)
4103 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4106 Migrate `terminal' command and userland tools to new API:
4108 * commands/terminal.c (grub_cmd_terminal): Split into ...
4109 (grub_cmd_terminal_input): ... this, and ...
4110 (grub_cmd_terminal_output): ... this.
4111 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4112 `terminal_input' and `terminal_output'.
4113 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4114 `terminal_input' / `terminal_output' API.
4115 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4116 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4117 provided ${GRUB_TERMINAL}, convert it).
4119 2008-11-04 Robert Millan <rmh@aybabtu.com>
4121 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4123 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4125 2008-11-03 Bean <bean123ch@gmail.com>
4127 * kern/elf.c (grub_elf32_load): Revert to previous code.
4128 (grub_elf64_load): Likewise.
4130 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4132 2008-11-01 Robert Millan <rmh@aybabtu.com>
4134 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4135 (TARGET_CPPFLAGS): Likewise.
4136 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4138 2008-11-01 Carles Pina i Estany <carles@pina.cat>
4140 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4142 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4144 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4145 addition of objects until the code is not going to be able to fail.
4147 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4149 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4150 (add a missing NULL check, and correct them by moving the pointer
4151 operations after the actual check).
4153 2008-10-29 Robert Millan <rmh@aybabtu.com>
4155 * util/i386/pc/grub-install.in: Handle empty string as output from
4156 make_system_path_relative_to_its_root().
4158 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4160 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4161 circular metadata worst case scenario. If the metadata is circular
4162 then copy the wrap in place.
4163 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4164 project lib/format_text/layout.h
4165 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4167 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4169 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4171 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4173 * util/update-grub_lib.in: Mention filename in warning message.
4175 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4177 * NEWS: Update for rename of update-grub to grub-mkconfig.
4179 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4181 * util/update-grub_lib.in: Copy to ...
4182 * util/grub-mkconfig_lib.in: ... this. Update all users.
4183 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4184 * util/update-grub.in: Rename to ...
4185 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4186 option. Add `--output' option to allow users to specify the generated
4187 configuration file. Default to stdout.
4188 (update_grub_dir): Rename to ...
4189 (grub_mkconfig_dir): ... this.
4190 (grub_cfg): Default to an empty string.
4191 * conf/common.rmk (update-grub): Rename to ...
4192 (grub-mkconfig): ... this.
4193 (update-grub_lib): Copy to ...
4194 (grub-mkconfig_lib): ... this.
4195 (update-grub_SCRIPTS): Copy to ...
4196 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4197 (update-grub_DATA): Rename to ...
4198 (grub-mkconfig_DATA): ... this.
4200 2008-09-28 Robert Millan <rmh@aybabtu.com>
4202 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4203 to `modified'. Add the real `created' field.
4204 (grub_iso9660_uuid): Use `modified' rather than `created' for
4205 constructing the UUID.
4207 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
4209 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4210 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4212 2008-09-28 Bean <bean123ch@gmail.com>
4214 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4215 Thanks to Christian Franke for finding this bug.
4217 2008-09-25 Robert Millan <rmh@aybabtu.com>
4219 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4220 instances of grub_util_get_disk_name() (see previous commit).
4222 2008-09-25 Robert Millan <rmh@aybabtu.com>
4224 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4225 `util/i386/get_disk_name.c'.
4226 * conf/i386-efi.rmk: Likewise.
4227 * conf/x86_64-efi.rmk: Likewise.
4228 * conf/i386-coreboot.rmk: Likewise.
4229 * conf/i386-ieee1275.rmk: Likewise.
4230 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4231 `util/ieee1275/get_disk_name.c'.
4232 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4233 * util/ieee1275/get_disk_name.c: Remove file.
4234 * util/i386/get_disk_name.c: Remove file.
4235 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4236 "hd%d" for device.map entries, rather than using
4237 grub_util_get_disk_name().
4239 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4241 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4243 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4245 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4247 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4249 (GRUB_TERM_PPAGE): Changed to 0x4900.
4251 2008-09-24 Robert Millan <rmh@aybabtu.com>
4253 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4254 macros (they were i386-pc specific).
4255 * include/grub/sparc64/ieee1275/console.h: Likewise.
4256 * include/grub/efi/console.h: Likewise.
4258 2008-09-22 Bean <bean123ch@gmail.com>
4260 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4261 resident and in attribute list.
4263 * include/grub/ntfs.h (BMP_LEN): Removed.
4265 2008-09-22 Bean <bean123ch@gmail.com>
4267 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4268 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4270 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4271 error occurs, as grub_disk_open will call grub_disk_close, which will
4272 call p->close (scsi).
4274 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4276 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4277 (AC_PREREQ): Bumped to 2.59.
4278 (AC_TRY_COMPILE): Replace obsolete macro with ...
4279 (AC_COMPILE_IFELSE): ... this.
4280 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4281 (AC_LINK_IFELSE): ... this.
4283 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4285 * autogen.sh: Add a call to `gendistlist.sh'.
4287 2008-09-19 Christian Franke <franke@computer.org>
4289 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4290 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4291 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4292 Export __enable_execute_stack() to modules.
4293 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4296 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4298 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4301 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4303 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4304 #include <grub/util/hostdisk.h>.
4306 2008-09-08 Robert Millan <rmh@aybabtu.com>
4308 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4309 segments when their filesz is zero (grub_file_read() interprets
4310 zero-size as "read until EOF", which results in memory corruption).
4311 Use `lowest_segment' rather than 0 for calculating the current
4312 segment load address.
4314 2008-09-08 Robert Millan <rmh@aybabtu.com>
4316 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4317 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4318 clobbered useful information.
4320 2008-09-08 Robert Millan <rmh@aybabtu.com>
4322 * include/grub/util/biosdisk.h: Move to ...
4323 * include/grub/util/hostdisk.h: ... here. Update all users.
4324 * util/biosdisk.c: Move to ...
4325 * util/hostdisk.c: ... here. Update all users.
4327 2008-09-07 Robert Millan <rmh@aybabtu.com>
4329 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4331 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4332 and length can be stored directly in the `mbi->mmap_addr' and
4333 `mbi->mmap_length' struct fields.
4335 2008-09-07 Robert Millan <rmh@aybabtu.com>
4337 * conf/i386.rmk: New file. Provides declaration for building
4339 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4340 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4342 Include `conf/i386.mk'.
4343 * conf/i386-efi.rmk: Likewise.
4344 * conf/x86_64-efi.rmk: Likewise.
4345 * conf/i386-coreboot.rmk: Likewise.
4346 * conf/i386-ieee1275.rmk: Likewise.
4348 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4350 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4351 Adds optimization support for BGR based modes.
4353 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4354 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4355 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4356 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4357 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4358 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4359 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4360 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4361 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4362 (grub_video_i386_vbeblit_index_index): Likewise.
4363 (grub_video_i386_vbeblit_replace_directN): Added.
4364 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4365 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4366 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4367 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4368 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4369 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4370 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4371 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4372 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4373 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4374 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4375 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4376 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4378 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4379 (grub_video_i386_vbefill_R8G8B8): Likewise.
4380 (grub_video_i386_vbefill_index): Likewise.
4381 (grub_video_i386_vbefill_direct32): Added.
4382 (grub_video_i386_vbefill_direct24): Likewise.
4383 (grub_video_i386_vbefill_direct16): Likewise.
4384 (grub_video_i386_vbefill_direct8): Likewise.
4386 * include/grub/video.h (grub_video_blit_format): Removed
4387 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4388 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4389 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4390 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4391 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4393 * video/video.c (grub_video_get_blit_format): Updated to use new
4394 blit formats. Added handling for 16 bit color modes.
4396 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4398 (common_blitter): Updated to use new blitters.
4400 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4402 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4403 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4404 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4405 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4406 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4407 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4408 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4409 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4410 (grub_video_i386_vbeblit_index_index): Likewise.
4411 (grub_video_i386_vbeblit_replace_directN): Added.
4412 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4413 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4414 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4415 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4416 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4417 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4418 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4419 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4420 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4421 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4422 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4423 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4424 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4426 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4427 (grub_video_i386_vbefill_R8G8B8): Likewise.
4428 (grub_video_i386_vbefill_index): Likewise.
4429 (grub_video_i386_vbefill_direct32): Added.
4430 (grub_video_i386_vbefill_direct24): Likewise.
4431 (grub_video_i386_vbefill_direct16): Likewise.
4432 (grub_video_i386_vbefill_direct8): Likewise.
4434 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4437 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4440 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4443 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4446 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4448 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4451 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4453 * fs/iso9660.c (grub_iso9660_date): New structure.
4454 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4455 (grub_iso9660_uuid): New function.
4457 2008-09-05 Bean <bean123ch@gmail.com>
4459 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4461 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4462 insensitive bit for names in Win32 and Win32 & DOS namespace.
4464 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4466 * include/grub/types.h (LONG_MAX): Likewise.
4468 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4470 * util/getroot.c: Include <config.h>.
4471 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4472 add support for /dev/md/N devices and handle LVM double dash escaping.
4474 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4476 * config.guess: Update to latest version from config git.
4477 * config.sub: Likewise.
4479 2008-09-03 Robert Millan <rmh@aybabtu.com>
4481 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4482 `disk->total_sectors'.
4484 2008-09-01 Colin D Bennett <colin@gibibit.com>
4486 * include/grub/normal.h: Fixed incorrect comment for
4487 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4489 2008-09-01 Colin D Bennett <colin@gibibit.com>
4491 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4492 values with defines.
4494 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4495 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4496 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4497 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4498 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4499 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4500 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4501 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4502 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4503 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4504 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4505 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4506 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4507 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4508 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4509 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4510 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4511 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4512 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4514 2008-08-31 Robert Millan <rmh@aybabtu.com>
4516 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4518 (grub_multiboot): Fix a few warnings.
4520 2008-08-31 Robert Millan <rmh@aybabtu.com>
4522 * loader/i386/pc/multiboot.c: Update comment not to say that
4523 boot_device support is unimplemented.
4525 2008-08-31 Robert Millan <rmh@aybabtu.com>
4527 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4528 or memory map support are unimplemented.
4530 2008-08-31 Colin D Bennett <colin@gibibit.com>
4532 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4534 2008-08-31 Colin D Bennett <colin@gibibit.com>
4536 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4537 total video memory in 'vbeinfo' output; show color format details for
4540 2008-08-30 Pavel Roskin <proski@gnu.org>
4542 * util/genmoddep.c: Remove for real this time.
4543 * DISTLIST: Remove util/genmoddep.c.
4545 2008-08-30 Robert Millan <rmh@aybabtu.com>
4547 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4548 as required by Multiboot spec (it was already 4-byte aligned, but
4551 2008-08-29 Pavel Roskin <proski@gnu.org>
4553 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4554 * kern/powerpc/ieee1275/startup.S: ... this.
4555 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4556 * DISTLIST: Likewise.
4558 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4559 grub/cpu/kernel.h. Add start label for consistency with other
4560 platforms. Add grub_prefix immediately after start. Add jump
4561 to the code after grub_prefix.
4562 * include/grub/powerpc/kernel.h: Provide valid values for
4563 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4565 2008-08-29 Bean <bean123ch@gmail.com>
4567 * configure.ac: Change host_os to cygwin for mingw.
4568 (asprintf): New check for function.
4570 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4571 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4573 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4574 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4575 sync, sleep and grub_util_get_disk_size for mingw.
4577 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4578 to get size in mingw.
4579 (open_device): Use flag O_BINARY if it's defined.
4580 (find_root_device): Add dummy code for mingw.
4582 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4583 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4584 (get_scsi_disk_name): Return 0 for mingw.
4586 * util/hostfs.c: #include <grub/util/misc.h>.
4587 (grub_hostfs_open): Use "rb" flag to open file, use
4588 grub_util_get_disk_size to get disk size for mingw.
4590 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4591 (asprintf): New function if HAVE_ASPRINTF is not set.
4592 (sync): New function for mingw.
4594 (grub_util_get_disk_size): Likewise.
4596 2008-08-28 Pavel Roskin <proski@gnu.org>
4598 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4601 2008-08-28 Robert Millan <rmh@aybabtu.com>
4603 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4605 2008-08-28 Robert Millan <rmh@aybabtu.com>
4607 Change find_grub_drive() syntax so it doesn't prevent it from
4608 detecting NULL names as errors.
4610 * util/biosdisk.c (find_grub_drive): Move free slot search code
4612 (find_free_slot): ... to here.
4613 (read_device_map): Use find_free_slot() to search for free slots.
4615 2008-08-27 Marco Gerards <marco@gnu.org>
4617 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4618 (scsi_mod_SOURCES): New variable.
4619 (scsi_mod_CFLAGS): Likewise
4620 (scsi_mod_LDFLAGS): Likewise.
4622 * disk/scsi.c: New file.
4624 * include/grub/scsi.h: Likewise.
4626 * include/grub/scsicmd.h: Likewise.
4628 * disk/ata.c: Include <grub/scsi.h>.
4629 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4631 (grub_ata_iterate): Skip ATAPI devices.
4632 (grub_ata_open): Only handle ATAPI devices.
4633 (struct grub_atapi_read): Removed.
4634 (grub_atapi_readsector): Likewise.
4635 (grub_ata_read): No longer handle ATAPI devices.
4636 (grub_ata_write): Likewise.
4637 (grub_atapi_iterate): New function.
4638 (grub_atapi_read): Likewise.
4639 (grub_atapi_write): Likewise.
4640 (grub_atapi_open): Likewise.
4641 (grub_atapi_close): Likewise.
4642 (grub_atapi_dev): New variable.
4643 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4644 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4646 * include/grub/disk.h (enum grub_disk_dev_id): Add
4647 `GRUB_DISK_DEVICE_SCSI_ID'.
4649 2008-08-26 Robert Millan <rmh@aybabtu.com>
4651 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4652 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4655 2008-08-23 Bean <bean123ch@gmail.com>
4657 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4658 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4659 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4660 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4662 (raid5rec_mod_SOURCES): New macro.
4663 (raid5rec_mod_CFLAGS): Likewise.
4664 (raid5rec_mod_LDFLAGS): Likewise.
4665 (raid6rec_mod_SOURCES): Likewise.
4666 (raid6rec_mod_CFLAGS): Likewise.
4667 (raid6rec_mod_LDFLAGS): Likewise.
4668 (mdraid_mod_SOURCES): Likewise.
4669 (mdraid_mod_CFLAGS): Likewise.
4670 (mdraid_mod_LDFLAGS): Likewise.
4671 (dm_nv_mod_SOURCES): Likewise.
4672 (dm_nv_mod_CFLAGS): Likewise.
4673 (dm_nv_mod_LDFLAGS): Likewise.
4675 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4676 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4677 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4679 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4680 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4682 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4684 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4686 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4688 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4690 * disk/raid5_recover.c: New file.
4692 * disk/raid6_recover.c: Likewise.
4694 * disk/mdraid_linux.c: Likewise.
4696 * disk/dmraid_nvidia.c: Likewise.
4698 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4701 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4702 calculate the size of raid device.
4703 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4704 different layout of raid5.
4705 (grub_raid_scan_device): Remove code specific to mdraid.
4706 (grub_raid_list): New variable.
4707 (free_array): New function.
4708 (grub_raid_register): Likewise.
4709 (grub_raid_unregister): Likewise.
4710 (grub_raid_rescan): Likewise.
4711 (GRUB_MOD_INIT): Don't iterate device here.
4712 (GRUB_MOD_FINI): Use free_array to release resource.
4714 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4715 (grub_raid5_recover_func_t): New function variable type.
4716 (grub_raid6_recover_func_t): Likewise.
4717 (grub_raid5_recover_func): New variable.
4718 (grub_raid6_recover_func): Likewise.
4719 (grub_raid_register): New function.
4720 (grub_raid_unregister): Likewise.
4721 (grub_raid_rescan): Likewise.
4722 (grub_raid_block_xor): Likewise.
4724 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4725 (CMD_CRC): New macro.
4727 (read_file): Handle device as well as file.
4728 (cmd_crc): New function.
4729 (fstest): Handle multiple disks.
4730 (options): Remove part, raw and long, add root and diskcount.
4731 (usage): Add crc, remove -p, -r, -l, add -r and -c.
4732 (main): Find the first non option entry and ignore subsequent options,
4733 add handling for the new options, support multiple disks.
4735 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4737 2008-08-23 Bean <bean123ch@gmail.com>
4739 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4741 * genfslist.sh: Ignore kernel.mod.
4743 * genpartmaplist.sh: Likewise.
4745 2008-08-23 Robert Millan <rmh@aybabtu.com>
4747 * util/getroot.c (find_root_device): Skip anything that starts with
4748 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4750 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
4752 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4753 * util/grub.d/00_header.in: Allow the administrator to change default
4754 gfxmode via ${GRUB_GFXMODE}.
4756 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
4758 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4760 2008-08-21 Robert Millan <rmh@aybabtu.com>
4762 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4764 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4765 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4767 2008-08-20 Carles Pina i Estany <carles@pina.cat>
4769 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4770 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4772 2008-08-19 Robert Millan <rmh@aybabtu.com>
4774 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4775 (struct grub_virtual_screen): Remove `cursor_color'.
4776 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4778 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4780 2008-08-18 Robert Millan <rmh@aybabtu.com>
4782 Unify (identical) linux_normal.c files.
4783 * loader/i386/efi/linux_normal.c: Move from here ...
4784 * loader/linux_normal.c: ... to here. Update all users.
4785 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4786 * loader/i386/ieee1275/linux_normal.c: Likewise.
4788 2008-08-18 Robert Millan <rmh@aybabtu.com>
4790 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4791 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4792 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4793 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4794 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4796 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4797 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4798 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4799 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4800 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4801 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4802 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4803 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4804 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4805 portably using grub_getxy().
4806 Replace `-EFI' with `-bzImage' in boot message.
4808 2008-08-17 Robert Millan <rmh@aybabtu.com>
4810 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4812 2008-08-17 Robert Millan <rmh@aybabtu.com>
4814 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4816 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4817 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4818 (grub_machine_mmap_iterate): New function declaration.
4819 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4821 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4824 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4825 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4826 Move e820 parsing from here ...
4827 * kern/i386/pc/mmap.c: New file.
4828 (grub_machine_mmap_iterate): ... to here.
4830 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4831 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4832 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4833 (grub_available_iterate): Redeclare to return `void', and redeclare
4834 its hook to use grub_uint64_t as addr and size parameters, and rename
4836 (grub_machine_mmap_iterate): ... this. Update all users.
4838 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4839 to make it more readable. Rename to ...
4840 (grub_machine_mmap_iterate): ... this.
4842 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4843 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4844 (grub_multiboot): Allocate an extra region after the payload, and fill
4845 it with a Multiboot memory map. Adjust a.out loader to calculate size
4846 with the extra space.
4847 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4848 with the extra space.
4850 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4852 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4854 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4856 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4857 mdate-sh to the list `find' searches for.
4858 * DISTLIST: Regenerated.
4860 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4862 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4863 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4864 genmoddep.awk, gensymlist.sh.in.
4865 (DISTDIRS): Add bus, docs, hook, lib.
4866 * DISTLIST: Regenerated.
4867 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4869 2008-08-16 Robert Millan <rmh@aybabtu.com>
4871 * disk/raid.c (grub_raid_init): Handle/report errors set by
4872 grub_device_iterate().
4873 * disk/lvm.c (grub_lvm_init): Likewise.
4875 2008-08-15 Bean <bean123ch@gmail.com>
4877 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4879 (datetime_mod_SOURCES): New macro.
4880 (datetime_mod_CFLAGS): Likewise.
4881 (datetime_mod_LDFLAGS): Likewise.
4882 (date_mod_SOURCES): Likewise.
4883 (date_mod_CFLAGS): Likewise.
4884 (date_mod_LDFLAGS): Likewise.
4885 (datehook_mod_SOURCES): Likewise.
4886 (datehook_mod_CFLAGS): Likewise.
4887 (datehook_mod_LDFLAGS): Likewise.
4889 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4891 (datetime_mod_SOURCES): New macro.
4892 (datetime_mod_CFLAGS): Likewise.
4893 (datetime_mod_LDFLAGS): Likewise.
4894 (date_mod_SOURCES): Likewise.
4895 (date_mod_CFLAGS): Likewise.
4896 (date_mod_LDFLAGS): Likewise.
4897 (datehook_mod_SOURCES): Likewise.
4898 (datehook_mod_CFLAGS): Likewise.
4899 (datehook_mod_LDFLAGS): Likewise.
4901 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4903 (datetime_mod_SOURCES): New macro.
4904 (datetime_mod_CFLAGS): Likewise.
4905 (datetime_mod_LDFLAGS): Likewise.
4906 (date_mod_SOURCES): Likewise.
4907 (date_mod_CFLAGS): Likewise.
4908 (date_mod_LDFLAGS): Likewise.
4909 (datehook_mod_SOURCES): Likewise.
4910 (datehook_mod_CFLAGS): Likewise.
4911 (datehook_mod_LDFLAGS): Likewise.
4913 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4915 (datetime_mod_SOURCES): New macro.
4916 (datetime_mod_CFLAGS): Likewise.
4917 (datetime_mod_LDFLAGS): Likewise.
4918 (date_mod_SOURCES): Likewise.
4919 (date_mod_CFLAGS): Likewise.
4920 (date_mod_LDFLAGS): Likewise.
4921 (datehook_mod_SOURCES): Likewise.
4922 (datehook_mod_CFLAGS): Likewise.
4923 (datehook_mod_LDFLAGS): Likewise.
4925 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4927 (datetime_mod_SOURCES): New macro.
4928 (datetime_mod_CFLAGS): Likewise.
4929 (datetime_mod_LDFLAGS): Likewise.
4930 (date_mod_SOURCES): Likewise.
4931 (date_mod_CFLAGS): Likewise.
4932 (date_mod_LDFLAGS): Likewise.
4933 (datehook_mod_SOURCES): Likewise.
4934 (datehook_mod_CFLAGS): Likewise.
4935 (datehook_mod_LDFLAGS): Likewise.
4937 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4939 * commands/date.c: New file.
4941 * hook/datehook.c: Likewise.
4943 * include/grub/lib/datetime.h: Likewise.
4945 * include/grub/i386/cmos.h: Likewise.
4947 * lib/datetime.c: Likewise.
4949 * lib/i386/datetime.c: Likewise.
4951 * lib/efi/datetime.c: Likewise.
4953 2008-08-14 Robert Millan <rmh@aybabtu.com>
4955 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4956 (grub_mkelfimage_SOURCES): New variable.
4957 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4959 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4960 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4961 * conf/powerpc-ieee1275.rmk: Likewise.
4962 * conf/i386-ieee1275.rmk: Likewise.
4964 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4965 * kern/i386/coreboot/init.c: Likewise.
4967 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4968 with `<grub/cpu/kernel.h>'.
4969 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4971 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4972 * kern/i386/coreboot/startup.S: Likewise.
4974 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4975 (GRUB_MOD_GAP): Remove.
4976 * include/grub/powerpc/kernel.h: New file.
4977 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4978 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4979 * include/grub/i386/kernel.h: New file.
4980 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4981 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4982 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4984 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4986 Use --directory when invoking grub_mkimage.
4988 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4989 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4990 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4991 and GRUB_KERNEL_CPU_PREFIX.
4993 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
4995 * include/grub/err.h (grub_err_printf): New function prototype.
4996 * util/misc.c (grub_err_printf): New function.
4997 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4999 * kern/err.c (grub_print_error): Use grub_err_printf.
5001 2008-08-13 Robert Millan <rmh@aybabtu.com>
5003 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5005 2008-08-13 Robert Millan <rmh@aybabtu.com>
5007 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5010 2008-08-12 Robert Millan <rmh@aybabtu.com>
5012 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5013 of the relocation code from here ...
5014 (grub_multiboot): ... to here.
5015 (forward_relocator, backward_relocator): Move from here ...
5016 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5017 (grub_multiboot_backward_relocator): ... to here.
5018 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5019 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5020 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5021 (grub_multiboot_forward_relocator_end)
5022 (grub_multiboot_backward_relocator)
5023 (grub_multiboot_backward_relocator_end): New variables.
5025 2008-08-12 Bean <bean123ch@gmail.com>
5027 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5029 2008-08-11 Robert Millan <rmh@aybabtu.com>
5031 * kern/i386/linuxbios/startup.S: Move from here ...
5032 * kern/i386/coreboot/startup.S: ... to here.
5034 * kern/i386/linuxbios/init.c: Move from here ...
5035 * kern/i386/coreboot/init.c: ... to here.
5037 * kern/i386/linuxbios/table.c: Move from here ...
5038 * kern/i386/coreboot/mmap.c: ... to here.
5040 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5042 2008-08-11 Robert Millan <rmh@aybabtu.com>
5044 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5045 errors. Leave it to the upper layer to handle them.
5047 2008-08-09 Christian Franke <franke@computer.org>
5049 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5050 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5051 Install `grub.d/10_windows' only on Cygwin.
5052 * configure.ac: Add subst of `target_os'.
5053 Check `target_os' also before setting TARGET_OBJ2ELF.
5054 Add `--enable-grub-pe2elf'.
5056 2008-08-08 Robert Millan <rmh@aybabtu.com>
5058 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5059 (grub_last_time): Change type to grub_uint64_t.
5060 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5061 (grub_disk_close): Likewise.
5063 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5064 (run_menu): Migrate code from to using grub_get_time_ms().
5066 * util/misc.c (grub_get_time_ms): New function.
5068 2008-08-08 Marco Gerards <marco@gnu.org>
5070 * disk/ata.c (grub_ata_regget): Change return type to
5072 (grub_ata_regget2): Likewise.
5073 (grub_ata_wait_status): New function.
5074 (grub_ata_wait_busy): Removed function, updated all users to use
5075 `grub_ata_wait_status'.
5076 (grub_ata_wait_drq): Likewise.
5077 (grub_ata_cmd): New function.
5078 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5080 (grub_ata_pio_write): Add error handling.
5081 (grub_atapi_identify): Likewise.
5082 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5084 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5085 handling. Actually use the detected registers. Reorder the
5086 detection logic such that it is easier to read.
5087 (grub_ata_pciinit): Do not assign the same ID to each controller.
5088 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5090 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5092 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5094 2008-08-08 Marco Gerards <marco@gnu.org>
5098 2008-08-07 Bean <bean123ch@gmail.com>
5100 * include/grub/x86_64/pci.h: New file.
5102 2008-08-07 Christian Franke <franke@computer.org>
5104 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5105 (TIMER2_GATE): Likewise.
5106 (grub_pit_wait): Add enable/disable of the timer2 gate
5107 bit of port 0x61. This fixes a possible infinite loop.
5109 2008-08-07 Bean <bean123ch@gmail.com>
5111 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5112 kern/i386/tsc.c and kern/i386/pit.c.
5114 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5117 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5120 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5122 2008-08-07 Bean <bean123ch@gmail.com>
5124 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5126 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5128 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5129 multiple inclusion. Add #include <grub/types.h>.
5131 2008-08-06 Christian Franke <franke@computer.org>
5133 * conf/common.rmk: Build and install `10_windows'.
5134 * util/grub.d/10_windows.in: New script.
5136 2008-08-06 Pavel Roskin <proski@gnu.org>
5138 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5140 2008-08-06 Robert Millan <rmh@aybabtu.com>
5142 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5143 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5145 2008-08-06 Bean <bean123ch@gmail.com>
5147 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5148 (grub_pxefs_fs_int): Remove dummy definition.
5149 (grub_pxefs_open): Use data->block_size to store the current block
5151 (grub_pxefs_read): Use block size stored in data->block_size. As the
5152 value of grub_pxe_blksize can be changed after the file is opened.
5154 2008-08-06 Bean <bean123ch@gmail.com>
5156 * fs/i386/pc/pxe.c (curr_file): new variable.
5157 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5158 require the dummy internal file system anymore.
5159 (grub_pxefs_read): Removed.
5160 (grub_pxefs_close): Likewise.
5161 (grub_pxefs_fs_int): Likewise.
5162 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5163 connection when we switch file.
5164 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5166 2008-08-06 Robert Millan <rmh@aybabtu.com>
5168 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5170 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5171 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5173 * kern/i386/halt.c: New file.
5174 * kern/i386/reboot.c: Likewise.
5175 * include/grub/i386/reboot.h: Likewise.
5176 * include/grub/i386/halt.h: Likewise.
5178 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5179 Include `<grub/cpu/halt.h>'.
5180 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5181 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5183 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5184 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5185 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5186 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5187 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5188 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5190 * include/grub/i386/at_keyboard.h: ... to here.
5192 2008-08-05 Robert Millan <rmh@aybabtu.com>
5194 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5195 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5196 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5197 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5198 `kern/generic/millisleep.c'.
5200 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5201 instead of grub_get_rtc().
5202 (grub_tsc_init): Initialize `tsc_boot_time'.
5204 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5205 (grub_machine_init): Use grub_tsc_init() rather than
5206 installing an RTC-based handler via grub_install_get_time_ms().
5208 * kern/i386/pit.c: New file.
5209 * include/grub/i386/pit.h: Likewise.
5211 2008-08-05 Bean <bean123ch@gmail.com>
5213 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5215 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5216 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5217 (pxe_mod_SOURCES): New macro.
5218 (pxe_mod_CFLAGS): Likewise.
5219 (pxe_mod_LDFLAGS): Likewise.
5220 (pxecmd_mod_SOURCES): Likewise.
5221 (pxecmd_mod_CFLAGS): Likewise.
5222 (pxecmd_mod_LDFLAGS): Likewise.
5224 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5225 (grub_pxe_call): Likewise.
5227 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5229 * commands/i386/pc/pxecmd.c: New file.
5231 * fs/i386/pc/pxe.c: Likewise.
5233 * include/grub/i386/pc/pxe.h: Likewise.
5235 2008-08-05 Bean <bean123ch@gmail.com>
5237 * util/console.c (grub_console_cur_color): New variable.
5238 (grub_console_standard_color): Likewise.
5239 (grub_console_normal_color): Likewise.
5240 (grub_console_highlight_color): Likewise.
5241 (color_map): Likewise.
5242 (use_color): Likewise.
5243 (NUM_COLORS): New macro.
5244 (grub_ncurses_setcolorstate): Handle color properly.
5245 (grub_ncurses_setcolor): Don't change color here, just remember the
5246 settings, color will be set in grub_ncurses_setcolorstate.
5247 (grub_ncurses_getcolor): New function.
5248 (grub_ncurses_init): Initialize color pairs.
5249 (grub_ncurses_term): New member grub_ncurses_getcolor.
5251 2008-08-05 Colin D Bennett <colin@gibibit.com>
5253 High resolution timer support. Implemented for x86 CPUs using TSC.
5254 Extracted generic grub_millisleep() so it's linked in only as needed.
5255 This requires a Pentium compatible CPU; if the RDTSC instruction is
5256 not supported, then it falls back on the generic grub_get_time_ms()
5257 implementation that uses the machine's RTC.
5259 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5260 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5261 `kern/generic/millisleep.c'.
5263 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5264 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5266 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5267 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5269 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5271 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5272 `kern/generic/millisleep.c'.
5274 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5276 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5278 * kern/generic/rtc_get_time_ms.c: New file.
5280 * kern/generic/millisleep.c: New file.
5282 * kern/misc.c: Don't include
5283 <kern/time.h> anymore.
5284 (grub_millisleep_generic): Removed.
5286 * commands/sleep.c (grub_interruptible_millisleep): Uses
5287 grub_get_time_ms() instead of grub_get_rtc().
5289 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5291 (grub_cpu_is_cpuid_supported): New inline function.
5292 (grub_cpu_is_tsc_supported): New inline function.
5293 (grub_tsc_init): New function prototype.
5294 (grub_tsc_get_time_ms): New function prototype.
5296 * kern/i386/tsc.c (grub_get_time_ms): New file.
5298 * include/grub/time.h: Include <grub/types.h.
5299 (grub_millisleep_generic): Removed.
5300 (grub_get_time_ms): New prototype.
5301 (grub_install_get_time_ms): New prototype.
5302 (grub_rtc_get_time_ms): New prototype.
5304 * kern/time.c (grub_get_time_ms): New function.
5305 (grub_install_get_time_ms): New function.
5307 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5308 <grub/time.h> anymore.
5309 (grub_millisleep): Removed.
5310 (grub_machine_init): Call grub_tsc_init.
5312 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5313 get_time_ms() implementation.
5315 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5316 (ieee1275_get_time_ms): New function.
5317 (grub_machine_init): Install get_time_ms() implementation.
5319 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5320 (grub_machine_init): Call grub_tsc_init().
5321 (grub_millisleep): Removed.
5323 * kern/ieee1275/init.c (grub_millisleep): Removed.
5324 (grub_machine_init): Install ieee1275_get_time_ms()
5326 (ieee1275_get_time_ms): New function.
5327 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5330 2008-08-05 Marco Gerards <marco@gnu.org>
5332 * disk/ata.c: Include <grub/pci.h>.
5333 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5334 (grub_ata_initialize): Rewritten.
5335 (grub_ata_device_initialize): New function.
5337 2008-08-04 Pavel Roskin <proski@gnu.org>
5339 * kern/main.c: Include grub/mm.h.
5341 2008-08-04 Robert Millan <rmh@aybabtu.com>
5343 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5344 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5345 corruption problem).
5347 2008-08-04 Robert Millan <rmh@aybabtu.com>
5349 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5350 warnings introduced in my last commit.
5352 2008-08-03 Robert Millan <rmh@aybabtu.com>
5354 Make PCI available on all i386 architectures.
5356 * include/grub/i386/pc/pci.h: Move from here ...
5357 * include/grub/i386/pci.h: ... to here.
5359 * include/grub/i386/pc/pci.h: Remove.
5360 * include/grub/i386/efi/pci.h: Remove.
5361 * include/grub/x86_64/efi/pci.h: Remove.
5363 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5366 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5367 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5368 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5370 * conf/i386-ieee1275.rmk: Likewise.
5372 2008-08-03 Robert Millan <rmh@aybabtu.com>
5374 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5375 (grub_console_setcursor): Make it possible to set cursor off.
5377 2008-08-03 Robert Millan <rmh@aybabtu.com>
5379 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5380 of modules instead of assuming which platform provides what.
5381 * util/update-grub.in: Likewise.
5383 2008-08-03 Robert Millan <rmh@aybabtu.com>
5385 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5386 instead of `grub_install_dos_part' to determine whether a drive needs
5387 to be prepended to prefix (`grub_install_dos_part' is not reliable,
5388 because it can be overridden when loading GRUB via Multiboot).
5390 2008-08-02 Robert Millan <rmh@aybabtu.com>
5392 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5394 2008-08-02 Robert Millan <rmh@aybabtu.com>
5396 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5397 of informational grub_dprintf() calls.
5399 2008-08-02 Robert Millan <rmh@aybabtu.com>
5401 * disk/memdisk.c (memdisk_size): Don't initialize.
5402 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5404 * include/grub/i386/pc/kernel.h
5405 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5406 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5407 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5408 (grub_arch_memdisk_size): Remove.
5410 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5411 field (was only used to transfer a constant). Add `type' field to
5412 support multiple module types.
5413 (grub_module_iterate): New function.
5415 * kern/device.c (grub_device_open): Do not hide error messages
5416 when grub_disk_open() fails. Use grub_print_error() instead.
5418 * kern/i386/pc/init.c (grub_arch_modules_addr)
5419 (grub_arch_memdisk_size): Remove functions.
5420 (grub_arch_modules_addr): Return the module address in high memory
5421 (now that it isn't copied anymore).
5423 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5424 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5425 decompression routine (grub_total_module_size already includes that
5426 now). Don't copy modules back to low memory.
5428 * kern/main.c: Include `<grub/mm.h>'.
5429 (grub_load_modules): Split out (and use) ...
5430 (grub_module_iterate): ... this function, which iterates through
5431 module objects and runs a hook.
5432 Comment out grub_mm_init_region() call, as it would cause non-ELF
5433 modules to be overwritten.
5435 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5436 the memdisk image in its own region, make it part of the module list.
5437 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5438 (main): Parse --memdisk|-m option, and pass user-provided path as
5439 parameter to generate_image().
5440 (add_segments): Pass `memdisk_path' down to load_modules().
5441 (load_modules): Embed memdisk image in module section when requested.
5442 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5443 `header.type' instead of `header.offset'.
5445 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5446 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5447 (memdisk_mod_LDFLAGS): New variables.
5448 * conf/i386-coreboot.rmk: Likewise.
5449 * conf/i386-ieee1275.rmk: Likewise.
5451 2008-08-02 Robert Millan <rmh@aybabtu.com>
5453 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5454 (backward_relocator): New variables. Used to allocate and relocate
5455 the payload, respectively.
5456 (grub_multiboot_load_elf32): Load into heap instead of requested
5457 address, install the appropriate relocator code in each bound of
5458 the payload, and set the entry point such that
5459 grub_multiboot_real_boot() will jump to one of them.
5461 * kern/i386/loader.S (grub_multiboot_payload_size)
5462 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5463 (grub_multiboot_payload_entry_offset): New variables.
5464 (grub_multiboot_real_boot): Set cpu context to what the relocator
5465 expects, and jump to the relocator instead of the payload.
5467 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5468 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5469 (grub_multiboot_payload_entry_offset): Export.
5471 2008-08-01 Bean <bean123ch@gmail.com>
5473 * normal/menu_entry.c (editor_getline): Don't return the original
5474 string as result, as it will be released by lexer once it has done
5477 2008-08-01 Robert Millan <rmh@aybabtu.com>
5479 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5480 within menuentries, not before them.
5481 util/grub.d/10_hurd.in: Likewise.
5483 2008-08-01 Bean <bean123ch@gmail.com>
5485 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5486 (bufio_mod_SOURCES): New macro.
5487 (bufio_mod_CFLAGS): Likewise.
5488 (bufio_mod_LDFLAGS): Likewise.
5490 * include/grub/bufio.h: New file.
5492 * io/bufio.c: Likewise.
5494 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5495 (grub_video_reader_png): Use grub_buffile_open to open file.
5497 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5498 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5500 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5501 (grub_video_reader_tga): Use grub_buffile_open to open file.
5503 * font/manager.c: Include <grub/bufio.h>.
5504 (add_font): Use grub_buffile_open to open file.
5506 2008-07-31 Robert Millan <rmh@aybabtu.com>
5508 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5509 ELF segments, use a macro for arbitrarily accessing any of them instead
5510 of preparing a pointer that allows access to one at a time.
5511 (grub_multiboot_load_elf64): Likewise.
5513 2008-07-31 Bean <bean123ch@gmail.com>
5515 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5516 GRUB_KERNEL_MACHINE_DATA_END.
5518 2008-07-30 Robert Millan <rmh@aybabtu.com>
5520 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5521 Increase from 0x50 to 0x60.
5522 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5523 use UUIDs to identify the root drive for them. If that's not
5525 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5526 check, for cross-disk installs.
5528 2008-07-30 Robert Millan <rmh@aybabtu.com>
5530 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5531 is non-empty, use it to set the `prefix' environment variable instead
5532 of the usual approach.
5533 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5534 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5535 environment variable instead of dummy make_install_device().
5537 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5538 (start): Insert a data section, with `grub_prefix' variable.
5539 * kern/i386/linuxbios/startup.S: Likewise.
5541 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5542 New variable reference.
5543 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5544 New macro. Defines offset of `grub_prefix' within startup.S (relative
5546 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5547 section within startup.S (relative to `start').
5548 * include/grub/i386/coreboot/kernel.h: Likewise.
5550 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5551 Overwrite grub_prefix with its contents, at the beginning of the
5553 (main): Understand -p|--prefix.
5555 2008-07-30 Robert Millan <rmh@aybabtu.com>
5557 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5559 2008-07-30 Robert Millan <rmh@aybabtu.com>
5561 * term/i386/pc/vga_text.c (grub_console_cls): Use
5562 grub_console_gotoxy() to go back to beginning of the screen.
5563 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5565 2008-07-29 Christian Franke <franke@computer.org>
5567 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5568 Add conversion of emulated mount points on Cygwin.
5570 2008-07-29 Christian Franke <franke@computer.org>
5572 * util/update-grub.in: Add a check for admin
5574 Remove old `grub.cfg.new' before creation.
5575 Add `-f' to `mv' to handle the different filesystem
5576 semantics of Windows.
5578 2008-07-29 Bean <bean123ch@gmail.com>
5580 * normal/main.c (get_line): Fix buffer overflow bug.
5582 2008-07-28 Robert Millan <rmh@aybabtu.com>
5584 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5585 (struct grub_apple_header): New struct. Describes the layout of
5587 (apple_partition_map_iterate): Check the header magic as well as the
5588 partition magic (which was already being checked).
5590 2008-07-28 Pavel Roskin <proski@gnu.org>
5592 * genmk.rb: Add a warning to the beginning of the output that
5593 it's a generated file and should not be edited.
5595 2008-07-28 Robert Millan <rmh@aybabtu.com>
5597 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5598 with the same number are found, just use issue a warning with
5599 grub_dprintf(), as this error has been reported to be non-fatal.
5601 2008-07-27 Robert Millan <rmh@aybabtu.com>
5603 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5606 2008-07-27 Bean <bean123ch@gmail.com>
5608 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5609 (grub_fat_find_dir): Ignore case when comparing filename.
5611 2008-07-27 Bean <bean123ch@gmail.com>
5613 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5614 smallino, as it's more descriptive, and i8count can be confused with
5615 the other field count.
5616 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5619 2008-07-27 Bean <bean123ch@gmail.com>
5621 * commands/crc.c: New file.
5623 * lib/crc.c: Likewise.
5625 * include/grub/lib/crc.h: Likewise.
5627 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5629 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5630 (hexdump): Move this function to ...
5632 * lib/hexdump.c: ... here.
5634 * include/grub/hexdump.h: Renamed to ...
5636 * include/grub/lib/hexdump.h: ... this.
5638 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5640 * util/grub-editenv.c: Likewise.
5642 * include/envblk.h: Renamed to ...
5644 * include/lib/envblk.h: ... this.
5646 * util/envblk.c: Renamed to ...
5648 * lib/envblk.c: ... this.
5650 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5652 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5653 (pkglib_MODULES): Add crc.mod.
5654 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5655 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5656 (crc_mod_SOURCES): New macro.
5657 (crc_mod_CFLAGS): Likewise.
5658 (crc_mod_LDFLAGS): Likewise.
5660 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5662 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5664 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5668 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5670 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
5672 * commands/help.c: Include <grub/term.h>.
5673 (TERM_WIDTH): Removed. Updated all users.
5675 2008-07-27 Pavel Roskin <proski@gnu.org>
5677 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5678 spurious warnings about a comment within a comment.
5680 2008-07-25 Robert Millan <rmh@aybabtu.com>
5682 * util/getroot.c (find_root_device): Skip devices that match
5683 /dev/dm-[0-9]. This lets the real device be found for any type of
5684 abstraction (LVM, EVMS, RAID..).
5685 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5686 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5687 device is found first, find_root_device() will now skip it.
5689 2008-07-24 Pavel Roskin <proski@gnu.org>
5691 * include/grub/types.h: Use __builtin_bswap32() and
5692 __builtin_bswap64() with gcc 4.3 and newer.
5694 2008-07-24 Christian Franke <franke@computer.org>
5696 * util/i386/pc/grub-install.in: If `--debug' is specified,
5697 pass `--verbose' to grub-setup.
5698 Abort script if make_system_path_relative_to_its_root() fails.
5700 2008-07-24 Bean <bean123ch@gmail.com>
5702 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5703 variable `target_platform' should be `platform'.
5705 2008-07-24 Bean <bean123ch@gmail.com>
5707 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5708 (grub_png_init_fixed_block): New function.
5709 (grub_png_decode_image_data): Handle fixed huffman code compression.
5711 2008-07-24 Bean <bean123ch@gmail.com>
5713 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5714 (grub_pe2elf_SOURCES): New macro.
5715 (CLEANFILES): Add grub-pe2elf.
5717 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5718 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5719 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5720 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5721 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5722 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5723 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5724 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5725 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5726 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5727 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5728 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5729 (GRUB_PE32_DT_FUNCTION): Likewise.
5730 (GRUB_PE32_REL_I386_DIR32): Likewise.
5731 (GRUB_PE32_REL_I386_REL32): Likewise.
5732 (grub_pe32_symbol): New structure.
5733 (grub_pe32_reloc): Likewise.
5735 * util/grub-pe2elf.c: New file.
5737 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5738 start symbol in non pc platform.
5740 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5742 The following patches are from Christian Franke.
5744 * include/grub/dl.h: Remove .previous, gas supports this only
5747 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5748 Remove .type, gas supports this only for ELF format.
5750 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5751 nullbytes in symbol table. This fixes an infinite loop if table is
5754 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5755 TARGET_IMG_LDFLAGS and EXEEXT.
5757 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5758 TARGET_IMG_LDFLAGS_AC.
5759 (grub_CHECK_STACK_ARG_PROBE): New function.
5761 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5763 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5765 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5766 to set TARGET_IMG_LD* accordingly.
5767 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5768 Add call to grub_CHECK_STACK_ARG_PROBE.
5769 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5771 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5773 * genmk.rb: Add EXEEXT to CLEANFILES.
5775 2008-07-23 Robert Millan <rmh@aybabtu.com>
5777 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5778 define the codes for arrows and lines used for the menu).
5779 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5782 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5783 fonts, because the latter are too slow.
5785 2008-07-21 Bean <bean123ch@gmail.com>
5787 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5788 a20. Run keyboard test last, as it will cause macbook to halt.
5790 2008-07-18 Pavel Roskin <proski@gnu.org>
5792 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5793 load foreign architecture modules correctly anyway. Keep
5794 support for loading host architecture modules, whether we
5795 compile them or not.
5797 2008-07-17 Pavel Roskin <proski@gnu.org>
5799 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5800 change target_cpu. The compiler default can mismatch target_cpu
5803 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5804 * kern/efi/efi.c: Likewise.
5806 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5807 target compiler is functional.
5808 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5811 * configure.ac: Default to efi platform for x86_64-apple. Allow
5812 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5813 adjustments from the rest, only do them if target is not
5814 explicitly given. Merge other adjustments with the final sanity
5815 check. Remove an extraneous check for supported CPU. Be
5816 specific which CPU and which platform is not supported.
5818 * configure.ac: Default to pc platform for x86_64.
5820 2008-07-17 Robert Millan <rmh@aybabtu.com>
5822 Partial LinuxBIOS -> Coreboot rename.
5824 * conf/i386-linuxbios.rmk: Renamed to ...
5825 * conf/i386-coreboot.rmk: ... this.
5826 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5827 * configure.ac: Accept "coreboot" as input platform (but maintain
5828 compatibility with "linuxbios").
5829 * include/grub/i386/linuxbios: Renamed to ...
5830 * include/grub/i386/coreboot: ... this.
5832 2008-07-17 Bean <bean123ch@gmail.com>
5834 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5835 (appleldr_mod_SOURCE): New variable.
5836 (appleldr_mod_CFLAGS): Likewise.
5837 (appleldr_mod_LDFLAGS): Likewise.
5838 (pci_mod_SOURCES): Likewise.
5839 (pci_mod_CFLAGS): Likewise.
5840 (pci_mod_LDFLAGS): Likewise.
5841 (lspci_mod_SOURCES): Likewise.
5842 (lspci_mod_CFLAGS): Likewise.
5843 (lspci_mod_LDFLAGS): Likewise.
5845 * conf/x86_64-efi.rmk: New file.
5847 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5849 (grub_efidisk_write): Likewise.
5851 * include/efi/api.h (efi_call_0): New macro.
5852 (efi_call_1): Likewise.
5853 (efi_call_2): Likewise.
5854 (efi_call_3): Likewise.
5855 (efi_call_4): Likewise.
5856 (efi_call_5): Likewise.
5857 (efi_call_6): Likewise.
5859 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5860 grub_rescue_cmd_chainloader.
5862 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5863 (grub_pe32_optional_header): Change some fields based on i386 or
5865 (GRUB_PE32_PE32_MAGIC): Likewise.
5867 * include/grub/efi/uga_draw.h: New file.
5869 * include/grub/elf.h (STN_ABS): New constant.
5870 (R_X86_64_NONE): Relocation constant for x86_64.
5871 (R_X86_64_64): Likewise.
5872 (R_X86_64_PC32): Likewise.
5873 (R_X86_64_GOT32): Likewise.
5874 (R_X86_64_PLT32): Likewise.
5875 (R_X86_64_COPY): Likewise.
5876 (R_X86_64_GLOB_DAT): Likewise.
5877 (R_X86_64_JUMP_SLOT): Likewise.
5878 (R_X86_64_RELATIVE): Likewise.
5879 (R_X86_64_GOTPCREL): Likewise.
5880 (R_X86_64_32): Likewise.
5881 (R_X86_64_32S): Likewise.
5882 (R_X86_64_16): Likewise.
5883 (R_X86_64_PC16): Likewise.
5884 (R_X86_64_8): Likewise.
5885 (R_X86_64_PC8): Likewise.
5887 * include/grub/i386/efi/pci.h: New file.
5889 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5890 Change it value based on platform.
5891 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5892 (GRUB_E820_RAM): Likewise.
5893 (GRUB_E820_RESERVED): Likewise.
5894 (GRUB_E820_ACPI): Likewise.
5895 (GRUB_E820_NVS): Likewise.
5896 (GRUB_E820_EXEC_CODE): Likewise.
5897 (GRUB_E820_MAX_ENTRY): Likewise.
5898 (grub_e820_mmap): New structure.
5899 (linux_kernel_header): Change the efi field according to different
5900 kernel version, also field from linux_kernel_header.
5902 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5904 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5905 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5906 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5907 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5908 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5909 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5910 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5911 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5912 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5913 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5915 * include/grub/x86_64/efi/kernel.h: New file.
5917 * include/grub/x86_64/efi/loader.h: Likewise.
5919 * include/grub/x86_64/efi/machine.h: Likewise.
5921 * include/grub/x86_64/efi/pci.h: Likewise.
5923 * include/grub/x86_64/efi/time.h: Likewise.
5925 * include/grub/x86_64/linux.h: Likewise.
5927 * include/grub/x86_64/setjmp.h: Likewise.
5929 * include/grub/x86_64/time.h: Likewise.
5931 * include/grub/x86_64/types.h: Likewise.
5933 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5934 GRUB_TARGET_SIZEOF_VOID_P.
5936 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5937 (grub_efi_locate_handle): Likewise.
5938 (grub_efi_open_protocol): Likewise.
5939 (grub_efi_set_text_mode): Likewise.
5940 (grub_efi_stall): Likewise.
5941 (grub_exit): Likewise.
5942 (grub_reboot): Likewise.
5943 (grub_halt): Likewise.
5944 (grub_efi_exit_boot_services): Likewise.
5945 (grub_get_rtc): Likewise.
5947 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5948 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5949 (grub_efi_allocate_pages): Wrap efi calls.
5950 (grub_efi_free_pages): Wrap efi calls.
5951 (grub_efi_get_memory_map): Wrap efi calls.
5953 * kern/x86_64/dl.c: New file.
5955 * kern/x86_64/efi/callwrap.S: Likewise.
5957 * kern/x86_64/efi/startup.S: Likewise.
5959 * loader/efi/appleloader.c: Likewise.
5961 * loader/efi/chainloader.c (cmdline): New variable.
5962 (grub_chainloader_unload): Wrap efi calls.
5963 (grub_chainloader_boot): Likewise.
5964 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5967 * loader/efi/chainloader_normal.c (chainloader_command):
5968 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5971 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5973 (grub_e820_add_region): New function.
5974 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5976 (grub_find_video_card): New function.
5977 (grub_linux_setup_video): New function.
5978 (grub_rescue_cmd_linux): Probe for video information.
5980 * normal/x86_64/setjmp.S: New file.
5982 * term/efi/console.c (map_char): New function.
5983 (grub_console_putchar): Map unicode char.
5984 (grub_console_checkkey): Wrap efi calls.
5985 (grub_console_getkey): Likewise.
5986 (grub_console_getwh): Likewise.
5987 (grub_console_gotoxy): Likewise.
5988 (grub_console_cls): Likewise.
5989 (grub_console_setcolorstate): Likewise.
5990 (grub_console_setcursor): Likewise.
5992 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5994 2008-07-16 Pavel Roskin <proski@gnu.org>
5996 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5999 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6000 pointer, not an integer. This fixes a warning and prevents
6001 precision loss on 64-bit systems.
6002 (relocate_addresses): Remove unneeded cast.
6004 2008-07-15 Pavel Roskin <proski@gnu.org>
6006 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6008 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6010 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6011 Fix comparison between signed and unsigned.
6013 * include/grub/i386/ieee1275/console.h: Declare
6014 grub_console_init() and grub_console_fini().
6016 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6017 It's empty and unused.
6019 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6020 beginning to avoid warnings with some compilers.
6022 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6023 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6025 2008-07-14 Pavel Roskin <proski@gnu.org>
6027 * kern/env.c (grub_register_variable_hook): Don't copy empty
6028 string, it leaks memory. Pass "" to grub_env_set(), it should
6029 handle constant strings.
6031 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6032 * commands/cmp.c (grub_cmd_cmp): Likewise.
6033 * kern/dl.c (grub_dl_flush_cache): Likewise.
6034 (grub_dl_load_core): Likewise.
6035 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6036 (grub_elf64_load_phdrs): Likewise.
6038 2008-07-13 Pavel Roskin <proski@gnu.org>
6040 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6041 between signed and unsigned.
6042 (LzmaEnc_Finish): Fix warning about an unused parameter.
6044 2008-07-13 Bean <bean123ch@gmail.com>
6046 * Makefile.in (enable_lzo): New rule.
6048 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6050 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6052 * boot/i386/pc/lnxboot.S: #include <config.h>.
6054 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6055 its value according to the compression algorithm used, lzo or lzma.
6057 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6058 compression algorithm according to configure macro.
6060 * kern/i386/pc/startup.S (codestart): Likewise.
6062 * kern/i386/pc/lzma_decode.S: New file.
6064 * include/grub/lib/LzFind.h: Likewise.
6066 * include/grub/lib/LzHash.h: Likewise.
6068 * include/grub/lib/LzmaDec.h: Likewise.
6070 * include/grub/lib/LzmaEnc.h: Likewise.
6072 * include/grub/lib/LzmaTypes.h: Likewise.
6074 * lib/LzFind.c: Likewise.
6076 * lib/LzmaDec.c: Likewise.
6078 * lib/LzmaEnc.c: Likewise.
6080 2008-07-13 Bean <bean123ch@gmail.com>
6082 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6083 (grub_ext4_extent_header): New structure.
6084 (grub_ext4_extent): Likewise.
6085 (grub_ext4_extent_idx): Likewise.
6086 (grub_ext4_find_leaf): New function.
6087 (grub_ext2_read_block): Handle extents.
6089 2008-07-12 Robert Millan <rmh@aybabtu.com>
6091 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6093 2008-07-11 Robert Millan <rmh@aybabtu.com>
6095 * util/grub.d/40_custom.in: New file. Example on how to add custom
6096 entries to /etc/grub.d.
6097 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6098 40_custom (implicitly, by merging all the grub.d rules).
6100 2008-07-11 Pavel Roskin <proski@gnu.org>
6102 * commands/read.c (grub_getline): Fix invalid memory access.
6103 Don't add newline to the variable value.
6105 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6106 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6107 (serial_hw_get_port): Check validity of the port number.
6108 (grub_cmd_serial): Check return value of serial_hw_get_port().
6110 2008-07-07 Pavel Roskin <proski@gnu.org>
6112 * boot/i386/pc/diskboot.S (notification_string): Replace
6113 "Loading kernel" with just "loading". This is shorter, less
6114 confusing and saves a few bytes for possible future changes.
6116 2008-07-05 Pavel Roskin <proski@gnu.org>
6118 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6119 size for ATAPI devices, they are undefined. Output sector
6120 number in decimal form.
6122 * disk/ata.c: Use named constants for status bits.
6124 2008-07-04 Pavel Roskin <proski@gnu.org>
6126 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6127 grub_addr_t before casting it to the void pointer to fix a
6128 warning. Non-addressable regions are discarded earlier.
6129 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6130 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6131 (check_signature): Don't shadow table_header.
6132 (grub_linuxbios_table_iterate): Cast numeric constants to
6133 grub_linuxbios_table_header_t.
6134 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6137 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6140 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6141 pointer, which can cause warnings. Support 64-bit addresses.
6143 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6144 of sizeof(long). This fixes PowerPC image generation on x86_64.
6146 2008-07-04 Robert Millan <rmh@aybabtu.com>
6148 This fixes a performance issue when pc & gpt partmap iterators
6149 didn't abort iteration even after our hook found what it was
6150 looking for (often causing expensive probes of non-existent drives).
6152 Some callers relied on previous buggy behaviour, since they would
6153 raise an error when their own hooks caused early abortion of its
6156 * kern/device.c (grub_device_open): Improve error message.
6157 * disk/lvm.c (grub_lvm_open): Likewise.
6158 * disk/raid.c (grub_raid_open): Likewise.
6160 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6161 when hook requests it, independently of grub_errno.
6162 (pc_partition_map_probe): Do not fail when find_func() caused
6163 early abortion of pc_partition_map_iterate().
6165 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6166 when hook requests it, independently of grub_errno.
6167 (gpt_partition_map_probe): Do not fail when find_func() caused
6168 early abortion of gpt_partition_map_iterate().
6170 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6171 when hook requests it, independently of grub_errno. Do not fail when
6172 part_map_iterate_hook() caused early abortion of p->iterate().
6174 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6175 when grub_partition_iterate() returned with non-zero.
6177 2008-07-03 Pavel Roskin <proski@gnu.org>
6179 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6180 like we do in grub_ata_pio_read().
6181 (grub_ata_readwrite): Always write individual sectors. Fix the
6182 sector count for the remainder.
6183 (grub_ata_write): Enable writing to ATA devices. Correctly
6184 report error for ATAPI devices.
6186 2008-07-02 Pavel Roskin <proski@gnu.org>
6188 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6191 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6192 for every read sector, we already increment it for the whole
6193 batch. This fixes reading more than 256 sectors at once.
6195 * util/grub-editenv.c (cmd_info): Cast argument to long
6196 explicitly. ptrdiff_t reduces to int on i386.
6198 * util/grub-editenv.c (main): Be specific which parameter is
6201 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6202 (memdisk): Make memdisk_orig_addr a pointer.
6204 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6205 for file offsets, use grub_off_t instead. Fix printf format
6208 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6209 there. Real unexpected warnings should not drown in the noise
6210 about known problems.
6212 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6213 grub_disk_addr_t for memory addresses.
6215 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6216 explicitly to fix a warning.
6218 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6220 * Makefile.in (MODULE_LDFLAGS): New variable.
6221 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6222 the linker accepts --build-id=none.
6223 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6225 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6227 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6228 those in Linux XFS code. Provide a way to access 64-bit parent
6230 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6231 the end of struct grub_xfs_dir_header.
6233 2008-07-02 Bean <bean123ch@gmail.com>
6235 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6236 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6237 and GRUB_IEEE1275_FLAG_NO_ANSI.
6239 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6240 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6241 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6243 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6244 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6246 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6247 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6249 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6250 esc sequence on non ANSI terminal.
6251 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6253 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6256 2008-07-02 Bean <bean123ch@gmail.com>
6258 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6259 (grub_editenv_SOURCES): New variable.
6260 (pkglib_MODULES): Add loadenv.mod.
6261 (loadenv_mod_SOURCES): New variable.
6262 (loadenv_mod_CFLAGS): Likewise.
6263 (loadenv_mod_LDFLAGS): Likewise.
6265 * include/grub/envblk.h: New file.
6267 * util/envblk.c: New file.
6269 * util/grub-editenv.c: New file.
6271 * commands/loadenv.c: New file.
6273 2008-07-01 Pavel Roskin <proski@gnu.org>
6275 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6276 not unsigned char. This fixes warnings and is consistent with
6279 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6281 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6283 * term/tparm.c (analyze): Always set *popcount.
6285 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6286 cast to fix a warning.
6288 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6289 cast to suppress a warning.
6291 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6292 grub_fshelp_read_file() expects.
6294 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6295 write uuid as a 32-bit value in CPU byte order, so declare and
6298 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6299 long if the format specifier expects it.
6300 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6301 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6302 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6303 long to fix a warning.
6304 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6305 grub_dprintf() arguments to fix warnings.
6307 2008-06-30 Pavel Roskin <proski@gnu.org>
6309 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6310 install_bsd_part immediately before core.img is embedded or
6311 modified on disk. This fixes core.img verification if core.img
6314 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6315 core_path to calculate the blocklist.
6316 Patch from Javier MartÃn <lordhabbit@gmail.com>
6318 2008-06-29 Robert Millan <rmh@aybabtu.com>
6320 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6321 block to disk block.
6322 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6323 Patch from Niels Böhm <bitbucket@arcor.de>
6325 2008-06-29 Robert Millan <rmh@aybabtu.com>
6327 * util/update-grub_lib.in (font_path): Search for fonts in
6328 /boot/grub first, which is more likely to be readable (we aren't
6329 deciding where fonts live, just looking for them).
6331 2008-06-26 Pavel Roskin <proski@gnu.org>
6333 * util/biosdisk.c (read_device_map): Don't leave dead map
6334 entries for devices failing stat() check.
6336 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6337 core_path_dev for the core.img path on the target device.
6339 2008-06-26 Robert Millan <rmh@aybabtu.com>
6341 * disk/fs_uuid.c: New file.
6342 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6343 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6344 (fs_uuid_mod_LDFLAGS): New variables.
6345 * include/grub/disk.h (grub_disk_dev_id): Add
6346 `GRUB_DISK_DEVICE_UUID_ID'.
6347 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6348 implement iterate().
6350 2008-06-26 Robert Millan <rmh@aybabtu.com>
6352 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6353 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6354 Linux image includes no initrd.
6356 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
6358 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6359 call to resolve the core image location that effectively appended the
6362 2008-06-21 Robert Millan <rmh@aybabtu.com>
6364 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6367 * util/grub.d/10_hurd.in: ... to here ...
6368 * util/grub.d/10_linux.in: ... and here.
6370 2008-06-19 Robert Millan <rmh@aybabtu.com>
6372 * kern/main.c (grub_main): Export `prefix' variable immediately
6373 after it has been set by grub_machine_set_prefix().
6375 2008-06-19 Robert Millan <rmh@aybabtu.com>
6377 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6378 search result when not saving to variable, not the other way around.
6379 When saving to variable, abort iteration as soon as a match is found.
6381 2008-06-19 Robert Millan <rmh@aybabtu.com>
6383 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6384 check for partition that provides /boot/grub. Its logic is flawed,
6385 as it prevents prepare_grub_to_access_device() from being called
6388 2008-06-19 Robert Millan <rmh@aybabtu.com>
6390 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6391 "insmod" command directly when abstraction modules are needed,
6392 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6393 since it had already been processed).
6395 2008-06-19 Pavel Roskin <proski@gnu.org>
6397 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6398 changed. This is needed in case GRUB_LIBDIR changes.
6399 * conf/i386-ieee1275.rmk: Likewise.
6400 * conf/i386-linuxbios.rmk: Likewise.
6401 * conf/i386-pc.rmk: Likewise.
6402 * conf/powerpc-ieee1275.rmk: Likewise.
6404 2008-06-18 Pavel Roskin <proski@gnu.org>
6406 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6407 kernel_elf_symlist.c to symlist.c for consistency with other
6408 architectures. Update all users.
6409 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6411 2008-06-18 Robert Millan <rmh@aybabtu.com>
6413 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6416 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6417 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6418 a RAID device, run setup() for all members independently on whether
6419 LVM abstraction is being used.
6420 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6421 If grub-mkimage has set `*install_dos_part == -2', don't override this
6423 Perform *install_dos_part adjustments independently on whether
6424 we're embedding or not.
6425 Clarify error message when image is too big for embedding.
6426 Remove duplicate *install_dos_part stanza.
6428 2008-06-17 Robert Millan <rmh@aybabtu.com>
6430 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6431 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6433 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6434 values in grub_ofconsole_normal_color and
6435 grub_ofconsole_highlight_color (they're not directly related to
6436 background and foreground).
6437 (grub_ofconsole_setcolorstate): Extract background and foreground
6438 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6440 2008-06-17 Robert Millan <rmh@aybabtu.com>
6442 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6443 /boot/grub for the check in last commit, not /boot (they could be
6444 different partitions).
6446 2008-06-16 Robert Millan <rmh@aybabtu.com>
6448 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6449 asked to setup access for the same partition that provides /boot,
6450 don't bother using UUIDs since our root already has the value we
6453 2008-06-16 Robert Millan <rmh@aybabtu.com>
6455 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6457 Patch from Sven Mueller <sven@debian.org>.
6459 2008-06-16 Robert Millan <rmh@aybabtu.com>
6461 * util/update-grub.in: Check for $EUID instead of $UID.
6462 Reported by Vincent Zweije.
6464 2008-06-16 Bean <bean123ch@gmail.com>
6466 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6467 (grub_ext2_read_block): Likewise.
6468 (grub_ext2_read_inode): Likewise.
6469 (grub_ext2_mount): Likewise.
6470 (grub_ext2_close): Likewise.
6471 (grub_ext3_get_journal): Removed.
6473 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6474 (grub_reiserfs_read_symlink): Likewise.
6475 (grub_reiserfs_mount): Likewise.
6476 (grub_reiserfs_open): Likewise.
6477 (grub_reiserfs_read): Likewise.
6478 (grub_reiserfs_close): Likewise.
6479 (grub_reiserfs_get_journal): Removed.
6481 * fs/fshelp.c (grub_fshelp_read): Removed.
6482 (grub_fshelp_map_block): Likewise.
6484 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6485 (grub_fshelp_journal): Likewise.
6486 (grub_fshelp_read): Likewise.
6487 (grub_fshelp_map_block): Likewise.
6489 2008-06-16 Pavel Roskin <proski@gnu.org>
6491 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6492 floating point anymore.
6493 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6495 2008-06-15 Pavel Roskin <proski@gnu.org>
6497 * commands/ls.c (grub_ls_list_files): Use integer calculations
6498 for human readable format, avoid floating point use.
6499 * kern/misc.c (grub_ftoa): Remove.
6500 (grub_vsprintf): Remove floating point support.
6502 2008-06-15 Robert Millan <rmh@aybabtu.com>
6504 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6506 Reported by Max Vozeler.
6508 2008-06-15 Robert Millan <rmh@aybabtu.com>
6510 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6511 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6513 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6514 the beginning of the prefix.
6516 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6517 It is assumed that if we have a memdisk, grub-mkimage has set
6518 grub_prefix to include the "(memdisk)" drive in it.
6520 2008-06-15 Robert Millan <rmh@aybabtu.com>
6522 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6523 Initialize keyboard controller after registering the terminal, so that
6524 grub_printf() can be called from grub_keyboard_controller_init().
6526 2008-06-15 Robert Millan <rmh@aybabtu.com>
6528 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6529 extent-btree which is written as big endian on disk.
6530 Reported by Alain Greppin <al@chilibi.org>.
6532 2008-06-14 Robert Millan <rmh@aybabtu.com>
6534 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6535 * util/i386/pc/grub-install.in (modules): Likewise.
6537 2008-06-13 Pavel Roskin <proski@gnu.org>
6539 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6541 2008-06-13 Bean <bean123ch@gmail.com>
6543 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6545 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6547 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6548 to indicate sparse block.
6550 2008-06-12 Pavel Roskin <proski@gnu.org>
6552 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6553 number, grub_fshelp_read() does it for us.
6555 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6556 linear disk read with journal translation.
6557 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6558 * include/grub/fshelp.h: Declare grub_fshelp_read().
6560 2008-06-09 Pavel Roskin <proski@gnu.org>
6562 * fs/minix.c (grub_minix_mount): Handle error reading
6565 2008-06-08 Robert Millan <rmh@aybabtu.com>
6567 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6568 don't append the RAID prefix afterwards.
6569 Reported by Clint Adams.
6571 2008-06-08 Robert Millan <rmh@aybabtu.com>
6573 Based on description from Pavel:
6574 * kern/disk.c (grub_disk_check_range): Rename to ...
6575 (grub_disk_adjust_range): ... this. Add a comment explaining the
6576 tasks performed by this function.
6578 2008-06-08 Robert Millan <rmh@aybabtu.com>
6580 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6581 `num_serial' (for consistency with other variables).
6582 (struct grub_ntfs_data): Add `uuid' member.
6583 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6584 (grub_ntfs_uuid): New function.
6585 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6587 2008-06-07 Pavel Roskin <proski@gnu.org>
6589 * util/biosdisk.c (open_device): Revert last change to the
6590 function, it broke installation. The sector needs to be
6591 different dependent on which device is opened.
6593 2008-06-06 Robert Millan <rmh@aybabtu.com>
6595 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6596 rest of GRUB, and breakage doesn't happen if its value were modified.
6598 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6599 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6600 a constant (same value).
6601 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6602 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6604 2008-06-06 Robert Millan <rmh@aybabtu.com>
6606 * util/biosdisk.c (open_device): Do not modify sector offset when
6607 accessing a partition. kern/disk.c already handles this for us.
6609 2008-06-06 Robert Millan <rmh@aybabtu.com>
6611 * util/grub-emu.c (grub_machine_init): Move code in this function from
6613 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6614 segfault in case grub_printf() is called).
6616 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6617 grub_probe. Update all users not to explicitly add it again.
6618 (grub_device): New variable; contains corresponding device for grubdir.
6619 (fs_module, partmap_module, devabstraction_module): Pass
6620 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6623 2008-06-05 Robert Millan <rmh@aybabtu.com>
6625 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6626 is found, print it (same layout as with labels).
6628 2008-06-04 Robert Millan <rmh@aybabtu.com>
6630 * util/biosdisk.c (get_drive): Rename to ...
6631 (find_grub_drive): ... this. Update all users.
6633 (get_os_disk): Rename to ...
6634 (convert_system_partition_to_system_disk): ... this. Update all users.
6636 (find_drive): Rename to ...
6637 (find_system_device): ... this. Update all users.
6639 2008-06-04 Robert Millan <rmh@aybabtu.com>
6641 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6642 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6643 (make_device_map): Likewise.
6645 2008-06-01 Robert Millan <rmh@aybabtu.com>
6647 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6648 before dereferencing it.
6650 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6651 union with fat12/fat16-specific ones. Add some new fields, including
6652 `num_serial' for both versions.
6653 (struct grub_fat_data): Add `uuid' member.
6654 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6655 names. Initialize `data->uuid' using `num_serial'.
6656 (grub_fat_uuid): New function.
6657 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6659 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6660 (grub_reiserfs_uuid): New function.
6661 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6664 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6665 (grub_xfs_uuid): New function.
6666 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6668 2008-06-01 Robert Millan <rmh@aybabtu.com>
6670 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6671 code that is backward compatible with pre-uuid search command.
6673 2008-05-31 Robert Millan <rmh@aybabtu.com>
6675 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6676 floppies after everything else, to ensure floppy drive isn't accessed
6677 unnecessarily (patch from Bean).
6679 2008-05-31 Robert Millan <rmh@aybabtu.com>
6681 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6682 not print device names when we were asked to set a variable.
6684 2008-05-31 Robert Millan <rmh@aybabtu.com>
6686 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6687 using "cursor-on" and "cursor-off" commands (understood at least by
6688 the Open Firmware flavour on OLPC).
6690 2008-05-31 Michael Gorven <michael@gorven.za.net>
6692 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6693 on and off sequences.
6695 2008-05-31 Robert Millan <rmh@aybabtu.com>
6697 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6698 * util/update-grub.in: Likewise.
6700 2008-05-30 Pavel Roskin <proski@gnu.org>
6702 * util/biosdisk.c (linux_find_partition): Simplify logic and
6703 make the code more universal. Keep special processing for
6704 devfs, but use a simple rule for all other devices. If the
6705 device ends with a number, append 'p' and the partition number.
6706 Otherwise, append only the partition number.
6708 2008-05-30 Robert Millan <rmh@aybabtu.com>
6710 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6711 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6712 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6713 the `root' parameter to Linux.
6715 2008-05-30 Robert Millan <rmh@aybabtu.com>
6717 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6718 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6719 --fs_uuid with --fs-uuid.
6720 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6721 all filesystems support them).
6723 2008-05-30 Robert Millan <rmh@aybabtu.com>
6725 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6726 grub_printf() flags, since we're printing in units of 2 bytes.
6728 2008-05-30 Robert Millan <rmh@aybabtu.com>
6730 * util/grub.d/00_header.in: Remove obsolete comment referencing
6731 convert_system_path_to_grub_path().
6732 * util/update-grub.in: Likewise.
6733 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6734 (convert_system_path_to_grub_path): Add a warning message explaining
6735 that this function is deprecated. Rely on is_path_readable_by_grub()
6736 for the readability checks.
6737 (font_path): Use is_path_readable_by_grub() for the readability
6738 check rather than convert_system_path_to_grub_path().
6740 2008-05-30 Robert Millan <rmh@aybabtu.com>
6742 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6743 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6744 converting it first.
6745 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6746 grub.cfg for access to font file, and afterwards call it again to set
6749 2008-05-30 Robert Millan <rmh@aybabtu.com>
6751 * commands/search.c (options): Add --fs_uuid option.
6752 (search_fs_uuid): New function.
6753 (grub_cmd_search): Fix --set argument passing.
6754 Use search_fs_uuid() when requested via --fs_uuid.
6755 (grub_search_init): Update help message.
6756 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6757 and redeclare it as an array of 16-bit words.
6758 (grub_ext2_uuid): New function.
6759 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6760 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6761 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6762 (GRUB_DEVICE_BOOT_UUID): New variables.
6763 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6764 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6766 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6767 just assume `root' variable has the right value.
6768 * util/grub.d/10_linux.in: Likewise.
6769 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6771 (main): Recognise `-t fs_uuid' argument.
6773 2008-05-30 Robert Millan <rmh@aybabtu.com>
6775 * util/biosdisk.c (map): Redefine structure to hold information
6776 about GRUB drive name.
6777 (get_drive): Reimplement without assuming (and verifying) BIOS-like
6779 (call_hook): Remove.
6780 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6781 member. Assume drive has partitions.
6782 (grub_util_biosdisk_open): Access device names via `.device' struct
6784 (open_device): Likewise.
6785 (find_drive): Likewise.
6786 (read_device_map): Adjust map[] usage to match the new struct
6787 definition. Don't check for duplicates (still possible, but not cheap
6789 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6790 (make_device_name): Remove assumption of BIOS-like drive names.
6792 2008-05-30 Pavel Roskin <proski@gnu.org>
6794 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6795 compiling execute.c doesn't need grub_script.tab.h anymore.
6796 (normal/command.c_DEPENDENCIES): Likewise.
6797 (normal/function.c_DEPENDENCIES): Likewise.
6798 * conf/i386-ieee1275.rmk: Likewise.
6799 * conf/i386-linuxbios.rmk: Likewise.
6800 * conf/i386-pc.rmk: Likewise.
6801 * conf/powerpc-ieee1275.rmk: Likewise.
6802 * conf/sparc64-ieee1275.rmk: Likewise.
6804 2008-05-29 Pavel Roskin <proski@gnu.org>
6806 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6807 when scanning metadata for volume group name.
6809 * include/grub/script.h: Don't include grub_script.tab.h. It's
6810 a generated file, which may only be included from the files with
6811 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6812 use union YYSTYPE, as the later allows forward declaration.
6813 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6815 2008-05-29 Robert Millan <rmh@aybabtu.com>
6817 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6818 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6819 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6820 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6823 2008-05-29 Robert Millan <rmh@aybabtu.com>
6825 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6826 control key combinations.
6828 2008-05-29 Robert Millan <rmh@aybabtu.com>
6830 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6831 * util/ieee1275/grub-install.in: ... to here.
6832 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6833 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6834 (grub_install_SOURCES): Likewise.
6836 2008-05-29 Robert Millan <rmh@aybabtu.com>
6838 * fs/affs.c: Update copyright year.
6839 * fs/ext2.c: Likewise.
6840 * fs/fshelp.c: Likewise.
6841 * fs/hfsplus.c: Likewise.
6842 * fs/ntfs.c: Likewise.
6843 * fs/xfs.c: Likewise.
6844 * include/grub/fshelp.h: Likewise.
6845 * util/grub-mkdevicemap.c: Likewise.
6847 2008-05-28 Robert Millan <rmh@aybabtu.com>
6849 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6850 might need to be fatfs to support some firmware implementations
6853 2008-05-28 Robert Millan <rmh@aybabtu.com>
6855 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6857 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6858 (make_device_map): Likewise.
6860 2008-05-20 Bean <bean123ch@gmail.com>
6862 * fs/fshelp.c (grub_fshelp_map_block): New function.
6863 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6864 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6866 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6867 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6868 (grub_fshelp_journal): New structure.
6869 (grub_fshelp_map_block): New function prototype.
6870 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6871 (grub_fshelp_map_block): Likewise.
6873 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6874 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6875 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6876 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6877 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6878 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6879 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6880 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6881 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6882 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6883 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6884 (grub_ext2_sblock): New members for journal support.
6885 (grub_ext3_journal_header): New structure.
6886 (grub_ext3_journal_revoke_header): Likewise.
6887 (grub_ext3_journal_block_tag): Likewise.
6888 (grub_ext3_journal_sblock): Likewise.
6889 (grub_fshelp_node): New members logfile and journal.
6890 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6891 grub_fshelp_map_block to get real block number.
6892 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6894 (grub_ext2_read_inode): Likewise.
6895 (grub_ext3_get_journal): New function.
6896 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6897 (grub_ext2_close): Release memory used by journal.
6899 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6900 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6901 (grub_reiserfs_transaction_header): Renamed to
6902 grub_reiserfs_description_block, replace field data with real_blocks.
6903 (grub_reiserfs_commit_block): New structure.
6904 (grub_reiserfs_data): New member journal.
6905 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6907 (grub_reiserfs_read_symlink): Likewise.
6908 (grub_reiserfs_iterate_dir): Likewise.
6909 (grub_reiserfs_open): Likewise.
6910 (grub_reiserfs_read): Likewise.
6911 (grub_reiserfs_get_journal): New function.
6912 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6913 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6914 using grub_reiserfs_get_journal.
6915 (grub_reiserfs_close): Release memory used by journal.
6917 * fs/affs.c (grub_affs_read_block): Change block type to
6918 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6920 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6922 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6924 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6926 * fs/udf.c (grub_udf_read_block): Change block type to
6927 grub_disk_addr_t. Use type cast to avoid warning.
6929 * fs/xfs.c (grub_xfs_read_block): Likewise.
6931 2008-05-16 Christian Franke <franke@computer.org>
6933 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6934 to ensure that break with ESC will always work.
6935 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6936 Remove ESC from keyboard queue.
6938 2008-05-16 Christian Franke <franke@computer.org>
6940 * util/biosdisk.c: [__CYGWIN__] Add includes.
6941 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6942 (get_os_disk): Move variable declarations to OS specific
6943 parts to avoid warning.
6944 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6945 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6946 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6948 * util/getroot.c: [__CYGWIN__] Add includes.
6949 (strip_extra_slashes): Fix "/" case.
6950 [__CYGWIN__] (get_win32_path): New function.
6951 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6952 [__CYGWIN__] (find_root_device): Disable.
6953 [__CYGWIN__] (get_bootsec_serial): New function.
6954 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6955 [__linux__] (grub_guess_root_device): Add early returns to simplify
6957 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6958 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6959 check for Linux only.
6961 2008-05-15 Bean <bean123ch@gmail.com>
6963 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6964 keyboard hang problem in apple's intel mac.
6966 2008-05-09 Robert Millan <rmh@aybabtu.com>
6968 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6970 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6971 (make_device_map): Likewise.
6972 Reported by Aurelien Jarno <aurel32@debian.org>
6974 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
6976 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6977 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6978 (make_device_map): Output entries for xvd type disks.
6980 2008-05-07 Robert Millan <rmh@aybabtu.com>
6982 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6984 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6985 (make_device_map): Likewise.
6986 Reported by Roland Dreier <rdreier@cisco.com>
6988 2008-05-07 Robert Millan <rmh@aybabtu.com>
6990 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6991 grub_strstr() call. Correct a few mistakes in failure path handling.
6993 2008-05-06 Robert Millan <rmh@aybabtu.com>
6995 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6996 Do not print a trailing slash (therefore, the root directory is an
6998 (convert_system_path_to_grub_path): Do not remove trailing slash
6999 from make_system_path_relative_to_its_root() output.
7001 * util/i386/pc/grub-install.in: Add trailing slash to output from
7002 make_system_path_relative_to_its_root().
7004 2008-05-06 Robert Millan <rmh@aybabtu.com>
7006 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7007 ensures that output lines aren't intermangled with those sent to
7008 stderr (via grub_util_info()).
7009 * util/grub-probe.c (grub_refresh): Likewise.
7010 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7012 2008-05-05 Christian Franke <franke@computer.org>
7014 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7015 Add Cygwin device names.
7016 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7017 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7018 (check_device): Return error instead of success on empty name.
7019 (make_device_map): Move label inside linux specific code to
7020 prevent compiler warning.
7022 2008-04-30 Robert Millan <rmh@aybabtu.com>
7024 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7025 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7027 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7029 2008-04-29 Robert Millan <rmh@aybabtu.com>
7031 * docs/grub.cfg: New file (example GRUB configuration).
7033 2008-04-26 Robert Millan <rmh@aybabtu.com>
7035 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7036 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7037 and `disk/ieee1275/nand.c'.
7039 2008-04-25 Bean <bean123ch@gmail.com>
7041 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7044 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7045 change the buffer size to 4096 for cdrom device.
7047 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7049 (_linux_mod_SOURCES): New variable.
7050 (_linux_mod_CFLAGS): Likewise.
7051 (_linux_mod_LDFLAGS): Likewise.
7052 (linux_mod_SOURCES): Likewise.
7053 (linux_mod_CFLAGS): Likewise.
7054 (linux_mod_LDFLAGS): Likewise.
7055 (nand_mod_SOURCES): Likewise.
7056 (nand_mod_CFLAGS): Likewise.
7057 (nand_mod_LDFLAGS): Likewise.
7059 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7060 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7061 type property. (nand device in olpc don't have this property)
7063 * include/grub/disk.h (grub_disk_dev_id): New macro
7064 GRUB_DISK_DEVICE_NAND_ID.
7066 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7068 (grub_rescue_cmd_initrd): Likewise.
7070 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7071 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7072 ofw_cif_handler and ofw_idt, adjust padding number.
7074 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7075 GRUB_MACHINE_IEEE1275 is defined.
7077 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7078 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7080 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7081 on nested function heap_init.
7082 (grub_upper_mem): New variable for i386-ieee1275.
7083 (grub_get_extended_memory): New function for i386-ieee1275.
7084 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7086 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7087 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7090 * loader/i386/ieee1275/linux.c: New file.
7092 * loader/i386/ieee1275/linux_normal.c: New file.
7094 * disk/ieee1275/nand.c: New file.
7096 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7098 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7100 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7102 2008-04-18 Robert Millan <rmh@aybabtu.com>
7104 Restructures early code path on ieee1275 to unify grub_main() as
7105 the first C function that is executed in every platform.
7107 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7108 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7110 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7111 * kern/ieee1275/cmain.c (cmain): Rename to ...
7112 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7113 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7116 2008-04-18 Robert Millan <rmh@aybabtu.com>
7118 * util/update-grub.in: Fix syntax error when setting
7119 `GRUB_PRELOAD_MODULES'.
7120 Reported by Stephane Chazelas <stephane@artesyncp.com>
7122 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7124 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7125 section into account, newer toolchains generate unique build ids
7126 * configure.ac: remove the test for --build-id=none acceptance,
7127 we want build ids to be preserved
7128 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7129 far from other sections don't cause the raw binary images grow
7132 2008-04-15 Robert Millan <rmh@aybabtu.com>
7134 * disk/lvm.c: Update copyright year.
7135 * kern/misc.c: Likewise.
7137 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7139 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7140 there is no memory left for physical volume name.
7142 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7144 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7145 volume name mapping to support bigger than 9 character names properly.
7147 2008-04-13 Robert Millan <rmh@aybabtu.com>
7149 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7150 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7152 2008-04-13 Christian Franke <franke@computer.org>
7154 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7155 to create a floppy emulation boot CD when non emulation mode
7157 Enable Joliet CD filesystem extension.
7159 2008-04-13 Robert Millan <rmh@aybabtu.com>
7161 * kern/misc.c (grub_strncat): Fix off-by-one error.
7162 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7164 * kern/env.c (grub_env_context_close): Clear current context, not
7166 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7168 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7170 2008-04-13 Robert Millan <rmh@aybabtu.com>
7172 Improve robustness when handling LVM.
7174 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7175 (and leave `*p' unmodified).
7176 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7178 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7179 iterating through it.
7180 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7182 (grub_lvm_scan_device): Check the return value (and fail gracefully
7183 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7184 Don't assume `vg->pvs != NULL' when iterating through it.
7186 2008-04-13 Robert Millan <rmh@aybabtu.com>
7188 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7189 * genmk.rb (partmap): New variable.
7190 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7191 (#{partmap}): New target rule.
7192 * genpartmaplist.sh: New file.
7193 * Makefile.in (pkglib_DATA): Add partmap.lst.
7194 (partmap.lst): New target rule.
7195 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7196 modules (including all partition maps), instead of preloading them.
7198 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7200 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7201 `linux-boot-prober' (if installed) to detect other operating
7202 systems which are installed on the computer and add them to
7204 * conf/common.rmk: Build and install 30_os-prober.
7206 2008-04-12 Robert Millan <rmh@aybabtu.com>
7208 * kern/powerpc/ieee1275/init.c: Move from here ...
7209 * kern/ieee1275/init.c: ... to here. Update all users.
7211 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7212 * kern/ieee1275/cmain.c: ... to here. Update all users.
7214 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7215 * kern/ieee1275/openfw.c: ... to here. Update all users.
7217 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7218 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7220 2008-04-10 Pavel Roskin <proski@gnu.org>
7222 * configure.ac: Always use "_cv_" in cache variables for
7223 compatibility with Autoconf 2.62.
7225 2008-04-07 Robert Millan <rmh@aybabtu.com>
7227 Revert grub/machine/init.h addition by Pavel (since it breaks on
7228 i386-ieee1275 and others):
7229 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7230 * util/powerpc/ieee1275/misc.c: Likewise.
7232 2008-04-07 Robert Millan <rmh@aybabtu.com>
7234 * util/grub-probe.c (probe): Improve error message.
7236 2008-04-07 Robert Millan <rmh@aybabtu.com>
7238 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7239 (this prevents the presence of a bogus entry from ruining the whole
7242 2008-04-06 Pavel Roskin <proski@gnu.org>
7244 * util/biosdisk.c: Include grub/util/biosdisk.h.
7245 * util/grub-fstest.c (execute_command): Make static.
7246 * util/grub-mkdevicemap.c (check_device): Likewise.
7247 * util/i386/pc/misc.c: Include grub/machine/init.h.
7248 * util/powerpc/ieee1275/misc.c: Likewise.
7249 * util/lvm.c: Include grub/util/lvm.h.
7250 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7252 * util/raid.c: Include grub/util/raid.h.
7253 (grub_util_getdiskname): Make static.
7255 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7256 grub_hostfs_fini(), as they are called from grub_init_all() and
7257 grub_fini_all() respectively. This fixes an infinite loop in
7258 grub-fstest due to double registration of hostfs.
7259 Reported by Christian Franke <Christian.Franke@t-online.de>
7261 2008-04-05 Pavel Roskin <proski@gnu.org>
7263 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7264 all 8 functions. Otherwise, probe function 0 only.
7266 2008-04-04 Pavel Roskin <proski@gnu.org>
7268 * commands/lspci.c (grub_lspci_iter): Print the bus number
7271 * commands/lspci.c (grub_pci_classes): Fix typos.
7272 (grub_lspci_iter): Don't print func twice. Print vendor ID
7273 before device ID, as it's normally done.
7275 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7276 Fix signedness warnings.
7277 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7279 * util/ieee1275/get_disk_name.c: Include config.h so that
7280 _GNU_SOURCE is defined and getline() is declared. Mark an
7281 unused argument as such. Fix a signedness warning.
7283 2008-04-02 Pavel Roskin <proski@gnu.org>
7285 * genkernsyms.sh.in: Use more robust assignments for CC and
7286 srcdir. Quote srcdir.
7287 * gensymlist.sh.in: Likewise. Assert at the compile time that
7288 the symbol table is not empty.
7290 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7291 * fs/cpio.c (grub_cpio_read): Likewise.
7293 2008-04-01 Pavel Roskin <proski@gnu.org>
7295 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7296 * disk/host.c (grub_host_open): Likewise.
7297 * disk/loopback.c (grub_loopback_open): Likewise.
7298 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7299 disk->id as in disk/host.c, not a multi-character constant.
7301 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7302 later is obsolete, potentially dangerous and sets a bad example.
7303 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7304 * util/misc.c (grub_util_get_image_size): Likewise.
7306 * disk/loopback.c (options): Improve help for "--partitions".
7308 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7309 options to align them with the short options, e.g. "echo -e".
7311 2008-03-31 Bean <bean123ch@gmail.com>
7313 * video/reader/png.c (grub_png_data): New member is_16bit and
7315 (grub_png_decode_image_header): Detect 16 bit png image.
7316 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7317 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7318 (grub_video_reader_png): Release memory occupied by image_data.
7320 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7322 (grub_nfs_mount): Skip the test for sector per cluster.
7324 * include/grub/ntfs.h (MAX_SPC): Removed.
7326 2008-03-31 Bean <bean123ch@gmail.com>
7328 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7329 (grub_probe_SOURCES): Add fs/afs.c.
7330 (grub_fstest_SOURCES): Likewise.
7331 (afs_mod_SOURCES): New variable.
7332 (afs_mod_CFLAGS): Likewise.
7333 (afs_mod_LDFLAGS): Likewise.
7335 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7336 (grub_emu_SOURCES): Likewise.
7338 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7340 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7342 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7346 * fs/afs.c: New file.
7348 2008-03-30 Pavel Roskin <proski@gnu.org>
7350 * disk/host.c: Include grub/misc.h to fix a warning.
7351 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7352 warnings about implicit declarations.
7354 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7356 * include/grub/i386/loader.h: Change declaration of
7357 grub_linux_boot() to match what grub_loader_set() expects.
7358 * util/getroot.c (grub_guess_root_device): Return const char* to
7360 * util/grub-probe.c (probe): Fix a warning about uninitialized
7361 abstraction_name variable.
7362 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7363 second argument as unused to fix a warning.
7365 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7366 missing grub_error() call.
7368 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7369 2.60 and newer uses it to define datadir.
7371 * commands/sleep.c: Fix warning about implicit declaration.
7372 * disk/memdisk.c: Likewise.
7373 * loader/aout.c: Likewise.
7374 * loader/i386/bsd_normal.c: Likewise.
7375 * util/grub-probe.c: Likewise.
7377 * commands/i386/cpuid.c (has_longmode): Make static.
7378 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7379 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7381 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7382 GDT. This is more robust, as %ds can change.
7383 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7384 calling real_to_prot().
7385 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7387 2008-03-28 Pavel Roskin <proski@gnu.org>
7389 * kern/i386/pc/startup.S: Assert that uncompressed functions
7390 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7391 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7392 code, as they push parts of the code (error handlers) beyond
7393 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7394 code as correctness and size.
7396 2008-03-28 Pavel Roskin <proski@gnu.org>
7398 * kern/i386/pc/startup.S
7399 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7400 data block address to the real mode, keep offset minimal. This
7401 works around a bug in AWARD BIOS on old Athlon systems, which
7402 makes CD detection hang.
7404 2008-03-26 Pavel Roskin <proski@gnu.org>
7406 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7408 * include/grub/normal.h: Add grub_parse_color_name_pair()
7411 2008-03-24 Bean <bean123ch@gmail.com>
7413 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7414 (cd_count): Removed.
7415 (cd_drive): New variable.
7416 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7417 (grub_biosdisk_call_hook): Likewise.
7418 (grub_biosdisk_iterate): Change cdrom detection method.
7419 (grub_biosdisk_open): Replace cd_start with cd_drive.
7420 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7421 detect cdrom device.
7423 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7425 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7426 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7427 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7428 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7429 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7430 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7431 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7432 (grub_biosdisk_cdrp): New structure.
7433 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7435 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7437 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7440 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7443 2008-03-20 Robert Millan <rmh@aybabtu.com>
7445 Remove 2 TiB limit in ata.mod.
7446 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7447 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7448 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7449 grub_uint64_t instead of grub_uint32_t.
7451 2008-03-05 Bean <bean123ch@gmail.com>
7453 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7454 (grub_multiboot): Set boot device.
7456 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7458 2008-03-02 Bean <bean123ch@gmail.com>
7460 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7463 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7465 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7468 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7471 * docs/fdl.texi: New file.
7473 * docs/mdate-sh: New file. Copied from gnulib.
7474 * docs/texinfo.tex: Likewise.
7476 * config.guess: Updated from gnulib.
7477 * install-sh: Likewise.
7479 2008-02-28 Robert Millan <rmh@aybabtu.com>
7481 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7482 (aout_mod_SOURCES): New variable.
7483 (aout_mod_CFLAGS): Likewise.
7484 (aout_mod_LDFLAGS): Likewise.
7486 * conf/i386-ieee1275.rmk: Likewise.
7488 2008-02-28 Robert Millan <rmh@aybabtu.com>
7490 * util/update-grub.in: Reorganise terminal validity check. Accept
7491 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7492 Based on suggestion by Franklin PIAT.
7494 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7496 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7498 * util/getroot.c (grub_util_check_block_device): New function that
7499 returns the given argument if it is a block device and returns NULL else.
7500 * util/grub-probe.c (argument_is_device): New variable.
7501 (probe): Promote device_name from a variable to an argument. Receive
7502 device_name from grub_util_check_block_device() if path is NULL and from
7503 grub_guess_root_device() else. Do not free() device_name anymore.
7504 (options): Introduce new parameter '-d, --device'.
7505 (main): Add description of the new parameter to the help screen.
7506 Rename path variable to argument. Set argument_is_device if the '-d'
7507 option is given. Pass argument to probe() depending on
7510 2008-02-24 Bean <bean123ch@gmail.com>
7512 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7513 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7514 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7515 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7516 (GRUB_ISO9660_VOLDESC_END): Likewise.
7517 (grub_iso9660_primary_voldesc): New member escape.
7518 (grub_iso9660_data): New member joliet.
7519 (grub_iso9660_convert_string): New function.
7520 (grub_iso9660_mount): Detect joliet extension.
7521 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7522 (grub_iso9660_iso9660_label): Likewise.
7524 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7525 (grub_setup_SOURCES): Add fs/udf.c.
7526 (grub_fstest_SOURCES): Likewise.
7527 (udf_mod_SOURCES): New variable.
7528 (udf_mod_CFLAGS): Likewise.
7529 (udf_mod_LDFLAGS): Likewise.
7531 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7532 (grub_emu_SOURCES): Likewise.
7534 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7536 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7538 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7540 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7542 * fs/udf.c: New file.
7544 2008-02-24 Robert Millan <rmh@aybabtu.com>
7546 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7547 (normal/lexer.c_DEPENDENCIES): New variables.
7548 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7549 (normal/lexer.c_DEPENDENCIES): Likewise.
7550 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7551 (normal/lexer.c_DEPENDENCIES): Likewise.
7552 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7553 (normal/lexer.c_DEPENDENCIES): Likewise.
7554 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7555 (normal/lexer.c_DEPENDENCIES): Likewise.
7556 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7557 (normal/lexer.c_DEPENDENCIES): Likewise.
7559 2008-02-23 Robert Millan <rmh@aybabtu.com>
7561 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7562 since they were intended to be in hex. This didn't break previously
7563 because of a bug in gpt_partition_map_iterate() (see below).
7565 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7566 when checking the validity of GPT header.
7567 Remove `partno', since it always provides the same information as `i'.
7569 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7571 * include/grub/efi/time.h: Fix a wrong comment.
7573 2008-02-19 Pavel Roskin <proski@gnu.org>
7575 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7578 2008-02-19 Bean <bean123ch@gmail.com>
7580 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7581 (aout_mod_SOURCES): New variable.
7582 (aout_mod_CFLAGS): Likewise.
7583 (aout_mod_LDFLAGS): Likewise.
7584 (_bsd_mod_SOURCES): New variable.
7585 (_bsd_mod_CFLAGS): Likewise.
7586 (_bsd_mod_LDFLAGS): Likewise.
7587 (bsd_mod_SOURCES): New variable.
7588 (bsd_mod_CFLAGS): Likewise.
7589 (bsd_mod_LDFLAGS): Likewise.
7591 * include/grub/aout.h: New file.
7593 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7595 * include/grub/i386/bsd.h: New file.
7597 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7600 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7601 function is called, so that it's possible to change it inside the hook.
7602 (grub_elf64_load): Likewise.
7603 (grub_elf_file): Don't close the file if elf header is not found.
7604 (grub_elf_close): Close the file if grub_elf_file fails (The new
7605 grub_elf_file won't close it).
7606 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7607 (grub_elf64_size): Likewise.
7609 * kern/i386/loader.S (grub_unix_real_boot): New function.
7611 * loader/aout.c: New file.
7613 * loader/i386/bsd.c: New file.
7615 * loader/i386/bsd_normal.c: New file.
7617 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7619 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7620 can test other formats.
7622 2008-02-19 Robert Millan <rmh@aybabtu.com>
7624 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7625 (grub_gpt_partition_type_empty): Redefine with macro from
7626 `<grub/gpt_partition.h>'.
7627 (gpt_partition_map_iterate): Adjust partition type comparison.
7629 Export `entry' as partmap-specific `part.data' struct.
7630 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7632 * include/grub/gpt_partition.h (grub_gpt_header)
7633 (grub_gpt_partentry): ... to here (new file).
7635 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7637 (grub_gpt_partition_type_bios_boot): New const variable, defined
7638 with macro from `<grub/gpt_partition.h>'.
7640 (setup): Replace `first_start' with `embed_region', which keeps
7641 track of the embed region (and is partmap-agnostic).
7643 Replace find_first_partition_start() with find_usable_region(),
7644 which finds a usable region for embedding using partmap-specific
7645 knowledge (supports PC/MSDOS and GPT).
7647 Fix all assumptions that the embed region start at sector 1, using
7648 `embed_region.start' from now on. Similarly, use `embed_region.end'
7649 rather than `first_start' to calculate available size.
7651 In grub_util_info() message, replace "into after the MBR" with an
7652 indication of the specific sector our embed region starts at.
7654 2008-02-19 Robert Millan <rmh@aybabtu.com>
7656 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7657 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7658 `commands/reboot.c'.
7659 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7660 (halt_mod_SOURCES): Likewise.
7661 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7662 (halt_mod_SOURCES): Likewise.
7664 2008-02-17 Christian Franke <franke@computer.org>
7666 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7668 2008-02-17 Robert Millan <rmh@aybabtu.com>
7670 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7671 set `first_start' to 0 for non-PC/MSDOS partition maps.
7673 2008-02-16 Robert Millan <rmh@aybabtu.com>
7675 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7676 do not assume partition map is PC/MSDOS before performing checks that
7677 are specific to that layout.
7679 2008-02-13 Robert Millan <rmh@aybabtu.com>
7681 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7682 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7683 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7685 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7687 * configure.ac: Only a cosmetic change on the handling of
7688 -fno-stack-protector.
7690 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
7692 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7693 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7695 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7696 (halt_mod_SOURCES): New variable.
7697 (halt_mod_CFLAGS): Likewise.
7698 (halt_mod_LDFLAGS): Likewise.
7699 (reboot_mod_SOURCES): Likewise.
7700 (reboot_mod_CFLAGS): Likewise.
7701 (reboot_mod_LDFLAGS): Likewise.
7703 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7704 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7706 (halt_mod_SOURCES): Likewise.
7707 (reboot_mod_SOURCES): Likewise.
7709 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7710 commands/i386/pc/reboot.c by commands/reboot.c.
7711 (reboot_mod_SOURCES): Likewise.
7713 * commands/i386/pc/reboot.c: merge this file ...
7715 * commands/ieee1275/reboot.c: ... and this file ...
7717 * commands/reboot.c: ... to this file.
7718 Add some precompiler directive to include the correct header for
7721 * commands/ieee1275/halt.c: move this file ...
7723 * commands/halt.c: ... to here.
7724 Add some precompiler directive to include the correct header for
7727 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7728 (grub_halt): Likewise.
7730 * kern/efi/efi.c (grub_reboot): New function.
7731 (grub_halt): Likewise.
7733 2008-02-12 Robert Millan <rmh@aybabtu.com>
7735 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7736 /dev (like it is done for /dev/mapper). This doesn't provide support
7737 for EVMS, but at least it is now easy to identify the problem when it
7740 2008-02-11 Robert Millan <rmh@aybabtu.com>
7742 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7743 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7744 comparing it with -1, not 0.
7746 2008-02-10 Robert Millan <rmh@aybabtu.com>
7748 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7750 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7751 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7753 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7754 `disk/lvm.c' to the end of the list.
7755 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7756 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7758 2008-02-10 Robert Millan <rmh@aybabtu.com>
7760 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7761 grub_print_error() instead. This will let user know why we're entering
7763 Based on suggestions from Sam Morris.
7765 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
7767 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7768 on remaining N args, instead of "--" arg N times.
7770 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7772 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7773 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7774 pattern for unknown glyphs.
7776 2008-02-09 Robert Millan <rmh@aybabtu.com>
7778 * configure.ac: Probe for `help2man'.
7779 * Makefile.in (builddir): New variable.
7780 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7781 or otherwise add a few flags/options to it.
7782 (install-local): For every executable utility or script that is
7783 installed, invoke $(HELP2MAN) to install a manpage based on --help
7786 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7787 that it doesn't prevent --help from working in build tree.
7789 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7790 with `bug-grub@gnu.org'.
7791 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7792 * util/update-grub.in (usage): New function.
7793 Implement proper argument check, with support for --help and --version
7794 (as well as existing -y).
7796 2008-02-09 Christian Franke <franke@computer.org>
7798 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7799 avoid overwriting previous output.
7800 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7802 2008-02-09 Robert Millan <rmh@aybabtu.com>
7804 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7807 2008-02-09 Robert Millan <rmh@aybabtu.com>
7809 * commands/sleep.c: New file.
7810 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7811 (sleep_mod_SOURCES): New variable.
7812 (sleep_mod_CFLAGS): Likewise.
7813 (sleep_mod_LDFLAGS): Likewise.
7815 2008-02-09 Robert Millan <rmh@aybabtu.com>
7817 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7818 situations in which we can deduce the RAID size and the superblock
7821 2008-02-09 Robert Millan <rmh@aybabtu.com>
7823 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7824 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7825 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7827 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7828 and return a grub_diskmemberlist_t composed of physical array members.
7829 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7831 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7833 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7834 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7835 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7837 * util/grub-probe.c (probe): Move partmap probing code from here ...
7838 (probe_partmap): ... to here.
7839 (probe): Use probe_partmap() once for the disk we're probing, and
7840 additionally, when such disk contains a memberlist() struct member,
7841 once for each disk that is contained in the structure returned by
7844 2008-02-09 Robert Millan <rmh@aybabtu.com>
7846 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7847 environment variable to 'all' in order to obtain debug output from
7849 * util/i386/pc/grub-setup.c (main): Likewise.
7851 2008-02-08 Robert Millan <rmh@aybabtu.com>
7853 * disk/raid.c (grub_raid_scan_device): Check for
7854 `array->device[sb.this_disk.number]' rather than for
7855 `array->device[sb.this_disk.number]->name', since the latter is not
7856 guaranteed to be accessible.
7858 2008-02-08 Robert Millan <rmh@aybabtu.com>
7860 * disk/raid.c: Update copyright.
7861 * fs/cpio.c: Likewise.
7862 * include/grub/raid.h: Likewise.
7863 * loader/i386/pc/multiboot.c: Likewise.
7864 * util/hostfs.c: Likewise.
7866 2008-02-08 Robert Millan <rmh@aybabtu.com>
7868 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7869 to a grub_disk_t array.
7870 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7872 (grub_raid_scan_device): Replace `device[x].name' accesses with
7873 `device[x]->name'. Simplify initialization of `array->device[x]'.
7875 2008-02-08 Robert Millan <rmh@aybabtu.com>
7877 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7878 grub_dprintf() calls.
7879 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7882 2008-02-07 Christian Franke <franke@computer.org>
7884 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7885 instead of fseek and ftell to support large files.
7886 (grub_hostfs_read): Likewise.
7888 2008-02-07 Robert Millan <rmh@aybabtu.com>
7890 Patch from Jeroen Dekkers.
7891 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7892 failure, since successfully reading all array members might not be
7895 2008-02-06 Robert Millan <rmh@aybabtu.com>
7897 * util/grub-probe.c (probe): Simplify partmap probing (with the
7898 assumption that the first word up to the underscore equals to
7901 2008-02-06 Christian Franke <franke@computer.org>
7903 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7904 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7905 last block of a cpio or tar stream.
7906 Check for "TRAILER!!!" instead of any empty data
7907 block to detect last block of a cpio stream.
7908 (grub_cpio_dir): Fix constness of variable np.
7909 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7910 cpio or tar trailer is detected. This fixes a crash
7911 on open of a non existing file.
7913 2008-02-05 Bean <bean123ch@gmail.com>
7915 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7917 (grub_multiboot_load_elf64): Likewise.
7918 (grub_multiboot): Initialize mbi structure.
7920 * util/grub-fstest.c: Don't include unused header file script.h.
7922 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7924 (grub_fstest_SOURCES): Likewise.
7926 2008-02-05 Robert Millan <rmh@aybabtu.com>
7928 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7929 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7930 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7931 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7933 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7934 (translation_table): Replace hardcoded values with macros
7935 provided by `<grub/term.h>'.
7937 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7938 (keyboard_map): Correct/add a few values, with macros provided
7940 (keyboard_map_shift): Zero values that don't differ from their
7941 `keyboard_map' equivalents.
7942 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7943 Discard the second scan code that is always sent by Caps lock.
7944 Only use `keyboard_map_shift' when it provides a non-zero value,
7945 otherwise fallback to `keyboard_map'.
7947 2008-02-04 Bean <bean123ch@gmail.com>
7949 * Makefile.in (enable_grub_fstest): New variable.
7951 * conf/common.rmk (grub_fstest_init.lst): New rule.
7952 (grub_fstest_init.h): Likewise.
7953 (grub_fstest_init.c): Likewise.
7954 (util/grub-fstest.c_DEPENDENCIES): New variable.
7955 (grub_fstest_SOURCES): Likewise.
7957 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7959 * util/grub-fstest.c: New file.
7961 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7963 Make grub-setup handle a separate root device.
7965 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7966 so that the root device can be compared with the destination
7968 When embedding the core image, if the root and destination devices
7969 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7971 When not embedding, set ROOT_DRIVE to 0xFF.
7973 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7975 Add support for having a grub directory in a different drive. This
7976 is still only the data handling part.
7978 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7979 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7980 (grub_root_drive): New variable.
7982 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7983 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7984 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7987 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7989 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7991 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7993 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7994 is bogus, because PXE booting does not specify any drive
7997 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7998 am not sure if this is really correct.
8000 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8001 is always identical to the boot drive when booting from a CD.
8003 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8005 (root_drive): New variable.
8006 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8007 (setup_sectors): Push %dx right after popping it, because %dh will
8009 (copy_buffer): Restore %dx.
8011 2008-02-03 Robert Millan <rmh@aybabtu.com>
8013 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8014 use `cdboot.img' for cdrom images.
8016 2008-02-03 Robert Millan <rmh@aybabtu.com>
8018 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8019 only setup gfxterm when `font' command has succeeded.
8021 2008-02-03 Robert Millan <rmh@aybabtu.com>
8023 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8024 (grub_rescue_cmd_multiboot_loader)
8025 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8027 2008-02-03 Pavel Roskin <proski@gnu.org>
8029 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8030 %edx and %esi from stack only after grub_gate_a20() is called.
8031 grub_gate_a20() clobbers %edx.
8033 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8035 * configure.ac (AC_INIT): Bumped to 1.96.
8037 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8038 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8039 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8040 video/readers/png.c.
8042 2008-02-03 Bean <bean123ch@gmail.com>
8044 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8045 (cdboot_img_SOURCES): New variable.
8046 (cdboot_img_ASFLAGS): New variable.
8047 (cdboot_img_LDFLAGS): New variable.
8049 * boot/i386/pc/cdboot.S: New file.
8051 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8052 (cd_count): Likewise.
8053 (grub_biosdisk_get_drive): Add support for cd device.
8054 (grub_biosdisk_call_hook): Likewise.
8055 (grub_biosdisk_iterate): Likewise.
8056 (grub_biosdisk_open): Likewise.
8057 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8058 (grub_biosdisk_rw): Support reading from cd device.
8059 (GRUB_MOD_INIT): Iterate cd devices.
8061 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8062 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8063 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8065 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8067 2008-02-02 Robert Millan <rmh@aybabtu.com>
8069 * commands/read.c: New file.
8070 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8071 (read_mod_SOURCES): New variable.
8072 (read_mod_CFLAGS): Likewise.
8073 (read_mod_LDFLAGS): Likewise.
8075 2008-02-02 Robert Millan <rmh@aybabtu.com>
8077 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8078 determining whether menu has to be displayed.
8080 2008-02-02 Marco Gerards <marco@gnu.org>
8082 * bus/pci.c: New file.
8084 * include/grub/pci.h: Likewise.
8086 * include/grub/i386/pc/pci.h: Likewise.
8088 * commands/lspci.c: Likewise.
8090 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8092 (pci_mod_SOURCES): New variable.
8093 (pci_mod_CFLAGS): Likewise.
8094 (pci_mod_LDFLAGS): Likewise.
8095 (lspci_mod_SOURCES): Likewise.
8096 (lspci_mod_CFLAGS): Likewise.
8097 (lspci_mod_LDFLAGS): Likewise.
8099 2008-02-02 Bean <bean123ch@gmail.com>
8101 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8102 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8104 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8105 (grub_xfs_btree_node): New structure.
8106 (grub_xfs_btree_root): New structure.
8107 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8108 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8109 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8110 (GRUB_XFS_EXTENT_SIZE): Likewise.
8111 (grub_xfs_read_block): Support btree format type.
8112 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8113 Use directory block as basic unit.
8115 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8117 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8118 __attribute__ ((__regparm__ (1))).
8120 2008-02-01 Robert Millan <rmh@aybabtu.com>
8122 Correct a mistake in previous commit.
8124 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8126 (normal/command.c_DEPENDENCIES): New variable.
8128 2008-02-01 Robert Millan <rmh@aybabtu.com>
8130 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8132 (normal/command.c_DEPENDENCIES): New variable.
8133 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8134 * conf/i386-ieee1275.rmk: Likewise.
8135 * conf/i386-linuxbios.rmk: Likewise.
8136 * conf/i386-pc.rmk: Likewise.
8137 * conf/sparc64-ieee1275.rmk: Likewise.
8138 * conf/powerpc-ieee1275.rmk: Likewise.
8139 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8141 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8143 2008-02-01 Robert Millan <rmh@aybabtu.com>
8145 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8146 call at beginning of function.
8148 2008-01-31 Pavel Roskin <proski@gnu.org>
8150 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8151 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8152 (grub_mkrescue_SOURCES): Likewise.
8153 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8155 2008-01-30 Robert Millan <rmh@aybabtu.com>
8157 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8158 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8159 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8160 (grub_probe_SOURCES): ... to here.
8162 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8163 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8164 * conf/i386-ieee1275.rmk: Likewise.
8165 * conf/i386-linuxbios.rmk: Likewise.
8166 * conf/powerpc-ieee1275.rmk: Likewise.
8168 2008-01-30 Tristan Gingold <gingold@free.fr>
8170 * kern/rescue.c: Silently accept empty lines.
8172 2008-01-29 Bean <bean123ch@gmail.com>
8174 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8175 (real_code_2): Code cleanup and change comment style.
8176 (move_memory): Avoid using 32-bit address mode.
8178 2008-01-29 Bean <bean123ch@gmail.com>
8180 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8181 (png_mod_SOURCES): New variable.
8182 (png_mod_CFLAGS): Likewise.
8183 (png_mod_LDFLAGS): Likewise.
8185 * video/readers/png.c: New file.
8187 2008-01-28 Robert Millan <rmh@aybabtu.com>
8189 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8190 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8191 `ifndef GRUB_MOD_GAP' hack.
8192 * util/elf/grub-mkimage.c (add_segments): Likewise.
8194 2008-01-27 Robert Millan <rmh@aybabtu.com>
8196 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8197 `GRUB_MOD_GAP' for platforms in which it's not defined.
8198 * util/elf/grub-mkimage.c (add_segments): Likewise.
8200 2008-01-27 Robert Millan <rmh@aybabtu.com>
8202 Get grub-emu to build again (including parallel builds).
8204 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8206 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8207 (normal/execute.c_DEPENDENCIES): ... this, ...
8208 (grub-emu_DEPENDENCIES): ... and this.
8210 * conf/i386-efi.rmk: Likewise.
8211 * conf/i386-linuxbios.rmk: Likewise.
8212 * conf/i386-ieee1275.rmk: Likewise.
8213 * conf/powerpc-ieee1275.rmk: Likewise.
8214 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8216 2008-01-27 Robert Millan <rmh@aybabtu.com>
8218 * NEWS: Add a few items.
8220 2008-01-27 Robert Millan <rmh@aybabtu.com>
8222 Fix parallel builds with grub-emu. Based on earlier commit for
8223 grub-probe and grub-setup.
8225 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8226 (util/grub-emu.c_DEPENDENCIES): ... this.
8227 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8228 (util/grub-emu.c_DEPENDENCIES): ... this.
8229 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8230 (util/grub-emu.c_DEPENDENCIES): ... this.
8231 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8232 (util/grub-emu.c_DEPENDENCIES): ... this.
8233 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8234 (util/grub-emu.c_DEPENDENCIES): ... this.
8236 2008-01-27 Pavel Roskin <proski@gnu.org>
8238 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8239 to create a gap between _end and the modules added to the image
8240 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8241 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8242 * util/elf/grub-mkimage.c (add_segments): Likewise.
8244 2008-01-26 Pavel Roskin <proski@gnu.org>
8246 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8247 just return an error.
8249 2008-01-26 Bean <bean123ch@gmail.com>
8251 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8252 (grub_reiserfs_get_item): Save offset of the next item.
8253 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8255 2008-01-25 Robert Millan <rmh@aybabtu.com>
8257 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8258 make all filesystem sources appear together (possibly fixing omissions
8260 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8261 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8262 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8265 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8267 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8268 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8269 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8270 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8272 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8273 (probe): Add a sanity check to make sure of our ability to read
8274 requested files when probing for filesystem type.
8276 * genmk.rb: Update copyright year (2007).
8278 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8279 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8280 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8281 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8282 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8283 : Remove function prototypes.
8285 2008-01-25 Robert Millan <rmh@aybabtu.com>
8287 Revert my previous commits (based on wrong assumption of how grub_errno
8290 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8291 * kern/file.c (grub_file_open): Likewise.
8293 2008-01-24 Pavel Roskin <proski@gnu.org>
8295 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8296 that hang if GRUB tries to setup colors.
8297 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8298 colors for firmwares that don't support it.
8299 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8300 Recognize Open Hack'Ware, set flags to work around its
8303 2008-01-24 Robert Millan <rmh@aybabtu.com>
8305 * kern/file.c (grub_file_open): Do not account previous failures of
8306 unrelated functions when grub_errno is checked for.
8307 Reported by Oleg Strikov.
8309 2008-01-24 Bean <bean123ch@gmail.com>
8311 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8312 (grub_ufs_sblock): New member volume name.
8313 (grub_ufs_find_file): Fix string copy bug.
8314 (grub_ufs_label): Implement this function properly.
8316 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8317 (grub_hfs_iterate_records): Use the correct file number for extents
8318 and catalog file. Fix problem in next index calculation.
8319 (grub_hfs_find_node): Replace recursive function call with loop.
8320 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8322 2008-01-23 Robert Millan <rmh@aybabtu.com>
8324 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8325 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8326 (grub_multiboot2_real_boot): New function prototype.
8328 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8329 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8331 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8332 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8334 2008-01-23 Robert Millan <rmh@aybabtu.com>
8336 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8337 #ifdef'ed out grub_printf().
8339 2008-01-23 Robert Millan <rmh@aybabtu.com>
8341 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8342 grub_dprintf calls, since they make "debug=all" mode unusable.
8343 (grub_console_checkkey): Likewise.
8345 2008-01-23 Robert Millan <rmh@aybabtu.com>
8347 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8348 `term/i386/pc/at_keyboard.c'.
8349 (pkglib_MODULES): Add `serial.mod'.
8350 (serial_mod_SOURCES): New variable.
8351 (serial_mod_CFLAGS): Likewise.
8352 (serial_mod_LDFLAGS): Likewise.
8354 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8355 `<grub/powerpc/ieee1275/console.h>'.
8356 (grub_keyboard_controller_init): New function prototype.
8357 (grub_console_checkkey): Likewise.
8358 (grub_console_getkey): Likewise.
8360 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8363 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8364 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8366 2008-01-23 Robert Millan <rmh@aybabtu.com>
8368 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8369 present, "(memdisk)/boot/grub" becomes the default prefix.
8371 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8372 a memdisk tarball with all the modules. Add --overlay=DIR option that
8373 allows users to overlay additional files into the image.
8375 2008-01-23 Robert Millan <rmh@aybabtu.com>
8377 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8378 and `machine/memory.h'.
8379 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8380 (_multiboot_mod_SOURCES): New variable.
8381 (_multiboot_mod_CFLAGS): Likewise.
8382 (_multiboot_mod_LDFLAGS): Likewise.
8383 (multiboot_mod_SOURCES): Likewise.
8384 (multiboot_mod_CFLAGS): Likewise.
8385 (multiboot_mod_LDFLAGS): Likewise.
8387 * include/grub/i386/ieee1275/loader.h: New file.
8389 * include/grub/i386/ieee1275/machine.h: Likewise.
8391 * include/grub/i386/ieee1275/memory.h: Likewise.
8393 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8394 variable declaration.
8395 (grub_os_area_size): Likewise.
8397 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8398 (grub_lower_mem, grub_upper_mem): New variables.
8399 (grub_stop_floppy): New function (just to make
8400 grub_multiboot2_real_boot() happy).
8402 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8403 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8404 (grub_stop): New function.
8405 Include `"../realmode.S"' and `"../loader.S"'.
8407 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8408 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8410 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8411 rely on grub_multiboot2_real_boot() for final boot.
8413 2008-01-22 Robert Millan <rmh@aybabtu.com>
8415 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8416 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8417 device that doesn't look like an SD card.
8418 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8419 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8420 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8421 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8424 2008-01-22 Robert Millan <rmh@aybabtu.com>
8426 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8427 avoid claiming over our own code.
8429 2008-01-22 Bean <bean123ch@gmail.com>
8431 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8432 (jpeg_mod_SOURCES): New variable.
8433 (jpeg_mod_CFLAGS): Likewise.
8434 (jpeg_mod_LDFLAGS): Likewise.
8436 * video/readers/jpeg.c : New file.
8438 2008-01-22 Bean <bean123ch@gmail.com>
8440 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8441 there are no more items.
8443 2008-01-21 Robert Millan <rmh@aybabtu.com>
8445 * kern/mm.c (grub_mm_init_region): Improve debug message.
8447 2008-01-21 Robert Millan <rmh@aybabtu.com>
8449 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8450 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8452 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8454 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8455 Indicates start of upper memory.
8456 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8457 (generate_image): Abort when image size is big enough to corrupt
8460 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8461 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8462 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8463 instead of hardcoding 0xA0000.
8464 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8465 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8466 instead of hardcoding 0xA0000.
8468 2008-01-21 Robert Millan <rmh@aybabtu.com>
8470 * disk/memdisk.c (memdisk_size): New variable.
8471 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8473 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8474 image to dynamic memory.
8475 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8476 `memdisk_size'. Free memdisk block.
8478 2008-01-21 Robert Millan <rmh@aybabtu.com>
8480 Fix detection of very small filesystems (like tar).
8482 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8483 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8484 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8485 a problem with this disk).
8487 2008-01-21 Robert Millan <rmh@aybabtu.com>
8489 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8490 on grub_biosdisk_rw_standard() error.
8492 2008-01-21 Robert Millan <rmh@aybabtu.com>
8494 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8496 * kern/elf.c: Likewise.
8497 * kern/ieee1275/ieee1275.c: Likewise.
8498 * kern/powerpc/ieee1275/openfw.c: Likewise.
8499 * term/ieee1275/ofconsole.c: Likewise.
8501 2008-01-21 Robert Millan <rmh@aybabtu.com>
8503 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8505 * include/grub/kernel.h (grub_arch_memdisk_addr)
8506 (grub_arch_memdisk_size): Moved from here ...
8508 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8509 (grub_arch_memdisk_size): ... to here.
8511 2008-01-21 Robert Millan <rmh@aybabtu.com>
8513 Mostly based on bugfix from Bean.
8515 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8516 attribute with hook() parameter.
8517 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8519 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8520 attribute with hook() parameter.
8521 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8524 2008-01-21 Robert Millan <rmh@aybabtu.com>
8526 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8527 (pkglib_MODULES): Add `memdisk.mod'.
8528 (memdisk_mod_SOURCES): New variable.
8529 (memdisk_mod_CFLAGS): Likewise.
8530 (memdisk_mod_LDFLAGS): Likewise.
8532 * disk/memdisk.c: New file.
8534 * include/grub/disk.h (grub_disk_dev_id): Add
8535 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8537 * include/grub/i386/pc/kernel.h
8538 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8539 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8540 (grub_kernel_image_size): New variable declaration.
8541 (grub_total_module_size): Likewise.
8542 (grub_memdisk_image_size): Likewise.
8544 * include/grub/i386/pc/memory.h
8545 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8547 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8548 (grub_arch_memdisk_addr): New variable declaration.
8549 (grub_arch_memdisk_size): Likewise.
8551 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8552 (grub_arch_memdisk_size): Likewise.
8554 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8555 (codestart): Replace hardcoded `0x100000' with
8556 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8558 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8559 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8560 not NULL, append the contents of the file it refers to, at the end of
8561 the compressed kernel image. Initialize `grub_memdisk_image_size'
8562 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8563 (options): Add "memdisk"|'m' option.
8564 (main): Parse --memdisk|-m option, and pass user-provided path as
8565 parameter to generate_image().
8567 2008-01-20 Robert Millan <rmh@aybabtu.com>
8569 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8570 grub_dprintf() calls from here ...
8571 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8573 2008-01-20 Robert Millan <rmh@aybabtu.com>
8575 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8577 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8579 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8580 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8581 `GRUB_IEEE1275_FLAG_REAL_MODE'.
8582 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8584 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8585 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8587 2008-01-19 Robert Millan <rmh@aybabtu.com>
8589 Get rid of confusing function (superseded by
8590 `grub_ieee1275_get_integer_property')
8591 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8593 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8595 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8596 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8597 in native endianness from grub_ieee1275_get_integer_property().
8599 2008-01-19 Robert Millan <rmh@aybabtu.com>
8601 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8602 command after "shut-down", since implementations differ on which
8603 the command for halt is.
8605 2008-01-19 Robert Millan <rmh@aybabtu.com>
8607 * include/grub/i386/linuxbios/console.h: Add header protection.
8608 (grub_keyboard_controller_init): New function prototype.
8609 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8610 (KEYBOARD_COMMAND_READ): Likewise.
8611 (KEYBOARD_COMMAND_WRITE): Likewise.
8612 (KEYBOARD_SCANCODE_SET1): Likewise.
8613 (grub_keyboard_controller_write): New function.
8614 (grub_keyboard_controller_read): Likewise.
8615 (grub_keyboard_controller_init): Likewise.
8617 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8618 (grub_console_init): On coreboot/LinuxBIOS, call
8619 grub_keyboard_controller_init().
8621 2008-01-19 Robert Millan <rmh@aybabtu.com>
8623 PowerPC changes provided by Pavel Roskin.
8625 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8626 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8627 don't rely on cmain() doing it.
8628 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8629 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8631 2008-01-16 Robert Millan <rmh@aybabtu.com>
8633 * include/grub/i386/linuxbios/memory.h
8634 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8635 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8636 receive `table_header' as argument. Instead, probe for it in the
8637 known memory ranges where it can be present.
8638 (grub_available_iterate): Do not pass a fixed `table_header' address
8639 to grub_linuxbios_table_iterate().
8641 2008-01-15 Robert Millan <rmh@aybabtu.com>
8643 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8644 * conf/i386-ieee1275.rmk: New file.
8645 * include/grub/i386/ieee1275/console.h: Likewise.
8646 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8647 * include/grub/i386/ieee1275/kernel.h: Likewise.
8648 * include/grub/i386/ieee1275/time.h: Likewise.
8649 * kern/i386/ieee1275/init.c: Likewise.
8650 * kern/i386/ieee1275/startup.S: Likewise.
8652 2008-01-15 Robert Millan <rmh@aybabtu.com>
8654 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8655 when pointers are 32-bit (but still do set it to one when they are
8658 2008-01-15 Robert Millan <rmh@aybabtu.com>
8660 * include/grub/ieee1275/ieee1275.h
8661 (grub_ieee1275_get_integer_property): New function prototype.
8663 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8664 (grub_ieee1275_get_integer_property): New function. Wraps around
8665 grub_ieee1275_get_property() to handle endianness.
8667 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8668 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8670 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8671 (grub_map): Likewise.
8672 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8674 2008-01-15 Bean <bean123ch@gmail.com>
8676 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8677 (grub_script_execute_cmdline): Reset grub_errno.
8679 * normal/main.c (read_config_file): Reset grub_errno.
8681 * normal/parse.y (script_init): New.
8682 (script): Move function and menuentry here.
8684 (command): Add delimiter at the end of command.
8685 (commands): Adjust to match the new command.
8686 (commandblock): Remove grub_script_lexer_record_start.
8687 (menuentry): Add grub_script_lexer_record_start, use the new commands.
8688 (if): Use the new commands.
8690 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8692 2008-01-15 Robert Millan <rmh@aybabtu.com>
8694 * normal/menu.c (run_menu): Move timeout message from here ...
8695 (print_timeout): ... to here.
8696 (run_menu): Use print_timeout() once during initial draw to print
8697 the whole message, and again in every clock tick to update only
8698 the number of seconds.
8700 2008-01-15 Robert Millan <rmh@aybabtu.com>
8702 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8703 actual size of `available' from grub_ieee1275_get_property(), and
8704 restrict parsing to that bound.
8706 2008-01-15 Christian Franke <franke@computer.org>
8708 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8709 (argp_program_version): Remove variable.
8710 (argp_program_bug_address): Likewise.
8711 (options): Convert from struct argp_option to struct option.
8712 (struct arguments): Remove.
8713 (parse_opt): Remove.
8714 (usage): New function.
8715 (main): Replace struct args members by simple variables.
8716 Replace argp_parse() by getopt_long().
8717 Add switch to evaluate options.
8718 Add missing "(...)" around root_dev in prefix string.
8720 2008-01-14 Robert Millan <rmh@aybabtu.com>
8722 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8723 for grub_ieee1275_exit(), in order to improve portability.
8725 2008-01-14 Robert Millan <rmh@aybabtu.com>
8727 * util/grub.d/10_linux.in (prefix): Define.
8728 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8730 2008-01-13 Pavel Roskin <proski@gnu.org>
8732 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8733 grub_errno if no errors have been detected.
8735 2008-01-12 Robert Millan <rmh@aybabtu.com>
8737 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8738 (grub_util_get_dev_abstraction): New function prototype.
8740 * util/getroot.c: Include `<grub/util/getroot.h>'
8741 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8742 (grub_util_get_dev_abstraction): ... here (new function).
8744 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8745 `PRINT_ABSTRACTION'.
8746 (probe): Probe for abstraction type when requested.
8747 (main): Understand `--target=abstraction'.
8749 * util/i386/efi/grub-install.in: Add abstraction module to core
8750 image when it is found to be necessary.
8751 * util/i386/pc/grub-install.in: Likewise.
8752 * util/powerpc/ieee1275/grub-install.in: Likewise.
8754 * util/update-grub_lib.in (font_path): Return system path without
8755 converting to GRUB path.
8756 * util/update-grub.in: Convert system path returned by font_path()
8757 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8758 abstraction module is needed for loading fonts (if any). Export
8759 that as `GRUB_PRELOAD_MODULES'.
8760 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8763 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8765 Remove some unused code from reiserfs.
8767 * fs/reiserfs.c (struct grub_reiserfs_key)
8768 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8769 (struct grub_reiserfs_node_body): Removed.
8770 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8772 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8774 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8776 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8778 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8780 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8782 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8783 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8784 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8786 2008-01-10 Robert Millan <rmh@aybabtu.com>
8788 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8789 Determines if a file is garbage left by packaging systems, etc.
8790 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8791 for processing /etc/grub.d scripts.
8792 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8793 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8794 as a condition for processing Linux images.
8796 2008-01-10 Pavel Roskin <proski@gnu.org>
8798 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8799 to compile reiserfs.c on PowerPC.
8801 2008-01-10 Robert Millan <rmh@aybabtu.com>
8803 * kern/device.c (grub_device_iterate): Do not abort device iteration
8804 when one of the devices cannot be opened.
8805 * kern/disk.c (grub_disk_open): Do not account previous failures of
8806 unrelated functions when grub_errno is checked for.
8808 2008-01-08 Robert Millan <rmh@aybabtu.com>
8810 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8811 `! grub_linux_is_bzimage', change order of address comparison to make
8812 it more intuitive, and improve "too big zImage" error message.
8814 2008-01-08 Robert Millan <rmh@aybabtu.com>
8816 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8817 `$(update-grub_DATA)'.
8818 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8821 2008-01-07 Robert Millan <rmh@aybabtu.com>
8823 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8824 which instruction is modified by grub-setup during installation
8825 (since it wasn't obvious by only looking at this file).
8827 2008-01-07 Robert Millan <rmh@aybabtu.com>
8829 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8830 listing actual TODO items.
8832 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8834 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8836 (grub_reiserfs_get_key_offset): Likewise.
8837 (grub_reiserfs_set_key_offset): Likewise.
8838 (grub_reiserfs_set_key_type): Likewise.
8839 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8841 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8842 better to remove the bitfield version completely.
8844 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8846 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8847 allocated from the heap, due to the fshelp implementation.
8848 (grub_reiserfs_dir): Free NODE, due to the same reason.
8850 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8852 Mostly from Vincent Pelletier:
8854 * fs/reiserfs.c: New file.
8856 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8857 (reiserfs_mod_SOURCES): New variable.
8858 (reiserfs_mod_CFLAGS): Likewise.
8859 (reiserfs_mod_LDFLAGS): Likewise.
8861 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8862 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8863 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8866 2008-01-06 Robert Millan <rmh@aybabtu.com>
8868 * normal/color.c: Remove `<grub/env.h>'.
8870 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8872 * include/grub/normal.h: Include <grub/env.h>.
8874 2008-01-05 Robert Millan <rmh@aybabtu.com>
8876 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8877 usage example with `(hd0,1)'.
8878 Reported by Samuel Thibault.
8880 2008-01-05 Robert Millan <rmh@aybabtu.com>
8882 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8883 (grub_linux_boot_zimage): Rename to ...
8884 (grub_linux_boot): ... this.
8885 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8886 (grub_linux_boot_zimage): Conditionalize zImage copy.
8888 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8889 (grub_linux_boot_bzimage): Remove prototype.
8890 (grub_linux_boot_zimage): Rename to ...
8891 (grub_linux_boot): ... this.
8893 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8894 (grub_linux_boot): Remove function.
8896 2008-01-05 Robert Millan <rmh@aybabtu.com>
8898 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8899 (grub_env_write_color_highlight): Likewise.
8900 (grub_wait_after_message): Likewise.
8902 * normal/color.c: New file.
8904 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8905 (normal_mod_DEPENDENCIES): Likewise.
8907 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8908 (normal_mod_DEPENDENCIES): Likewise.
8910 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8911 (normal_mod_DEPENDENCIES): Likewise.
8913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8914 (normal_mod_DEPENDENCIES): Likewise.
8916 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8917 for waiting after a message is printed.
8918 * normal/main.c (read_config_file): Likewise.
8919 (grub_normal_init): Register grub_env_write_color_normal() and
8920 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8921 `color_highlight' variables as global.
8923 * normal/menu.c (grub_wait_after_message): New function.
8924 (grub_color_menu_normal): New variable. Replaces ...
8925 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8926 (grub_color_menu_highlight): New variable. Replaces ...
8927 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8928 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8929 `GRUB_TERM_COLOR_STANDARD'.
8930 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8931 `normal_code' and `highlight_code' to `old_color_normal' and
8932 `old_color_highlight', respectively.
8933 (grub_menu_init_page): Update colors when drawing the menu, based on
8934 `menu_color_normal' and `menu_color_highlight' variables.
8935 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8936 a message is printed.
8938 2008-01-05 Robert Millan <rmh@aybabtu.com>
8940 * kern/env.c (grub_env_context_open): Propagate hooks for global
8941 variables to new context.
8943 * kern/main.c (grub_set_root_dev): Export `root' variable.
8945 2008-01-05 Robert Millan <rmh@aybabtu.com>
8947 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8948 discs unconditionally, since udev and others have options to provide
8951 2008-01-05 Robert Millan <rmh@aybabtu.com>
8953 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8955 2008-01-04 Christian Franke <franke@computer.org>
8957 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8960 2008-01-03 Pavel Roskin <proski@gnu.org>
8962 * kern/i386/linuxbios/init.c: Put "void" to all function
8963 declarations with no arguments.
8964 * kern/powerpc/ieee1275/init.c: Likewise.
8965 * term/i386/pc/at_keyboard.c: Likewise.
8966 * term/i386/pc/vga_text.c: Likewise.
8967 * util/grub-mkdevicemap.c: Likewise.
8969 2008-01-02 Robert Millan <rmh@aybabtu.com>
8971 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8972 message when loaded image is out of bounds.
8973 (grub_multiboot_load_elf64): Likewise.
8975 2008-01-02 Pavel Roskin <proski@gnu.org>
8977 * util/grub.d/10_linux.in: Try version without ".old" when
8978 looking for initrd. It's better to use initrd from the newer
8979 kernel of the same version than no initrd at all.
8981 2008-01-01 Robert Millan <rmh@aybabtu.com>
8983 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8985 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8987 * include/grub/video.h: Added grub_video_unmap_color and
8988 grub_video_get_active_render_target.
8989 (grub_video_adapter): Added unmap_color and get_active_render_target.
8991 * video/video.c: Added grub_video_unmap_color and
8992 grub_video_get_active_render_target.
8993 (grub_video_get_info): Changed method to accept NULL pointer as an
8994 argument to allow detection of active video adapter.
8996 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8997 grub_video_vbe_unmap_color_int.
8998 Added grub_video_vbe_unmap_color and
8999 grub_video_vbe_get_active_render_target.
9000 (grub_video_vbe_adapter): Added unmap_color and
9001 get_active_render_target.
9003 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9004 with grub_video_vbe_unmap_color_int.
9006 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9007 (DEFAULT_NORMAL_COLOR): Likewise.
9008 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9009 (DEFAULT_FG_COLOR): Removed.
9010 (DEFAULT_BG_COLOR): Likewise.
9011 (DEFAULT_CURSOR_COLOR): Changed value.
9012 (grub_virtual_screen): Added standard_color_setting,
9013 normal_color_setting, highlight_color_setting and term_color.
9014 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9015 (bitmap_width): Added.
9016 (bitmap_height): Likewise.
9018 (set_term_color): Likewise.
9019 (grub_virtual_screen_setup): Changed to use new terminal coloring
9021 (grub_gfxterm_init): Added init for bitmap.
9022 (grub_gfxterm_fini): Added destroy for bitmap.
9023 (redraw_screen_rect): Updated to use background bitmap and new
9025 (scroll_up): Added optimization for case when there is no bitmap.
9026 (grub_gfxterm_cls): Fixed to use correct background color.
9027 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9029 (grub_virtual_screen_setcolor): Likewise.
9030 (grub_virtual_screen_getcolor): Added.
9031 (grub_gfxterm_background_image_cmd): Likewise.
9032 (grub_video_term): Added setcolor and getcolor.
9033 (MOD_INIT): Added registration of background_image command.
9034 (MOD_TERM): Added unregistration for background_image command.
9036 2007-12-30 Pavel Roskin <proski@gnu.org>
9038 * loader/multiboot_loader.c: Fix multiboot command
9039 unregistration. Fix all typos in the word "multiboot".
9041 2007-12-29 Pavel Roskin <proski@gnu.org>
9043 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9044 support for initrd names used in Fedora.
9046 2007-12-26 Bean <bean123ch@gmail.com>
9048 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9049 (cpio_mod_SOURCES): New variable.
9050 (cpio_mod_CFLAGS): Likewise.
9051 (cpio_mod_LDFLAGS): Likewise.
9053 * fs/cpio.c: New file.
9055 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9057 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9059 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9063 2007-12-25 Robert Millan <rmh@aybabtu.com>
9065 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9066 (grub_getcolor): New function.
9068 * kern/term.c (grub_getcolor): New function.
9069 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9070 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9071 (print_entry): Set normal and highlight colors to
9072 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9073 respectively, before printing and restore them to old
9075 (grub_menu_init_page): Likewise. Fill an additional colored space
9076 that would otherwise be left blank.
9078 * term/efi/console.c (grub_console_getcolor): New function.
9079 (struct grub_console_term.getcolor): New variable.
9080 * term/i386/pc/console.c (grub_console_getcolor): New function.
9081 (struct grub_console_term.getcolor): New variable.
9082 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9083 (struct grub_console_term.getcolor): New variable.
9085 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9086 (struct grub_console_term.setcolor): Remove variable.
9087 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9088 (struct grub_console_term.setcolor): Remove variable.
9089 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9090 (struct grub_console_term.setcolor): Remove variable.
9091 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9092 (struct grub_console_term.setcolor): Remove variable.
9094 2007-12-25 Robert Millan <rmh@aybabtu.com>
9096 * configure.ac: Search for possible unifont.hex locations, and
9097 define UNIFONT_HEX if found.
9099 * Makefile.in (UNIFONT_HEX): Define variable.
9100 (DATA): Rename to ...
9101 (PKGLIB): ... this. Update all users.
9102 (PKGDATA): New variable.
9103 (pkgdata_IMAGES): Rename to ...
9104 (pkglib_IMAGES): ... this. Update all users.
9105 (pkgdata_MODULES): Rename to ...
9106 (pkglib_MODULES): ... this. Update all users.
9107 (pkgdata_PROGRAMS): Rename to ...
9108 (pkglib_PROGRAMS): ... this. Update all users.
9109 (pkgdata_DATA): Rename to ...
9110 (pkglib_DATA): ... this. Update all users.
9111 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9112 (unicode.pff, ascii.pff): New rules.
9113 (all-local): Add `$(PKGDATA)' dependency.
9114 (install-local): Process `$(PKGDATA)'.
9116 * util/update-grub_lib.in (font_path): Search for *.pff files in
9117 a few more locations, including `${pkgdata}'.
9119 2007-12-23 Robert Millan <rmh@aybabtu.com>
9121 Patch from Bean <bean123ch@gmail.com>:
9122 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9125 2007-12-21 Bean <bean123ch@gmail.com>
9127 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9128 (ntfscomp_mod_SOURCES): New variable.
9129 (ntfscomp_mod_CFLAGS): Likewise.
9130 (ntfscomp_mod_LDFLAGS): Likewise.
9132 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9133 (grub_probe_SOURCES): Likewise.
9134 (grub_emu_SOURCES): Likewise.
9136 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9137 (grub_emu_SOURCES): Likewise.
9139 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9140 (grub_emu_SOURCES): Likewise.
9142 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9143 (grub_emu_SOURCES): Likewise.
9145 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9146 (read_run_list): Renamed to grub_ntfs_read_run_list.
9147 (decomp_nextvcn): Moved to ntfscomp.c.
9148 (decomp_getch): Likewise.
9149 (decomp_get16): Likewise.
9150 (decomp_block): Likewise.
9151 (read_block): Likewise.
9152 (read_data): Partially moved to ntfscomp.c.
9153 (fixup): Change unsigned to grub_uint16_t.
9154 (read_mft): Change unsigned long to grub_uint32_t.
9155 (read_attr): Likewise.
9156 (read_data): Likewise.
9157 (read_run_data): Likewise.
9158 (read_run_list): Likewise.
9159 (read_mft): Likewise.
9161 * fs/ntfscomp.c: New file.
9163 * include/grub/ntfs.h: New file.
9165 2007-12-16 Robert Millan <rmh@aybabtu.com>
9167 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9168 IDE disk check, since Linux is known to support 20 IDE disks.
9169 Reported by Colin Watson.
9171 2007-12-15 Bean <bean123ch@gmail.com>
9173 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9174 (lnxboot_img_SOURCES): New variable.
9175 (lnxboot_img_ASFLAGS): Likewise.
9176 (lnxboot_img_LDFLAGS): Likewise.
9178 * boot/i386/pc/lnxboot.S: New file.
9180 2007-11-24 Pavel Roskin <proski@gnu.org>
9182 * configure.ac: Test if '--build-id=none' is supported by the
9183 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9184 objcopy to generate incorrect binary files (binutils
9185 2.17.50.0.18-1 as shipped by Fedora 8).
9186 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9187 linking, so that build ID doesn't break the test.
9189 2007-11-24 Pavel Roskin <proski@gnu.org>
9191 * include/grub/i386/time.h: use "void" in the argument list
9193 * include/grub/powerpc/time.h: Likewise.
9194 * include/grub/sparc64/time.h: Likewise.
9196 2007-11-18 Christian Franke <franke@computer.org>
9198 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9199 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9200 This fixes the problem that function keys did not work in grub-emu.
9202 2007-11-18 Christian Franke <franke@computer.org>
9204 * disk/host.c (grub_host_open): Remove attribute unused from
9205 name parameter. Add check for "host". This fixes the problem
9206 that grub-emu does not find partitions.
9208 2007-11-18 Christian Franke <franke@computer.org>
9210 * util/hostfs.c (is_dir): New function.
9211 (grub_hostfs_dir): Handle missing dirent.d_type case.
9212 (grub_hostfs_read): Add missing fseek().
9213 (grub_hostfs_label): Clear label pointer. This fixes a crash
9214 of grub-emu on "ls (host)".
9216 2007-11-18 Christian Franke <franke@computer.org>
9218 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9219 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9220 to 64 bit boundary by default.
9222 2007-11-18 Bean <bean123ch@gmail.com>
9224 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9225 (hexdump_mod_SOURCES): New variable.
9226 (hexdump_mod_CFLAGS): Likewise.
9227 (hexdump_mod_LDFLAGS): Likewise.
9229 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9231 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9233 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9235 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9237 * include/grub/hexdump.h: New file.
9239 * commands/hexdump.c: New file.
9241 2007-11-10 Robert Millan <rmh@aybabtu.com>
9243 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9244 in grub_outb() calls.
9245 (beep_on): Likewise.
9247 2007-11-10 Christian Franke <franke@computer.org>
9249 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9250 (grub_menu_run): Likewise.
9252 2007-11-10 Robert Millan <rmh@aybabtu.com>
9254 * include/grub/i386/efi/machine.h: New file.
9255 * include/grub/i386/linuxbios/machine.h: Likewise.
9256 * include/grub/i386/pc/machine.h: Likewise.
9257 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9258 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9260 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9261 (serial_hw_io_addr): New variable.
9262 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9263 instead of `(unsigned short *) 0x400'.
9265 2007-11-10 Bean <bean123ch@gmail.com>
9267 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9269 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9271 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9272 (vga_mod_SOURCES): Added.
9273 (vga_mod_CFLAGS): Likewise.
9274 (vga_mod_LDFLAGS): Likewise.
9276 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9278 (set_map_mask): Likewise.
9279 (set_read_map): Likewise.
9280 (set_read_address): Likewise.
9281 (vga_font): Removed variable.
9282 (get_vga_glyph): Removed function.
9283 (invalidate_char): Likewise.
9284 (write_char): Changed to use grub_font_get_glyph() for font
9286 (grub_vga_putchar): Likewise.
9287 (grub_vga_getcharwidth): Likewise.
9289 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9291 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9293 (pxeboot_img_LDFLAGS): Likewise.
9294 (diskboot_img_LDFLAGS): Likewise.
9295 (kernel_img_LDFLAGS): Likewise.
9297 2007-11-06 Robert Millan <rmh@aybabtu.com>
9299 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9300 in grub_outb() calls.
9301 (serial_hw_init): Likewise.
9303 2007-11-05 Robert Millan <rmh@aybabtu.com>
9305 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9306 spaces. Skip non-regular files.
9308 2007-11-05 Robert Millan <rmh@aybabtu.com>
9310 * kern/disk.c (grub_disk_firmware_fini)
9311 (grub_disk_firmware_is_tainted): New variables.
9313 * include/grub/disk.h (grub_disk_firmware_fini)
9314 (grub_disk_firmware_is_tainted): Likewise.
9316 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9317 (grub_disk_biosdisk_fini): ... to here.
9318 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9319 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9320 is set. Register grub_disk_biosdisk_fini() in
9321 `grub_disk_firmware_fini'.
9323 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9324 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9325 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9326 to finish existing firmware disk interface.
9328 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9329 (ata_mod_SOURCES): New variable.
9330 (ata_mod_CFLAGS): Likewise.
9331 (ata_mod_LDFLAGS): Likewise.
9333 2007-11-05 Robert Millan <rmh@aybabtu.com>
9335 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9336 (grub_ata_wait): Reimplement using grub_millisleep().
9338 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9339 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9341 2007-11-03 Marco Gerards <marco@gnu.org>
9343 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9344 (CRTC_ADDR_PORT): New macro.
9345 (CRTC_DATA_PORT): Likewise.
9346 (CRTC_CURSOR): Likewise.
9347 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9348 (CRTC_CURSOR_ADDR_LOW): Likewise.
9349 (update_cursor): New function.
9350 (grub_console_real_putchar): Call `update_cursor'.
9351 (grub_console_gotoxy): Likewise.
9352 (grub_console_cls): Set the default color when clearing the
9354 (grub_console_setcursor): Implemented.
9356 2007-11-03 Marco Gerards <marco@gnu.org>
9358 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9360 (grub_ata_pio_write): Likewise.
9362 (grub_atapi_identify): Wait after issuing an ATA command.
9363 (grub_atapi_packet): Likewise.
9364 (grub_ata_identify): Likewise.
9365 (grub_ata_readwrite): Likewise.
9367 2007-11-03 Marco Gerards <marco@gnu.org>
9369 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9370 (grub_ata_pio_write): Likewise.
9371 (grub_ata_readwrite): Use `grub_error', instead of
9372 returning `grub_errno'.
9374 2007-11-03 Marco Gerards <marco@gnu.org>
9376 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9377 grub_ata_pio_write once for every single sector, instead of for
9380 2007-10-31 Robert Millan <rmh@aybabtu.com>
9382 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9384 * conf/i386-linuxbios.rmk: New file.
9386 * kern/i386/pc/hardware.c: Likewise.
9387 * term/i386/pc/at_keyboard.c: Likewise.
9388 * term/i386/pc/vga_text.c: Likewise.
9390 * include/grub/i386/linuxbios/boot.h: Likewise.
9391 * include/grub/i386/linuxbios/console.h: Likewise.
9392 * include/grub/i386/linuxbios/init.h: Likewise.
9393 * include/grub/i386/linuxbios/kernel.h: Likewise.
9394 * include/grub/i386/linuxbios/loader.h: Likewise.
9395 * include/grub/i386/linuxbios/memory.h: Likewise.
9396 * include/grub/i386/linuxbios/serial.h: Likewise.
9397 * include/grub/i386/linuxbios/time.h: Likewise.
9399 * kern/i386/linuxbios/init.c: Likewise.
9400 * kern/i386/linuxbios/startup.S: Likewise.
9401 * kern/i386/linuxbios/table.c: Likewise.
9403 2007-10-31 Marco Gerards <marco@gnu.org>
9405 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9406 (ata_mod_SOURCES): New variable.
9407 (ata_mod_CFLAGS): Likewise.
9408 (ata_mod_LDFLAGS): Likewise.
9410 * disk/ata.c: New file.
9412 * include/grub/disk.h (grub_disk_dev_id): Add
9413 `GRUB_DISK_DEV_ATA_ID'.
9415 2007-10-31 Robert Millan <rmh@aybabtu.com>
9417 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9418 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9420 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9421 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9423 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9426 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9428 2007-10-27 Robert Millan <rmh@aybabtu.com>
9430 * include/grub/types.h (ULONG_MAX): Define macro.
9432 2007-10-22 Robert Millan <rmh@aybabtu.com>
9434 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9436 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9438 2007-10-22 Robert Millan <rmh@aybabtu.com>
9440 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9441 (pkgdata_MODULES): Add `biosdisk.mod'.
9442 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9445 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9446 (grub_biosdisk_init): Replace with ...
9447 (GRUB_MOD_INIT(biosdisk)): ... this.
9448 (grub_biosdisk_fini): Replace with ...
9449 (GRUB_MOD_FINI(biosdisk)): ... this.
9451 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9452 (grub_machine_init): Remove call to grub_biosdisk_init().
9453 (grub_machine_fini): Remove call to grub_machine_fini().
9455 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9457 2007-10-22 Robert Millan <rmh@aybabtu.com>
9459 * include/grub/time.h: New file.
9460 * include/grub/i386/time.h: Likewise.
9461 * include/grub/powerpc/time.h: Likewise.
9462 * include/grub/sparc64/time.h: Likewise.
9464 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9466 (KERNEL_MACHINE_TIME_HEADER): ... this.
9467 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9469 (KERNEL_MACHINE_TIME_HEADER): ... this.
9470 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9472 (KERNEL_MACHINE_TIME_HEADER): ... this.
9474 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9475 (grub_millisleep): New function.
9476 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9477 (grub_millisleep): New function.
9478 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9479 Remove `grub/machine/time.h' include.
9480 (grub_millisleep): New function.
9481 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9482 Remove `grub/machine/time.h' include.
9483 (grub_millisleep): New function.
9485 * include/grub/misc.h (grub_div_roundup): New function.
9487 * kern/misc.c: Include `<grub/time.h>'.
9488 (grub_millisleep_generic): New function.
9490 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9492 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9494 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9495 `machine/time.h'. Add `time.h'.
9496 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9498 2007-10-21 Robert Millan <rmh@aybabtu.com>
9500 * include/grub/misc.h (grub_max): New function.
9502 2007-10-21 Robert Millan <rmh@aybabtu.com>
9504 * util/misc.c (grub_util_info): Call fflush() before returning.
9506 2007-10-20 Robert Millan <rmh@aybabtu.com>
9508 * genmk.rb (Image): Copy `extra_flags' from here ...
9509 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9511 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9512 to `argc' and `args' arguments.
9514 2007-10-17 Robert Millan <rmh@aybabtu.com>
9516 * kern/i386/loader.S: New file.
9518 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9519 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9520 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9521 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9522 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9523 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9524 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9525 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9526 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9527 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9528 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9529 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9530 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9531 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9533 * kern/i386/realmode.S: New file.
9535 * kern/i386/pc/startup.S (protstack): Moved from here ...
9536 * kern/i386/realmode.S (protstack)... to here.
9537 * kern/i386/pc/startup.S (gdt): Moved from here ...
9538 * kern/i386/realmode.S (gdt)... to here.
9539 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9540 * kern/i386/realmode.S (prot_to_real)... to here.
9542 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9543 `kern/i386/realmode.S'.
9545 2007-10-17 Robert Millan <rmh@aybabtu.com>
9547 * include/grub/i386/loader.h: New file.
9549 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9550 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9551 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9552 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9553 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9554 * include/grub/i386/loader.h (grub_linux_prot_size)
9555 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9556 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9557 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9558 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9560 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9562 2007-10-15 Robert Millan <rmh@aybabtu.com>
9564 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9565 filesystem when dev->disk is unset.
9566 Do probe for filesystem even when dev->disk->has_partitions is set.
9567 In case a filesystem is found, always report it.
9568 In case it isn't, if dev->disk->has_partitions is set, report that
9569 a partition table was found instead of reporting that no filesystem
9570 could be identified.
9572 2007-10-12 Robert Millan <rmh@aybabtu.com>
9574 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9575 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9577 * include/grub/types.h (grub_host_to_target16): New macro.
9578 (grub_host_to_target32): Likewise.
9579 (grub_host_to_target64): Likewise.
9580 (grub_target_to_host16): Likewise.
9581 (grub_target_to_host32): Likewise.
9582 (grub_target_to_host64): Likewise.
9584 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9586 (GRUB_MOD_ALIGN): ...this. Update all users.
9588 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9589 grub_host_to_target32.
9590 Replace grub_be_to_cpu32 with grub_target_to_host32.
9591 (load_modules): Likewise.
9592 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9593 Replace grub_be_to_cpu32 with grub_target_to_host32.
9594 Replace grub_cpu_to_be16 with grub_host_to_target16.
9595 Replace grub_cpu_to_be32 grub_host_to_target32.
9597 2007-10-12 Robert Millan <rmh@aybabtu.com>
9599 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9600 * util/elf/grub-mkimage.c: ... here.
9602 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9603 `util/powerpc/ieee1275/grub-mkimage.c'.
9605 2007-10-07 Robert Millan <rmh@aybabtu.com>
9607 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9608 and make it easier to figure out.
9609 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9610 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9611 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9612 leave us with less than HEAP_MIN_SIZE total heap.
9613 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9615 2007-10-03 Robert Millan <rmh@aybabtu.com>
9617 * include/grub/i386/io.h: New file.
9618 * commands/i386/pc/play.c (inb): Removed.
9620 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9622 * term/i386/pc/serial.c (inb): Removed.
9624 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9626 * term/i386/pc/vga.c (inb): Removed.
9628 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9631 2007-10-02 Robert Millan <rmh@aybabtu.com>
9633 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9634 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9635 Reported by Marcin Kurek.
9637 2007-09-07 Robert Millan <rmh@aybabtu.com>
9639 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9640 SmartFirmware version updates (as released by Sven Luther), and avoid
9641 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9642 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9645 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9648 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9649 when merging two regions.
9651 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9653 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9654 * normal/completion.c (grub_normal_do_completion): Likewise.
9655 Reported by Hitoshi Ozeki.
9657 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9659 Do not use devices at boot in chainloading.
9661 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9662 (boot_part_addr): Likewise.
9663 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9664 with BOOT_DRIVE and BOOT_PART_ADDR.
9665 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9666 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9668 2007-08-29 Robert Millan <rmh@aybabtu.com>
9670 Patch from Simon Peter <dn.tlp@gmx.net>:
9671 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9672 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9673 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9674 util/i386/pc/grub-setup.c_DEPENDENCIES.
9675 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9676 util/grub-probe.c_DEPENDENCIES.
9677 * conf/powerpc-ieee1275.rmk: Likewise.
9679 2007-08-28 Robert Millan <rmh@aybabtu.com>
9681 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9682 to tell grub-mkdevicemap how to name devices.
9683 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9686 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9687 util/i386/get_disk_name.c.
9688 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9689 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9690 util/ieee1275/get_disk_name.c.
9692 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9694 * DISTLIST: Add util/i386/get_disk_name.c and
9695 util/ieee1275/get_disk_name.c.
9697 * util/grub-mkdevicemap.c: Replace device naming logic with
9698 grub_util_get_disk_name() calls.
9700 2007-08-20 Robert Millan <rmh@aybabtu.com>
9702 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9703 (so that it works for both plural and singular quantities).
9705 2007-08-05 Robert Millan <rmh@aybabtu.com>
9707 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9708 so that [xz] isn't taken into account when determining order.
9710 2007-08-02 Marco Gerards <marco@gnu.org>
9712 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9713 `include/multiboot2.h', `include/grub/elfload.h',
9714 `include/multiboot.h', `include/grub/multiboot.h',
9715 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9716 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9717 `kern/elf.c', `loader/multiboot_loader.c',
9718 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9719 `loader/i386/pc/multiboot2.c',
9720 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9721 `util/i386/pc/grub-mkrescue.in'. Remove
9722 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9723 `include/grub/i386/pc/util/biosdisk.h' and
9724 `include/grub/powerpc/ieee1275/multiboot.h'.
9726 2007-08-02 Bean <bean123ch@gmail.com>
9728 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9729 (ntfs_mod_SOURCES): New variable.
9730 (ntfs_mod_CFLAGS): Likewise.
9731 (ntfs_mod_LDFLAGS): Likewise.
9733 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9734 (grub_probe_SOURCES): Likewise.
9735 (grub_emu_SOURCES): Likewise.
9737 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9738 (grub_emu_SOURCES): Likewise.
9740 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9741 (grub_emu_SOURCES): Likewise.
9743 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9745 * fs/ntfs.c: New file.
9747 2007-08-02 Bean <bean123ch@gmail.com>
9749 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9751 * file.h (grub_file): Likewise.
9753 * fshelp.h (grub_fshelp_read_file): Likewise.
9755 * util/i386/pc/grub-setup.c (setup): Likewise.
9756 (save_first_sector): Likewise.
9757 (save_blocklists): Likewise.
9759 * fs/affs.c (grub_affs_read_file): Likewise.
9761 * fs/ext2.c (grub_ext2_read_file): Likewise.
9763 * fs/fat.c (grub_fat_read_data): Likewise.
9765 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9767 * fs/hfs.c (grub_hfs_read_file): Likewise.
9769 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9771 * fs/jfs.c (grub_jfs_read_file): Likewise.
9773 * fs/minix.c (grub_minix_read_file): Likewise.
9775 * fs/sfs.c (grub_sfs_read_file): Likewise.
9777 * fs/ufs.c (grub_ufs_read_file): Likewise.
9779 * fs/xfs.c (grub_xfs_read_file): Likewise.
9781 * command/blocklist.c (read_blocklist): Likewise.
9782 (print_blocklist): Likewise.
9784 2007-08-02 Marco Gerards <marco@gnu.org>
9786 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9789 * disk/host.c: New file.
9791 * util/hostfs.c: Likewise.
9793 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9794 return `GRUB_ERR_BAD_FS'.
9795 * fs/sfs.c (grub_sfs_mount): Likewise.
9796 * fs/xfs.c (grub_xfs_mount): Likewise.
9798 * include/grub/disk.h (enum grub_disk_dev_id): Add
9799 `GRUB_DISK_DEVICE_HOST_ID'.
9801 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9803 2007-07-24 Jerone Young <jerone@gmail.com>
9805 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9806 modules for compilation.
9807 * conf/powerpc-ieee1275.rmk: Likewise.
9809 * include/multiboot.h: Move multiboot definitions to one file. Rename
9810 many definitions to not get grub specific.
9811 * include/multiboot2.h: Create header with multiboot 2 definitions.
9812 * include/grub/multiboot.h: Header for grub specific function
9813 prototypes and definitions.
9814 * include/grub/multiboot2.h: Likewise.
9815 * include/grub/multiboot_loader.h: Likewise.
9816 * include/grub/i386/pc/multiboot.h: Removed.
9817 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9819 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9820 and 2 to allow for one multiboot and module commands.
9821 * loader/multiboot2.c: Add multiboot2 functionality.
9822 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9823 and definition names.
9824 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9826 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9827 ieee1275 specific multiboot2 code.
9829 * kern/i386/pc/startup.S: Change headers and definition names for
9830 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9832 2007-07-22 Robert Millan <rmh@aybabtu.com>
9834 * geninitheader.sh: Process file specified in first parameter rather
9835 than hardcoding grub_modules_init.lst.
9836 * geninit.sh: Likewise. Also, construct header name dynamically rather
9837 than hardcoding grub_modules_init.h.
9839 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9840 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9841 grub_probe_init.[ch] and grub_setup_init.[ch].
9843 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9844 grub_modules_init.h with grub_emu_init.h.
9845 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9846 grub_probe_init.[ch] files.
9847 * conf/i386-efi.rmk: Likewise.
9848 * conf/i386-pc.rmk: Likewise.
9849 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9850 grub_setup_init.[ch] files.
9852 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9853 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9854 to initialize modules rather than a list of hardcoded functions.
9855 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9856 grub_init_all() to initialize modules rather than a list of hardcoded
9859 2007-07-22 Robert Millan <rmh@aybabtu.com>
9861 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9862 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9864 2007-07-22 Robert Millan <rmh@aybabtu.com>
9866 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9867 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9868 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9869 flag when running on SmartFirmware.
9870 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9871 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9874 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9875 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9876 rather than decreasing it.
9878 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9879 there's not enough space to do it, fail in the same way as when it
9880 can't be done because there are no partitions.
9882 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9883 when nvsetenv failed.
9885 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9887 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9888 because this rule is automatically generated.
9889 (grub-mkrescue): Removed for the same reason as above.
9891 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9893 Migrate to GNU General Public License Version 3.
9895 * COPYING: Replaced with the plain text version of GPLv3.
9897 * config.guess: Updated from gnulib.
9898 * config.sub: Likewise.
9900 * geninit.sh: Output a GPLv3 copyright notice.
9901 * geninitheader.sh: Likewise.
9902 * genmodsrc.sh: Likewise.
9903 * gensymlist.sh.in: Likewise.
9905 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9906 * boot/i386/pc/diskboot.S: Likewise.
9907 * boot/i386/pc/pxeboot.S: Likewise.
9908 * commands/blocklist.c: Likewise.
9909 * commands/boot.c: Likewise.
9910 * commands/cat.c: Likewise.
9911 * commands/cmp.c: Likewise.
9912 * commands/configfile.c: Likewise.
9913 * commands/echo.c: Likewise.
9914 * commands/help.c: Likewise.
9915 * commands/ls.c: Likewise.
9916 * commands/search.c: Likewise.
9917 * commands/terminal.c: Likewise.
9918 * commands/test.c: Likewise.
9919 * commands/videotest.c: Likewise.
9920 * commands/i386/cpuid.c: Likewise.
9921 * commands/i386/pc/halt.c: Likewise.
9922 * commands/i386/pc/play.c: Likewise.
9923 * commands/i386/pc/reboot.c: Likewise.
9924 * commands/i386/pc/vbeinfo.c: Likewise.
9925 * commands/i386/pc/vbetest.c: Likewise.
9926 * commands/ieee1275/halt.c: Likewise.
9927 * commands/ieee1275/reboot.c: Likewise.
9928 * commands/ieee1275/suspend.c: Likewise.
9929 * disk/loopback.c: Likewise.
9930 * disk/lvm.c: Likewise.
9931 * disk/raid.c: Likewise.
9932 * disk/efi/efidisk.c: Likewise.
9933 * disk/i386/pc/biosdisk.c: Likewise.
9934 * disk/ieee1275/ofdisk.c: Likewise.
9935 * font/manager.c: Likewise.
9936 * fs/affs.c: Likewise.
9937 * fs/ext2.c: Likewise.
9938 * fs/fat.c: Likewise.
9939 * fs/fshelp.c: Likewise.
9940 * fs/hfs.c: Likewise.
9941 * fs/hfsplus.c: Likewise.
9942 * fs/iso9660.c: Likewise.
9943 * fs/jfs.c: Likewise.
9944 * fs/minix.c: Likewise.
9945 * fs/sfs.c: Likewise.
9946 * fs/ufs.c: Likewise.
9947 * fs/xfs.c: Likewise.
9948 * hello/hello.c: Likewise.
9949 * include/grub/acorn_filecore.h: Likewise.
9950 * include/grub/arg.h: Likewise.
9951 * include/grub/bitmap.h: Likewise.
9952 * include/grub/boot.h: Likewise.
9953 * include/grub/cache.h: Likewise.
9954 * include/grub/device.h: Likewise.
9955 * include/grub/disk.h: Likewise.
9956 * include/grub/dl.h: Likewise.
9957 * include/grub/elfload.h: Likewise.
9958 * include/grub/env.h: Likewise.
9959 * include/grub/err.h: Likewise.
9960 * include/grub/file.h: Likewise.
9961 * include/grub/font.h: Likewise.
9962 * include/grub/fs.h: Likewise.
9963 * include/grub/fshelp.h: Likewise.
9964 * include/grub/gzio.h: Likewise.
9965 * include/grub/hfs.h: Likewise.
9966 * include/grub/kernel.h: Likewise.
9967 * include/grub/loader.h: Likewise.
9968 * include/grub/lvm.h: Likewise.
9969 * include/grub/misc.h: Likewise.
9970 * include/grub/mm.h: Likewise.
9971 * include/grub/net.h: Likewise.
9972 * include/grub/normal.h: Likewise.
9973 * include/grub/parser.h: Likewise.
9974 * include/grub/partition.h: Likewise.
9975 * include/grub/pc_partition.h: Likewise.
9976 * include/grub/raid.h: Likewise.
9977 * include/grub/rescue.h: Likewise.
9978 * include/grub/script.h: Likewise.
9979 * include/grub/setjmp.h: Likewise.
9980 * include/grub/symbol.h: Likewise.
9981 * include/grub/term.h: Likewise.
9982 * include/grub/terminfo.h: Likewise.
9983 * include/grub/tparm.h: Likewise.
9984 * include/grub/types.h: Likewise.
9985 * include/grub/video.h: Likewise.
9986 * include/grub/efi/api.h: Likewise.
9987 * include/grub/efi/chainloader.h: Likewise.
9988 * include/grub/efi/console.h: Likewise.
9989 * include/grub/efi/console_control.h: Likewise.
9990 * include/grub/efi/disk.h: Likewise.
9991 * include/grub/efi/efi.h: Likewise.
9992 * include/grub/efi/pe32.h: Likewise.
9993 * include/grub/efi/time.h: Likewise.
9994 * include/grub/i386/linux.h: Likewise.
9995 * include/grub/i386/setjmp.h: Likewise.
9996 * include/grub/i386/types.h: Likewise.
9997 * include/grub/i386/efi/kernel.h: Likewise.
9998 * include/grub/i386/efi/loader.h: Likewise.
9999 * include/grub/i386/efi/time.h: Likewise.
10000 * include/grub/i386/pc/biosdisk.h: Likewise.
10001 * include/grub/i386/pc/boot.h: Likewise.
10002 * include/grub/i386/pc/chainloader.h: Likewise.
10003 * include/grub/i386/pc/console.h: Likewise.
10004 * include/grub/i386/pc/init.h: Likewise.
10005 * include/grub/i386/pc/kernel.h: Likewise.
10006 * include/grub/i386/pc/loader.h: Likewise.
10007 * include/grub/i386/pc/memory.h: Likewise.
10008 * include/grub/i386/pc/multiboot.h: Likewise.
10009 * include/grub/i386/pc/serial.h: Likewise.
10010 * include/grub/i386/pc/time.h: Likewise.
10011 * include/grub/i386/pc/vbe.h: Likewise.
10012 * include/grub/i386/pc/vbeblit.h: Likewise.
10013 * include/grub/i386/pc/vbefill.h: Likewise.
10014 * include/grub/i386/pc/vbeutil.h: Likewise.
10015 * include/grub/i386/pc/vga.h: Likewise.
10016 * include/grub/ieee1275/ieee1275.h: Likewise.
10017 * include/grub/ieee1275/ofdisk.h: Likewise.
10018 * include/grub/powerpc/libgcc.h: Likewise.
10019 * include/grub/powerpc/setjmp.h: Likewise.
10020 * include/grub/powerpc/types.h: Likewise.
10021 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10022 * include/grub/powerpc/ieee1275/console.h: Likewise.
10023 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10024 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10025 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10026 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10027 * include/grub/powerpc/ieee1275/time.h: Likewise.
10028 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10029 * include/grub/sparc64/libgcc.h: Likewise.
10030 * include/grub/sparc64/setjmp.h: Likewise.
10031 * include/grub/sparc64/types.h: Likewise.
10032 * include/grub/sparc64/ieee1275/console.h: Likewise.
10033 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10034 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10035 * include/grub/sparc64/ieee1275/time.h: Likewise.
10036 * include/grub/util/biosdisk.h: Likewise.
10037 * include/grub/util/getroot.h: Likewise.
10038 * include/grub/util/lvm.h: Likewise.
10039 * include/grub/util/misc.h: Likewise.
10040 * include/grub/util/raid.h: Likewise.
10041 * include/grub/util/resolve.h: Likewise.
10042 * io/gzio.c: Likewise.
10043 * kern/device.c: Likewise.
10044 * kern/disk.c: Likewise.
10045 * kern/dl.c: Likewise.
10046 * kern/elf.c: Likewise.
10047 * kern/env.c: Likewise.
10048 * kern/err.c: Likewise.
10049 * kern/file.c: Likewise.
10050 * kern/fs.c: Likewise.
10051 * kern/loader.c: Likewise.
10052 * kern/main.c: Likewise.
10053 * kern/misc.c: Likewise.
10054 * kern/mm.c: Likewise.
10055 * kern/parser.c: Likewise.
10056 * kern/partition.c: Likewise.
10057 * kern/rescue.c: Likewise.
10058 * kern/term.c: Likewise.
10059 * kern/efi/efi.c: Likewise.
10060 * kern/efi/init.c: Likewise.
10061 * kern/efi/mm.c: Likewise.
10062 * kern/i386/dl.c: Likewise.
10063 * kern/i386/efi/init.c: Likewise.
10064 * kern/i386/efi/startup.S: Likewise.
10065 * kern/i386/pc/init.c: Likewise.
10066 * kern/i386/pc/lzo1x.S: Likewise.
10067 * kern/i386/pc/startup.S: Likewise.
10068 * kern/ieee1275/ieee1275.c: Likewise.
10069 * kern/powerpc/cache.S: Likewise.
10070 * kern/powerpc/dl.c: Likewise.
10071 * kern/powerpc/ieee1275/cmain.c: Likewise.
10072 * kern/powerpc/ieee1275/crt0.S: Likewise.
10073 * kern/powerpc/ieee1275/init.c: Likewise.
10074 * kern/powerpc/ieee1275/openfw.c: Likewise.
10075 * kern/sparc64/cache.S: Likewise.
10076 * kern/sparc64/dl.c: Likewise.
10077 * kern/sparc64/ieee1275/init.c: Likewise.
10078 * kern/sparc64/ieee1275/openfw.c: Likewise.
10079 * loader/efi/chainloader.c: Likewise.
10080 * loader/efi/chainloader_normal.c: Likewise.
10081 * loader/i386/efi/linux.c: Likewise.
10082 * loader/i386/efi/linux_normal.c: Likewise.
10083 * loader/i386/pc/chainloader.c: Likewise.
10084 * loader/i386/pc/chainloader_normal.c: Likewise.
10085 * loader/i386/pc/linux.c: Likewise.
10086 * loader/i386/pc/linux_normal.c: Likewise.
10087 * loader/i386/pc/multiboot.c: Likewise.
10088 * loader/i386/pc/multiboot_normal.c: Likewise.
10089 * loader/powerpc/ieee1275/linux.c: Likewise.
10090 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10091 * normal/arg.c: Likewise.
10092 * normal/cmdline.c: Likewise.
10093 * normal/command.c: Likewise.
10094 * normal/completion.c: Likewise.
10095 * normal/execute.c: Likewise.
10096 * normal/function.c: Likewise.
10097 * normal/lexer.c: Likewise.
10098 * normal/main.c: Likewise.
10099 * normal/menu.c: Likewise.
10100 * normal/menu_entry.c: Likewise.
10101 * normal/misc.c: Likewise.
10102 * normal/parser.y: Likewise.
10103 * normal/script.c: Likewise.
10104 * normal/i386/setjmp.S: Likewise.
10105 * normal/powerpc/setjmp.S: Likewise.
10106 * normal/sparc64/setjmp.S: Likewise.
10107 * partmap/acorn.c: Likewise.
10108 * partmap/amiga.c: Likewise.
10109 * partmap/apple.c: Likewise.
10110 * partmap/gpt.c: Likewise.
10111 * partmap/pc.c: Likewise.
10112 * partmap/sun.c: Likewise.
10113 * term/gfxterm.c: Likewise.
10114 * term/terminfo.c: Likewise.
10115 * term/efi/console.c: Likewise.
10116 * term/i386/pc/console.c: Likewise.
10117 * term/i386/pc/serial.c: Likewise.
10118 * term/i386/pc/vesafb.c: Likewise.
10119 * term/i386/pc/vga.c: Likewise.
10120 * term/ieee1275/ofconsole.c: Likewise.
10121 * util/biosdisk.c: Likewise.
10122 * util/console.c: Likewise.
10123 * util/genmoddep.c: Likewise.
10124 * util/getroot.c: Likewise.
10125 * util/grub-emu.c: Likewise.
10126 * util/grub-mkdevicemap.c: Likewise.
10127 * util/grub-probe.c: Likewise.
10128 * util/lvm.c: Likewise.
10129 * util/misc.c: Likewise.
10130 * util/raid.c: Likewise.
10131 * util/resolve.c: Likewise.
10132 * util/update-grub.in: Likewise.
10133 * util/update-grub_lib.in: Likewise.
10134 * util/grub.d/00_header.in: Likewise.
10135 * util/grub.d/10_hurd.in: Likewise.
10136 * util/grub.d/10_linux.in: Likewise.
10137 * util/i386/efi/grub-install.in: Likewise.
10138 * util/i386/efi/grub-mkimage.c: Likewise.
10139 * util/i386/pc/grub-install.in: Likewise.
10140 * util/i386/pc/grub-mkimage.c: Likewise.
10141 * util/i386/pc/grub-mkrescue.in: Likewise.
10142 * util/i386/pc/grub-setup.c: Likewise.
10143 * util/i386/pc/misc.c: Likewise.
10144 * util/powerpc/ieee1275/grub-install.in: Likewise.
10145 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10146 * util/powerpc/ieee1275/misc.c: Likewise.
10147 * video/bitmap.c: Likewise.
10148 * video/video.c: Likewise.
10149 * video/i386/pc/vbe.c: Likewise.
10150 * video/i386/pc/vbeblit.c: Likewise.
10151 * video/i386/pc/vbefill.c: Likewise.
10152 * video/i386/pc/vbeutil.c: Likewise.
10153 * video/readers/tga.c: Likewise.
10155 2007-07-02 Robert Millan <rmh@aybabtu.com>
10157 * conf/i386-efi.rmk: Replace obsolete reference to
10158 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10159 with util/getroot.c.
10160 * conf/powerpc-ieee1275.rmk: Likewise.
10161 * conf/sparc64-ieee1275.rmk: Likewise.
10163 * util/grub-emu.c (main): Fix unchecked pointer handling.
10165 2007-07-02 Robert Millan <rmh@aybabtu.com>
10167 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10168 invocation to fail, in order to support partition-less media.
10170 * util/i386/pc/grub-install.in: Likewise.
10172 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10173 which fs or partmap modules are needed (akin to its sister scripts).
10175 Also use grub-probe to get rid of unportable /proc/mounts check.
10177 Print the same informational message that the other scripts do, before
10180 2007-06-23 Robert Millan <rmh@aybabtu.com>
10182 * util/update-grub_lib.in (font_path): New function. Determine whether
10183 a font file can be found and, if so, echo the GRUB path to it.
10185 * util/update-grub.in: Handle multiple terminals depending on user
10186 input, platform availability and font file presence. Propagate
10187 variables of our findings to /etc/grub.d/ children.
10189 * util/grub.d/00_header.in: Handle multiple terminals, based on
10190 environment setup by update-grub.
10192 2007-06-23 Robert Millan <rmh@aybabtu.com>
10194 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10196 2007-06-21 Robert Millan <rmh@aybabtu.com>
10198 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10199 indicate end of data section in kernel image.
10200 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10201 GRUB_KERNEL_MACHINE_DATA_END.
10203 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10205 * kern/i386/efi/startup.S: Likewise.
10207 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10208 during image generation. Implement --prefix option to override this
10210 * util/i386/efi/grub-mkimage.c: Likewise.
10212 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10213 code to make path relative to its root into a separate function.
10215 * util/i386/pc/grub-install.in: Use newly provided
10216 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10217 pass the result to grub-install --prefix.
10219 2007-06-13 Robert Millan <rmh@aybabtu.com>
10221 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10222 DEFAULT_DEVICE_MAP.
10223 * util/grub-emu.c: Use above definitions from misc.h instead of
10225 * util/grub-mkdevicemap.c: Likewise.
10226 * util/i386/pc/grub-setup.c: Likewise.
10227 * util/grub-probe.c: Likewise.
10228 (probe): Abort with grub_util_error() when either
10229 grub_guess_root_device or grub_util_get_grub_dev fails.
10231 2007-06-12 Robert Millan <rmh@aybabtu.com>
10233 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10234 "pager" assignment.
10235 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10237 * util/grub-probe.c (probe): Likewise for "drive_name".
10239 2007-06-11 Robert Millan <rmh@aybabtu.com>
10241 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10242 not just the cdrom one.
10244 2007-06-11 Robert Millan <rmh@aybabtu.com>
10246 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10247 Add --pkglibdir=DIR option to override pkglibdir.
10248 Mention --image-type=TYPE in help output.
10249 Fix --grub-mkimage (it was a no-op).
10250 Abort gracefully when no parameter is given.
10252 2007-06-11 Robert Millan <rmh@aybabtu.com>
10254 * util/i386/pc/grub-mkrescue.in: New file.
10255 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10256 * Makefile.in: Handle bin_SCRIPTS.
10258 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10260 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10261 list of video modes.
10263 2007-06-06 Robert Millan <rmh@aybabtu.com>
10265 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10266 file doesn't exist, or if it is in a filesystem grub can't read.
10268 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10269 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10270 header comment to fit in 80 columns when the variables are resolved.
10272 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10273 could be identified by update-grub. Remove redundant check for
10274 unifont.pff existence (since convert_system_path_to_grub_path now
10277 2007-06-04 Robert Millan <rmh@aybabtu.com>
10279 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10281 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10283 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10285 2007-06-04 Robert Millan <rmh@aybabtu.com>
10287 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10289 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10290 grub_apple_partition_map_fini.
10293 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10294 to access >2 TiB disks).
10296 Print disk->total_sectors with %llu instead of %lu, since this
10297 variable is always 64-bit (prevents wrong disk size from being displayed
10298 on either >2 TiB disk or big-endian CPU).
10300 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10301 into a generic case that supports all (sane) partition maps.
10303 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10306 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10307 and grub_apple_partition_map_fini() after that.
10309 2007-06-01 Robert Millan <rmh@aybabtu.com>
10311 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10313 * util/grub.d/00_header.in: Only enable gfxterm when
10314 convert_system_path_to_grub_path() succeeds.
10316 2007-05-20 Robert Millan <rmh@aybabtu.com>
10318 * util/update-grub_lib.in: New file.
10319 * DISTLIST: Add update-grub_lib.in.
10320 * conf/common.rmk: Generate update-grub_lib and install it in
10322 * Makefile.in: Add install routine for $(lib_DATA).
10324 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10325 function provided by update-grub_lib to support arbitrary paths of
10327 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10328 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10330 2007-05-19 Robert Millan <rmh@aybabtu.com>
10332 * commands/i386/cpuid.c: New module.
10333 * DISTLIST: Add it.
10334 * conf/i386-efi.rmk: Enable cpuid.mod.
10335 * conf/i386-pc.rmk: Likewise.
10337 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10339 * kern/disk.c (grub_disk_read): Check return value of
10342 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10344 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10346 * disk/raid.c (grub_raid_open): Likewise.
10348 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10350 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10351 stack instead of on the heap.
10353 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10354 before doing a read on it.
10356 * configure.ac: Only use -fno-stack-protector for the target
10359 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10361 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10362 __attribute_ ((unused)) to mode_type argument.
10364 * util/getroot.c (grub_guess_root_device): Fix #endif.
10366 * kern/misc.c (memcmp): Fix prototype.
10368 * include/grub/partition.h [GRUB_UTIL]
10369 (grub_gpt_partition_map_init): Add prototype.
10370 (grub_gpt_partition_map_fini): Likewise.
10372 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10373 at the right place.
10375 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10376 (grub_fat_read_data): Likewise.
10377 (grub_fat_find_dir): Likewise.
10379 * font/manager.c (find_glyph): Make table a const.
10380 (grub_font_get_glyph): Remove bitmap from if statement.
10382 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10384 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10385 code, first search for device in /dev/mapper, then in /dev.
10386 (grub_util_get_grub_dev): New function.
10387 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10389 * util/grub-probe.c (probe): Remove check for RAID, call
10390 grub_util_get_grub_dev() instead of
10391 grub_util_biosdisk_get_grub_dev().
10392 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10393 grub_util_biosdisk_get_grub_dev().
10394 * util/i386/pc/grub-setup.c (main): Likewise.
10396 2007-05-16 Robert Millan <rmh@aybabtu.com>
10398 * DISTLIST: Update for the latest changes.
10399 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10400 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10401 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10402 grub/util/biosdisk.h.
10403 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10404 grub/util/biosdisk.h.
10406 2007-05-16 Robert Millan <rmh@aybabtu.com>
10408 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10410 2007-05-16 Robert Millan <rmh@aybabtu.com>
10412 * util/i386/efi/grub-install.in: New.
10413 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10414 newly added grub-install.
10415 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10417 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10418 grub/util/biosdisk.h.
10419 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10420 grub/util/biosdisk.h.
10422 2007-05-16 Robert Millan <rmh@aybabtu.com>
10424 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10425 * include/grub/util/biosdisk.h: ... here.
10426 * util/i386/pc/biosdisk.c: Moved to ...
10427 * util/biosdisk.c: ... here.
10428 * util/i386/pc/getroot.c: Moved to ...
10429 * util/getroot.c: ... here.
10430 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10431 * util/grub-mkdevicemap.c: ... here.
10432 * util/i386/pc/grub-probe.c: Moved to ...
10433 * util/grub-probe.c: ... here.
10435 2007-05-15 Robert Millan <rmh@aybabtu.com>
10437 * util/update-grub.in: Remove duplicated line in grub.cfg header
10440 2007-05-13 Robert Millan <rmh@aybabtu.com>
10442 * util/update-grub.in: Fix a few assumptions about the devices holding
10443 /, /boot and /boot/grub being the same.
10444 * util/grub.d/00_header.in: Likewise.
10445 * util/grub.d/10_hurd.in: Likewise.
10446 * util/grub.d/10_linux.in: Likewise.
10448 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10449 patterns. Use that to define the `.old' suffix as older than `'.
10451 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10453 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10454 the grub.cfg header message.
10456 2007-05-11 Robert Millan <rmh@aybabtu.com>
10458 * util/update-grub.in: Create device.map if it doesn't already exist,
10459 before attempting to run grub-probe.
10460 Check for grub-probe and grub-mkdevicemap with the same code
10461 grub-install is using.
10464 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10466 * Makefile.in: Add the datarootdir autoconf variable.
10468 2007-05-09 Robert Millan <rmh@aybabtu.com>
10470 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10471 fail gracefully if dev->disk->partition == NULL.
10473 2007-05-07 Robert Millan <rmh@aybabtu.com>
10475 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10476 determine partition map module.
10477 * util/i386/pc/grub-install.in: Use this feature to decide which
10478 partition module to load, instead of hardcoding pc and gpt.
10480 2007-05-07 Robert Millan <rmh@aybabtu.com>
10482 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10483 source directory differs from build directory.
10485 2007-05-05 Robert Millan <rmh@aybabtu.com>
10487 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10490 2007-05-05 Robert Millan <rmh@aybabtu.com>
10492 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10494 2007-05-05 Robert Millan <rmh@aybabtu.com>
10496 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10497 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10499 2007-05-05 Robert Millan <rmh@aybabtu.com>
10501 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10502 (grub_probe_SOURCES): Likewise.
10503 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10504 GPT and initialize dos_part and bsd_part accordingly.
10505 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10507 (main): Activate gpt module for use during partition identification,
10508 and deactivate it afterwards.
10509 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10510 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10511 partition identification, and deactivate it afterwards.
10513 2007-05-05 Robert Millan <rmh@aybabtu.com>
10515 * term/i386/pc/console.c (grub_console_fini): Call
10516 grub_term_set_current() before grub_term_unregister().
10518 2007-05-04 Robert Millan <rmh@aybabtu.com>
10520 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10521 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10522 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10523 and update-grub_DATA.
10524 * conf/common.rmk: Build and install update-grub components.
10525 * conf/common.mk: Regenerate.
10526 * util/update-grub.in: New. Core of update-grub.
10527 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10528 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10529 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10530 * util/grub.d/README: New. Document grub.d directory layout.
10532 2007-05-01 Robert Millan <rmh@aybabtu.com>
10534 * util/grub-emu.c: Move initialization functions
10535 grub_util_biosdisk_init() and grub_init_all() before
10536 grub_util_biosdisk_get_grub_dev(), which relies on them.
10538 2007-04-19 Robert Millan <rmh@aybabtu.com>
10540 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10543 2007-04-18 Jerone Young <jerone@gmail.com>
10545 * kernel/elf.c: Add missing parenthesis for conditional statement
10548 2007-04-10 Jerone Young <jerone@gmail.com>
10550 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10551 continue on and look for device node with real device name.
10553 2007-04-10 Jerone Young <jerone@gmail.com>
10555 * configure.ac: Add argument for autoconf to use transformation
10557 * Makefile.in: Add autoconf package transformation code.
10558 * util/i386/pc/grub-install.in: Likewise.
10559 * util/powerpc/ieee1275/grub-install.in: Likewise.
10561 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10563 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10564 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10565 (EXT2_REVISION): Likewise.
10566 (EXT2_INODE_SIZE): Likewise.
10567 (struct grub_ext2_block_group): Added a missing member
10569 (grub_ext2_read_inode): Divide by the inode size in a superblock
10570 instead of 128 to obtain INODES_PER_BLOCK.
10571 Use the macro EXT2_INODE_SIZE instead of directly using
10572 SBLOCK->INODE_SIZE.
10574 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10576 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10577 superblock instead of the structure size to compute an
10578 offset. This fixes the problem that GRUB could not read a
10579 filesystem when inode size is different from 128-byte.
10581 2007-03-05 Marco Gerards <marco@gnu.org>
10583 * normal/main.c (read_config_file): When "menu" is not set, create
10584 an initial context.
10586 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10588 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10589 (HEAP_LIMIT): New macro.
10590 (grub_claim_heap): Claim memory up to `heaplimit'.
10592 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10594 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10595 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10596 (_start): Likewise.
10597 (grub_arch_modules_addr): Return address after `_end'.
10598 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10599 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10600 (add_segments): Calculate `_end' from phdr size and location.
10601 (ALIGN_UP): Moved to ...
10602 * include/grub/misc.h: here.
10603 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10605 (GRUB_IEEE1275_MODULE_BASE): Removed.
10607 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10609 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10612 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10614 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10616 (grub_elf64_load_hook_t): Likewise.
10617 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10620 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10622 * kern/mm.c: Update copyright.
10623 (grub_mm_debug): Correct syntax error.
10624 (grub_mm_dump_free): New function.
10625 (grub_debug_free): Call `grub_free'.
10626 * include/grub/mm.h: Update copyright.
10627 (grub_mm_dump_free): Add declaration.
10629 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10631 * include/grub/ieee1275/ieee1275.h: Update copyright.
10632 * kern/powerpc/ieee1275/init.c: Likewise.
10633 * kern/powerpc/ieee1275/openfw.c: Likewise.
10635 * loader/powerpc/ieee1275/linux.c: Likewise.
10636 * include/grub/elfload.h: Likewise.
10637 * kern/elf.c: Likewise.
10638 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10640 (grub_elf64_load): Likewise.
10641 (grub_elf32_load_segment): Move to a nested function.
10642 (grub_elf64_load_segment): Likewise.
10644 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10646 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10648 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10649 (grub_heap_len): Likewise.
10650 (HEAP_SIZE): New macro.
10651 (grub_claim_heap): New function.
10652 (grub_machine_init): Don't claim heap directly. Call
10654 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10655 (grub_available_iterate): New function.
10657 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10659 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10660 * configure.ac: Use it for testing the HOST and TARGET compilers.
10662 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10664 * Makefile.in (enable_grub_emu): New variable.
10665 * configure.ac (--enable-grub-emu): New option.
10666 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10667 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10668 * conf/i386-pc.rmk: Likewise.
10669 * conf/powerpc-ieee1275.rmk: Likewise.
10670 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10672 2006-12-12 Marco Gerards <marco@gnu.org>
10674 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10676 * kern/env.c (grub_env_unset): Don't free the member `value' when
10677 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10680 * normal/main.c (current_menu): Removed.
10681 (free_menu): Unset the `menu' environment variable.
10682 (grub_normal_menu_addentry): Make use of the environment variable
10683 `menu', instead of using the global `current_menu'. Allocate
10684 memory for the sourcecode of this entry.
10685 (read_config_file): New argument `nested', changed all callers.
10686 Only in the case of a new context, initialize a new menu. Set the
10687 `menu' environment variable.
10688 (grub_normal_execute): Don't set and unset the environment
10689 variable `menu' here anymore. Only free the menu when leaving the
10692 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10695 2006-12-11 Marco Gerards <marco@gnu.org>
10697 * normal/menu_entry.c (run): Fix off by one bug so the last line
10698 is executed. Move the loader check to outside the loop.
10700 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10702 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10704 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10706 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10707 the number of sectors. Reported by Andrey Shuvikov
10708 <mr_hyro@yahoo.com>.
10710 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10712 * kern/disk.c (grub_disk_read): When there is a read error, always
10713 try to read only the necessary data.
10715 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10717 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10719 [GRUB_UTIL] (grub_raid_fini): Likewise.
10720 [GRUB_UTIL] (grub_lvm_init): Likewise.
10721 [GRUB_UTIL] (grub_lvm_fini): Likewise.
10722 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10723 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10724 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10725 and grub_raid_fini().
10727 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10729 * include/grub/types.h (__unused): Rename to UNUSED.
10730 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10731 (grub_elf64_size): Likewise.
10733 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10735 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10736 grub_error_push and grub_error_pop in the error-handling path.
10737 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10740 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10742 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10743 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10744 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10745 (kernel_elf_SOURCES): Likewise.
10746 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10747 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10748 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10749 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10750 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10751 (elf_mod_SOURCES): New variable.
10752 (elf_mod_CFLAGS): Likewise.
10753 (elf_mod_LDFLAGS): Likewise.
10754 * include/grub/types.h (__unused): New macro.
10755 * include/grub/elfload.h: New file.
10756 * kern/elf.c: Likewise.
10757 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10758 (ELF32_LOADMASK): New macro.
10759 (ELF64_LOADMASK): Likewise.
10760 (vmlinux): Removed.
10761 (grub_linux_load32): New function.
10762 (grub_linux_load64): Likewise.
10763 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10764 Use grub_elf_t instead of grub_file_t.
10766 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10768 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10769 `catch_result' to struct set_color_args.
10771 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10773 * normal/menu.c: Include grub/script.h.
10774 * normal/menu_entry.c: Likewise.
10775 * include/grub/normal.h: Do not include grub/script.h.
10777 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10779 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10781 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10783 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10785 (grub_disk_close): Print debug messages when closing a disk.
10786 (grub_disk_read): Print debug messages when disk read fails.
10787 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10789 * kern/partition.c: Include misc.h.
10790 (grub_partition_iterate): Print debug messages when detecting
10793 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10795 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10797 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10799 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10801 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10802 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10804 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10806 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10807 instead of sizeof(lv). Patch by Michael Guntsche.
10809 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10811 * disk/lvm.c: Rename VGS to VG_LIST.
10812 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10813 (grub_lvm_open): Likewise.
10814 Thanks to Michael Guntsche for finding this bug.
10816 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10818 * configure.ac (AC_INIT): Bumped to 1.95.
10820 2006-10-14 Robert Millan <rmh@aybabtu.com>
10822 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10823 with "/dev/.static/dev/md".
10825 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10827 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10828 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10829 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10830 DRIVE_NAME are always freed.
10832 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10833 DOS_PART, as a DOS partition is counted from one instead of zero
10834 now. Reported by Robert Millan.
10836 2006-10-14 Robert Millan <rmh@aybabtu.com>
10838 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10839 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10840 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10841 string returned by grub_guess_root_device.
10842 * util/i386/pc/grub-setup.c: Likewise.
10843 * util/i386/pc/grub-probefs.c: Likewise.
10845 * util/i386/pc/grub-probefs.c: Rename to ...
10846 * util/i386/pc/grub-probe.c: ... this.
10847 * DISTLIST: Remove grub-probefs, add grub-probe.
10848 * conf/i386-efi.rmk: Likewise.
10849 * conf/i386-pc.rmk: Likewise.
10850 * util/i386/pc/grub-install.in: Likewise.
10852 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10853 choose which information we want to print.
10855 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10857 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10858 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10859 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10860 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10861 video/readers/tga.c and video/i386/pc/vbeutil.c.
10863 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10865 Added support for RAID and LVM.
10867 * disk/lvm.c: New file.
10868 * disk/raid.c: Likewise.
10869 * include/grub/lvm.h: Likewise.
10870 * include/grub/raid.h: Likewise.
10871 * include/grub/util/lvm.h: Likewise.
10872 * include/grub/util/raid.h: Likewise.
10873 * util/lvm.c: Likewise.
10874 * util/raid.c: Likewise.
10876 * include/grub/disk.h (grub_disk_dev_id): Add
10877 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10878 (grub_disk_get_size): New prototype.
10879 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10880 returns a partition.
10881 (grub_disk_get_size): New function.
10883 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10884 verbatim if grub_install_dos_part is -2.
10886 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10889 * util/i386/pc/grub-setup.c (setup): New argument
10890 MUST_EMBED. Force embedding of GRUB when the argument is
10891 true. Close FILE before returning.
10892 (main): Add support for RAID and LVM.
10894 * conf/common.rmk: Add RAID and LVM modules.
10895 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10897 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10899 * kern/misc.c (grub_strstr): New function.
10900 * include/grub/misc.h (grub_strstr): New prototype.
10902 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10904 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10906 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10908 * kern/misc.c (grub_strtoull): Guess the base only if not
10911 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10913 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10916 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10918 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10920 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10921 Remove `flags' argument. All callers changed.
10922 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10923 (IEEE1275_IHANDLE_INVALID): New variable.
10924 (IEEE1275_CELL_INVALID): New variable.
10925 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10926 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10927 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10928 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10929 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10930 codes from Open Firmware. All callers updated.
10931 (grub_ieee1275_next_property): Directly return Open Firmware return
10933 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10934 Standardize error checking from `grub_ieee1275_get_property'.
10935 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10936 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10938 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10940 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10941 `instance_to_package_args' to `instance_to_path_args'.
10943 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10944 `grub_ieee1275_chosen'.
10946 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10947 `grub_ieee1275_interpret'.
10949 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10951 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10953 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10955 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10956 (__cmpdi): Likewise.
10958 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10959 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10962 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10964 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10965 to type `grub_ssize_t'.
10966 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10968 2006-09-22 Marco Gerards <marco@gnu.org>
10970 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10973 2006-09-22 Marco Gerards <marco@gnu.org>
10975 * commands/echo.c: New file.
10977 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10979 * conf/common.rmk (echo_mod_SOURCES): New variable.
10980 (echo_mod_CFLAGS): Likewise.
10981 (echo_mod_LDFLAGS): Likewise.
10983 2006-09-22 Marco Gerards <marco@gnu.org>
10985 * normal/main.c (get_line): Malloc memory instead of using
10986 preallocated memory. Removed the arguments `cmdline' and
10987 `max_len'. Updated all callers.
10989 2006-09-22 Marco Gerards <marco@gnu.org>
10991 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10992 (normal_mod_DEPENDENCIES): Likewise.
10994 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10995 (normal_mod_DEPENDENCIES): Likewise.
10997 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10999 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11001 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11003 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11004 (normal_mod_DEPENDENCIES): Likewise.
11005 * conf/i386-pc.mk: Regenerate.
11006 * conf/i386-efi.mk: Likewise
11007 * conf/common.mk: Likewise.
11008 * conf/powerpc-ieee1275.mk: Likewise.
11009 * conf/sparc64-ieee1275.mk: Likewise.
11011 2006-09-22 Robert Millan <rmh@aybabtu.com>
11013 Sync with i386 version.
11014 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11015 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11017 2006-09-21 Robert Millan <rmh@aybabtu.com>
11019 Import from GRUB Legacy (lib/device.c):
11020 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11021 (init_device_map) [__linux__]: Add support for I2O devices.
11023 2006-09-14 Marco Gerards <marco@gnu.org>
11025 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11028 2006-09-14 Robert Millan <rmh@aybabtu.com>
11030 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11033 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11035 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11036 before adding it to device.map.
11038 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11040 * genmk.rb: Let GCC generate dependencies the first time it
11041 compiles a file; using the -MD option.
11042 * conf/common.mk: Regenerate.
11043 * conf/i386-pc.mk: Likewise.
11044 * conf/i386-efi.mk: Likewise.
11045 * conf/powerpc-ieee1275.mk: Likewise.
11046 * conf/sparc64-ieee1275.mk: Likewise.
11048 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11050 Move the prototypes of grub_setjmp and grub_longjmp to
11051 cpu/setjmp.h, so that each architecture may specify different
11054 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11055 (grub_longjmp): Likewise.
11056 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11057 (grub_longjmp): Likewise.
11058 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11059 (grub_longjmp): Likewise.
11061 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11062 [!GRUB_UTIL] (grub_longjmp): Removed.
11064 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11066 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11067 "color!" method does not return any value.
11069 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11071 * include/grub/bitmap.h: New file.
11073 * include/grub/i386/pc/vbeutil.h: Likewise.
11075 * video/bitmap.c: Likewise.
11077 * video/readers/tga.c: Likewise.
11079 * video/i386/pc/vbeutil.c: Likewise.
11081 * commands/videotest.c: Code cleanup and updated to reflect to new
11084 * term/gfxterm.c: Likewise.
11086 * video/video.c: Likewise.
11088 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11089 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11090 (bitmap_mod_SOURCES): New entry.
11091 (bitmap_mod_CFLAGS): Likewise.
11092 (bitmap_mod_LDFLAGS): Likewise.
11093 (tga_mod_SOURCES): Likewise.
11094 (tga_mod_CFLAGS): Likewise.
11095 (tga_mod_LDFLAGS): Likewise.
11097 * include/grub/video.h (grub_video_blit_operators): New enum type.
11098 (grub_video_render_target): Changed as forward declaration and moved
11099 actual definition to be video driver specific.
11100 (grub_video_adapter.blit_bitmap): Added blitting operator.
11101 (grub_video_adapter.blit_render_target): Likewise.
11102 (grub_video_blit_bitmap): Likewise.
11103 (grub_video_blit_render_target): Likewise.
11105 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11106 driver specific render target definition.
11107 (grub_video_vbe_map_rgba): Added driver internal helper.
11108 (grub_video_vbe_unmap_color): Updated to use
11109 grub_video_i386_vbeblit_info.
11110 (grub_video_vbe_get_video_ptr): Likewise.
11112 * include/grub/i386/pc/vbeblit.h
11113 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11114 grub_video_i386_vbeblit_info.
11115 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11116 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11117 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11118 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11119 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11120 (grub_video_i386_vbeblit_index_index): Likewise.
11121 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11122 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11123 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11124 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11126 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11129 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11130 include/grub/i386/pc/vbeblit.h.
11132 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11133 Updated to use grub_video_i386_vbeblit_info.
11134 (grub_video_i386_vbefill_R8G8B8): Likewise.
11135 (grub_video_i386_vbefill_index): Likewise.
11136 (grub_video_i386_vbefill): Added generic filler.
11138 * video/i386/pc/vbefill.c: Updated to reflect changes on
11139 include/grub/i386/pc/vbefill.h.
11141 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11142 grub_video_i386_vbeblit_info.
11143 (grub_video_vbe_unmap_color): Likewise.
11144 (grub_video_vbe_blit_glyph): Likewise.
11145 (grub_video_vbe_scroll): Likewise.
11146 (grub_video_vbe_draw_pixel): Removed function.
11147 (grub_video_vbe_get_pixel): Likewise.
11148 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11149 updated code to use it.
11150 (common_blitter): Added common blitter for render target and bitmap.
11151 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11152 (grub_video_vbe_blit_render_target): Likewise.
11154 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
11156 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11157 is in text mode if there is no console control protocol instance
11160 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11162 * include/grub/video.h: Code cleanup.
11164 * include/grub/i386/pc/vbe.h: Likewise.
11166 * video/i386/pc/vbe.c: Likewise.
11168 * video/i386/pc/vbeblit.c: Likewise.
11170 * video/i386/pc/vbefill.c: Likewise.
11172 * video/video.c: Likewise. Also added more comments.
11174 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11176 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11177 (struct grub_biosdisk_dap): Likewise.
11179 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11180 linkage settings for all functions.
11182 2006-07-12 Marco Gerards <marco@gnu.org>
11184 * configure.ac (--enable-mm-debug): Fix typo.
11186 * genkernsyms.sh.in: Use proper quoting for `CC'.
11188 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11190 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11191 (normal_mod_ASFLAGS): Remove "-m32".
11193 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11195 * util/misc.c: Include config.h.
11196 [!HAVE_MEMALIGN]: Do not include malloc.h.
11197 (grub_memalign): Use posix_memalign, if present. Then, use
11198 memalign, if present. Otherwise, emit an error.
11200 * util/grub-emu.c: Do not include malloc.h.
11202 * include/grub/util/misc.h: Include unistd.h. This is required for
11203 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11204 D. Eades III <hde@foobar-qux.org>.
11206 * configure.ac (AC_GNU_SOURCE): Added.
11207 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11210 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11212 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11213 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11215 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11217 * include/grub/types.h (grub_host_addr_t): Rename to
11218 grub_target_addr_t.
11219 (grub_host_off_t): Rename to grub_target_off_t.
11220 (grub_host_size_t): Rename to grub_target_size_t.
11221 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11222 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11224 * include/grub/kernel.h (struct grub_module_header): Change type
11225 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11226 (grub_module_info): Likewise.
11228 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11230 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11231 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11232 Velazquez <jesus.velazquez@gmail.com>.
11234 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11236 Count partitions from 1 instead of 0 in the string representation
11237 of partitions. Still use 0-based internally.
11239 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11240 (sun_partition_map_iterate): Use grub_partition_t instead of
11241 struct grub_partition *. Cast DESC->START_CYLINDER to
11242 grub_uint64_t after converting the endian.
11243 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11244 (sun_partition_map_get_name): Add 1 to P->INDEX.
11246 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11248 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11250 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11251 zero instead of one.
11252 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11253 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11255 * partmap/apple.c (apple_partition_map_iterate): Change the type
11256 of POS to unsigned.
11257 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11258 (apple_partition_map_get_name): Add 1 into P->INDEX.
11260 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11261 of POS to unsigned.
11262 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11263 calculate the offset of a partition.
11264 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11265 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11267 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11268 SECTOR to grub_disk_addr_t.
11269 (acorn_partition_map_iterate): Likewise.
11270 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11271 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11273 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11275 * kern/i386/pc/init.c (make_install_device): Add 1 into
11276 GRUB_INSTALL_DOS_PART.
11278 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11281 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11283 Clean up the code to support 64-bit addressing in disks and
11284 files. This change is not enough for filesystems yet.
11286 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11287 type of "start" to grub_uint64_t.
11288 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11289 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11290 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11293 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11294 to grub_disk_addr_t.
11296 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11299 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11301 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11304 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11306 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11308 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11310 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11311 to grub_off_t, to detect an error from grub_file_seek.
11312 (grub_multiboot_load_elf32): Likewise.
11314 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11315 maximum unsigned long value when an overflow is detected.
11316 (grub_strtoull): New function.
11317 (grub_divmod64): Likewise.
11318 (grub_lltoa): use grub_divmod64.
11320 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11322 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11323 the pointer to next character. Use grub_strtoull instead of
11325 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11326 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11329 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11330 return value is signed.
11331 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11332 test if OFFSET is less than zero, as OFFSET is unsigned now.
11334 * kern/disk.c (struct grub_disk_cache): Change the type of
11335 "sector" to grub_disk_addr_t.
11336 (grub_disk_cache_get_index): Change the type of SECTOR to
11337 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11338 unsigned after shifting.
11339 (grub_disk_cache_invalidate): Change the type of SECTOR to
11341 (grub_disk_cache_unlock): Likewise.
11342 (grub_disk_cache_store): Likewise.
11343 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11344 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11345 grub_disk_addr_t and grub_uint64_t, respectively.
11346 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11347 body, as the value of OFFSET is tweaked by
11348 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11349 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11351 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11352 body, as the value of OFFSET is tweaked by
11353 grub_disk_check_range. Change the types of LEN and N to
11356 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11357 and "saved_offset" to grub_off_t.
11358 (test_header): Cast BUF to char *.
11359 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11361 (grub_gzio_read): Change the types of OFFSET and SIZE to
11362 grub_off_t and grub_size_t, respectively.
11364 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11366 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11367 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11368 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11369 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11370 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11372 * include/grub/types.h (grub_off_t): Unconditionally set to
11374 (grub_disk_addr_t): Changed to grub_uint64_t.
11376 * include/grub/partition.h (struct grub_partition): Change the
11377 types of "start", "len" and "offset" to grub_disk_addr_t,
11378 grub_uint64_t and grub_disk_addr_t, respectively.
11379 (grub_partition_get_start): Return grub_disk_addr_t.
11380 (grub_partition_get_len): Return grub_uint64_t.
11382 * include/grub/misc.h (grub_strtoull): New prototype.
11383 (grub_divmod64): Likewise.
11385 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11386 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11387 grub_off_t, respectively.
11388 All callers and references changed.
11390 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11391 grub_size_t in "read".
11392 All callers and references changed.
11394 * include/grub/file.h (struct grub_file): Change the types of
11395 "offset" and "size" to grub_off_t and grub_off_t,
11396 respectively. Change the type of SECTOR to grub_disk_addr_t in
11398 (grub_file_read): Change the type of LEN to grub_size_t.
11399 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11401 (grub_file_size): Return grub_off_t.
11402 (grub_file_tell): Likewise.
11403 All callers and references changed.
11405 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11406 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11408 (struct grub_disk): Change the type of "total_sectors" to
11409 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11411 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11412 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11413 (grub_disk_write): Likewise.
11414 All callers and references changed.
11416 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11417 char * for grub_strncmp to silence gcc.
11418 (grub_iso9660_mount): Likewise.
11419 (grub_iso9660_mount): Likewise.
11420 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11422 (grub_iso9660_iterate_dir): Likewise.
11423 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11425 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11426 LEN to grub_disk_addr_t and grub_size_t, respectively.
11428 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11430 * fs/jfs.c (grub_jfs_read_file): Likewise.
11432 * fs/minix.c (grub_jfs_read_file): Likewise.
11434 * fs/sfs.c (grub_jfs_read_file): Likewise.
11436 * fs/ufs.c (grub_jfs_read_file): Likewise.
11438 * fs/xfs.c (grub_jfs_read_file): Likewise.
11440 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11441 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11444 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11445 BLKNR to -1 instead of returning GRUB_ERRNO.
11446 (grub_ext2_read_file): Change the types of SECTOR and
11447 LEN to grub_disk_addr_t and grub_size_t, respectively.
11449 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11450 LEN to grub_disk_addr_t and grub_size_t, respectively.
11452 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11455 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11456 string. Do not cast SECTOR explicitly.
11458 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11459 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11460 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11461 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11462 over 2TB and LBA mode is not supported, raise an error.
11463 (get_safe_sectors): New function.
11464 (grub_biosdisk_read): Use get_safe_sectors.
11465 (grub_biosdisk_write): Likewise.
11467 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11468 (grub_efidisk_write): Likewise.
11470 * disk/loopback.c (delete_loopback): Cosmetic changes.
11471 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11473 (grub_loopback_open): Likewise.
11474 (grub_loopback_read): Likewise. Also, change the type of POS to
11475 grub_off_t, and fix the usage of grub_memset.
11477 * commands/i386/pc/play.c: Include grub/machine/time.h.
11479 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11482 * commands/configfile.c: Include grub/env.h.
11484 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11485 GRUB_ERRNO directly instead. Change the type of POS to
11486 grub_off_t. Follow the coding standard.
11488 * commands/blocklist.c: Include grub/partition.h.
11489 (grub_cmd_blocklist): Return an error if the underlying device is
11490 not a disk. Take the starting sector of a partition into account,
11491 if a partition is used.
11493 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11495 (lba_mode): Support 64-bit addresses.
11496 (chs_mode): Likewise.
11497 (copy_buffer): Adapted to the new offsets of a length field and a
11499 (blocklist_default_start): Allocate 64-bit space.
11501 * boot/i386/pc/boot.S (force_lba): Removed.
11502 (boot_drive): Moved to under KERNEL_SECTOR.
11503 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11505 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11507 (lba_mode): Refactored to support a 64-bit address. More size
11509 (setup_sectors): Likewise.
11511 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11513 * DISTLIST: Added include/grub/i386/linux.h. Removed
11514 include/grub/i386/pc/linux.h
11516 * configure.ac (AC_INIT): Bumped to 1.94.
11518 * config.guess: Updated from gnulib.
11519 * config.sub: Likewise.
11520 * install-sh: Likewise.
11521 * mkinstalldirs: Likewise.
11523 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11525 * conf/common.rmk (grub_modules_init.lst): Depended on
11526 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11529 * genmk.rb (PModule::rule): Reverted the previous change.
11531 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11533 * conf/common.rmk (grub_modules_init.lst): Depends on
11534 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11535 that the target does not exist before producing.
11536 (grub_modules_init.h): Remove the target before generating.
11537 (grub_emu_init.c): Likewise.
11539 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11541 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11543 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11544 for the target-specific tests. Make sure that we also have the
11545 up-to-date target variables for those tests.
11547 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11549 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11550 (PModule::rule): Likewise.
11552 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11554 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11555 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11556 target-specific flags should be prefixed.
11557 (PModule::rule): Likewise.
11559 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11561 * configure.ac (CMP): Check if cmp is available explicitly.
11563 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11565 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11566 (target_cpu): New variable.
11567 (pkglibdir): Use target_cpu instead of host_cpu.
11569 * util/i386/pc/grub-install.in (host_cpu): Removed.
11570 (target_cpu): New variable.
11571 (pkglibdir): Use target_cpu instead of host_cpu.
11573 * util/genmoddep.c: Removed.
11575 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11576 instead of GRUB_HOST_SIZEOF_VOID_P.
11577 * kern/dl.c: Likewise.
11579 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11581 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11582 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11583 (GRUB_TARGET_SIZEOF_LONG): ... this.
11584 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11585 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11586 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11588 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11589 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11590 (GRUB_TARGET_SIZEOF_LONG): ... this.
11591 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11592 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11593 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11595 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11596 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11597 (GRUB_TARGET_SIZEOF_LONG): ... this.
11598 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11599 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11601 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11602 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11603 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11604 instead of GRUB_HOST_SIZEOF_LONG.
11605 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11606 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11607 GRUB_CPU_WORDS_BIGENDIAN.
11608 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11609 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11612 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11613 (genmoddep_SOURCES): Likewise.
11614 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11615 (genmoddep_SOURCES): Likewise.
11616 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11617 (genmoddep_SOURCES): Likewise.
11618 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11620 (genmoddep_SOURCES): Likewise.
11622 * genmoddep.awk: New file.
11624 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11625 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11626 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11627 (PModule::rule): Likewise.
11628 (Program::rule): Likewise.
11629 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11630 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11633 * configure.ac: Rewritten intensively to use host and target
11634 instead of build and host, respectively.
11636 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11637 (host_cpu): Removed.
11638 (target_cpu): New variable.
11639 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11640 (BUILD_CC): Removed.
11641 (BUILD_CFLAGS): Likewise.
11642 (BUILD_CPPFLAGS): Likewise.
11643 (TARGET_CC): New variable.
11644 (TARGET_CFLAGS): Likewise.
11645 (TARGET_CPPFLAGS): Likewise.
11646 (TARGET_LDFLAGS): Likewise.
11648 (include): Use target_cpu instead of host_cpu.
11649 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11651 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11653 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11655 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11656 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11657 field 'false' to 'exec_on_false'.
11658 (grub_script_create_cmdif): Renamed argument names to reflect above
11661 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11663 * normal/script.c (grub_script_create_cmdif): Likewise.
11665 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11667 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11669 (grub_hfsplus_btree_recptr): Likewise.
11670 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11671 FILEBLOCK both to pass a block number and store next block
11673 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11674 overflow file correctly. Specify errors appropriately, because
11675 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11676 grub_hfsplus_btree_recptr to get the pointer to a found key.
11677 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11680 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11682 (_linux_mod_SOURCES): New variable.
11683 (_linux_mod_CFLAGS): Likewise.
11684 (_linux_mod_LDFLAGS): Likewise.
11685 (linux_mod_SOURCES): Likewise.
11686 (linux_mod_CFLAGS): Likewise.
11687 (linux_mod_LDFLAGS): Likewise.
11689 * DISTLIST: Added loader/i386/efi/linux.c,
11690 loader/i386/efi/linux_normal.c and
11691 include/grub/i386/efi/loader.h.
11693 * loader/i386/efi/linux.c: New file.
11694 * loader/i386/efi/linux_normal.c: Likewise.
11695 * include/grub/i386/efi/loader.h: Likewise.
11697 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11699 * commands/blocklist.c: New file.
11701 * DISTLIST: Added commands/blocklist.c.
11703 * term/efi/console.c (grub_console_highlight_color): Use a lighter
11704 color for the background, and a darker color for the foreground.
11705 (grub_console_checkkey): Return READ_KEY.
11706 (grub_console_cls): Set the background to
11707 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11709 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11711 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11712 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11714 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11717 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11718 BG. The spec is wrong again.
11720 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11722 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11724 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11725 commands/blocklist.c.
11726 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11728 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11729 (blocklist_mod_SOURCES): New variable.
11730 (blocklist_mod_CFLAGS): Likewise.
11731 (blocklist_mod_LDFLAGS): Likewise.
11733 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11735 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11737 (lba_mode): Use %eax more intensively to reduce the code size.
11739 2006-05-20 Marco Gerards <marco@gnu.org>
11741 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11743 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11745 (script): Accept leading newlines.
11746 (newlines): New rule to describe 0 or more newlines.
11747 (commands): Accept `command' with trailing newline. Fixed the
11748 order in which arguments were passed to `grub_script_add_cmd'.
11749 Accept commands separated by newlines.
11750 (function): Changed to accept newlines.
11751 (menuentry) Rewritten.
11753 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11754 front of the list, instead of to the end.
11756 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11758 * util/i386/pc/grub-install.in (bindir): New variable.
11759 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11760 Shaver <lbgwjl@gmail.com>.
11762 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11764 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11765 grub/machine/linux.h
11766 * loader/i386/pc/linux.c: Likewise.
11768 * include/grub/i386/pc/linux.h: Moved to ...
11769 * include/grub/i386/linux.h: ... here.
11771 * include/grub/i386/linux.h (struct linux_kernel_params): New
11774 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11776 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11778 (grub_video_vbe_blit_glyph): Likewise.
11779 (grub_video_vbe_blit_bitmap): Likewise.
11780 (grub_video_vbe_blit_render_target): Likewise.
11782 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11784 * configure.ac (--with-platform): Properly quote the square
11787 2006-05-08 Marco Gerards <marco@gnu.org>
11789 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11791 (kernel_elf_HEADERS): ...to this. Updated all users.
11792 (grubof_symlist.c): Renamed from this...
11793 (kernel_elf_symlist.c): ...to this. Updated all users.
11794 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11795 (grubof_SOURCES): Renamed from this...
11796 (kernel_elf_SOURCES): ...to this.
11797 (grubof_HEADERS): Renamed from this...
11798 (kernel_elf_HEADERS): ...to this.
11799 (grubof_CFLAGS): Renamed from this...
11800 (kernel_elf_CFLAGS): ...to this.
11801 (grubof_ASFLAGS): Renamed from this...
11802 (kernel_elf_ASFLAGS): ...to this.
11803 (grubof_LDFLAGS): Renamed from this...
11804 (kernel_elf_LDFLAGS): ...to this.
11806 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11808 (kernel_elf_HEADERS): ...to this. Updated all users.
11809 (grubof_symlist.c): Renamed from this...
11810 (kernel_elf_symlist.c): ...to this. Updated all users.
11811 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11812 (grubof_SOURCES): Renamed from this...
11813 (kernel_elf_SOURCES): ...to this.
11814 (grubof_HEADERS): Renamed from this...
11815 (kernel_elf_HEADERS): ...to this.
11816 (grubof_CFLAGS): Renamed from this...
11817 (kernel_elf_CFLAGS): ...to this.
11818 (grubof_ASFLAGS): Renamed from this...
11819 (kernel_elf_ASFLAGS): ...to this.
11820 (grubof_LDFLAGS): Renamed from this...
11821 (kernel_elf_LDFLAGS): ...to this.
11823 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11824 `kernel.elf' instead of `grubof'.
11826 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11828 Add --with-platform to configure. Use pkglibdir instead of
11829 pkgdatadir. This is reported by Roger Leigh.
11831 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11832 (host_vendor): Likewise.
11833 (host_os): Likewise.
11834 (pkgdatadir): Likewise.
11835 (platform): New variable.
11836 (pkglibdir): Likewise.
11837 Use PKGLIBDIR instead of PKGDATADIR.
11839 * util/i386/pc/grub-install.in (datadir): Removed.
11840 (host_vendor): Likewise.
11841 (host_os): Likewise.
11842 (pkgdatadir): Likewise.
11843 (platform): New variable.
11844 (pkglibdir): Likewise.
11845 Use PKGLIBDIR instead of PKGDATADIR.
11847 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11848 instead of GRUB_DATADIR.
11850 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11852 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11855 * configure.ac (--with-platform): New option.
11856 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11858 * Makefile.in: Include a makefile based on PLATFORM instead of
11860 (pkgdatadir): Not appended by the machine type.
11861 (pkglibdir): Appended by the machine type.
11862 (host_vendor): Removed.
11863 (platform): New variable.
11864 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11865 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11866 (uninstall): Likewise.
11868 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11870 Use the environment context in the menu. Remove the commands
11871 "default" and "timeout", and use variables instead.
11873 * normal/menu.c: Include grub/env.h.
11874 (print_entry): Cast TITLE to silence gcc.
11875 (get_timeout): New function.
11876 (set_timeout): Likewise.
11877 (get_entry_number): Likewise.
11878 (run_menu): Use a default entry, a fallback entry and a timeout
11879 in the environment variables "default", "fallback" and
11880 "timeout". Also, tweak the default entry if it is not within the
11881 current menu entries.
11882 (grub_menu_run): Use a fallback entry in the environment variable
11885 * normal/main.c (read_config_file): Do not initialize
11886 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11888 (grub_normal_execute): Use a data slot to store the menu.
11890 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11891 fallback_entry and timeout.
11892 (struct grub_menu_list): Removed.
11893 (grub_menu_list_t): Likewise.
11894 (struct grub_context): Likewise.
11895 (grub_context_t): Likewise.
11896 (grub_context_get): Likewise.
11897 (grub_context_get_current_menu): Likewise.
11898 (grub_context_push_menu): Likewise.
11899 (grub_context_pop_menu): Likewise.
11900 (grub_default_init): Likewise.
11901 (grub_default_fini): Likewise.
11902 (grub_timeout_init): Likewise.
11903 (grub_timeout_fini): Likewise.
11905 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11907 (normal_mod_SOURCES): Removed normal/context.c.
11909 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11910 commands/default.c, commands/timeout.c and normal/context.c.
11911 (normal_mod_SOURCES): Removed normal/context.c.
11913 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11914 commands/timeout.c and normal/context.c.
11915 (normal_mod_SOURCES): Removed normal/context.c.
11917 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11918 commands/default.c, commands/timeout.c and normal/context.c.
11919 (normal_mod_SOURCES): Removed normal/context.c.
11921 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11923 (default_mod_SOURCES): Removed.
11924 (default_mod_CFLAGS): Likewise.
11925 (default_mod_LDFLAGS): Likewise.
11926 (timeout_mod_SOURCES): Removed.
11927 (timeout_mod_CFLAGS): Likewise.
11928 (timeout_mod_LDFLAGS): Likewise.
11930 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11933 * commands/default.c: Removed.
11934 * commands/timeout.c: Likewise.
11935 * normal/context.c: Likewise.
11937 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11939 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11941 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11943 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11944 "next" to "prev" for readability.
11945 (struct grub_env_sorted_var): New struct.
11946 (grub_env_context): Renamed to ...
11947 (initial_context): ... this.
11948 (grub_env_var_context): Renamed to ...
11949 (current_context): ... this.
11950 (grub_env_find): Look only at CURRENT_CONTEXT.
11951 (grub_env_context_open): Rewritten to copy exported variables from
11953 (grub_env_context_close): Rewritten according to the new
11954 scheme. Also, add an assertion to prevent the initial context from
11956 (grub_env_insert): Removed the code for the sorted list.
11957 (grub_env_remove): Likewise.
11958 (grub_env_export): Simply mark the variable with
11959 GRUB_ENV_VAR_GLOBAL.
11960 (grub_env_set): A cosmetic change for naming consistency.
11961 (grub_env_get): Likewise.
11962 (grub_env_unset): Likewise.
11963 (grub_env_iterate): Rewritten to sort variables within this
11965 (grub_register_variable_hook): Fixed for naming consistency. Call
11966 grub_env_find again, only if NAME is not found at the first time.
11967 (mangle_data_slot_name): New function.
11968 (grub_env_set_data_slot): Likewise.
11969 (grub_env_get_data_slot): Likewise.
11970 (grub_env_unset_data_slot): Likewise.
11972 * include/grub/env.h (grub_env_var_type): New enum.
11973 (GRUB_ENV_VAR_LOCAL): New constant.
11974 (GRUB_ENV_VAR_GLOBAL): Likewise.
11975 (GRUB_ENV_VAR_DATA): Likewise.
11976 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11978 (grub_env_set): Replace VAR with NAME for consistency.
11979 (grub_register_variable_hook): Likewise.
11980 (grub_env_export): Specify the name of the argument.
11981 (grub_env_set_data_slot): New prototype.
11982 (grub_env_get_data_slot): Likewise.
11983 (grub_env_unset_data_slot): Likewise.
11985 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11987 Extend the loader so that GRUB can accept a loader which comes
11988 back to GRUB when a loaded image exits. Also, this change adds
11989 support for a chainloader on EFI.
11991 * term/efi/console.c: Include grub/misc.h.
11992 (grub_console_checkkey): Display a scan code on the top for
11993 debugging. This will be removed once the EFI port gets stable.
11994 Correct the scan code mapping.
11996 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11997 allocate memory from larger regions, in order to reduce the number
11998 of allocated regions. Otherwise, the MacOSX loader panics.
11999 (filter_memory_map): Avoid less than 1MB for compatibility with
12001 (add_memory_regions): Allocate from the tail of a region, if
12002 possible, to avoid allocating a region near to 1MB, for the MacOSX
12005 * kern/efi/init.c (grub_efi_set_prefix): Specify
12006 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12008 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12009 argument IMAGE_HANDLE and specify it to get a loaded image.
12010 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12011 grub_efi_get_loaded_image.
12012 (grub_efi_get_filename): Divide the length by the size of
12014 (grub_efi_get_device_path): New function.
12015 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12016 the length by the size of grub_efi_char16_t for a file path device
12019 * kern/loader.c (grub_loader_noreturn): New variable.
12020 (grub_loader_set): Accept a new argument NORETURN. Set
12021 GRUB_LOADER_NORETURN to NORETURN.
12022 All callers changed.
12023 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12026 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12028 (grub_efi_get_loaded_image): Take an argument to specify an image
12031 * include/grub/loader.h (grub_loader_set): Added one more argument
12034 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12035 instead of grub_efi_open_protocol.
12036 (grub_efidisk_get_device_name): Likewise.
12037 (grub_efidisk_close): Print a newline.
12038 (grub_efidisk_get_device_handle): Fixed to use
12039 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12040 GRUB_EFI_DEVICE_PATH_TYPE.
12042 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12043 * kern/efi/efi.c (device_path_guid): ... here.
12045 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12047 (kernel_mod_HEADERS): Added efi/disk.h.
12048 (_chain_mod_SOURCES): New variable.
12049 (_chain_mod_CFLAGS): Likewise.
12050 (_chain_mod_LDFLAGS): Likewise.
12051 (chain_mod_SOURCES): Likewise.
12052 (chain_mod_CFLAGS): Likewise.
12053 (chain_mod_LDFLAGS): Likewise.
12055 * DISTLIST: Added include/grub/efi/chainloader.h,
12056 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12058 * include/grub/efi/chainloader.h: New file.
12059 * loader/efi/chainloader.c: Likewise.
12060 * loader/efi/chainloader_normal.c: Likewise.
12062 2006-04-30 Marco Gerards <marco@gnu.org>
12064 * commands/configfile.c (grub_cmd_source): New function.
12065 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12066 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12068 2006-04-30 Marco Gerards <marco@gnu.org>
12070 * normal/execute.c (grub_script_execute_cmd): Change the return
12071 type to `grub_err_t'. Correctly return the error.
12072 (grub_script_execute_cmdline): In case a command line is not a
12073 command or a function, try to interpret it as an assignment.
12075 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12077 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12078 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12079 skip a node whose name is obviously invalid as UTF-16,
12080 i.e. contains a NUL character. Stop the iteration when the last
12081 directory entry is found. Instead of using the return value of
12082 grub_hfsplus_btree_iterate_node, store the value in RET and use
12083 it, because the iterator can be stopped by the last directory
12086 2006-04-30 Marco Gerards <marco@gnu.org>
12088 * include/grub/env.h (grub_env_export): New prototype. Reported
12089 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12091 2006-04-30 Marco Gerards <marco@gnu.org>
12093 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12094 size of the extents in a catalog file record.
12096 2006-04-29 Marco Gerards <marco@gnu.org>
12098 * commands/configfile.c (grub_cmd_configfile): Execute the
12099 configfile within its own context.
12101 * include/grub/env.h (grub_env_context_open): New prototype.
12102 (grub_env_context_close): Likewise.
12104 * kern/env.c (grub_env): Removed.
12105 (grub_env_sorted): Likewise.
12106 (grub_env_context): New variable.
12107 (grub_env_var_context): Likewise.
12108 (grub_env_find): Search both the active context and the global
12110 (grub_env_context_open): New function.
12111 (grub_env_context_close): Likewise.
12112 (grub_env_insert): Likewise.
12113 (grub_env_remove): Likewise.
12114 (grub_env_export): Likewise.
12115 (grub_env_set): Changed to use helper functions to avoid code
12117 (grub_env_iterate): Rewritten so both the current context and the
12118 global context are being used.
12120 * normal/command.c (export_command): New function.
12121 (grub_command_init): Register the `export' function.
12123 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12125 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12126 explicitly to suppress gcc's warnings.
12127 * fs/fat.c (grub_fat_find_dir): Likewise.
12128 (grub_fat_label): Likewise.
12129 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12130 (grub_xfs_mount): Likewise.
12131 (grub_xfs_label): Likewise.
12132 * fs/affs.c (grub_affs_mount): Likewise.
12133 (grub_affs_label): Likewise.
12134 (grub_affs_iterate_dir): Likewise.
12135 * fs/sfs.c (grub_sfs_mount): Likewise.
12136 (grub_sfs_iterate_dir): Likewise.
12137 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12138 * fs/hfs.c (grub_hfs_mount): Likewise.
12139 (grub_hfs_cmp_catkeys): Likewise.
12140 (grub_hfs_find_dir): Likewise.
12141 (grub_hfs_dir): Likewise.
12142 (grub_hfs_label): Likewise.
12143 * fs/jfs.c (grub_jfs_mount): Likewise.
12144 (grub_jfs_opendir): Likewise.
12145 (grub_jfs_getent): Likewise.
12146 (grub_jfs_lookup_symlink): Likewise.
12147 (grub_jfs_label): Likewise.
12148 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12149 (grub_hfsplus_iterate_dir): Likewise.
12150 (grub_hfsplus_btree_iterate_node): Made static.
12152 * util/grub-emu.c (prefix): New variable.
12153 (grub_machine_set_prefix): New function.
12154 (main): Do not set the environment variable "prefix" here. Only
12155 set PREFIX, which is used later by grub_machine_set_prefix.
12157 * include/grub/video.h: Do not include grub/symbol.h.
12158 (grub_video_register): Not exported. This symbol is not defined in
12160 (grub_video_unregister): Likewise.
12161 (grub_video_iterate): Likewise.
12162 (grub_video_setup): Likewise.
12163 (grub_video_restore): Likewise.
12164 (grub_video_get_info): Likewise.
12165 (grub_video_get_blit_format): Likewise.
12166 (grub_video_set_palette): Likewise.
12167 (grub_video_get_palette): Likewise.
12168 (grub_video_set_viewport): Likewise.
12169 (grub_video_get_viewport): Likewise.
12170 (grub_video_map_color): Likewise.
12171 (grub_video_map_rgb): Likewise.
12172 (grub_video_map_rgba): Likewise.
12173 (grub_video_fill_rect): Likewise.
12174 (grub_video_blit_glyph): Likewise.
12175 (grub_video_blit_bitmap): Likewise.
12176 (grub_video_blit_render_target): Likewise.
12177 (grub_video_scroll): Likewise.
12178 (grub_video_swap_buffers): Likewise.
12179 (grub_video_create_render_target): Likewise.
12180 (grub_video_delete_render_target): Likewise.
12181 (grub_video_set_active_render_target): Likewise.
12183 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12185 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12187 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12188 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12189 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12190 instead of $(srcdir)/genkernsyms.sh.
12192 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12193 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12194 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12195 instead of $(srcdir)/genkernsyms.sh.
12197 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12198 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12199 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12200 instead of $(srcdir)/genkernsyms.sh.
12202 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12203 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12204 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12205 instead of $(srcdir)/genkernsyms.sh.
12207 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12210 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12212 (gensymlist.sh): New target.
12213 (genkernsyms.sh): Likewise.
12215 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12216 genkernsyms.sh.in and gensymlist.sh.in.
12218 * genkernsyms.sh: Removed.
12219 * gensymlist.sh: Likewise.
12221 * genkernsyms.sh.in: New file.
12222 * gensymlist.sh.in: Likewise.
12224 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12226 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12227 clobber "prefix", since we may have already set it manually.
12229 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12231 * kern/misc.c (abort): New alias for grub_abort.
12233 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12235 A new machine-specific function "grub_machine_set_prefix" is
12236 defined. This is called after loading modules, so that a prefix
12237 initialization can use modules. Also, this change adds an
12238 intensive debugging feature for the memory manager via the
12239 configure option "--enable-mm-debug".
12241 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12244 * kern/sparc64/ieee1275/init.c (abort): Removed.
12245 (grub_stop): Likewise.
12246 (grub_exit): New function.
12247 (grub_set_prefix): Renamed to ...
12248 (grub_machine_set_prefix): ... this.
12249 (grub_machine_init): Do not call grub_set_prefix.
12251 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12252 (grub_machine_set_prefix): ... this.
12253 (grub_machine_init): Do not call grub_set_prefix.
12255 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12256 (grub_machine_init): Do not set the prefix here.
12258 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12260 * kern/efi/init.c: Include grub/mm.h.
12261 (grub_efi_set_prefix): New function.
12263 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12264 (grub_efi_get_filename): New function.
12265 (grub_print_device_path): Renamed to ...
12266 (grub_efi_print_device_path): ... this.
12268 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12269 [MM_DEBUG] (grub_realloc): Likewise.
12270 [MM_DEBUG] (grub_free): Likewise.
12271 [MM_DEBUG] (grub_memalign): Likewise.
12272 [MM_DEBUG] (grub_mm_debug): New variable.
12273 [MM_DEBUG] (grub_debug_malloc): New function.
12274 [MM_DEBUG] (grub_debug_free): New function.
12275 [MM_DEBUG] (grub_debug_realloc): New function.
12276 [MM_DEBUG] (grub_debug_memalign): New function.
12278 * kern/misc.c (grub_abort): Print a newline to distinguish
12281 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12282 grub_set_root_dev after loading modules. This is necessary when
12283 setting a prefix depends on modules.
12285 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12286 (grub_efi_print_device_path): ... this.
12287 (grub_efi_get_filename): New prototype.
12288 (grub_efi_set_prefix): Likewise.
12290 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12292 (grub_efidisk_get_device_handle): New prototype.
12293 (grub_efidisk_get_device_name): Likewise.
12295 * include/grub/mm.h: Include config.h.
12296 (MM_DEBUG): Removed.
12297 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12298 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12299 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12300 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12301 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12302 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12303 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12304 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12305 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12307 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12309 * disk/efi/efidisk.c: Include grub/partition.h.
12310 (iterate_child_devices): New function.
12311 (add_device): First, compare only last device path nodes, so that
12312 devices are sorted by the types.
12313 (grub_efidisk_get_device_handle): New function.
12314 (grub_efidisk_get_device_name): Likewise.
12316 * configure.ac (--enable-mm-debug): New option to enable the
12317 memory manager debugging feature. This makes the binary much
12318 bigger, so is disabled by default.
12320 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12322 Use grub_abort instead of grub_stop, and grub_exit must be
12323 define in each architecture now. Also, this change adds support
12326 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12327 (grub_getkey): New function.
12328 (grub_term_get_current): Likewise.
12330 * util/i386/pc/grub-setup.c: Include grub/term.h.
12331 (grub_getkey): New function.
12332 (grub_term_get_current): Likewise.
12334 * util/misc.c (grub_stop): Renamed to ...
12335 (grub_exit): ... this.
12337 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12338 (grub_exit): ... this.
12339 (grub_machine_init): Use grub_abort instead of abort.
12340 (grub_stop): Removed.
12342 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12345 * kern/i386/pc/startup.S (grub_exit): New function.
12346 (cold_reboot): New label.
12348 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12349 (grub_efi_init): Call grub_efidisk_init.
12350 (grub_efi_fini): Call grub_efidisk_fini.
12352 * kern/efi/efi.c: Include grub/mm.h.
12353 (grub_efi_console_control_guid): Renamed to ...
12354 (console_control_guid): ... this.
12355 (grub_efi_loaded_image_guid): Renamed to ...
12356 (loaded_image_guid): ... this.
12357 (grub_efi_locate_handle): New function.
12358 (grub_efi_open_protocol): Likewise.
12359 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12360 GRUB_EFI_CONSOLE_CONTROL_GUID.
12361 (grub_efi_exit): Removed.
12362 (grub_stop): Likewise.
12363 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12364 (grub_exit): New function.
12365 (grub_print_device_path): Likewise.
12367 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12368 (grub_enter_rescue_mode): Register "exit".
12370 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12371 (grub_abort): New function.
12373 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12375 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12377 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12379 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12380 (grub_print_device_path): New prototype.
12381 (grub_efi_locate_handle): Likewise.
12382 (grub_efi_open_protocol): Likewise.
12384 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12385 * disk/efi/efidisk.c: Likewise.
12387 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12389 * include/grub/efi/console_control.h
12390 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12392 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12393 last 8 bytes as an array.
12394 (GRUB_EFI_DISK_IO_GUID): New macro.
12395 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12396 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12397 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12399 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12400 (struct grub_efi_device_path): Rename the member "sub_type" to
12402 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12403 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12404 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12405 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12406 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12407 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12408 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12409 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12410 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12411 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12412 (struct grub_efi_pci_device_path): New structure.
12413 (grub_efi_pci_device_path_t): New type.
12414 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12415 (struct grub_efi_pccard_device_path): New structure.
12416 (grub_efi_pccard_device_path_t): New type.
12417 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12418 (struct grub_efi_memory_mapped_device_path): New structure.
12419 (grub_efi_memory_mapped_device_path_t): New type.
12420 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12421 (struct grub_efi_vendor_device_path): New structure.
12422 (grub_efi_vendor_device_path_t): New type.
12423 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12424 (struct grub_efi_controller_device_path): New structure.
12425 (grub_efi_controller_device_path_t): New type.
12426 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12427 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12428 (struct grub_efi_acpi_device_path): New structure.
12429 (grub_efi_acpi_device_path_t): New type.
12430 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12431 (struct grub_efi_expanded_acpi_device_path): New structure.
12432 (grub_efi_expanded_acpi_device_path_t): New type.
12433 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12434 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12435 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12436 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12437 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12438 (struct grub_efi_atapi_device_path): New structure.
12439 (grub_efi_atapi_device_path_t): New type.
12440 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12441 (struct grub_efi_fibre_channel_device_path): New structure.
12442 (grub_efi_fibre_channel_device_path_t): New type.
12443 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12444 (struct grub_efi_1394_device_path): New structure.
12445 (grub_efi_1394_device_path_t): New type.
12446 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12447 (struct grub_efi_usb_device_path): New structure.
12448 (grub_efi_usb_device_path_t): New type.
12449 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12450 (struct grub_efi_usb_class_device_path): New structure.
12451 (grub_efi_usb_class_device_path_t): New type.
12452 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12453 (struct grub_efi_i2o_device_path): New structure.
12454 (grub_efi_i2o_device_path_t): New type.
12455 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12456 (struct grub_efi_mac_address_device_path): New structure.
12457 (grub_efi_mac_address_device_path_t): New type.
12458 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12459 (struct grub_efi_ipv4_device_path): New structure.
12460 (grub_efi_ipv4_device_path_t): New type.
12461 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12462 (struct grub_efi_ipv6_device_path): New structure.
12463 (grub_efi_ipv6_device_path_t): New type.
12464 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12465 (struct grub_efi_infiniband_device_path): New structure.
12466 (grub_efi_infiniband_device_path_t): New type.
12467 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12468 (struct grub_efi_uart_device_path): New structure.
12469 (grub_efi_uart_device_path_t): New type.
12470 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12471 (struct grub_efi_vendor_messaging_device_path): New structure.
12472 (grub_efi_vendor_messaging_device_path_t): New type.
12473 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12474 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12475 (struct grub_efi_hard_drive_device_path): New structure.
12476 (grub_efi_hard_drive_device_path_t): New type.
12477 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12478 (struct grub_efi_cdrom_device_path): New structure.
12479 (grub_efi_cdrom_device_path_t): New type.
12480 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12481 (struct grub_efi_vendor_media_device_path): New structure.
12482 (grub_efi_vendor_media_device_path_t): New type.
12483 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12484 (struct grub_efi_file_path_device_path): New structure.
12485 (grub_efi_file_path_device_path_t): New type.
12486 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12487 (struct grub_efi_protocol_device_path): New structure.
12488 (grub_efi_protocol_device_path_t): New type.
12489 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12490 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12491 (struct grub_efi_bios_device_path): New structure.
12492 (grub_efi_bios_device_path_t): New type.
12493 (struct grub_efi_disk_io): New structure.
12494 (grub_efi_disk_io_t): New type.
12495 (struct grub_efi_block_io_media): New structure.
12496 (grub_efi_block_io_media_t): New type.
12497 (struct grub_efi_block_io): New structure.
12498 (grub_efi_block_io_t): New type.
12500 * include/grub/misc.h (grub_stop): Removed.
12501 (grub_exit): New prototype.
12502 (grub_abort): Likewise.
12504 * include/grub/disk.h (enum grub_disk_dev_id): Added
12505 GRUB_DISK_DEVICE_EFIDISK_ID.
12507 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12508 disk/efi/efidisk.c.
12509 (kernel_syms.lst): Remove the target if an error occurs.
12511 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12513 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12514 as it was simply too buggy.
12516 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12518 * kern/misc.c (grub_lltoa): New function.
12519 (grub_vsprintf): Added support for the long long suffix,
12522 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12524 * Makefile.in (LDFLAGS): Add variable.
12525 (LD): Remove variable.
12526 * configure.ac: Add -m32 to LDFLAGS.
12527 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12528 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12529 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12530 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12531 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12533 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12534 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12535 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12537 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12539 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12540 length for unknown glyph.
12542 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12544 Add support for pre-loaded modules into the EFI port.
12546 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12547 completely. Accept one more argument DIR. The caller has changed.
12549 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12551 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12552 (grub_efi_loaded_image_guid): New variable.
12553 (grub_efi_get_loaded_image): New function.
12554 (grub_arch_modules_addr): Likewise.
12556 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12559 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12560 (struct grub_efi_loaded_image): New structure.
12561 (grub_efi_loaded_image_t): New type.
12563 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12565 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12566 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12567 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12569 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12571 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12573 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12575 * DISTLIST: Added include/grub/efi/console.h,
12576 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12577 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12579 * include/grub/efi/console.h: New file.
12580 * include/grub/efi/time.h: Likewise.
12581 * include/grub/i386/efi/kernel.h: Likewise.
12582 * kern/efi/init.c: Likewise.
12583 * kern/efi/mm.c: Likewise.
12584 * term/efi/console.c: Likewise.
12586 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12587 (grub_stop): Removed.
12588 (grub_get_rtc): Likewise.
12589 (grub_machine_init): Simply call grub_efi_init.
12590 (grub_machine_fini): Call grub_efi_fini.
12592 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12593 (grub_efi_output_string): Removed.
12594 (grub_efi_stall): New function.
12595 (grub_stop): Likewise.
12596 (grub_get_rtc): Likewise.
12598 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12599 (grub_efi_stall): New prototype.
12600 (grub_efi_allocate_pages): Likewise.
12601 (grub_efi_free_pages): Likewise.
12602 (grub_efi_get_memory_map): Likewise.
12603 (grub_efi_mm_init): Likewise.
12604 (grub_efi_mm_fini): Likewise.
12605 (grub_efi_init): Likewise.
12606 (grub_efi_fini): Likewise.
12608 * include/grub/i386/efi/time.h: Do not include
12609 grub/symbol.h. Include grub/efi/time.h.
12610 (GRUB_TICKS_PER_SECOND): Removed.
12611 (grub_get_rtc): Likewise.
12613 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12614 Added padding. The EFI spec is buggy.
12615 (GRUB_EFI_BLACK): New macro.
12616 (GRUB_EFI_BLUE): Likewise.
12617 (GRUB_EFI_GREEN): Likewise.
12618 (GRUB_EFI_CYAN): Likewise.
12619 (GRUB_EFI_RED): Likewise.
12620 (GRUB_EFI_MAGENTA): Likewise.
12621 (GRUB_EFI_BROWN): Likewise.
12622 (GRUB_EFI_LIGHTGRAY): Likewise.
12623 (GRUB_EFI_BRIGHT): Likewise.
12624 (GRUB_EFI_DARKGRAY): Likewise.
12625 (GRUB_EFI_LIGHTBLUE): Likewise.
12626 (GRUB_EFI_LIGHTGREEN): Likewise.
12627 (GRUB_EFI_LIGHTCYAN): Likewise.
12628 (GRUB_EFI_LIGHTRED): Likewise.
12629 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12630 (GRUB_EFI_YELLOW): Likewise.
12631 (GRUB_EFI_WHITE): Likewise.
12632 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12633 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12634 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12635 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12636 (GRUB_EFI_BACKGROUND_RED): Likewise.
12637 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12638 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12639 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12640 (GRUB_EFI_TEXT_ATTR): Likewise.
12642 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12643 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12644 (kernel_mod_HEADERS): Added efi/time.h.
12646 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12648 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12649 include/grub/efi/api.h, include/grub/efi/console_control.h,
12650 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12651 include/grub/i386/efi/time.h, kern/efi/efi.c,
12652 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12653 and util/i386/efi/grub-mkimage.c.
12655 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12657 * genmk.rb (PModule#rule): Do not export symbols if
12658 #{prefix}_EXPORTS is set to "no".
12660 * conf/i386-efi.mk: New file.
12661 * conf/i386-efi.rmk: Likewise.
12662 * include/grub/efi/api.h: Likewise.
12663 * include/grub/efi/console_control.h: Likewise.
12664 * include/grub/efi/efi.h: Likewise.
12665 * include/grub/efi/pe32.h: Likewise.
12666 * include/grub/i386/efi/time.h: Likewise.
12667 * kern/efi/efi.c: Likewise.
12668 * kern/i386/efi/init.c: Likewise.
12669 * kern/i386/efi/startup.S: Likewise.
12670 * util/i386/efi/grub-mkimage.c: Likewise.
12672 2006-04-17 Marco Gerards <marco@gnu.org>
12674 * include/grub/script.h: Include <grub/parser.h> and
12675 "grub_script.tab.h".
12676 (struct grub_lexer_param): New struct.
12677 (struct grub_parser_param): Likewise.
12678 (grub_script_create_arglist): Pass the state in an argument.
12679 (grub_script_add_arglist): Likewise.
12680 (grub_script_create_cmdline): Likewise.
12681 (grub_script_create_cmdblock): Likewise.
12682 (grub_script_create_cmdif): Likewise.
12683 (grub_script_create_cmdmenu): Likewise.
12684 (grub_script_add_cmd): Likewise.
12685 (grub_script_arg_add): Likewise.
12686 (grub_script_lexer_ref): Likewise.
12687 (grub_script_lexer_deref): Likewise.
12688 (grub_script_lexer_record_start): Likewise.
12689 (grub_script_lexer_record_stop): Likewise.
12690 (grub_script_mem_record): Likewise.
12691 (grub_script_mem_record_stop): Likewise.
12692 (grub_script_malloc): Likewise.
12693 (grub_script_yylex): Likewise.
12694 (grub_script_yyparse): Likewise.
12695 (grub_script_yyerror): Likewise.
12696 (grub_script_yylex): Likewise.
12697 (grub_script_lexer_init): Return the state.
12699 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12700 (grub_script_lexer_done): Likewise.
12701 (grub_script_lexer_getline): Likewise.
12702 (grub_script_lexer_refs): Likewise.
12703 (script): Likewise.
12704 (newscript): Likewise.
12705 (record): Likewise.
12706 (recording): Likewise.
12707 (recordpos): Likewise.
12708 (recordlen): Likewise.
12709 (grub_script_lexer_init): Return the state instead of setting
12711 (grub_script_lexer_ref): Use the newly added argument for state
12712 instead of globals.
12713 (grub_script_lexer_deref): Likewise.
12714 (grub_script_lexer_record_start): Likewise.
12715 (grub_script_lexer_record_stop): Likewise.
12716 (recordchar): Likewise.
12717 (nextchar): Likewise.
12718 (grub_script_yylex2): Likewise.
12719 (grub_script_yylex): Likewise.
12720 (grub_script_yyerror): Likewise.
12722 * normal/parser.y (func_mem): Removed variable.
12723 (menu_entry): Likewise.
12725 (%lex-param): New parser option.
12726 (%parse-param): Likewise.
12727 (script): Always return the AST.
12728 (argument): Pass the state around.
12729 (arguments): Likewise.
12730 (grubcmd): Likewise.
12731 (commands): Likewise.
12732 (function): Likewise.
12733 (menuentry): Likewise.
12734 (if_statement): Likewise.
12737 * normal/script.c (grub_script_memused): Removed variable.
12738 (grub_script_parsed): Likewise.
12739 (grub_script_malloc): Added a state argument. Use that instead of
12741 (grub_script_mem_record): Likewise.
12742 (grub_script_mem_record_stop): Likewise.
12743 (grub_script_arg_add): Likewise.
12744 (grub_script_add_arglist): Likewise.
12745 (grub_script_create_cmdline): Likewise.
12746 (grub_script_create_cmdif): Likewise.
12747 (grub_script_create_cmdmenu): Likewise.
12748 (grub_script_add_cmd): Likewise.
12749 (grub_script_parse): Setup the state before calling the parser.
12751 2006-04-16 Marco Gerards <marco@gnu.org>
12753 * normal/command.c (grub_command_init): Remove the title command.
12755 * normal/lexer.c (grub_script_yylex): Renamed from this...
12756 (grub_script_yylex2): ... to this.
12757 (grub_script_yylex): New function. Temporary
12758 introduced to filter some tokens.
12759 (grub_script_yyerror): Print a newline.
12761 * normal/main.c (read_config_file): Output information about the
12762 lines that contain errors. Wait for a key after all lines have
12763 been processed. Don't return an empty menu.
12765 * normal/parser.y (func_mem): Don't initialize.
12766 (menu_entry): Likewise.
12767 (err): New variable.
12768 (script): Don't return anything when an error was encountered.
12769 (ws, returns): Removed rules.
12770 (argument): Disabled concatenated variable support.
12771 (arguments): Remove explicit separators.
12772 (grubcmd): Likewise.
12773 (function): Likewise.
12774 (menuentry): Likewise.
12776 (commands): Likewise. Add error handling.
12778 * normal/script.c (grub_script_create_cmdline): If
12779 `grub_script_parsed' is 0, assume the parser encountered an error.
12781 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12783 * configure.ac: Add support for EFI. Fix the typo
12784 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12786 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12788 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12789 foreign multibyte characters should be shown correctly.
12791 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12793 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12795 (read_config_file): Made it to close file before returning.
12797 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12799 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12800 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12801 video/i386/pc/vbefill.c.
12803 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12804 video/i386/pc/vbefill.c.
12806 * include/grub/video.h (grub_video_blit_format): New enum.
12807 (grub_video_mode_info): Added new member blit_format.
12808 (grub_video_get_blit_format): New function prototype.
12810 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12811 function prototype.
12812 (grub_video_vbe_map_rgb): Likewise.
12813 (grub_video_vbe_unmap_color): Likewise.
12815 * include/grub/i386/pc/vbeblit.h: New file.
12817 * include/grub/i386/pc/vbefill.h: New file.
12819 * video/video.c (grub_video_get_blit_format): New function.
12820 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12821 (grub_video_vbe_map_rgb): Likewise.
12822 (grub_video_vbe_unmap_color): Likewise.
12824 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12826 (grub_video_vbe_blit_render_target): Changed to use more optimized
12828 (grub_video_vbe_setup): Added detection for optimized settings.
12829 (grub_video_vbe_create_render_target): Likewise.
12831 * video/i386/pc/vbeblit.c: New file.
12833 * video/i386/pc/vbefill.c: New file.
12835 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12837 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12840 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12841 parsing to support both hex and dec ranges. If filename was missing
12842 show usage information.
12844 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12846 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12847 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12849 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12850 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12851 (video_mod_SOURCES): Added.
12852 (video_mod_CFLAGS): Likewise.
12853 (video_mod_LDFLAGS): Likewise.
12854 (gfxterm_mod_SOURCES): Likewise.
12855 (gfxterm_mod_CFLAGS): Likewise.
12856 (gfxterm_mod_LDFLAGS): Likewise.
12857 (videotest_mod_SOURCES): Likewise.
12858 (videotest_mod_CFLAGS): Likewise.
12859 (videotest_mod_LDFLAGS): Likewise.
12860 (vesafb_mod_SOURCES): Removed.
12861 (vesafb_mod_CFLAGS): Likewise.
12862 (vesafb_mod_LDFLAGS): Likewise.
12863 (vga_mod_SOURCES): Likewise.
12864 (vga_mod_CFLAGS): Likewise.
12865 (vga_mod_LDFLAGS): Likewise.
12867 * commands/videotest.c: New file.
12869 * font/manager.c (fill_with_default_glyph): Modified to use
12871 (grub_font_get_glyph): Likewise.
12872 (fontmanager): Renamed from this...
12873 (font_manager): ... to this.
12875 * include/grub/font.h (grub_font_glyph): Added new structure.
12876 (grub_font_get_glyph): Modified to use grub_font_glyph.
12878 * include/grub/misc.h (grub_abs): Added as inline function.
12880 * include/grub/video.h: New file.
12882 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12883 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12884 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12885 (grub_vbe_get_controller_info): Renamed from this...
12886 (grub_vbe_bios_get_controller_info): ... to this.
12887 (grub_vbe_get_mode_info): Renamed from this...
12888 (grub_vbe_bios_get_mode_info): ... to this.
12889 (grub_vbe_set_mode): Renamed from this...
12890 (grub_vbe_bios_set_mode): ... to this.
12891 (grub_vbe_get_mode): Renamed from this...
12892 (grub_vbe_bios_get_mode): ... to this.
12893 (grub_vbe_set_memory_window): Renamed from this...
12894 (grub_vbe_bios_set_memory_window): ... to this.
12895 (grub_vbe_get_memory_window): Renamed from this...
12896 (grub_vbe_bios_get_memory_window): ... to this.
12897 (grub_vbe_set_scanline_length): Renamed from this...
12898 (grub_vbe_set_scanline_length): ... to this.
12899 (grub_vbe_get_scanline_length): Renamed from this...
12900 (grub_vbe_bios_get_scanline_length): ... to this.
12901 (grub_vbe_set_display_start): Renamed from this...
12902 (grub_vbe_bios_set_display_start): ... to this.
12903 (grub_vbe_get_display_start): Renamed from this...
12904 (grub_vbe_bios_get_display_start): ... to this.
12905 (grub_vbe_set_palette_data): Renamed from this...
12906 (grub_vbe_bios_set_palette_data): ... to this.
12907 (grub_vbe_set_pixel_rgb): Removed.
12908 (grub_vbe_set_pixel_index): Likewise.
12910 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12912 (grub_vbe_bios_get_controller_info): ... to this.
12913 (grub_vbe_get_mode_info): Renamed from this...
12914 (grub_vbe_bios_get_mode_info): ... to this.
12915 (grub_vbe_set_mode): Renamed from this...
12916 (grub_vbe_bios_set_mode): ... to this.
12917 (grub_vbe_get_mode): Renamed from this...
12918 (grub_vbe_bios_get_mode): ... to this.
12919 (grub_vbe_set_memory_window): Renamed from this...
12920 (grub_vbe_bios_set_memory_window): ... to this.
12921 (grub_vbe_get_memory_window): Renamed from this...
12922 (grub_vbe_bios_get_memory_window): ... to this.
12923 (grub_vbe_set_scanline_length): Renamed from this...
12924 (grub_vbe_set_scanline_length): ... to this.
12925 (grub_vbe_get_scanline_length): Renamed from this...
12926 (grub_vbe_bios_get_scanline_length): ... to this.
12927 (grub_vbe_set_display_start): Renamed from this...
12928 (grub_vbe_bios_set_display_start): ... to this.
12929 (grub_vbe_get_display_start): Renamed from this...
12930 (grub_vbe_bios_get_display_start): ... to this.
12931 (grub_vbe_set_palette_data): Renamed from this...
12932 (grub_vbe_bios_set_palette_data): ... to this.
12933 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12934 getting corrupted after calling it. Added more pushes and pops.
12935 (grub_vbe_bios_set_mode): Likewise.
12936 (grub_vbe_bios_get_mode): Likewise.
12937 (grub_vbe_bios_get_memory_window): Likewise.
12938 (grub_vbe_bios_set_scanline_length): Likewise.
12939 (grub_vbe_bios_get_scanline_length): Likewise.
12940 (grub_vbe_bios_get_display_start): Likewise.
12941 (grub_vbe_bios_set_palette_data): Likewise.
12943 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12944 (cl_insert): Likewise.
12945 (cl_delete): Likewise.
12947 * term/gfxterm.c: New file.
12949 * term/i386/pc/vesafb.c: Removed file.
12951 * video/video.c: New file.
12953 * video/i386/pc/vbe.c (real2pm): Added new function.
12954 (grub_video_vbe_draw_pixel): Likewise.
12955 (grub_video_vbe_get_video_ptr): Likewise.
12956 (grub_video_vbe_get_pixel): Likewise
12957 (grub_video_vbe_init): Likewise.
12958 (grub_video_vbe_fini): Likewise.
12959 (grub_video_vbe_setup): Likewise.
12960 (grub_video_vbe_get_info): Likewise.
12961 (grub_video_vbe_set_palette): Likewise.
12962 (grub_video_vbe_get_palette): Likewise.
12963 (grub_video_vbe_set_viewport): Likewise.
12964 (grub_video_vbe_get_viewport): Likewise.
12965 (grub_video_vbe_map_color): Likewise.
12966 (grub_video_vbe_map_rgb): Likewise.
12967 (grub_video_vbe_map_rgba): Likewise.
12968 (grub_video_vbe_unmap_color): Likewise.
12969 (grub_video_vbe_fill_rect): Likewise.
12970 (grub_video_vbe_blit_glyph): Likewise.
12971 (grub_video_vbe_blit_bitmap): Likewise.
12972 (grub_video_vbe_blit_render_target): Likewise.
12973 (grub_video_vbe_scroll): Likewise.
12974 (grub_video_vbe_swap_buffers): Likewise.
12975 (grub_video_vbe_create_render_target): Likewise.
12976 (grub_video_vbe_delete_render_target): Likewise.
12977 (grub_video_vbe_set_active_render_target): Likewise.
12978 (grub_vbe_set_pixel_rgb): Remove function.
12979 (grub_vbe_set_pixel_index): Likewise.
12980 (index_color_mode): Remove static variable.
12981 (active_mode): Likewise.
12982 (framebuffer): Likewise.
12983 (bytes_per_scan_line): Likewise.
12984 (grub_video_vbe_adapter): Added new static variable.
12985 (framebuffer): Likewise.
12986 (render_target): Likewise.
12987 (initial_mode): Likewise.
12988 (mode_in_use): Likewise.
12989 (mode_list): Likewise.
12991 2006-03-10 Marco Gerards <marco@gnu.org>
12993 * configure.ac (AC_INIT): Bumped to 1.93.
12995 * DISTLIST: Added `include/grub/hfs.h'.
12997 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12999 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13000 18H, which might help the BIOS falling back to next boot media.
13002 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13004 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13005 Poe Chen <poe.poechen@gmail.com>.
13007 2006-01-17 Marco Gerards <marco@gnu.org>
13009 * include/grub/normal.h: Include <grub/script.h>.
13010 (grub_command_list): Removed struct.
13011 (grub_command_list_t): Removed type.
13012 (grub_menu_entry): Remove members `num' and `command_list'. Add
13013 members `commands' and `sourcecode'.
13014 * include/grub/script.h: Add inclusion guards.
13015 (grub_script_cmd_menuentry): New struct.
13016 (grub_script_execute_menuentry): New prototype.
13017 (grub_script_lexer_record_start): Likewise.
13018 (grub_script_lexer_record_stop): Likewise.
13019 * normal/execute.c (grub_script_execute_menuentry): New function.
13020 * normal/lexer.c (record, recording, recordpos, recordlen): New
13022 (grub_script_lexer_record_start): New function.
13023 (grub_script_lexer_record_stop): Likewise.
13024 (recordchar): Likewise.
13025 (nextchar): Likewise.
13026 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13027 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13028 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13029 (current_menu): New variable.
13030 (free_menu): Mainly rewritten.
13031 (grub_normal_menu_addentry): New function.
13032 (read_config_file): Rewritten.
13033 * normal/menu.c (run_menu_entry): Mainly rewritten.
13034 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13036 (run): Mainly rewritten.
13037 * normal/parser.y (menu_entry): New variable.
13038 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13039 (menuentry): New rule.
13040 (command): Add `menuentry'.
13041 (if_statement): Allow additional returns before `fi'.
13042 * normal/script.c (grub_script_create_cmdmenu): New function.
13044 2006-01-03 Marco Gerards <marco@gnu.org>
13046 * INSTALL: GNU Bison is required.
13047 * configure.ac: Rewritten the test to detect Bison.
13048 * Makefile.in (YACC): New variable. Reported by Xun Sun
13049 <xun.sun.cn@gmail.com>.
13051 2006-01-03 Marco Gerards <marco@gnu.org>
13053 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13054 the HFS+ filesystem to filesystem blocks.
13055 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13056 GCC warning is silenced.
13058 2006-01-03 Marco Gerards <marco@gnu.org>
13060 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13061 read from disk from big endian to host byte order.
13063 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13065 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13067 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13068 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13069 embedded HFS+ filesystem.
13070 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13071 (grub_hfs_sblock): Move from here...
13072 * include/grub/hfs.h: To here... New file.
13073 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13075 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13077 (grub_hfsplus_volheader): Change type of member `magic' to
13079 (grub_hfsplus_data): Add new member `embedded_offset'.
13080 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13082 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13083 Calculate the offset.
13085 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13087 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13089 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13091 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13093 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13094 ENV->NAME is NULL after allocating ENV->VALUE.
13096 2005-12-25 Marco Gerards <marco@gnu.org>
13098 * kern/env.c (grub_env_set): Rewritten the error handling code.
13100 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13102 * geninit.sh: Made more robust, and more portable.
13104 2005-12-25 Marco Gerards <marco@gnu.org>
13106 Add support for Apple HFS+ filesystems.
13108 * fs/hfsplus.c: New file.
13110 * DISTLIST: Added `fs/hfsplus.c'.
13112 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13113 (hfsplus_mod_SOURCES): New variable.
13114 (hfsplus_mod_CFLAGS): Likewise.
13115 (hfsplus_mod_LDFLAGS): Likewise.
13116 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13117 (grub_setup_SOURCES): Likewise.
13118 (grub_mkdevicemap_SOURCES): Likewise.
13119 (grub_emu_SOURCES): Likewise.
13120 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13122 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13124 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13126 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13128 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13129 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13130 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13131 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13132 normal/lexer.c, normal/parser.y, normal/script.c, and
13134 Removed kern/sparc64/cache.c.
13136 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13137 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13140 * configure.ac (AC_INIT): Bumped to 1.92.
13142 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13144 * kern/err.c (grub_error_push): Added new function to support error
13146 (grub_error_pop): Likewise.
13147 (grub_error_stack_items): New local variable to support error stacks.
13148 (grub_error_stack_pos): Likewise.
13149 (grub_error_stack_assert): Likewise.
13150 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13152 (grub_print_error): Added support to print errors from error stack.
13154 * include/grub/err.h (grub_error_push): Added function prototype.
13155 (grub_error_pop): Likewise.
13157 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13159 * configure.ac: Accept `powerpc64' as host_cpu.
13160 (amd64): Rename to `biarch32'.
13162 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13163 non-cacheline-aligned addresses.
13165 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13166 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13167 if `size' is non-zero.
13169 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
13171 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13172 and `cd' to make sure the filename is not prefixed with a
13174 (pkgdata_MODULES): Add `gpt.mod'.
13175 (gpt_mod_SOURCES): New variable.
13176 (gpt_mod_CFLAGS): Likewise.
13177 (gpt_mod_LDFLAGS): Likewise.
13179 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13181 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13184 * partmap/gpt.c: New file.
13186 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13187 GPT partition map is detected.
13189 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13191 * commands/i386/pc/play.c: New file.
13192 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13193 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13196 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
13198 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13199 ((unused))' to silence gcc warning.
13201 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13203 * configure.ac: Correct `AC_PROG_YACC' test.
13205 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13207 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13208 check before installing files.
13210 2005-11-22 Mike Small <smallm@panix.com>
13212 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13213 number regex so multidigit numbers are recognized correctly.
13215 2005-11-22 Mike Small <smallm@panix.com>
13217 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13218 debugging message before attempting to claim memory.
13219 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13220 multiple addresses in case of failure.
13222 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13224 * term/tparm.c (get_space): Remove empty `if' statement.
13226 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13228 * kern/parser.c (check_varstate): Rename `state' to 's'.
13230 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13232 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13233 variable definitions to the beginning of each function. Sort stack
13235 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13236 `buf' argument to `char *'.
13238 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13240 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13241 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13242 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13243 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13244 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13245 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13246 configfile.mod, search.mod, gzio.mod and test.mod.
13247 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13248 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13249 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13250 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13251 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13252 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13253 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13254 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13255 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13256 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13257 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13258 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13259 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13260 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13261 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13262 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13263 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13264 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13265 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13266 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13267 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13268 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13269 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13271 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13273 (pkgdata_MODULES): Add test.mod.
13275 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13277 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13278 appending to variables with "+=".
13279 (PModule): Use full pathname to generate *.lst filenames.
13281 * Makefile.in: Fixed list rules moved from genmk.rb.
13282 (.DELETE_ON_ERROR): New special target.
13283 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13285 * conf/i386-pc.rmk: Include conf/common.mk.
13286 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13287 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13288 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13289 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13290 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13291 configfile.mod, search.mod, gzio.mod and test.mod.
13292 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13293 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13294 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13295 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13296 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13297 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13298 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13299 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13300 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13301 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13302 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13303 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13304 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13305 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13306 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13307 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13308 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13309 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13310 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13311 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13312 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13313 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13314 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13316 * conf/common.rmk: ... to here. New file.
13318 * conf/common.mk: New file.
13320 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13322 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13323 (grub_script.tab.c): ... here.
13325 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13326 (grub_script.tab.c): ... here.
13328 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13329 (grub_script.tab.c): ... here.
13331 * normal/command.c (grub_command_find): Fixed a memory leak of
13332 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13334 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13336 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13337 "@" which marks the start of a comment on ARM.
13338 (VARIABLE): Likewise.
13340 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13342 Add support for Linux/ADFS partition tables.
13344 * partmap/acorn.c: New file.
13346 * include/grub/acorn_filecore.h: Likewise.
13348 * DISTLIST: Added `partmap/acorn.c' and
13349 `include/grub/acorn_filecore.h'.
13351 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13353 (pkgdata_MODULES): Add `acorn.mod'.
13354 (acorn_mod_SOURCES): New variable.
13355 (acorn_mod_CFLAGS): Likewise.
13357 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13359 (pkgdata_MODULES): Add `acorn.mod'.
13360 (acorn_mod_SOURCES): New variable.
13361 (acorn_mod_CFLAGS): Likewise.
13363 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13364 (pkgdata_MODULES): Add `acorn.mod'.
13365 (acorn_mod_SOURCES): New variable.
13366 (acorn_mod_CFLAGS): Likewise.
13367 (acorn_mod_LDFLAGS): Likewise.
13369 * include/types.h (grub_disk_addr_t): New typedef.
13371 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
13373 * geninit.sh: New file.
13375 * geninitheader.sh: Likewise.
13377 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13378 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13379 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13380 * commands/configfile.c (grub_configfile_init)
13381 (grub_configfile_fini): Likewise.
13382 * commands/default.c (grub_default_init, grub_default_fini):
13384 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13385 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13386 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13387 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13389 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13390 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13392 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13393 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13395 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13397 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13399 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13400 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13401 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13402 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13403 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13404 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13405 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13406 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13407 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13408 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13409 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13410 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13411 * partmap/amiga.c (grub_amiga_partition_map_init)
13412 (grub_amiga_partition_map_fini): Likewise.
13413 * partmap/apple.c (grub_apple_partition_map_init)
13414 (grub_apple_partition_map_fini): Likewise.
13415 * partmap/pc.c (grub_pc_partition_map_init)
13416 (grub_pc_partition_map_fini): Likewise.
13417 * partmap/sun.c (grub_sun_partition_map_init,
13418 grub_sun_partition_map_fini): Likewise.
13419 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13422 * util/grub-emu.c: Include <grub_modules_init.h>.
13423 (main): Don't initialize and de-initialize any modules directly,
13424 use `grub_init_all' and `grub_fini_all' instead.
13426 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13427 `grub_vesafb_mod_init'.
13428 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13430 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13431 `grub_vga_mod_init'. Updated all users.
13432 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13434 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13435 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13438 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13439 Generate a function to initialize the module in utilities.
13440 Updated all callers.
13441 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13442 initialize the module in utilities. Updated all callers.
13444 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13446 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13447 escape sequence and a literal ^L to clear the screen.
13449 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13450 when returning from Open Firmware.
13452 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13454 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13455 (grub_ofconsole_height): Likewise.
13456 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13457 manually insert a '\n'.
13458 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13459 `grub_ofconsole_height'. Return early if these are already set.
13461 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13463 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13464 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13465 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13466 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13467 and `normal/script.c'.
13468 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13469 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13470 (test_mod_SOURCES): New variable.
13471 (test_mod_CFLAGS): Likewise.
13472 (test_mod_LDFLAGS): Likewise.
13473 (pkgdata_MODULES): Add `test.mod'.
13474 (grub_script.tab.c): New rule.
13475 (grub_script.tab.h): Likewise.
13477 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
13479 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13480 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13481 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13482 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13483 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13484 (test_mod_SOURCES): New variable.
13485 (test_mod_CFLAGS): Likewise.
13486 (pkgdata_MODULES): Add `test.mod'.
13487 (grub_script.tab.c): New rule.
13488 (grub_script.tab.h): Likewise.
13490 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
13492 Add initial scripting support.
13494 * commands/test.c: New file.
13495 * include/grub/script.h: Likewise.
13496 * normal/execute.c: Likewise.
13497 * normal/function.c: Likewise.
13498 * normal/lexer.c: Likewise.
13499 * normal/parser.y: Likewise.
13500 * normal/script.c: Likewise.
13502 * configure.ac: Add `AC_PROG_YACC' test.
13504 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13505 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13506 `normal/function.c' and `normal/script.c'.
13507 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13508 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13509 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13511 (pkgdata_MODULES): Add `test.mod'.
13512 (grub_script.tab.c): New rule.
13513 (grub_script.tab.h): Likewise.
13515 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13517 * include/grub/normal.h (grub_test_init): New prototype.
13518 (grub_test_fini): Likewise.
13520 * normal/command.c: Include <grub/script.h>.
13521 (grub_command_execute): Rewritten.
13523 * util/grub-emu.c (main): Call `grub_test_init' and
13526 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13528 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13530 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13531 there are no pending characters.
13533 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13535 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13536 `grub_strndup' to drop device arguments. Replace unnecessary
13537 `grub_strndup' with `grub_strdup'.
13539 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13541 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13542 `debug' environment variable has been set.
13544 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
13546 * Makefile.in (install-local): Use $(DATA).
13547 (uninstall): Likewise.
13548 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13549 (sbin_UTILITIES): ... to here.
13550 (sbin_SCRIPTS): New variable.
13551 (grub_install_SOURCES): New variable.
13552 * util/powerpc/ieee1275/grub-install.in: New file.
13553 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13555 (add_segments): Call `grub_util_get_path'.
13557 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13559 From Timothy Baldwin:
13560 * commands/ls.c (grub_ls_list_files): Close FILE with
13562 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13564 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
13566 * include/grub/parser.h: New file.
13568 * kern/parser.c: Likewise.
13570 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13571 (grub_setup_SOURCES): Likewise.
13572 (grub_probefs_SOURCES): Likewise.
13573 (grub_emu_SOURCES): Likewise.
13574 (kernel_img_HEADERS): Add `parser.h'.
13576 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13577 (grub_emu_SOURCES): Add `kern/parser.c'.
13578 (grubof_SOURCES): Likewise.
13580 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13581 (grubof_SOURCES): Add `kern/parser.c'.
13583 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13585 * kern/misc.c (grub_split_cmdline): Removed function.
13587 * kern/rescue.c: Include <grub/parser.h>.
13588 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13589 of `grub_split_cmdline'.
13591 * normal/command.c: Include <grub/parser.h>.
13592 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13593 of `grub_split_cmdline'.
13595 * normal/completion.c: Include <grub/parser.h>.
13596 (cmdline_state): New variable.
13597 (iterate_dir): End the filename with a quote depending on the
13598 command line state.
13599 (get_state): new function.
13600 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13601 split the arguments and determine the current argument. When the
13602 argument string is not quoted, escape all spaces.
13604 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13606 * normal/sparc64/setjmp.S: New file.
13608 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13610 * include/grub/sparc64/libgcc.h: New file.
13611 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13612 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13613 normal/sparc64/setjmp.c.
13615 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13617 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13618 * kern/sparc64/cache.S: New file.
13619 * kern/sparc64/cache.c: Removed.
13620 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13621 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13623 (COMMON_LDFLAGS): Add -melf64_sparc.
13624 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13625 (grubof_SOURCES): Use cache.S instead of cache.c.
13626 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13627 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13628 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13630 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13631 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13632 (linux_mod_CFLAGS): Commented out.
13633 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13634 out because module isn't built.
13635 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13636 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13637 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13638 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13639 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13640 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13641 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13642 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13643 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13644 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13645 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13646 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13647 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13648 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13650 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13652 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13653 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13654 longer, because HFS should not be used on PC.
13656 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13658 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13659 consistently within the loop.
13661 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
13663 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13664 directory can not be read.
13666 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13668 * configure.ac (AC_INIT): Increase the version number to 1.91.
13670 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13671 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13672 term/i386/pc/serial.c.
13674 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13676 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13677 file size must be permitted.
13679 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13680 between %ah and %al.
13682 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13684 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13686 Call the hook with a NUL-terminated filename.
13687 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13690 * kern/term.c (cursor_state): New variable.
13691 (grub_term_set_current): Reset the cursor state on a new
13693 (grub_setcursor): Rewritten to use CURSOR_STATE.
13694 (grub_getcursor): New function.
13696 * include/grub/term.h (grub_getcursor): New prototype.
13698 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13699 integers on ARM. Reported by Timothy Baldwin
13700 <T.E.Baldwin99@members.leeds.ac.uk>.
13702 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
13704 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13706 (grub_sfs_dir): Likewise.
13708 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
13710 Add support for the SFS filesystem.
13712 * fs/sfs.c: New file.
13714 * DISTLIST: Added `fs/sfs.c'.
13716 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13717 (grub_probefs_SOURCES): Likewise.
13718 (grub_emu_SOURCES): Likewise.
13719 (pkgdata_MODULES): Add `sfs.mod'.
13720 (sfs_mod_SOURCES): New variable.
13721 (sfs_mod_CFLAGS): Likewise.
13722 (sfs_mod_LDFLAGS): Likewise.
13724 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13725 (pkgdata_MODULES): Add `sfs.mod'.
13726 (sfs_mod_SOURCES): New variable.
13727 (sfs_mod_CFLAGS): Likewise.
13729 * util/grub-emu.c (main): Call `grub_sfs_init' and
13732 * include/grub/fs.h (grub_sfs_init): New prototype.
13733 (grub_sfs_fini): Likewise.
13735 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
13737 Add support for the AFFS filesystem.
13739 * fs/affs.c: New file.
13741 * DISTLIST: Added `fs/affs.c'.
13743 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13744 (grub_probefs_SOURCES): Likewise.
13745 (grub_emu_SOURCES): Likewise.
13746 (pkgdata_MODULES): Add `affs.mod'.
13747 (affs_mod_SOURCES): New variable.
13748 (affs_mod_CFLAGS): Likewise.
13749 (affs_mod_LDFLAGS): Likewise.
13751 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13752 (pkgdata_MODULES): Add `affs.mod'.
13753 (affs_mod_SOURCES): New variable.
13754 (affs_mod_CFLAGS): Likewise.
13756 * util/grub-emu.c (main): Call `grub_affs_init' and
13759 * include/grub/fs.h (grub_affs_init): New prototype.
13760 (grub_affs_fini): Likewise.
13762 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13764 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13766 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13768 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13771 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13774 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13775 (COMMON_LDFLAGS): New variable.
13776 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13777 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13778 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13779 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13780 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13781 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13782 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13783 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13784 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13785 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13786 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13787 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13788 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13789 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13790 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13792 (normal_mod_ASFLAGS): Add `-m32'.
13794 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13795 (grub_host_size_t, grub_host_ssize_t): New types.
13796 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13797 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13798 `GRUB_HOST_SIZEOF_VOID_P'.
13800 * include/grub/kernel.h (struct grub_module_header): Type of
13801 member offset changed to `grub_host_off_t'. Type of member size
13802 changed to `grub_host_size_t'.
13803 (struct grub_module_info): Type of member offset changed to
13804 `grub_host_off_t'. Type of member size changed to
13805 `grub_host_size_t'.
13807 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13809 Make GRUB's kernel compliant to Multiboot Specification.
13811 * kern/i386/pc/startup.S (multiboot_header): New label.
13812 (multiboot_entry): Likewise.
13813 (multiboot_trampoline): Likewise.
13815 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13816 Increased to 0x4A0.
13818 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13819 put parentheses after a question mark.
13820 [!GRUB_UTIL] (my_mod): New variable.
13822 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13824 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13826 Adds support for the XFS filesystem. Btrees are not supported
13829 * fs/xfs.c: New file.
13831 * DISTLIST: Added `fs/xfs.c'.
13833 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13834 (grub_probefs_SOURCES): Likewise.
13835 (grub_emu_SOURCES): Likewise.
13836 (pkgdata_MODULES): Add `xfs.mod'.
13837 (xfs_mod_SOURCES): New variable.
13838 (xfs_mod_CFLAGS): Likewise.
13840 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13841 (pkgdata_MODULES): Add `xfs.mod'.
13842 (xfs_mod_SOURCES): New variable.
13843 (xfs_mod_CFLAGS): Likewise.
13845 * util/grub-emu.c (main): Call `grub_xfs_init' and
13848 * include/grub/fs.h (grub_xfs_init): New prototype.
13849 (grub_xfs_fini): Likewise.
13852 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13854 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13855 color modes, allow greater than 16 colors to be configured as
13858 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13860 * normal/completion.c (complete_arguments): Add the qualifier
13861 const into OPTIONS.
13863 From Omniflux <omniflux+lists@omniflux.com>:
13864 * include/grub/terminfo.h: New file.
13865 * include/grub/tparm.h: Likewise.
13866 * include/grub/i386/pc/serial.h: Likewise.
13867 * term/terminfo.c: Likewise.
13868 * term/tparm.c: Likewise.
13869 * term/i386/pc/serial.c: Likewise.
13870 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13872 (terminfo_mod_SOURCES): New variable.
13873 (terminfo_mod_CFLAGS): Likewise.
13874 (serial_mod_SOURCES): Likewise.
13875 (serial_mod_CFLAGS): Likewise.
13877 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13879 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13880 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13881 and kern/powerpc/ieee1275/cmain.c, respectively.
13883 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13884 * kern/powerpc/ieee1275/crt0.S: ... here.
13886 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13887 * kern/powerpc/ieee1275/cmain.c: ... here.
13889 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13890 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13891 instead of boot/powerpc/ieee1275/crt0.S and
13892 boot/powerpc/ieee1275/cmain.c, respectively.
13894 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13895 sectors. It was not used anyway.
13897 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13899 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13900 `unused parameter' warning.
13902 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13904 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13906 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13909 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13911 * include/grub/normal.h (enum grub_completion_type): Added
13912 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13914 * normal/cmdline.c (print_completion): Handle
13915 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13916 * normal/menu_entry.c (store_completion): Likewise.
13918 * normal/completion.c (complete_arguments): New function.
13919 (grub_normal_do_completion): Call `complete_arguments' when the
13920 current words start with a dash.
13922 2005-08-27 Marco Gerards <metgerards@student.han.nl>
13924 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13925 `gzio.mod' instead of `io.mod').
13927 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13929 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13930 (DISTDIRS): Added io and video.
13931 Rewrite the search routine to make an output consistently.
13933 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13934 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13935 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13936 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13937 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13938 util/powerpc/ieee1275/misc.c.
13940 * include/grub/gzio.h: New file.
13941 * io/gzio.c: Likewise.
13943 * kern/file.c (grub_file_close): Call grub_device_close only if
13944 FILE->DEVICE is not NULL.
13946 * include/grub/mm.h [!NULL] (NULL): New macro.
13948 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13951 (pkgdata_MODULES): Added gzio.mod.
13952 (gzio_mod_SOURCES): New variable.
13953 (gzio_mod_CFLAGS): Likewise.
13955 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13956 (pkgdata_MODULES): Added gzio.mod.
13957 (gzio_mod_SOURCES): New variable.
13958 (gzio_mod_CFLAGS): Likewise.
13960 * commands/cat.c: Include grub/gzio.h.
13961 (grub_cmd_cat): Use grub_gzfile_open instead of
13964 * commands/cmp.c: Include grub/gzio.h.
13965 (grub_cmd_cmp): Use grub_gzfile_open instead of
13968 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13969 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13971 (grub_rescue_cmd_module): Likewise.
13973 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13975 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13976 kern/sparc64/ieee1275/init.c because it contains _start.
13977 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13979 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13981 * configure.ac: Add support for sparc64 host with ieee1275
13983 * configure: Generated from configure.ac.
13984 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13986 (grub_ofdisk_read): Likewise.
13987 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13988 pointers as (void *) to remove a warning.
13989 (grub_ofdisk_close): Likewise.
13990 (grub_ofdisk_read): Likewise.
13991 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13992 returns, so make it return void to remove a warning.
13993 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13994 Corresponding prototype change.
13995 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13996 values, and cast the pointers as (void *) to remove a warning.
13997 (grub_mm_dump): Likewise.
13998 * conf/sparc64-ieee1275.mk: New file.
13999 * conf/sparc64-ieee1275.rmk: Likewise.
14000 * include/grub/sparc64/setjmp.h: Likewise.
14001 * include/grub/sparc64/types.h: Likewise.
14002 * include/grub/sparc64/ieee1275/console.h: Likewise.
14003 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14004 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14005 * include/grub/sparc64/ieee1275/time.h: Likewise.
14006 * kern/sparc64/cache.c: Likewise.
14007 * kern/sparc64/dl.c: Likewise.
14008 * kern/sparc64/ieee1275/init.c: Likewise.
14009 * kern/sparc64/ieee1275/openfw.c: Likewise.
14011 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14013 * util/console.c (grub_ncurses_putchar): If C is greater than
14014 0x7f, set C to a question mark.
14015 (grub_ncurses_getcharwidth): New function.
14016 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14019 * normal/menu.c (print_entry): Made aware of Unicode. First,
14020 convert TITLE to UCS-4, and predict the cursor position by
14023 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14025 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14027 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14029 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14030 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14033 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14034 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14035 grub_strcpy and grub_strlen. Take it into account that a space
14036 character is inserted as a delimiter.
14038 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14040 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14041 invalid magic in the error.
14043 * commands/search.c: New file.
14045 * util/grub-emu.c (main): Call grub_search_init and
14048 * kern/rescue.c (grub_rescue_print_disks): Removed.
14049 (grub_rescue_print_devices): New function.
14050 (grub_rescue_cmd_ls): Use grub_device_iterate with
14051 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14052 grub_rescue_print_disks.
14054 * kern/partition.c (grub_partition_iterate): Return the result of
14055 PARTMAP->ITERATE instead of GRUB_ERRNO.
14057 * kern/device.c: Include grub/partition.h.
14058 (grub_device_iterate): New function.
14060 * include/grub/partition.h (grub_partition_iterate): Return int
14061 instead of grub_err_t.
14063 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14065 [GRUB_UTIL] (grub_search_fini): Likewise.
14067 * include/grub/device.h (grub_device_iterate): New prototype.
14069 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14071 (pkgdata_MODULES): Added search.mod.
14072 (search_mod_SOURCES): New variable.
14073 (search_mod_CFLAGS): Likewise.
14075 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14076 (pkgdata_MODULES): Added search.mod.
14077 (search_mod_SOURCES): New variable.
14078 (search_mod_CFLAGS): Likewise.
14080 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14081 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14082 All callers changed.
14084 * DISTLIST: Added commands/search.c.
14086 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14088 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14090 (grub_getcharwidth): New function.
14092 * kern/misc.c (grub_utf8_to_ucs4): New function.
14094 * include/grub/term.h (struct grub_term): Added a new member
14096 (grub_getcharwidth): New prototype.
14098 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14100 * term/i386/pc/console.c (map_char): New function. Segregated from
14101 grub_console_putchar.
14102 (grub_console_putchar): Use map_char.
14103 (grub_console_getcharwidth): New function.
14104 (grub_console_term): Specified grub_console_getcharwidth as
14107 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14108 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14110 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14112 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14113 on grub_strtoul completely.
14114 (write_char): Declare local variables in the beginning of the
14116 (grub_vesafb_getcharwidth): New function.
14117 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14120 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14122 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14123 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14124 commands/i386/pc/vbetest.c.
14126 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14127 call grub_vbe_get_controller_info again, because the returned
14128 information is volatile.
14129 (grub_vbe_set_video_mode): Mostly rewritten.
14130 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14131 grub_vbe_status_t correctly.
14132 (grub_vbe_get_video_mode_info): Likewise.
14133 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14134 several if statements.
14136 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14137 * commands/i386/pc/vbeinfo.c: ... this.
14139 * commands/i386/pc/vbe_test.c: Renamed to ...
14140 * commands/i386/pc/vbetest.c: ... this.
14142 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14144 (grub_cmd_vbeinfo): ... this. Save video modes before
14145 iterating. Skip a video mode, if it is not available, not enough
14146 information is given or it is monochrome. Show the memory
14147 model. Leave the interpretation of MODEVAR to grub_strtoul
14149 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14150 (GRUB_MOD_FINI): Likewise.
14152 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14153 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14154 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14155 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14156 grub_strtoul completely.
14157 (real2pm): Removed.
14158 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14159 (GRUB_MOD_FINI): Likewise.
14161 * normal/misc.c: Include grub/mm.h.
14163 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14164 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14165 (vbe_list_modes_mod_SOURCES): Removed.
14166 (vbe_list_modes_mod_CFLAGS): Likewise.
14167 (vbe_test_mod_SOURCES): Likewise.
14168 (vbe_test_mod_CFLAGS): Likewise.
14169 (vbeinfo_mod_SOURCES): New variable.
14170 (vbeinfo_mod_CFLAGS): Likewise.
14171 (vbetest_mod_SOURCES): Likewise.
14172 (vbetest_mod_CFLAGS): Likewise.
14174 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14176 * normal/misc.c: New file.
14178 * DISTLIST: Added normal/misc.c.
14180 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14181 DISK to HOOK. Call HOOK with DISK.
14182 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14183 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14184 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14186 * normal/menu_entry.c (struct screen): Added a new member
14187 "completion_shown".
14188 (completion_buffer): New global variable.
14189 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14190 (store_completion): New function.
14191 (complete): Likewise.
14192 (clear_completions): Likewise.
14193 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14194 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14195 a tab, call complete.
14197 * normal/completion.c (disk_dev): Removed.
14198 (print_simple_completion): Likewise.
14199 (print_partition_completion): Likewise.
14200 (print_func): New global variable.
14201 (add_completion): Do not take the arguments WHAT or PRINT any
14202 longer. Added a new argument TYPE. Instead of printing directly,
14203 call PRINT_FUNC if not NULL.
14204 All callers changed.
14205 (complete_device): Use a local variable DEV instead of
14206 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14207 (grub_normal_do_completion): Take a new argument HOOK. Do not
14208 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14209 empty string, return NULL instead.
14210 All callers changed.
14212 * normal/cmdline.c (print_completion): New function.
14214 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14216 All callers changed.
14218 * kern/disk.c (grub_print_partinfo): Removed.
14220 * include/grub/partition.h (struct grub_partition_map): Add a new
14221 argument DISK into HOOK of ITERATE.
14222 (grub_partition_iterate): Add a new argument DISK to HOOK.
14224 * include/grub/normal.h (enum grub_completion_type): New enum.
14225 (grub_completion_type_t): New type.
14226 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14227 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14228 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14229 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14230 (grub_normal_do_completion): Added a new argument HOOK.
14231 (grub_normal_print_device_info): New prototype.
14233 * include/grub/disk.h (grub_print_partinfo): Removed.
14235 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14236 (normal_mod_SOURCES): Likewise.
14237 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14238 (normal_mod_SOURCES): Likewise.
14240 * commands/ls.c (grub_ls_list_disks): Use
14241 grub_normal_print_device_info instead of grub_print_partinfo. Free
14243 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14244 duplicating the code.
14246 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14248 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14249 follow GCS more precisely.
14250 * commands/i386/pc/vbe_test.c: Likewise.
14251 * include/grub/i386/pc/vbe.h: Likewise.
14252 * term/i386/pc/vesafb.c: Likewise.
14253 * video/i386/pc/vbe.c: Likewise.
14255 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14257 * DISTLIST: Added term/i386/pc/vesafb.c
14258 DISTLIST: Added video/i386/pc/vbe.c
14259 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14260 DISTLIST: Added commands/i386/pc/vbe_test.c.
14261 * commands/i386/pc/vbe_list_modes.c: New file.
14262 * commands/i386/pc/vbe_test.c: Likewise.
14263 * term/i386/pc/vesafb.c: Likewise.
14264 * video/i386/pc/vbe.c: Likewise.
14265 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14266 (grub_vbe_probe) Added prototype.
14267 (grub_vbe_set_video_mode) Likewise.
14268 (grub_vbe_get_video_mode) Likewise.
14269 (grub_vbe_get_video_mode_info) Likewise.
14270 (grub_vbe_set_pixel_rgb) Likewise.
14271 (grub_vbe_set_pixel_index) Likewise.
14272 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14273 (pkgdata_MODULES): Added vesafb.mod.
14274 (pkgdata_MODULES): Added vbe_list_modes.mod.
14275 (pkgdata_MODULES): Added vbe_test.mod.
14276 (vbe_mod_SOURCES): Added.
14277 (vbe_mod_CFLAGS): Likewise.
14278 (vesafb_mod_SOURCES): Likewise.
14279 (vesafb_mod_CFLAGS): Likewise.
14280 (vbe_list_modes_mod_SOURCES): Likewise.
14281 (vbe_list_modes_mod_CFLAGS): Likewise.
14282 (vbe_test_mod_SOURCES): Likewise.
14283 (vbe_test_mod_CFLAGS): Likewise.
14285 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14287 * normal/command.c (grub_command_execute): If INTERACTIVE is
14288 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14289 CMDLINE. Disable the pager if INTERACTIVE is true.
14290 All callers are changed.
14292 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14293 before reading a config file.
14294 * normal/main.c (read_config_file): Even if a command is not
14295 found, register it if it is within an entry.
14297 * util/grub-emu.c: Include sys/types.h and unistd.h.
14298 (options): Added --hold.
14299 (struct arguments): Added a new member "hold".
14300 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14302 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14303 cleared by a debugger, if it is not zero.
14305 * include/grub/normal.h (grub_command_execute): Add an argument
14308 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14310 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14312 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14314 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14315 program with another one, because the old one didn't detect a bug
14316 in gcc-3.4. Always use regparm 2, because the new test is still
14317 not enough for gcc-4.0. Someone must investigate a simple test
14318 case which detects a bug in gcc-4.0.
14320 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14322 * DISTLIST: Added normal/completion.c.
14324 * normal/completion.c: New file.
14326 * term/i386/pc/console.c (grub_console_getwh): New function.
14327 (grub_console_term): Assign grub_console_getwh to getwh.
14329 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14330 function is defined in normal/completion.c as
14331 grub_normal_do_completion.
14332 (grub_cmdline_get): Use grub_normal_do_completion instead of
14335 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14336 returns non-zero, otherwise return 0.
14337 (grub_partition_iterate): First, probe the partition map. Then,
14338 call ITERATE only for this partition map.
14340 * kern/misc.c (grub_strncmp): Rewritten.
14342 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14343 returns non-zero. Otherwise return 0.
14345 * include/grub/partition.h (grub_partition_map_iterate): Return
14346 int instead of void.
14348 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14350 * include/grub/misc.h (grub_strncmp): Change the type of N to
14353 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14356 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14357 unsigned explicitly before comparing it with I.
14359 * kern/main.c (grub_env_write_root): Add the attribute unused into
14362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14363 normal/completion.c.
14364 (normal_mod_SOURCES): Likewise.
14365 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14366 (normal_mod_SOURCES): Likewise.
14368 * normal/command.c (grub_iterate_commands): If ITERATE returns
14369 non-zero, return one immediately.
14371 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14373 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14374 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14376 (grub_vbe_get_controller_info): New function.
14377 (grub_vbe_get_mode_info): Likewise.
14378 (grub_vbe_set_mode): Likewise.
14379 (grub_vbe_get_mode): Likewise.
14380 (grub_vbe_set_memory_window): Likewise.
14381 (grub_vbe_get_memory_window): Likewise.
14382 (grub_vbe_set_scanline_length): Likewise.
14383 (grub_vbe_get_scanline_length): Likewise.
14384 (grub_vbe_set_display_start): Likewise.
14385 (grub_vbe_get_display_start): Likewise.
14386 (grub_vbe_set_palette_data): Likewise.
14387 * include/grub/i386/pc/vbe.h: New file.
14389 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14391 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14392 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14393 * DISTLIST: Likewise.
14394 * kern/ieee1275/of.c: Moved to ...
14395 * kern/ieee1275/ieee1275.c: ... here.
14397 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14399 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14400 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14401 Pass 0 as `end' parameter to grub_strtoul().
14403 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14405 * include/grub/powerpc/ieee1275/console.h: Do not include
14406 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14408 (grub_console_cur_color): Remove i386-specific prototype.
14409 (grub_console_real_putchar): Likewise.
14410 (grub_console_checkkey): Likewise.
14411 (grub_console_getkey): Likewise.
14412 (grub_console_getxy): Likewise.
14413 (grub_console_gotoxy): Likewise.
14414 (grub_console_cls): Likewise.
14415 (grub_console_setcursor): Likewise.
14416 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14417 Include <grub/machine/console.h>.
14418 * term/ieee1275/ofconsole.c: Likewise.
14420 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14422 * Makefile.in (LIBLZO): New variable.
14424 * configure.ac: Check for LZO version 2.
14426 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14427 lzo/lzo1x.h instead of lzo1x.h.
14429 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14432 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14433 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14435 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14436 copying the data from PARTITION to P.
14438 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14440 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14441 negative, unload the module.
14443 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14444 map is "pc_partition_map" but not "pc".
14445 (usage): Fix the description. The options are --boot-image and
14446 --core-image but not --boot-file or --core-file.
14447 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14448 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14451 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14452 --core-file. Specify INSTALL_DEVICE as an argument.
14454 * util/console.c: Include config.h.
14455 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14456 [HAVE_NCURSES_H]: Include ncurses.h.
14457 [HAVE_CURSES_H]: Include curses.h.
14458 [!A_NORMAL] (A_NORMAL): Defined as zero.
14459 [!A_STANDOUT] (A_STANDOUT): Likewise.
14461 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14463 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14465 * configure.ac: Check for curses libraries and headers.
14467 * Makefile.in (LIBCURSES): New variable.
14469 * genmk.rb (Script::rule): Set the executable bits.
14471 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14472 name of the PC partition map is "pc_partition_map" but not "pc".
14474 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14476 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14477 (modules): Likewise.
14478 (usage): Added descriptions for --modules and --grub-probefs.
14479 Handle --modules and --grub-probefs. Save the arguments in MODULES
14480 and GRUB_PROBEFS, respectively.
14481 Auto-detect a filesystem module against GRUBDIR. If the result is
14482 empty and modules are not specified explicitly, abort the
14483 installation. Add the result to MODULES.
14485 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14486 disk/powerpc/ieee1275/ofdisk.c,
14487 include/grub/powerpc/ieee1275/init.h and
14488 term/powerpc/ieee1275/ofconsole.c.
14489 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14490 term/ieee1275/ofconsole.c.
14492 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14494 * COPYING: Upgraded to the latest version. Only the address of the
14495 FSF office has changed.
14497 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14499 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14500 kern/ieee1275.c with kern/ieee1275/of.c.
14502 * kern/ieee1275.c: Moved to ...
14503 * kern/ieee1275/of.c: ... here.
14505 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14507 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14510 * config.guess: Updated to the latest version from gnulib.
14511 * config.sub: Likewise.
14512 * install.sh: Likewise.
14513 * mkinstalldirs: Likewise.
14515 * include/grub/console.h: Removed. This file is arch-specific. Do
14516 not put this in include/grub.
14518 * include/grub/i386/pc/console.h: Resurrected.
14520 * util/console.c: Include grub/machine/console.h instead of
14522 * util/grub-emu.c: Likewise.
14524 2005-08-04 Marco Gerards <metgerards@student.han.nl>
14526 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14529 From Vincent Pelletier <subdino2004@yahoo.fr>
14530 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14531 Redefined to use grub_getwh.
14532 (grub_term): New member named getwh.
14533 (grub_getwh): New prototype.
14534 * kern/term.c (grub_getwh): New function.
14535 * term/i386/pc/console.c (grub_console_getwh): New function.
14536 (grub_console_term): New member `getwh'.
14537 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14538 (grub_vga_term): New member `getwh'.
14539 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14541 (grub_ofconsole_getw): New function.
14542 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14543 (grub_ofconsole_term): New field named getwh and new initial
14546 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14548 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14549 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14550 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14551 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14552 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14553 of <grub/machine/ieee1275.h>.
14554 * commands/ieee1275/reboot.c: Likewise.
14555 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14556 * kern/ieee1275.c: ... to here. All users updated. Change all
14557 parameter structs to use new type `grub_ieee1275_cell_t'.
14558 * term/powerpc/ieee1275/ofconsole.c: Move ...
14559 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14560 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14561 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14562 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14564 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14565 Remove unused prototypes. All users updated.
14566 * include/grub/powerpc/ieee1275/console.h: Removed.
14567 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14568 `grub_ieee1275_cell_t'.
14569 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14570 Cast comparisons with -1 to the correct type.
14571 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14572 type to match `grub_ieee1275_entry_fn'.
14574 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14576 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14578 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14579 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14581 (grub_probefs_SOURCES): New variable.
14583 * util/i386/pc/grub-probefs.c: New file.
14585 * util/i386/pc/grub-setup.c (main): Call
14586 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14587 grub_hfs_init and grub_jfs_init to initialize the system. Call
14588 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14589 grub_pc_partition_map_fini to finish the system.
14591 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14593 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14595 (grub_multiboot_load_elf32): Likewise.
14596 (grub_multiboot_is_elf64): Likewise.
14597 (grub_multiboot_load_elf64): Likewise.
14598 (grub_multiboot_load_elf): Likewise.
14599 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14600 an ELF32 or ELF64 file.
14601 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14603 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14604 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14605 NULL before calling FS->LABEL.
14606 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14607 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14608 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14609 before calling FS->LABEL.
14611 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14613 * util/i386/pc/grub-install.in (datadir): New variable.
14615 (pkgdatadir): New variable.
14616 (pkglibdir): Removed.
14618 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14620 * DISTLIST: Added util/i386/pc/grub-install.in.
14622 * util/i386/pc/grub-install.in: New file.
14624 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14625 (grub_install_SOURCES): Likewise.
14627 * genmk.rb: Added support for scripts.
14628 (Script): New class.
14629 (scripts): New variable.
14631 * Makefile.in (install-local): Install sbin_SCRIPTS by
14633 (uninstall): Remove sbin_SCRIPTS.
14635 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14636 device, try to get a GRUB device by
14637 grub_util_biosdisk_get_grub_dev.
14640 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14641 description for --device-map.
14643 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14645 Change the semantics of variable hooks. They now return strings
14646 instead of error values.
14648 * util/i386/pc/grub-setup.c: Include grub/env.h.
14649 (setup): Use grub_device_set_root instead of grub_env_set.
14651 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14652 grub_env_get instead of grub_device_set_root and
14653 grub_device_get_root, respectively.
14655 * kern/main.c (grub_env_write_root): New function.
14656 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14657 grub_env_set instead of grub_device_set_root.
14659 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14661 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14662 rather than calling ENV->WRITE_HOOK afterwards.
14663 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14664 passing a pointer of a pointer.
14665 (grub_register_variable_hook): Change the types of "read_hook" and
14666 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14668 Allocate the default empty string on the heap, because this string
14669 may be freed later.
14671 * kern/device.c: Include grub/env.h.
14672 (grub_device_set_root): Removed.
14673 (grub_device_get_root): Likewise.
14674 (grub_device_open): Use grub_env_get instead of
14675 grub_device_get_root.
14677 * include/grub/env.h (grub_env_read_hook_t): New type.
14678 (grub_env_write_hook_t): Likewise.
14679 (grub_env_var): Change the types of "read_hook" and "write_hook"
14680 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14681 (grub_register_variable_hook): Likewise.
14683 * include/grub/device.h (grub_device_set_root): Removed.
14684 (grub_device_set_root): Likewise.
14686 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14687 make sure that DIRNAME terminates with '/', so that
14688 grub_fat_find_dir will fail if PATH is not a directory.
14690 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14692 Use the qualifier auto for print_files and print_files_long.
14693 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14695 Put a newline only if there is no error.
14696 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14699 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14701 * kern/partition.c (grub_partition_probe): Initialize PART to
14702 NULL. Otherwise, when no partition map is registered, this returns
14705 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14707 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14708 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14711 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14713 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14714 information on each device, if it does not have partitions. Print
14715 "Device" instead of "Disk", because this function is not specific
14718 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14719 static to ensure that it is put on the memory rather than a
14722 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14724 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14725 (grub_cat_init): Likewise.
14726 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14727 (options): Likewise.
14728 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14729 (grub_configfile_init): Likewise.
14730 * font/manager.c (GRUB_MOD_INIT): Likewise.
14731 * commands/help.c (GRUB_MOD_INIT): Likewise.
14732 (grub_help_init): Likewise.
14733 * normal/command.c (grub_command_init): Likewise.
14734 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14735 * disk/loopback.c (grub_loop_init): Likewise.
14736 (GRUB_MOD_INIT): Likewise.
14737 * commands/ls.c (grub_ls_init): Likewise.
14738 (GRUB_MOD_INIT): Likewise.
14739 (options): Likewise.
14740 * commands/boot.c (grub_boot_init): Likewise.
14741 (GRUB_MOD_INIT): Likewise.
14742 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14743 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14744 (GRUB_MOD_INIT): Likewise.
14745 * commands/cmp.c (grub_cmp_init): Likewise.
14746 (GRUB_MOD_INIT): Likewise.
14748 * normal/arg.c: Use <> instead of "" to include header files.
14749 (SHORT_ARG_HELP): New macro.
14750 (SHORT_ARG_USAGE): Likewise.
14751 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14752 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14754 (find_short): Check if C is 'h' or 'u' explicitly.
14755 (grub_arg_show_help): Use space characters instead of tabs. Treat
14756 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14757 are shown with --help and --usage only if they are not used for
14758 the command itself.
14759 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14762 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14763 const into "longarg". Change the type of "shortarg" to int.
14765 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14767 * boot/i386/pc/boot.S (boot_drive_check): New label.
14769 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14772 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14773 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14775 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14777 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14778 When turning off Gate A20, skip the check and return immediately,
14779 because this is not fatal usually.
14781 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14783 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14784 be 0x7C00 instead of 0x8000.
14786 * boot/i386/pc/pxeboot.S: Rewritten.
14788 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14790 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14793 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14795 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14796 robustness. This routine now supports a BIOS call and System
14797 Control Port A to modify the gate A20.
14799 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14800 Increased to 0x440.
14802 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14804 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14805 device path and resulting ihandle.
14806 (grub_ofdisk_close): dprintf the ihandle being closed.
14807 (grub_ofdisk_read): dprintf function parameters.
14808 * kern/mm.c (grub_mm_init_region): Likewise.
14809 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14810 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14811 size, and boot arguments.
14812 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14813 before loading into memory.
14814 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14815 before loading into memory.
14817 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14819 * kern/mm.c: Added much documentation.
14820 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14821 8, set to 5 instead of 8.
14823 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14825 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14827 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14828 (grub_mkdevicemap_SOURCES): New variable.
14830 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14831 lib/device.c of GRUB Legacy.
14833 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14835 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14836 instead of PATH is NULL.
14838 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14840 * commands/cmp.c (BUFFER_SIZE): New macro.
14841 (grub_cmd_cmp): Close the right file at the right time. Compare
14842 only data just read. Don't report files of different size as
14843 identical. Dynamically allocate buffers. Move variable
14844 declarations at the beginning of function.
14846 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14848 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14851 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14853 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14854 when backspace is pressed at beginning of line.
14856 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14858 * DISTLIST: Added genfslist.sh.
14860 * normal/main.c (fs_module_list): New variable.
14861 (autoload_fs_module): New function.
14862 (read_fs_list): Likewise.
14863 (grub_normal_execute): Call read_fs_list.
14865 * kern/fs.c (grub_fs_autoload_hook): New variable.
14866 (grub_fs_probe): Added support for auto-loading.
14868 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14869 (grub_fs_module_list_t): New type.
14871 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14872 (grub_fs_autoload_hook): New prototype.
14874 * genfslist.sh: New file.
14876 * genmk.rb: Added a rule to generate a filesystem list.
14878 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14880 * configure.ac: Fix the test for cross-compiling.
14882 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14883 define GRUB_UTIL anymore.
14885 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14886 so this function works on other systems than just big endian.
14887 (load_modules): Likewise.
14888 (add_segments): Likewise.
14890 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14892 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14893 contains `l' modifier, get a long from va_arg().
14895 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14897 * kern/mm.c (grub_free): If the next free block which is being
14898 merged is the first free block, set the first block to the block
14900 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14902 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14904 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14905 `grub_ieee1275_chosen'.
14907 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14909 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14910 (grub_ieee1275_chosen): New variable.
14911 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14913 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14914 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14915 Rename first argument to `phandle' for consistency.
14916 (grub_ieee1275_get_property_length): Likewise.
14917 (grub_ieee1275_next_property): Likewise. Change type of first argument
14918 to grub_ieee1275_phandle_t.
14919 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14920 Move export next to declaration.
14921 (grub_ieee1275_chosen): New variable.
14922 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14923 Correct cosmetic typo.
14924 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14925 `grub_ieee1275_chosen'.
14926 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14927 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14928 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14929 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14930 `grub_ieee1275_chosen'.
14932 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14934 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14936 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14937 /chosen/bootargs as "variable=value" pairs.
14939 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14941 * include/grub/misc.h (grub_dprintf): New macro.
14942 (grub_real_dprintf): New prototype.
14943 (grub_strword): Likewise.
14944 (grub_iswordseparator): Likewise.
14945 * kern/misc.c (grub_real_dprintf): New function.
14946 (grub_strword): Likewise.
14947 (grub_iswordseparator): Likewise.
14949 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14951 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14952 (roundup): Remove macro.
14953 (grub_ieee1275_flags): Make static.
14954 (grub_ieee1275_realmode): Remove.
14955 (grub_ieee1275_test_flag): New function.
14956 (grub_ieee1275_set_flag): Likewise.
14957 (find_options): Rename to `grub_ieee1275_find_options'; update
14958 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14959 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14960 (cmain): New prototype.
14961 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14962 `grub_ieee1275_flags' directly.
14963 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14964 machine/biosdisk.h.
14965 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14966 Don't include grub/machine/init.h.
14967 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14968 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14970 (grub_ieee1275_realmode): Likewise.
14971 (grub_ieee1275_flag): New enum.
14972 (grub_ieee1275_test_flag): New prototype.
14973 (grub_ieee1275_set_flag): New prototype.
14974 * include/grub/powerpc/ieee1275/init.h: Remove file.
14975 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14976 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14977 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14978 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14980 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14981 `grub_ieee1275_test_flag'.
14982 (grub_ieee1275_encode_devname): Likewise.
14984 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14986 * include/grub/powerpc/ieee1275/ieee1275.h
14987 (grub_ieee1275_encode_devname): New prototype.
14988 (grub_ieee1275_get_filename): Likewise.
14989 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14991 (grub_set_prefix): Likewise.
14992 (grub_machine_init): Call grub_set_prefix.
14993 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14994 (grub_parse_type): New enum.
14995 (grub_ieee1275_get_devargs): New function.
14996 (grub_ieee1275_get_devname): Likewise.
14997 (grub_ieee1275_parse_args): Likewise.
14998 (grub_ieee1275_get_filename): Likewise.
14999 (grub_ieee1275_encode_devname): Likewise.
15001 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15003 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15004 `grub_loader_unset'.
15006 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15008 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15009 instead of grub_ieee1275_interpret.
15010 (grub_halt_init): New function.
15011 (grub_halt_fini): Likewise.
15012 (GRUB_MOD_INIT): Correct message grammar.
15013 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15014 instead of grub_ieee1275_interpret.
15015 (grub_reboot_init): New function.
15016 (grub_reboot_fini): Likewise.
15017 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15018 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15019 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15020 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15021 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15023 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15025 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15027 (grub_halt): Likewise.
15028 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15029 (cmain): Remove __attribute__((unused)).
15030 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15031 (grub_heap_len): Likewise.
15032 (grub_machine_fini): New function.
15033 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15034 (grub_halt): Likewise.
15035 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15037 * util/powerpc/ieee1275/misc.c: New file.
15039 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15041 * DISTLIST: New file.
15042 * gendistlist.sh: Likewise.
15044 * Makefile.in (COMMON_DISTFILES): Removed.
15045 (BOOT_DISTFILES): Likewise.
15046 (CONF_DISTFILES): Likewise.
15047 (DISK_DISTFILES): Likewise.
15048 (FS_DISTFILES): Likewise.
15049 (INCLUDE_DISTFILES): Likewise.
15050 (KERN_DISTFILES): Likewise.
15051 (LOADER_DISTFILES): Likewise.
15052 (TERM_DISTFILES): Likewise.
15053 (UTIL_DISTFILES): Likewise.
15054 (DISTFILES): Likewise.
15055 (uninstall): Uninstall files in $(pkgdata_DATA).
15056 (DISTLIST): New target.
15057 (distdir): Use the contents of the file DISTLIST to get a list of
15060 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15062 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15063 descriptor. This is ported from GRUB Legacy.
15065 * gencmdlist.sh: Added an extra semicolon to make it work with
15066 old sed versions. Reported by Robert Bihlmeyer
15067 <robbe@orcus.priv.at>.
15069 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
15071 Automatic loading of commands is supported.
15073 * normal/main.c (read_command_list): New function.
15074 (grub_normal_execute): Call read_command_list.
15076 * normal/command.c (grub_register_command): Return zero or CMD.
15077 Allocate CMD->NAME from the heap.
15078 Initialize CMD->MODULE_NAME to zero.
15079 Find the same name as well. If the same command is found and it is
15080 a dummy command, overwrite members. If it is not a dummy command,
15082 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15083 (grub_command_find): If a dummy command is found, load a module
15084 and retry to find a command only once.
15086 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15087 make sure that each command is loaded.
15089 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15091 (struct grub_command): Remove const from the member `name'.
15092 Add a new member `module_name'.
15093 (grub_register_command): Return grub_command_t.
15095 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15096 sure that each command is loaded.
15098 * genmk.rb (PModule::rule): Specify a module name without the
15099 suffix ".mod" to gencmdlist.sh.
15101 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15103 * gencmdlist.sh: New file.
15105 * genmk.rb (PModule::rule): Generate a rule for a command list.
15107 Generate command.lst from $(COMMANDFILES).
15109 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15110 (DATA): Added $(pkgdata_DATA).
15111 (install-local): Install files in $(pkgdata_DATA).
15113 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15115 * term/i386/pc/vga.c (debug_command): Removed.
15116 (GRUB_MOD_INIT): Do not register the command "debug".
15118 From Hollis Blanchard:
15119 * commands/configfile.c: New file.
15120 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15121 commands/configfile.c.
15122 (pkgdata_MODULES): Added configfile.mod.
15123 (configfile_mod_SOURCES): New variable.
15124 (configfile_mod_CFLAGS): Likewise.
15125 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15126 commands/configfile.c.
15127 (pkgdata_MODULES): Added configfile.mod.
15128 (configfile_mod_SOURCES): New variable.
15129 (configfile_mod_CFLAGS): Likewise.
15130 * util/grub-emu.c (main): Call grub_configfile_init and
15131 grub_configfile_fini.
15132 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15134 [GRUB_UTIL] (grub_configfile_fini): Likewise.
15136 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15138 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15141 * commands/help.c (grub_cmd_help): Do not print newlines after
15142 the last command in print_command_help.
15144 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15146 * commands/default.h: New file.
15147 * commands/timeout.h: Likewise.
15148 * normal/context.c: Likewise.
15150 * util/misc.c: Do not include sys/times.h.
15151 Include sys/time.h and grub/machine/time.h.
15152 (grub_get_rtc): Rewritten with gettimeofday.
15154 * util/grub-emu.c (main): Call grub_default_init and
15155 grub_timeout_init before grub_normal_init, and call
15156 grub_timeout_fini and grub_default_fini after grub_main.
15158 * util/console.c (grub_ncurses_checkkey): Return the read
15161 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15164 * normal/main.c (read_config_file): Push MENU. If this fails,
15165 print an error and wait for a user input.
15166 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15167 If a menu is empty or an error occurs, pop MENU.
15168 (grub_normal_execute): Pop and free MENU after grub_menu_run
15171 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15173 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15175 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15177 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15179 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15182 * include/grub/normal.h (struct grub_menu_list): New struct.
15183 (grub_menu_list_t): New type.
15184 (struct grub_context): New struct.
15185 (grub_context_t): New type.
15186 (grub_register_command): Got rid of EXPORT_FUNC.
15187 (grub_unregister_command): Likewise.
15188 (grub_context_get): New prototype.
15189 (grub_context_get_current_menu): Likewise.
15190 (grub_context_push_menu): Likewise.
15191 (grub_context_pop_menu): Likewise.
15192 [GRUB_UTIL] (grub_default_init): Likewise.
15193 [GRUB_UTIL] (grub_default_fini): Likewise.
15194 [GRUB_UTIL] (grub_timeout_init): Likewise.
15195 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15197 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15198 commands/timeout.c and normal/context.c.
15199 (pkgdata_MODULES): Added default.mod and timeout.mod.
15200 (normal_mod_SOURCES): Added normal/context.c.
15201 (default_mod_SOURCES): New variable.
15202 (default_mod_CFLAGS): Likewise.
15203 (timeout_mod_SOURCES): Likewise.
15204 (timeout_mod_CFLAGS): Likewise.
15205 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15207 (pkgdata_MODULES): Added default.mod and timeout.mod.
15208 (normal_mod_SOURCES): Added normal/context.c.
15209 (default_mod_SOURCES): New variable.
15210 (default_mod_CFLAGS): Likewise.
15211 (timeout_mod_SOURCES): Likewise.
15212 (timeout_mod_CFLAGS): Likewise.
15214 * Makefile.in (all-local): Added $(MKFILES).
15216 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15218 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15219 (grub_emu_SOURCES): Likewise.
15220 (pkgdata_MODULES): Add `sun.mod'.
15221 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15222 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15224 (pkgdata_MODULES): Add `sun.mod'.
15225 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15226 * include/grub/partition.h (grub_sun_partition_map_init): New
15228 (grub_sun_partition_map_fini): Likewise.
15229 * partmap/sun.c: New file.
15230 * util/grub-emu.c (main): Initialize and de-initialize the sun
15231 partitionmap support.
15233 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15235 This implements an Emacs-like menu entry editor.
15237 * normal/menu_entry.c: New file.
15239 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15240 characters to ASCII.
15241 (saved_char): New variable.
15242 (grub_ncurses_checkkey): Rewritten completely.
15243 (grub_ncurses_getkey): Likewise.
15244 (grub_ncurses_init): Call raw instead of cbreak.
15246 * normal/menu.c (print_entry): Do not put a space.
15247 (init_page): Renamed to ...
15248 (grub_menu_init_page): ... this. All callers changed.
15249 (edit_menu_entry): Removed.
15250 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15252 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15254 * kern/misc.c (grub_vprintf): Call grub_refresh.
15256 * normal/menu.c (DISP_LEFT): Renamed to ...
15257 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15258 * normal/menu.c (DISP_UP): Renamed to ...
15259 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15260 * normal/menu.c (DISP_RIGHT): Renamed to ...
15261 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15262 * normal/menu.c (DISP_DOWN): Renamed to ...
15263 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15264 * normal/menu.c (DISP_HLINE): Renamed to ...
15265 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15266 * normal/menu.c (DISP_VLINE): Renamed to ...
15267 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15268 * normal/menu.c (DISP_UL): Renamed to ...
15269 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15270 * normal/menu.c (DISP_UR): Renamed to ...
15271 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15272 * normal/menu.c (DISP_LL): Renamed to ...
15273 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15274 * normal/menu.c (DISP_LR): Renamed to ...
15275 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15276 * normal/menu.c (TERM_WIDTH): Renamed to ...
15277 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15278 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15279 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15280 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15281 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15282 * normal/menu.c (TERM_MARGIN): Renamed to ...
15283 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15284 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15285 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15286 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15287 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15288 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15289 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15290 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15291 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15292 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15293 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15294 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15295 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15296 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15297 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15298 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15299 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15300 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15301 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15302 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15303 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15304 All callers changed.
15306 * include/grub/normal.h: New prototype.
15308 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15309 normal/menu_entry.c.
15310 (normal_mod_SOURCES): Likewise.
15311 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15312 (normal_mod_SOURCES): Likewise.
15314 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15316 * include/grub/normal.h (grub_halt_init): New prototype.
15317 (grub_halt_fini): Likewise.
15318 (grub_reboot_init): Likewise.
15319 (grub_reboot_fini): Likewise.
15321 * util/grub-emu.c: Include signal.h.
15322 (main_env): New global variable.
15323 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15325 (grub_machine_fini): New function.
15326 (main): Call grub_halt_init and grub_reboot_init before
15327 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15328 Call setjmp with MAIN_ENV to go back afterwards.
15329 Call grub_machine_fini right before return.
15331 * include/grub/util/misc.h: Include setjmp.h.
15332 (main_env): New prototype.
15334 * include/grub/kernel.h (grub_machine_fini): New prototype.
15335 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15336 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15338 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15339 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15340 * term/i386/pc/console.c (grub_console_fini): Likewise.
15342 * util/i386/pc/misc.c: New file.
15344 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15345 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15346 commands/i386/pc/reboot.c.
15348 2005-02-14 Guillem Jover <guillem@hadrons.org>
15350 * include/grub/dl.h (grub_dl_check_header): New prototype.
15351 (grub_arch_dl_check_header): Change return type to grub_err_t,
15352 remove size parameter and export function. Update all callers.
15353 * kern/dl.c (grub_dl_check_header): New function.
15354 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15355 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15356 are inside the core.
15357 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15358 independent ELF header checks.
15359 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15360 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15361 `grub_dl_check_header' instead of explicit checks. Check for the
15363 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15364 `grub_dl_check_header' instead of explicit checks. Remove arch
15365 specific ELF header checks.
15367 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15370 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15372 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15373 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15375 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15377 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15378 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15379 (part_map_iterate): Clear `grub_errno' and return 0 if
15380 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15381 * partmap/amiga.c (amiga_partition_map_iterate): Return
15382 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15383 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15385 2005-02-01 Guillem Jover <guillem@hadrons.org>
15387 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15390 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15392 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15394 (grub_rescue_cmd_linux): New prototype.
15395 (grub_rescue_cmd_initrd): Likewise.
15396 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15398 (grub_linux_release_mem): Release the memory for the initrd.
15399 (grub_load_linux): Renamed from this...
15400 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15401 Changed `entry' not to be static. Loop over memory regions to
15402 find another one when the default fails.
15403 (grub_rescue_cmd_initrd): New function.
15404 (grub_linux_init): Remove function.
15405 (grub_linux_fini): Likewise.
15406 (GRUB_MOD_INIT): Register `initrd'.
15407 (GRUB_MOD_FINI): Unregister `initrd'.
15408 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15410 (grub_linux_normal_fini): Likewise.
15411 (GRUB_MOD_INIT): Register `initrd'.
15412 (GRUB_MOD_FINI): Unregister `initrd'.
15414 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15416 * commands/help.c: New file.
15417 * normal/arg.c (show_help): Renamed to...
15418 (grub_arg_show_help): ... this.
15419 * commands/i386/pc/halt.c: New file.
15420 * commands/i386/pc/reboot.c: Likewise.
15421 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15422 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15423 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15424 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15426 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15428 (pkgdata_MODULES): Add `help.mod'.
15429 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15430 * grub/i386/pc/init.h (grub_reboot): New prototype.
15431 (grub_halt): Likewise.
15432 * include/grub/normal.h (grub_arg_show_help): New prototype.
15433 (grub_help_init): Likewise.
15434 (grub_help_fini): Likewise.
15435 * util/grub-emu.c (main): Initialize and deinitialize the help
15438 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15440 * normal/command.c (grub_command_init): Fixed the description of
15441 the `set' and `unset' commands.
15443 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15445 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15447 * commands/ieee1275/halt.c: New file.
15448 * commands/ieee1275/reboot.c: Likewise.
15449 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15450 `__attribute__ ((unused))'. Some GCS related fixed.
15451 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15452 (grub_suspend_fini): Likewise.
15453 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15455 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15456 (halt_mod_CFLAGS): New variables.
15457 * include/grub/powerpc/ieee1275/ieee1275.h
15458 (grub_ieee1275_interpret): New prototype.
15460 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15462 * include/grub/misc.h (memmove): New prototype.
15463 (memcpy): Likewise.
15465 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15467 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15468 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15470 2005-01-22 Marco Gerards <metgerards@student.han.nl>
15472 * kern/misc.c (grub_strndup): Function rewritten.
15474 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15476 * normal/menu.c (TERM_WIDTH): Macro redefined.
15477 (TERM_TOP_BORDER_Y): Likewise.
15478 (draw_border): Replaced while-loop by a for-loop. Make the number
15479 of lines consistent with the number of lines displayed in
15480 print_entries. Added a margin below the rectangle.
15481 (print_entry): Make the entry fit in the rectangle.
15482 (print_entries): Display the scroll arrows next to the right
15485 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15487 * fs/minix.c (grub_minix_find_file): Reserve more space for
15488 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15489 `grub_strncpy' to copy `path' into it.
15491 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15493 Add the loopback device, a device via which files can be accessed
15496 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15497 (pkgdata_MODULES): Add loopback.mod.
15498 (loopback_mod_SOURCES): New variable.
15499 (loopback_mod_CFLAGS): Likewise.
15500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15502 (pkgdata_MODULES): Add loopback.mod.
15503 (loopback_mod_SOURCES): New variable.
15504 (loopback_mod_CFLAGS): Likewise.
15505 * disk/loopback.c: new file.
15506 * include/grub/normal.h (grub_loop_init): New prototype.
15507 (grub_loop_fini): New prototype.
15508 * util/grub-emu.c (main): Initialize and de-initialize loopback
15510 * include/grub/disk.h (grub_disk_dev_id): Add
15511 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15513 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15515 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15517 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15518 (suspend_mod_SOURCES): New variable.
15519 (suspend_mod_CFLAGS): Likewise.
15520 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15522 * commands/ieee1275/suspend.c: New file.
15524 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15526 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15527 ((unused))' to `__attribute__ ((used))'.
15528 (GRUB_MOD_FINI): Likewise.
15529 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15530 * genmk.rb (PModule): Assign space to common symbols when linking
15533 2005-01-20 Marco Gerards <metgerards@student.han.nl>
15535 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15536 `unsigned' arguments to `grub_size_t'.
15537 (grub_malloc): Likewise.
15538 (grub_realloc): Likewise.
15539 (grub_memalign): Likewise.
15540 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15541 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15542 * util/misc.c (grub_malloc): Likewise.
15543 (grub_realloc): Likewise.
15544 * kern/mm.c (get_header_from_pointer): Change the casts to
15545 `unsigned' into a cast to `grub_size_t'.
15547 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15548 point to `currnode' when `currnode' is changed.
15550 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15551 Schottelius <nico-linux@schottelius.org>.
15553 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15555 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15556 (note_path): Remove variable.
15557 (GRUB_IEEE1275_NOTE_NAME): New macro.
15558 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15559 (grub_ieee1275_note_hdr): New structure.
15560 (grub_ieee1275_note_desc): Likewise.
15561 (grub_ieee1275_note): Likewise.
15562 (load_note): Remove `dir' argument. All callers updated. Remove
15563 `note_img' and `path'. Do not load a file from `note_path'.
15564 Initialize a struct grub_ieee1275_note and write that to `out'.
15565 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15567 2005-01-05 Marco Gerards <metgerards@student.han.nl>
15569 * util/misc.c (grub_util_read_image): Revert last change. It
15570 called `grub_util_read_at', which seeks from the beginning of the
15573 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15575 * TODO: Add note about endianness in grub-mkimage.
15576 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15578 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15579 (grub_mkimage_SOURCES): New target.
15580 * include/grub/kernel.h (grub_start_addr): Remove variable.
15581 (grub_end_addr): Likewise.
15582 (grub_total_module_size): Likewise.
15583 (grub_kernel_image_size): Likewise.
15584 (GRUB_MODULE_MAGIC): New constant.
15585 (grub_module_info): New structure.
15586 (grub_arch_modules_addr): New prototype.
15587 (grub_get_end_addr): Remove prototype.
15588 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15589 * include/grub/powerpc/ieee1275/kernel.h: New file.
15590 * include/grub/util/misc.h (grub_util_get_fp_size): New
15592 (grub_util_read_at): Likewise.
15593 (grub_util_write_image_at): Likewise.
15594 * kern/main.c (grub_get_end_addr): Remove function.
15595 (grub_load_modules): Call grub_arch_modules_addr instead of using
15596 grub_end_addr. Look for a grub_module_info struct in memory. Use
15597 the grub_module_info fields instead of calling grub_get_end_addr
15598 as loop conditions. Move grub_add_unused_region code here.
15599 (grub_add_unused_region): Remove function.
15600 * kern/i386/pc/init.c: Include grub/cache.h.
15601 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15602 one call to add_mem_region.
15603 (grub_arch_modules_addr): New function.
15604 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15605 (grub_total_module_size): Likewise.
15606 Include grub/machine/kernel.h.
15607 (grub_arch_modules_addr): New function.
15608 * util/grub-emu.c (grub_end_addr): Remove variable.
15609 (grub_total_module_size): Likewise.
15610 (grub_arch_modules_addr): New function.
15611 * util/misc.c: Include unistd.h.
15612 (grub_util_get_fp_size): New function.
15613 (grub_util_read_at): Likewise.
15614 (grub_util_write_image_at): Likewise.
15615 (grub_util_read_image): Call grub_util_read_at.
15616 (grub_util_write_image): Call grub_util_write_image_at.
15617 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15618 additional memory in kernel_img for a struct grub_module_info.
15619 Fill in that grub_module_info.
15620 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15622 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15624 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15626 * include/grub/powerpc/ieee1275/ieee1275.h
15627 (grub_ieee1275_milliseconds): New prototype.
15628 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15630 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15631 grub_ieee1275_milliseconds.
15633 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15635 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15637 (find_options): New function.
15638 (cmain): Call find_options.
15639 * include/grub/powerpc/ieee1275/ieee1275.h
15640 (grub_ieee1275_realmode): New extern variable.
15641 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15642 grub_map if grub_ieee1275_realmode is false.
15644 2004-12-29 Marco Gerards <metgerards@student.han.nl>
15646 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15647 lines are inserted and make it work like readline. Reported by
15648 Vincent Pelletier <subdino2004@yahoo.fr>.
15650 2004-12-28 Marco Gerards <metgerards@student.han.nl>
15652 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15654 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15655 `kern/powerpc/cache.S'.
15657 2004-12-27 Marco Gerards <metgerards@student.han.nl>
15659 * genmk.rb: Handle the `Program' class in the main loop. Written
15660 by Johan Rydberg <jrydberg@gnu.org>.
15661 (Program): New class.
15662 (programs): New variable.
15663 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15664 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15665 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15666 (help_arch): Function removed.
15667 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15668 `powerpc/libgcc.h' and `loader.h'.
15669 (pkgdata_PROGRAMS): New variable.
15670 (sbin_UTILITIES): Variable removed.
15671 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15672 (grubof_SOURCES): Variable re-defined so it only includes the
15673 core functionality.
15674 (grubof_CFLAGS): Remove `-DGRUBOF'.
15675 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15676 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15677 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15678 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15679 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15680 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15681 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15682 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15683 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15684 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15685 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15686 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15687 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15688 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15689 (pc_mod_CFLAGS): New variables.
15690 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15691 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15692 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15693 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15695 * include/grub/i386/pc/init.h (grub_os_area_addr)
15696 (rub_os_area_size): ... to here.
15697 * include/grub/powerpc/ieee1275/ieee1275.h
15698 (grub_ieee1275_entry_fn): Export symbol.
15699 * include/grub/powerpc/ieee1275/init.h: New file.
15700 * include/grub/powerpc/libgcc.h: Likewise.
15701 * include/grub/cache.h: Likewise.
15702 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15703 <hollis@penguinppc.org>.
15704 * kern/dl.c: Include <grub/cache.h>.
15705 (grub_dl_flush_cache): New function.
15706 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15708 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15709 (grub_console_init): Removed prototypes.
15710 (grub_machine_init): Don't initialize the modules anymore.
15711 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15713 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15714 Macro undef removed.
15715 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15716 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15717 relocation `R_PPC_REL32'. Return an error when the relocation is
15719 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15720 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15721 * util/misc.c (grub_arch_sync_caches): Likewise.
15723 2004-12-19 Marco Gerards <metgerards@student.han.nl>
15725 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15726 `symlist.c', add `grubof_symlist.c'.
15727 (symlist.c): Variable removed.
15728 (grubof_HEADERS): Variable added.
15729 (grubof_symlist.c): New target.
15730 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15731 `kernel_img_HEADERS'.
15732 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15733 * kern/powerpc/dl.c: New file.
15734 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15736 (grub_arch_dl_relocate_symbols): Likewise.
15737 (grub_register_exported_symbols): Likewise.
15739 2004-12-13 Marco Gerards <metgerards@student.han.nl>
15741 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15742 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15743 to fail instead. Reported by Vincent Pelletier
15744 <subdino2004@yahoo.fr>.
15746 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15747 it is not allocated. Reported by Vincent Pelletier
15748 <subdino2004@yahoo.fr>.
15750 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15751 output so the output looks better.
15753 2004-12-04 Marco Gerards <metgerards@student.han.nl>
15755 Modulize the partition map support and add support for the amiga
15758 * commands/ls.c: Include <grub/partition.h> instead of
15759 <grub/machine/partition.h>.
15760 * kern/disk.c: Likewise.
15761 * kern/rescue.c: Likewise.
15762 * loader/i386/pc/chainloader.c: Likewise.
15763 * normal/cmdline.c: Likewise.
15764 * kern/powerpc/ieee1275/init.c: Likewise.
15765 (grub_machine_init): Call `grub_pc_partition_map_init',
15766 `grub_amiga_partition_map_init' and
15767 `grub_apple_partition_map_init'.
15768 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15769 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15770 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15771 `partition.h' and `pc_partition.h'.
15772 (grub_setup_SOURCES): Remove
15773 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15774 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15775 (grub_emu_SOURCES): Likewise.
15776 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15777 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15778 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15779 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15780 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15781 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15782 (grubof_SOURCES): Likewise.
15783 * disk/i386/pc/partition.c: File removed.
15784 * disk/powerpc/ieee1275/partition.c: Likewise.
15785 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15786 * include/grub/i386/pc/partition.h: Likewise.
15787 * kern/partition.c: New file.
15788 * partmap/amiga.c: Likewise.
15789 * partmap/apple.c: Likewise.
15790 * partmap/pc.c: Likewise.
15791 * include/grub/partition.h: Likewise..
15792 * include/grub/pc_partition.h: Likewise.
15793 * util/grub-emu.c: Include <grub/partition.h> instead of
15794 <grub/machine/partition.h>.
15795 (main): Call `grub_pc_partition_map_init',
15796 `grub_amiga_partition_map_init' and
15797 `grub_apple_partition_map_init' and deinitialize afterwards.
15798 * util/i386/pc/biosdisk.c: Include `#include
15799 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15800 `<grub/machine/partition.h>'.
15801 * util/i386/pc/grub-setup.c: Likewise.
15802 * util/i386/pc/biosdisk.c: Likewise.
15803 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15804 partition information in case of a PC partition.
15805 * util/i386/pc/grub-setup.c: Include `#include
15806 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15807 `<grub/machine/partition.h>'.
15808 (setup): Only access the PC specific partition information in case
15811 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15813 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15814 (grub_longjmp): Likewise.
15815 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15817 * normal/powerpc/setjmp.S: New file.
15818 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15819 `normal/powerpc/setjmp.S'.
15820 (grubof_CFLAGS): Add `-DGRUBOF'.
15821 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15822 [GRUB_UTIL && !GRUBOF].
15824 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15826 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15827 property named `name'. Correctly handle the error returned by
15828 `grub_ieee1275_finddevice' if a device can not be opened.
15830 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15832 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15833 `actual' for negativity.
15834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15837 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15839 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15840 (PAGE_OFFSET): New macro.
15841 (CRTC_ADDR_PORT): Likewise.
15842 (CRTC_DATA_PORT): Likewise.
15843 (START_ADDR_HIGH_REGISTER): Likewise.
15844 (START_ADDR_LOW_REGISTER): Likewise.
15845 (GRAPHICS_ADDR_PORT): Likewise.
15846 (GRAPHICS_DATA_PORT): Likewise.
15847 (READ_MAP_REGISTER): Likewise.
15848 (INPUT_STATUS1_REGISTER): Likewise.
15849 (INPUT_STATUS1_VERTR_BIT): Likewise.
15850 (page): New variable.
15851 (wait_vretrace): New function.
15852 (set_read_map): Likewise.
15853 (set_start_address): Likewise.
15854 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15856 (check_vga_mem): Take the page into account.
15857 (write_char): Likewise.
15858 (write_cursor): Likewise.
15859 (scroll_up): Likewise. Copy the page to the page that is not
15860 shown and switch between both pages.
15861 (grub_vga_putchar): Fix off by one error.
15862 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15865 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15867 Add support for iso9660 (including rockridge).
15869 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15870 (iso9660_mod_SOURCES): New variable.
15871 (iso9660_mod_CFLAGS): Likewise.
15872 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15873 * include/grub/fs.h (grub_iso9660_init): New prototype.
15874 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15875 * fs/iso9660.c: New file.
15877 * include/grub/misc.h (grub_strncat): New prototype.
15878 * kern/misc.c (grub_strncat): New function.
15880 * fs/hfs.c (grub_hfs_mount): Translate the error
15881 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15882 * fs/jfs.c (grub_jfs_mount): Likewise.
15883 * fs/ufs.c (grub_ufs_mount): Likewise.
15885 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15887 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15888 which initialized BAT registers.
15889 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15890 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15892 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15893 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15895 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15896 (grub_mapclaim): Likewise.
15897 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15898 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15901 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15903 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15904 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15905 -ffreestanding and -msoft-float.
15907 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15909 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15910 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15911 set in grub_ieee1275_flags.
15913 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15915 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15917 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15918 grub_console_init first.
15919 Change the memory range used for grub_ieee1275_claim and
15920 grub_mm_init_region.
15921 Print an error message if the claim fails.
15922 Include <grub/misc.h>.
15924 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15926 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15927 Call grub_children_iterate for device nodes of type `scsi',
15929 (grub_ofdisk_open): Remove manual device alias resolution.
15930 Fix memory leak when device cannot be opened.
15931 * include/grub/powerpc/ieee1275/ieee1275.h
15932 (grub_children_iterate): New prototype.
15933 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15935 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15936 Return -1 if args.size was -1.
15938 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15940 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15941 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15942 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15943 Open Firmware's memory for it; claim memory from _start to _end.
15944 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15945 (_end): New extern.
15946 (_start): Zero BSS from __bss_start to _end.
15947 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15949 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15951 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15953 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15954 -1 if args.base was -1.
15956 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15958 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15959 escape sequence instead of a literal ^L. Also call
15960 grub_ofconsole_gotoxy.
15962 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15964 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15965 void * arguments to grub_addr_t. All callers updated. Also make
15966 the `result' argument optional.
15967 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15968 All callers updated.
15970 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15972 * commands/ls.c (grub_ls_list_files): Use the string following the
15973 initial ')', if present, as the filesystem path.
15974 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15976 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15978 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15980 Make the source code of the menu interface more readable.
15982 * normal/menu.c: Include grub/mm.h.
15983 (TERM_WIDTH): New macro.
15984 (TERM_HEIGHT): Likewise.
15985 (TERM_INFO_HEIGHT): Likewise.
15986 (TERM_MARGIN): Likewise.
15987 (TERM_SCROLL_WIDTH): Likewise.
15988 (TERM_TOP_BORDER_Y): Likewise.
15989 (TERM_LEFT_BORDER_X): Likewise.
15990 (TERM_BORDER_WIDTH): Likewise.
15991 (TERM_MESSAGE_HEIGHT): Likewise.
15992 (TERM_BORDER_HEIGHT): Likewise.
15993 (TERM_NUM_ENTRIES): Likewise.
15994 (TERM_FIRST_ENTRY_Y): Likewise.
15995 (TERM_ENTRY_WIDTH): Likewise.
15996 (TERM_CURSOR_X): Likewise.
15997 (draw_border): Use macros instead of magic numbers.
15998 (print_entry): Likewise.
15999 (print_entries): Likewise.
16000 (run_menu): Likewise. Also, handle the key 'e'.
16001 (run_menu_entry): Ignore empty command lines.
16002 (print_message): Added a new argument EDIT. If EDIT is true,
16003 print a different message.
16004 (init_page): Likewise.
16005 (edit_menu_entry): New function. Not implemented yet.
16007 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16009 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16010 can be loaded from normal mode.
16012 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16014 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16015 (multiboot_mod_CFLAGS): New variables.
16016 * loader/i386/pc/linux_normal.c: New file.
16017 * loader/i386/pc/multiboot_normal.c: Likewise.
16019 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16020 attribute `unused'.
16022 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16023 `fdiro' to read the mode information from instead of `diro'.
16025 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16026 looking up a symlink.
16028 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16030 * normal/command.c (grub_command_execute): Don't parse the
16031 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16032 flags of the command.
16034 * normal/menu.c (grub_menu_run): Fix typo.
16036 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16038 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16040 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16041 `y + 1' instead of `y - 1'.
16043 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16045 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16047 From Hollis Blanchard <hollis@penguinppc.org>:
16048 * kern/misc.c (memmove): New alias for grub_memmove.
16049 (memcmp): New alias for grub_memcmp.
16050 (memset): New alias for grub_memset.
16051 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16052 Change "int handle" to "grub_ieee1275_phandle_t handle".
16053 * include/grub/powerpc/ieee1275/ieee1275.h
16054 (grub_ieee1275_get_property): Likewise.
16056 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16058 Added normal mode command `chainloader' as module chain.mod, which
16059 depends on normal.mod and _chain.mod.
16061 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16062 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16063 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16065 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16066 but arguments parsing moved to ...
16067 (grub_chainloader_cmd): ... here. New function.
16068 * include/grub/i386/pc/chainloader.h: New file.
16069 * loader/i386/pc/chainloader_normal.c: Likewise.
16071 2004-09-11 Marco Gerards <metgerards@student.han.nl>
16073 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16074 (grub_mkimage_LDFLAGS): Likewise.
16075 (grub_emu_SOURCES): Likewise.
16076 (kernel_img_HEADERS): Added fshelp.h.
16077 * fs/ext2.c: Include <grub/fshelp.h>.
16078 (FILETYPE_REG): New macro.
16079 (FILETYPE_INO_REG): Likewise.
16080 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16082 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16084 (grub_fshelp_node): New struct.
16085 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16087 (grub_ext2_get_file_block): Removed function.
16088 (grub_ext2_read_block): New function.
16089 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16090 This function was written.
16091 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16092 (grub_ext2_find_file): Removed function.
16093 (grub_ext2_read_symlink): New function.
16094 (grub_ext2_iterate_dir): Likewise.
16095 (grub_ext2_open): Rewritten.
16096 (grub_ext2_dir): Rewritten.
16097 * include/grub/fshelp.h: New file.
16098 * fs/fshelp.c: Likewise.
16100 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16102 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16103 (print_message): Add a missing newline.
16104 (run_menu): Added timeout support.
16105 (run_menu_entry): New local function.
16106 (grub_menu_run): Added support for booting.
16108 * kern/loader.c (grub_loader_is_loaded): New function.
16110 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16111 (grub_get_rtc): Exported.
16113 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16114 (grub_get_rtc): Exported.
16116 * include/grub/normal.h (struct grub_command_list): Remove
16117 constant from the member `command'.
16119 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16121 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16123 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16125 2004-08-28 Marco Gerards <metgerards@student.han.nl>
16127 Add support for the JFS filesystem.
16129 * fs/jfs.c: New file.
16130 * include/grub/fs.h (grub_jfs_init): New prototype.
16131 (grub_jfs_fini): New prototype.
16132 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16133 (grub_emu_SOURCES): Likewise.
16134 (pkgdata_MODULES): Add jfs.mod.
16135 (jfs_mod_SOURCES): New variable.
16136 (jfs_mod_CFLAGS): Likewise.
16137 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16138 (grubof_SOURCES): Likewise.
16139 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16141 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16142 endian to the host endian.
16143 (grub_fat_utf16_to_utf8): Move function from there...
16144 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
16145 the endianness of the source string anymore.
16146 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16148 2004-08-24 Marco Gerards <metgerards@student.han.nl>
16150 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16151 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16152 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16153 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16155 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16156 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16157 for `node_found' and `it_dir'.
16158 (grub_hfs_dir): Add prototype for `dir_hook'.
16160 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16161 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16162 and `indir32' to silence a gcc warning.
16164 * include/grub/fs.h (grub_hfs_init): New prototype.
16165 (grub_hfs_fini): Likewise.
16168 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16170 Each disk device has its own id now. This is useful to make use
16171 of multiple disk devices.
16173 * include/grub/disk.h (grub_disk_dev_id): New enum.
16174 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16175 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16177 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16178 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16180 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16181 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16183 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16184 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16186 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16187 "id" which is used by the cache manager.
16189 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16192 2004-08-18 Marco Gerards <metgerards@student.han.nl>
16194 * fs/hfs.c: New file.
16195 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16196 (grub_emu_SOURCES): Likewise.
16197 (pkgdata_MODULES): Add hfs.mod.
16198 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16199 (grubof_SOURCES): Likewise.
16200 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16202 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16203 * kern/misc.c (grub_strncasecmp): Add function.
16205 2004-08-14 Marco Gerards <metgerards@student.han.nl>
16207 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16210 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16211 (grub_ext2_dir): In case the directory entry type is unknown, read
16214 2004-08-02 Peter Bruin <pjbruin@dds.nl>
16216 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16217 grub_load_linux instead of grub_rescue_cmd_linux as second
16218 argument of grub_rescue_register_command.
16220 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16222 2004-07-27 Marco Gerards <metgerards@student.han.nl>
16224 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16226 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16227 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16228 `loader/powerpc/ieee1275/linux.c',
16229 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16230 * include/grub/powerpc/ieee1275/ieee1275.h
16231 (grub_ieee1275_release): New prototype.
16232 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16233 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16234 normal, boot, linux and linux_normal.
16235 * loader/powerpc/ieee1275/linux.c: New file.
16236 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16238 2004-07-12 Marco Gerards <metgerards@student.han.nl>
16240 * normal/arg.c (grub_arg_parse): Correct error handling after
16241 reallocating the argumentlist (check if `argl' is not null instead
16242 of checking if `args' is not null).
16243 * kern/mm.c (grub_realloc): Return the same pointer when using the
16244 same region, instead of returning the header address.
16246 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16248 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16249 one block instead of two when looking for the initial partition.
16250 (grub_partition_probe): Initialize the local variable `p' with 0.
16251 Use base 10 for the grub_strtoul call.
16252 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16253 need for one local variable.
16254 (grub_strtoul): Don't add the new value to `num', instead of that
16257 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16259 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16260 (pxeboot_img_SOURCES): New variable.
16261 (pxeboot_img_ASFLAGS): Likewise.
16262 (pxeboot_img_LDFLAGS): Likewise.
16263 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16264 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16265 <lode_leroy@hotmail.com>.
16267 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16269 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16270 there was no input.
16272 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16274 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16275 the history buffer logic.
16277 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16279 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16280 (FILETYPE_INO_SYMLINK): New macros.
16281 (grub_ext2_find_file): Check if the node is a directory using the
16282 inode stat information instead of using the filetype in the
16283 dirent. Exclude the first character of an absolute symlink.
16284 (grub_ext2_dir): Mask out the filetype part of the mode member of
16287 2004-05-24 Marco Gerards <metgerards@student.han.nl>
16289 Add support for UFS version 1 and 2. Add support for the minix
16290 filesystem version 1 and 2, both the variants with 14 and 30 long
16293 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16295 (grub_emu_SOURCES): Likewise.
16296 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16297 (ufs_mod_SOURCES): New variable.
16298 (ufs_mod_CFLAGS): Likewise.
16299 (minix_mod_SOURCES): Likewise.
16300 (minix_mod_CFLAGS): Likewise.
16301 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16303 (grubof_SOURCES): Likewise.
16304 * fs/ufs.c: New file.
16305 * fs/minix.c: New file.
16306 * include/grub/fs.h (grub_ufs_init): New prototype.
16307 (grub_ufs_fini): Likewise.
16308 (grub_minix_init): Likewise.
16309 (grub_minix_fini): Likewise.
16310 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16313 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16315 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16316 commands/ls.c, commands/terminal.c, commands/boot.c,
16317 commands/cmp.c and commands/cat.c.
16318 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16320 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16323 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16325 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16326 and grub_, respectively. Because the conversion is trivial and
16327 mechanical, I omit the details here. Please refer to the CVS
16328 if you need more information.
16330 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16332 * include/pupa: Renamed to ...
16333 * include/grub: ... this.
16334 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16335 * util/i386/pc/grub-mkimage.c: ... this.
16336 * util/i386/pc/pupa-setup.c: Renamed to ...
16337 * util/i386/pc/grub-setup.c: ... this.
16338 * util/pupa-emu.c: Renamed to ...
16339 * util/grub-emu.c: ... this.
16341 2004-03-29 Marco Gerards <metgerards@student.han.nl>
16343 Add support for the newworld apple macintosh (PPC). This has been
16344 tested on the powerbook 2000 only. It only adds support for
16345 generic ieee1275 functions, console and disk support. This should
16346 be easy to port to other architectures with support for Open
16349 * configure.ac: Accept the powerpc as host_cpu. In the case of
16350 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16351 specific tests are only executed while building for the i386.
16352 Inverse test for crosscompile.
16353 * genmk.rb (Utility): Allow assembler files.
16354 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16355 * conf/powerpc-ieee1275.rmk: New file.
16356 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16357 * disk/powerpc/ieee1275/partition.c: Likewise.
16358 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16359 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16360 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16361 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16362 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16363 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16364 * include/pupa/powerpc/ieee1275/loader.h
16365 * include/pupa/powerpc/setjmp.h: Likewise.
16366 * include/pupa/powerpc/types.h: Likewise.
16367 * kern/powerpc/ieee1275/init.c: Likewise.
16368 * kern/powerpc/ieee1275/openfw.c: Likewise.
16369 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16371 These files were written by Johan Rydberg
16372 (jrydberg@night.trouble.net) and I only modified them slightly.
16374 * boot/powerpc/ieee1275/cmain.c: New file.
16375 * boot/powerpc/ieee1275/crt0.S: Likewise.
16376 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16377 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16379 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16381 * Makefile.in: Update copyright.
16382 * genmodsrc.sh: Likewise.
16383 * gensymlist.sh: Likewise.
16384 * term/i386/pc/vga.c: Indent correctly.
16386 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16387 bugreporting address.
16388 * util/i386/pc/pupa-setup.c (usage): Likewise,
16389 (main): Call pupa_ext2_init and pupa_ext2_fini.
16391 * fs/fat.c (log2): Renamed to ...
16392 (fat_log2): ... this.
16393 All callers changed.
16394 * kern/misc.c (memcpy): Alias to pupa_memmove.
16395 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16397 * util/console.c (pupa_ncurses_fini): Return 0.
16399 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16400 Move fail label here.
16401 [__GNU__]: Don't warn when using stat.
16402 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16403 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16404 long int. Use strtol instead of strtoul.
16406 2004-03-14 Marco Gerards <metgerards@student.han.nl>
16408 * commands/boot.c: New file.
16409 * commands/cat.c: Likewise.
16410 * commands/cmp.c: Likewise.
16411 * commands/ls.c: Likewise.
16412 * commands/terminal.c: Likewise.
16413 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16414 (pupa_register_command): Changed interface to match the new
16416 (pupa_command_execute): Changed (almost rewritten) so it uses
16417 pupa_split_command. Added support for setting variables using the
16419 (rescue_command): Changed to work with the new argument parser.
16420 (terminal_command): Moved from here to commands/terminal.c.
16421 (set_command): New function.
16422 (unset_command): New function.
16423 (insmod_command): New function.
16424 (rmmod_command): New function.
16425 (lsmod_command): New function.
16426 (pupa_command_init): Don't initialize the command terminal
16427 anymore. Initialize the commands set, unset, insmod, rmmod and
16429 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16430 (kernel_img_HEADERS): Add arg.h and env.h.
16431 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16432 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16433 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16435 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16437 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16438 (boot_mod_SOURCES): New variable.
16439 (terminal_mod_SOURCES): Likewise.
16440 (ls_mod_SOURCES): Likewise.
16441 (cmp_mod_SOURCES): Likewise.
16442 (cat_mod_SOURCES): Likewise.
16444 * normal/arg.c: New file.
16445 * kern/env.c: Likewise.
16446 * include/pupa/arg.h: Likewise.
16447 * include/pupa/env.h: Likewise.
16448 * font/manager.c (font_command): Changed to match argument parsing
16450 (PUPA_MOD_INIT): Likewise.
16451 * hello/hello.c (pupa_cmd_hello): Likewise.
16452 (PUPA_MOD_INIT): Likewise.
16453 * include/pupa/disk.h: Include <pupa/device.h>.
16454 (pupa_print_partinfo): New prototype.
16455 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16456 (pupa_dl_get_prefix): Likewise.
16457 * include/pupa/misc.h: Include <pupa/err.h>.
16458 (pupa_isgraph): New prototype.
16459 (pupa_isdigit): Likewise.
16460 (pupa_split_cmdline): Likewise.
16461 * include/pupa/normal.h: Include <pupa/arg.h>.
16462 (pupa_command): Changed the prototype of the member `func' to
16463 match the argument parsing interface. Added member `options'.
16464 (pupa_register_command): Updated to match function.
16465 (pupa_arg_parse): New prototype.
16466 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16467 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16468 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16469 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16470 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16471 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16472 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16473 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16474 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16475 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16476 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16477 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16478 * kern/disk.c: Include <pupa/file.h>.
16479 (pupa_print_partinfo): New function.
16480 * kern/dl.c: Include <pupa/env.h>.
16481 (pupa_dl_dir): Variable removed.
16482 (pupa_dl_load): Use the environment variable `prefix' instead of
16483 the variable pupa_dl_dir.
16484 (pupa_dl_set_prefix): Function removed.
16485 (pupa_dl_get_prefix): Likewise.
16486 * kern/i386/pc/init.c: Include <pupa/env.h>.
16487 (pupa_machine_init): Use the environment variable `prefix' instead of
16488 using pupa_dl_set_prefix to set the prefix.
16489 * kern/main.c: Include <pupa/env.h>.
16490 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16491 using pupa_dl_get_prefix to get the prefix.
16492 * kern/misc.c: Include <pupa/env.h>.
16493 (pupa_isdigit): New function.
16494 (pupa_isgraph): Likewise.
16495 (pupa_ftoa): Likewise.
16496 (pupa_vsprintf): Added support for printing values of the type
16497 `double'. Make it possible to format variable output when using
16498 formatting like `%1.2%f'.
16499 (pupa_split_cmdline): New function.
16500 * kern/rescue.c: Include <pupa/env.h>.
16501 (next_word): Removed function.
16502 (pupa_rescue_cmd_prefix): Likewise.
16503 (pupa_rescue_cmd_set): New function.
16504 (pupa_rescue_cmd_unset): New function.
16505 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16506 split the command line instead of splitting it here. Added
16507 support for setting variables using the syntax `foo=bar'. Don't
16508 initialize the prefix command anymore. Initialized the set and
16510 * normal/cmdline.c: Include <pupa/env.h>.
16511 (pupa_tab_complete): Added prototypes for print_simple_completion,
16512 print_partition_completion, add_completion, iterate_commands,
16513 iterate_dev, iterate_part and iterate_dir. Moved code to print
16514 partition information from here to kern/disk.c.
16515 (pupa_cmdline_run): Don't check if the function exists anymore.
16516 * normal/main.c: Include <pupa/env.h>.
16517 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16518 instead of using pupa_dl_get_prefix to get the prefix.
16519 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16520 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16522 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16523 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16524 ((unused))' to silence a gcc warning.
16525 (pupa_vga_setcolor): Likewise.
16526 (debug_command): Changed to match argument parsing
16528 * util/pupa-emu.c: Include <pupa/env.h>.
16529 (options): Added 0's for unused fields to silence a gcc warning.
16531 (main): Use the environment variable `prefix' instead of using
16532 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16533 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16536 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16537 * util/misc.c: Include <malloc.h>.
16538 (pupa_malloc): Rewritten so errors are correctly reported.
16539 (pupa_realloc): Likewise.
16540 (pupa_memalign): Likewise.
16541 (pupa_mm_init_region): Declare unused variables with
16542 `__attribute__ ((unused))' to silence a gcc warning.
16543 * normal/i386/setjmp.S: Remove tab at the end of the file to
16544 silence a gcc warning.
16545 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16546 variables with `__attribute__ ((unused))' to silence a gcc
16548 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16549 local variable i unsigned to silence a gcc warning.
16551 * kern/term.c: Include <pupa/misc.h>.
16552 (pupa_more_lines): New variable.
16553 (pupa_more): Likewise.
16554 (pupa_putcode): When the pager is active pause at the end of every
16556 (pupa_set_more): New function.
16557 * include/pupa/term.h (pupa_set_more): New prototype.
16560 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16562 Now this project is GRUB 2 rather than PUPA. The location of
16563 the CVS repository was moved to GRUB's.
16565 * configure.ac: Use bug-grub as the reporting address.
16566 Use GRUB instead of PUPA.
16567 Change the version number to 1.90.
16569 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16571 * genkernsyms.sh: Updated copyright information.
16572 * genmk.rb: Likewise.
16573 * genmodsrc.sh: Likewise.
16574 * gensymlist.sh: Likewise.
16575 * boot/i386/pc/boot.S: Likewise.
16576 * boot/i386/pc/diskboot.S: Likewise.
16577 * disk/i386/pc/biosdisk.c: Likewise.
16578 * disk/i386/pc/partition.c: Likewise.
16579 * font/manager.c: Likewise.
16580 * fs/ext2.c: Likewise.
16581 * fs/fat.c: Likewise.
16582 * include/pupa/boot.h: Likewise.
16583 * include/pupa/device.h: Likewise.
16584 * include/pupa/disk.h: Likewise.
16585 * include/pupa/dl.h: Likewise.
16586 * include/pupa/elf.h: Likewise.
16587 * include/pupa/err.h: Likewise.
16588 * include/pupa/file.h: Likewise.
16589 * include/pupa/font.h: Likewise.
16590 * include/pupa/fs.h: Likewise.
16591 * include/pupa/kernel.h: Likewise.
16592 * include/pupa/loader.h: Likewise.
16593 * include/pupa/misc.h: Likewise.
16594 * include/pupa/mm.h: Likewise.
16595 * include/pupa/net.h: Likewise.
16596 * include/pupa/normal.h: Likewise.
16597 * include/pupa/rescue.h: Likewise.
16598 * include/pupa/setjmp.h: Likewise.
16599 * include/pupa/symbol.h: Likewise.
16600 * include/pupa/term.h: Likewise.
16601 * include/pupa/types.h: Likewise.
16602 * include/pupa/i386/setjmp.h: Likewise.
16603 * include/pupa/i386/types.h: Likewise.
16604 * include/pupa/i386/pc/biosdisk.h: Likewise.
16605 * include/pupa/i386/pc/boot.h: Likewise.
16606 * include/pupa/i386/pc/console.h: Likewise.
16607 * include/pupa/i386/pc/init.h: Likewise.
16608 * include/pupa/i386/pc/kernel.h: Likewise.
16609 * include/pupa/i386/pc/linux.h: Likewise.
16610 * include/pupa/i386/pc/loader.h: Likewise.
16611 * include/pupa/i386/pc/memory.h: Likewise.
16612 * include/pupa/i386/pc/multiboot.h: Likewise.
16613 * include/pupa/i386/pc/partition.h: Likewise.
16614 * include/pupa/i386/pc/time.h: Likewise.
16615 * include/pupa/i386/pc/vga.h: Likewise.
16616 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16617 * include/pupa/util/getroot.h: Likewise.
16618 * include/pupa/util/misc.h: Likewise.
16619 * include/pupa/util/resolve.h: Likewise.
16620 * kern/device.c: Likewise.
16621 * kern/disk.c: Likewise.
16622 * kern/dl.c: Likewise.
16623 * kern/err.c: Likewise.
16624 * kern/file.c: Likewise.
16625 * kern/fs.c: Likewise.
16626 * kern/loader.c: Likewise.
16627 * kern/main.c: Likewise.
16628 * kern/misc.c: Likewise.
16629 * kern/mm.c: Likewise.
16630 * kern/rescue.c: Likewise.
16631 * kern/term.c: Likewise.
16632 * kern/i386/dl.c: Likewise.
16633 * kern/i386/pc/init.c: Likewise.
16634 * kern/i386/pc/lzo1x.S: Likewise.
16635 * kern/i386/pc/startup.S: Likewise.
16636 * loader/i386/pc/chainloader.c: Likewise.
16637 * loader/i386/pc/linux.c: Likewise.
16638 * loader/i386/pc/multiboot.c: Likewise.
16639 * normal/cmdline.c: Likewise.
16640 * normal/command.c: Likewise.
16641 * normal/main.c: Likewise.
16642 * normal/menu.c: Likewise.
16643 * normal/i386/setjmp.S: Likewise.
16644 * term/i386/pc/console.c: Likewise.
16645 * term/i386/pc/vga.c: Likewise.
16646 * util/console.c: Likewise.
16647 * util/genmoddep.c: Likewise.
16648 * util/misc.c: Likewise.
16649 * util/pupa-emu.c: Likewise.
16650 * util/resolve.c: Likewise.
16651 * util/unifont2pff.rb: Likewise.
16652 * util/i386/pc/biosdisk.c: Likewise.
16653 * util/i386/pc/getroot.c: Likewise.
16654 * util/i386/pc/pupa-mkimage.c: Likewise.
16655 * util/i386/pc/pupa-setup.c: Likewise.
16657 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16659 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16660 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16661 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16662 reading and reset it after reading.
16663 (pupa_ext2_close): Return PUPA_ERR_NONE.
16665 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16667 (struct linux_kernel_header): Add kernel_version and
16669 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16670 pupa_file_read succeeds.
16671 (pupa_rescue_cmd_initrd): Implement.
16673 2003-12-03 Marco Gerards <metgerards@student.han.nl>
16675 * fs/ext2.c (pupa_ext2_label): New function.
16676 (pupa_ext2_fs): Added label.
16677 * fs/fat.c (pupa_fat_label): New function.
16678 (pupa_fat_fs): Added label.
16679 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16681 * kern/misc.c (pupa_strndup): New function.
16682 * include/pupa/misc.h (pupa_strndup): New prototype.
16684 * include/pupa/normal.h: Include <pupa/err.h>.
16685 (pupa_set_history): New prototype.
16686 (pupa_iterate_commands): New prototype.
16687 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16688 <pupa/disk.h>, <pupa/file.h>.
16689 (hist_size): New variable.
16690 (hist_lines): Likewise.
16691 (hist_end): Likewise.
16692 (hist_used): Likewise.
16693 (pupa_set_history): New function.
16694 (pupa_history_get): Likewise.
16695 (pupa_history_add): Likewise.
16696 (pupa_history_replace): Likewise.
16697 (pupa_tab_complete): Likewise.
16698 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16699 completion shows partitionnames while completing partitions, this
16700 feature was suggested by Jeff Bailey.
16701 * normal/command.c (pupa_iterate_commands): New function.
16702 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16703 (pupa_normal_init): Initialize history buffer.
16704 (PUPA_MOD_INIT): Likewise.
16705 (pupa_normal_fini): Free the history buffer.
16706 (PUPA_MOD_FINI): Likewise.
16708 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16711 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16712 * configure.ac [i386]: Check for regparam bug.
16713 (NESTED_FUNC_ATTR) [! i386]: Defined.
16715 2003-11-17 Marco Gerards <metgerards@student.han.nl>
16717 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16718 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16719 (pupa_emu_SOURCES): New variable.
16720 (pupa_emu_LDFLAGS): Likewise.
16721 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16722 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16723 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16724 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16725 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16726 (pupa_jmp_buf): New typedef.
16727 (pupa_setjmp) [PUPA_UTIL]: New macro.
16728 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16729 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16730 (pupa_refresh): New prototype.
16731 * include/pupa/util/getroot.h: New file.
16732 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16734 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16735 (pupa_rescue_cmd_cat): Likewise.
16736 (pupa_rescue_cmd_ls): Likewise.
16737 (pupa_rescue_cmd_testload): Likewise.
16738 (pupa_rescue_cmd_lsmod): Likewise.
16739 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16740 * normal/menu.c (run_menu): Likewise.
16741 * kern/term.c (pupa_cls): Likewise.
16742 (pupa_refresh): New function.
16743 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16744 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16745 * util/console.c: New file.
16747 * util/i386/pc/getroot.c: New file.
16748 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16749 (pupa_putchar): New function.
16750 (pupa_refresh): Likewise.
16751 (xgetcwd): Function moved to ...
16752 (strip_extra_slashes): Likewise.
16753 (get_prefix): Likewise.
16754 * util/i386/pc/getroot.c: ... here.
16755 (find_root_device): Function moved and renamed to...
16756 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16757 Changed all callers.
16758 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16760 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16761 Changed all callers.
16762 * util/misc.c (pupa_memalign): New function.
16763 (pupa_mm_init_region): Likewise.
16764 (pupa_register_exported_symbols): Likewise.
16765 (pupa_putchar): Function removed.
16766 * util/pupa-emu.c: New file.
16768 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16770 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16771 (_multiboot_mod_SOURCES): New variable.
16772 (_multiboot_mod_CFLAGS): Likewise.
16773 * loader/i386/pc/multiboot.c: New file.
16774 * include/pupa/i386/pc/multiboot.h: Likewise.
16775 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16776 (pupa_multiboot_real_boot): New function.
16777 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16778 (pupa_multiboot_real_boot): New prototype.
16779 (pupa_rescue_cmd_multiboot): Likewise
16780 (pupa_rescue_cmd_module): Likewise.
16782 * kern/loader.c (pupa_loader_set): Continue when
16783 pupa_loader_unload_func() fails.
16784 (pupa_loader_unset): New function.
16785 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16787 * kern/misc.c (pupa_stpcpy): New function.
16788 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16790 2003-11-12 Marco Gerards <metgerards@student.han.nl>
16792 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16793 for available extensions.
16795 * include/pupa/i386/pc/time.h: New file.
16796 * kern/disk.c: Include <pupa/machine/time.h>.
16797 (PUPA_CACHE_TIMEOUT): New macro.
16798 (pupa_last_time): New variable.
16799 (pupa_disk_open): Flush the cache when there was a timeout.
16800 (pupa_disk_close): Reset the timer.
16801 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16803 * util/misc.c: Include <sys/times.h>
16804 (pupa_get_rtc): New function.
16806 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16808 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16810 (pupa_ext2_get_file_block): Use blocks member.
16812 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16813 first block. Return -1 instead of pupa_errno on error.
16815 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16817 * README: In the pupa-mkimage example use _chain instead of chain
16818 and ext2 instead of fat.
16819 * TODO: Replace ext2fs with jfs as an example. Add an item for
16820 adding journal playback for ext2fs.
16821 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16822 (pkgdata_MODULES): Added ext2.mod.
16823 (ext2_mod_SOURCES): New variable.
16824 (ext2_mod_CFLAGS): Likewise.
16825 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16826 * include/pupa/misc.h (pupa_strncpy): New prototype.
16827 (pupa_strcat): Likewise.
16828 (pupa_strncmp): Likewise.
16829 * kern/misc.c (pupa_strcat): Enable function.
16830 (pupa_strncpy): New function.
16831 (pupa_strncmp): Likewise.
16832 * fs/ext2.c: New file.
16834 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16835 when the read failed before retrying.
16836 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16837 (_FILE_OFFSET_BITS): Likewise.
16838 * configure.ac: Added AC_SYS_LARGEFILE.
16840 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16842 * genmk.rb (PModule#rule): Make sure to get only symbol names
16843 from the output of nm.
16844 Reported by Robert Millan <zeratul2@wanadoo.es>.
16846 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16848 I forgot to check in these changes for a long time. This adds
16849 incomplete support for VGA console, and this is still very
16850 buggy. Also, a lot of consideration is required for I18N,
16851 UNICODE, and VGA font issues. Therefore, assume that this is
16852 such that "better than nothing".
16854 * font/manager.c: New file.
16855 * include/pupa/font.h: Likewise.
16856 * include/pupa/i386/pc/vga.h: Likewise.
16857 * term/i386/pc/vga.c: Likewise.
16858 * util/unifont2pff.rb: Likewise.
16860 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16861 (pkgdata_MODULES): Added vga.mod and font.mod.
16862 (vga_mod_SOURCES): New variables.
16863 (vga_mod_CFLAGS): Likewise.
16864 (font_mod_SOURCES): Likewise.
16865 (font_mod_CFLAGS): Likewise.
16867 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16869 * include/pupa/term.h: Include pupa/err.h.
16870 (struct pupa_term): Added init and fini.
16871 Changed the argument of putchar to pupa_uint32_t.
16873 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16874 (pupa_console_real_putchar): New prototype.
16875 (pupa_console_putchar): Removed.
16876 (pupa_console_checkkey): Exported.
16877 (pupa_console_getkey): Likewise.
16879 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16882 * kern/term.c (pupa_term_set_current): Rewritten.
16883 (pupa_putchar): Likewise.
16884 (pupa_putcode): New function.
16886 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16887 (pupa_console_real_putchar): ... this.
16888 (pupa_vga_set_mode): New function.
16889 (pupa_vga_get_font): Likewise.
16891 * normal/command.c: Include pupa/term.h.
16892 (terminal_command): New function.
16893 (pupa_command_init): Register the command "terminal".
16895 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16896 (DISP_UP): Likewise.
16897 (DISP_RIGHT): Likewise.
16898 (DISP_DOWN): Likewise.
16899 (DISP_HLINE): Likewise.
16900 (DISP_VLINE): Likewise.
16901 (DISP_UL): Likewise.
16902 (DISP_UR): Likewise.
16903 (DISP_LL): Likewise.
16904 (DISP_LR): Likewise.
16906 * term/i386/pc/console.c (pupa_console_putchar): New function.
16908 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16910 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16911 FIX. Reverse the path_list.
16913 * include/pupa/normal.h: Export pupa_register_command and
16914 pupa_unregister_command.
16916 * hello/hello.c (pupa_cmd_hello): New module.
16917 * conf/i386-pc.rmk: Added hello.mod.
16919 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16921 * kern/i386/pc/lzo1x.S: New file.
16923 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16924 (compress_kernel): New variable.
16925 (generate_image): Heavily modified to support compressing a
16926 large part of the core image.
16928 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16930 (pupa_util_load_image): New function.
16932 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16933 (pupa_compressed_size): New variable.
16934 (codestart): Enable Gate A20 here.
16935 Decompress the compressed part of the core image.
16936 Rearrange the code to put functions and variables which are
16937 required for initialization in the non-compressed part.
16940 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16943 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16945 * include/pupa/i386/pc/kernel.h
16946 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16947 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16948 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16949 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16950 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16952 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16954 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16955 (Utility#rule): Likewise.
16957 * configure.ac: Check if LZO is available.
16959 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16961 * include/pupa/normal.h: New file.
16962 * include/pupa/setjmp.h: Likewise.
16963 * include/pupa/i386/setjmp.h: Likewise.
16964 * normal/cmdline.c: Likewise.
16965 * normal/command.c: Likewise.
16966 * normal/main.c: Likewise.
16967 * normal/menu.c: Likewise.
16968 * normal/i386/setjmp.S: Likewise.
16970 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16971 (pupa_rescue_cmd_initrd): Likewise.
16973 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16976 * kern/i386/pc/startup.S (translation_table): New variable.
16977 (translate_keycode): New function.
16978 (pupa_console_getkey): Call translate_keycode.
16980 * kern/rescue.c (attempt_normal_mode): New function.
16981 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16982 it failed, print a message.
16984 * kern/mm.c (pupa_real_malloc): Print more information when a
16985 free magic is broken.
16986 (pupa_free): If the first free header is not free actually, set
16989 * kern/main.c (pupa_load_normal_mode): Just load the module
16991 (pupa_main): Don't print the message
16992 "Entering into rescue mode..." here.
16994 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16996 (pupa_rescue_cmd_initrd): Likewise.
16997 (pupa_rescue_cmd_initrd): Likewise.
16999 * include/pupa/symbol.h (FUNCTION): Specify the type.
17000 (VARIABLE): Likewise.
17002 * include/pupa/err.h (pupa_err_t): Added
17003 PUPA_ERR_UNKNOWN_COMMAND.
17005 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17006 (pupa_dl_get_prefix): Likewise.
17008 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17009 Added _chain.mod and _linux.mod instead of chain.mod and
17011 (chain_mod_SOURCES): Renamed to ...
17012 (_chain_mod_SOURCES): ... this.
17013 (chain_mod_CFLAGS): Renamed to ...
17014 (_chain_mod_CFLAGS): ... this.
17015 (linux_mod_SOURCES): Renamed to ...
17016 (_linux_mod_SOURCES): ... this.
17017 (linux_mod_CFLAGS): Renamed to ...
17018 (_linux_mod_CFLAGS): ... this.
17019 (normal_mod_SOURCES): New variable.
17020 (normal_mod_CFLAGS): Likewise.
17021 (normal_mod_ASFLAGS): Likewise.
17023 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17025 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17028 * kern/dl.c (pupa_dl_ref): Refer depending modules
17030 (pupa_dl_unref): Unrefer depending modules recursively.
17031 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17032 a module is unloaded before one depending on that module is
17034 (pupa_dl_unload): Unload depending modules explicitly,
17037 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17039 * include/pupa/i386/pc/linux.h: New file.
17040 * loader/i386/pc/linux.c: Likewise.
17042 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17044 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17045 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17046 of PUPA_CHAINLOADER_BOOT_SECTOR.
17048 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17049 (pupa_linux_prot_size): New variable.
17050 (pupa_linux_tmp_addr): Likewise.
17051 (pupa_linux_real_addr): Likewise.
17052 (pupa_linux_boot_zimage): New function.
17053 (pupa_linux_boot_bzimage): Likewise.
17055 * kern/i386/pc/init.c (struct mem_region): New structure.
17056 (MAX_REGIONS): New macro.
17057 (mem_regions): New variable.
17058 (num_regions): Likewise.
17059 (pupa_os_area_addr): Likewise.
17060 (pupa_os_area_size): Likewise.
17061 (pupa_lower_mem): Likewise.
17062 (pupa_upper_mem): Likewise.
17063 (add_mem_region): New function.
17064 (compact_mem_regions): Likewise.
17065 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17066 the size of the conventional memory and that of so-called upper
17067 memory (before the first memory hole).
17068 Instead of adding each found region to free memory, use
17069 add_mem_region and add them after removing overlaps.
17070 Also, add only 1/4 of the upper memory to free memory. The rest
17071 is used for loading OS images. Maybe this is ad hoc, but this
17072 makes it much easier to relocate OS images when booting.
17074 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17075 (pupa_enter_rescue_mode): Don't register initrd and module.
17077 * kern/mm.c: Include pupa/dl.h.
17079 * kern/main.c: Include pupa/file.h and pupa/device.h.
17081 * kern/loader.c (pupa_loader_load_module_func): Removed.
17082 (pupa_loader_load_module): Likewise.
17084 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17087 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17088 (pupa_linux_tmp_addr): Likewise.
17089 (pupa_linux_real_addr): Likewise.
17090 (pupa_linux_boot_zimage): Likewise.
17091 (pupa_linux_boot_bzimage): Likewise.
17093 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17094 (pupa_upper_mem): Likewise.
17095 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17096 module is too dangerous.
17098 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17099 (pupa_os_area_size): Likewise.
17100 (pupa_loader_set): Remove the first argument. Loader doesn't
17101 manage modules or initrd any longer.
17102 (pupa_loader_load_module): Removed.
17104 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17105 (linux_mod_SOURCES): New variable.
17106 (linux_mod_CFLAGS): Likewise.
17108 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17110 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17111 the length of a blocklist correctly.
17113 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17114 Use ioctl only if the OS file is a block device.
17115 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17116 not very useful for normal files.
17118 * kern/main.c (pupa_set_root_dev): New function.
17119 (pupa_load_normal_mode): Likewise.
17120 (pupa_main): Call those above.
17122 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17125 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17127 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17129 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17130 (setup): Configure the installed partition information and the
17133 * loader/i386/pc/chainloader.c (my_mod): New variable.
17134 (pupa_chainloader_unload): New function.
17135 (pupa_rescue_cmd_chainloader): Refer itself.
17136 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17138 * kern/i386/pc/startup.S (install_partition): Removed.
17139 (version_string): Likewise.
17140 (config_file): Likewise.
17141 (pupa_install_dos_part): New variable.
17142 (pupa_install_bsd_part): Likewise.
17143 (pupa_prefix): Likewise.
17144 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17146 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17148 (make_install_device): New function.
17149 (pupa_machine_init): Set the dl prefix.
17151 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17152 (buf): Renamed to ...
17153 (linebuf): ... this.
17154 (pupa_rescue_cmd_prefix): New function.
17155 (pupa_rescue_cmd_insmod): Likewise.
17156 (pupa_rescue_cmd_rmmod): Likewise.
17157 (pupa_rescue_cmd_lsmod): Likewise.
17158 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17161 * kern/mm.c (pupa_memalign): If failed even after invalidating
17162 disk caches, unload unneeded modules and retry.
17164 * kern/misc.c (pupa_memmove): New function.
17165 (pupa_memcpy): Removed.
17166 (pupa_strcpy): New function.
17167 (pupa_itoa): Made static.
17169 * kern/dl.c (pupa_dl_iterate): New function.
17170 (pupa_dl_ref): Likewise.
17171 (pupa_dl_unref): Likewise.
17172 (pupa_dl_unload): Return if succeeded or not.
17173 (pupa_dl_unload_unneeded): New function.
17174 (pupa_dl_unload_all): Likewise.
17175 (pupa_dl_init): Renamed to ...
17176 (pupa_dl_set_prefix): ... this.
17177 (pupa_dl_get_prefix): New function.
17179 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17180 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17181 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17182 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17183 (pupa_install_dos_part): Declared.
17184 (pupa_install_bsd_part): Likewise.
17185 (pupa_prefix): Likewise.
17186 (pupa_boot_drive): Likewise.
17188 * include/pupa/types.h: Fix a typo.
17190 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17192 (pupa_memmove): Declared.
17193 (pupa_strcpy): Likewise.
17195 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17196 pupa_mod_init takes one argument, its own module.
17197 (pupa_dl_unload_unneeded): Declared.
17198 (pupa_dl_unload_all): Likewise.
17199 (pupa_dl_ref): Likewise.
17200 (pupa_dl_unref): Likewise.
17201 (pupa_dl_iterate): Likewise.
17202 (pupa_dl_init): Renamed to ...
17203 (pupa_dl_set_prefix): ... this.
17204 (pupa_dl_get_prefix): Declared.
17206 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17207 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17209 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17210 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17212 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17213 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17215 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17217 * util/i386/pc/pupa-setup.c (setup): Define the internal
17218 function find_first_partition_start at the top level, because GCC
17219 3.0.x cannot compile internal functions in deeper scopes
17221 (find_root_device): Use lstat instead of stat.
17222 Don't follow symbolic links.
17223 Fix the path-constructing code.
17225 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17226 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17227 by a BLKGETSIZE ioctl first, because block devices don't fill
17228 the member st_mode of the structure stat on Linux.
17229 [__linux__] (linux_find_partition): Use a temporary buffer
17230 REAL_DEV for the working space. Copy it to DEV before returning.
17231 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17232 buffer cache consistent.
17233 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17234 strncmp. The previous value was merely wrong.
17235 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17237 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17238 FAT size is 12. The previous value was merely wrong.
17240 * kern/main.c (pupa_main): Don't split the starting message from
17243 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17244 LF, because BIOS goes crazy about character attributes in this
17247 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17249 * include/i386/pc/util/biosdisk.h: New file.
17250 * util/i386/pc/biosdisk.c: Likewise.
17251 * util/i386/pc/pupa-setup.c: Likewise.
17253 * Makefile.in (INCLUDE_DISTFILES): Added
17254 include/pupa/i386/pc/util/biosdisk.h.
17255 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17256 directory util/i386/pc.
17257 (install-local): Added a rule for sbin_UTILITIES.
17258 (uninstall): Likewise.
17260 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17262 * util/misc.c (xrealloc): New function.
17263 (pupa_malloc): Likewise.
17264 (pupa_free): Likewise.
17265 (pupa_realloc): Likewise.
17266 (pupa_stop): Likewise.
17267 (pupa_putchar): Likewise.
17269 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17271 * include/pupa/util/misc.h (xrealloc): Declared.
17273 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17275 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17276 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17278 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17279 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17281 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17282 way should be implemented.
17283 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17285 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17286 the size of NAME for safety.
17287 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17290 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17291 (pupa_setup_SOURCES): Likewise.
17293 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17295 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17297 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17298 bunch of pushl's from pusha, because this destroys the return
17301 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17303 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17304 This means that any missing prototypes could be fatal. Also, you
17305 must take care when writing assembly code. See the comments at
17306 the beginning of startup.S, for more details.
17308 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17309 compilation mechanism.
17310 (pupa_chainloader_real_boot): Likewise.
17311 (pupa_biosdisk_rw_int13_extensions): Likewise.
17312 (pupa_biosdisk_rw_standard): Likewise.
17313 (pupa_biosdisk_check_int13_extensions): Likewise.
17314 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17315 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17316 (pupa_get_memsize): Likewise.
17317 (pupa_get_mmap_entry): Likewise.
17318 (pupa_console_putchar): Likewise.
17319 (pupa_console_setcursor): Likewise.
17320 (pupa_getrtsecs): Use pushl instead of push.
17322 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17323 memory instead of the stack for a mmap entry, because some
17324 BIOSes may ignore the maximum size and overflow.
17326 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17328 * genmk.rb (PModule#rule): Compile automatically generated
17329 sources with module-specific CFLAGS as well as other sources.
17331 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17333 * configure.ac: Check ld.
17334 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17335 respectively, before checking endianness and sizes.
17337 * Makefile.in (LD): New variable.
17339 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17341 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17343 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17345 * Changelog: New file.