]> git.proxmox.com Git - grub2.git/blob - ChangeLog
2009-06-10 Pavel Roskin <proski@gnu.org>
[grub2.git] / ChangeLog
1 2009-06-10 Pavel Roskin <proski@gnu.org>
2
3 * io/gzio.c (test_header): Don't reuse one buffer for all data.
4 Use separate variables. Read only the file size at the end, but
5 not the checksum that we don't use.
6
7 * kern/file.c (grub_file_read): Use void pointer for the buffer.
8 Adjust all callers.
9
10 * kern/ieee1275/openfw.c: Remove libc includes.
11 * kern/ieee1275/cmain.c: Likewise.
12 * include/grub/ieee1275/ieee1275.h: Likewise.
13
14 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
15 compiler warnings.
16
17 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
18
19 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
20 `genparttoollist.sh'.
21 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
22 Add `*.sh' to the list find searches for and change `mdate.sh'
23 to `mdate-sh'.
24
25 2009-06-10 Pavel Roskin <proski@gnu.org>
26
27 * include/grub/multiboot2.h: Provide compatibility defines for
28 multiboot2.h.
29 * include/multiboot2.h: Include stdint.h only if needed, using
30 angle brackets.
31 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
32 grub/multiboot2.h.
33 * loader/ieee1275/multiboot2.c: Likewise.
34 * loader/multiboot2.c: Likewise.
35 * loader/multiboot_loader.c: Likewise.
36
37 * configure.ac: Use -nostdlib when probing for the target. It
38 should not be required to have libc for the target.
39
40 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
41 they fail without libc headers for the target.
42 * include/grub/powerpc/libgcc.h: Use weak attribute for all
43 exports.
44 * include/grub/sparc64/libgcc.h: Likewise. Don't use
45 preprocessor conditionals.
46
47 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
48 build system doesn't need to be aware of the tar.c internals.
49
50 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
51
52 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
53
54 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
55
56 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
57 disk limit to 26 for IDE, Virtio, Xen and SCSI.
58
59 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
60
61 * util/i386/pc/grub-install.in: Change the error message if UUIDs
62 aren't available if ata.mod gets used.
63
64 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
65
66 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
67 initialising controller.
68 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
69
70 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
71
72 * util/i386/pc/grub-install.in: Add a parameter --disk-module
73 to choose between ata and biosdisk module on i386-pc.
74
75 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
76
77 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
78 Subclass and Programming Interface fields in terms of the 3 byte
79 Class Code register.
80 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
81
82 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
83 interface is OHCI. Add grub_dprintf for symmetry with
84 bus/usb/uhci.c.
85 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
86 interface is UHCI. Add interf variable for programming
87 interface. Print interface with class/subclass.
88
89 * bus/usb/ohci.c: Set interf with correct field.
90
91 * bus/usb/uhci.c: Remove unneeded doubled lines.
92 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
93 Remove whitespace inside comment.
94
95 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
96
97 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
98 as fallback an equivalent option without depth.
99
100 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
101
102 Not fail if unable to retrieve C/H/S on LBA disks
103
104 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
105 if unable to retrieve C/H/S on LBA disks
106
107 2009-06-08 Pavel Roskin <proski@gnu.org>
108
109 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
110 about aliasing.
111
112 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
113
114 * Makefile.in (uninstall): Remove all $lib_DATA files.
115
116 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
117
118 Bugfix: install on partitionless device
119
120 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
121 is a whole disk
122
123 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
124
125 * Makefile.in (uninstall): Remove all $include_DATA files.
126
127 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
128
129 * commands/true.c: New file. Implement the true and false commands.
130 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
131 (true_mod_SOURCES): New variable.
132 (true_mod_CFLAGS): Likewise.
133 (true_mod_LDFLAGS): Likewise.
134
135 2009-06-05 Colin D Bennett <colin@gibibit.com>
136
137 Optimized font character lookup using binary search instead of linear
138 search. Fonts now are required to have the character index ordered by
139 code point.
140
141 * font/font.c (load_font_index): Verify that fonts have ordered
142 character indices.
143 (find_glyph): Use binary search instead of linear search to find a
144 character in a font.
145
146 2009-06-05 Michael Scherer <misc@mandriva.org>
147
148 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
149 uses case sensitive btree.
150 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
151 only for case insensitive filesystems.
152
153 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
154
155 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
156 * conf/common.rmk (search_mod_CFLAGS): likewise
157
158 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
159
160 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
161 compensate a compiler bug
162
163 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
164
165 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
166 instead of '\b'
167
168 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
169
170 Definitions for creating asm symbols with Apple's CC
171
172 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
173 [APPLE_CC] (VARIABLE): likewise
174
175 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
176
177 Disable lnxboot.img when compiled
178 with Apple's CC
179
180 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
181 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
182 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
183 [! APPLE_CC] (CODE_LENG): skip
184 [! APPLE_CC] (setup_sects): likewise
185 [! APPLE_CC]: skip filling
186
187 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
188
189 Address in trampolines based on 32-bit registers when compiled
190 with Apple's CC
191
192 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
193 for addresses
194 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
195
196 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
197
198 Avoid aliases when compiling with Apple's CC for PCBIOS machine
199
200 * kern/misc.c [APPLE_CC] (memcpy): new function
201 [APPLE_CC] (memmove): likewise
202 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
203 (memcpy): define alias conditionally on !APPLE_CC
204 (memset): likewise
205 (abort): likewise
206 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
207 APPLE_CC are defined
208 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
209 (grub_assert_fail): make prototype conditional
210
211 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
212
213 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
214
215 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
216 grub-macho2img
217 (CLEANFILES): add grub-macho2img
218 (grub_macho2img_SOURCES): new variable
219 * kern/i386/pc/startup.S (bss_start): new variable
220 (bss_end): likewise
221 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
222 * util/grub-macho2img.c: new file
223
224 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
225
226 Use objconv when compiling with Apple's CC
227
228 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
229 (efiemu64.o): likewise
230 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
231 when compiling with Apple's CC
232 (efiemu64_s.o): likewise
233 * configure.ac: check for objconv when compiling with Apple's CC
234 * genmk.rb: use objconv for modules when compiled with Apple's CC
235
236 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
237
238 Define segment as well as section when compiling with
239 Apple's CC
240
241 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
242 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
243 (efiemu_convert_pointer): likewise
244 (efiemu_set_virtual_address_map): likewise
245 (efiemu_convert_pointer): likewise
246 (efiemu_getcrc32): likewise
247 (init_crc32_table): likewise
248 (reflect): likewise
249 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
250 (GRUB_MOD_DEP): likewise
251
252 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
253
254 Allow a compilation without -mcmodel=large
255
256 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
257 when compiled without -mcmodel=large
258 (filter_memory_map): remove memory post 4 GiB when compiled
259 without -mcmodel=large
260 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
261 TARGET_CFLAGS when -mcmodel=large isn't supported
262
263 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
264
265 Remove nested functions in efiemu core
266
267 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
268
269 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
270
271 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
272
273 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
274 temporary storage
275 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
276 using Apple's CC
277 (grub_cpu_is_tsc_supported): likewise
278 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
279
280 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
281
282 Absolute addressing through constant with Apple's cc
283
284 * kern/i386/pc/startup.S: Define necessary constants
285 and address through it when using ABS with Apple's CC
286 * boot/i386/pc/diskboot.S: likewise
287 * boot/i386/pc/boot.S: likewise
288 * boot/i386/pc/lnxboot.S: likewise
289 * boot/i386/pc/cdboot.S: likewise
290 * mmap/i386/pc/mmap_helper.S: likewise
291 * commands/i386/pc/drivemap_int13h.S: likewise
292
293 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
294
295 Check if compiler is apple cc
296
297 * Makefile.in (ASFLAGS): new variable
298 (TARGET_ASFLAGS): likewise
299 (TARGET_MODULE_FORMAT): likewise
300 (TARGET_APPLE_CC): likewise
301 (OBJCONV): likewise
302 (TARGET_IMG_CFLAGS): likewise
303 (TARGET_CPPFLAGS): add includedir
304 * configure.ac: call grub_apple_cc and grub_apple_target_cc
305 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
306 Check for linker script only if compiler isn't Apple's CC
307 (TARGET_MODULE_FORMAT): set
308 (TARGET_APPLE_CC): likewise
309 (TARGET_ASFLAGS): likewise
310 (ASFLAGS): likewise
311 Check for objcopy only if compiler isn't Apple's CC
312 Check for BSS symbol only if compiler isn't Apple's CC
313 * genmk.rb: adapt nm options if we use Apple's utils
314 * aclocal.m4 (grub_apple_cc): new test
315 (grub_apple_target_cc): likewise
316
317 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
318
319 Simplify sed expressions and improve awk
320
321 * Makefile.in (install-local): simplify sed expression
322 * gencmdlist.sh: likewise
323 * genmoddep.awk: avoid adding module as a dependency of itself
324
325 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
326
327 Add missing start symbols
328
329 * boot/i386/pc/boot.S: add start
330 * boot/i386/pc/pxeboot.S: likewise
331
332 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
333
334 Fix wrong assumptions with grub-mkimage on EFI
335
336 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
337 (relocate_addresses): consider both r_addend and value at offset
338 (make_mods_section): zerofill modinfo and header
339 (convert_elf): write prefix here
340
341 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
342
343 Use .asciz instead of .string
344
345 * i386/pc/diskboot.S: use .asciz instead of .string
346 * i386/pc/boot.S: likewise
347 * include/grub/dl.h (GRUB_MOD_DEP): likewise
348 (GRUB_MOD_NAME): likewise
349
350 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
351
352 gfxpayload support
353
354 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
355 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
356 (grub_video_setup): remove
357 (grub_video_set_mode): new prototype
358 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
359 (vid_mode): remove
360 (linux_vesafb_res): compile only on PCBIOS
361 (grub_linux_boot): support gfxpayload
362 * loader/i386/pc/xnu.c (video_hook): new function
363 (grub_xnu_set_video): support gfxpayload
364 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
365 (DEFAULT_VIDEO_HEIGHT): likewise
366 (DEFAULT_VIDEO_FLAGS): likewise
367 (DEFAULT_VIDEO_MODE): new definition
368 (video_hook): new function
369 (grub_gfxterm_init): use grub_video_set_mode
370 * util/grub.d/30_os-prober.in: remove explicit modesetting before
371 loading xnu
372 * video/video.c (grub_video_setup): removed
373 (grub_video_set_mode): new function based on grub_gfxterm_init and
374 grub_video_setup
375
376 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
377
378 Avoid calling biosdisk in drivemap
379
380 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
381 (revparse_biosdisk): likewise
382 (list_mappings): derive name from id directly
383 (grub_cmd_drivemap): use tryparse_diskstring
384
385 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
386
387 Script fixes
388
389 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
390 (grub_lexer_param): add tokenonhold
391 (grub_script_create_cmdline): remove cmdline. All callers updated
392 (grub_script_function_create): make functionname
393 grub_script_arg. All callers updated
394 (grub_script_execute_argument_to_string): new prototype
395 * kern/parser.c (state_transitions): reorder
396 (grub_parser_cmdline_state): fix a bug and make more compact
397 * script/sh/execute.c (grub_script_execute_argument_to_string):
398 make global
399 (grub_script_execute_cmdline): use new format
400 * script/sh/function.c (grub_script_function_create): make functionname
401 grub_script_arg. All callers updated
402 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
403 (grub_script_yylex): remove
404 (grub_script_yylex2): renamed to ...
405 (grub_script_yylex): ...renamed
406 parse the expressions like a${b}c
407 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
408 (GRUB_PARSER_TOKEN_VAR): remove
409 (GRUB_PARSER_TOKEN_NAME): likewise
410 ("if"): declare as typeless
411 ("while"): likewise
412 ("function"): likewise
413 ("else"): likewise
414 ("then"): likewise
415 ("fi"): likewise
416 (text): remove
417 (argument): likewise
418 (script): accept empty scripts and make exit on error
419 (arguments): use GRUB_PARSER_TOKEN_ARG
420 (function): likewise
421 (command): move error handling to script
422 (menuentry): move grub_script_lexer_ref before
423 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
424 argument. All callers updated
425
426 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
427
428 Prevent GRUB from probing floppies during boot.
429
430 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
431 * commands/search.c (options): Add --no-floppy.
432 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
433 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
434 --no-floppy when searching for UUIDs.
435
436 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
437
438 Simplify the code duplication in commands/search.c.
439
440 * commands/search.c (search_label, search_fs_uuid): Merge into ...
441 (search_fs): ... this. Update all users.
442
443 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
444
445 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
446
447 2009-05-28 Pavel Roskin <proski@gnu.org>
448
449 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
450 Remove the original symlink explicitly.
451
452 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
453 just one slash. That's how grub_fshelp_find_file() does it.
454
455 2009-05-26 Pavel Roskin <proski@gnu.org>
456
457 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
458 to `str'.
459
460 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
461 possibly unused.
462
463 2009-05-25 Christian Franke <franke@computer.org>
464
465 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
466 register.
467 (grub_atapi_identify): Add wait after drive select.
468 (grub_ata_identify): Do more strict status register check before
469 calling grub_atapi_identify (). Suppress error message if status
470 register is 0x00 after command failure. Add status register
471 check after PIO read to avoid bogus identify due to stuck DRQ.
472 Thanks to Pavel Roskin for testing.
473 (grub_device_initialize): Remove unsafe status register check.
474 Thanks to 'phcoder' for problem report and patch.
475 Prevent sign extension in debug message.
476
477 2009-05-23 Colin D Bennett <colin@gibibit.com>
478
479 Cleaned up `include/grub/normal.h'. Grouped prototypes by
480 definition file, and functions defined in `normal/menu.c' have had
481 their prototypes moved to `include/grub/menu.h' for consistency.
482
483 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
484 from normal.h.
485 (grub_menu_get_entry): Likewise.
486 (grub_menu_get_timeout): Likewise.
487 (grub_menu_set_timeout): Likewise.
488 (grub_menu_execute_entry): Likewise.
489 (grub_menu_execute_with_fallback): Likewise.
490 (grub_menu_entry_run): Likewise.
491
492 * include/grub/normal.h: Re-ordered and grouped function
493 prototypes by file that the function is defined in.
494 (grub_menu_execute_callback): Removed; moved to menu.h.
495 (grub_menu_get_entry): Likewise.
496 (grub_menu_get_timeout): Likewise.
497 (grub_menu_set_timeout): Likewise.
498 (grub_menu_execute_entry): Likewise.
499 (grub_menu_execute_with_fallback): Likewise.
500 (grub_menu_entry_run): Likewise.
501 (grub_menu_addentry): Renamed from this ...
502 (grub_normal_add_menu_entry): ... to this.
503
504 * normal/main.c (grub_menu_addentry): Renamed from this ...
505 (grub_normal_add_menu_entry): ... to this.
506
507 * script/sh/execute.c (grub_script_execute_menuentry): Update
508 reference to renamed grub_menu_addentry function.
509
510 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
511
512 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
513
514 2009-05-22 Pavel Roskin <proski@gnu.org>
515
516 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
517 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
518 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
519 compiling for the i386 targets, but not for the utilities.
520
521 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
522 to grub_uint8_t.
523 (grub_root_drive): Likewise.
524 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
525 remove alignment.
526 (grub_root_drive): Change size to byte.
527 (grub_start_addr): Remove.
528 (grub_end_addr): Likewise.
529 (grub_apm_bios_info): Likewise.
530
531 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
532
533 * normal/i386: Remove.
534 * normal/powerpc: Likewise.
535 * normal/sparc64: Likewise.
536 * normal/x86_64: Likewise.
537
538 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
539
540 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
541 * loader/i386/linux_trampoline.S: Fix indentation
542 * loader/i386/xnu_helper.S: Likewise
543
544 2009-05-18 Colin D Bennett <colin@gibibit.com>
545
546 Display error messages when parsing a Lua statement fails.
547 Previously, executing a syntactically invalid statement like
548 ")foo" or "bar;" would silently fail.
549
550 * script/lua/grub_main.c (handle_lua_error): New function.
551 (grub_lua_parse_line): Improved reporting of Lua parser and
552 execution errors.
553
554 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
555
556 Remove -Werror which causes build to fail on some systems
557
558 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
559 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
560 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
561
562 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
563
564 trampoline for linux on 64-bit platform
565
566 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
567 loader/i386/efi/linux_trampoline.S
568 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
569 declaration
570 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
571 here
572 * loader/i386/linux_trampoline.S: moved here
573 * loader/i386/efi/linux.c (allocate_pages): reserve space for
574 trampoline
575 (jumpvector): removed
576 (grub_linux_trampoline_start): new declaration
577 (grub_linux_trampoline_end): likewise
578 (grub_linux_boot): use trampoline when on 64-bit platform
579 * loader/i386/linux.c: likewise
580
581 2009-05-16 Pavel Roskin <proski@gnu.org>
582
583 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
584 const to avoid a warning.
585 (grub_lua_setenv): Likewise.
586 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
587 lmsg to fix a warning.
588
589 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
590
591 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
592 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
593 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
594 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
595 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
596 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
597 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
598 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
599
600 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
601
602 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
603
604 2009-05-16 Bean <bean123ch@gmail.com>
605
606 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
607 (lua_mod_SOURCES): New variable.
608 (lua_mod_CFLAGS): Likewise.
609 (lua_mod_LDFLAGS): Likewise.
610
611 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
612 (setjmp_mod_SOURCES): New variable.
613 (setjmp_mod_CFLAGS): Likewise.
614 (setjmp_LDFLAGS): Likewise.
615
616 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
617 (setjmp_mod_SOURCES): New variable.
618 (setjmp_mod_CFLAGS): Likewise.
619 (setjmp_LDFLAGS): Likewise.
620
621 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
622 (setjmp_mod_SOURCES): New variable.
623 (setjmp_mod_CFLAGS): Likewise.
624 (setjmp_LDFLAGS): Likewise.
625
626 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
627 (setjmp_mod_SOURCES): New variable.
628 (setjmp_mod_CFLAGS): Likewise.
629 (setjmp_LDFLAGS): Likewise.
630
631 * normal/i386/setjmp.S: Moved from here ...
632 * lib/i386/setjmp.S: ... Moved here
633 * normal/x86_64/setjmp.S: Moved from here ...
634 * lib/x86_64/setjmp.S: ... Moved here
635 * normal/powerpc/setjmp.S: Moved from here ...
636 * lib/powerpc/setjmp.S: ... Moved here
637 * normal/sparc64/setjmp.S: Moved from here ...
638 * lib/sparc64/setjmp.S: ... Moved here
639
640 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
641 returns_twice in mingw.
642
643 * script/lua/grub_lib.c: New file.
644 * script/lua/grub_lib.h: Likewise.
645 * script/lua/grub_lua.h: Likewise.
646 * script/lua/grub_main.c: Likewise.
647 * script/lua/lapi.c: Likewise.
648 * script/lua/lapi.h: Likewise.
649 * script/lua/lauxlib.c: Likewise.
650 * script/lua/lauxlib.h: Likewise.
651 * script/lua/lbaselib.c: Likewise.
652 * script/lua/lcode.c: Likewise.
653 * script/lua/lcode.h: Likewise.
654 * script/lua/ldblib.c: Likewise.
655 * script/lua/ldebug.c: Likewise.
656 * script/lua/ldebug.h: Likewise.
657 * script/lua/ldo.c: Likewise.
658 * script/lua/ldo.h: Likewise.
659 * script/lua/ldump.c: Likewise.
660 * script/lua/lfunc.c: Likewise.
661 * script/lua/lfunc.h: Likewise.
662 * script/lua/lgc.c: Likewise.
663 * script/lua/lgc.h: Likewise.
664 * script/lua/linit.c: Likewise.
665 * script/lua/liolib.c: Likewise.
666 * script/lua/llex.c: Likewise.
667 * script/lua/llex.h: Likewise.
668 * script/lua/llimits.h: Likewise.
669 * script/lua/lmathlib.c: Likewise.
670 * script/lua/lmem.c: Likewise.
671 * script/lua/lmem.h: Likewise.
672 * script/lua/loadlib.c: Likewise.
673 * script/lua/lobject.c: Likewise.
674 * script/lua/lobject.h: Likewise.
675 * script/lua/lopcodes.c: Likewise.
676 * script/lua/lopcodes.h: Likewise.
677 * script/lua/loslib.c: Likewise.
678 * script/lua/lparser.c: Likewise.
679 * script/lua/lparser.h: Likewise.
680 * script/lua/lstate.c: Likewise.
681 * script/lua/lstate.h: Likewise.
682 * script/lua/lstring.c: Likewise.
683 * script/lua/lstring.h: Likewise.
684 * script/lua/lstrlib.c: Likewise.
685 * script/lua/ltable.c: Likewise.
686 * script/lua/ltable.h: Likewise.
687 * script/lua/ltablib.c: Likewise.
688 * script/lua/ltm.c: Likewise.
689 * script/lua/ltm.h: Likewise.
690 * script/lua/lua.h: Likewise.
691 * script/lua/luaconf.h: Likewise.
692 * script/lua/lualib.h: Likewise.
693 * script/lua/lundump.c: Likewise.
694 * script/lua/lundump.h: Likewise.
695 * script/lua/lvm.c: Likewise.
696 * script/lua/lvm.h: Likewise.
697 * script/lua/lzio.c: Likewise.
698 * script/lua/lzio.h: Likewise.
699
700 2009-05-16 Bean <bean123ch@gmail.com>
701
702 * include/grub/kernel.h (grub_module_header_types): Add type
703 OBJ_TYPE_CONFIG.
704
705 * kern/main.c (grub_load_config): New function.
706 (grub_main): Call grub_load_config to read boot config.
707
708 * grub-mkimage (generate_image): New parameter config_path.
709 (options): New option --config.
710 (main): Parse --config option, and pass it to generate_image.
711
712 2009-05-14 Christian Franke <franke@computer.org>
713
714 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
715 This fixes build on Cygwin.
716
717 2009-05-14 Pavel Roskin <proski@gnu.org>
718
719 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
720 jump. This saves two bytes, so the typical case of 2 swapped
721 drives would fit 32 bytes.
722
723 2009-05-13 Pavel Roskin <proski@gnu.org>
724
725 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
726 grub_uint32_t to avoid a warning.
727
728 * loader/i386/linux.c (allocate_pages): When assigning
729 real_mode_mem, cast through grub_size_t to fix a warning. The
730 code already makes sure that the value would fit a pointer.
731 (grub_linux_setup_video): Cast render_target->data to
732 grub_size_t to fix a warning.
733
734 2009-05-13 Javier Martín <lordhabbit@gmail.com>
735
736 * commands/i386/pc/drivemap.c: New file - implement drivemap
737 command.
738 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
739 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
740
741 2009-05-13 Pavel Roskin <proski@gnu.org>
742
743 * util/i386/pc/grub-setup.c (setup): Remove unused variable
744 embedding_area_exists.
745
746 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
747
748 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
749 it easier to understand / work with.
750 Improve warning messages for cases where there's no embedding area,
751 or when it is too small (or core.img too large).
752
753 2009-05-13 Pavel Roskin <proski@gnu.org>
754
755 * loader/i386/pc/multiboot2.c: Add necessary includes for
756 grub_multiboot2_real_boot().
757
758 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
759 PX record is always little-endian. We only need the lower 2
760 bytes of the mode.
761
762 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
763 facilitate code reuse.
764 (grub_cpio_mount): Use "struct head", not a char buffer. This
765 fixes a warning reported by gcc 4.4.
766
767 * kernel/disk.c (grub_disk_read): Use void pointer for the
768 buffer.
769 (grub_disk_write): Use const void pointer for the buffer.
770 Adjust all callers. Remove unnecessary casts.
771
772 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
773
774 * util/i386/pc/grub-install.in: Update copyright year.
775
776 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
777
778 gptsync
779
780 * commands/gptsync.c: new file
781 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
782 (gptsync_mod_SOURCES): new variable
783 (gptsync_mod_CFLAGS): likewise
784 (gptsync_mod_LDFLAGS): likewise
785 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
786 new definition
787 (GRUB_PC_PARTITION_TYPE_HFS): likewise
788 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
789 * conf/i386-ieee1275.rmk: likewise
790 * conf/i386-pc.rmk: likewise
791 * conf/powerpc-ieee1275.rmk: likewise
792
793 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
794
795 Fixed grub-emu
796
797 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
798 (grub_dl_ref): likewise
799
800 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
801
802 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
803 split in two functions (one for msdos and one for gpt).
804
805 2009-05-08 Pavel Roskin <proski@gnu.org>
806
807 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
808 not modified.
809
810 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
811 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
812 Initialize them with -1. Add sanity check for bad1. Eliminate
813 nerr variable.
814
815 2009-05-08 David S. Miller <davem@davemloft.net>
816
817 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
818
819 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
820
821 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
822 existence.
823
824 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
825
826 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
827 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
828
829 2009-05-05 David S. Miller <davem@davemloft.net>
830
831 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
832
833 2009-05-05 Pavel Roskin <proski@gnu.org>
834
835 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
836 of grub_dl_ref() and grub_dl_unref().
837 * commands/parttool.c: Remove preprocessor conditionals around
838 grub_dl_ref() and grub_dl_unref().
839 * fs/affs.c: Likewise.
840 * fs/afs.c: Likewise.
841 * fs/cpio.c: Likewise.
842 * fs/ext2.c: Likewise.
843 * fs/fat.c: Likewise.
844 * fs/hfs.c: Likewise.
845 * fs/hfsplus.c: Likewise.
846 * fs/iso9660.c: Likewise.
847 * fs/jfs.c: Likewise.
848 * fs/minix.c: Likewise.
849 * fs/ntfs.c: Likewise.
850 * fs/reiserfs.c: Likewise.
851 * fs/sfs.c: Likewise.
852 * fs/udf.c: Likewise.
853 * fs/ufs.c: Likewise.
854 * fs/xfs.c: Likewise.
855 * include/grub/dl.h: Likewise.
856 * loader/xnu.c: Likewise.
857
858 2009-05-04 Pavel Roskin <proski@gnu.org>
859
860 * commands/acpi.c: Remove unused variable my_mod.
861 * partmap/amiga.c: Likewise.
862 * partmap/apple.c: Likewise.
863 * partmap/gpt.c: Likewise.
864 * partmap/pc.c: Likewise.
865 * partmap/sun.c: Likewise.
866 * term/gfxterm.c: Likewise.
867 * term/i386/pc/vesafb.c: Likewise.
868 * term/i386/pc/vga.c: Likewise.
869
870 2009-05-04 David S. Miller <davem@davemloft.net>
871
872 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
873 pointer args to grub_ieee1275_get_property().
874
875 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
876
877 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
878 devices, and do not traverse down under controller nodes.
879
880 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
881 (grub_ofdisk_open): Use it to un-escape "," characters.
882 * kern/disk.c (find_part_sep): New.
883 (grub_disk_open): Use it to find the first non-escaped ','
884 character in the disk name.
885 * util/ieee1275/devicemap.c (escape_of_path): New.
886 (grub_util_emit_devicemap_entry): Use it.
887 * util/sparc64/ieee1275/grub-install.in: Update script to
888 strip partition specifiers properly by not triggering on
889 '\' escaped ',' characters.
890
891 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
892
893 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
894 to 0x300.
895 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
896 resolutions.
897 (linux_vesafb_modes): Add a lot of additional modes to the list (based
898 on documentation from Wikipedia).
899
900 2009-05-04 Pavel Roskin <proski@gnu.org>
901
902 * disk/ata.c: Spelling fixes.
903 * disk/raid.c: Likewise.
904 * disk/usbms.c: Likewise.
905 * disk/dmraid_nvidia.c: Likewise.
906 * kern/ieee1275/openfw.c: Likewise.
907 * kern/ieee1275/init.c: Likewise.
908 * kern/ieee1275/cmain.c: Likewise.
909 * boot/i386/pc/cdboot.S: Likewise.
910 * video/readers/png.c: Likewise.
911 * video/i386/pc/vbe.c: Likewise.
912 * fs/udf.c: Likewise.
913 * fs/hfs.c: Likewise.
914 * fs/reiserfs.c: Likewise.
915 * efiemu/runtime/efiemu.c: Likewise.
916 * efiemu/main.c: Likewise.
917 * efiemu/mm.c: Likewise.
918 * include/grub/elf.h: Likewise.
919 * include/grub/xnu.h: Likewise.
920 * include/grub/usbdesc.h: Likewise.
921 * include/grub/usb.h: Likewise.
922 * include/grub/script_sh.h: Likewise.
923 * include/grub/lib/LzmaEnc.h: Likewise.
924 * include/grub/efiemu/efiemu.h: Likewise.
925 * include/grub/command.h: Likewise.
926 * normal/menu.c: Likewise.
927 * normal/main.c: Likewise.
928 * normal/datetime.c: Likewise.
929 * bus/usb/uhci.c: Likewise.
930 * mmap/i386/uppermem.c: Likewise.
931 * mmap/mmap.c: Likewise.
932 * commands/acpi.c: Likewise.
933 * commands/test.c: Likewise.
934 * partmap/apple.c: Likewise.
935 * font/font.c: Likewise.
936 * loader/sparc64/ieee1275/linux.c: Likewise.
937 * loader/macho.c: Likewise.
938 * loader/i386/bsd_trampoline.S: Likewise.
939 * loader/i386/bsd.c: Likewise.
940 * loader/xnu.c: Likewise.
941 * term/i386/pc/vesafb.c: Likewise.
942 * term/usb_keyboard.c: Likewise.
943 * util/resolve.c: Likewise.
944 * util/getroot.c: Likewise.
945
946 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
947
948 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
949
950 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
951
952 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
953 build error.
954
955 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
956
957 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
958 parameter only available on BIOS.
959
960 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
961
962 Removed wrong semicolon in declaration
963
964 * grub/misc.h (grub_dprintf): remove semicolon
965
966 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
967
968 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
969 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
970 is done by grub_cmd_linux() now).
971 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
972 restore video to text mode.
973 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
974 indicates lack of "vga=" parameter. "vga=0" is mapped to
975 `GRUB_LINUX_VID_MODE_NORMAL'.
976
977 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
978
979 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
980 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
981 and `normal/script.c'. Add `kern/rescue_reader.c',
982 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
983 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
984 `grub_script.tab.c'.
985
986 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
987 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
988 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
989 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
990 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
991
992 * Makefile.in: Remove duplicated 2008 in Copyright line.
993
994 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
995
996 * util/misc.c (grub_util_warn): New function. Emits a warning
997 unconditionally.
998 * include/grub/util/misc.h (grub_util_warn): New declaration.
999
1000 * util/i386/pc/grub-install.in: Understand --force and pass it down
1001 to grub-setup.
1002
1003 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1004 down to setup().
1005 (setup): Improve error messages and add warnings when requested to
1006 install in odd layouts. Refuse to install using blocklists unless
1007 --force was set.
1008
1009 2009-05-04 martin f. krafft <madduck@madduck.net>
1010
1011 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1012
1013 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1014
1015 Updated copyright year
1016
1017 * fs/hfsplus.c: updated copyright year
1018
1019 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1020
1021 HFS+ UUID
1022
1023 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1024 in the space previously used by unused3
1025 (grub_hfsplus_uuid): new function
1026 (grub_hfsplus_fs): added uuid field
1027
1028 2009-05-03 Pavel Roskin <proski@gnu.org>
1029
1030 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1031 suppress warnings. It's no longer needed.
1032 * disk/host.c: Likewise.
1033 * disk/ata_pthru.c: Likewise.
1034 * disk/loopback.c: Likewise.
1035 * hook/datehook.c: Likewise.
1036 * parttool/pcpart.c: Likewise.
1037 * fs/i386/pc/pxe.c: Likewise.
1038 * fs/ntfscomp.c: Likewise.
1039 * efiemu/main.c: Likewise.
1040 * mmap/mmap.c: Likewise.
1041 * commands/crc.c: Likewise.
1042 * commands/hexdump.c: Likewise.
1043 * commands/hdparm.c: Likewise.
1044 * commands/acpi.c: Likewise.
1045 * commands/echo.c: Likewise.
1046 * commands/minicmd.c: Likewise.
1047 * commands/blocklist.c: Likewise.
1048 * commands/memrw.c: Likewise.
1049 * commands/loadenv.c: Likewise.
1050 * commands/usbtest.c: Likewise.
1051 * commands/lsmmap.c: Likewise.
1052 * commands/boot.c: Likewise.
1053 * commands/parttool.c: Likewise.
1054 * commands/configfile.c: Likewise.
1055 * commands/search.c: Likewise.
1056 * commands/ieee1275/suspend.c: Likewise.
1057 * commands/cat.c: Likewise.
1058 * commands/i386/pc/pxecmd.c: Likewise.
1059 * commands/i386/pc/play.c: Likewise.
1060 * commands/i386/pc/halt.c: Likewise.
1061 * commands/i386/pc/vbeinfo.c: Likewise.
1062 * commands/i386/pc/vbetest.c: Likewise.
1063 * commands/lspci.c: Likewise.
1064 * commands/date.c: Likewise.
1065 * commands/handler.c: Likewise.
1066 * commands/ls.c: Likewise.
1067 * commands/test.c: Likewise.
1068 * commands/cmp.c: Likewise.
1069 * commands/efi/loadbios.c: Likewise.
1070 * commands/efi/fixvideo.c: Likewise.
1071 * commands/halt.c: Likewise.
1072 * commands/help.c: Likewise.
1073 * commands/reboot.c: Likewise.
1074 * hello/hello.c: Likewise.
1075 * script/sh/main.c: Likewise.
1076 * loader/xnu.c: Likewise.
1077 * term/terminfo.c: Likewise.
1078 * term/i386/pc/serial.c: Likewise.
1079 * term/usb_keyboard.c: Likewise.
1080
1081 2009-05-03 David S. Miller <davem@davemloft.net>
1082
1083 * normal/menu.c: Include grub/parser.h
1084
1085 2009-05-03 Pavel Roskin <proski@gnu.org>
1086
1087 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1088 not char*.
1089 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1090 Suggested by Javier Martín <lordhabbit@gmail.com>
1091
1092 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1093 efiemu??.o doesn't exist.
1094 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1095 copying.
1096
1097 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1098
1099 FreeBSD 64-bit support
1100
1101 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1102 and loader/i386/bsd_trampoline.S
1103 (bsd_mod_ASFLAGS): new variable
1104 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1105 (FREEBSD_MODTYPE_KERNEL64): likewise
1106 (grub_bsd64_trampoline_start): likewise
1107 (grub_bsd64_trampoline_end): likewise
1108 (grub_bsd64_trampoline_selfjump): likewise
1109 (grub_bsd64_trampoline_gdt): likewise
1110 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1111 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1112 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1113 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1114 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1115 of "attrib" member
1116 * loader/i386/bsd_pagetable.c: new file
1117 * loader/i386/bsd_trampoline.S: likewise
1118 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1119 (ALIGN_VAR): likewise
1120 (entry_hi): new variable
1121 (kern_end_mdofs): likewise
1122 (is_64bit): likewise
1123 (grub_freebsd_add_meta): use ALIGN_VAR
1124 (grub_e820_mmap): new declaration
1125 (grub_freebsd_add_mmap): new function
1126 (grub_freebsd_add_meta_module): support 64 bit kernels
1127 (grub_freebsd_list_modules): use ALIGN_VAR
1128 (gdt_descriptor): new declaration
1129 (grub_freebsd_boot): support 64 bit kernels
1130 (grub_bsd_elf64_hook): new function
1131 (grub_bsd_load_elf): support elf64
1132
1133 2009-05-03 Bean <bean123ch@gmail.com>
1134
1135 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1136 after we get the result of if statement.
1137
1138 2009-05-03 Bean <bean123ch@gmail.com>
1139
1140 * Makefile.in (enable_efiemu): New variable.
1141
1142 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1143 set.
1144 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1145 path.
1146 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1147 path, add -mno-red-zone option.
1148 (efiemu64_s.o): Likewise.
1149 (efiemu64.o): Use macro $^ for source file.
1150
1151 * configure.ac (--enable-efiemu): New option.
1152
1153 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1154
1155 xnu support
1156
1157 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1158 (pkglib_MODULES): add xnu.mod
1159 (xnu_mod_SOURCES): new variable
1160 (xnu_mod_CFLAGS): likewise
1161 (xnu_mod_LDFLAGS): likewise
1162 (xnu_mod_ASFLAGS): likewise
1163 * conf/i386-pc.rmk: likewise
1164 * conf/x86_64-efi.rmk: likewise
1165 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1166 new declaration
1167 * include/grub/i386/macho.h: new file
1168 * include/grub/i386/xnu.h: likewise
1169 * include/grub/macho.h: likewise
1170 * include/grub/machoload.h: likewise
1171 * include/grub/x86_64/macho.h: likewise
1172 * include/grub/x86_64/xnu.h: likewise
1173 * include/grub/xnu.h: likewise
1174 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1175 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1176 * loader/i386/efi/xnu.c: new file
1177 * loader/i386/pc/xnu.c: likewise
1178 * loader/i386/xnu.c: likewise
1179 * loader/i386/xnu_helper.S: likewise
1180 * loader/macho.c: likewise
1181 * loader/xnu.c: likewise
1182 * loader/xnu_resume.c: likewise
1183 * util/grub-dumpdevtree: likewise
1184 * include/grub/i386/pit.h: include grub/err.h
1185 (grub_pit_wait): export
1186 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1187
1188 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1189
1190 Efiemu
1191
1192 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1193 _linux_efi, linux_efi.
1194 new files in grub-emu
1195 new targets efiemu32.o and efiemu64.o
1196 * loader/linux_normal_efiemu.c: likewise
1197 * loader/i386/efi/linux.c: added preliminary efiemu support
1198 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1199 files to copy
1200 * include/grub/autoefi.h: new file
1201 * include/grub/i386/efiemu.h: likewise
1202 * include/grub/i386/pc/efiemu.h: likewise
1203 * include/grub/efi/api.h: add LL suffix when necessary
1204 new definitions relating to tables
1205 * include/grub/efiemu/efiemu.h: new file
1206 * include/grub/efiemu/runtime.h: likewise
1207 * efiemu/prepare.c: likewise
1208 * efiemu/loadcore_common.c: likewise
1209 * efiemu/loadcore64.c: likewise
1210 * efiemu/runtime/efiemu.sh: likewise
1211 * efiemu/runtime/efiemu.S: likewise
1212 * efiemu/runtime/efiemu.c: likewise
1213 * efiemu/runtime/config.h: likewise
1214 * efiemu/prepare32.c: likewise
1215 * efiemu/main.c: likewise
1216 * efiemu/modules/pnvram.c: likewise
1217 * efiemu/modules/i386: likewise
1218 * efiemu/modules/i386/pc: likewise
1219 * efiemu/modules/acpi.c: likewise
1220 * efiemu/i386/pc/cfgtables.c: likewise
1221 * efiemu/i386/loadcore64.c: likewise
1222 * efiemu/i386/loadcore32.c: likewise
1223 * efiemu/prepare64.c: likewise
1224 * efiemu/loadcore.c: likewise
1225 * efiemu/symbols.c: likewise
1226 * efiemu/mm.c: likewise
1227 * efiemu/loadcore32.c: likewise
1228
1229 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1230
1231 ACPI spoofing
1232
1233 * commands/acpi.c: new file
1234 * commands/i386/pc/acpi.c: likewise
1235 * commands/efi/acpi.c: likewise
1236 * include/grub/acpi.h: likewise
1237 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1238 (acpi_mod_SOURCES): new variable
1239 (acpi_mod_CFLAGS): likewise
1240 (acpi_mod_LDFLAGS): likewise
1241 * conf/i386-efi.rmk: likewise
1242 * conf/x86_64-efi.rmk: likewise
1243
1244 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1245
1246 Missing part from mmap patch
1247
1248 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1249 (grub_mmap_unregister)
1250 (grub_mmap_free_and_unregister): use grub_mmap_register
1251
1252 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1253
1254 Mmap services
1255
1256 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1257 * loader/i386/linux.c (find_mmap_size): likewise
1258 (allocate_pages): likewise
1259 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1260 (grub_fill_multiboot_mmap): likewise
1261 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1262 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1263 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1264 (OPENBSD_MMAP_RESERVED): likewise
1265 * include/grub/i386/pc/memory.h: include grub/memory.h
1266 (grub_lower_mem): removed
1267 (grub_upper_mem): likewise
1268 (GRUB_MACHINE_MEMORY_ACPI): new definition
1269 (GRUB_MACHINE_MEMORY_NVS): likewise
1270 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1271 (GRUB_MACHINE_MEMORY_HOLE): likewise
1272 (grub_machine_mmap_register): likewise
1273 (grub_machine_mmap_unregister): likewise
1274 (grub_machine_get_upper): likewise
1275 (grub_machine_get_lower): likewise
1276 (grub_machine_get_post64): likewise
1277 * include/grub/i386/efi/memory.h: new file
1278 * include/grub/x86_64/efi/memory.h: likewise
1279 * include/grub/efi/memory.h: likewise
1280 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1281 (mmap_mod_SOURCES): new variable
1282 (mmap_mod_LDFLAGS): likewise
1283 (mmap_mod_ASFLAGS): likewise
1284 * conf/i386-coreboot.rmk: likewise
1285 * conf/i386-ieee1275.rmk: likewise
1286 * conf/i386-efi.rmk: likewise
1287 * conf/x86_64-efi.rmk: likewise
1288 * include/grub/types.h (UINT_TO_PTR): new macro
1289 (PTR_TO_UINT32): likewise
1290 (PTR_TO_UINT64): likewise
1291 * include/grub/memory.h: new file
1292 * mmap/i386/pc/mmap.c: likewise
1293 * mmap/i386/pc/mmap_helper.S: likewise
1294 * mmap/i386/uppermem.c: likewise
1295 * mmap/mmap.c: likewise
1296 * mmap/efi/mmap.c: likewise
1297 * kern/i386/coreboot/init.c (grub_machine_init): don't use
1298 grub_upper_mem
1299 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1300 (grub_upper_mem): likewise
1301 (grub_machine_init): don't use grub_upper_mem,
1302 make grub_lower_mem local
1303 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1304 grub_mmap_iterate and grub_mmap_get_upper
1305 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1306
1307 2009-05-02 Bean <bean123ch@gmail.com>
1308
1309 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1310 script/sh/parser.y.
1311 (pkglib_MODULES): Add normal.mod and sh.mod.
1312 (normal_SOURCES): New variable.
1313 (normal_mod_CFLAGS): Likewise.
1314 (normal_mod_LDFLAGS): Likewise.
1315 (sh_mod_SOURCES): Likewise.
1316 (sh_mod_CFLAGS): Likewise.
1317 (sh_mod_LDFLAGS): Likewise.
1318
1319 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1320 script/sh/lexer.c_DEPENDENCIES.
1321 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1322 kern/rescue_reader.c and kern/rescue_parser.c.
1323 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1324 (grub_emu_SOURCES): Change source files.
1325 (pkglib_MODULES): Remove normal.mod.
1326 (normal_SOURCES): Removed.
1327 (normal_mod_CFLAGS): Likewise.
1328 (normal_mod_LDFLAGS): Likewise.
1329 * conf/i386-coreboot.rmk: Likewise.
1330 * conf/i386-efi.rmk: Likewise.
1331 * conf/i386-ieee1276.rmk: Likewise.
1332 * conf/powerpc-ieee1275.rmk: Likewise.
1333 * conf/sparc64-ieee1275.rmk: Likewise.
1334 * conf/x86_64-efi.rmk: Likewise.
1335
1336 * include/grub/command.h (grub_command_execute): New inline function.
1337
1338 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1339
1340 * include/grub/normal.h: Remove <grub/setjmp.h>.
1341 (grub_fs_module_list): Moved to normal/autofs.c.
1342 (grub_exit_env): Removed.
1343 (grub_command_execute): Likewise.
1344 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1345 parameter script.
1346 (read_command_list): New function declaration.
1347 (read_fs_list): Likewise.
1348
1349 * include/parser.h: Include <grub/reader.h>.
1350 (grub_parser_split_cmdline): Change type of getline parameter.
1351 (grub_parser): New structure.
1352 (grub_parser_class): New variable.
1353 (grub_parser_execute): New function declaration.
1354 (grub_register_rescue_parser): Likewise.
1355 (grub_parser_register): New inline function.
1356 (grub_parser_unregister): Likewise.
1357 (grub_parser_get_current): Likewise.
1358 (grub_parser_set_current): Likewise.
1359
1360 * include/grub/reader.h: New file.
1361 * kern/reader.c: Likewise.
1362 * kern/rescue_parser.c: Likewise.
1363 * kern/rescue_reader.c: Likewise.
1364 * normal/autofs.c: Likewise.
1365 * normal/dyncmd.c: Likewise.
1366
1367 * include/grub/rescue.h: Removed.
1368 * normal/command.h: Likewise.
1369
1370 * include/grub/script.h: Moved to ...
1371 * include/grub/script_sh.h: ... Moved here.
1372 * normal/execute.c: Moved to ...
1373 * script/sh/execute.c: ... Moved here.
1374 * normal/function.c: Moved to ...
1375 * script/sh/function.c: ... Moved here.
1376 * normal/lexer.c: Moved to ...
1377 * script/sh/lexer.c: ... Moved here.
1378 * normal/parser.y: Moved to ...
1379 * script/sh/parser.y: ... Moved here.
1380 * normal/script.c: Moved to ...
1381 * script/sh/script.c: ... Moved here.
1382
1383 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1384 <grub/reader.h>.
1385 (grub_exit_env): Removed.
1386 (fs_module_list): Moved to normal/autofs.c.
1387 (grub_file_getline): Don't handle comment here.
1388 (free_menu): Skip removed field entry->commands.
1389 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1390 script parameter.
1391 (read_config_file): Removed nested parameter, change getline function.
1392 (grub_enter_normal_mode): Removed.
1393 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1394 (read_command_list): Likewise.
1395 (autoload_fs_module): Moved to normal/autofs.c.
1396 (read_fs_list): Likewise.
1397 (reader_nested): New variable.
1398 (grub_normal_execute): Run parser.sh to switch to sh parser.
1399 (grub_cmd_rescue): Removed.
1400 (cmd_normal): Removed.
1401 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1402 rescue command.
1403 (grub_cmdline_run): New function.
1404 (grub_normal_reader_init): Likewise.
1405 (grub_normal_read_line): Likewise.
1406 (grub_env_write_pager): Likewise.
1407 (cmdline): New variable.
1408 (grub_normal_reader): Likewise.
1409 (GRUB_MOD_INIT): Register normal reader and set as current, register
1410 pager hook, register normal command with grub_register_command_prio,
1411 so that it won't show up in command.lst.
1412 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1413 grub_fs_autoload_hook.
1414
1415 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1416 (grub_menu_execute_entry): Replace grub_script_execute with
1417 grub_parser_execute, change parameter to grub_command_execute.
1418
1419 * normal/menu_text.c: Remove <grub/script.h>.
1420
1421 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1422 and <grub/parser.h>.
1423 (run): Change editor_getline to use new parser interface. Change
1424 parameter to grub_command_execute.
1425
1426 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1427 <grub/reader.h> and <grub/parser.h>.
1428 (grub_load_normal_mode): Execute normal command.
1429 (grub_main): Call grub_register_core_commands,
1430 grub_register_rescue_parser and grub_register_rescue_reader, use
1431 grub_reader_loop to enter input loop.
1432
1433 * kern/parser.c (grub_parser_split_cmdline): Change type of
1434 getline parameter.
1435 (grub_parser_class): New variable.
1436 (grub_parser_execute): New function.
1437
1438 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1439 * loader/multiboot2.c: Likewise.
1440 * loader/sparc64/ieee1275/linux.c: Likewise.
1441
1442 * util/grub-emu.c (read_command_list): New dummy function.
1443
1444 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1445
1446 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1447 count to 16 for CCISS and IDA.
1448
1449 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1450
1451 * normal/menu_text.c (grub_wait_after_message): Print a newline
1452 after waiting for user input.
1453
1454 * loader/i386/linux.c: Include `<grub/normal.h>'.
1455 (grub_cmd_linux): Improve the error message about `ask' mode, by
1456 waiting for user input so it's not missed (we can do this, since
1457 user requested interaction).
1458
1459 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1460
1461 Added missing lst to grub-mkrescue
1462
1463 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1464 and ${input_dir}/parttool.lst
1465
1466 2009-04-30 David S. Miller <davem@davemloft.net>
1467
1468 * util/hostdisk.c (device_is_wholedisk): New function.
1469 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1470 zero only if device_is_wholedisk() returns true.
1471
1472 * util/hostdisk.c (convert_system_partition_to_system_disk):
1473 Handle virtual disk devices named /dev/vdiskX as found on sparc
1474 and powerpc.
1475
1476 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1477 lettered partition specifier is found, convert to numbered.
1478
1479 2009-04-29 David S. Miller <davem@davemloft.net>
1480
1481 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1482 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1483
1484 * normal/command.c: Add missing newline at end of file.
1485
1486 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1487 warnings.
1488 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1489 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1490 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1491 ihandles have a 32-bit type but need to be stored in a "void *".
1492
1493 2009-04-28 Pavel Roskin <proski@gnu.org>
1494
1495 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1496 not disk. Adjust all dependencies.
1497 (grub_fs_uuid_close): Use grub_device_close(), not
1498 grub_disk_close().
1499
1500 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1501 parent's partition, don't copy it by reference, as it gets freed
1502 on close.
1503
1504 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1505
1506 Preboot hooks support
1507
1508 * commands/boot.c (struct grub_preboot_t): new declaration
1509 (preboots_head): new variable
1510 (preboots_tail): likewise
1511 (grub_loader_register_preboot_hook): new function
1512 (grub_loader_unregister_preboot_hook): likewise
1513 (grub_loader_set): launch preboot hooks
1514 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1515 (grub_loader_register_preboot_hook): new declaration
1516 (grub_loader_unregister_preboot_hook): likewise
1517
1518 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1519
1520 Warning fix
1521
1522 * disk/scsi.c (grub_scsi_open): added missing cast when
1523 calling grub_dprintf
1524
1525 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1526
1527 Bug and warning fixes
1528
1529 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1530 declaration
1531 * commands/test.c (test_parse): fixed bug with file tests and corrected
1532 declaration of find_file
1533
1534 2009-04-26 Pavel Roskin <proski@gnu.org>
1535
1536 * Makefile.in: Don't install empty manual pages if help2man is
1537 missing. Use help2man option for output, not shell redirection.
1538
1539 2009-04-26 David S. Miller <davem@davemloft.net>
1540
1541 * util/grub-mkdevicemap.c (make_device_map): Add missing
1542 NESTED_FUNC_ATTR to process_device().
1543
1544 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1545
1546 Test command
1547
1548 * commands/test.c: rewritten to use bash-like test
1549
1550 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1551
1552 Parttool autoloading and improvements
1553
1554 * Makefile.in (pkglib_DATA): add parttool.lst
1555 (parttool.lst): new target
1556 * genmk.rb: generate parttool-*
1557 (CLEANFILES): add #{parttool}
1558 (PARTTOOLFILES): new variable
1559 * genparttoollist.sh: new file
1560 * parttool/pcpart.c (grub_pcpart_boot): more feedback
1561 (grub_pcpart_type): likewise
1562 * commands/parttool.c (helpmsg): new variable
1563 (grub_cmd_parttool): output help if not enough arguments are supplied
1564 autoload modules
1565 (GRUB_MOD_INIT(parttool)): use helpmsg
1566
1567 2009-04-24 David S. Miller <davem@davemloft.net>
1568
1569 Avoiding opening same device multiple times in device iterator.
1570
1571 * kern/device.c: (grub_device_iterate): Define struct part_ent,
1572 and use it to build a list of partitions in iterate_disk() and
1573 iterate_partition().
1574
1575 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1576 on disk->data.
1577
1578 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1579 grub_devalias_iterate() result instead of unconditional 0.
1580 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1581 Also, capture hook return value, either directly or via
1582 grub_children_iterate(), and propagate to caller.
1583 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1584 grub_children_iterate): Return value is now 'int' instead of
1585 'grub_err_t'.
1586 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1587 like a proper iterator, stopping when hooks return non-zero.
1588 (grub_devalias_iterate): Likewise.
1589
1590 2009-04-23 David S. Miller <davem@davemloft.net>
1591
1592 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1593
1594 2009-04-22 David S. Miller <davem@davemloft.net>
1595
1596 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1597 is larger than address_cells, use that value for address_cells too.
1598
1599 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1600 IEEE1275_MAX_PATH_LEN): Define.
1601 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1602 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1603 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1604 'devtype'. Explicitly NULL terminate devalias expansion.
1605
1606 * util/sparc64/ieee1275/misc.c: New file.
1607 * util/sparc64/ieee1275/grub-setup.c: New file.
1608 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1609 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1610 * util/sparc64/ieee1275/grub-install.in: New file.
1611 * util/ieee1275/ofpath.c: New file.
1612 * util/ieee1275/devicemap.c: New file.
1613 * util/devicemap.c: New file.
1614 * util/deviceiter.c: New file.
1615 * kern/sparc64/ieee1275/init.c: New file.
1616 * include/grub/util/ofpath.h: New file.
1617 * include/grub/util/deviceiter.h: New file.
1618 * util/grub-mkdevicemap.c: Include deviceiter.h.
1619 Implement using grub_util_emit_devicemap_entry and
1620 grub_util_iterate_devices.
1621 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1622 util/devicemap.c into grub-mkdevicemap
1623 * conf/i386-efi.rmk: Likewise.
1624 * conf/i386-ieee1275.rmk: Likewise.
1625 * conf/i386-pc.rmk: Likewise.
1626 * conf/powerpc-ieee1275.rmk: Likewise.
1627 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1628 images and installation utilities. Build kernel as image
1629 instead of as elf binary. Use common rules as much as possible.
1630
1631 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
1632
1633 Correct GPT definition
1634
1635 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1636 of "attrib" member
1637
1638 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
1639
1640 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1641
1642 2009-04-19 David S. Miller <davem@davemloft.net>
1643
1644 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1645 (grub_rescue_cmd_linux): Rename to...
1646 (grub_cmd_linux): and fix prototype.
1647 (grub_rescue_cmd_initrd): Rename to...
1648 (grub_cmd_initrd): and fix prototype.
1649 (cmd_linux, cmd_initrd): New.
1650 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1651 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1652
1653 2009-04-17 Pavel Roskin <proski@gnu.org>
1654
1655 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1656 format.
1657 (grub_ohci_transfer): Likewise.
1658
1659 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1660
1661 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1662 return without a value. Fix inconsistent indentation.
1663
1664 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1665 match struct grub_fs.
1666
1667 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1668 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1669 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1670 * commands/lspci.c (grub_lspci_iter): Likewise.
1671
1672 2009-04-16 Bean <bean123ch@gmail.com>
1673
1674 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1675 value.
1676
1677 2009-04-15 Pavel Roskin <proski@gnu.org>
1678
1679 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1680 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1681 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1682 definitions.
1683
1684 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1685
1686 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1687 that no multiple data or metadata areas are supported and `Unknown
1688 metadata header'.
1689
1690 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1691
1692 Move loader out of the kernel
1693
1694 * kern/loader.c: moved to ...
1695 * commands/boot.c: ... moved here
1696 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1697 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1698 * include/grub/kernel.h (grub_machine_fini): export
1699 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1700 (grub_loader_set): likewise
1701 (grub_loader_unset): likewise
1702 (grub_loader_boot): likewise
1703 * conf/common.rmk: new module boot.mod
1704 (pkglib_MODULES): add boot.mod
1705 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1706 (grub_emu_SOURCES): likewise
1707 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1708 (grub_emu_SOURCES): likewise
1709 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1710 (grub_emu_SOURCES): likewise
1711 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1712 (grub_emu_SOURCES): likewise
1713 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1714 (grub_emu_SOURCES): likewise
1715 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1716 (grub_emu_SOURCES): likewise
1717 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1718 (grub_emu_SOURCES): likewise
1719
1720 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1721
1722 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1723
1724 * kern/misc.c (grub_itoa): Removed function
1725 (grub_ltoa): likewise
1726 (grub_vsprintf): use grub_lltoa
1727
1728 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1729
1730 Restore grub-emu
1731
1732 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1733 * conf/i386-coreboot.rmk: likewise
1734 * conf/i386-ieee1275.rmk: likewise
1735 * conf/powerpc-ieee1275.rmk: likewise
1736
1737 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1738
1739 * INSTALL: Add that `./autogen.sh' needs to be run before
1740 `./configure.'.
1741
1742 2009-04-14 Bean <bean123ch@gmail.com>
1743
1744 * Makefile.in (pkglib_DATA): Add handler.lst.
1745 (handler.lst): New rule.
1746
1747 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1748 * conf/i386-coreboot.rmk: Likewise.
1749 * conf/i386-ieee1275.rmk: Likewise.
1750 * conf/i386-efi.rmk: Likewise.
1751 * conf/x86_64-efi.rmk: Likewise.
1752 * conf/powerpc-ieee1275.rmk: Likewise.
1753 * conf/sparc64-ieee1275.rmk: Likewise.
1754
1755 * genhandlerlist.sh: New file.
1756
1757 * genmk.rb: Add rules to generate handler.lst.
1758
1759 * include/grub/normal.h (grub_file_getline): New function definition.
1760 (read_handler_list): Likewise.
1761 (free_handler_list): Likewise.
1762
1763 * include/grub/term.h (grub_term_register_input): Add name parameter
1764 for auto generation of handler.lst.
1765 (grub_term_register_output): Likewise.
1766
1767 * normal/handler.c: New file.
1768
1769 * normal/main.c (get_line): Renamed to grub_file_getline.
1770 (read_config_file): Use the newly renamed grub_file_getline.
1771 (read_command_list): Likewise.
1772 (read_fs_list): Likewise.
1773 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1774 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1775
1776 * term/efi/console.c (grub_console_init): Add name parameter for auto
1777 generation of handler.lst.
1778 * term/gfxterm.c: Likewise.
1779 * term/i386/pc/at_keyboard.c: Likewise.
1780 * term/i386/pc/console.c: Likewise.
1781 * term/i386/pc/serial.c: Likewise.
1782 * term/i386/pc/vesafb.c: Likewise.
1783 * term/i386/pc/vga.c: Likewise.
1784 * term/i386/pc/vga_text.c: Likewise.
1785 * term/ieee1275/ofconsole.c: Likewise.
1786 * term/usb_keyboard.c: Likewise.
1787
1788 2009-04-14 Bean <bean123ch@gmail.com>
1789
1790 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1791 properly with null character.
1792
1793 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1794
1795 * configure: Remove.
1796 * config.h.in: Likewise.
1797 * stamp-h.in: Likewise.
1798 * DISTLIST: Likewise.
1799 * conf/common.mk: Likewise.
1800 * conf/i386-coreboot.mk: Likewise.
1801 * conf/i386-efi.mk: Likewise.
1802 * conf/i386-ieee1275.mk: Likewise.
1803 * conf/i386.mk: Likewise.
1804 * conf/i386-pc.mk: Likewise.
1805 * conf/powerpc-ieee1275.mk: Likewise.
1806 * conf/sparc64-ieee1275.mk: Likewise.
1807 * conf/x86_64-efi.mk: Likewise.
1808
1809 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1810 develop on GRUB.
1811
1812 2009-04-14 John Stanley <jpsinthemix@verizon.net>
1813 David S. Miller <davem@davemloft.net>
1814
1815 * util/hostdisk.c (make_device_name): Fix buffer length
1816 calculations.
1817
1818 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1819
1820 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1821 <sys/param.h> and <sys/sysctl.h>.
1822 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1823 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1824 opening the device and reset them afterwards.
1825
1826 2009-04-13 Pavel Roskin <proski@gnu.org>
1827
1828 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1829 Reported by John Stanley <jpsinthemix@verizon.net>
1830
1831 2009-04-13 Robert Millan <rmh@aybabtu.com>
1832
1833 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1834 that name for menuentries when appropriate.
1835
1836 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1837
1838 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1839
1840 2009-04-13 Robert Millan <rmh@aybabtu.com>
1841
1842 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1843 to Linux, simply abort telling the user it's no longer supported.
1844
1845 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1846
1847 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1848 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
1849 `freebsd_loadenv' only when devices.hints exist.
1850
1851 2009-04-13 Pavel Roskin <proski@gnu.org>
1852
1853 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1854
1855 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1856
1857 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1858 partition number.
1859 (grub_drive): Likewise.
1860
1861 2009-04-13 David S. Miller <davem@davemloft.net>
1862
1863 * kern/sparc64/ieee1275/ieee1275.c: New file.
1864 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1865 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1866 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1867 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1868 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1869 grub_ieee1275_alloc_physmem): Declare new exported functions.
1870
1871 * include/grub/sparc64/ieee1275/loader.h: New file.
1872 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1873 * include/grub/sparc64/kernel.h: Likewise.
1874 * loader/sparc64/ieee1275/linux.c: Likewise.
1875
1876 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1877 (grub_fstest_SOURCES): Likewise.
1878
1879 * util/hostdisk.c (make_device_name): Do not make any assumptions
1880 about the length of drive names.
1881
1882 * kern/dl.c (grub_dl_load_file): Close file immediately when
1883 we are done using it.
1884
1885 2009-04-12 David S. Miller <davem@davemloft.net>
1886
1887 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1888 values. Noticed by Pavel Roskin.
1889
1890 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1891 target compiler.
1892
1893 * genmk.rb: Add more flexible image type specification, also
1894 pass --strip-unneeded to objcopy.
1895 * conf/i386-pc.rmk: Use *_FORMAT.
1896 * conf/i386-pc.mk: Rebuilt.
1897
1898 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1899 (OFDISK_HASH_SZ): Define.
1900 (ofdisk_hash): New hash table.
1901 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1902 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1903 instead of device phandle which is not unique.
1904
1905 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1906 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1907 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1908 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1909 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1910 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1911 GRUB_KERNEL_MACHINE_DATA_END): Define.
1912 (grub_kernel_image_size, grub_total_module_size): Declare.
1913
1914 2009-04-12 Pavel Roskin <proski@gnu.org>
1915
1916 * configure.ac: Change the logic when we check for target tools.
1917 Do it when the target is specified and it's different from the
1918 specified value of the host.
1919
1920 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1921
1922 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1923 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1924 GNU/kFreeBSD. Check if a device is a character device. Use
1925 DIOCGMEDIASIZE to get the size.
1926 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1927 support for GNU/kFreeBSD.
1928 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1929 is a character device instead of a block device. Add support for
1930 FreeBSD device names.
1931
1932 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1933 is a character device instead of a block device.
1934
1935 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1936 is a character device instead of a block device.
1937
1938 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1939
1940 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1941 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1942 FreeBSD. Check if a device is a character device. Use
1943 DIOCGMEDIASIZE to get the size.
1944 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1945 support for FreeBSD.
1946 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1947 is a character device instead of a block device. Add support for
1948 FreeBSD device names.
1949
1950 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1951 a character device instead of a block device.
1952 (grub_util_check_char_device): New function.
1953
1954 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1955 a character device instead of a block device.
1956
1957 * include/grub/util/getroot.h (grub_util_check_char_device): New
1958 prototype.
1959
1960 2009-04-11 David S. Miller <davem@davemloft.net>
1961
1962 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1963 static libgcc.
1964 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1965 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1966 function, if present.
1967 (__bswapdi2): Likewise.
1968
1969 * include/grub/sparc64/ieee1275/boot.h: New file.
1970 * boot/sparc64/ieee1275/boot.S: Likewise.
1971 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1972
1973 * kern/misc.c (grub_ltoa): New function.
1974 (grub_vsprintf): Use it to format 'long' integers.
1975
1976 2009-04-10 David S. Miller <davem@davemloft.net>
1977
1978 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1979 slots are of type grub_ieee1275_cell_t.
1980 (grub_nand_read): Likewise.
1981 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1982 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1983 macros are used to compare values in arg/ret block of the call.
1984 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1985 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1986 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1987 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1988 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1989 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1990 grub_ieee1275_close, grub_ieee1275_set_property,
1991 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1992 grub_ieee1275_cell_t.
1993 * kern/ieee1275/openfw.c (grub_map): Likewise.
1994 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1995 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1996
1997 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1998 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1999 (grub_devalias_iterate): Likewise.
2000
2001 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2002
2003 UFS improvements
2004
2005 * fs/ufs.c (INODE_NBLOCKS): new definition
2006 (struct grub_ufs_dirent): added fields for non-BSD dirents
2007 (grub_ufs_get_file_block): fixed double indirect handling
2008 (grub_ufs_lookup_symlink): use more robust way to determine whether
2009 symlink is inline
2010 (grub_ufs_find_file): support for non-BSD dirents
2011 (grub_ufs_dir): support for non-BSD dirents
2012
2013 2009-04-10 Bean <bean123ch@gnail.com>
2014
2015 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2016 attribute, otherwise the size would be wrong for i386 platform.
2017
2018 * include/grub/pci.h (grub_pci_read_word): New inline function.
2019 (grub_pci_read_byte): Likewise.
2020 (grub_pci_write): Likewise.
2021 (grub_pci_write_word): Likewise.
2022 (grub_pci_write_byte): Likewise.
2023
2024 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2025
2026 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2027 (find_framebuf): Scan pci to locate the frame buffer address.
2028
2029 * commands/efi/fixvideo.c: New file.
2030
2031 * commands/efi/loadbios.c: Likewise.
2032
2033 * commands/memrw.c: Likewise.
2034
2035 * util/grub-dumpbios.in: Likewise.
2036
2037 * conf/common.rmk (grub-dumpbios): New utility.
2038 (pkglib_MODULES): New module memrw.mod.
2039 (memrw_mod_SOURCE): New macro.
2040 (memrw_mod_CFLAGS): Likewise.
2041 (memrw_mod_LDFLAGS): Likewise.
2042
2043 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2044 fixvideo.mod.
2045 (loadbios_mod_SOURCE): New macro.
2046 (loadbios_mod_CFLAGS): Likewise.
2047 (loadbios_mod_LDFLAGS): Likewise.
2048 (fixvideo_mod_SOURCE): Likewise.
2049 (fixvideo_mod_CFLAGS): Likewise.
2050 (fixvideo_mod_LDFLAGS): Likewise.
2051
2052 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2053 fixvideo.mod.
2054 (loadbios_mod_SOURCE): New macro.
2055 (loadbios_mod_CFLAGS): Likewise.
2056 (loadbios_mod_LDFLAGS): Likewise.
2057 (fixvideo_mod_SOURCE): Likewise.
2058 (fixvideo_mod_CFLAGS): Likewise.
2059 (fixvideo_mod_LDFLAGS): Likewise.
2060
2061 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
2062
2063 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2064
2065 2009-04-07 David S. Miller <davem@davemloft.net>
2066
2067 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2068 support for R_SPARC_OLO10 relocations. Fix compile warning for
2069 R_SPARC_WDISP30 case.
2070 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2071
2072 2009-04-06 Pavel Roskin <proski@gnu.org>
2073
2074 * include/grub/misc.h (ARRAY_SIZE): New macro.
2075 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2076 New macro.
2077 * loader/i386/linux.c (allocate_pages): Use free_pages().
2078 (grub_linux_unload): Don't use free_pages().
2079 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2080 wrong index. Treat all other modes as text modes.
2081 (grub_cmd_linux): Initialize vid_mode unconditionally to
2082 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2083
2084 * commands/help.c (print_command_help): Use cmd->prio, not
2085 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2086
2087 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2088
2089 Parttool
2090
2091 * parttool/pcpart.c: new file
2092 * commands/parttool.c: likewise
2093 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2094 (parttool_mod_SOURCES): new variable
2095 (parttool_mod_CFLAGS): likewise
2096 (parttool_mod_LDFLAGS): likewise
2097 (pcpart_mod_SOURCES): likewise
2098 (pcpart_mod_CFLAGS): likewise
2099 (pcpart_mod_LDFLAGS): likewise
2100 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2101 and parttool/pcpart.c
2102 * conf/i386-efi.rmk: likewise
2103 * conf/i386-ieee1275.rmk: likewise
2104 * conf/i386-pc.rmk: likewise
2105 * conf/powerpc-ieee1275.rmk: likewise
2106 * conf/sparc64-ieee1275.rmk: likewise
2107 * conf/x86_64-ieee1275.rmk: likewise
2108
2109 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2110
2111 Support for mtime and further expandability of dir command
2112
2113 * include/grub/lib/datetime.h: moved to ...
2114 * include/grub/datetime.h: ... moved here and added
2115 declaration of grub_unixtime2datetime. All users updated
2116 * include/grub/fs.h: new syntax for dir and mtime functions in
2117 struct grub_fs
2118 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2119 and GRUB_FSHELP_FLAGS_MASK
2120 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2121 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2122 (grub_ext2_mtime): new function
2123 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2124 (grub_hfsplus_mtime): new function
2125 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2126 (GRUB_UFS_ATTR_FILE): likewise
2127 (GRUB_UFS_ATTR_LNK): likewise
2128 (struct grub_ufs_sblock): new fields mtime
2129 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2130 all users updated
2131 (grub_ufs_dir): mtime support
2132 (grub_ufs_mtime): new function
2133 * fs/affs.c (grub_affs_dir): use new dir syntax
2134 * fs/afs.c (grub_afs_dir): likewise
2135 * fs/cpio.c (grub_cpio_dir): likewise
2136 * fs/fat.c (grub_fat_find_dir): likewise
2137 * fs/hfs.c (grub_hfs_dir): likewise
2138 * fs/iso9660.c (grub_iso9660_dir): likewise
2139 * fs/jfs.c (grub_jfs_dir): likewise
2140 * fs/minix.c (grub_minix_dir): likewise
2141 * fs/ntfs.c (grub_ntfs_dir): likewise
2142 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2143 * fs/sfs.c (grub_sfs_dir): likewise
2144 * fs/xfs.c (grub_xfs_dir): likewise
2145 * util/hostfs.c (grub_hostfs_dir): likewise
2146 * lib/datetime.c: moved to ...
2147 * normal/datetime.c: ... moved here
2148 (grub_unixtime2datetime): new function
2149 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2150 * normal/completion.c (iterate_dir): use new dir syntax
2151 * normal/misc.c (grub_normal_print_device_info): tell the
2152 last modification time of a volume
2153 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2154 * conf/common.rmk: added lib/datetime.c to ls.mod
2155 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2156 (normal_mod_SOURCES): likewise
2157 (datetime_mod_SOURCES): Removed lib/datetime.c
2158 * conf/i386-efi.rmk: likewise
2159 * conf/i386-ieee1275.rmk: likewise
2160 * conf/i386-pc.rmk: likewise
2161 * conf/powerpc-ieee1275.rmk: likewise
2162 * conf/sparc64-ieee1275.rmk: likewise
2163 * conf/x86_64-efi.rmk: likewise
2164
2165 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2166
2167 Trim trailing spaces in FAT label and support mtools-like labels
2168
2169 * fs/fat.c (grub_fat_iterate_dir): New function based
2170 on grub_fat_find_dir
2171 (grub_fat_find_dir): use grub_fat_iterate_dir
2172 (grub_fat_label): likewise
2173
2174 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2175
2176 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2177 and command.h
2178 remove extraneous kernel_elf_HEADERS
2179
2180 2009-04-04 Bean <bean123ch@gnail.com>
2181
2182 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2183
2184 * util/misc.c: Likewise.
2185
2186 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2187
2188 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2189 instead of grub_printf.
2190
2191 2009-04-03 Robert Millan <rmh@aybabtu.com>
2192
2193 * loader/i386/linux.c (grub_linux_setup_video): Fill
2194 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2195 values from `mode info' structure instead of hardcoded
2196 values.
2197
2198 2009-04-01 Pavel Roskin <proski@gnu.org>
2199
2200 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2201 unused now.
2202 * genmk.rb: Likewise.
2203 * configure.ac: Likewise.
2204
2205 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2206
2207 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2208 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2209
2210 2009-04-01 David S. Miller <davem@davemloft.net>
2211
2212 * normal/sparc64/setjmp.S: Fix setjmp implementation.
2213 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2214 (grub_setjmp): Mark with 'returns_twice' attribute.
2215 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2216 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2217 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2218
2219 2009-04-01 Robert Millan <rmh@aybabtu.com>
2220
2221 Reapply fix from 2008-07-28 which was accidentally reverted; also
2222 perform the same fix to a similar check in same function.
2223
2224 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2225 with the same number are found, just use issue a warning with
2226 grub_dprintf(), as this error has been reported to be non-fatal.
2227
2228 2009-03-31 Pavel Roskin <proski@gnu.org>
2229
2230 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2231 for cross-compilation.
2232
2233 2009-03-30 Robert Millan <rmh@aybabtu.com>
2234
2235 Fix i386-ieee1275 build.
2236
2237 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2238 Remove declaration.
2239
2240 2009-03-30 Pavel Roskin <proski@gnu.org>
2241
2242 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2243 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2244 zero-terminated, rely only on the strlen value. Fix comparison
2245 of strings differing in length.
2246
2247 2009-03-30 Robert Millan <rmh@aybabtu.com>
2248
2249 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2250 checking for abi version. Improve error messages on BIOS to notify
2251 user about `linux16' command.
2252
2253 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2254
2255 Leak fixes
2256
2257 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2258 in case of collision
2259 * disk/scsi.c (grub_scsi_open): free scsi in case of error
2260
2261 2009-03-29 Robert Millan <rmh@aybabtu.com>
2262
2263 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2264 set `vid_mode' accordingly.
2265 (grub_linux_boot): Process `vid_mode' and set video mode.
2266
2267 2009-03-29 Robert Millan <rmh@aybabtu.com>
2268
2269 * util/grub.d/10_linux.in (linux_entry): New function.
2270 Factorize generation of Linux boot entries.
2271
2272 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2273
2274 Make the format of Environment Block plain text. The boot loader
2275 part is not tested well yet.
2276
2277 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2278 (buffer): Removed.
2279 (envblk): Likewise.
2280 (usage): Remove "info" and "clear". Add "unset". Update the
2281 description of "set", as this does not delete variables any
2282 longer.
2283 (create_envblk_file): Complete rewrite.
2284 (open_envblk_file): Likewise.
2285 (cmd_info): Removed.
2286 (cmd_list): Likewise.
2287 (cmd_set): Likewise.
2288 (cmd_clear): Likewise.
2289 (list_variables): New function.
2290 (write_envblk): Likewise.
2291 (set_variables): Likewise.
2292 (unset_variables): Likewise.
2293 (main): Complete rewrite.
2294
2295 * commands/loadenv.c (buffer): Removed.
2296 (envblk): Likewise.
2297 (open_envblk_file): New function.
2298 (read_envblk_file): Complete rewrite.
2299 (grub_cmd_load_env): Likewise.
2300 (grub_cmd_list_env): Likewise.
2301 (struct blocklist): New struct.
2302 (free_blocklists): New function.
2303 (check_blocklists): Likewise.
2304 (write_blocklists): Likewise.
2305 (grub_cmd_save_env): Complete rewrite.
2306
2307 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2308 a plain text signature.
2309 (GRUB_ENVBLK_MAXLEN): Removed.
2310 (struct grub_envblk): Complete rewrite.
2311 (grub_envblk_find): Removed.
2312 (grub_envblk_insert): Likewise.
2313 (grub_envblk_open): New prototype.
2314 (grub_envblk_set): Likewise.
2315 (grub_envblk_delete): Put const to VALUE.
2316 (grub_envblk_iterate): Put const to NAME and VALUE.
2317 (grub_envblk_close): New prototype.
2318 (grub_envblk_buffer): New inline function.
2319 (grub_envblk_size): Likewise.
2320
2321 * lib/envblk.c: Include grub/mm.h.
2322 (grub_env_find): Removed.
2323 (grub_envblk_open): New function.
2324 (grub_envblk_close): Likewise.
2325 (escaped_value_len): Likewise.
2326 (find_next_line): Likewise.
2327 (grub_envblk_insert): Removed.
2328 (grub_envblk_set): New function.
2329 (grub_envblk_delete): Complete rewrite.
2330 (grub_envblk_iterate): Likewise.
2331
2332 2009-03-28 Robert Millan <rmh@aybabtu.com>
2333
2334 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2335 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2336 variables. Use 16-bit loader.
2337 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2338 loader.
2339 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2340 (grub_linux16_boot): ... this. Update all users.
2341 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2342 (grub_linux_boot): ... this. Update all users.
2343
2344 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2345 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2346 commands to `linux16' and `initrd16'.
2347 (GRUB_MOD_FINI(linux)): Rename to ...
2348 (GRUB_MOD_FINI(linux16)): ... this.
2349
2350 2009-03-24 Pavel Roskin <proski@gnu.org>
2351
2352 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2353 not just for compilation.
2354
2355 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2356
2357 Move multiboot helper out of kernel
2358
2359 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2360 `loader/i386/multiboot_helper.S'.
2361 * conf/i386-coreboot.rmk: Likewise
2362 * conf/i386-ieee1275.rmk: Likewise
2363
2364 * kern/i386/loader.S: Move multiboot helpers from here...
2365 * loader/i386/multiboot_helper.S: ...moved here
2366 * include/grub/i386/loader.h: Move declarations of multiboot
2367 helpers from here...
2368 * include/grub/i386/multiboot.h: ...moved here
2369 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2370
2371 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2372
2373 * kern/env.c (grub_env_context_open): Added an argument to specify
2374 whether a new context inherits exported variables from current
2375 one. This is useful when making a sandbox to interpret a config
2376 file.
2377 All callers updated.
2378
2379 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2380
2381 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2382
2383 * kern/env.c (grub_env_context_close): Fix memory leaks.
2384
2385 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2386
2387 * normal/main.c (grub_normal_execute): Added an argument
2388 BATCH to specify if an interactive interface should be provided
2389 after reading a config file.
2390 All callers updated.
2391 (read_command_list): Prevent being executed twice.
2392 (read_fs_list): Likewise.
2393
2394 * include/grub/normal.h (grub_normal_execute): Updated the
2395 prototype.
2396
2397 2009-03-22 Pavel Roskin <proski@gno.org>
2398
2399 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2400 _start.
2401 * kern/i386/pc/startup.S: Likewise.
2402 * kern/i386/efi/startup.S: Likewise.
2403 * kern/i386/ieee1275/startup.S: Likewise.
2404 * kern/i386/coreboot/startup.S: Likewise.
2405 * kern/x86_64/efi/startup.S: Likewise.
2406
2407 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2408 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2409 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2410
2411 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2412
2413 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2414
2415 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2416 limit detection.
2417 Use vaddr of correct segment for entry_point.
2418
2419 2009-03-21 Bean <bean123ch@gmail.com>
2420
2421 * commands/blocklist.c: Add include file <grub/command.h>, remove
2422 <grub/normal.h> and <grub/arg.h>.
2423 (grub_cmd_blocklist): Use the new command interface.
2424 (GRUB_MOD_INIT): Likewise.
2425 (GRUB_MOD_FINI): Likewise.
2426 * commands/boot.c: Likewise.
2427 * commands/cat.c: Likewise.
2428 * commands/cmp.c: Likewise.
2429 * commands/configfile.c: Likewise.
2430 * commands/crc.c: Likewise.
2431 * commands/echo.c: Likewise.
2432 * commands/halt.c: Likewise.
2433 * commands/handler.c: Likewise.
2434 * commands/hdparm.c: Likewise.
2435 * commands/help.c: Likewise.
2436 * commands/hexdump.c: Likewise.
2437 * commands/loadenv.c: Likewise.
2438 * commands/ls.c: Likewise.
2439 * commands/lsmmap.c: Likewise.
2440 * commands/lspci.c: Likewise.
2441 * commands/loadenv.c: Likewise.
2442 * commands/read.c: Likewise.
2443 * commands/reboot.c: Likewise.
2444 * commands/search.c: Likewise.
2445 * commands/sleep.c: Likewise.
2446 * commands/test.c: Likewise.
2447 * commands/usbtest.c: Likewise.
2448 * commands/videotest.c: Likewise.
2449 * commands/i386/cpuid.c: Likewise.
2450 * commands/i386/pc/halt.c: Likewise.
2451 * commands/i386/pc/play.c: Likewise.
2452 * commands/i386/pc/pxecmd.c: Likewise.
2453 * commands/i386/pc/vbeinfo.c: Likewise.
2454 * commands/i386/pc/vbetest.c: Likewise.
2455 * commands/ieee1275/suspend.c: Likewise.
2456 * disk/loopback.c: Likewise.
2457 * font/font_cmd.c: Likewise.
2458 * hello/hello.c: Likewise.
2459 * loader/efi/appleloader.c: Likewise.
2460 * loader/efi/chainloader.c: Likewise.
2461 * loader/i386/bsd.c: Likewise.
2462 * loader/i386/efi/linux.c: Likewise.
2463 * loader/i386/ieee1275/linux.c: Likewise.
2464 * loader/i386/linux.c: Likewise.
2465 * loader/i386/pc/chainloader.c: Likewise.
2466 * loader/i386/pc/linux.c: Likewise.
2467 * loader/powerpc/ieee1275/linux.c: Likewise.
2468 * loader/multiboot_loader.c: Likewise.
2469 * term/gfxterm.c: Likewise.
2470 * term/i386/pc/serial.c: Likewise.
2471 * term/terminfo.c: Likewise.
2472
2473 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2474 * term/i386/pc/vga.c: Likewise.
2475 * video/readers/jpeg.c: Likewise.
2476 * video/readers/png.c: Likewise.
2477 * video/readers/tga.c: Likewise.
2478
2479 * util/grub-fstest (cmd_loopback): Removed.
2480 (cmd_blocklist): Likewise.
2481 (cmd_ls): Likewise.
2482 (grub_register_command): Likewise.
2483 (grub_unregister_command): Likewise.
2484 (execute_command): Use grub_command_find to locate command and execute
2485 it.
2486
2487 * include/grub/efi/chainloader.h: Removed.
2488 * loader/efi/chainloader_normal.c: Likewise.
2489 * loader/i386/bsd_normal.c: Likewise.
2490 * loader/i386/pc/chainloader_normal.c: Likewise.
2491 * loader/i386/pc/multiboot_normal.c: Likewise.
2492 * loader/linux_normal.c: Likewise.
2493 * loader/multiboot_loader_normal.c: Likewise.
2494 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2495
2496 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2497 and grub_register_command_p1.
2498
2499 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2500 kern/command.c, lib/arg.c and commands/extcmd.c.
2501 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2502 (minicmd_mod_SOURCES): New variable.
2503 (minicmd_mod_CFLAGS): Likewise.
2504 (minicmd_mod_LDFLAGS): Likewise.
2505 (extcmd_mod_SOURCES): Likewise.
2506 (extcmd_mod_CFLAGS): Likewise.
2507 (extcmd_mod_LDFLAGS): Likewise.
2508 (boot_mod_SOURCES): Removed.
2509 (boot_mod_CFLAGS): Likewise.
2510 (boot_mod_LDFLAGS): Likewise.
2511
2512 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2513 kern/corecmd.c.
2514 (kernel_img_HEADERS): Add command.h.
2515 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2516 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2517 and lib/arg.c.
2518 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2519 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2520 remove the corresponding normal mode command.
2521 (normal_mod_SOURCES): Remove normal/arg.c.
2522 * conf/i386-coreboot.rmk: Likewise.
2523 * conf/i386-efi.rmk: Likewise.
2524 * conf/i386-ieee1275.rmk: Likewise.
2525 * conf/powerpc-ieee1275.rmk: Likewise.
2526 * conf/x86_64-efi.rmk: Likewise.
2527
2528 * include/grub/arg.h: Move from here ...
2529 * include/grub/lib/arg.h: ... to here.
2530
2531 * normal/arg.c: Move from here ...
2532 * lib/arg.c: ... to here.
2533
2534 * commands/extcmd.c: New file.
2535 * commands/minicmd.c: Likewise.
2536 * include/grub/command.h: Likewise.
2537 * include/grub/extcmd.h: Likewise.
2538 * kern/command.c: Likewise.
2539 * kern/corecmd.c: Likewise.
2540
2541 * kern/list.c (grub_list_iterate): Return int instead of void.
2542 (grub_list_insert): New function.
2543 (grub_prio_list_insert): Likewise.
2544
2545 * kern/rescue.c (grub_rescue_command): Removed.
2546 (grub_rescue_command_list): Likewise.
2547 (grub_rescue_register_command): Likewise.
2548 (grub_rescue_unregister_command): Likewise.
2549 (grub_rescue_cmd_boot): Move to minicmd.c
2550 (grub_rescue_cmd_help): Likewise.
2551 (grub_rescue_cmd_info): Likewise.
2552 (grub_rescue_cmd_boot): Likewise.
2553 (grub_rescue_cmd_testload): Likewise.
2554 (grub_rescue_cmd_dump): Likewise.
2555 (grub_rescue_cmd_rmmod): Likewise.
2556 (grub_rescue_cmd_lsmod): Likewise.
2557 (grub_rescue_cmd_exit): Likewise.
2558 (grub_rescue_print_devices): Moved to corecmd.c.
2559 (grub_rescue_print_files): Likewise.
2560 (grub_rescue_cmd_ls): Likewise.
2561 (grub_rescue_cmd_insmod): Likewise.
2562 (grub_rescue_cmd_set): Likewise.
2563 (grub_rescue_cmd_unset): Likewise.
2564 (attempt_normal_mode): Use grub_command_find to get normal module.
2565 (grub_enter_rescue_mode): Use grub_register_core_commands to register
2566 commands, remove grub_rescue_register_command calls.
2567
2568 * normal/command.c (grub_register_command): Removed.
2569 (grub_unregister_command): Likewise.
2570 (grub_command_find): Likewise.
2571 (grub_iterate_commands): Likewise.
2572 (rescue_command): Likewise.
2573 (export_command): Moved to corecmd.c.
2574 (set_command): Removed.
2575 (unset_command): Likewise.
2576 (insmod_command): Likewise.
2577 (rmmod_command): Likewise.
2578 (lsmod_command): Likewise.
2579 (grub_command_init): Likewise.
2580
2581 * normal/completion.c (iterate_command): Use cmd->prio to check for
2582 active command.
2583 (complete_arguments): Use grub_extcmd_t structure to find options.
2584 (grub_normal_do_completion): Change function grub_iterate_commands to
2585 grub_command_iterate.
2586
2587 * normal/execute.c (grub_script_execute_cmd): No need to parse
2588 argument here.
2589
2590 * normal/main.c (grub_dyncmd_dispatcher): New function.
2591 (read_command_list): Register unload commands as dyncmd.
2592 (grub_cmd_normal): Use new command interface, register rescue,
2593 unregister normal at entry, register normal, unregister rescue at exit.
2594
2595 * include/grub/list.h (grub_list_test_t): New type.
2596 (grub_list_iterate): Return int instead of void.
2597 (grub_list_insert): New function.
2598 (GRUB_AS_NAMED_LIST_P): New macro.
2599 (GRUB_AS_PRIO_LIST): Likewise.
2600 (GRUB_AS_PRIO_LIST_P): Likewise.
2601 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2602 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2603 (grub_prio_list): New structure.
2604 (grub_prio_list_insert): New function.
2605 (grub_prio_list_remove): New inline function.
2606
2607 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2608 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2609 (GRUB_COMMAND_FLAG_MENU): Likewise.
2610 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2611 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2612 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2613 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2614 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2615 (grub_command): Likewise.
2616 (grub_register_command): Likewise.
2617 (grub_command_find): Likewise.
2618 (grub_iterate_commands): Likewise.
2619 (grub_command_init): Likewise.
2620 (grub_arg_parse): Likewise.
2621 (grub_arg_show_help): Likewise.
2622
2623 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2624 (grub_rescue_unregister_command): Likewise.
2625
2626 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2627 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2628 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2629
2630 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2631 grub_rescue_cmd_initrd.
2632 * include/grub/i386/loader.h: Likewise.
2633 * include/grub/x86_64/loader.h: Likewise.
2634
2635 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2636
2637 2009-03-21 Bean <bean123ch@gmail.com>
2638
2639 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2640 instead of stat in mingw environment.
2641
2642 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2643
2644 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2645
2646 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2647 AC_CONFIG_LINKS.
2648
2649 2009-03-21 Bean <bean123ch@gmail.com>
2650
2651 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2652 out of range error.
2653
2654 2009-03-18 Michel Dänzer <michel@daenzer.net>
2655
2656 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2657 checking inode flags for EXT4_EXTENTS_FLAG.
2658
2659 2009-03-18 Robert Millan <rmh@aybabtu.com>
2660
2661 * loader/i386/linux.c: Include `<grub/video.h>' and
2662 `<grub/i386/pc/vbe.h>'..
2663 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2664 (grub_linux32_boot): Attempt to configure video settings with
2665 grub_linux_setup_video().
2666 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2667 to avoid grub_console_fini() which would step out of graphical mode
2668 unconditionally.
2669
2670 2009-03-14 Robert Millan <rmh@aybabtu.com>
2671
2672 Fix build on powerpc.
2673 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2674
2675 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2676
2677 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2678 background image command.
2679
2680 2009-03-12 Colin D Bennett <colin@gibibit.com>
2681
2682 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2683 (grub_gfxterm_putchar): Extract pairs of identical calls to
2684 draw_cursor out of conditional blocks.
2685
2686 2009-03-11 Pavel Roskin <proski@gnu.org>
2687
2688 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2689 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2690
2691 2009-03-11 Robert Millan <rmh@aybabtu.com>
2692
2693 * loader/i386/multiboot_elfxx.c
2694 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2695
2696 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
2697
2698 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2699 `kern/handler.c'.
2700
2701 2009-03-11 Robert Millan <rmh@aybabtu.com>
2702
2703 * loader/i386/multiboot.c (code_size): New variable.
2704 (grub_multiboot): Define offsets by adding to `code_size' rather
2705 than subtracting from `grub_multiboot_payload_size'. Provide
2706 4-byte alignment to MBI and others by increasing
2707 `boot_loader_name_length' appropriately.
2708
2709 * loader/i386/multiboot_elfxx.c
2710 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2711
2712 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
2713
2714 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2715 `fs/ext2.c'.
2716
2717 2009-03-08 Robert Millan <rmh@aybabtu.com>
2718
2719 Make loader/i386/linux.c usable on i386-pc again.
2720
2721 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2722 memory to heap.
2723 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2724 `#error' stanza.
2725
2726 2009-03-07 Bean <bean123ch@gmail.com>
2727
2728 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2729 allocation.
2730
2731 2009-03-06 Robert Millan <rmh@aybabtu.com>
2732
2733 Fix display issue on terminals with screen size other than 80x25
2734 (e.g. gfxterm with resolution higher than 640x480).
2735
2736 * normal/main.c (grub_normal_init_page): Display title text in a
2737 position relative to the center of the terminal instead of relying
2738 on a hardcoded offset.
2739
2740 2009-03-04 Robert Millan <rmh@aybabtu.com>
2741
2742 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2743 installed.
2744
2745 * Makefile.in (host_kernel): New variable.
2746 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2747 scripts instead of just the windows one.
2748 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2749
2750 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2751
2752 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2753 `kern/handler.c'.
2754 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2755 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2756 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2757 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2758 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2759 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2760
2761 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2762
2763 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2764 or if there's no space for the disk label and print the partition number on a
2765 invalid magic.
2766
2767 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2768
2769 * util/misc.c: Include <time.h>.
2770 (grub_millisleep): New function.
2771
2772 2009-03-04 Bean <bean123ch@gmail.com>
2773
2774 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2775 another option -mno-red-zone.
2776
2777 * commands/handler.c: Change module description.
2778
2779 * kern/handler.c: Add missing space at the end of description line.
2780
2781 * kern/list.c: Likewise.
2782
2783 2009-03-03 Robert Millan <rmh@aybabtu.com>
2784
2785 Move more components to the relocation area, and fix mbi pointer
2786 handling to use the destination rather than the origin (thanks to
2787 Vladimir Serbinenko for spotting).
2788
2789 * loader/i386/multiboot.c (mbi_dest): New variable.
2790 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2791 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2792 relocation area.
2793
2794 2009-03-01 Bean <bean123ch@gmail.com>
2795
2796 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2797 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2798 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2799 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2800
2801 * loader/i386/efi/linux.c (acpi_guid): New variable.
2802 (acpi_guid): Likewise.
2803 (EBDA_SEG_ADDR): New constant.
2804 (LOW_MEM_ADDR): Likewise.
2805 (FAKE_EBDA_SEG): Likewise.
2806 (fake_bios_data): New function.
2807 (grub_linux_boot): Call fake_bios_data.
2808
2809 2009-03-01 Bean <bean123ch@gmail.com>
2810
2811 * commands/terminal.c: Removed.
2812
2813 * commands/handler.c: New file.
2814
2815 * include/grub/list.h: Likewise.
2816
2817 * include/grub/handler.h: Likewise.
2818
2819 * kern/list.c: Likewise.
2820
2821 * kern/handler.c: Likewise.
2822
2823 * kern/term.h: Include header file <grub/handler.h>.
2824 (grub_term_input): Move next field to the beginning.
2825 (grub_term_output): Likewise.
2826 (grub_term_input_class): New variable.
2827 (grub_term_output_class): Likewise.
2828 (grub_term_register_input): Changed to inline function.
2829 (grub_term_register_output): Likewise.
2830 (grub_term_unregister_input): Likewise.
2831 (grub_term_unregister_output): Likewise.
2832 (grub_term_set_current_input): Likewise.
2833 (grub_term_set_current_output): Likewise.
2834 (grub_term_get_current_input): Likewise.
2835 (grub_term_get_current_output): Likewise.
2836 (grub_term_iterate_input): Removed.
2837 (grub_term_iterate_output): Likewise.
2838
2839 * kern/term.c (grub_term_list_input): Removed.
2840 (grub_term_list_output): Likewise.
2841 (grub_term_input_class): New variable.
2842 (grub_term_output_class): Likewise.
2843 (grub_cur_term_input): Change variable as macro.
2844 (grub_cur_term_output): Likewise.
2845 (grub_term_register_input): Removed.
2846 (grub_term_register_output): Likewise.
2847 (grub_term_unregister_input): Likewise.
2848 (grub_term_unregister_output): Likewise.
2849 (grub_term_set_current_input): Likewise.
2850 (grub_term_set_current_output): Likewise.
2851 (grub_term_iterate_input): Likewise.
2852 (grub_term_iterate_output): Likewise.
2853 (grub_term_get_current_input): Likewise.
2854 (grub_term_get_current_output): Likewise.
2855
2856 * util/grub-editenv.c: Include header file <grub/handler.h>.
2857 (grub_term_get_current_input): Removed.
2858 (grub_term_get_current_output): Likewise.
2859 (grub_term_input_class): New variable.
2860 (grub_term_output_class): Likewise.
2861
2862 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2863 (grub_term_get_current_output): Likewise.
2864 (grub_term_input_class): New variable.
2865 (grub_term_output_class): Likewise.
2866
2867 * util/grub-probe.c (grub_term_get_current_input): Removed.
2868 (grub_term_get_current_output): Likewise.
2869 (grub_term_input_class): New variable.
2870 (grub_term_output_class): Likewise.
2871
2872 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2873 (grub_term_get_current_output): Likewise.
2874 (grub_term_input_class): New variable.
2875 (grub_term_output_class): Likewise.
2876
2877 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2878 (terminal_mod_SOURCES): Likewise.
2879 (terminal_mod_CFLAGS): Likewise.
2880 (terminal_mod_LDFLAGS): Likewise.
2881
2882 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2883 handler.c.
2884 (kernel_img_SOURCES): Add list.c and handler.c.
2885 (kernel_img_HEADERS): Add list.h and handler.h.
2886
2887 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2888 handler.c.
2889 (kernel_mod_SOURCES): Add list.c and handler.c.
2890 (kernel_mod_HEADERS): Add list.h and handler.h.
2891
2892 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2893 handler.c.
2894 (kernel_elf_SOURCES): Add list.c and handler.c.
2895 (kernel_elf_HEADERS): Add list.h and handler.h.
2896
2897 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2898 handler.c.
2899 (kernel_elf_SOURCES): Add list.c and handler.c.
2900 (kernel_elf_HEADERS): Add list.h and handler.h.
2901
2902 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2903 handler.c.
2904 (kernel_mod_SOURCES): Add list.c and handler.c.
2905 (kernel_mod_HEADERS): Add list.h and handler.h.
2906
2907 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2908 handler.c.
2909 (kernel_elf_SOURCES): Add list.c and handler.c.
2910 (kernel_elf_HEADERS): Add list.h and handler.h.
2911
2912 2009-02-27 Robert Millan <rmh@aybabtu.com>
2913
2914 Factorize elf32 / elf64 code in Multiboot loader. This will
2915 prevent it from getting out of sync again.
2916
2917 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2918 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2919 grub_multiboot_load_elf64): Move from here ...
2920 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2921 grub_multiboot_load_elf): ... to here (new file).
2922
2923 2009-02-27 Robert Millan <rmh@aybabtu.com>
2924
2925 * util/grub.d/10_linux.in: Rename "single-user mode" to
2926 "recovery mode".
2927
2928 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2929
2930 Don't leak in SCSI code.
2931 * disk/scsi.c (grub_scsi_close): free `scsi'.
2932
2933 2009-02-27 Robert Millan <rmh@aybabtu.com>
2934
2935 * loader/i386/pc/multiboot.c: Move from here ...
2936 * loader/i386/multiboot.c: ... to here. Update all users.
2937
2938 2009-02-27 Robert Millan <rmh@aybabtu.com>
2939
2940 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2941 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2942
2943 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2944
2945 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2946 b-tree.
2947
2948 2009-02-27 Robert Millan <rmh@aybabtu.com>
2949
2950 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2951 `0x' qualifier as 0 when base is specified as parameter).
2952
2953 2009-02-24 Bean <bean123ch@gmail.com>
2954
2955 * configure.ac: Check for -mcmodel=large in x86_64 target.
2956
2957 * include/grub/efi/api.h (efi_call_10): New macro.
2958 (efi_wrap_10): New function.
2959
2960 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2961 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2962 (GRUB_PE32_REL_BASED_LOW): Likewise.
2963 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2964 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2965 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2966 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2967 (GRUB_PE32_REL_BASED_REL): Likewise.
2968 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2969 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2970 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2971
2972 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2973 issue.
2974
2975 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2976 (efi_wrap_10): New function.
2977
2978 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2979
2980 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2981 MB/MBP model (NV chipset).
2982 (devdata_devs): Add devpath_5 to the list.
2983
2984 * load/i386/efi/linux.c (video_base): Remove variable.
2985 (RGB_MASK): New macro.
2986 (RGB_MAGIC): Likewise.
2987 (LINE_MIN): Likewise.
2988 (LINE_MAX): Likewise.
2989 (FBTEST_STEP): Likewise.
2990 (FBTEST_COUNT): Likewise.
2991 (fb_list): New variable.
2992 (grub_find_video_card): Remove function.
2993 (find_framebuf): New function.
2994 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2995 line length.
2996
2997 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2998 problem for x86_64.
2999
3000 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3001
3002 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3003
3004 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3005 coding tool name.
3006
3007 2009-02-22 Robert Millan <rmh@aybabtu.com>
3008
3009 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3010 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3011 in our relocation, instead of using it directly from heap. Also
3012 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3013
3014 2009-02-21 Robert Millan <rmh@aybabtu.com>
3015
3016 Implement USB keyboard support (based on patch by Marco Gerards)
3017
3018 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3019 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3020 (usb_keyboard_mod_LDFLAGS): New variables.
3021
3022 * term/usb_keyboard.c: New file.
3023
3024 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3025
3026 Corrected wrong declaration
3027
3028 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3029
3030 2009-02-14 Christian Franke <franke@computer.org>
3031
3032 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3033 (grub_lspci_iter): Print class code and programming interface byte.
3034
3035 2009-02-14 Christian Franke <franke@computer.org>
3036
3037 * gendistlist.sh: Ignore `.svn' directories.
3038
3039 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3040
3041 * fs/fat.c: Add 2009 to Copyright line.
3042
3043 2009-02-14 Christian Franke <franke@computer.org>
3044
3045 * commands/hdparm.c: New file. Provides `hdparm' command
3046 which sends ATA commands via grub_disk_ata_pass_through ().
3047
3048 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3049
3050 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3051 and <grub/cpu/io.h> to include/grub/ata.h.
3052 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3053 (GRUB_CDROM_SECTOR_SIZE): Remove.
3054 (GRUB_ATA_*): Move to include/grub/ata.h.
3055 (GRUB_ATAPI_*): Likewise.
3056 (enum grub_ata_commands): Likewise.
3057 (enum grub_ata_timeout_milliseconds): Likewise.
3058 (struct grub_ata_device): Likewise.
3059 (grub_ata_regset): Likewise.
3060 (grub_ata_regget): Likewise.
3061 (grub_ata_regset2): Likewise.
3062 (grub_ata_regget2): Likewise.
3063 (grub_ata_check_ready): Likewise.
3064 (grub_ata_wait_not_busy): Remove static, exported in
3065 include/grub/ata.h.
3066 (grub_ata_wait_drq): Likewise.
3067 (grub_ata_pio_read): Likewise.
3068
3069 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3070 function for hdparm.mod.
3071
3072 * include/grub/ata.h: New file, contains declarations from
3073 disk/ata.c.
3074 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3075
3076 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3077 (grub_disk_ata_pass_through): New exported variable.
3078
3079 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3080
3081 2009-02-13 Colin D Bennett <colin@gibibit.com>
3082
3083 Support multiple fallback entries, and provide an API to support
3084 executing default+fallback menu entries. Renamed the `terminal' menu
3085 viewer to `text'.
3086
3087 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3088 variable declaration.
3089 (grub_menu_execute_callback): New structure declaration.
3090 (grub_menu_execute_callback_t): New typedef.
3091 (grub_menu_execute_with_fallback): New function declaration.
3092 (grub_menu_get_entry): Likewise.
3093 (grub_menu_get_timeout): Likewise.
3094 (grub_menu_set_timeout): Likewise.
3095
3096 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3097
3098 * normal/menu.c (grub_wait_after_message): Moved to
3099 `normal/menu_text.c'.
3100 (draw_border): Likewise.
3101 (print_message): Likewise.
3102 (print_entry): Likewise.
3103 (print_entries): Likewise.
3104 (grub_menu_init_page): Likewise.
3105 (get_entry_number): Likewise.
3106 (print_timeout): Likewise.
3107 (run_menu): Likewise.
3108 (grub_menu_execute_entry): Likewise.
3109 (show_text_menu): Likewise.
3110 (get_and_remove_first_entry_number): New function.
3111 (grub_menu_execute_with_fallback): Likewise.
3112 (get_entry): Renamed to ...
3113 (grub_menu_get_entry): .. this and made it global.
3114 (get_timeout): Renamed to ...
3115 (grub_menu_get_timeout): ... this and made it global.
3116 (set_timeout): Renamed to ...
3117 (grub_menu_set_timeout): ... this and made it global.
3118 (grub_normal_terminal_menu_viewer): Renamed to ...
3119 (grub_normal_text_menu_viewer): ... this.
3120
3121 * normal/menu_text.c: New file. Extracted text-menu-specific code
3122 from normal/menu.c.
3123
3124 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3125 (normal_mod_SOURCES): Likewise.
3126
3127 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3128 (normal_mod_SOURCES): Likewise.
3129
3130 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3131 (normal_mod_SOURCES): Likewise.
3132
3133 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3134 (normal_mod_SOURCES): Likewise.
3135
3136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3137 (normal_mod_SOURCES): Likewise.
3138
3139 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3140 (normal_mod_SOURCES): Likewise.
3141
3142 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3143 (normal_mod_SOURCES): Likewise.
3144
3145 2009-02-11 Robert Millan <rmh@aybabtu.com>
3146
3147 * util/grub.d/00_header.in: Update old reference to `font' command.
3148
3149 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3150
3151 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3152
3153 Based on patch from Javier Martín.
3154
3155 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3156
3157 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3158 to avoid false positives with FAT.
3159 (grub_fstest_SOURCES): Likewise.
3160 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3161 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3162 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3163 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3164 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3165 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3166
3167 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3168
3169 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3170 bpb.version_specific.fat12_or_fat16.fstype and
3171 bpb.version_specific.fat32.fstype.
3172
3173 2009-02-08 Robert Millan <rmh@aybabtu.com>
3174
3175 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3176
3177 2009-02-08 Robert Millan <rmh@aybabtu.com>
3178
3179 * Makefile.in (host_os, host_cpu): New variables.
3180 (target_os): Remove. Update all users.
3181
3182 2009-02-08 Marco Gerards <marco@gnu.org>
3183
3184 * Makefile.in (enable_grub_emu_usb): New variable.
3185 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3186 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3187 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3188 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3189 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3190 `usbtest.mod' and `usbms.mod'.
3191 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3192 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3193 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3194 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3195 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3196 variables.
3197
3198 * disk/usbms.c: New file.
3199
3200 * include/grub/usb.h: Likewise.
3201
3202 * include/grub/usbtrans.h: Likewise.
3203
3204 * include/grub/usbdesc.h: Likewise.
3205
3206 * bus/usb/usbtrans.c: Likewise.
3207
3208 * bus/usb/ohci.c: Likewise.
3209
3210 * bus/usb/uhci.c: Likewise.
3211
3212 * bus/usb/usbhub.c: Likewise.
3213
3214 * bus/usb/usb.c: Likewise.
3215
3216 * commands/usbtest.c: Likewise.
3217
3218 * util/usb.c: Likewise.
3219
3220 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3221
3222 * configure.ac: Test for libusb presence.
3223
3224 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3225
3226 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3227
3228 * kern/mm.c: Add more comments.
3229
3230 2009-02-08 Robert Millan <rmh@aybabtu.com>
3231
3232 Patch from Javier Martín.
3233 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3234 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3235
3236 2009-02-08 Robert Millan <rmh@aybabtu.com>
3237
3238 * fs/cpio.c: Split tar functionality to ...
3239 * fs/tar.c: ... here (new file). Update all users.
3240
3241 2009-02-07 Robert Millan <rmh@aybabtu.com>
3242
3243 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3244 backward-incompatible features.
3245
3246 Based on patch from Javier Martín, with some adjustments.
3247
3248 2009-02-07 Michael Scherer <misc@mandriva.org>
3249
3250 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3251
3252 2009-02-07 Robert Millan <rmh@aybabtu.com>
3253
3254 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3255 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3256 after the RAID stuff.
3257
3258 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3259
3260 Fixes problem when running vbetest command as reported by
3261 Vladimir Serbinenko <phcoder@gmail.com>.
3262
3263 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3264
3265 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
3266
3267 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3268 /dev/md/NpN style mdraid devices.
3269
3270 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3271
3272 * util/unifont2pff.rb: Remove.
3273
3274 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3275
3276 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3277 `#'.
3278
3279 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3280
3281 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3282 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3283 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3284 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3286 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3287 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3288
3289 2009-02-02 Christian Franke <franke@computer.org>
3290
3291 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3292
3293 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
3294
3295 * INSTALL: Note that we now require at least autoconf 2.59 and
3296 that LZO is optional.
3297
3298 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3299
3300 Base on patch on bug #24154 created by Tomas Tintera
3301 <trosos@seznam.cz>.
3302
3303 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3304
3305 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3306
3307 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3308 <bero@arklinux.org>.
3309
3310 * normal/parser.y (script_init): Add missing semicolon.
3311
3312 2009-01-31 Colin D Bennett <colin@gibibit.com>
3313
3314 * normal/main.c: Add include to grub/menu_viewer.h.
3315 (free_menu_entry_classes): Added.
3316 (grub_normal_menu_addentry): Added class property handling.
3317 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3318 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3319
3320 * normal/menu_viewer.c: New file.
3321
3322 * normal/menu.c (run_menu_entry): Renamed to ...
3323 (grub_menu_execute_entry): ... this and made it as global.
3324 (grub_menu_run): Renamed to ...
3325 (show_text_menu): ... this and made it local.
3326 (show_text_menu): Adapt to new function names.
3327 (grub_normal_terminal_menu_viewer): New global variable.
3328
3329 * include/grub/menu.h: New file.
3330
3331 * include/grub/menu_viewer.h: New file.
3332
3333 * include/grub/normal.h: Added include to grub/menu.h.
3334 (grub_menu_entry): Moved to include/grub/menu.h.
3335 (grub_menu_entry_t): Likewise.
3336 (grub_menu): Likewise.
3337 (grub_menu_t): Likewise.
3338 (grub_normal_terminal_menu_viewer): Added.
3339 (grub_menu_execute_entry): Likewise.
3340 (grub_menu_run): Removed.
3341
3342 * DISTLIST: Added include/grub/menu.h.
3343 Added include/grub/menu_viewer.h.
3344 Added normal/menu_viewer.c.
3345
3346 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3347
3348 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3349 arglist for menutitle arguments.
3350
3351 * normal/main.c (grub_normal_menu_addentry): Likewise.
3352
3353 * normal/parser.y (menuentry): Likewise.
3354
3355 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3356
3357 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3358 (grub_script_create_cmdmenu): Likewise.
3359
3360 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3361
3362 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3363 changes.
3364
3365 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3366
3367 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3368
3369 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3370
3371 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3372
3373 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3374
3375 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3376
3377 2009-01-30 Christian Franke <franke@computer.org>
3378
3379 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3380 in option help text.
3381
3382 2009-01-27 Pavel Roskin <proski@gnu.org>
3383
3384 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3385
3386 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3387
3388 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3389
3390 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3391
3392 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3393 unregister function.
3394
3395 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3396
3397 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3398
3399 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3400
3401 * util/grub-mkfont.c (usage): Fix typo.
3402
3403 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3404
3405 2009-01-26 Daniel Mierswa <impulze@impulze.org>
3406
3407 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3408
3409 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3410
3411 * kern/misc.c (grub_strcasecmp): New function.
3412 (grub_strcasecmp): Use grub_size_t instead of int for length.
3413 Fix return value.
3414 * include/grub/misc.h: Update function prototypes.
3415
3416 2009-01-26 Robert Millan <rmh@aybabtu.com>
3417
3418 * configure.ac: Fix cross-compilation check.
3419
3420 2009-01-22 Christian Franke <franke@computer.org>
3421
3422 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3423 (precision) digit string. Allow `.format2' without `format1' (width).
3424 Limit input chars for `%s' output to `format2' if specified. This is
3425 compatible with standard printf ().
3426
3427 2009-01-22 Christian Franke <franke@computer.org>
3428
3429 * disk/ata.c (grub_ata_wait_status): Replace by ...
3430 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3431 other status bits may be invalid while BSY is asserted.
3432 (grub_ata_check_ready): New function.
3433 (grub_ata_cmd): Removed.
3434 (grub_ata_wait_drq): New function.
3435 (grub_ata_strncpy): Remove inline.
3436 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3437 and error check now done by grub_ata_wait_drq ().
3438 (grub_ata_pio_write): Likewise.
3439 (grub_atapi_identify): Set DEV before check for !BSY. Use
3440 grub_ata_wait_drq () to wait for data.
3441 (grub_ata_device_initialize): Add status register check to
3442 detect missing SATA slave devices. Add debug messages.
3443 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3444 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3445 transfer loop by grub_ata_pio_write ().
3446 (grub_ata_identify): Set DEV before check for !BSY. Use
3447 grub_ata_wait_drq () to wait for data.
3448 (grub_ata_setaddress): Set DEV before check for !BSY.
3449 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3450 read/write in one loop. Fix invalid command on write. Fix incomplete
3451 command on (size % batch) == 0. Add missing error check after write of
3452 last block. Add debug messages.
3453 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3454
3455 2009-01-19 Christian Franke <franke@computer.org>
3456
3457 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3458 (GRUB_ATAPI_IREASON_*): Likewise.
3459 (grub_ata_pio_write): Fix timeout error return.
3460 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3461 (grub_atapi_wait_drq): New function.
3462 (grub_atapi_packet): New parameter `size'.
3463 Use grub_atapi_wait_drq () and direct write instead of
3464 grub_ata_pio_write ().
3465 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3466 reads the number of bytes requested by the device for each DRQ
3467 assertion.
3468 (grub_atapi_write): Remove old implementation, return not
3469 implemented instead.
3470
3471 2009-01-19 Christian Franke <franke@computer.org>
3472
3473 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3474 of 512 to calculate data size.
3475 (grub_scsi_read12): Likewise.
3476 (grub_scsi_write10): Likewise.
3477 (grub_scsi_write12): Likewise.
3478 (grub_scsi_read): Adjust size according to blocksize.
3479 Add checks for invalid blocksize and unaligned transfer.
3480
3481 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3482
3483 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3484
3485 * term/gfxterm.c (write_char): Fix background rendering for wide
3486 width glyphs.
3487
3488 2009-01-19 Robert Millan <rmh@aybabtu.com>
3489
3490 * config.guess: Update to latest version from config git.
3491 * config.sub: Likewise.
3492
3493 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
3494
3495 * Makefile.in: Change font compilation to use new grub-mkfont instead
3496 of java version.
3497
3498 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3499 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3500 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3501 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3502 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3503 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3504 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3505 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3506 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3507
3508 2009-01-16 Christian Franke <franke@computer.org>
3509
3510 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3511 (enum grub_ata_timeout_milliseconds): New enum.
3512 (grub_ata_wait_status): Add parameter milliseconds.
3513 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3514 recovery from timed-out commands.
3515 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3516 return grub_errno instead of REG_ERROR.
3517 (grub_ata_pio_write): Add parameter milliseconds.
3518 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3519 Pass milliseconds to grub_ata_wait_status () and
3520 grub_ata_pio_read ().
3521 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3522 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3523 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3524 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3525 It is not suitable for device detection, because DEV bit is ignored,
3526 the command may run too long, and not all devices set the signature
3527 properly.
3528 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3529 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3530 Fix device selection, DEV bit must be set first to address the registers
3531 of the correct device.
3532 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3533 grub_ata_pio_read/write ().
3534 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3535 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3536
3537 2009-01-13 Carles Pina i Estany <carles@pina.cat>
3538
3539 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3540
3541 2009-01-13 Bean <bean123ch@gmail.com>
3542
3543 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3544
3545 2009-01-13 Bean <bean123ch@gmail.com>
3546
3547 * Makefile.in: (enable_grub_mkfont): New variable.
3548 (freetype_cflags): Likewise.
3549 (freetype_libs): Likewise.
3550
3551 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3552 (grub_mkfont_SOURCES): New variable.
3553 (grub_mkfont_CFLAGS): Likewise.
3554 (grub_mkfont_LDFLAGS): Likewise.
3555
3556 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3557 library if `--enable-grub-mkfont' is requested.
3558 (enable_grub_mkfont): New variable.
3559 (freetype_cflags): Likewise.
3560 (freetype_libs): Likewise.
3561
3562 * util/grub-mkfont.c: New file.
3563
3564 2009-01-12 Christian Franke <franke@computer.org>
3565
3566 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3567 mode check. Fix setting of compat_use[].
3568
3569 2009-01-10 Robert Millan <rmh@aybabtu.com>
3570
3571 Update a few copyright years which we forgot to do in 2008 (only for
3572 files whose changes made in 2008 were copyright-significant)
3573
3574 * Makefile.in: Add 2008 to Copyright line.
3575 * disk/ieee1275/ofdisk.c: Likewise.
3576 * disk/efi/efidisk.c: Likewise.
3577 * kern/dl.c: Likewise.
3578 * kern/sparc64/ieee1275/init.c: Likewise.
3579 * kern/mm.c: Likewise.
3580 * kern/efi/mm.c: Likewise.
3581 * boot/i386/pc/boot.S: Likewise.
3582 * genfslist.sh: Likewise.
3583 * fs/iso9660.c: Likewise.
3584 * fs/hfs.c: Likewise.
3585 * fs/jfs.c: Likewise.
3586 * fs/minix.c: Likewise.
3587 * fs/ufs.c: Likewise.
3588 * gensymlist.sh.in: Likewise.
3589 * genkernsyms.sh.in: Likewise.
3590 * include/grub/misc.h: Likewise.
3591 * include/grub/types.h: Likewise.
3592 * include/grub/symbol.h: Likewise.
3593 * include/grub/elf.h: Likewise.
3594 * include/grub/kernel.h: Likewise.
3595 * include/grub/disk.h: Likewise.
3596 * include/grub/dl.h: Likewise.
3597 * include/grub/i386/linux.h: Likewise.
3598 * include/grub/i386/pc/biosdisk.h: Likewise.
3599 * include/grub/efi/api.h: Likewise.
3600 * include/grub/efi/pe32.h: Likewise.
3601 * include/grub/util/misc.h: Likewise.
3602 * normal/execute.c: Likewise.
3603 * normal/arg.c: Likewise.
3604 * normal/completion.c: Likewise.
3605 * normal/lexer.c: Likewise.
3606 * normal/parser.y: Likewise.
3607 * normal/misc.c: Likewise.
3608 * commands/i386/pc/vbeinfo.c: Likewise.
3609 * commands/hexdump.c: Likewise.
3610 * commands/terminal.c: Likewise.
3611 * commands/ls.c: Likewise.
3612 * commands/help.c: Likewise.
3613 * partmap/pc.c: Likewise.
3614 * loader/efi/chainloader.c: Likewise.
3615 * loader/multiboot_loader.c: Likewise.
3616 * loader/i386/pc/multiboot2.c: Likewise.
3617 * term/efi/console.c: Likewise.
3618 * term/i386/pc/serial.c: Likewise.
3619 * util/lvm.c: Likewise.
3620 * util/console.c: Likewise.
3621 * util/i386/efi/grub-mkimage.c: Likewise.
3622 * util/raid.c: Likewise.
3623
3624 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3625
3626 * commands/videotest.c: Removed include to grub/machine/memory.h.
3627
3628 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3629 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3630 (video_mod_SOURCES): Removed.
3631 (video_mod_CFLAGS): Likewise.
3632 (video_mod_LDFLAGS): Likewise.
3633 (gfxterm_mod_SOURCES): Likewise.
3634 (gfxterm_mod_CFLAGS): Likewise.
3635 (gfxterm_mod_LDFLAGS): Likewise.
3636 (videotest_mod_SOURCES): Likewise.
3637 (videotest_mod_CFLAGS): Likewise.
3638 (videotest_mod_LDFLAGS): Likewise.
3639 (bitmap_mod_SOURCES): Likewise.
3640 (bitmap_mod_CFLAGS): Likewise.
3641 (bitmap_mod_LDFLAGS): Likewise.
3642 (tga_mod_SOURCES): Likewise.
3643 (tga_mod_CFLAGS): Likewise.
3644 (tga_mod_LDFLAGS): Likewise.
3645 (jpeg_mod_SOURCES): Likewise.
3646 (jpeg_mod_CFLAGS): Likewise.
3647 (jpeg_mod_LDFLAGS): Likewise.
3648 (png_mod_SOURCES): Likewise.
3649 (png_mod_CFLAGS): Likewise.
3650 (png_mod_LDFLAGS): Likewise.
3651
3652 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3653 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3654 (video_mod_SOURCES): Added.
3655 (video_mod_CFLAGS): Likewise.
3656 (video_mod_LDFLAGS): Likewise.
3657 (videotest_mod_SOURCES): Likewise.
3658 (videotest_mod_CFLAGS): Likewise.
3659 (videotest_mod_LDFLAGS): Likewise.
3660 (bitmap_mod_SOURCES): Likewise.
3661 (bitmap_mod_CFLAGS): Likewise.
3662 (bitmap_mod_LDFLAGS): Likewise.
3663 (tga_mod_SOURCES): Likewise.
3664 (tga_mod_CFLAGS): Likewise.
3665 (tga_mod_LDFLAGS): Likewise.
3666 (jpeg_mod_SOURCES): Likewise.
3667 (jpeg_mod_CFLAGS): Likewise.
3668 (jpeg_mod_LDFLAGS): Likewise.
3669 (png_mod_SOURCES): Likewise.
3670 (png_mod_CFLAGS): Likewise.
3671 (png_mod_LDFLAGS): Likewise.
3672 (gfxterm_mod_SOURCES): Likewise.
3673 (gfxterm_mod_CFLAGS): Likewise.
3674 (gfxterm_mod_LDFLAGS): Likewise.
3675
3676 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3677 grub/machine/console.h.
3678
3679 2009-01-04 Jerone Young <jerone@gmail.com>
3680
3681 Make on screen instructions clearer
3682
3683 Based on patch created by Jidanni <jidanni@jidanni.org>
3684
3685 * normal/menu.c: print clearer instructions on the screen
3686
3687 2009-01-02 Colin D Bennett <colin@gibibit.com>
3688
3689 New font engine.
3690
3691 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3692 build system and fixed gfxterm.c to work with different sized fonts.
3693
3694 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3695
3696 * configure: Re-generated.
3697
3698 * DISTLIST: Removed font/manager.c.
3699 Added font/font.c.
3700 Added font/font_cmd.c.
3701
3702 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3703 compilation.
3704
3705 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
3706
3707 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3708
3709 * kern/term.c: Changed users of grub_utf8_to_ucs4.
3710
3711 * normal/menu.c: Likewise.
3712
3713 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3714 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3715
3716 * include/grub/font.h: Replaced with new file.
3717
3718 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3719 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3720 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3721 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3722 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3723 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3724 fg_red, fg_green, fg_blue, fg_alpha.
3725 (grub_video_adapter): Removed blit_glyph.
3726 (grub_video_blit_glyph): Removed.
3727
3728 * font/manager.c: Removed file.
3729
3730 * font/font.c: New file.
3731
3732 * font/font_cmd.c: Likewise.
3733
3734 * video/video.c (grub_video_blit_glyph): Removed.
3735
3736 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3737 (grub_video_vbe_map_rgba): Likewise.
3738 (grub_video_vbe_unmap_color_int): Likewise.
3739 (grub_video_vbe_blit_glyph): Removed.
3740 (grub_video_vbe_adapter): Removed blit_glyph.
3741
3742 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3743 (get_pixel): Likewise.
3744 (set_pixel): Likewise.
3745
3746 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3747
3748 * term/gfxterm.c: Adapted to new font engine.
3749
3750 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
3751
3752 * term/i386/pc/vga.c: Likewise.
3753
3754 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3755
3756 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3757
3758 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3759
3760 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3761
3762 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3763
3764 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3765
3766 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3767
3768 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3769
3770 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3771
3772 * util/grub.d/00_header.in: Changed to use new loadfont command.
3773
3774 * util/grub-mkconfig_lib.in: Changed font extension.
3775
3776 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
3777
3778 * util/getroot.c (grub_util_get_grub_dev): Add support for
3779 /dev/md/dNNpNN style partitionable mdraid devices.
3780
3781 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
3782
3783 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3784 at a time limit of the PXE TFTP API correctly.
3785 (grub_pxefs_close): Likewise.
3786
3787 2008-11-29 Robert Millan <rmh@aybabtu.com>
3788
3789 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3790 grub_ata_device_initialize() calls.
3791
3792 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
3793
3794 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3795 iteration failed.
3796 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3797
3798 2008-11-28 Robert Millan <rmh@aybabtu.com>
3799
3800 Fix build on powerpc-ieee1275. Based on patch created by
3801 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3802 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3803 `kern/ieee1275/mmap.c'.
3804 * include/grub/powerpc/ieee1275/memory.h: New file.
3805
3806 Provide grub-install on coreboot.
3807 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3808 (grub_install_SOURCES): New variable.
3809 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3810 usable on coreboot.
3811
3812 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
3813
3814 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3815 to `grub_term_input_t'.
3816 (grub_term_get_current_output): Change return type to
3817 `grub_term_output_t'.
3818
3819 2008-11-22 Robert Millan <rmh@aybabtu.com>
3820
3821 Fix breakage on coreboot due to declaration mismatch.
3822 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3823 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3824 grub_vga_text_cls().
3825
3826 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3827 comments. Avoid copying one more byte than necessary (just in case).
3828
3829 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3830 to 0x200000 (avoids trouble with some OFW implementations, and matches
3831 with the one in Yaboot).
3832 Reported by Manoel Abranches
3833
3834 2008-11-20 Robert Millan <rmh@aybabtu.com>
3835
3836 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3837 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3838
3839 * util/grub-mkconfig_lib.in (grub_warn): New function.
3840 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3841 warnings, to obtain consistent formatting.
3842 * util/grub.d/00_header.in: Likewise.
3843 * util/update-grub_lib.in: Likewise.
3844
3845 * loader/i386/linux.c (allocate_pages): Fix a warning.
3846 Move comment text to `#error' stanza.
3847
3848 Harmonize ieee1275's grub_available_iterate() with the generic
3849 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3850 build problem on i386-ieee1275):
3851 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3852 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3853 parameter `type'. Update all users of this function.
3854 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3855 `kern/ieee1275/mmap.c'.
3856 * kern/ieee1275/init.c
3857 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3858 with ...
3859 (grub_machine_mmap_iterate): ... this.
3860 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3861 return type to `grub_err_t'. Update all implementations of this
3862 function prototype.
3863 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3864 Likewise.
3865
3866 Add `lsmmap' command (lists firmware-provided memory map):
3867 * commands/lsmmap.c: New file.
3868 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3869 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3870 variables.
3871 * conf/powerpc-ieee1275.rmk: Likewise.
3872 * conf/i386-coreboot.rmk: Likewise.
3873 * conf/i386-ieee1275.rmk: Likewise.
3874
3875 2008-11-19 Robert Millan <rmh@aybabtu.com>
3876
3877 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3878 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3879 constraints to initrd allocation (based on code from
3880 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3881 for Linux to find it.
3882
3883 2008-11-14 Robert Millan <rmh@aybabtu.com>
3884
3885 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3886 order to cope with duplicate slashes.
3887
3888 2008-11-14 Robert Millan <rmh@aybabtu.com>
3889
3890 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3891 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3892 don't want to mess with lower memory, because it is used in the Linux
3893 loader.
3894
3895 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3896 an appropriate place in lower memory, between 0x10000 and 0x90000,
3897 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3898 is in our heap (probably as a result of it being corrupted during
3899 decompression). Add #error instance with comment to explain why this
3900 loader isn't currently usable on PC/BIOS.
3901
3902 2008-11-14 Robert Millan <rmh@aybabtu.com>
3903
3904 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3905 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3906
3907 2008-11-12 Robert Millan <rmh@aybabtu.com>
3908
3909 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3910
3911 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3912 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3913 from here ...
3914 * include/grub/i386/pc/memory.h: ... to here.
3915
3916 2008-11-12 Robert Millan <rmh@aybabtu.com>
3917
3918 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3919 split).
3920
3921 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3922 (grub_console_cur_color, grub_console_real_putchar)
3923 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3924 (grub_console_setcolorstate, grub_console_setcolor)
3925 (grub_console_getcolor): Move from here ...
3926 * include/grub/i386/vga_common.h: ... to here (new file).
3927
3928 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3929 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3930 `<grub/i386/io.h>'.
3931 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3932 `<grub/i386/vga_common.h>'.
3933
3934 2008-11-12 Robert Millan <rmh@aybabtu.com>
3935
3936 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3937 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3938 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3939 variables.
3940 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3941 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3942
3943 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3944 grub_console_init() with call to grub_vga_text_init().
3945 (grub_machine_fini): Replace call to
3946 grub_console_fini() with call to grub_vga_text_fini() and
3947 grub_at_keyboard_fini().
3948
3949 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3950 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3951 (grub_console_setcolorstate, grub_console_setcolor)
3952 (grub_console_getcolor): New function prototypes.
3953
3954 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3955 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3956 (grub_vga_text_setcursor): Static-ize.
3957 (grub_vga_text_term): New structure.
3958 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3959
3960 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3961 (grub_console_cur_color, grub_console_standard_color)
3962 (grub_console_normal_color, grub_console_highlight_color)
3963 (map_char, grub_console_putchar, grub_console_getcharwidth)
3964 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3965 (grub_console_getcolor): Move from here ...
3966 * term/i386/vga_common.c: ... to here (same function names).
3967
3968 2008-11-12 Robert Millan <rmh@aybabtu.com>
3969
3970 Use newly-added Multiboot support in coreboot.
3971
3972 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3973 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3974
3975 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3976 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3977 (codestart): Store the MBI in `startup_multiboot_info' when we're
3978 being loaded using Multiboot.
3979
3980 * kern/i386/coreboot/init.c (grub_machine_init): Move
3981 grub_at_keyboard_init() call to beginning of function (useful for
3982 debugging). Call grub_machine_mmap_init() before attempting to use
3983 grub_machine_mmap_iterate().
3984 (grub_lower_mem, grub_upper_mem): Move from here ...
3985 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3986 here (new file).
3987
3988 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3989 function prototype.
3990
3991 2008-11-12 Robert Millan <rmh@aybabtu.com>
3992
3993 Fix a regression introduced by the at_keyboard.mod split. Because
3994 some terminals are default on some platforms and non-default on
3995 others, the first terminal being registered determines which is
3996 going to be default.
3997
3998 * kern/term.c (grub_term_register_input): If this is the first
3999 terminal being registered, set it as the current one.
4000 (grub_term_register_output): Likewise.
4001
4002 * term/efi/console.c (grub_console_init): Do not call
4003 grub_term_set_current_output() or grub_term_set_current_input().
4004 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4005 * term/i386/pc/console.c (grub_console_init): Likewise.
4006 (grub_console_fini): Do not call grub_term_set_current_input()
4007 (but leave grub_term_set_current_output() to restore text mode).
4008
4009 2008-11-10 Robert Millan <rmh@aybabtu.com>
4010
4011 * util/grub.d/00_header.in: Add backward compatibility check for
4012 versions of terminal.mod that don't understand `terminal_input' or
4013 `terminal_output'.
4014
4015 2008-11-09 Robert Millan <rmh@aybabtu.com>
4016
4017 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4018 `terminal_input' / `terminal_output', not `terminal'.
4019
4020 2008-11-08 Robert Millan <rmh@aybabtu.com>
4021
4022 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4023 (DISTCLEANFILES): Add `build_env.mk'.
4024
4025 2008-11-08 Robert Millan <rmh@aybabtu.com>
4026
4027 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4028 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4029 members. Update all users.
4030 * util/console.c (grub_ncurses_term): Split in ...
4031 (grub_ncurses_term_input): ... this, and ...
4032 (grub_ncurses_term_output): ... this. Update all users.
4033 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4034
4035 2008-11-08 Robert Millan <rmh@aybabtu.com>
4036
4037 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4038 (PKGDATA): Add $(pkgdata_SRCDIR).
4039 (pkglib_BUILDDIR): New variable.
4040 (pkgdata_SRCDIR): New variable.
4041 (build_env.mk): New target.
4042 (include_DATA): New variable.
4043 (install-local): Install $(include_DATA) files in $(includedir).
4044
4045 2008-11-07 Pavel Roskin <proski@gnu.org>
4046
4047 * gendistlist.sh: Use C locale for sorting to ensure consistent
4048 output on all systems.
4049
4050 * util/grub.d/00_header.in: Remove incorrect space before
4051 "serial".
4052
4053 2008-11-07 Robert Millan <rmh@aybabtu.com>
4054
4055 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4056 per specification.
4057 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4058 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4059 (based on find_multi_boot1_header).
4060 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4061 using find_multi_boot2_header(), and abort if neither Multiboot or
4062 Multiboot headers were found.
4063
4064 2008-11-07 Robert Millan <rmh@aybabtu.com>
4065
4066 Modularize at_keyboard.mod:
4067
4068 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4069 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4070 (at_keyboard_mod_LDFLAGS): New variables.
4071
4072 Actual terminal split:
4073
4074 * include/grub/term.h (struct grub_term): Split in ...
4075 (struct grub_term_input): ... this, and ...
4076 (struct grub_term_output): ... this. Update all users.
4077 (grub_term_set_current): Split in ...
4078 (grub_term_set_current_input): ... this, and ...
4079 (grub_term_set_current_output): ... this.
4080 (grub_term_get_current): Split in ...
4081 (grub_term_get_current_input): ... this, and ...
4082 (grub_term_get_current_output): ... this.
4083 (grub_term_register): Split in ...
4084 (grub_term_register_input): ... this, and ...
4085 (grub_term_register_output): ... this.
4086 (grub_term_unregister): Split in ...
4087 (grub_term_unregister_input): ... this, and ...
4088 (grub_term_unregister_output): ... this.
4089 (grub_term_iterate): Split in ...
4090 (grub_term_iterate_input): ... this, and ...
4091 (grub_term_iterate_output): ... this.
4092
4093 * kern/term.c (grub_term_list): Split in ...
4094 (grub_term_list_input): ... this, and ...
4095 (grub_term_list_output): ... this. Update all users.
4096 (grub_cur_term): Split in ...
4097 (grub_cur_term_input): ... this, and ...
4098 (grub_cur_term_output): ... this. Update all users.
4099 (grub_term_set_current): Split in ...
4100 (grub_term_set_current_input): ... this, and ...
4101 (grub_term_set_current_output): ... this.
4102 (grub_term_get_current): Split in ...
4103 (grub_term_get_current_input): ... this, and ...
4104 (grub_term_get_current_output): ... this.
4105 (grub_term_register): Split in ...
4106 (grub_term_register_input): ... this, and ...
4107 (grub_term_register_output): ... this.
4108 (grub_term_unregister): Split in ...
4109 (grub_term_unregister_input): ... this, and ...
4110 (grub_term_unregister_output): ... this.
4111 (grub_term_iterate): Split in ...
4112 (grub_term_iterate_input): ... this, and ...
4113 (grub_term_iterate_output): ... this.
4114
4115 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4116 a check for input and one for output (and only attempt to get keys
4117 from user when input works).
4118
4119 * util/grub-probe.c (grub_term_get_current): Split in ...
4120 (grub_term_get_current_input): ... this, and ...
4121 (grub_term_get_current_output): ... this.
4122 * util/grub-fstest.c: Likewise.
4123 * util/i386/pc/grub-setup.c: Likewise.
4124 * util/grub-editenv.c: Likewise.
4125
4126 Portability adjustments:
4127
4128 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4129 `term/i386/pc/at_keyboard.c'.
4130 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4131 grub_keyboard_controller_init() (now handled by terminal .init).
4132 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4133 grub_at_keyboard_init().
4134 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4135 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4136 at_keyboard.mod via input terminal interface).
4137 * include/grub/i386/coreboot/console.h: Convert into a stub for
4138 `<grub/i386/pc/console.h>'.
4139
4140 Migrate full terminals to new API:
4141
4142 * term/efi/console.c (grub_console_term): Split into ...
4143 (grub_console_term_input): ... this, and ...
4144 (grub_console_term_output): ... this. Update all users.
4145 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4146 (grub_ofconsole_init): Split into ...
4147 (grub_ofconsole_init_input): ... this, and ...
4148 (grub_ofconsole_init_output): ... this.
4149 (grub_ofconsole_term): Split into ...
4150 (grub_ofconsole_term_input): ... this, and ...
4151 (grub_ofconsole_term_output): ... this. Update all users.
4152 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4153 (grub_serial_term_input): ... this, and ...
4154 (grub_serial_term_output): ... this. Update all users.
4155 * term/i386/pc/console.c (grub_console_term): Split into ...
4156 (grub_console_term_input): ... this, and ...
4157 (grub_console_term_output): ... this. Update all users.
4158 (grub_console_term_input): Only enable it on PC/BIOS platform.
4159 (grub_console_init): Remove grub_keyboard_controller_init() call.
4160
4161 Migrate input terminals to new API:
4162
4163 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4164 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4165 i386-specific anyway).
4166 (grub_console_checkkey): Rename to ...
4167 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4168 users.
4169 (grub_keyboard_controller_orig): New variable.
4170 (grub_console_getkey): Rename to ...
4171 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4172 users.
4173 (grub_keyboard_controller_init): Static-ize. Save original
4174 controller value so that it can be restored ...
4175 (grub_keyboard_controller_fini): ... here (new function).
4176 (grub_at_keyboard_term): New structure.
4177 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4178 functions.
4179
4180 Migrate output terminals to new API:
4181
4182 * term/i386/pc/vga.c (grub_vga_term): Change type to
4183 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4184 members. Update all users.
4185 * term/gfxterm.c (grub_video_term): Change type to
4186 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4187 members. Update all users.
4188 * include/grub/i386/pc/console.h (grub_console_checkkey)
4189 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4190 etc).
4191
4192 Migrate `terminal' command and userland tools to new API:
4193
4194 * commands/terminal.c (grub_cmd_terminal): Split into ...
4195 (grub_cmd_terminal_input): ... this, and ...
4196 (grub_cmd_terminal_output): ... this.
4197 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4198 `terminal_input' and `terminal_output'.
4199 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4200 `terminal_input' / `terminal_output' API.
4201 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4202 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4203 provided ${GRUB_TERMINAL}, convert it).
4204
4205 2008-11-04 Robert Millan <rmh@aybabtu.com>
4206
4207 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4208 for FreeBSD.
4209 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4210
4211 2008-11-03 Bean <bean123ch@gmail.com>
4212
4213 * kern/elf.c (grub_elf32_load): Revert to previous code.
4214 (grub_elf64_load): Likewise.
4215
4216 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4217
4218 2008-11-01 Robert Millan <rmh@aybabtu.com>
4219
4220 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4221 (TARGET_CPPFLAGS): Likewise.
4222 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4223
4224 2008-11-01 Carles Pina i Estany <carles@pina.cat>
4225
4226 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4227
4228 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4229
4230 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4231 addition of objects until the code is not going to be able to fail.
4232
4233 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4234
4235 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4236 (add a missing NULL check, and correct them by moving the pointer
4237 operations after the actual check).
4238
4239 2008-10-29 Robert Millan <rmh@aybabtu.com>
4240
4241 * util/i386/pc/grub-install.in: Handle empty string as output from
4242 make_system_path_relative_to_its_root().
4243
4244 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4245
4246 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4247 circular metadata worst case scenario. If the metadata is circular
4248 then copy the wrap in place.
4249 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4250 project lib/format_text/layout.h
4251 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4252
4253 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4254
4255 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4256
4257 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4258
4259 * util/update-grub_lib.in: Mention filename in warning message.
4260
4261 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4262
4263 * NEWS: Update for rename of update-grub to grub-mkconfig.
4264
4265 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4266
4267 * util/update-grub_lib.in: Copy to ...
4268 * util/grub-mkconfig_lib.in: ... this. Update all users.
4269 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4270 * util/update-grub.in: Rename to ...
4271 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4272 option. Add `--output' option to allow users to specify the generated
4273 configuration file. Default to stdout.
4274 (update_grub_dir): Rename to ...
4275 (grub_mkconfig_dir): ... this.
4276 (grub_cfg): Default to an empty string.
4277 * conf/common.rmk (update-grub): Rename to ...
4278 (grub-mkconfig): ... this.
4279 (update-grub_lib): Copy to ...
4280 (grub-mkconfig_lib): ... this.
4281 (update-grub_SCRIPTS): Copy to ...
4282 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4283 (update-grub_DATA): Rename to ...
4284 (grub-mkconfig_DATA): ... this.
4285
4286 2008-09-28 Robert Millan <rmh@aybabtu.com>
4287
4288 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4289 to `modified'. Add the real `created' field.
4290 (grub_iso9660_uuid): Use `modified' rather than `created' for
4291 constructing the UUID.
4292
4293 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
4294
4295 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4296 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4297
4298 2008-09-28 Bean <bean123ch@gmail.com>
4299
4300 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4301 Thanks to Christian Franke for finding this bug.
4302
4303 2008-09-25 Robert Millan <rmh@aybabtu.com>
4304
4305 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4306 instances of grub_util_get_disk_name() (see previous commit).
4307
4308 2008-09-25 Robert Millan <rmh@aybabtu.com>
4309
4310 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4311 `util/i386/get_disk_name.c'.
4312 * conf/i386-efi.rmk: Likewise.
4313 * conf/x86_64-efi.rmk: Likewise.
4314 * conf/i386-coreboot.rmk: Likewise.
4315 * conf/i386-ieee1275.rmk: Likewise.
4316 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4317 `util/ieee1275/get_disk_name.c'.
4318 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4319 * util/ieee1275/get_disk_name.c: Remove file.
4320 * util/i386/get_disk_name.c: Remove file.
4321 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4322 "hd%d" for device.map entries, rather than using
4323 grub_util_get_disk_name().
4324
4325 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4326
4327 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4328 warning.
4329 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4330
4331 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4332
4333 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4334 Changed to 0x5100.
4335 (GRUB_TERM_PPAGE): Changed to 0x4900.
4336
4337 2008-09-24 Robert Millan <rmh@aybabtu.com>
4338
4339 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4340 macros (they were i386-pc specific).
4341 * include/grub/sparc64/ieee1275/console.h: Likewise.
4342 * include/grub/efi/console.h: Likewise.
4343
4344 2008-09-22 Bean <bean123ch@gmail.com>
4345
4346 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4347 resident and in attribute list.
4348
4349 * include/grub/ntfs.h (BMP_LEN): Removed.
4350
4351 2008-09-22 Bean <bean123ch@gmail.com>
4352
4353 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4354 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4355
4356 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4357 error occurs, as grub_disk_open will call grub_disk_close, which will
4358 call p->close (scsi).
4359
4360 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4361
4362 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4363 (AC_PREREQ): Bumped to 2.59.
4364 (AC_TRY_COMPILE): Replace obsolete macro with ...
4365 (AC_COMPILE_IFELSE): ... this.
4366 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4367 (AC_LINK_IFELSE): ... this.
4368
4369 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4370
4371 * autogen.sh: Add a call to `gendistlist.sh'.
4372
4373 2008-09-19 Christian Franke <franke@computer.org>
4374
4375 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4376 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4377 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4378 Export __enable_execute_stack() to modules.
4379 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4380 New function.
4381
4382 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4383
4384 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4385 Sort the list.
4386
4387 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4388
4389 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4390 #include <grub/util/hostdisk.h>.
4391
4392 2008-09-08 Robert Millan <rmh@aybabtu.com>
4393
4394 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4395 segments when their filesz is zero (grub_file_read() interprets
4396 zero-size as "read until EOF", which results in memory corruption).
4397 Use `lowest_segment' rather than 0 for calculating the current
4398 segment load address.
4399
4400 2008-09-08 Robert Millan <rmh@aybabtu.com>
4401
4402 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4403 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4404 clobbered useful information.
4405
4406 2008-09-08 Robert Millan <rmh@aybabtu.com>
4407
4408 * include/grub/util/biosdisk.h: Move to ...
4409 * include/grub/util/hostdisk.h: ... here. Update all users.
4410 * util/biosdisk.c: Move to ...
4411 * util/hostdisk.c: ... here. Update all users.
4412
4413 2008-09-07 Robert Millan <rmh@aybabtu.com>
4414
4415 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4416 variables.
4417 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4418 and length can be stored directly in the `mbi->mmap_addr' and
4419 `mbi->mmap_length' struct fields.
4420
4421 2008-09-07 Robert Millan <rmh@aybabtu.com>
4422
4423 * conf/i386.rmk: New file. Provides declaration for building
4424 `cpuid.mod'.
4425 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4426 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4427 variables.
4428 Include `conf/i386.mk'.
4429 * conf/i386-efi.rmk: Likewise.
4430 * conf/x86_64-efi.rmk: Likewise.
4431 * conf/i386-coreboot.rmk: Likewise.
4432 * conf/i386-ieee1275.rmk: Likewise.
4433
4434 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4435
4436 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4437 Adds optimization support for BGR based modes.
4438
4439 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4440 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4441 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4442 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4443 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4444 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4445 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4446 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4447 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4448 (grub_video_i386_vbeblit_index_index): Likewise.
4449 (grub_video_i386_vbeblit_replace_directN): Added.
4450 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4451 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4452 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4453 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4454 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4455 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4456 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4457 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4458 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4459 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4460 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4461 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4462 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4463
4464 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4465 (grub_video_i386_vbefill_R8G8B8): Likewise.
4466 (grub_video_i386_vbefill_index): Likewise.
4467 (grub_video_i386_vbefill_direct32): Added.
4468 (grub_video_i386_vbefill_direct24): Likewise.
4469 (grub_video_i386_vbefill_direct16): Likewise.
4470 (grub_video_i386_vbefill_direct8): Likewise.
4471
4472 * include/grub/video.h (grub_video_blit_format): Removed
4473 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4474 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4475 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4476 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4477 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4478
4479 * video/video.c (grub_video_get_blit_format): Updated to use new
4480 blit formats. Added handling for 16 bit color modes.
4481
4482 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4483 fillers.
4484 (common_blitter): Updated to use new blitters.
4485
4486 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4487 Removed.
4488 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4489 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4490 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4491 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4492 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4493 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4494 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4495 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4496 (grub_video_i386_vbeblit_index_index): Likewise.
4497 (grub_video_i386_vbeblit_replace_directN): Added.
4498 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4499 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4500 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4501 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4502 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4503 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4504 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4505 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4506 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4507 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4508 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4509 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4510 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4511
4512 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4513 (grub_video_i386_vbefill_R8G8B8): Likewise.
4514 (grub_video_i386_vbefill_index): Likewise.
4515 (grub_video_i386_vbefill_direct32): Added.
4516 (grub_video_i386_vbefill_direct24): Likewise.
4517 (grub_video_i386_vbefill_direct16): Likewise.
4518 (grub_video_i386_vbefill_direct8): Likewise.
4519
4520 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4521 types.
4522
4523 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4524 types.
4525
4526 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4527 blitter types.
4528
4529 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4530 types.
4531
4532 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4533
4534 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4535 RAID level 1.
4536
4537 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4538
4539 * fs/iso9660.c (grub_iso9660_date): New structure.
4540 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4541 (grub_iso9660_uuid): New function.
4542
4543 2008-09-05 Bean <bean123ch@gmail.com>
4544
4545 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4546
4547 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4548 insensitive bit for names in Win32 and Win32 & DOS namespace.
4549
4550 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4551
4552 * include/grub/types.h (LONG_MAX): Likewise.
4553
4554 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4555
4556 * util/getroot.c: Include <config.h>.
4557 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4558 add support for /dev/md/N devices and handle LVM double dash escaping.
4559
4560 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4561
4562 * config.guess: Update to latest version from config git.
4563 * config.sub: Likewise.
4564
4565 2008-09-03 Robert Millan <rmh@aybabtu.com>
4566
4567 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4568 `disk->total_sectors'.
4569
4570 2008-09-01 Colin D Bennett <colin@gibibit.com>
4571
4572 * include/grub/normal.h: Fixed incorrect comment for
4573 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4574
4575 2008-09-01 Colin D Bennett <colin@gibibit.com>
4576
4577 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4578 values with defines.
4579
4580 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4581 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4582 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4583 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4584 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4585 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4586 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4587 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4588 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4589 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4590 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4591 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4592 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4593 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4594 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4595 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4596 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4597 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4598 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4599
4600 2008-08-31 Robert Millan <rmh@aybabtu.com>
4601
4602 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4603 declaration.
4604 (grub_multiboot): Fix a few warnings.
4605
4606 2008-08-31 Robert Millan <rmh@aybabtu.com>
4607
4608 * loader/i386/pc/multiboot.c: Update comment not to say that
4609 boot_device support is unimplemented.
4610
4611 2008-08-31 Robert Millan <rmh@aybabtu.com>
4612
4613 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4614 or memory map support are unimplemented.
4615
4616 2008-08-31 Colin D Bennett <colin@gibibit.com>
4617
4618 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4619
4620 2008-08-31 Colin D Bennett <colin@gibibit.com>
4621
4622 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4623 total video memory in 'vbeinfo' output; show color format details for
4624 each video mode.
4625
4626 2008-08-30 Pavel Roskin <proski@gnu.org>
4627
4628 * util/genmoddep.c: Remove for real this time.
4629 * DISTLIST: Remove util/genmoddep.c.
4630
4631 2008-08-30 Robert Millan <rmh@aybabtu.com>
4632
4633 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4634 as required by Multiboot spec (it was already 4-byte aligned, but
4635 only by chance).
4636
4637 2008-08-29 Pavel Roskin <proski@gnu.org>
4638
4639 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4640 * kern/powerpc/ieee1275/startup.S: ... this.
4641 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4642 * DISTLIST: Likewise.
4643
4644 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4645 grub/cpu/kernel.h. Add start label for consistency with other
4646 platforms. Add grub_prefix immediately after start. Add jump
4647 to the code after grub_prefix.
4648 * include/grub/powerpc/kernel.h: Provide valid values for
4649 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4650
4651 2008-08-29 Bean <bean123ch@gmail.com>
4652
4653 * configure.ac: Change host_os to cygwin for mingw.
4654 (asprintf): New check for function.
4655
4656 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4657 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4658
4659 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4660 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4661 sync, sleep and grub_util_get_disk_size for mingw.
4662
4663 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4664 to get size in mingw.
4665 (open_device): Use flag O_BINARY if it's defined.
4666 (find_root_device): Add dummy code for mingw.
4667
4668 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4669 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4670 (get_scsi_disk_name): Return 0 for mingw.
4671
4672 * util/hostfs.c: #include <grub/util/misc.h>.
4673 (grub_hostfs_open): Use "rb" flag to open file, use
4674 grub_util_get_disk_size to get disk size for mingw.
4675
4676 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4677 (asprintf): New function if HAVE_ASPRINTF is not set.
4678 (sync): New function for mingw.
4679 (sleep): Likewise.
4680 (grub_util_get_disk_size): Likewise.
4681
4682 2008-08-28 Pavel Roskin <proski@gnu.org>
4683
4684 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4685 kern/time.c.
4686
4687 2008-08-28 Robert Millan <rmh@aybabtu.com>
4688
4689 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4690
4691 2008-08-28 Robert Millan <rmh@aybabtu.com>
4692
4693 Change find_grub_drive() syntax so it doesn't prevent it from
4694 detecting NULL names as errors.
4695
4696 * util/biosdisk.c (find_grub_drive): Move free slot search code
4697 from here ...
4698 (find_free_slot): ... to here.
4699 (read_device_map): Use find_free_slot() to search for free slots.
4700
4701 2008-08-27 Marco Gerards <marco@gnu.org>
4702
4703 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4704 (scsi_mod_SOURCES): New variable.
4705 (scsi_mod_CFLAGS): Likewise
4706 (scsi_mod_LDFLAGS): Likewise.
4707
4708 * disk/scsi.c: New file.
4709
4710 * include/grub/scsi.h: Likewise.
4711
4712 * include/grub/scsicmd.h: Likewise.
4713
4714 * disk/ata.c: Include <grub/scsi.h>.
4715 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4716 instead.
4717 (grub_ata_iterate): Skip ATAPI devices.
4718 (grub_ata_open): Only handle ATAPI devices.
4719 (struct grub_atapi_read): Removed.
4720 (grub_atapi_readsector): Likewise.
4721 (grub_ata_read): No longer handle ATAPI devices.
4722 (grub_ata_write): Likewise.
4723 (grub_atapi_iterate): New function.
4724 (grub_atapi_read): Likewise.
4725 (grub_atapi_write): Likewise.
4726 (grub_atapi_open): Likewise.
4727 (grub_atapi_close): Likewise.
4728 (grub_atapi_dev): New variable.
4729 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4730 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4731
4732 * include/grub/disk.h (enum grub_disk_dev_id): Add
4733 `GRUB_DISK_DEVICE_SCSI_ID'.
4734
4735 2008-08-26 Robert Millan <rmh@aybabtu.com>
4736
4737 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4738 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4739 descriptive.
4740
4741 2008-08-23 Bean <bean123ch@gmail.com>
4742
4743 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4744 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4745 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4746 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4747 dm_nv.mod.
4748 (raid5rec_mod_SOURCES): New macro.
4749 (raid5rec_mod_CFLAGS): Likewise.
4750 (raid5rec_mod_LDFLAGS): Likewise.
4751 (raid6rec_mod_SOURCES): Likewise.
4752 (raid6rec_mod_CFLAGS): Likewise.
4753 (raid6rec_mod_LDFLAGS): Likewise.
4754 (mdraid_mod_SOURCES): Likewise.
4755 (mdraid_mod_CFLAGS): Likewise.
4756 (mdraid_mod_LDFLAGS): Likewise.
4757 (dm_nv_mod_SOURCES): Likewise.
4758 (dm_nv_mod_CFLAGS): Likewise.
4759 (dm_nv_mod_LDFLAGS): Likewise.
4760
4761 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4762 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4763 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4764
4765 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4766 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4767
4768 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4769
4770 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4771
4772 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4773
4774 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4775
4776 * disk/raid5_recover.c: New file.
4777
4778 * disk/raid6_recover.c: Likewise.
4779
4780 * disk/mdraid_linux.c: Likewise.
4781
4782 * disk/dmraid_nvidia.c: Likewise.
4783
4784 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4785 ULONG_MAX.
4786
4787 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4788 calculate the size of raid device.
4789 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4790 different layout of raid5.
4791 (grub_raid_scan_device): Remove code specific to mdraid.
4792 (grub_raid_list): New variable.
4793 (free_array): New function.
4794 (grub_raid_register): Likewise.
4795 (grub_raid_unregister): Likewise.
4796 (grub_raid_rescan): Likewise.
4797 (GRUB_MOD_INIT): Don't iterate device here.
4798 (GRUB_MOD_FINI): Use free_array to release resource.
4799
4800 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4801 (grub_raid5_recover_func_t): New function variable type.
4802 (grub_raid6_recover_func_t): Likewise.
4803 (grub_raid5_recover_func): New variable.
4804 (grub_raid6_recover_func): Likewise.
4805 (grub_raid_register): New function.
4806 (grub_raid_unregister): Likewise.
4807 (grub_raid_rescan): Likewise.
4808 (grub_raid_block_xor): Likewise.
4809
4810 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4811 (CMD_CRC): New macro.
4812 (part): Removed.
4813 (read_file): Handle device as well as file.
4814 (cmd_crc): New function.
4815 (fstest): Handle multiple disks.
4816 (options): Remove part, raw and long, add root and diskcount.
4817 (usage): Add crc, remove -p, -r, -l, add -r and -c.
4818 (main): Find the first non option entry and ignore subsequent options,
4819 add handling for the new options, support multiple disks.
4820
4821 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4822
4823 2008-08-23 Bean <bean123ch@gmail.com>
4824
4825 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4826
4827 * genfslist.sh: Ignore kernel.mod.
4828
4829 * genpartmaplist.sh: Likewise.
4830
4831 2008-08-23 Robert Millan <rmh@aybabtu.com>
4832
4833 * util/getroot.c (find_root_device): Skip anything that starts with
4834 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4835
4836 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
4837
4838 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4839 * util/grub.d/00_header.in: Allow the administrator to change default
4840 gfxmode via ${GRUB_GFXMODE}.
4841
4842 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
4843
4844 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4845
4846 2008-08-21 Robert Millan <rmh@aybabtu.com>
4847
4848 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4849 loader.
4850 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4851 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4852
4853 2008-08-20 Carles Pina i Estany <carles@pina.cat>
4854
4855 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4856 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4857
4858 2008-08-19 Robert Millan <rmh@aybabtu.com>
4859
4860 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4861 (struct grub_virtual_screen): Remove `cursor_color'.
4862 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4863 initialization.
4864 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4865
4866 2008-08-18 Robert Millan <rmh@aybabtu.com>
4867
4868 Unify (identical) linux_normal.c files.
4869 * loader/i386/efi/linux_normal.c: Move from here ...
4870 * loader/linux_normal.c: ... to here. Update all users.
4871 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4872 * loader/i386/ieee1275/linux_normal.c: Likewise.
4873
4874 2008-08-18 Robert Millan <rmh@aybabtu.com>
4875
4876 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4877 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4878 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4879 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4880 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4881 New macros.
4882 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4883 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4884 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4885 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4886 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4887 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4888 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4889 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4890 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4891 portably using grub_getxy().
4892 Replace `-EFI' with `-bzImage' in boot message.
4893
4894 2008-08-17 Robert Millan <rmh@aybabtu.com>
4895
4896 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4897
4898 2008-08-17 Robert Millan <rmh@aybabtu.com>
4899
4900 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4901
4902 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4903 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4904 (grub_machine_mmap_iterate): New function declaration.
4905 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4906 structure.
4907 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4908 macros.
4909
4910 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4911 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4912 Move e820 parsing from here ...
4913 * kern/i386/pc/mmap.c: New file.
4914 (grub_machine_mmap_iterate): ... to here.
4915
4916 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4917 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4918 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4919 (grub_available_iterate): Redeclare to return `void', and redeclare
4920 its hook to use grub_uint64_t as addr and size parameters, and rename
4921 to ...
4922 (grub_machine_mmap_iterate): ... this. Update all users.
4923
4924 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4925 to make it more readable. Rename to ...
4926 (grub_machine_mmap_iterate): ... this.
4927
4928 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4929 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4930 (grub_multiboot): Allocate an extra region after the payload, and fill
4931 it with a Multiboot memory map. Adjust a.out loader to calculate size
4932 with the extra space.
4933 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4934 with the extra space.
4935
4936 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4937
4938 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4939
4940 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4941
4942 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4943 mdate-sh to the list `find' searches for.
4944 * DISTLIST: Regenerated.
4945
4946 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4947
4948 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4949 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4950 genmoddep.awk, gensymlist.sh.in.
4951 (DISTDIRS): Add bus, docs, hook, lib.
4952 * DISTLIST: Regenerated.
4953 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4954
4955 2008-08-16 Robert Millan <rmh@aybabtu.com>
4956
4957 * disk/raid.c (grub_raid_init): Handle/report errors set by
4958 grub_device_iterate().
4959 * disk/lvm.c (grub_lvm_init): Likewise.
4960
4961 2008-08-15 Bean <bean123ch@gmail.com>
4962
4963 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4964 and datehook.mod.
4965 (datetime_mod_SOURCES): New macro.
4966 (datetime_mod_CFLAGS): Likewise.
4967 (datetime_mod_LDFLAGS): Likewise.
4968 (date_mod_SOURCES): Likewise.
4969 (date_mod_CFLAGS): Likewise.
4970 (date_mod_LDFLAGS): Likewise.
4971 (datehook_mod_SOURCES): Likewise.
4972 (datehook_mod_CFLAGS): Likewise.
4973 (datehook_mod_LDFLAGS): Likewise.
4974
4975 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4976 and datehook.mod.
4977 (datetime_mod_SOURCES): New macro.
4978 (datetime_mod_CFLAGS): Likewise.
4979 (datetime_mod_LDFLAGS): Likewise.
4980 (date_mod_SOURCES): Likewise.
4981 (date_mod_CFLAGS): Likewise.
4982 (date_mod_LDFLAGS): Likewise.
4983 (datehook_mod_SOURCES): Likewise.
4984 (datehook_mod_CFLAGS): Likewise.
4985 (datehook_mod_LDFLAGS): Likewise.
4986
4987 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4988 and datehook.mod.
4989 (datetime_mod_SOURCES): New macro.
4990 (datetime_mod_CFLAGS): Likewise.
4991 (datetime_mod_LDFLAGS): Likewise.
4992 (date_mod_SOURCES): Likewise.
4993 (date_mod_CFLAGS): Likewise.
4994 (date_mod_LDFLAGS): Likewise.
4995 (datehook_mod_SOURCES): Likewise.
4996 (datehook_mod_CFLAGS): Likewise.
4997 (datehook_mod_LDFLAGS): Likewise.
4998
4999 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5000 and datehook.mod.
5001 (datetime_mod_SOURCES): New macro.
5002 (datetime_mod_CFLAGS): Likewise.
5003 (datetime_mod_LDFLAGS): Likewise.
5004 (date_mod_SOURCES): Likewise.
5005 (date_mod_CFLAGS): Likewise.
5006 (date_mod_LDFLAGS): Likewise.
5007 (datehook_mod_SOURCES): Likewise.
5008 (datehook_mod_CFLAGS): Likewise.
5009 (datehook_mod_LDFLAGS): Likewise.
5010
5011 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5012 and datehook.mod.
5013 (datetime_mod_SOURCES): New macro.
5014 (datetime_mod_CFLAGS): Likewise.
5015 (datetime_mod_LDFLAGS): Likewise.
5016 (date_mod_SOURCES): Likewise.
5017 (date_mod_CFLAGS): Likewise.
5018 (date_mod_LDFLAGS): Likewise.
5019 (datehook_mod_SOURCES): Likewise.
5020 (datehook_mod_CFLAGS): Likewise.
5021 (datehook_mod_LDFLAGS): Likewise.
5022
5023 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5024
5025 * commands/date.c: New file.
5026
5027 * hook/datehook.c: Likewise.
5028
5029 * include/grub/lib/datetime.h: Likewise.
5030
5031 * include/grub/i386/cmos.h: Likewise.
5032
5033 * lib/datetime.c: Likewise.
5034
5035 * lib/i386/datetime.c: Likewise.
5036
5037 * lib/efi/datetime.c: Likewise.
5038
5039 2008-08-14 Robert Millan <rmh@aybabtu.com>
5040
5041 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5042 (grub_mkelfimage_SOURCES): New variable.
5043 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5044
5045 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5046 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5047 * conf/powerpc-ieee1275.rmk: Likewise.
5048 * conf/i386-ieee1275.rmk: Likewise.
5049
5050 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5051 * kern/i386/coreboot/init.c: Likewise.
5052
5053 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5054 with `<grub/cpu/kernel.h>'.
5055 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5056 to ...
5057 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5058 * kern/i386/coreboot/startup.S: Likewise.
5059
5060 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5061 (GRUB_MOD_GAP): Remove.
5062 * include/grub/powerpc/kernel.h: New file.
5063 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5064 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5065 * include/grub/i386/kernel.h: New file.
5066 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5067 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5068 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5069
5070 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5071 `grub-mkelfimage'.
5072 Use --directory when invoking grub_mkimage.
5073
5074 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5075 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5076 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5077 and GRUB_KERNEL_CPU_PREFIX.
5078
5079 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
5080
5081 * include/grub/err.h (grub_err_printf): New function prototype.
5082 * util/misc.c (grub_err_printf): New function.
5083 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5084 grub_printf.
5085 * kern/err.c (grub_print_error): Use grub_err_printf.
5086
5087 2008-08-13 Robert Millan <rmh@aybabtu.com>
5088
5089 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5090
5091 2008-08-13 Robert Millan <rmh@aybabtu.com>
5092
5093 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5094 boot entry.
5095
5096 2008-08-12 Robert Millan <rmh@aybabtu.com>
5097
5098 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5099 of the relocation code from here ...
5100 (grub_multiboot): ... to here.
5101 (forward_relocator, backward_relocator): Move from here ...
5102 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5103 (grub_multiboot_backward_relocator): ... to here.
5104 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5105 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5106 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5107 (grub_multiboot_forward_relocator_end)
5108 (grub_multiboot_backward_relocator)
5109 (grub_multiboot_backward_relocator_end): New variables.
5110
5111 2008-08-12 Bean <bean123ch@gmail.com>
5112
5113 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5114
5115 2008-08-11 Robert Millan <rmh@aybabtu.com>
5116
5117 * kern/i386/linuxbios/startup.S: Move from here ...
5118 * kern/i386/coreboot/startup.S: ... to here.
5119
5120 * kern/i386/linuxbios/init.c: Move from here ...
5121 * kern/i386/coreboot/init.c: ... to here.
5122
5123 * kern/i386/linuxbios/table.c: Move from here ...
5124 * kern/i386/coreboot/mmap.c: ... to here.
5125
5126 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5127
5128 2008-08-11 Robert Millan <rmh@aybabtu.com>
5129
5130 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5131 errors. Leave it to the upper layer to handle them.
5132
5133 2008-08-09 Christian Franke <franke@computer.org>
5134
5135 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5136 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5137 Install `grub.d/10_windows' only on Cygwin.
5138 * configure.ac: Add subst of `target_os'.
5139 Check `target_os' also before setting TARGET_OBJ2ELF.
5140 Add `--enable-grub-pe2elf'.
5141
5142 2008-08-08 Robert Millan <rmh@aybabtu.com>
5143
5144 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5145 (grub_last_time): Change type to grub_uint64_t.
5146 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5147 (grub_disk_close): Likewise.
5148
5149 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5150 (run_menu): Migrate code from to using grub_get_time_ms().
5151
5152 * util/misc.c (grub_get_time_ms): New function.
5153
5154 2008-08-08 Marco Gerards <marco@gnu.org>
5155
5156 * disk/ata.c (grub_ata_regget): Change return type to
5157 `grub_uint8_t'.
5158 (grub_ata_regget2): Likewise.
5159 (grub_ata_wait_status): New function.
5160 (grub_ata_wait_busy): Removed function, updated all users to use
5161 `grub_ata_wait_status'.
5162 (grub_ata_wait_drq): Likewise.
5163 (grub_ata_cmd): New function.
5164 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5165 error handling.
5166 (grub_ata_pio_write): Add error handling.
5167 (grub_atapi_identify): Likewise.
5168 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5169 handling.
5170 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5171 handling. Actually use the detected registers. Reorder the
5172 detection logic such that it is easier to read.
5173 (grub_ata_pciinit): Do not assign the same ID to each controller.
5174 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5175 handling.
5176 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5177
5178 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5179
5180 2008-08-08 Marco Gerards <marco@gnu.org>
5181
5182 * NEWS: Update.
5183
5184 2008-08-07 Bean <bean123ch@gmail.com>
5185
5186 * include/grub/x86_64/pci.h: New file.
5187
5188 2008-08-07 Christian Franke <franke@computer.org>
5189
5190 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5191 (TIMER2_GATE): Likewise.
5192 (grub_pit_wait): Add enable/disable of the timer2 gate
5193 bit of port 0x61. This fixes a possible infinite loop.
5194
5195 2008-08-07 Bean <bean123ch@gmail.com>
5196
5197 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5198 kern/i386/tsc.c and kern/i386/pit.c.
5199
5200 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5201 x86_64 platform.
5202
5203 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5204 <grub/i386/tsc.h>.
5205
5206 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5207
5208 2008-08-07 Bean <bean123ch@gmail.com>
5209
5210 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5211
5212 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5213
5214 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5215 multiple inclusion. Add #include <grub/types.h>.
5216
5217 2008-08-06 Christian Franke <franke@computer.org>
5218
5219 * conf/common.rmk: Build and install `10_windows'.
5220 * util/grub.d/10_windows.in: New script.
5221
5222 2008-08-06 Pavel Roskin <proski@gnu.org>
5223
5224 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5225
5226 2008-08-06 Robert Millan <rmh@aybabtu.com>
5227
5228 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5229 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5230
5231 2008-08-06 Bean <bean123ch@gmail.com>
5232
5233 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5234 (grub_pxefs_fs_int): Remove dummy definition.
5235 (grub_pxefs_open): Use data->block_size to store the current block
5236 size setting.
5237 (grub_pxefs_read): Use block size stored in data->block_size. As the
5238 value of grub_pxe_blksize can be changed after the file is opened.
5239
5240 2008-08-06 Bean <bean123ch@gmail.com>
5241
5242 * fs/i386/pc/pxe.c (curr_file): new variable.
5243 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5244 require the dummy internal file system anymore.
5245 (grub_pxefs_read): Removed.
5246 (grub_pxefs_close): Likewise.
5247 (grub_pxefs_fs_int): Likewise.
5248 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5249 connection when we switch file.
5250 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5251
5252 2008-08-06 Robert Millan <rmh@aybabtu.com>
5253
5254 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5255 `halt.mod'.
5256 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5257 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5258
5259 * kern/i386/halt.c: New file.
5260 * kern/i386/reboot.c: Likewise.
5261 * include/grub/i386/reboot.h: Likewise.
5262 * include/grub/i386/halt.h: Likewise.
5263
5264 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5265 Include `<grub/cpu/halt.h>'.
5266 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5267 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5268
5269 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5270 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5271 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5272 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5273 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5274 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5275 from here ...
5276 * include/grub/i386/at_keyboard.h: ... to here.
5277
5278 2008-08-05 Robert Millan <rmh@aybabtu.com>
5279
5280 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5281 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5282 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5283 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5284 `kern/generic/millisleep.c'.
5285
5286 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5287 instead of grub_get_rtc().
5288 (grub_tsc_init): Initialize `tsc_boot_time'.
5289
5290 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5291 (grub_machine_init): Use grub_tsc_init() rather than
5292 installing an RTC-based handler via grub_install_get_time_ms().
5293
5294 * kern/i386/pit.c: New file.
5295 * include/grub/i386/pit.h: Likewise.
5296
5297 2008-08-05 Bean <bean123ch@gmail.com>
5298
5299 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5300
5301 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5302 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5303 (pxe_mod_SOURCES): New macro.
5304 (pxe_mod_CFLAGS): Likewise.
5305 (pxe_mod_LDFLAGS): Likewise.
5306 (pxecmd_mod_SOURCES): Likewise.
5307 (pxecmd_mod_CFLAGS): Likewise.
5308 (pxecmd_mod_LDFLAGS): Likewise.
5309
5310 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5311 (grub_pxe_call): Likewise.
5312
5313 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5314
5315 * commands/i386/pc/pxecmd.c: New file.
5316
5317 * fs/i386/pc/pxe.c: Likewise.
5318
5319 * include/grub/i386/pc/pxe.h: Likewise.
5320
5321 2008-08-05 Bean <bean123ch@gmail.com>
5322
5323 * util/console.c (grub_console_cur_color): New variable.
5324 (grub_console_standard_color): Likewise.
5325 (grub_console_normal_color): Likewise.
5326 (grub_console_highlight_color): Likewise.
5327 (color_map): Likewise.
5328 (use_color): Likewise.
5329 (NUM_COLORS): New macro.
5330 (grub_ncurses_setcolorstate): Handle color properly.
5331 (grub_ncurses_setcolor): Don't change color here, just remember the
5332 settings, color will be set in grub_ncurses_setcolorstate.
5333 (grub_ncurses_getcolor): New function.
5334 (grub_ncurses_init): Initialize color pairs.
5335 (grub_ncurses_term): New member grub_ncurses_getcolor.
5336
5337 2008-08-05 Colin D Bennett <colin@gibibit.com>
5338
5339 High resolution timer support. Implemented for x86 CPUs using TSC.
5340 Extracted generic grub_millisleep() so it's linked in only as needed.
5341 This requires a Pentium compatible CPU; if the RDTSC instruction is
5342 not supported, then it falls back on the generic grub_get_time_ms()
5343 implementation that uses the machine's RTC.
5344
5345 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5346 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5347 `kern/generic/millisleep.c'.
5348
5349 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5350 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5351
5352 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5353 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5354
5355 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5356
5357 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5358 `kern/generic/millisleep.c'.
5359
5360 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5361
5362 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5363
5364 * kern/generic/rtc_get_time_ms.c: New file.
5365
5366 * kern/generic/millisleep.c: New file.
5367
5368 * kern/misc.c: Don't include
5369 <kern/time.h> anymore.
5370 (grub_millisleep_generic): Removed.
5371
5372 * commands/sleep.c (grub_interruptible_millisleep): Uses
5373 grub_get_time_ms() instead of grub_get_rtc().
5374
5375 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5376 function.
5377 (grub_cpu_is_cpuid_supported): New inline function.
5378 (grub_cpu_is_tsc_supported): New inline function.
5379 (grub_tsc_init): New function prototype.
5380 (grub_tsc_get_time_ms): New function prototype.
5381
5382 * kern/i386/tsc.c (grub_get_time_ms): New file.
5383
5384 * include/grub/time.h: Include <grub/types.h.
5385 (grub_millisleep_generic): Removed.
5386 (grub_get_time_ms): New prototype.
5387 (grub_install_get_time_ms): New prototype.
5388 (grub_rtc_get_time_ms): New prototype.
5389
5390 * kern/time.c (grub_get_time_ms): New function.
5391 (grub_install_get_time_ms): New function.
5392
5393 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5394 <grub/time.h> anymore.
5395 (grub_millisleep): Removed.
5396 (grub_machine_init): Call grub_tsc_init.
5397
5398 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5399 get_time_ms() implementation.
5400
5401 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5402 (ieee1275_get_time_ms): New function.
5403 (grub_machine_init): Install get_time_ms() implementation.
5404
5405 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5406 (grub_machine_init): Call grub_tsc_init().
5407 (grub_millisleep): Removed.
5408
5409 * kern/ieee1275/init.c (grub_millisleep): Removed.
5410 (grub_machine_init): Install ieee1275_get_time_ms()
5411 implementation.
5412 (ieee1275_get_time_ms): New function.
5413 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5414 real work.
5415
5416 2008-08-05 Marco Gerards <marco@gnu.org>
5417
5418 * disk/ata.c: Include <grub/pci.h>.
5419 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5420 (grub_ata_initialize): Rewritten.
5421 (grub_ata_device_initialize): New function.
5422
5423 2008-08-04 Pavel Roskin <proski@gnu.org>
5424
5425 * kern/main.c: Include grub/mm.h.
5426
5427 2008-08-04 Robert Millan <rmh@aybabtu.com>
5428
5429 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5430 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5431 corruption problem).
5432
5433 2008-08-04 Robert Millan <rmh@aybabtu.com>
5434
5435 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5436 warnings introduced in my last commit.
5437
5438 2008-08-03 Robert Millan <rmh@aybabtu.com>
5439
5440 Make PCI available on all i386 architectures.
5441
5442 * include/grub/i386/pc/pci.h: Move from here ...
5443 * include/grub/i386/pci.h: ... to here.
5444
5445 * include/grub/i386/pc/pci.h: Remove.
5446 * include/grub/i386/efi/pci.h: Remove.
5447 * include/grub/x86_64/efi/pci.h: Remove.
5448
5449 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5450 `<grub/cpu/pci.h>'.
5451
5452 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5453 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5454 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5455
5456 * conf/i386-ieee1275.rmk: Likewise.
5457
5458 2008-08-03 Robert Millan <rmh@aybabtu.com>
5459
5460 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5461 (grub_console_setcursor): Make it possible to set cursor off.
5462
5463 2008-08-03 Robert Millan <rmh@aybabtu.com>
5464
5465 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5466 of modules instead of assuming which platform provides what.
5467 * util/update-grub.in: Likewise.
5468
5469 2008-08-03 Robert Millan <rmh@aybabtu.com>
5470
5471 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5472 instead of `grub_install_dos_part' to determine whether a drive needs
5473 to be prepended to prefix (`grub_install_dos_part' is not reliable,
5474 because it can be overridden when loading GRUB via Multiboot).
5475
5476 2008-08-02 Robert Millan <rmh@aybabtu.com>
5477
5478 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5479
5480 2008-08-02 Robert Millan <rmh@aybabtu.com>
5481
5482 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5483 of informational grub_dprintf() calls.
5484
5485 2008-08-02 Robert Millan <rmh@aybabtu.com>
5486
5487 * disk/memdisk.c (memdisk_size): Don't initialize.
5488 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5489
5490 * include/grub/i386/pc/kernel.h
5491 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5492 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5493 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5494 (grub_arch_memdisk_size): Remove.
5495
5496 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5497 field (was only used to transfer a constant). Add `type' field to
5498 support multiple module types.
5499 (grub_module_iterate): New function.
5500
5501 * kern/device.c (grub_device_open): Do not hide error messages
5502 when grub_disk_open() fails. Use grub_print_error() instead.
5503
5504 * kern/i386/pc/init.c (grub_arch_modules_addr)
5505 (grub_arch_memdisk_size): Remove functions.
5506 (grub_arch_modules_addr): Return the module address in high memory
5507 (now that it isn't copied anymore).
5508
5509 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5510 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5511 decompression routine (grub_total_module_size already includes that
5512 now). Don't copy modules back to low memory.
5513
5514 * kern/main.c: Include `<grub/mm.h>'.
5515 (grub_load_modules): Split out (and use) ...
5516 (grub_module_iterate): ... this function, which iterates through
5517 module objects and runs a hook.
5518 Comment out grub_mm_init_region() call, as it would cause non-ELF
5519 modules to be overwritten.
5520
5521 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5522 the memdisk image in its own region, make it part of the module list.
5523 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5524 (main): Parse --memdisk|-m option, and pass user-provided path as
5525 parameter to generate_image().
5526 (add_segments): Pass `memdisk_path' down to load_modules().
5527 (load_modules): Embed memdisk image in module section when requested.
5528 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5529 `header.type' instead of `header.offset'.
5530
5531 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5532 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5533 (memdisk_mod_LDFLAGS): New variables.
5534 * conf/i386-coreboot.rmk: Likewise.
5535 * conf/i386-ieee1275.rmk: Likewise.
5536
5537 2008-08-02 Robert Millan <rmh@aybabtu.com>
5538
5539 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5540 (backward_relocator): New variables. Used to allocate and relocate
5541 the payload, respectively.
5542 (grub_multiboot_load_elf32): Load into heap instead of requested
5543 address, install the appropriate relocator code in each bound of
5544 the payload, and set the entry point such that
5545 grub_multiboot_real_boot() will jump to one of them.
5546
5547 * kern/i386/loader.S (grub_multiboot_payload_size)
5548 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5549 (grub_multiboot_payload_entry_offset): New variables.
5550 (grub_multiboot_real_boot): Set cpu context to what the relocator
5551 expects, and jump to the relocator instead of the payload.
5552
5553 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5554 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5555 (grub_multiboot_payload_entry_offset): Export.
5556
5557 2008-08-01 Bean <bean123ch@gmail.com>
5558
5559 * normal/menu_entry.c (editor_getline): Don't return the original
5560 string as result, as it will be released by lexer once it has done
5561 using it.
5562
5563 2008-08-01 Robert Millan <rmh@aybabtu.com>
5564
5565 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5566 within menuentries, not before them.
5567 util/grub.d/10_hurd.in: Likewise.
5568
5569 2008-08-01 Bean <bean123ch@gmail.com>
5570
5571 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5572 (bufio_mod_SOURCES): New macro.
5573 (bufio_mod_CFLAGS): Likewise.
5574 (bufio_mod_LDFLAGS): Likewise.
5575
5576 * include/grub/bufio.h: New file.
5577
5578 * io/bufio.c: Likewise.
5579
5580 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5581 (grub_video_reader_png): Use grub_buffile_open to open file.
5582
5583 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5584 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5585
5586 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5587 (grub_video_reader_tga): Use grub_buffile_open to open file.
5588
5589 * font/manager.c: Include <grub/bufio.h>.
5590 (add_font): Use grub_buffile_open to open file.
5591
5592 2008-07-31 Robert Millan <rmh@aybabtu.com>
5593
5594 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5595 ELF segments, use a macro for arbitrarily accessing any of them instead
5596 of preparing a pointer that allows access to one at a time.
5597 (grub_multiboot_load_elf64): Likewise.
5598
5599 2008-07-31 Bean <bean123ch@gmail.com>
5600
5601 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5602 GRUB_KERNEL_MACHINE_DATA_END.
5603
5604 2008-07-30 Robert Millan <rmh@aybabtu.com>
5605
5606 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5607 Increase from 0x50 to 0x60.
5608 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5609 use UUIDs to identify the root drive for them. If that's not
5610 possible, abort.
5611 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5612 check, for cross-disk installs.
5613
5614 2008-07-30 Robert Millan <rmh@aybabtu.com>
5615
5616 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5617 is non-empty, use it to set the `prefix' environment variable instead
5618 of the usual approach.
5619 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5620 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5621 environment variable instead of dummy make_install_device().
5622
5623 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5624 (start): Insert a data section, with `grub_prefix' variable.
5625 * kern/i386/linuxbios/startup.S: Likewise.
5626
5627 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5628 New variable reference.
5629 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5630 New macro. Defines offset of `grub_prefix' within startup.S (relative
5631 to `start').
5632 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5633 section within startup.S (relative to `start').
5634 * include/grub/i386/coreboot/kernel.h: Likewise.
5635
5636 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5637 Overwrite grub_prefix with its contents, at the beginning of the
5638 first segment.
5639 (main): Understand -p|--prefix.
5640
5641 2008-07-30 Robert Millan <rmh@aybabtu.com>
5642
5643 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5644
5645 2008-07-30 Robert Millan <rmh@aybabtu.com>
5646
5647 * term/i386/pc/vga_text.c (grub_console_cls): Use
5648 grub_console_gotoxy() to go back to beginning of the screen.
5649 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5650
5651 2008-07-29 Christian Franke <franke@computer.org>
5652
5653 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5654 Add conversion of emulated mount points on Cygwin.
5655
5656 2008-07-29 Christian Franke <franke@computer.org>
5657
5658 * util/update-grub.in: Add a check for admin
5659 group on Cygwin.
5660 Remove old `grub.cfg.new' before creation.
5661 Add `-f' to `mv' to handle the different filesystem
5662 semantics of Windows.
5663
5664 2008-07-29 Bean <bean123ch@gmail.com>
5665
5666 * normal/main.c (get_line): Fix buffer overflow bug.
5667
5668 2008-07-28 Robert Millan <rmh@aybabtu.com>
5669
5670 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5671 (struct grub_apple_header): New struct. Describes the layout of
5672 the partmap header.
5673 (apple_partition_map_iterate): Check the header magic as well as the
5674 partition magic (which was already being checked).
5675
5676 2008-07-28 Pavel Roskin <proski@gnu.org>
5677
5678 * genmk.rb: Add a warning to the beginning of the output that
5679 it's a generated file and should not be edited.
5680
5681 2008-07-28 Robert Millan <rmh@aybabtu.com>
5682
5683 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5684 with the same number are found, just use issue a warning with
5685 grub_dprintf(), as this error has been reported to be non-fatal.
5686
5687 2008-07-27 Robert Millan <rmh@aybabtu.com>
5688
5689 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5690 information.
5691
5692 2008-07-27 Bean <bean123ch@gmail.com>
5693
5694 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5695 (grub_fat_find_dir): Ignore case when comparing filename.
5696
5697 2008-07-27 Bean <bean123ch@gmail.com>
5698
5699 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5700 smallino, as it's more descriptive, and i8count can be confused with
5701 the other field count.
5702 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5703 inode type.
5704
5705 2008-07-27 Bean <bean123ch@gmail.com>
5706
5707 * commands/crc.c: New file.
5708
5709 * lib/crc.c: Likewise.
5710
5711 * include/grub/lib/crc.h: Likewise.
5712
5713 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5714
5715 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5716 (hexdump): Move this function to ...
5717
5718 * lib/hexdump.c: ... here.
5719
5720 * include/grub/hexdump.h: Renamed to ...
5721
5722 * include/grub/lib/hexdump.h: ... this.
5723
5724 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5725
5726 * util/grub-editenv.c: Likewise.
5727
5728 * include/envblk.h: Renamed to ...
5729
5730 * include/lib/envblk.h: ... this.
5731
5732 * util/envblk.c: Renamed to ...
5733
5734 * lib/envblk.c: ... this.
5735
5736 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5737 lib/hexdump.c.
5738 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5739 (pkglib_MODULES): Add crc.mod.
5740 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5741 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5742 (crc_mod_SOURCES): New macro.
5743 (crc_mod_CFLAGS): Likewise.
5744 (crc_mod_LDFLAGS): Likewise.
5745
5746 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5747
5748 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5749
5750 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5751
5752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5753
5754 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5755
5756 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
5757
5758 * commands/help.c: Include <grub/term.h>.
5759 (TERM_WIDTH): Removed. Updated all users.
5760
5761 2008-07-27 Pavel Roskin <proski@gnu.org>
5762
5763 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5764 spurious warnings about a comment within a comment.
5765
5766 2008-07-25 Robert Millan <rmh@aybabtu.com>
5767
5768 * util/getroot.c (find_root_device): Skip devices that match
5769 /dev/dm-[0-9]. This lets the real device be found for any type of
5770 abstraction (LVM, EVMS, RAID..).
5771 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5772 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5773 device is found first, find_root_device() will now skip it.
5774
5775 2008-07-24 Pavel Roskin <proski@gnu.org>
5776
5777 * include/grub/types.h: Use __builtin_bswap32() and
5778 __builtin_bswap64() with gcc 4.3 and newer.
5779
5780 2008-07-24 Christian Franke <franke@computer.org>
5781
5782 * util/i386/pc/grub-install.in: If `--debug' is specified,
5783 pass `--verbose' to grub-setup.
5784 Abort script if make_system_path_relative_to_its_root() fails.
5785
5786 2008-07-24 Bean <bean123ch@gmail.com>
5787
5788 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5789 variable `target_platform' should be `platform'.
5790
5791 2008-07-24 Bean <bean123ch@gmail.com>
5792
5793 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5794 (grub_png_init_fixed_block): New function.
5795 (grub_png_decode_image_data): Handle fixed huffman code compression.
5796
5797 2008-07-24 Bean <bean123ch@gmail.com>
5798
5799 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5800 (grub_pe2elf_SOURCES): New macro.
5801 (CLEANFILES): Add grub-pe2elf.
5802
5803 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5804 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5805 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5806 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5807 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5808 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5809 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5810 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5811 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5812 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5813 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5814 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5815 (GRUB_PE32_DT_FUNCTION): Likewise.
5816 (GRUB_PE32_REL_I386_DIR32): Likewise.
5817 (GRUB_PE32_REL_I386_REL32): Likewise.
5818 (grub_pe32_symbol): New structure.
5819 (grub_pe32_reloc): Likewise.
5820
5821 * util/grub-pe2elf.c: New file.
5822
5823 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5824 start symbol in non pc platform.
5825
5826 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5827
5828 The following patches are from Christian Franke.
5829
5830 * include/grub/dl.h: Remove .previous, gas supports this only
5831 for ELF format.
5832
5833 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5834 Remove .type, gas supports this only for ELF format.
5835
5836 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5837 nullbytes in symbol table. This fixes an infinite loop if table is
5838 zero filled.
5839
5840 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5841 TARGET_IMG_LDFLAGS and EXEEXT.
5842
5843 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5844 TARGET_IMG_LDFLAGS_AC.
5845 (grub_CHECK_STACK_ARG_PROBE): New function.
5846
5847 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5848
5849 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5850
5851 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5852 to set TARGET_IMG_LD* accordingly.
5853 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5854 Add call to grub_CHECK_STACK_ARG_PROBE.
5855 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5856
5857 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5858
5859 * genmk.rb: Add EXEEXT to CLEANFILES.
5860
5861 2008-07-23 Robert Millan <rmh@aybabtu.com>
5862
5863 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5864 define the codes for arrows and lines used for the menu).
5865 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5866 as well.
5867
5868 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5869 fonts, because the latter are too slow.
5870
5871 2008-07-21 Bean <bean123ch@gmail.com>
5872
5873 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5874 a20. Run keyboard test last, as it will cause macbook to halt.
5875
5876 2008-07-18 Pavel Roskin <proski@gnu.org>
5877
5878 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5879 load foreign architecture modules correctly anyway. Keep
5880 support for loading host architecture modules, whether we
5881 compile them or not.
5882
5883 2008-07-17 Pavel Roskin <proski@gnu.org>
5884
5885 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5886 change target_cpu. The compiler default can mismatch target_cpu
5887 in any case.
5888
5889 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5890 * kern/efi/efi.c: Likewise.
5891
5892 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5893 target compiler is functional.
5894 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5895 are set up.
5896
5897 * configure.ac: Default to efi platform for x86_64-apple. Allow
5898 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5899 adjustments from the rest, only do them if target is not
5900 explicitly given. Merge other adjustments with the final sanity
5901 check. Remove an extraneous check for supported CPU. Be
5902 specific which CPU and which platform is not supported.
5903
5904 * configure.ac: Default to pc platform for x86_64.
5905
5906 2008-07-17 Robert Millan <rmh@aybabtu.com>
5907
5908 Partial LinuxBIOS -> Coreboot rename.
5909
5910 * conf/i386-linuxbios.rmk: Renamed to ...
5911 * conf/i386-coreboot.rmk: ... this.
5912 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5913 * configure.ac: Accept "coreboot" as input platform (but maintain
5914 compatibility with "linuxbios").
5915 * include/grub/i386/linuxbios: Renamed to ...
5916 * include/grub/i386/coreboot: ... this.
5917
5918 2008-07-17 Bean <bean123ch@gmail.com>
5919
5920 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5921 (appleldr_mod_SOURCE): New variable.
5922 (appleldr_mod_CFLAGS): Likewise.
5923 (appleldr_mod_LDFLAGS): Likewise.
5924 (pci_mod_SOURCES): Likewise.
5925 (pci_mod_CFLAGS): Likewise.
5926 (pci_mod_LDFLAGS): Likewise.
5927 (lspci_mod_SOURCES): Likewise.
5928 (lspci_mod_CFLAGS): Likewise.
5929 (lspci_mod_LDFLAGS): Likewise.
5930
5931 * conf/x86_64-efi.rmk: New file.
5932
5933 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5934 macro.
5935 (grub_efidisk_write): Likewise.
5936
5937 * include/efi/api.h (efi_call_0): New macro.
5938 (efi_call_1): Likewise.
5939 (efi_call_2): Likewise.
5940 (efi_call_3): Likewise.
5941 (efi_call_4): Likewise.
5942 (efi_call_5): Likewise.
5943 (efi_call_6): Likewise.
5944
5945 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5946 grub_rescue_cmd_chainloader.
5947
5948 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5949 (grub_pe32_optional_header): Change some fields based on i386 or
5950 x86_64 platform.
5951 (GRUB_PE32_PE32_MAGIC): Likewise.
5952
5953 * include/grub/efi/uga_draw.h: New file.
5954
5955 * include/grub/elf.h (STN_ABS): New constant.
5956 (R_X86_64_NONE): Relocation constant for x86_64.
5957 (R_X86_64_64): Likewise.
5958 (R_X86_64_PC32): Likewise.
5959 (R_X86_64_GOT32): Likewise.
5960 (R_X86_64_PLT32): Likewise.
5961 (R_X86_64_COPY): Likewise.
5962 (R_X86_64_GLOB_DAT): Likewise.
5963 (R_X86_64_JUMP_SLOT): Likewise.
5964 (R_X86_64_RELATIVE): Likewise.
5965 (R_X86_64_GOTPCREL): Likewise.
5966 (R_X86_64_32): Likewise.
5967 (R_X86_64_32S): Likewise.
5968 (R_X86_64_16): Likewise.
5969 (R_X86_64_PC16): Likewise.
5970 (R_X86_64_8): Likewise.
5971 (R_X86_64_PC8): Likewise.
5972
5973 * include/grub/i386/efi/pci.h: New file.
5974
5975 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5976 Change it value based on platform.
5977 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5978 (GRUB_E820_RAM): Likewise.
5979 (GRUB_E820_RESERVED): Likewise.
5980 (GRUB_E820_ACPI): Likewise.
5981 (GRUB_E820_NVS): Likewise.
5982 (GRUB_E820_EXEC_CODE): Likewise.
5983 (GRUB_E820_MAX_ENTRY): Likewise.
5984 (grub_e820_mmap): New structure.
5985 (linux_kernel_header): Change the efi field according to different
5986 kernel version, also field from linux_kernel_header.
5987
5988 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5989
5990 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5991 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5992 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5993 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5994 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5995 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5996 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5997 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5998 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5999 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6000
6001 * include/grub/x86_64/efi/kernel.h: New file.
6002
6003 * include/grub/x86_64/efi/loader.h: Likewise.
6004
6005 * include/grub/x86_64/efi/machine.h: Likewise.
6006
6007 * include/grub/x86_64/efi/pci.h: Likewise.
6008
6009 * include/grub/x86_64/efi/time.h: Likewise.
6010
6011 * include/grub/x86_64/linux.h: Likewise.
6012
6013 * include/grub/x86_64/setjmp.h: Likewise.
6014
6015 * include/grub/x86_64/time.h: Likewise.
6016
6017 * include/grub/x86_64/types.h: Likewise.
6018
6019 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6020 GRUB_TARGET_SIZEOF_VOID_P.
6021
6022 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6023 (grub_efi_locate_handle): Likewise.
6024 (grub_efi_open_protocol): Likewise.
6025 (grub_efi_set_text_mode): Likewise.
6026 (grub_efi_stall): Likewise.
6027 (grub_exit): Likewise.
6028 (grub_reboot): Likewise.
6029 (grub_halt): Likewise.
6030 (grub_efi_exit_boot_services): Likewise.
6031 (grub_get_rtc): Likewise.
6032
6033 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6034 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6035 (grub_efi_allocate_pages): Wrap efi calls.
6036 (grub_efi_free_pages): Wrap efi calls.
6037 (grub_efi_get_memory_map): Wrap efi calls.
6038
6039 * kern/x86_64/dl.c: New file.
6040
6041 * kern/x86_64/efi/callwrap.S: Likewise.
6042
6043 * kern/x86_64/efi/startup.S: Likewise.
6044
6045 * loader/efi/appleloader.c: Likewise.
6046
6047 * loader/efi/chainloader.c (cmdline): New variable.
6048 (grub_chainloader_unload): Wrap efi calls.
6049 (grub_chainloader_boot): Likewise.
6050 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6051 command line.
6052
6053 * loader/efi/chainloader_normal.c (chainloader_command):
6054 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6055 command line.
6056
6057 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6058 method.
6059 (grub_e820_add_region): New function.
6060 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6061 booting.
6062 (grub_find_video_card): New function.
6063 (grub_linux_setup_video): New function.
6064 (grub_rescue_cmd_linux): Probe for video information.
6065
6066 * normal/x86_64/setjmp.S: New file.
6067
6068 * term/efi/console.c (map_char): New function.
6069 (grub_console_putchar): Map unicode char.
6070 (grub_console_checkkey): Wrap efi calls.
6071 (grub_console_getkey): Likewise.
6072 (grub_console_getwh): Likewise.
6073 (grub_console_gotoxy): Likewise.
6074 (grub_console_cls): Likewise.
6075 (grub_console_setcolorstate): Likewise.
6076 (grub_console_setcursor): Likewise.
6077
6078 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6079
6080 2008-07-16 Pavel Roskin <proski@gnu.org>
6081
6082 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6083 format strings.
6084
6085 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6086 pointer, not an integer. This fixes a warning and prevents
6087 precision loss on 64-bit systems.
6088 (relocate_addresses): Remove unneeded cast.
6089
6090 2008-07-15 Pavel Roskin <proski@gnu.org>
6091
6092 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6093
6094 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6095
6096 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6097 Fix comparison between signed and unsigned.
6098
6099 * include/grub/i386/ieee1275/console.h: Declare
6100 grub_console_init() and grub_console_fini().
6101
6102 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6103 It's empty and unused.
6104
6105 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6106 beginning to avoid warnings with some compilers.
6107
6108 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6109 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6110
6111 2008-07-14 Pavel Roskin <proski@gnu.org>
6112
6113 * kern/env.c (grub_register_variable_hook): Don't copy empty
6114 string, it leaks memory. Pass "" to grub_env_set(), it should
6115 handle constant strings.
6116
6117 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6118 * commands/cmp.c (grub_cmd_cmp): Likewise.
6119 * kern/dl.c (grub_dl_flush_cache): Likewise.
6120 (grub_dl_load_core): Likewise.
6121 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6122 (grub_elf64_load_phdrs): Likewise.
6123
6124 2008-07-13 Pavel Roskin <proski@gnu.org>
6125
6126 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6127 between signed and unsigned.
6128 (LzmaEnc_Finish): Fix warning about an unused parameter.
6129
6130 2008-07-13 Bean <bean123ch@gmail.com>
6131
6132 * Makefile.in (enable_lzo): New rule.
6133
6134 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6135
6136 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6137
6138 * boot/i386/pc/lnxboot.S: #include <config.h>.
6139
6140 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6141 its value according to the compression algorithm used, lzo or lzma.
6142
6143 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6144 compression algorithm according to configure macro.
6145
6146 * kern/i386/pc/startup.S (codestart): Likewise.
6147
6148 * kern/i386/pc/lzma_decode.S: New file.
6149
6150 * include/grub/lib/LzFind.h: Likewise.
6151
6152 * include/grub/lib/LzHash.h: Likewise.
6153
6154 * include/grub/lib/LzmaDec.h: Likewise.
6155
6156 * include/grub/lib/LzmaEnc.h: Likewise.
6157
6158 * include/grub/lib/LzmaTypes.h: Likewise.
6159
6160 * lib/LzFind.c: Likewise.
6161
6162 * lib/LzmaDec.c: Likewise.
6163
6164 * lib/LzmaEnc.c: Likewise.
6165
6166 2008-07-13 Bean <bean123ch@gmail.com>
6167
6168 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6169 (grub_ext4_extent_header): New structure.
6170 (grub_ext4_extent): Likewise.
6171 (grub_ext4_extent_idx): Likewise.
6172 (grub_ext4_find_leaf): New function.
6173 (grub_ext2_read_block): Handle extents.
6174
6175 2008-07-12 Robert Millan <rmh@aybabtu.com>
6176
6177 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6178
6179 2008-07-11 Robert Millan <rmh@aybabtu.com>
6180
6181 * util/grub.d/40_custom.in: New file. Example on how to add custom
6182 entries to /etc/grub.d.
6183 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6184 40_custom (implicitly, by merging all the grub.d rules).
6185
6186 2008-07-11 Pavel Roskin <proski@gnu.org>
6187
6188 * commands/read.c (grub_getline): Fix invalid memory access.
6189 Don't add newline to the variable value.
6190
6191 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6192 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6193 (serial_hw_get_port): Check validity of the port number.
6194 (grub_cmd_serial): Check return value of serial_hw_get_port().
6195
6196 2008-07-07 Pavel Roskin <proski@gnu.org>
6197
6198 * boot/i386/pc/diskboot.S (notification_string): Replace
6199 "Loading kernel" with just "loading". This is shorter, less
6200 confusing and saves a few bytes for possible future changes.
6201
6202 2008-07-05 Pavel Roskin <proski@gnu.org>
6203
6204 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6205 size for ATAPI devices, they are undefined. Output sector
6206 number in decimal form.
6207
6208 * disk/ata.c: Use named constants for status bits.
6209
6210 2008-07-04 Pavel Roskin <proski@gnu.org>
6211
6212 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6213 grub_addr_t before casting it to the void pointer to fix a
6214 warning. Non-addressable regions are discarded earlier.
6215 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6216 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6217 (check_signature): Don't shadow table_header.
6218 (grub_linuxbios_table_iterate): Cast numeric constants to
6219 grub_linuxbios_table_header_t.
6220 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6221 grub_stop().
6222
6223 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6224 prevent warnings.
6225
6226 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6227 pointer, which can cause warnings. Support 64-bit addresses.
6228
6229 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6230 of sizeof(long). This fixes PowerPC image generation on x86_64.
6231
6232 2008-07-04 Robert Millan <rmh@aybabtu.com>
6233
6234 This fixes a performance issue when pc & gpt partmap iterators
6235 didn't abort iteration even after our hook found what it was
6236 looking for (often causing expensive probes of non-existent drives).
6237
6238 Some callers relied on previous buggy behaviour, since they would
6239 raise an error when their own hooks caused early abortion of its
6240 iteration.
6241
6242 * kern/device.c (grub_device_open): Improve error message.
6243 * disk/lvm.c (grub_lvm_open): Likewise.
6244 * disk/raid.c (grub_raid_open): Likewise.
6245
6246 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6247 when hook requests it, independently of grub_errno.
6248 (pc_partition_map_probe): Do not fail when find_func() caused
6249 early abortion of pc_partition_map_iterate().
6250
6251 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6252 when hook requests it, independently of grub_errno.
6253 (gpt_partition_map_probe): Do not fail when find_func() caused
6254 early abortion of gpt_partition_map_iterate().
6255
6256 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6257 when hook requests it, independently of grub_errno. Do not fail when
6258 part_map_iterate_hook() caused early abortion of p->iterate().
6259
6260 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6261 when grub_partition_iterate() returned with non-zero.
6262
6263 2008-07-03 Pavel Roskin <proski@gnu.org>
6264
6265 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6266 like we do in grub_ata_pio_read().
6267 (grub_ata_readwrite): Always write individual sectors. Fix the
6268 sector count for the remainder.
6269 (grub_ata_write): Enable writing to ATA devices. Correctly
6270 report error for ATAPI devices.
6271
6272 2008-07-02 Pavel Roskin <proski@gnu.org>
6273
6274 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6275 warning.
6276
6277 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6278 for every read sector, we already increment it for the whole
6279 batch. This fixes reading more than 256 sectors at once.
6280
6281 * util/grub-editenv.c (cmd_info): Cast argument to long
6282 explicitly. ptrdiff_t reduces to int on i386.
6283
6284 * util/grub-editenv.c (main): Be specific which parameter is
6285 missing.
6286
6287 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6288 (memdisk): Make memdisk_orig_addr a pointer.
6289
6290 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6291 for file offsets, use grub_off_t instead. Fix printf format
6292 warnings.
6293
6294 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6295 there. Real unexpected warnings should not drown in the noise
6296 about known problems.
6297
6298 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6299 grub_disk_addr_t for memory addresses.
6300
6301 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6302 explicitly to fix a warning.
6303
6304 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6305
6306 * Makefile.in (MODULE_LDFLAGS): New variable.
6307 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6308 the linker accepts --build-id=none.
6309 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6310 MODULE_LDFLAGS.
6311 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6312
6313 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6314 those in Linux XFS code. Provide a way to access 64-bit parent
6315 inode.
6316 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6317 the end of struct grub_xfs_dir_header.
6318
6319 2008-07-02 Bean <bean123ch@gmail.com>
6320
6321 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6322 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6323 and GRUB_IEEE1275_FLAG_NO_ANSI.
6324
6325 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6326 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6327 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6328
6329 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6330 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6331
6332 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6333 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6334
6335 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6336 esc sequence on non ANSI terminal.
6337 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6338
6339 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6340 beginning of file.
6341
6342 2008-07-02 Bean <bean123ch@gmail.com>
6343
6344 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6345 (grub_editenv_SOURCES): New variable.
6346 (pkglib_MODULES): Add loadenv.mod.
6347 (loadenv_mod_SOURCES): New variable.
6348 (loadenv_mod_CFLAGS): Likewise.
6349 (loadenv_mod_LDFLAGS): Likewise.
6350
6351 * include/grub/envblk.h: New file.
6352
6353 * util/envblk.c: New file.
6354
6355 * util/grub-editenv.c: New file.
6356
6357 * commands/loadenv.c: New file.
6358
6359 2008-07-01 Pavel Roskin <proski@gnu.org>
6360
6361 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6362 not unsigned char. This fixes warnings and is consistent with
6363 other tags.
6364
6365 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6366
6367 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6368
6369 * term/tparm.c (analyze): Always set *popcount.
6370
6371 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6372 cast to fix a warning.
6373
6374 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6375 cast to suppress a warning.
6376
6377 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6378 grub_fshelp_read_file() expects.
6379
6380 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6381 write uuid as a 32-bit value in CPU byte order, so declare and
6382 use it as such.
6383
6384 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6385 long if the format specifier expects it.
6386 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6387 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6388 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6389 long to fix a warning.
6390 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6391 grub_dprintf() arguments to fix warnings.
6392
6393 2008-06-30 Pavel Roskin <proski@gnu.org>
6394
6395 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6396 install_bsd_part immediately before core.img is embedded or
6397 modified on disk. This fixes core.img verification if core.img
6398 cannot be embedded.
6399
6400 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6401 core_path to calculate the blocklist.
6402 Patch from Javier Martín <lordhabbit@gmail.com>
6403
6404 2008-06-29 Robert Millan <rmh@aybabtu.com>
6405
6406 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6407 block to disk block.
6408 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6409 Patch from Niels Böhm <bitbucket@arcor.de>
6410
6411 2008-06-29 Robert Millan <rmh@aybabtu.com>
6412
6413 * util/update-grub_lib.in (font_path): Search for fonts in
6414 /boot/grub first, which is more likely to be readable (we aren't
6415 deciding where fonts live, just looking for them).
6416
6417 2008-06-26 Pavel Roskin <proski@gnu.org>
6418
6419 * util/biosdisk.c (read_device_map): Don't leave dead map
6420 entries for devices failing stat() check.
6421
6422 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6423 core_path_dev for the core.img path on the target device.
6424
6425 2008-06-26 Robert Millan <rmh@aybabtu.com>
6426
6427 * disk/fs_uuid.c: New file.
6428 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6429 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6430 (fs_uuid_mod_LDFLAGS): New variables.
6431 * include/grub/disk.h (grub_disk_dev_id): Add
6432 `GRUB_DISK_DEVICE_UUID_ID'.
6433 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6434 implement iterate().
6435
6436 2008-06-26 Robert Millan <rmh@aybabtu.com>
6437
6438 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6439 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6440 Linux image includes no initrd.
6441
6442 2008-06-21 Javier Martín <lordhabbit@gmail.com>
6443
6444 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6445 call to resolve the core image location that effectively appended the
6446 name twice.
6447
6448 2008-06-21 Robert Millan <rmh@aybabtu.com>
6449
6450 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6451 call from here ...
6452
6453 * util/grub.d/10_hurd.in: ... to here ...
6454 * util/grub.d/10_linux.in: ... and here.
6455
6456 2008-06-19 Robert Millan <rmh@aybabtu.com>
6457
6458 * kern/main.c (grub_main): Export `prefix' variable immediately
6459 after it has been set by grub_machine_set_prefix().
6460
6461 2008-06-19 Robert Millan <rmh@aybabtu.com>
6462
6463 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6464 search result when not saving to variable, not the other way around.
6465 When saving to variable, abort iteration as soon as a match is found.
6466
6467 2008-06-19 Robert Millan <rmh@aybabtu.com>
6468
6469 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6470 check for partition that provides /boot/grub. Its logic is flawed,
6471 as it prevents prepare_grub_to_access_device() from being called
6472 multiple times.
6473
6474 2008-06-19 Robert Millan <rmh@aybabtu.com>
6475
6476 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6477 "insmod" command directly when abstraction modules are needed,
6478 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6479 since it had already been processed).
6480
6481 2008-06-19 Pavel Roskin <proski@gnu.org>
6482
6483 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6484 changed. This is needed in case GRUB_LIBDIR changes.
6485 * conf/i386-ieee1275.rmk: Likewise.
6486 * conf/i386-linuxbios.rmk: Likewise.
6487 * conf/i386-pc.rmk: Likewise.
6488 * conf/powerpc-ieee1275.rmk: Likewise.
6489
6490 2008-06-18 Pavel Roskin <proski@gnu.org>
6491
6492 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6493 kernel_elf_symlist.c to symlist.c for consistency with other
6494 architectures. Update all users.
6495 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6496
6497 2008-06-18 Robert Millan <rmh@aybabtu.com>
6498
6499 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6500 it in prefix.
6501
6502 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6503 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6504 a RAID device, run setup() for all members independently on whether
6505 LVM abstraction is being used.
6506 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6507 If grub-mkimage has set `*install_dos_part == -2', don't override this
6508 value.
6509 Perform *install_dos_part adjustments independently on whether
6510 we're embedding or not.
6511 Clarify error message when image is too big for embedding.
6512 Remove duplicate *install_dos_part stanza.
6513
6514 2008-06-17 Robert Millan <rmh@aybabtu.com>
6515
6516 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6517 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6518 variables.
6519 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6520 values in grub_ofconsole_normal_color and
6521 grub_ofconsole_highlight_color (they're not directly related to
6522 background and foreground).
6523 (grub_ofconsole_setcolorstate): Extract background and foreground
6524 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6525
6526 2008-06-17 Robert Millan <rmh@aybabtu.com>
6527
6528 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6529 /boot/grub for the check in last commit, not /boot (they could be
6530 different partitions).
6531
6532 2008-06-16 Robert Millan <rmh@aybabtu.com>
6533
6534 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6535 asked to setup access for the same partition that provides /boot,
6536 don't bother using UUIDs since our root already has the value we
6537 want.
6538
6539 2008-06-16 Robert Millan <rmh@aybabtu.com>
6540
6541 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6542 I2O devices.
6543 Patch from Sven Mueller <sven@debian.org>.
6544
6545 2008-06-16 Robert Millan <rmh@aybabtu.com>
6546
6547 * util/update-grub.in: Check for $EUID instead of $UID.
6548 Reported by Vincent Zweije.
6549
6550 2008-06-16 Bean <bean123ch@gmail.com>
6551
6552 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6553 (grub_ext2_read_block): Likewise.
6554 (grub_ext2_read_inode): Likewise.
6555 (grub_ext2_mount): Likewise.
6556 (grub_ext2_close): Likewise.
6557 (grub_ext3_get_journal): Removed.
6558
6559 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6560 (grub_reiserfs_read_symlink): Likewise.
6561 (grub_reiserfs_mount): Likewise.
6562 (grub_reiserfs_open): Likewise.
6563 (grub_reiserfs_read): Likewise.
6564 (grub_reiserfs_close): Likewise.
6565 (grub_reiserfs_get_journal): Removed.
6566
6567 * fs/fshelp.c (grub_fshelp_read): Removed.
6568 (grub_fshelp_map_block): Likewise.
6569
6570 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6571 (grub_fshelp_journal): Likewise.
6572 (grub_fshelp_read): Likewise.
6573 (grub_fshelp_map_block): Likewise.
6574
6575 2008-06-16 Pavel Roskin <proski@gnu.org>
6576
6577 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6578 floating point anymore.
6579 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6580
6581 2008-06-15 Pavel Roskin <proski@gnu.org>
6582
6583 * commands/ls.c (grub_ls_list_files): Use integer calculations
6584 for human readable format, avoid floating point use.
6585 * kern/misc.c (grub_ftoa): Remove.
6586 (grub_vsprintf): Remove floating point support.
6587
6588 2008-06-15 Robert Millan <rmh@aybabtu.com>
6589
6590 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6591 devices.
6592 Reported by Max Vozeler.
6593
6594 2008-06-15 Robert Millan <rmh@aybabtu.com>
6595
6596 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6597 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6598 skipped later.
6599 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6600 the beginning of the prefix.
6601
6602 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6603 It is assumed that if we have a memdisk, grub-mkimage has set
6604 grub_prefix to include the "(memdisk)" drive in it.
6605
6606 2008-06-15 Robert Millan <rmh@aybabtu.com>
6607
6608 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6609 Initialize keyboard controller after registering the terminal, so that
6610 grub_printf() can be called from grub_keyboard_controller_init().
6611
6612 2008-06-15 Robert Millan <rmh@aybabtu.com>
6613
6614 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6615 extent-btree which is written as big endian on disk.
6616 Reported by Alain Greppin <al@chilibi.org>.
6617
6618 2008-06-14 Robert Millan <rmh@aybabtu.com>
6619
6620 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6621 * util/i386/pc/grub-install.in (modules): Likewise.
6622
6623 2008-06-13 Pavel Roskin <proski@gnu.org>
6624
6625 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6626
6627 2008-06-13 Bean <bean123ch@gmail.com>
6628
6629 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6630
6631 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6632
6633 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6634 to indicate sparse block.
6635
6636 2008-06-12 Pavel Roskin <proski@gnu.org>
6637
6638 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6639 number, grub_fshelp_read() does it for us.
6640
6641 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6642 linear disk read with journal translation.
6643 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6644 * include/grub/fshelp.h: Declare grub_fshelp_read().
6645
6646 2008-06-09 Pavel Roskin <proski@gnu.org>
6647
6648 * fs/minix.c (grub_minix_mount): Handle error reading
6649 superblock.
6650
6651 2008-06-08 Robert Millan <rmh@aybabtu.com>
6652
6653 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6654 don't append the RAID prefix afterwards.
6655 Reported by Clint Adams.
6656
6657 2008-06-08 Robert Millan <rmh@aybabtu.com>
6658
6659 Based on description from Pavel:
6660 * kern/disk.c (grub_disk_check_range): Rename to ...
6661 (grub_disk_adjust_range): ... this. Add a comment explaining the
6662 tasks performed by this function.
6663
6664 2008-06-08 Robert Millan <rmh@aybabtu.com>
6665
6666 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6667 `num_serial' (for consistency with other variables).
6668 (struct grub_ntfs_data): Add `uuid' member.
6669 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6670 (grub_ntfs_uuid): New function.
6671 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6672
6673 2008-06-07 Pavel Roskin <proski@gnu.org>
6674
6675 * util/biosdisk.c (open_device): Revert last change to the
6676 function, it broke installation. The sector needs to be
6677 different dependent on which device is opened.
6678
6679 2008-06-06 Robert Millan <rmh@aybabtu.com>
6680
6681 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6682 rest of GRUB, and breakage doesn't happen if its value were modified.
6683
6684 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6685 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6686 a constant (same value).
6687 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6688 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6689
6690 2008-06-06 Robert Millan <rmh@aybabtu.com>
6691
6692 * util/biosdisk.c (open_device): Do not modify sector offset when
6693 accessing a partition. kern/disk.c already handles this for us.
6694
6695 2008-06-06 Robert Millan <rmh@aybabtu.com>
6696
6697 * util/grub-emu.c (grub_machine_init): Move code in this function from
6698 here ...
6699 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6700 segfault in case grub_printf() is called).
6701
6702 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6703 grub_probe. Update all users not to explicitly add it again.
6704 (grub_device): New variable; contains corresponding device for grubdir.
6705 (fs_module, partmap_module, devabstraction_module): Pass
6706 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6707 every time.
6708
6709 2008-06-05 Robert Millan <rmh@aybabtu.com>
6710
6711 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6712 is found, print it (same layout as with labels).
6713
6714 2008-06-04 Robert Millan <rmh@aybabtu.com>
6715
6716 * util/biosdisk.c (get_drive): Rename to ...
6717 (find_grub_drive): ... this. Update all users.
6718
6719 (get_os_disk): Rename to ...
6720 (convert_system_partition_to_system_disk): ... this. Update all users.
6721
6722 (find_drive): Rename to ...
6723 (find_system_device): ... this. Update all users.
6724
6725 2008-06-04 Robert Millan <rmh@aybabtu.com>
6726
6727 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6728 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6729 (make_device_map): Likewise.
6730
6731 2008-06-01 Robert Millan <rmh@aybabtu.com>
6732
6733 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6734 before dereferencing it.
6735
6736 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6737 union with fat12/fat16-specific ones. Add some new fields, including
6738 `num_serial' for both versions.
6739 (struct grub_fat_data): Add `uuid' member.
6740 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6741 names. Initialize `data->uuid' using `num_serial'.
6742 (grub_fat_uuid): New function.
6743 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6744
6745 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6746 (grub_reiserfs_uuid): New function.
6747 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6748 member.
6749
6750 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6751 (grub_xfs_uuid): New function.
6752 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6753
6754 2008-06-01 Robert Millan <rmh@aybabtu.com>
6755
6756 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6757 code that is backward compatible with pre-uuid search command.
6758
6759 2008-05-31 Robert Millan <rmh@aybabtu.com>
6760
6761 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6762 floppies after everything else, to ensure floppy drive isn't accessed
6763 unnecessarily (patch from Bean).
6764
6765 2008-05-31 Robert Millan <rmh@aybabtu.com>
6766
6767 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6768 not print device names when we were asked to set a variable.
6769
6770 2008-05-31 Robert Millan <rmh@aybabtu.com>
6771
6772 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6773 using "cursor-on" and "cursor-off" commands (understood at least by
6774 the Open Firmware flavour on OLPC).
6775
6776 2008-05-31 Michael Gorven <michael@gorven.za.net>
6777
6778 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6779 on and off sequences.
6780
6781 2008-05-31 Robert Millan <rmh@aybabtu.com>
6782
6783 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6784 * util/update-grub.in: Likewise.
6785
6786 2008-05-30 Pavel Roskin <proski@gnu.org>
6787
6788 * util/biosdisk.c (linux_find_partition): Simplify logic and
6789 make the code more universal. Keep special processing for
6790 devfs, but use a simple rule for all other devices. If the
6791 device ends with a number, append 'p' and the partition number.
6792 Otherwise, append only the partition number.
6793
6794 2008-05-30 Robert Millan <rmh@aybabtu.com>
6795
6796 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6797 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6798 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6799 the `root' parameter to Linux.
6800
6801 2008-05-30 Robert Millan <rmh@aybabtu.com>
6802
6803 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6804 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6805 --fs_uuid with --fs-uuid.
6806 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6807 all filesystems support them).
6808
6809 2008-05-30 Robert Millan <rmh@aybabtu.com>
6810
6811 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6812 grub_printf() flags, since we're printing in units of 2 bytes.
6813
6814 2008-05-30 Robert Millan <rmh@aybabtu.com>
6815
6816 * util/grub.d/00_header.in: Remove obsolete comment referencing
6817 convert_system_path_to_grub_path().
6818 * util/update-grub.in: Likewise.
6819 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6820 (convert_system_path_to_grub_path): Add a warning message explaining
6821 that this function is deprecated. Rely on is_path_readable_by_grub()
6822 for the readability checks.
6823 (font_path): Use is_path_readable_by_grub() for the readability
6824 check rather than convert_system_path_to_grub_path().
6825
6826 2008-05-30 Robert Millan <rmh@aybabtu.com>
6827
6828 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6829 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6830 converting it first.
6831 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6832 grub.cfg for access to font file, and afterwards call it again to set
6833 the root device.
6834
6835 2008-05-30 Robert Millan <rmh@aybabtu.com>
6836
6837 * commands/search.c (options): Add --fs_uuid option.
6838 (search_fs_uuid): New function.
6839 (grub_cmd_search): Fix --set argument passing.
6840 Use search_fs_uuid() when requested via --fs_uuid.
6841 (grub_search_init): Update help message.
6842 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6843 and redeclare it as an array of 16-bit words.
6844 (grub_ext2_uuid): New function.
6845 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6846 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6847 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6848 (GRUB_DEVICE_BOOT_UUID): New variables.
6849 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6850 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6851 whenever possible.
6852 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6853 just assume `root' variable has the right value.
6854 * util/grub.d/10_linux.in: Likewise.
6855 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6856 via PRINT_FS_UUID.
6857 (main): Recognise `-t fs_uuid' argument.
6858
6859 2008-05-30 Robert Millan <rmh@aybabtu.com>
6860
6861 * util/biosdisk.c (map): Redefine structure to hold information
6862 about GRUB drive name.
6863 (get_drive): Reimplement without assuming (and verifying) BIOS-like
6864 drive names.
6865 (call_hook): Remove.
6866 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6867 member. Assume drive has partitions.
6868 (grub_util_biosdisk_open): Access device names via `.device' struct
6869 member.
6870 (open_device): Likewise.
6871 (find_drive): Likewise.
6872 (read_device_map): Adjust map[] usage to match the new struct
6873 definition. Don't check for duplicates (still possible, but not cheap
6874 anymore).
6875 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6876 (make_device_name): Remove assumption of BIOS-like drive names.
6877
6878 2008-05-30 Pavel Roskin <proski@gnu.org>
6879
6880 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6881 compiling execute.c doesn't need grub_script.tab.h anymore.
6882 (normal/command.c_DEPENDENCIES): Likewise.
6883 (normal/function.c_DEPENDENCIES): Likewise.
6884 * conf/i386-ieee1275.rmk: Likewise.
6885 * conf/i386-linuxbios.rmk: Likewise.
6886 * conf/i386-pc.rmk: Likewise.
6887 * conf/powerpc-ieee1275.rmk: Likewise.
6888 * conf/sparc64-ieee1275.rmk: Likewise.
6889
6890 2008-05-29 Pavel Roskin <proski@gnu.org>
6891
6892 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6893 when scanning metadata for volume group name.
6894
6895 * include/grub/script.h: Don't include grub_script.tab.h. It's
6896 a generated file, which may only be included from the files with
6897 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6898 use union YYSTYPE, as the later allows forward declaration.
6899 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6900
6901 2008-05-29 Robert Millan <rmh@aybabtu.com>
6902
6903 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6904 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6905 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6906 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6907 scan codes.
6908
6909 2008-05-29 Robert Millan <rmh@aybabtu.com>
6910
6911 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6912 control key combinations.
6913
6914 2008-05-29 Robert Millan <rmh@aybabtu.com>
6915
6916 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6917 * util/ieee1275/grub-install.in: ... to here.
6918 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6919 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6920 (grub_install_SOURCES): Likewise.
6921
6922 2008-05-29 Robert Millan <rmh@aybabtu.com>
6923
6924 * fs/affs.c: Update copyright year.
6925 * fs/ext2.c: Likewise.
6926 * fs/fshelp.c: Likewise.
6927 * fs/hfsplus.c: Likewise.
6928 * fs/ntfs.c: Likewise.
6929 * fs/xfs.c: Likewise.
6930 * include/grub/fshelp.h: Likewise.
6931 * util/grub-mkdevicemap.c: Likewise.
6932
6933 2008-05-28 Robert Millan <rmh@aybabtu.com>
6934
6935 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6936 might need to be fatfs to support some firmware implementations
6937 (e.g. OFW or EFI).
6938
6939 2008-05-28 Robert Millan <rmh@aybabtu.com>
6940
6941 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6942 devices.
6943 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6944 (make_device_map): Likewise.
6945
6946 2008-05-20 Bean <bean123ch@gmail.com>
6947
6948 * fs/fshelp.c (grub_fshelp_map_block): New function.
6949 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6950 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6951
6952 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6953 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6954 (grub_fshelp_journal): New structure.
6955 (grub_fshelp_map_block): New function prototype.
6956 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6957 (grub_fshelp_map_block): Likewise.
6958
6959 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6960 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6961 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6962 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6963 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6964 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6965 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6966 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6967 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6968 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6969 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6970 (grub_ext2_sblock): New members for journal support.
6971 (grub_ext3_journal_header): New structure.
6972 (grub_ext3_journal_revoke_header): Likewise.
6973 (grub_ext3_journal_block_tag): Likewise.
6974 (grub_ext3_journal_sblock): Likewise.
6975 (grub_fshelp_node): New members logfile and journal.
6976 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6977 grub_fshelp_map_block to get real block number.
6978 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6979 number.
6980 (grub_ext2_read_inode): Likewise.
6981 (grub_ext3_get_journal): New function.
6982 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6983 (grub_ext2_close): Release memory used by journal.
6984
6985 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6986 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6987 (grub_reiserfs_transaction_header): Renamed to
6988 grub_reiserfs_description_block, replace field data with real_blocks.
6989 (grub_reiserfs_commit_block): New structure.
6990 (grub_reiserfs_data): New member journal.
6991 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6992 number.
6993 (grub_reiserfs_read_symlink): Likewise.
6994 (grub_reiserfs_iterate_dir): Likewise.
6995 (grub_reiserfs_open): Likewise.
6996 (grub_reiserfs_read): Likewise.
6997 (grub_reiserfs_get_journal): New function.
6998 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6999 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7000 using grub_reiserfs_get_journal.
7001 (grub_reiserfs_close): Release memory used by journal.
7002
7003 * fs/affs.c (grub_affs_read_block): Change block type to
7004 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7005
7006 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7007
7008 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7009
7010 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7011
7012 * fs/udf.c (grub_udf_read_block): Change block type to
7013 grub_disk_addr_t. Use type cast to avoid warning.
7014
7015 * fs/xfs.c (grub_xfs_read_block): Likewise.
7016
7017 2008-05-16 Christian Franke <franke@computer.org>
7018
7019 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7020 to ensure that break with ESC will always work.
7021 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7022 Remove ESC from keyboard queue.
7023
7024 2008-05-16 Christian Franke <franke@computer.org>
7025
7026 * util/biosdisk.c: [__CYGWIN__] Add includes.
7027 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7028 (get_os_disk): Move variable declarations to OS specific
7029 parts to avoid warning.
7030 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7031 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7032 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7033 Cygwin.
7034 * util/getroot.c: [__CYGWIN__] Add includes.
7035 (strip_extra_slashes): Fix "/" case.
7036 [__CYGWIN__] (get_win32_path): New function.
7037 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7038 [__CYGWIN__] (find_root_device): Disable.
7039 [__CYGWIN__] (get_bootsec_serial): New function.
7040 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7041 [__linux__] (grub_guess_root_device): Add early returns to simplify
7042 structure.
7043 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7044 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7045 check for Linux only.
7046
7047 2008-05-15 Bean <bean123ch@gmail.com>
7048
7049 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7050 keyboard hang problem in apple's intel mac.
7051
7052 2008-05-09 Robert Millan <rmh@aybabtu.com>
7053
7054 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7055 devices.
7056 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7057 (make_device_map): Likewise.
7058 Reported by Aurelien Jarno <aurel32@debian.org>
7059
7060 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
7061
7062 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7063 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7064 (make_device_map): Output entries for xvd type disks.
7065
7066 2008-05-07 Robert Millan <rmh@aybabtu.com>
7067
7068 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7069 devices.
7070 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7071 (make_device_map): Likewise.
7072 Reported by Roland Dreier <rdreier@cisco.com>
7073
7074 2008-05-07 Robert Millan <rmh@aybabtu.com>
7075
7076 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7077 grub_strstr() call. Correct a few mistakes in failure path handling.
7078
7079 2008-05-06 Robert Millan <rmh@aybabtu.com>
7080
7081 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7082 Do not print a trailing slash (therefore, the root directory is an
7083 empty string).
7084 (convert_system_path_to_grub_path): Do not remove trailing slash
7085 from make_system_path_relative_to_its_root() output.
7086
7087 * util/i386/pc/grub-install.in: Add trailing slash to output from
7088 make_system_path_relative_to_its_root().
7089
7090 2008-05-06 Robert Millan <rmh@aybabtu.com>
7091
7092 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7093 ensures that output lines aren't intermangled with those sent to
7094 stderr (via grub_util_info()).
7095 * util/grub-probe.c (grub_refresh): Likewise.
7096 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7097
7098 2008-05-05 Christian Franke <franke@computer.org>
7099
7100 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7101 Add Cygwin device names.
7102 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7103 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7104 (check_device): Return error instead of success on empty name.
7105 (make_device_map): Move label inside linux specific code to
7106 prevent compiler warning.
7107
7108 2008-04-30 Robert Millan <rmh@aybabtu.com>
7109
7110 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7111 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7112 first boot option.
7113 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7114
7115 2008-04-29 Robert Millan <rmh@aybabtu.com>
7116
7117 * docs/grub.cfg: New file (example GRUB configuration).
7118
7119 2008-04-26 Robert Millan <rmh@aybabtu.com>
7120
7121 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7122 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7123 and `disk/ieee1275/nand.c'.
7124
7125 2008-04-25 Bean <bean123ch@gmail.com>
7126
7127 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7128 i386-linuxbios.
7129
7130 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7131 change the buffer size to 4096 for cdrom device.
7132
7133 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7134 and nand.mod.
7135 (_linux_mod_SOURCES): New variable.
7136 (_linux_mod_CFLAGS): Likewise.
7137 (_linux_mod_LDFLAGS): Likewise.
7138 (linux_mod_SOURCES): Likewise.
7139 (linux_mod_CFLAGS): Likewise.
7140 (linux_mod_LDFLAGS): Likewise.
7141 (nand_mod_SOURCES): Likewise.
7142 (nand_mod_CFLAGS): Likewise.
7143 (nand_mod_LDFLAGS): Likewise.
7144
7145 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7146 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7147 type property. (nand device in olpc don't have this property)
7148
7149 * include/grub/disk.h (grub_disk_dev_id): New macro
7150 GRUB_DISK_DEVICE_NAND_ID.
7151
7152 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7153 function prototype.
7154 (grub_rescue_cmd_initrd): Likewise.
7155
7156 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7157 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7158 ofw_cif_handler and ofw_idt, adjust padding number.
7159
7160 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7161 GRUB_MACHINE_IEEE1275 is defined.
7162
7163 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7164 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7165
7166 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7167 on nested function heap_init.
7168 (grub_upper_mem): New variable for i386-ieee1275.
7169 (grub_get_extended_memory): New function for i386-ieee1275.
7170 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7171
7172 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7173 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7174 property.
7175
7176 * loader/i386/ieee1275/linux.c: New file.
7177
7178 * loader/i386/ieee1275/linux_normal.c: New file.
7179
7180 * disk/ieee1275/nand.c: New file.
7181
7182 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7183
7184 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7185 value.
7186 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7187
7188 2008-04-18 Robert Millan <rmh@aybabtu.com>
7189
7190 Restructures early code path on ieee1275 to unify grub_main() as
7191 the first C function that is executed in every platform.
7192
7193 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7194 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7195 cmain().
7196 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7197 * kern/ieee1275/cmain.c (cmain): Rename to ...
7198 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7199 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7200 at the beginning.
7201
7202 2008-04-18 Robert Millan <rmh@aybabtu.com>
7203
7204 * util/update-grub.in: Fix syntax error when setting
7205 `GRUB_PRELOAD_MODULES'.
7206 Reported by Stephane Chazelas <stephane@artesyncp.com>
7207
7208 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7209
7210 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7211 section into account, newer toolchains generate unique build ids
7212 * configure.ac: remove the test for --build-id=none acceptance,
7213 we want build ids to be preserved
7214 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7215 far from other sections don't cause the raw binary images grow
7216 size
7217
7218 2008-04-15 Robert Millan <rmh@aybabtu.com>
7219
7220 * disk/lvm.c: Update copyright year.
7221 * kern/misc.c: Likewise.
7222
7223 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7224
7225 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7226 there is no memory left for physical volume name.
7227
7228 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7229
7230 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7231 volume name mapping to support bigger than 9 character names properly.
7232
7233 2008-04-13 Robert Millan <rmh@aybabtu.com>
7234
7235 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7236 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7237
7238 2008-04-13 Christian Franke <franke@computer.org>
7239
7240 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7241 to create a floppy emulation boot CD when non emulation mode
7242 does not work.
7243 Enable Joliet CD filesystem extension.
7244
7245 2008-04-13 Robert Millan <rmh@aybabtu.com>
7246
7247 * kern/misc.c (grub_strncat): Fix off-by-one error.
7248 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7249
7250 * kern/env.c (grub_env_context_close): Clear current context, not
7251 previous one.
7252 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7253
7254 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7255
7256 2008-04-13 Robert Millan <rmh@aybabtu.com>
7257
7258 Improve robustness when handling LVM.
7259
7260 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7261 (and leave `*p' unmodified).
7262 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7263 through it.
7264 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7265 iterating through it.
7266 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7267 through it.
7268 (grub_lvm_scan_device): Check the return value (and fail gracefully
7269 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7270 Don't assume `vg->pvs != NULL' when iterating through it.
7271
7272 2008-04-13 Robert Millan <rmh@aybabtu.com>
7273
7274 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7275 * genmk.rb (partmap): New variable.
7276 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7277 (#{partmap}): New target rule.
7278 * genpartmaplist.sh: New file.
7279 * Makefile.in (pkglib_DATA): Add partmap.lst.
7280 (partmap.lst): New target rule.
7281 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7282 modules (including all partition maps), instead of preloading them.
7283
7284 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7285
7286 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7287 `linux-boot-prober' (if installed) to detect other operating
7288 systems which are installed on the computer and add them to
7289 the boot menu.
7290 * conf/common.rmk: Build and install 30_os-prober.
7291
7292 2008-04-12 Robert Millan <rmh@aybabtu.com>
7293
7294 * kern/powerpc/ieee1275/init.c: Move from here ...
7295 * kern/ieee1275/init.c: ... to here. Update all users.
7296
7297 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7298 * kern/ieee1275/cmain.c: ... to here. Update all users.
7299
7300 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7301 * kern/ieee1275/openfw.c: ... to here. Update all users.
7302
7303 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7304 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7305
7306 2008-04-10 Pavel Roskin <proski@gnu.org>
7307
7308 * configure.ac: Always use "_cv_" in cache variables for
7309 compatibility with Autoconf 2.62.
7310
7311 2008-04-07 Robert Millan <rmh@aybabtu.com>
7312
7313 Revert grub/machine/init.h addition by Pavel (since it breaks on
7314 i386-ieee1275 and others):
7315 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7316 * util/powerpc/ieee1275/misc.c: Likewise.
7317
7318 2008-04-07 Robert Millan <rmh@aybabtu.com>
7319
7320 * util/grub-probe.c (probe): Improve error message.
7321
7322 2008-04-07 Robert Millan <rmh@aybabtu.com>
7323
7324 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7325 (this prevents the presence of a bogus entry from ruining the whole
7326 thing).
7327
7328 2008-04-06 Pavel Roskin <proski@gnu.org>
7329
7330 * util/biosdisk.c: Include grub/util/biosdisk.h.
7331 * util/grub-fstest.c (execute_command): Make static.
7332 * util/grub-mkdevicemap.c (check_device): Likewise.
7333 * util/i386/pc/misc.c: Include grub/machine/init.h.
7334 * util/powerpc/ieee1275/misc.c: Likewise.
7335 * util/lvm.c: Include grub/util/lvm.h.
7336 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7337 grub/cache.h.
7338 * util/raid.c: Include grub/util/raid.h.
7339 (grub_util_getdiskname): Make static.
7340
7341 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7342 grub_hostfs_fini(), as they are called from grub_init_all() and
7343 grub_fini_all() respectively. This fixes an infinite loop in
7344 grub-fstest due to double registration of hostfs.
7345 Reported by Christian Franke <Christian.Franke@t-online.de>
7346
7347 2008-04-05 Pavel Roskin <proski@gnu.org>
7348
7349 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7350 all 8 functions. Otherwise, probe function 0 only.
7351
7352 2008-04-04 Pavel Roskin <proski@gnu.org>
7353
7354 * commands/lspci.c (grub_lspci_iter): Print the bus number
7355 correctly.
7356
7357 * commands/lspci.c (grub_pci_classes): Fix typos.
7358 (grub_lspci_iter): Don't print func twice. Print vendor ID
7359 before device ID, as it's normally done.
7360
7361 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7362 Fix signedness warnings.
7363 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7364 Likewise.
7365 * util/ieee1275/get_disk_name.c: Include config.h so that
7366 _GNU_SOURCE is defined and getline() is declared. Mark an
7367 unused argument as such. Fix a signedness warning.
7368
7369 2008-04-02 Pavel Roskin <proski@gnu.org>
7370
7371 * genkernsyms.sh.in: Use more robust assignments for CC and
7372 srcdir. Quote srcdir.
7373 * gensymlist.sh.in: Likewise. Assert at the compile time that
7374 the symbol table is not empty.
7375
7376 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7377 * fs/cpio.c (grub_cpio_read): Likewise.
7378
7379 2008-04-01 Pavel Roskin <proski@gnu.org>
7380
7381 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7382 * disk/host.c (grub_host_open): Likewise.
7383 * disk/loopback.c (grub_loopback_open): Likewise.
7384 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7385 disk->id as in disk/host.c, not a multi-character constant.
7386
7387 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7388 later is obsolete, potentially dangerous and sets a bad example.
7389 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7390 * util/misc.c (grub_util_get_image_size): Likewise.
7391
7392 * disk/loopback.c (options): Improve help for "--partitions".
7393
7394 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7395 options to align them with the short options, e.g. "echo -e".
7396
7397 2008-03-31 Bean <bean123ch@gmail.com>
7398
7399 * video/reader/png.c (grub_png_data): New member is_16bit and
7400 image_data.
7401 (grub_png_decode_image_header): Detect 16 bit png image.
7402 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7403 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7404 (grub_video_reader_png): Release memory occupied by image_data.
7405
7406 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7407 4096 bytes.
7408 (grub_nfs_mount): Skip the test for sector per cluster.
7409
7410 * include/grub/ntfs.h (MAX_SPC): Removed.
7411
7412 2008-03-31 Bean <bean123ch@gmail.com>
7413
7414 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7415 (grub_probe_SOURCES): Add fs/afs.c.
7416 (grub_fstest_SOURCES): Likewise.
7417 (afs_mod_SOURCES): New variable.
7418 (afs_mod_CFLAGS): Likewise.
7419 (afs_mod_LDFLAGS): Likewise.
7420
7421 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7422 (grub_emu_SOURCES): Likewise.
7423
7424 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7425
7426 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7427
7428 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7429
7430 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7431
7432 * fs/afs.c: New file.
7433
7434 2008-03-30 Pavel Roskin <proski@gnu.org>
7435
7436 * disk/host.c: Include grub/misc.h to fix a warning.
7437 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7438 warnings about implicit declarations.
7439
7440 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7441 variable.
7442 * include/grub/i386/loader.h: Change declaration of
7443 grub_linux_boot() to match what grub_loader_set() expects.
7444 * util/getroot.c (grub_guess_root_device): Return const char* to
7445 fix a warning.
7446 * util/grub-probe.c (probe): Fix a warning about uninitialized
7447 abstraction_name variable.
7448 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7449 second argument as unused to fix a warning.
7450
7451 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7452 missing grub_error() call.
7453
7454 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7455 2.60 and newer uses it to define datadir.
7456
7457 * commands/sleep.c: Fix warning about implicit declaration.
7458 * disk/memdisk.c: Likewise.
7459 * loader/aout.c: Likewise.
7460 * loader/i386/bsd_normal.c: Likewise.
7461 * util/grub-probe.c: Likewise.
7462
7463 * commands/i386/cpuid.c (has_longmode): Make static.
7464 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7465 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7466
7467 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7468 GDT. This is more robust, as %ds can change.
7469 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7470 calling real_to_prot().
7471 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7472
7473 2008-03-28 Pavel Roskin <proski@gnu.org>
7474
7475 * kern/i386/pc/startup.S: Assert that uncompressed functions
7476 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7477 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7478 code, as they push parts of the code (error handlers) beyond
7479 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7480 code as correctness and size.
7481
7482 2008-03-28 Pavel Roskin <proski@gnu.org>
7483
7484 * kern/i386/pc/startup.S
7485 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7486 data block address to the real mode, keep offset minimal. This
7487 works around a bug in AWARD BIOS on old Athlon systems, which
7488 makes CD detection hang.
7489
7490 2008-03-26 Pavel Roskin <proski@gnu.org>
7491
7492 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7493 const.
7494 * include/grub/normal.h: Add grub_parse_color_name_pair()
7495 declaration.
7496
7497 2008-03-24 Bean <bean123ch@gmail.com>
7498
7499 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7500 (cd_count): Removed.
7501 (cd_drive): New variable.
7502 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7503 (grub_biosdisk_call_hook): Likewise.
7504 (grub_biosdisk_iterate): Change cdrom detection method.
7505 (grub_biosdisk_open): Replace cd_start with cd_drive.
7506 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7507 detect cdrom device.
7508
7509 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7510 Removed.
7511 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7512 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7513 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7514 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7515 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7516 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7517 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7518 (grub_biosdisk_cdrp): New structure.
7519 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7520
7521 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7522
7523 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7524 device.
7525
7526 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7527 New function.
7528
7529 2008-03-20 Robert Millan <rmh@aybabtu.com>
7530
7531 Remove 2 TiB limit in ata.mod.
7532 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7533 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7534 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7535 grub_uint64_t instead of grub_uint32_t.
7536
7537 2008-03-05 Bean <bean123ch@gmail.com>
7538
7539 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7540 (grub_multiboot): Set boot device.
7541
7542 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7543
7544 2008-03-02 Bean <bean123ch@gmail.com>
7545
7546 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7547 symlink_buffer.
7548
7549 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7550
7551 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7552 texinfo.tex.
7553
7554 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7555 modified.
7556
7557 * docs/fdl.texi: New file.
7558
7559 * docs/mdate-sh: New file. Copied from gnulib.
7560 * docs/texinfo.tex: Likewise.
7561
7562 * config.guess: Updated from gnulib.
7563 * install-sh: Likewise.
7564
7565 2008-02-28 Robert Millan <rmh@aybabtu.com>
7566
7567 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7568 (aout_mod_SOURCES): New variable.
7569 (aout_mod_CFLAGS): Likewise.
7570 (aout_mod_LDFLAGS): Likewise.
7571
7572 * conf/i386-ieee1275.rmk: Likewise.
7573
7574 2008-02-28 Robert Millan <rmh@aybabtu.com>
7575
7576 * util/update-grub.in: Reorganise terminal validity check. Accept
7577 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7578 Based on suggestion by Franklin PIAT.
7579
7580 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7581
7582 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7583 function.
7584 * util/getroot.c (grub_util_check_block_device): New function that
7585 returns the given argument if it is a block device and returns NULL else.
7586 * util/grub-probe.c (argument_is_device): New variable.
7587 (probe): Promote device_name from a variable to an argument. Receive
7588 device_name from grub_util_check_block_device() if path is NULL and from
7589 grub_guess_root_device() else. Do not free() device_name anymore.
7590 (options): Introduce new parameter '-d, --device'.
7591 (main): Add description of the new parameter to the help screen.
7592 Rename path variable to argument. Set argument_is_device if the '-d'
7593 option is given. Pass argument to probe() depending on
7594 argument_is_device.
7595
7596 2008-02-24 Bean <bean123ch@gmail.com>
7597
7598 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7599 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7600 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7601 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7602 (GRUB_ISO9660_VOLDESC_END): Likewise.
7603 (grub_iso9660_primary_voldesc): New member escape.
7604 (grub_iso9660_data): New member joliet.
7605 (grub_iso9660_convert_string): New function.
7606 (grub_iso9660_mount): Detect joliet extension.
7607 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7608 (grub_iso9660_iso9660_label): Likewise.
7609
7610 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7611 (grub_setup_SOURCES): Add fs/udf.c.
7612 (grub_fstest_SOURCES): Likewise.
7613 (udf_mod_SOURCES): New variable.
7614 (udf_mod_CFLAGS): Likewise.
7615 (udf_mod_LDFLAGS): Likewise.
7616
7617 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7618 (grub_emu_SOURCES): Likewise.
7619
7620 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7621
7622 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7623
7624 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7625
7626 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7627
7628 * fs/udf.c: New file.
7629
7630 2008-02-24 Robert Millan <rmh@aybabtu.com>
7631
7632 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7633 (normal/lexer.c_DEPENDENCIES): New variables.
7634 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7635 (normal/lexer.c_DEPENDENCIES): Likewise.
7636 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7637 (normal/lexer.c_DEPENDENCIES): Likewise.
7638 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7639 (normal/lexer.c_DEPENDENCIES): Likewise.
7640 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7641 (normal/lexer.c_DEPENDENCIES): Likewise.
7642 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7643 (normal/lexer.c_DEPENDENCIES): Likewise.
7644
7645 2008-02-23 Robert Millan <rmh@aybabtu.com>
7646
7647 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7648 since they were intended to be in hex. This didn't break previously
7649 because of a bug in gpt_partition_map_iterate() (see below).
7650
7651 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7652 when checking the validity of GPT header.
7653 Remove `partno', since it always provides the same information as `i'.
7654
7655 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7656
7657 * include/grub/efi/time.h: Fix a wrong comment.
7658
7659 2008-02-19 Pavel Roskin <proski@gnu.org>
7660
7661 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7662 message.
7663
7664 2008-02-19 Bean <bean123ch@gmail.com>
7665
7666 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7667 (aout_mod_SOURCES): New variable.
7668 (aout_mod_CFLAGS): Likewise.
7669 (aout_mod_LDFLAGS): Likewise.
7670 (_bsd_mod_SOURCES): New variable.
7671 (_bsd_mod_CFLAGS): Likewise.
7672 (_bsd_mod_LDFLAGS): Likewise.
7673 (bsd_mod_SOURCES): New variable.
7674 (bsd_mod_CFLAGS): Likewise.
7675 (bsd_mod_LDFLAGS): Likewise.
7676
7677 * include/grub/aout.h: New file.
7678
7679 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7680
7681 * include/grub/i386/bsd.h: New file.
7682
7683 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7684 to make it public.
7685
7686 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7687 function is called, so that it's possible to change it inside the hook.
7688 (grub_elf64_load): Likewise.
7689 (grub_elf_file): Don't close the file if elf header is not found.
7690 (grub_elf_close): Close the file if grub_elf_file fails (The new
7691 grub_elf_file won't close it).
7692 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7693 (grub_elf64_size): Likewise.
7694
7695 * kern/i386/loader.S (grub_unix_real_boot): New function.
7696
7697 * loader/aout.c: New file.
7698
7699 * loader/i386/bsd.c: New file.
7700
7701 * loader/i386/bsd_normal.c: New file.
7702
7703 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7704
7705 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7706 can test other formats.
7707
7708 2008-02-19 Robert Millan <rmh@aybabtu.com>
7709
7710 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7711 (grub_gpt_partition_type_empty): Redefine with macro from
7712 `<grub/gpt_partition.h>'.
7713 (gpt_partition_map_iterate): Adjust partition type comparison.
7714
7715 Export `entry' as partmap-specific `part.data' struct.
7716 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7717
7718 * include/grub/gpt_partition.h (grub_gpt_header)
7719 (grub_gpt_partentry): ... to here (new file).
7720
7721 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7722
7723 (grub_gpt_partition_type_bios_boot): New const variable, defined
7724 with macro from `<grub/gpt_partition.h>'.
7725
7726 (setup): Replace `first_start' with `embed_region', which keeps
7727 track of the embed region (and is partmap-agnostic).
7728
7729 Replace find_first_partition_start() with find_usable_region(),
7730 which finds a usable region for embedding using partmap-specific
7731 knowledge (supports PC/MSDOS and GPT).
7732
7733 Fix all assumptions that the embed region start at sector 1, using
7734 `embed_region.start' from now on. Similarly, use `embed_region.end'
7735 rather than `first_start' to calculate available size.
7736
7737 In grub_util_info() message, replace "into after the MBR" with an
7738 indication of the specific sector our embed region starts at.
7739
7740 2008-02-19 Robert Millan <rmh@aybabtu.com>
7741
7742 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7743 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7744 `commands/reboot.c'.
7745 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7746 (halt_mod_SOURCES): Likewise.
7747 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7748 (halt_mod_SOURCES): Likewise.
7749
7750 2008-02-17 Christian Franke <franke@computer.org>
7751
7752 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7753
7754 2008-02-17 Robert Millan <rmh@aybabtu.com>
7755
7756 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7757 set `first_start' to 0 for non-PC/MSDOS partition maps.
7758
7759 2008-02-16 Robert Millan <rmh@aybabtu.com>
7760
7761 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7762 do not assume partition map is PC/MSDOS before performing checks that
7763 are specific to that layout.
7764
7765 2008-02-13 Robert Millan <rmh@aybabtu.com>
7766
7767 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7768 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7769 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7770
7771 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7772
7773 * configure.ac: Only a cosmetic change on the handling of
7774 -fno-stack-protector.
7775
7776 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
7777
7778 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7779 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7780 reboot.c.
7781 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7782 (halt_mod_SOURCES): New variable.
7783 (halt_mod_CFLAGS): Likewise.
7784 (halt_mod_LDFLAGS): Likewise.
7785 (reboot_mod_SOURCES): Likewise.
7786 (reboot_mod_CFLAGS): Likewise.
7787 (reboot_mod_LDFLAGS): Likewise.
7788
7789 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7790 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7791 reboot.c.
7792 (halt_mod_SOURCES): Likewise.
7793 (reboot_mod_SOURCES): Likewise.
7794
7795 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7796 commands/i386/pc/reboot.c by commands/reboot.c.
7797 (reboot_mod_SOURCES): Likewise.
7798
7799 * commands/i386/pc/reboot.c: merge this file ...
7800
7801 * commands/ieee1275/reboot.c: ... and this file ...
7802
7803 * commands/reboot.c: ... to this file.
7804 Add some precompiler directive to include the correct header for
7805 each machine.
7806
7807 * commands/ieee1275/halt.c: move this file ...
7808
7809 * commands/halt.c: ... to here.
7810 Add some precompiler directive to include the correct header for
7811 each machine.
7812
7813 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7814 (grub_halt): Likewise.
7815
7816 * kern/efi/efi.c (grub_reboot): New function.
7817 (grub_halt): Likewise.
7818
7819 2008-02-12 Robert Millan <rmh@aybabtu.com>
7820
7821 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7822 /dev (like it is done for /dev/mapper). This doesn't provide support
7823 for EVMS, but at least it is now easy to identify the problem when it
7824 arises.
7825
7826 2008-02-11 Robert Millan <rmh@aybabtu.com>
7827
7828 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7829 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7830 comparing it with -1, not 0.
7831
7832 2008-02-10 Robert Millan <rmh@aybabtu.com>
7833
7834 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7835 `disk/lvm.c'.
7836 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7837 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7838
7839 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7840 `disk/lvm.c' to the end of the list.
7841 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7842 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7843
7844 2008-02-10 Robert Millan <rmh@aybabtu.com>
7845
7846 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7847 grub_print_error() instead. This will let user know why we're entering
7848 rescue mode.
7849 Based on suggestions from Sam Morris.
7850
7851 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
7852
7853 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7854 on remaining N args, instead of "--" arg N times.
7855
7856 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7857
7858 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7859 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7860 pattern for unknown glyphs.
7861
7862 2008-02-09 Robert Millan <rmh@aybabtu.com>
7863
7864 * configure.ac: Probe for `help2man'.
7865 * Makefile.in (builddir): New variable.
7866 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7867 or otherwise add a few flags/options to it.
7868 (install-local): For every executable utility or script that is
7869 installed, invoke $(HELP2MAN) to install a manpage based on --help
7870 output.
7871
7872 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7873 that it doesn't prevent --help from working in build tree.
7874
7875 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7876 with `bug-grub@gnu.org'.
7877 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7878 * util/update-grub.in (usage): New function.
7879 Implement proper argument check, with support for --help and --version
7880 (as well as existing -y).
7881
7882 2008-02-09 Christian Franke <franke@computer.org>
7883
7884 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7885 avoid overwriting previous output.
7886 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7887
7888 2008-02-09 Robert Millan <rmh@aybabtu.com>
7889
7890 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7891 drawing the menu.
7892
7893 2008-02-09 Robert Millan <rmh@aybabtu.com>
7894
7895 * commands/sleep.c: New file.
7896 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7897 (sleep_mod_SOURCES): New variable.
7898 (sleep_mod_CFLAGS): Likewise.
7899 (sleep_mod_LDFLAGS): Likewise.
7900
7901 2008-02-09 Robert Millan <rmh@aybabtu.com>
7902
7903 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7904 situations in which we can deduce the RAID size and the superblock
7905 doesn't match it.
7906
7907 2008-02-09 Robert Millan <rmh@aybabtu.com>
7908
7909 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7910 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7911 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7912
7913 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7914 and return a grub_diskmemberlist_t composed of physical array members.
7915 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7916
7917 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7918 prototype.
7919 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7920 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7921 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7922
7923 * util/grub-probe.c (probe): Move partmap probing code from here ...
7924 (probe_partmap): ... to here.
7925 (probe): Use probe_partmap() once for the disk we're probing, and
7926 additionally, when such disk contains a memberlist() struct member,
7927 once for each disk that is contained in the structure returned by
7928 memberlist().
7929
7930 2008-02-09 Robert Millan <rmh@aybabtu.com>
7931
7932 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7933 environment variable to 'all' in order to obtain debug output from
7934 non-util/ code.
7935 * util/i386/pc/grub-setup.c (main): Likewise.
7936
7937 2008-02-08 Robert Millan <rmh@aybabtu.com>
7938
7939 * disk/raid.c (grub_raid_scan_device): Check for
7940 `array->device[sb.this_disk.number]' rather than for
7941 `array->device[sb.this_disk.number]->name', since the latter is not
7942 guaranteed to be accessible.
7943
7944 2008-02-08 Robert Millan <rmh@aybabtu.com>
7945
7946 * disk/raid.c: Update copyright.
7947 * fs/cpio.c: Likewise.
7948 * include/grub/raid.h: Likewise.
7949 * loader/i386/pc/multiboot.c: Likewise.
7950 * util/hostfs.c: Likewise.
7951
7952 2008-02-08 Robert Millan <rmh@aybabtu.com>
7953
7954 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7955 to a grub_disk_t array.
7956 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7957 `device[x]'.
7958 (grub_raid_scan_device): Replace `device[x].name' accesses with
7959 `device[x]->name'. Simplify initialization of `array->device[x]'.
7960
7961 2008-02-08 Robert Millan <rmh@aybabtu.com>
7962
7963 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7964 grub_dprintf() calls.
7965 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7966 error message.
7967
7968 2008-02-07 Christian Franke <franke@computer.org>
7969
7970 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7971 instead of fseek and ftell to support large files.
7972 (grub_hostfs_read): Likewise.
7973
7974 2008-02-07 Robert Millan <rmh@aybabtu.com>
7975
7976 Patch from Jeroen Dekkers.
7977 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7978 failure, since successfully reading all array members might not be
7979 required.
7980
7981 2008-02-06 Robert Millan <rmh@aybabtu.com>
7982
7983 * util/grub-probe.c (probe): Simplify partmap probing (with the
7984 assumption that the first word up to the underscore equals to
7985 the module name).
7986
7987 2008-02-06 Christian Franke <franke@computer.org>
7988
7989 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7990 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7991 last block of a cpio or tar stream.
7992 Check for "TRAILER!!!" instead of any empty data
7993 block to detect last block of a cpio stream.
7994 (grub_cpio_dir): Fix constness of variable np.
7995 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7996 cpio or tar trailer is detected. This fixes a crash
7997 on open of a non existing file.
7998
7999 2008-02-05 Bean <bean123ch@gmail.com>
8000
8001 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8002 address of entry.
8003 (grub_multiboot_load_elf64): Likewise.
8004 (grub_multiboot): Initialize mbi structure.
8005
8006 * util/grub-fstest.c: Don't include unused header file script.h.
8007
8008 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8009 of file.
8010 (grub_fstest_SOURCES): Likewise.
8011
8012 2008-02-05 Robert Millan <rmh@aybabtu.com>
8013
8014 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8015 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8016 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8017 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8018
8019 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8020 (translation_table): Replace hardcoded values with macros
8021 provided by `<grub/term.h>'.
8022
8023 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8024 (keyboard_map): Correct/add a few values, with macros provided
8025 by `<grub/term.h>'.
8026 (keyboard_map_shift): Zero values that don't differ from their
8027 `keyboard_map' equivalents.
8028 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8029 Discard the second scan code that is always sent by Caps lock.
8030 Only use `keyboard_map_shift' when it provides a non-zero value,
8031 otherwise fallback to `keyboard_map'.
8032
8033 2008-02-04 Bean <bean123ch@gmail.com>
8034
8035 * Makefile.in (enable_grub_fstest): New variable.
8036
8037 * conf/common.rmk (grub_fstest_init.lst): New rule.
8038 (grub_fstest_init.h): Likewise.
8039 (grub_fstest_init.c): Likewise.
8040 (util/grub-fstest.c_DEPENDENCIES): New variable.
8041 (grub_fstest_SOURCES): Likewise.
8042
8043 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8044
8045 * util/grub-fstest.c: New file.
8046
8047 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8048
8049 Make grub-setup handle a separate root device.
8050
8051 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8052 so that the root device can be compared with the destination
8053 device.
8054 When embedding the core image, if the root and destination devices
8055 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8056 0xFF.
8057 When not embedding, set ROOT_DRIVE to 0xFF.
8058
8059 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8060
8061 Add support for having a grub directory in a different drive. This
8062 is still only the data handling part.
8063
8064 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8065 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8066 (grub_root_drive): New variable.
8067
8068 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8069 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8070 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8071 as it was.
8072
8073 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8074
8075 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8076 macro.
8077 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8078
8079 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8080 is bogus, because PXE booting does not specify any drive
8081 correctly.
8082
8083 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8084 am not sure if this is really correct.
8085
8086 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8087 is always identical to the boot drive when booting from a CD.
8088
8089 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8090 longer.
8091 (root_drive): New variable.
8092 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8093 (setup_sectors): Push %dx right after popping it, because %dh will
8094 be modified later.
8095 (copy_buffer): Restore %dx.
8096
8097 2008-02-03 Robert Millan <rmh@aybabtu.com>
8098
8099 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8100 use `cdboot.img' for cdrom images.
8101
8102 2008-02-03 Robert Millan <rmh@aybabtu.com>
8103
8104 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8105 only setup gfxterm when `font' command has succeeded.
8106
8107 2008-02-03 Robert Millan <rmh@aybabtu.com>
8108
8109 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8110 (grub_rescue_cmd_multiboot_loader)
8111 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8112
8113 2008-02-03 Pavel Roskin <proski@gnu.org>
8114
8115 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8116 %edx and %esi from stack only after grub_gate_a20() is called.
8117 grub_gate_a20() clobbers %edx.
8118
8119 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8120
8121 * configure.ac (AC_INIT): Bumped to 1.96.
8122
8123 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8124 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8125 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8126 video/readers/png.c.
8127
8128 2008-02-03 Bean <bean123ch@gmail.com>
8129
8130 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8131 (cdboot_img_SOURCES): New variable.
8132 (cdboot_img_ASFLAGS): New variable.
8133 (cdboot_img_LDFLAGS): New variable.
8134
8135 * boot/i386/pc/cdboot.S: New file.
8136
8137 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8138 (cd_count): Likewise.
8139 (grub_biosdisk_get_drive): Add support for cd device.
8140 (grub_biosdisk_call_hook): Likewise.
8141 (grub_biosdisk_iterate): Likewise.
8142 (grub_biosdisk_open): Likewise.
8143 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8144 (grub_biosdisk_rw): Support reading from cd device.
8145 (GRUB_MOD_INIT): Iterate cd devices.
8146
8147 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8148 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8149 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8150
8151 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8152
8153 2008-02-02 Robert Millan <rmh@aybabtu.com>
8154
8155 * commands/read.c: New file.
8156 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8157 (read_mod_SOURCES): New variable.
8158 (read_mod_CFLAGS): Likewise.
8159 (read_mod_LDFLAGS): Likewise.
8160
8161 2008-02-02 Robert Millan <rmh@aybabtu.com>
8162
8163 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8164 determining whether menu has to be displayed.
8165
8166 2008-02-02 Marco Gerards <marco@gnu.org>
8167
8168 * bus/pci.c: New file.
8169
8170 * include/grub/pci.h: Likewise.
8171
8172 * include/grub/i386/pc/pci.h: Likewise.
8173
8174 * commands/lspci.c: Likewise.
8175
8176 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8177 `lspci.mod'.
8178 (pci_mod_SOURCES): New variable.
8179 (pci_mod_CFLAGS): Likewise.
8180 (pci_mod_LDFLAGS): Likewise.
8181 (lspci_mod_SOURCES): Likewise.
8182 (lspci_mod_CFLAGS): Likewise.
8183 (lspci_mod_LDFLAGS): Likewise.
8184
8185 2008-02-02 Bean <bean123ch@gmail.com>
8186
8187 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8188 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8189
8190 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8191 (grub_xfs_btree_node): New structure.
8192 (grub_xfs_btree_root): New structure.
8193 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8194 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8195 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8196 (GRUB_XFS_EXTENT_SIZE): Likewise.
8197 (grub_xfs_read_block): Support btree format type.
8198 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8199 Use directory block as basic unit.
8200
8201 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8202
8203 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8204 __attribute__ ((__regparm__ (1))).
8205
8206 2008-02-01 Robert Millan <rmh@aybabtu.com>
8207
8208 Correct a mistake in previous commit.
8209
8210 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8211 top.
8212 (normal/command.c_DEPENDENCIES): New variable.
8213
8214 2008-02-01 Robert Millan <rmh@aybabtu.com>
8215
8216 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8217 top.
8218 (normal/command.c_DEPENDENCIES): New variable.
8219 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8220 * conf/i386-ieee1275.rmk: Likewise.
8221 * conf/i386-linuxbios.rmk: Likewise.
8222 * conf/i386-pc.rmk: Likewise.
8223 * conf/sparc64-ieee1275.rmk: Likewise.
8224 * conf/powerpc-ieee1275.rmk: Likewise.
8225 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8226
8227 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8228
8229 2008-02-01 Robert Millan <rmh@aybabtu.com>
8230
8231 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8232 call at beginning of function.
8233
8234 2008-01-31 Pavel Roskin <proski@gnu.org>
8235
8236 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8237 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8238 (grub_mkrescue_SOURCES): Likewise.
8239 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8240
8241 2008-01-30 Robert Millan <rmh@aybabtu.com>
8242
8243 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8244 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8245 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8246 (grub_probe_SOURCES): ... to here.
8247
8248 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8249 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8250 * conf/i386-ieee1275.rmk: Likewise.
8251 * conf/i386-linuxbios.rmk: Likewise.
8252 * conf/powerpc-ieee1275.rmk: Likewise.
8253
8254 2008-01-30 Tristan Gingold <gingold@free.fr>
8255
8256 * kern/rescue.c: Silently accept empty lines.
8257
8258 2008-01-29 Bean <bean123ch@gmail.com>
8259
8260 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8261 (real_code_2): Code cleanup and change comment style.
8262 (move_memory): Avoid using 32-bit address mode.
8263
8264 2008-01-29 Bean <bean123ch@gmail.com>
8265
8266 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8267 (png_mod_SOURCES): New variable.
8268 (png_mod_CFLAGS): Likewise.
8269 (png_mod_LDFLAGS): Likewise.
8270
8271 * video/readers/png.c: New file.
8272
8273 2008-01-28 Robert Millan <rmh@aybabtu.com>
8274
8275 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8276 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8277 `ifndef GRUB_MOD_GAP' hack.
8278 * util/elf/grub-mkimage.c (add_segments): Likewise.
8279
8280 2008-01-27 Robert Millan <rmh@aybabtu.com>
8281
8282 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8283 `GRUB_MOD_GAP' for platforms in which it's not defined.
8284 * util/elf/grub-mkimage.c (add_segments): Likewise.
8285
8286 2008-01-27 Robert Millan <rmh@aybabtu.com>
8287
8288 Get grub-emu to build again (including parallel builds).
8289
8290 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8291 Split into ...
8292 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8293 (normal/execute.c_DEPENDENCIES): ... this, ...
8294 (grub-emu_DEPENDENCIES): ... and this.
8295
8296 * conf/i386-efi.rmk: Likewise.
8297 * conf/i386-linuxbios.rmk: Likewise.
8298 * conf/i386-ieee1275.rmk: Likewise.
8299 * conf/powerpc-ieee1275.rmk: Likewise.
8300 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8301
8302 2008-01-27 Robert Millan <rmh@aybabtu.com>
8303
8304 * NEWS: Add a few items.
8305
8306 2008-01-27 Robert Millan <rmh@aybabtu.com>
8307
8308 Fix parallel builds with grub-emu. Based on earlier commit for
8309 grub-probe and grub-setup.
8310
8311 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8312 (util/grub-emu.c_DEPENDENCIES): ... this.
8313 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8314 (util/grub-emu.c_DEPENDENCIES): ... this.
8315 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8316 (util/grub-emu.c_DEPENDENCIES): ... this.
8317 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8318 (util/grub-emu.c_DEPENDENCIES): ... this.
8319 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8320 (util/grub-emu.c_DEPENDENCIES): ... this.
8321
8322 2008-01-27 Pavel Roskin <proski@gnu.org>
8323
8324 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8325 to create a gap between _end and the modules added to the image
8326 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8327 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8328 * util/elf/grub-mkimage.c (add_segments): Likewise.
8329
8330 2008-01-26 Pavel Roskin <proski@gnu.org>
8331
8332 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8333 just return an error.
8334
8335 2008-01-26 Bean <bean123ch@gmail.com>
8336
8337 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8338 (grub_reiserfs_get_item): Save offset of the next item.
8339 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8340
8341 2008-01-25 Robert Millan <rmh@aybabtu.com>
8342
8343 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8344 make all filesystem sources appear together (possibly fixing omissions
8345 while at it).
8346 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8347 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8348 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8349 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8350
8351 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8352 add `kern/file.c'.
8353 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8354 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8355 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8356 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8357
8358 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8359 (probe): Add a sanity check to make sure of our ability to read
8360 requested files when probing for filesystem type.
8361
8362 * genmk.rb: Update copyright year (2007).
8363
8364 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8365 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8366 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8367 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8368 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8369 : Remove function prototypes.
8370
8371 2008-01-25 Robert Millan <rmh@aybabtu.com>
8372
8373 Revert my previous commits (based on wrong assumption of how grub_errno
8374 works).
8375
8376 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8377 * kern/file.c (grub_file_open): Likewise.
8378
8379 2008-01-24 Pavel Roskin <proski@gnu.org>
8380
8381 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8382 that hang if GRUB tries to setup colors.
8383 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8384 colors for firmwares that don't support it.
8385 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8386 Recognize Open Hack'Ware, set flags to work around its
8387 limitations.
8388
8389 2008-01-24 Robert Millan <rmh@aybabtu.com>
8390
8391 * kern/file.c (grub_file_open): Do not account previous failures of
8392 unrelated functions when grub_errno is checked for.
8393 Reported by Oleg Strikov.
8394
8395 2008-01-24 Bean <bean123ch@gmail.com>
8396
8397 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8398 (grub_ufs_sblock): New member volume name.
8399 (grub_ufs_find_file): Fix string copy bug.
8400 (grub_ufs_label): Implement this function properly.
8401
8402 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8403 (grub_hfs_iterate_records): Use the correct file number for extents
8404 and catalog file. Fix problem in next index calculation.
8405 (grub_hfs_find_node): Replace recursive function call with loop.
8406 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8407
8408 2008-01-23 Robert Millan <rmh@aybabtu.com>
8409
8410 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8411 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8412 (grub_multiboot2_real_boot): New function prototype.
8413
8414 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8415 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8416
8417 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8418 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8419
8420 2008-01-23 Robert Millan <rmh@aybabtu.com>
8421
8422 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8423 #ifdef'ed out grub_printf().
8424
8425 2008-01-23 Robert Millan <rmh@aybabtu.com>
8426
8427 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8428 grub_dprintf calls, since they make "debug=all" mode unusable.
8429 (grub_console_checkkey): Likewise.
8430
8431 2008-01-23 Robert Millan <rmh@aybabtu.com>
8432
8433 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8434 `term/i386/pc/at_keyboard.c'.
8435 (pkglib_MODULES): Add `serial.mod'.
8436 (serial_mod_SOURCES): New variable.
8437 (serial_mod_CFLAGS): Likewise.
8438 (serial_mod_LDFLAGS): Likewise.
8439
8440 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8441 `<grub/powerpc/ieee1275/console.h>'.
8442 (grub_keyboard_controller_init): New function prototype.
8443 (grub_console_checkkey): Likewise.
8444 (grub_console_getkey): Likewise.
8445
8446 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8447 keyboard on i386.
8448
8449 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8450 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8451
8452 2008-01-23 Robert Millan <rmh@aybabtu.com>
8453
8454 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8455 present, "(memdisk)/boot/grub" becomes the default prefix.
8456
8457 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8458 a memdisk tarball with all the modules. Add --overlay=DIR option that
8459 allows users to overlay additional files into the image.
8460
8461 2008-01-23 Robert Millan <rmh@aybabtu.com>
8462
8463 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8464 and `machine/memory.h'.
8465 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8466 (_multiboot_mod_SOURCES): New variable.
8467 (_multiboot_mod_CFLAGS): Likewise.
8468 (_multiboot_mod_LDFLAGS): Likewise.
8469 (multiboot_mod_SOURCES): Likewise.
8470 (multiboot_mod_CFLAGS): Likewise.
8471 (multiboot_mod_LDFLAGS): Likewise.
8472
8473 * include/grub/i386/ieee1275/loader.h: New file.
8474
8475 * include/grub/i386/ieee1275/machine.h: Likewise.
8476
8477 * include/grub/i386/ieee1275/memory.h: Likewise.
8478
8479 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8480 variable declaration.
8481 (grub_os_area_size): Likewise.
8482
8483 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8484 (grub_lower_mem, grub_upper_mem): New variables.
8485 (grub_stop_floppy): New function (just to make
8486 grub_multiboot2_real_boot() happy).
8487
8488 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8489 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8490 (grub_stop): New function.
8491 Include `"../realmode.S"' and `"../loader.S"'.
8492
8493 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8494 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8495
8496 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8497 rely on grub_multiboot2_real_boot() for final boot.
8498
8499 2008-01-22 Robert Millan <rmh@aybabtu.com>
8500
8501 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8502 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8503 device that doesn't look like an SD card.
8504 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8505 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8506 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8507 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8508 found.
8509
8510 2008-01-22 Robert Millan <rmh@aybabtu.com>
8511
8512 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8513 avoid claiming over our own code.
8514
8515 2008-01-22 Bean <bean123ch@gmail.com>
8516
8517 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8518 (jpeg_mod_SOURCES): New variable.
8519 (jpeg_mod_CFLAGS): Likewise.
8520 (jpeg_mod_LDFLAGS): Likewise.
8521
8522 * video/readers/jpeg.c : New file.
8523
8524 2008-01-22 Bean <bean123ch@gmail.com>
8525
8526 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8527 there are no more items.
8528
8529 2008-01-21 Robert Millan <rmh@aybabtu.com>
8530
8531 * kern/mm.c (grub_mm_init_region): Improve debug message.
8532
8533 2008-01-21 Robert Millan <rmh@aybabtu.com>
8534
8535 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8536 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8537 address.
8538 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8539 a C macro.
8540 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8541 Indicates start of upper memory.
8542 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8543 (generate_image): Abort when image size is big enough to corrupt
8544 upper memory.
8545
8546 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8547 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8548 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8549 instead of hardcoding 0xA0000.
8550 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8551 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8552 instead of hardcoding 0xA0000.
8553
8554 2008-01-21 Robert Millan <rmh@aybabtu.com>
8555
8556 * disk/memdisk.c (memdisk_size): New variable.
8557 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8558 `memdisk_size'.
8559 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8560 image to dynamic memory.
8561 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8562 `memdisk_size'. Free memdisk block.
8563
8564 2008-01-21 Robert Millan <rmh@aybabtu.com>
8565
8566 Fix detection of very small filesystems (like tar).
8567
8568 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8569 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8570 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8571 a problem with this disk).
8572
8573 2008-01-21 Robert Millan <rmh@aybabtu.com>
8574
8575 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8576 on grub_biosdisk_rw_standard() error.
8577
8578 2008-01-21 Robert Millan <rmh@aybabtu.com>
8579
8580 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8581 recent changes.
8582 * kern/elf.c: Likewise.
8583 * kern/ieee1275/ieee1275.c: Likewise.
8584 * kern/powerpc/ieee1275/openfw.c: Likewise.
8585 * term/ieee1275/ofconsole.c: Likewise.
8586
8587 2008-01-21 Robert Millan <rmh@aybabtu.com>
8588
8589 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8590
8591 * include/grub/kernel.h (grub_arch_memdisk_addr)
8592 (grub_arch_memdisk_size): Moved from here ...
8593
8594 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8595 (grub_arch_memdisk_size): ... to here.
8596
8597 2008-01-21 Robert Millan <rmh@aybabtu.com>
8598
8599 Mostly based on bugfix from Bean.
8600
8601 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8602 attribute with hook() parameter.
8603 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8604 declaration.
8605 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8606 attribute with hook() parameter.
8607 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8608 declaration.
8609
8610 2008-01-21 Robert Millan <rmh@aybabtu.com>
8611
8612 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8613 (pkglib_MODULES): Add `memdisk.mod'.
8614 (memdisk_mod_SOURCES): New variable.
8615 (memdisk_mod_CFLAGS): Likewise.
8616 (memdisk_mod_LDFLAGS): Likewise.
8617
8618 * disk/memdisk.c: New file.
8619
8620 * include/grub/disk.h (grub_disk_dev_id): Add
8621 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8622
8623 * include/grub/i386/pc/kernel.h
8624 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8625 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8626 (grub_kernel_image_size): New variable declaration.
8627 (grub_total_module_size): Likewise.
8628 (grub_memdisk_image_size): Likewise.
8629
8630 * include/grub/i386/pc/memory.h
8631 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8632
8633 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8634 (grub_arch_memdisk_addr): New variable declaration.
8635 (grub_arch_memdisk_size): Likewise.
8636
8637 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8638 (grub_arch_memdisk_size): Likewise.
8639
8640 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8641 (codestart): Replace hardcoded `0x100000' with
8642 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8643
8644 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8645 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8646 not NULL, append the contents of the file it refers to, at the end of
8647 the compressed kernel image. Initialize `grub_memdisk_image_size'
8648 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8649 (options): Add "memdisk"|'m' option.
8650 (main): Parse --memdisk|-m option, and pass user-provided path as
8651 parameter to generate_image().
8652
8653 2008-01-20 Robert Millan <rmh@aybabtu.com>
8654
8655 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8656 grub_dprintf() calls from here ...
8657 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8658
8659 2008-01-20 Robert Millan <rmh@aybabtu.com>
8660
8661 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8662
8663 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8664 declaration.
8665 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8666 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8667 `GRUB_IEEE1275_FLAG_REAL_MODE'.
8668 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8669 property).
8670 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8671 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8672
8673 2008-01-19 Robert Millan <rmh@aybabtu.com>
8674
8675 Get rid of confusing function (superseded by
8676 `grub_ieee1275_get_integer_property')
8677 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8678 prototype.
8679 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8680 function.
8681 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8682 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8683 in native endianness from grub_ieee1275_get_integer_property().
8684
8685 2008-01-19 Robert Millan <rmh@aybabtu.com>
8686
8687 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8688 command after "shut-down", since implementations differ on which
8689 the command for halt is.
8690
8691 2008-01-19 Robert Millan <rmh@aybabtu.com>
8692
8693 * include/grub/i386/linuxbios/console.h: Add header protection.
8694 (grub_keyboard_controller_init): New function prototype.
8695 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8696 (KEYBOARD_COMMAND_READ): Likewise.
8697 (KEYBOARD_COMMAND_WRITE): Likewise.
8698 (KEYBOARD_SCANCODE_SET1): Likewise.
8699 (grub_keyboard_controller_write): New function.
8700 (grub_keyboard_controller_read): Likewise.
8701 (grub_keyboard_controller_init): Likewise.
8702
8703 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8704 (grub_console_init): On coreboot/LinuxBIOS, call
8705 grub_keyboard_controller_init().
8706
8707 2008-01-19 Robert Millan <rmh@aybabtu.com>
8708
8709 PowerPC changes provided by Pavel Roskin.
8710
8711 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8712 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8713 don't rely on cmain() doing it.
8714 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8715 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8716
8717 2008-01-16 Robert Millan <rmh@aybabtu.com>
8718
8719 * include/grub/i386/linuxbios/memory.h
8720 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8721 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8722 receive `table_header' as argument. Instead, probe for it in the
8723 known memory ranges where it can be present.
8724 (grub_available_iterate): Do not pass a fixed `table_header' address
8725 to grub_linuxbios_table_iterate().
8726
8727 2008-01-15 Robert Millan <rmh@aybabtu.com>
8728
8729 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8730 * conf/i386-ieee1275.rmk: New file.
8731 * include/grub/i386/ieee1275/console.h: Likewise.
8732 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8733 * include/grub/i386/ieee1275/kernel.h: Likewise.
8734 * include/grub/i386/ieee1275/time.h: Likewise.
8735 * kern/i386/ieee1275/init.c: Likewise.
8736 * kern/i386/ieee1275/startup.S: Likewise.
8737
8738 2008-01-15 Robert Millan <rmh@aybabtu.com>
8739
8740 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8741 when pointers are 32-bit (but still do set it to one when they are
8742 64-bit).
8743
8744 2008-01-15 Robert Millan <rmh@aybabtu.com>
8745
8746 * include/grub/ieee1275/ieee1275.h
8747 (grub_ieee1275_get_integer_property): New function prototype.
8748
8749 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8750 (grub_ieee1275_get_integer_property): New function. Wraps around
8751 grub_ieee1275_get_property() to handle endianness.
8752
8753 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8754 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8755 where appropriate.
8756 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8757 (grub_map): Likewise.
8758 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8759
8760 2008-01-15 Bean <bean123ch@gmail.com>
8761
8762 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8763 (grub_script_execute_cmdline): Reset grub_errno.
8764
8765 * normal/main.c (read_config_file): Reset grub_errno.
8766
8767 * normal/parse.y (script_init): New.
8768 (script): Move function and menuentry here.
8769 (delimiter): New.
8770 (command): Add delimiter at the end of command.
8771 (commands): Adjust to match the new command.
8772 (commandblock): Remove grub_script_lexer_record_start.
8773 (menuentry): Add grub_script_lexer_record_start, use the new commands.
8774 (if): Use the new commands.
8775
8776 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8777
8778 2008-01-15 Robert Millan <rmh@aybabtu.com>
8779
8780 * normal/menu.c (run_menu): Move timeout message from here ...
8781 (print_timeout): ... to here.
8782 (run_menu): Use print_timeout() once during initial draw to print
8783 the whole message, and again in every clock tick to update only
8784 the number of seconds.
8785
8786 2008-01-15 Robert Millan <rmh@aybabtu.com>
8787
8788 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8789 actual size of `available' from grub_ieee1275_get_property(), and
8790 restrict parsing to that bound.
8791
8792 2008-01-15 Christian Franke <franke@computer.org>
8793
8794 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8795 (argp_program_version): Remove variable.
8796 (argp_program_bug_address): Likewise.
8797 (options): Convert from struct argp_option to struct option.
8798 (struct arguments): Remove.
8799 (parse_opt): Remove.
8800 (usage): New function.
8801 (main): Replace struct args members by simple variables.
8802 Replace argp_parse() by getopt_long().
8803 Add switch to evaluate options.
8804 Add missing "(...)" around root_dev in prefix string.
8805
8806 2008-01-14 Robert Millan <rmh@aybabtu.com>
8807
8808 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8809 for grub_ieee1275_exit(), in order to improve portability.
8810
8811 2008-01-14 Robert Millan <rmh@aybabtu.com>
8812
8813 * util/grub.d/10_linux.in (prefix): Define.
8814 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8815
8816 2008-01-13 Pavel Roskin <proski@gnu.org>
8817
8818 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8819 grub_errno if no errors have been detected.
8820
8821 2008-01-12 Robert Millan <rmh@aybabtu.com>
8822
8823 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8824 (grub_util_get_dev_abstraction): New function prototype.
8825
8826 * util/getroot.c: Include `<grub/util/getroot.h>'
8827 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8828 (grub_util_get_dev_abstraction): ... here (new function).
8829
8830 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8831 `PRINT_ABSTRACTION'.
8832 (probe): Probe for abstraction type when requested.
8833 (main): Understand `--target=abstraction'.
8834
8835 * util/i386/efi/grub-install.in: Add abstraction module to core
8836 image when it is found to be necessary.
8837 * util/i386/pc/grub-install.in: Likewise.
8838 * util/powerpc/ieee1275/grub-install.in: Likewise.
8839
8840 * util/update-grub_lib.in (font_path): Return system path without
8841 converting to GRUB path.
8842 * util/update-grub.in: Convert system path returned by font_path()
8843 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8844 abstraction module is needed for loading fonts (if any). Export
8845 that as `GRUB_PRELOAD_MODULES'.
8846 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8847 insmod commands).
8848
8849 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8850
8851 Remove some unused code from reiserfs.
8852
8853 * fs/reiserfs.c (struct grub_reiserfs_key)
8854 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8855 (struct grub_reiserfs_node_body): Removed.
8856 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8857 Likewise.
8858 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8859 Likewise.
8860 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8861 Likewise.
8862 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8863 Likewise.
8864 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8865 Likewise.
8866 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8867 Likewise.
8868 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8869 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8870 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8871
8872 2008-01-10 Robert Millan <rmh@aybabtu.com>
8873
8874 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8875 Determines if a file is garbage left by packaging systems, etc.
8876 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8877 for processing /etc/grub.d scripts.
8878 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8879 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8880 as a condition for processing Linux images.
8881
8882 2008-01-10 Pavel Roskin <proski@gnu.org>
8883
8884 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8885 to compile reiserfs.c on PowerPC.
8886
8887 2008-01-10 Robert Millan <rmh@aybabtu.com>
8888
8889 * kern/device.c (grub_device_iterate): Do not abort device iteration
8890 when one of the devices cannot be opened.
8891 * kern/disk.c (grub_disk_open): Do not account previous failures of
8892 unrelated functions when grub_errno is checked for.
8893
8894 2008-01-08 Robert Millan <rmh@aybabtu.com>
8895
8896 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8897 `! grub_linux_is_bzimage', change order of address comparison to make
8898 it more intuitive, and improve "too big zImage" error message.
8899
8900 2008-01-08 Robert Millan <rmh@aybabtu.com>
8901
8902 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8903 `$(update-grub_DATA)'.
8904 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8905 targets.
8906
8907 2008-01-07 Robert Millan <rmh@aybabtu.com>
8908
8909 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8910 which instruction is modified by grub-setup during installation
8911 (since it wasn't obvious by only looking at this file).
8912
8913 2008-01-07 Robert Millan <rmh@aybabtu.com>
8914
8915 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8916 listing actual TODO items.
8917
8918 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8919
8920 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8921 correctly.
8922 (grub_reiserfs_get_key_offset): Likewise.
8923 (grub_reiserfs_set_key_offset): Likewise.
8924 (grub_reiserfs_set_key_type): Likewise.
8925 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8926
8927 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8928 better to remove the bitfield version completely.
8929
8930 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8931
8932 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8933 allocated from the heap, due to the fshelp implementation.
8934 (grub_reiserfs_dir): Free NODE, due to the same reason.
8935
8936 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8937
8938 Mostly from Vincent Pelletier:
8939
8940 * fs/reiserfs.c: New file.
8941
8942 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8943 (reiserfs_mod_SOURCES): New variable.
8944 (reiserfs_mod_CFLAGS): Likewise.
8945 (reiserfs_mod_LDFLAGS): Likewise.
8946
8947 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8948 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8949 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8950 normal/color.c.
8951
8952 2008-01-06 Robert Millan <rmh@aybabtu.com>
8953
8954 * normal/color.c: Remove `<grub/env.h>'.
8955
8956 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8957
8958 * include/grub/normal.h: Include <grub/env.h>.
8959
8960 2008-01-05 Robert Millan <rmh@aybabtu.com>
8961
8962 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8963 usage example with `(hd0,1)'.
8964 Reported by Samuel Thibault.
8965
8966 2008-01-05 Robert Millan <rmh@aybabtu.com>
8967
8968 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8969 (grub_linux_boot_zimage): Rename to ...
8970 (grub_linux_boot): ... this.
8971 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8972 (grub_linux_boot_zimage): Conditionalize zImage copy.
8973
8974 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8975 (grub_linux_boot_bzimage): Remove prototype.
8976 (grub_linux_boot_zimage): Rename to ...
8977 (grub_linux_boot): ... this.
8978
8979 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8980 (grub_linux_boot): Remove function.
8981
8982 2008-01-05 Robert Millan <rmh@aybabtu.com>
8983
8984 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8985 (grub_env_write_color_highlight): Likewise.
8986 (grub_wait_after_message): Likewise.
8987
8988 * normal/color.c: New file.
8989
8990 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8991 (normal_mod_DEPENDENCIES): Likewise.
8992
8993 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8994 (normal_mod_DEPENDENCIES): Likewise.
8995
8996 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8997 (normal_mod_DEPENDENCIES): Likewise.
8998
8999 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9000 (normal_mod_DEPENDENCIES): Likewise.
9001
9002 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9003 for waiting after a message is printed.
9004 * normal/main.c (read_config_file): Likewise.
9005 (grub_normal_init): Register grub_env_write_color_normal() and
9006 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9007 `color_highlight' variables as global.
9008
9009 * normal/menu.c (grub_wait_after_message): New function.
9010 (grub_color_menu_normal): New variable. Replaces ...
9011 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9012 (grub_color_menu_highlight): New variable. Replaces ...
9013 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9014 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9015 `GRUB_TERM_COLOR_STANDARD'.
9016 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9017 `normal_code' and `highlight_code' to `old_color_normal' and
9018 `old_color_highlight', respectively.
9019 (grub_menu_init_page): Update colors when drawing the menu, based on
9020 `menu_color_normal' and `menu_color_highlight' variables.
9021 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9022 a message is printed.
9023
9024 2008-01-05 Robert Millan <rmh@aybabtu.com>
9025
9026 * kern/env.c (grub_env_context_open): Propagate hooks for global
9027 variables to new context.
9028
9029 * kern/main.c (grub_set_root_dev): Export `root' variable.
9030
9031 2008-01-05 Robert Millan <rmh@aybabtu.com>
9032
9033 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9034 discs unconditionally, since udev and others have options to provide
9035 them.
9036
9037 2008-01-05 Robert Millan <rmh@aybabtu.com>
9038
9039 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9040
9041 2008-01-04 Christian Franke <franke@computer.org>
9042
9043 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9044 of eisa_mmap.
9045
9046 2008-01-03 Pavel Roskin <proski@gnu.org>
9047
9048 * kern/i386/linuxbios/init.c: Put "void" to all function
9049 declarations with no arguments.
9050 * kern/powerpc/ieee1275/init.c: Likewise.
9051 * term/i386/pc/at_keyboard.c: Likewise.
9052 * term/i386/pc/vga_text.c: Likewise.
9053 * util/grub-mkdevicemap.c: Likewise.
9054
9055 2008-01-02 Robert Millan <rmh@aybabtu.com>
9056
9057 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9058 message when loaded image is out of bounds.
9059 (grub_multiboot_load_elf64): Likewise.
9060
9061 2008-01-02 Pavel Roskin <proski@gnu.org>
9062
9063 * util/grub.d/10_linux.in: Try version without ".old" when
9064 looking for initrd. It's better to use initrd from the newer
9065 kernel of the same version than no initrd at all.
9066
9067 2008-01-01 Robert Millan <rmh@aybabtu.com>
9068
9069 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9070
9071 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9072
9073 * include/grub/video.h: Added grub_video_unmap_color and
9074 grub_video_get_active_render_target.
9075 (grub_video_adapter): Added unmap_color and get_active_render_target.
9076
9077 * video/video.c: Added grub_video_unmap_color and
9078 grub_video_get_active_render_target.
9079 (grub_video_get_info): Changed method to accept NULL pointer as an
9080 argument to allow detection of active video adapter.
9081
9082 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9083 grub_video_vbe_unmap_color_int.
9084 Added grub_video_vbe_unmap_color and
9085 grub_video_vbe_get_active_render_target.
9086 (grub_video_vbe_adapter): Added unmap_color and
9087 get_active_render_target.
9088
9089 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9090 with grub_video_vbe_unmap_color_int.
9091
9092 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9093 (DEFAULT_NORMAL_COLOR): Likewise.
9094 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9095 (DEFAULT_FG_COLOR): Removed.
9096 (DEFAULT_BG_COLOR): Likewise.
9097 (DEFAULT_CURSOR_COLOR): Changed value.
9098 (grub_virtual_screen): Added standard_color_setting,
9099 normal_color_setting, highlight_color_setting and term_color.
9100 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9101 (bitmap_width): Added.
9102 (bitmap_height): Likewise.
9103 (bitmap): Likewise.
9104 (set_term_color): Likewise.
9105 (grub_virtual_screen_setup): Changed to use new terminal coloring
9106 settings.
9107 (grub_gfxterm_init): Added init for bitmap.
9108 (grub_gfxterm_fini): Added destroy for bitmap.
9109 (redraw_screen_rect): Updated to use background bitmap and new
9110 terminal coloring.
9111 (scroll_up): Added optimization for case when there is no bitmap.
9112 (grub_gfxterm_cls): Fixed to use correct background color.
9113 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9114 coloring.
9115 (grub_virtual_screen_setcolor): Likewise.
9116 (grub_virtual_screen_getcolor): Added.
9117 (grub_gfxterm_background_image_cmd): Likewise.
9118 (grub_video_term): Added setcolor and getcolor.
9119 (MOD_INIT): Added registration of background_image command.
9120 (MOD_TERM): Added unregistration for background_image command.
9121
9122 2007-12-30 Pavel Roskin <proski@gnu.org>
9123
9124 * loader/multiboot_loader.c: Fix multiboot command
9125 unregistration. Fix all typos in the word "multiboot".
9126
9127 2007-12-29 Pavel Roskin <proski@gnu.org>
9128
9129 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9130 support for initrd names used in Fedora.
9131
9132 2007-12-26 Bean <bean123ch@gmail.com>
9133
9134 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9135 (cpio_mod_SOURCES): New variable.
9136 (cpio_mod_CFLAGS): Likewise.
9137 (cpio_mod_LDFLAGS): Likewise.
9138
9139 * fs/cpio.c: New file.
9140
9141 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9142
9143 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9144
9145 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9146
9147 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9148
9149 2007-12-25 Robert Millan <rmh@aybabtu.com>
9150
9151 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9152 (grub_getcolor): New function.
9153
9154 * kern/term.c (grub_getcolor): New function.
9155 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9156 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9157 (print_entry): Set normal and highlight colors to
9158 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9159 respectively, before printing and restore them to old
9160 values afterwards.
9161 (grub_menu_init_page): Likewise. Fill an additional colored space
9162 that would otherwise be left blank.
9163
9164 * term/efi/console.c (grub_console_getcolor): New function.
9165 (struct grub_console_term.getcolor): New variable.
9166 * term/i386/pc/console.c (grub_console_getcolor): New function.
9167 (struct grub_console_term.getcolor): New variable.
9168 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9169 (struct grub_console_term.getcolor): New variable.
9170
9171 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9172 (struct grub_console_term.setcolor): Remove variable.
9173 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9174 (struct grub_console_term.setcolor): Remove variable.
9175 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9176 (struct grub_console_term.setcolor): Remove variable.
9177 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9178 (struct grub_console_term.setcolor): Remove variable.
9179
9180 2007-12-25 Robert Millan <rmh@aybabtu.com>
9181
9182 * configure.ac: Search for possible unifont.hex locations, and
9183 define UNIFONT_HEX if found.
9184
9185 * Makefile.in (UNIFONT_HEX): Define variable.
9186 (DATA): Rename to ...
9187 (PKGLIB): ... this. Update all users.
9188 (PKGDATA): New variable.
9189 (pkgdata_IMAGES): Rename to ...
9190 (pkglib_IMAGES): ... this. Update all users.
9191 (pkgdata_MODULES): Rename to ...
9192 (pkglib_MODULES): ... this. Update all users.
9193 (pkgdata_PROGRAMS): Rename to ...
9194 (pkglib_PROGRAMS): ... this. Update all users.
9195 (pkgdata_DATA): Rename to ...
9196 (pkglib_DATA): ... this. Update all users.
9197 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9198 (unicode.pff, ascii.pff): New rules.
9199 (all-local): Add `$(PKGDATA)' dependency.
9200 (install-local): Process `$(PKGDATA)'.
9201
9202 * util/update-grub_lib.in (font_path): Search for *.pff files in
9203 a few more locations, including `${pkgdata}'.
9204
9205 2007-12-23 Robert Millan <rmh@aybabtu.com>
9206
9207 Patch from Bean <bean123ch@gmail.com>:
9208 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9209 `size'.
9210
9211 2007-12-21 Bean <bean123ch@gmail.com>
9212
9213 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9214 (ntfscomp_mod_SOURCES): New variable.
9215 (ntfscomp_mod_CFLAGS): Likewise.
9216 (ntfscomp_mod_LDFLAGS): Likewise.
9217
9218 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9219 (grub_probe_SOURCES): Likewise.
9220 (grub_emu_SOURCES): Likewise.
9221
9222 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9223 (grub_emu_SOURCES): Likewise.
9224
9225 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9226 (grub_emu_SOURCES): Likewise.
9227
9228 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9229 (grub_emu_SOURCES): Likewise.
9230
9231 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9232 (read_run_list): Renamed to grub_ntfs_read_run_list.
9233 (decomp_nextvcn): Moved to ntfscomp.c.
9234 (decomp_getch): Likewise.
9235 (decomp_get16): Likewise.
9236 (decomp_block): Likewise.
9237 (read_block): Likewise.
9238 (read_data): Partially moved to ntfscomp.c.
9239 (fixup): Change unsigned to grub_uint16_t.
9240 (read_mft): Change unsigned long to grub_uint32_t.
9241 (read_attr): Likewise.
9242 (read_data): Likewise.
9243 (read_run_data): Likewise.
9244 (read_run_list): Likewise.
9245 (read_mft): Likewise.
9246
9247 * fs/ntfscomp.c: New file.
9248
9249 * include/grub/ntfs.h: New file.
9250
9251 2007-12-16 Robert Millan <rmh@aybabtu.com>
9252
9253 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9254 IDE disk check, since Linux is known to support 20 IDE disks.
9255 Reported by Colin Watson.
9256
9257 2007-12-15 Bean <bean123ch@gmail.com>
9258
9259 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9260 (lnxboot_img_SOURCES): New variable.
9261 (lnxboot_img_ASFLAGS): Likewise.
9262 (lnxboot_img_LDFLAGS): Likewise.
9263
9264 * boot/i386/pc/lnxboot.S: New file.
9265
9266 2007-11-24 Pavel Roskin <proski@gnu.org>
9267
9268 * configure.ac: Test if '--build-id=none' is supported by the
9269 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9270 objcopy to generate incorrect binary files (binutils
9271 2.17.50.0.18-1 as shipped by Fedora 8).
9272 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9273 linking, so that build ID doesn't break the test.
9274
9275 2007-11-24 Pavel Roskin <proski@gnu.org>
9276
9277 * include/grub/i386/time.h: use "void" in the argument list
9278 of grub_cpu_idle().
9279 * include/grub/powerpc/time.h: Likewise.
9280 * include/grub/sparc64/time.h: Likewise.
9281
9282 2007-11-18 Christian Franke <franke@computer.org>
9283
9284 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9285 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9286 This fixes the problem that function keys did not work in grub-emu.
9287
9288 2007-11-18 Christian Franke <franke@computer.org>
9289
9290 * disk/host.c (grub_host_open): Remove attribute unused from
9291 name parameter. Add check for "host". This fixes the problem
9292 that grub-emu does not find partitions.
9293
9294 2007-11-18 Christian Franke <franke@computer.org>
9295
9296 * util/hostfs.c (is_dir): New function.
9297 (grub_hostfs_dir): Handle missing dirent.d_type case.
9298 (grub_hostfs_read): Add missing fseek().
9299 (grub_hostfs_label): Clear label pointer. This fixes a crash
9300 of grub-emu on "ls (host)".
9301
9302 2007-11-18 Christian Franke <franke@computer.org>
9303
9304 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9305 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9306 to 64 bit boundary by default.
9307
9308 2007-11-18 Bean <bean123ch@gmail.com>
9309
9310 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9311 (hexdump_mod_SOURCES): New variable.
9312 (hexdump_mod_CFLAGS): Likewise.
9313 (hexdump_mod_LDFLAGS): Likewise.
9314
9315 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9316
9317 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9318
9319 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9320
9321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9322
9323 * include/grub/hexdump.h: New file.
9324
9325 * commands/hexdump.c: New file.
9326
9327 2007-11-10 Robert Millan <rmh@aybabtu.com>
9328
9329 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9330 in grub_outb() calls.
9331 (beep_on): Likewise.
9332
9333 2007-11-10 Christian Franke <franke@computer.org>
9334
9335 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9336 (grub_menu_run): Likewise.
9337
9338 2007-11-10 Robert Millan <rmh@aybabtu.com>
9339
9340 * include/grub/i386/efi/machine.h: New file.
9341 * include/grub/i386/linuxbios/machine.h: Likewise.
9342 * include/grub/i386/pc/machine.h: Likewise.
9343 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9344 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9345
9346 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9347 (serial_hw_io_addr): New variable.
9348 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9349 instead of `(unsigned short *) 0x400'.
9350
9351 2007-11-10 Bean <bean123ch@gmail.com>
9352
9353 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9354
9355 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9356
9357 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9358 (vga_mod_SOURCES): Added.
9359 (vga_mod_CFLAGS): Likewise.
9360 (vga_mod_LDFLAGS): Likewise.
9361
9362 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9363 grub_outb() calls.
9364 (set_map_mask): Likewise.
9365 (set_read_map): Likewise.
9366 (set_read_address): Likewise.
9367 (vga_font): Removed variable.
9368 (get_vga_glyph): Removed function.
9369 (invalidate_char): Likewise.
9370 (write_char): Changed to use grub_font_get_glyph() for font
9371 information.
9372 (grub_vga_putchar): Likewise.
9373 (grub_vga_getcharwidth): Likewise.
9374
9375 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9376
9377 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9378 flags.
9379 (pxeboot_img_LDFLAGS): Likewise.
9380 (diskboot_img_LDFLAGS): Likewise.
9381 (kernel_img_LDFLAGS): Likewise.
9382
9383 2007-11-06 Robert Millan <rmh@aybabtu.com>
9384
9385 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9386 in grub_outb() calls.
9387 (serial_hw_init): Likewise.
9388
9389 2007-11-05 Robert Millan <rmh@aybabtu.com>
9390
9391 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9392 spaces. Skip non-regular files.
9393
9394 2007-11-05 Robert Millan <rmh@aybabtu.com>
9395
9396 * kern/disk.c (grub_disk_firmware_fini)
9397 (grub_disk_firmware_is_tainted): New variables.
9398
9399 * include/grub/disk.h (grub_disk_firmware_fini)
9400 (grub_disk_firmware_is_tainted): Likewise.
9401
9402 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9403 (grub_disk_biosdisk_fini): ... to here.
9404 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9405 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9406 is set. Register grub_disk_biosdisk_fini() in
9407 `grub_disk_firmware_fini'.
9408
9409 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9410 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9411 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9412 to finish existing firmware disk interface.
9413
9414 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9415 (ata_mod_SOURCES): New variable.
9416 (ata_mod_CFLAGS): Likewise.
9417 (ata_mod_LDFLAGS): Likewise.
9418
9419 2007-11-05 Robert Millan <rmh@aybabtu.com>
9420
9421 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9422 (grub_ata_wait): Reimplement using grub_millisleep().
9423
9424 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9425 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9426
9427 2007-11-03 Marco Gerards <marco@gnu.org>
9428
9429 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9430 (CRTC_ADDR_PORT): New macro.
9431 (CRTC_DATA_PORT): Likewise.
9432 (CRTC_CURSOR): Likewise.
9433 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9434 (CRTC_CURSOR_ADDR_LOW): Likewise.
9435 (update_cursor): New function.
9436 (grub_console_real_putchar): Call `update_cursor'.
9437 (grub_console_gotoxy): Likewise.
9438 (grub_console_cls): Set the default color when clearing the
9439 screen.
9440 (grub_console_setcursor): Implemented.
9441
9442 2007-11-03 Marco Gerards <marco@gnu.org>
9443
9444 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9445 become activate.
9446 (grub_ata_pio_write): Likewise.
9447
9448 (grub_atapi_identify): Wait after issuing an ATA command.
9449 (grub_atapi_packet): Likewise.
9450 (grub_ata_identify): Likewise.
9451 (grub_ata_readwrite): Likewise.
9452
9453 2007-11-03 Marco Gerards <marco@gnu.org>
9454
9455 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9456 (grub_ata_pio_write): Likewise.
9457 (grub_ata_readwrite): Use `grub_error', instead of
9458 returning `grub_errno'.
9459
9460 2007-11-03 Marco Gerards <marco@gnu.org>
9461
9462 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9463 grub_ata_pio_write once for every single sector, instead of for
9464 multiple sectors.
9465
9466 2007-10-31 Robert Millan <rmh@aybabtu.com>
9467
9468 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9469
9470 * conf/i386-linuxbios.rmk: New file.
9471
9472 * kern/i386/pc/hardware.c: Likewise.
9473 * term/i386/pc/at_keyboard.c: Likewise.
9474 * term/i386/pc/vga_text.c: Likewise.
9475
9476 * include/grub/i386/linuxbios/boot.h: Likewise.
9477 * include/grub/i386/linuxbios/console.h: Likewise.
9478 * include/grub/i386/linuxbios/init.h: Likewise.
9479 * include/grub/i386/linuxbios/kernel.h: Likewise.
9480 * include/grub/i386/linuxbios/loader.h: Likewise.
9481 * include/grub/i386/linuxbios/memory.h: Likewise.
9482 * include/grub/i386/linuxbios/serial.h: Likewise.
9483 * include/grub/i386/linuxbios/time.h: Likewise.
9484
9485 * kern/i386/linuxbios/init.c: Likewise.
9486 * kern/i386/linuxbios/startup.S: Likewise.
9487 * kern/i386/linuxbios/table.c: Likewise.
9488
9489 2007-10-31 Marco Gerards <marco@gnu.org>
9490
9491 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9492 (ata_mod_SOURCES): New variable.
9493 (ata_mod_CFLAGS): Likewise.
9494 (ata_mod_LDFLAGS): Likewise.
9495
9496 * disk/ata.c: New file.
9497
9498 * include/grub/disk.h (grub_disk_dev_id): Add
9499 `GRUB_DISK_DEV_ATA_ID'.
9500
9501 2007-10-31 Robert Millan <rmh@aybabtu.com>
9502
9503 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9504 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9505
9506 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9507 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9508
9509 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9510 `<grub/types.h>'.
9511
9512 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9513
9514 2007-10-27 Robert Millan <rmh@aybabtu.com>
9515
9516 * include/grub/types.h (ULONG_MAX): Define macro.
9517
9518 2007-10-22 Robert Millan <rmh@aybabtu.com>
9519
9520 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9521 `"../realmode.S"'.
9522 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9523
9524 2007-10-22 Robert Millan <rmh@aybabtu.com>
9525
9526 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9527 (pkgdata_MODULES): Add `biosdisk.mod'.
9528 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9529 variables.
9530
9531 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9532 (grub_biosdisk_init): Replace with ...
9533 (GRUB_MOD_INIT(biosdisk)): ... this.
9534 (grub_biosdisk_fini): Replace with ...
9535 (GRUB_MOD_FINI(biosdisk)): ... this.
9536
9537 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9538 (grub_machine_init): Remove call to grub_biosdisk_init().
9539 (grub_machine_fini): Remove call to grub_machine_fini().
9540
9541 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9542
9543 2007-10-22 Robert Millan <rmh@aybabtu.com>
9544
9545 * include/grub/time.h: New file.
9546 * include/grub/i386/time.h: Likewise.
9547 * include/grub/powerpc/time.h: Likewise.
9548 * include/grub/sparc64/time.h: Likewise.
9549
9550 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9551 instances to ...
9552 (KERNEL_MACHINE_TIME_HEADER): ... this.
9553 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9554 instances to ...
9555 (KERNEL_MACHINE_TIME_HEADER): ... this.
9556 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9557 instances to ...
9558 (KERNEL_MACHINE_TIME_HEADER): ... this.
9559
9560 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9561 (grub_millisleep): New function.
9562 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9563 (grub_millisleep): New function.
9564 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9565 Remove `grub/machine/time.h' include.
9566 (grub_millisleep): New function.
9567 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9568 Remove `grub/machine/time.h' include.
9569 (grub_millisleep): New function.
9570
9571 * include/grub/misc.h (grub_div_roundup): New function.
9572
9573 * kern/misc.c: Include `<grub/time.h>'.
9574 (grub_millisleep_generic): New function.
9575
9576 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9577 Add `time.h'.
9578 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9579 Add `time.h'.
9580 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9581 `machine/time.h'. Add `time.h'.
9582 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9583
9584 2007-10-21 Robert Millan <rmh@aybabtu.com>
9585
9586 * include/grub/misc.h (grub_max): New function.
9587
9588 2007-10-21 Robert Millan <rmh@aybabtu.com>
9589
9590 * util/misc.c (grub_util_info): Call fflush() before returning.
9591
9592 2007-10-20 Robert Millan <rmh@aybabtu.com>
9593
9594 * genmk.rb (Image): Copy `extra_flags' from here ...
9595 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9596
9597 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9598 to `argc' and `args' arguments.
9599
9600 2007-10-17 Robert Millan <rmh@aybabtu.com>
9601
9602 * kern/i386/loader.S: New file.
9603
9604 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9605 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9606 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9607 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9608 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9609 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9610 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9611 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9612 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9613 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9614 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9615 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9616 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9617 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9618
9619 * kern/i386/realmode.S: New file.
9620
9621 * kern/i386/pc/startup.S (protstack): Moved from here ...
9622 * kern/i386/realmode.S (protstack)... to here.
9623 * kern/i386/pc/startup.S (gdt): Moved from here ...
9624 * kern/i386/realmode.S (gdt)... to here.
9625 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9626 * kern/i386/realmode.S (prot_to_real)... to here.
9627
9628 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9629 `kern/i386/realmode.S'.
9630
9631 2007-10-17 Robert Millan <rmh@aybabtu.com>
9632
9633 * include/grub/i386/loader.h: New file.
9634
9635 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9636 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9637 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9638 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9639 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9640 * include/grub/i386/loader.h (grub_linux_prot_size)
9641 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9642 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9643 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9644 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9645
9646 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9647
9648 2007-10-15 Robert Millan <rmh@aybabtu.com>
9649
9650 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9651 filesystem when dev->disk is unset.
9652 Do probe for filesystem even when dev->disk->has_partitions is set.
9653 In case a filesystem is found, always report it.
9654 In case it isn't, if dev->disk->has_partitions is set, report that
9655 a partition table was found instead of reporting that no filesystem
9656 could be identified.
9657
9658 2007-10-12 Robert Millan <rmh@aybabtu.com>
9659
9660 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9661 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9662
9663 * include/grub/types.h (grub_host_to_target16): New macro.
9664 (grub_host_to_target32): Likewise.
9665 (grub_host_to_target64): Likewise.
9666 (grub_target_to_host16): Likewise.
9667 (grub_target_to_host32): Likewise.
9668 (grub_target_to_host64): Likewise.
9669
9670 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9671 Renamed from to ...
9672 (GRUB_MOD_ALIGN): ...this. Update all users.
9673
9674 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9675 grub_host_to_target32.
9676 Replace grub_be_to_cpu32 with grub_target_to_host32.
9677 (load_modules): Likewise.
9678 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9679 Replace grub_be_to_cpu32 with grub_target_to_host32.
9680 Replace grub_cpu_to_be16 with grub_host_to_target16.
9681 Replace grub_cpu_to_be32 grub_host_to_target32.
9682
9683 2007-10-12 Robert Millan <rmh@aybabtu.com>
9684
9685 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9686 * util/elf/grub-mkimage.c: ... here.
9687
9688 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9689 `util/powerpc/ieee1275/grub-mkimage.c'.
9690
9691 2007-10-07 Robert Millan <rmh@aybabtu.com>
9692
9693 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9694 and make it easier to figure out.
9695 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9696 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9697 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9698 leave us with less than HEAP_MIN_SIZE total heap.
9699 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9700
9701 2007-10-03 Robert Millan <rmh@aybabtu.com>
9702
9703 * include/grub/i386/io.h: New file.
9704 * commands/i386/pc/play.c (inb): Removed.
9705 (outb): Removed.
9706 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9707 with grub_outb().
9708 * term/i386/pc/serial.c (inb): Removed.
9709 (outb): Removed.
9710 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9711 with grub_outb().
9712 * term/i386/pc/vga.c (inb): Removed.
9713 (outb): Removed.
9714 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9715 with grub_outb().
9716
9717 2007-10-02 Robert Millan <rmh@aybabtu.com>
9718
9719 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9720 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9721 Reported by Marcin Kurek.
9722
9723 2007-09-07 Robert Millan <rmh@aybabtu.com>
9724
9725 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9726 SmartFirmware version updates (as released by Sven Luther), and avoid
9727 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9728 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9729 known broken.
9730
9731 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9732
9733 From Hitoshi Ozeki:
9734 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9735 when merging two regions.
9736
9737 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9738
9739 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9740 * normal/completion.c (grub_normal_do_completion): Likewise.
9741 Reported by Hitoshi Ozeki.
9742
9743 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9744
9745 Do not use devices at boot in chainloading.
9746
9747 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9748 (boot_part_addr): Likewise.
9749 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9750 with BOOT_DRIVE and BOOT_PART_ADDR.
9751 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9752 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9753
9754 2007-08-29 Robert Millan <rmh@aybabtu.com>
9755
9756 Patch from Simon Peter <dn.tlp@gmx.net>:
9757 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9758 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9759 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9760 util/i386/pc/grub-setup.c_DEPENDENCIES.
9761 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9762 util/grub-probe.c_DEPENDENCIES.
9763 * conf/powerpc-ieee1275.rmk: Likewise.
9764
9765 2007-08-28 Robert Millan <rmh@aybabtu.com>
9766
9767 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9768 to tell grub-mkdevicemap how to name devices.
9769 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9770 feature).
9771
9772 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9773 util/i386/get_disk_name.c.
9774 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9775 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9776 util/ieee1275/get_disk_name.c.
9777
9778 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9779
9780 * DISTLIST: Add util/i386/get_disk_name.c and
9781 util/ieee1275/get_disk_name.c.
9782
9783 * util/grub-mkdevicemap.c: Replace device naming logic with
9784 grub_util_get_disk_name() calls.
9785
9786 2007-08-20 Robert Millan <rmh@aybabtu.com>
9787
9788 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9789 (so that it works for both plural and singular quantities).
9790
9791 2007-08-05 Robert Millan <rmh@aybabtu.com>
9792
9793 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9794 so that [xz] isn't taken into account when determining order.
9795
9796 2007-08-02 Marco Gerards <marco@gnu.org>
9797
9798 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9799 `include/multiboot2.h', `include/grub/elfload.h',
9800 `include/multiboot.h', `include/grub/multiboot.h',
9801 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9802 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9803 `kern/elf.c', `loader/multiboot_loader.c',
9804 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9805 `loader/i386/pc/multiboot2.c',
9806 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9807 `util/i386/pc/grub-mkrescue.in'. Remove
9808 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9809 `include/grub/i386/pc/util/biosdisk.h' and
9810 `include/grub/powerpc/ieee1275/multiboot.h'.
9811
9812 2007-08-02 Bean <bean123ch@gmail.com>
9813
9814 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9815 (ntfs_mod_SOURCES): New variable.
9816 (ntfs_mod_CFLAGS): Likewise.
9817 (ntfs_mod_LDFLAGS): Likewise.
9818
9819 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9820 (grub_probe_SOURCES): Likewise.
9821 (grub_emu_SOURCES): Likewise.
9822
9823 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9824 (grub_emu_SOURCES): Likewise.
9825
9826 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9827 (grub_emu_SOURCES): Likewise.
9828
9829 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9830
9831 * fs/ntfs.c: New file.
9832
9833 2007-08-02 Bean <bean123ch@gmail.com>
9834
9835 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9836
9837 * file.h (grub_file): Likewise.
9838
9839 * fshelp.h (grub_fshelp_read_file): Likewise.
9840
9841 * util/i386/pc/grub-setup.c (setup): Likewise.
9842 (save_first_sector): Likewise.
9843 (save_blocklists): Likewise.
9844
9845 * fs/affs.c (grub_affs_read_file): Likewise.
9846
9847 * fs/ext2.c (grub_ext2_read_file): Likewise.
9848
9849 * fs/fat.c (grub_fat_read_data): Likewise.
9850
9851 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9852
9853 * fs/hfs.c (grub_hfs_read_file): Likewise.
9854
9855 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9856
9857 * fs/jfs.c (grub_jfs_read_file): Likewise.
9858
9859 * fs/minix.c (grub_minix_read_file): Likewise.
9860
9861 * fs/sfs.c (grub_sfs_read_file): Likewise.
9862
9863 * fs/ufs.c (grub_ufs_read_file): Likewise.
9864
9865 * fs/xfs.c (grub_xfs_read_file): Likewise.
9866
9867 * command/blocklist.c (read_blocklist): Likewise.
9868 (print_blocklist): Likewise.
9869
9870 2007-08-02 Marco Gerards <marco@gnu.org>
9871
9872 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9873 `util/hostfs.c'.
9874
9875 * disk/host.c: New file.
9876
9877 * util/hostfs.c: Likewise.
9878
9879 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9880 return `GRUB_ERR_BAD_FS'.
9881 * fs/sfs.c (grub_sfs_mount): Likewise.
9882 * fs/xfs.c (grub_xfs_mount): Likewise.
9883
9884 * include/grub/disk.h (enum grub_disk_dev_id): Add
9885 `GRUB_DISK_DEVICE_HOST_ID'.
9886
9887 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9888
9889 2007-07-24 Jerone Young <jerone@gmail.com>
9890
9891 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9892 modules for compilation.
9893 * conf/powerpc-ieee1275.rmk: Likewise.
9894
9895 * include/multiboot.h: Move multiboot definitions to one file. Rename
9896 many definitions to not get grub specific.
9897 * include/multiboot2.h: Create header with multiboot 2 definitions.
9898 * include/grub/multiboot.h: Header for grub specific function
9899 prototypes and definitions.
9900 * include/grub/multiboot2.h: Likewise.
9901 * include/grub/multiboot_loader.h: Likewise.
9902 * include/grub/i386/pc/multiboot.h: Removed.
9903 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9904
9905 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9906 and 2 to allow for one multiboot and module commands.
9907 * loader/multiboot2.c: Add multiboot2 functionality.
9908 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9909 and definition names.
9910 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9911 2 functions.
9912 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9913 ieee1275 specific multiboot2 code.
9914
9915 * kern/i386/pc/startup.S: Change headers and definition names for
9916 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9917
9918 2007-07-22 Robert Millan <rmh@aybabtu.com>
9919
9920 * geninitheader.sh: Process file specified in first parameter rather
9921 than hardcoding grub_modules_init.lst.
9922 * geninit.sh: Likewise. Also, construct header name dynamically rather
9923 than hardcoding grub_modules_init.h.
9924
9925 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9926 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9927 grub_probe_init.[ch] and grub_setup_init.[ch].
9928
9929 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9930 grub_modules_init.h with grub_emu_init.h.
9931 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9932 grub_probe_init.[ch] files.
9933 * conf/i386-efi.rmk: Likewise.
9934 * conf/i386-pc.rmk: Likewise.
9935 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9936 grub_setup_init.[ch] files.
9937
9938 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9939 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9940 to initialize modules rather than a list of hardcoded functions.
9941 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9942 grub_init_all() to initialize modules rather than a list of hardcoded
9943 functions.
9944
9945 2007-07-22 Robert Millan <rmh@aybabtu.com>
9946
9947 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9948 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9949
9950 2007-07-22 Robert Millan <rmh@aybabtu.com>
9951
9952 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9953 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9954 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9955 flag when running on SmartFirmware.
9956 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9957 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9958 was set.
9959
9960 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9961 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9962 rather than decreasing it.
9963
9964 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9965 there's not enough space to do it, fail in the same way as when it
9966 can't be done because there are no partitions.
9967
9968 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9969 when nvsetenv failed.
9970
9971 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9972
9973 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9974 because this rule is automatically generated.
9975 (grub-mkrescue): Removed for the same reason as above.
9976
9977 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9978
9979 Migrate to GNU General Public License Version 3.
9980
9981 * COPYING: Replaced with the plain text version of GPLv3.
9982
9983 * config.guess: Updated from gnulib.
9984 * config.sub: Likewise.
9985
9986 * geninit.sh: Output a GPLv3 copyright notice.
9987 * geninitheader.sh: Likewise.
9988 * genmodsrc.sh: Likewise.
9989 * gensymlist.sh.in: Likewise.
9990
9991 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9992 * boot/i386/pc/diskboot.S: Likewise.
9993 * boot/i386/pc/pxeboot.S: Likewise.
9994 * commands/blocklist.c: Likewise.
9995 * commands/boot.c: Likewise.
9996 * commands/cat.c: Likewise.
9997 * commands/cmp.c: Likewise.
9998 * commands/configfile.c: Likewise.
9999 * commands/echo.c: Likewise.
10000 * commands/help.c: Likewise.
10001 * commands/ls.c: Likewise.
10002 * commands/search.c: Likewise.
10003 * commands/terminal.c: Likewise.
10004 * commands/test.c: Likewise.
10005 * commands/videotest.c: Likewise.
10006 * commands/i386/cpuid.c: Likewise.
10007 * commands/i386/pc/halt.c: Likewise.
10008 * commands/i386/pc/play.c: Likewise.
10009 * commands/i386/pc/reboot.c: Likewise.
10010 * commands/i386/pc/vbeinfo.c: Likewise.
10011 * commands/i386/pc/vbetest.c: Likewise.
10012 * commands/ieee1275/halt.c: Likewise.
10013 * commands/ieee1275/reboot.c: Likewise.
10014 * commands/ieee1275/suspend.c: Likewise.
10015 * disk/loopback.c: Likewise.
10016 * disk/lvm.c: Likewise.
10017 * disk/raid.c: Likewise.
10018 * disk/efi/efidisk.c: Likewise.
10019 * disk/i386/pc/biosdisk.c: Likewise.
10020 * disk/ieee1275/ofdisk.c: Likewise.
10021 * font/manager.c: Likewise.
10022 * fs/affs.c: Likewise.
10023 * fs/ext2.c: Likewise.
10024 * fs/fat.c: Likewise.
10025 * fs/fshelp.c: Likewise.
10026 * fs/hfs.c: Likewise.
10027 * fs/hfsplus.c: Likewise.
10028 * fs/iso9660.c: Likewise.
10029 * fs/jfs.c: Likewise.
10030 * fs/minix.c: Likewise.
10031 * fs/sfs.c: Likewise.
10032 * fs/ufs.c: Likewise.
10033 * fs/xfs.c: Likewise.
10034 * hello/hello.c: Likewise.
10035 * include/grub/acorn_filecore.h: Likewise.
10036 * include/grub/arg.h: Likewise.
10037 * include/grub/bitmap.h: Likewise.
10038 * include/grub/boot.h: Likewise.
10039 * include/grub/cache.h: Likewise.
10040 * include/grub/device.h: Likewise.
10041 * include/grub/disk.h: Likewise.
10042 * include/grub/dl.h: Likewise.
10043 * include/grub/elfload.h: Likewise.
10044 * include/grub/env.h: Likewise.
10045 * include/grub/err.h: Likewise.
10046 * include/grub/file.h: Likewise.
10047 * include/grub/font.h: Likewise.
10048 * include/grub/fs.h: Likewise.
10049 * include/grub/fshelp.h: Likewise.
10050 * include/grub/gzio.h: Likewise.
10051 * include/grub/hfs.h: Likewise.
10052 * include/grub/kernel.h: Likewise.
10053 * include/grub/loader.h: Likewise.
10054 * include/grub/lvm.h: Likewise.
10055 * include/grub/misc.h: Likewise.
10056 * include/grub/mm.h: Likewise.
10057 * include/grub/net.h: Likewise.
10058 * include/grub/normal.h: Likewise.
10059 * include/grub/parser.h: Likewise.
10060 * include/grub/partition.h: Likewise.
10061 * include/grub/pc_partition.h: Likewise.
10062 * include/grub/raid.h: Likewise.
10063 * include/grub/rescue.h: Likewise.
10064 * include/grub/script.h: Likewise.
10065 * include/grub/setjmp.h: Likewise.
10066 * include/grub/symbol.h: Likewise.
10067 * include/grub/term.h: Likewise.
10068 * include/grub/terminfo.h: Likewise.
10069 * include/grub/tparm.h: Likewise.
10070 * include/grub/types.h: Likewise.
10071 * include/grub/video.h: Likewise.
10072 * include/grub/efi/api.h: Likewise.
10073 * include/grub/efi/chainloader.h: Likewise.
10074 * include/grub/efi/console.h: Likewise.
10075 * include/grub/efi/console_control.h: Likewise.
10076 * include/grub/efi/disk.h: Likewise.
10077 * include/grub/efi/efi.h: Likewise.
10078 * include/grub/efi/pe32.h: Likewise.
10079 * include/grub/efi/time.h: Likewise.
10080 * include/grub/i386/linux.h: Likewise.
10081 * include/grub/i386/setjmp.h: Likewise.
10082 * include/grub/i386/types.h: Likewise.
10083 * include/grub/i386/efi/kernel.h: Likewise.
10084 * include/grub/i386/efi/loader.h: Likewise.
10085 * include/grub/i386/efi/time.h: Likewise.
10086 * include/grub/i386/pc/biosdisk.h: Likewise.
10087 * include/grub/i386/pc/boot.h: Likewise.
10088 * include/grub/i386/pc/chainloader.h: Likewise.
10089 * include/grub/i386/pc/console.h: Likewise.
10090 * include/grub/i386/pc/init.h: Likewise.
10091 * include/grub/i386/pc/kernel.h: Likewise.
10092 * include/grub/i386/pc/loader.h: Likewise.
10093 * include/grub/i386/pc/memory.h: Likewise.
10094 * include/grub/i386/pc/multiboot.h: Likewise.
10095 * include/grub/i386/pc/serial.h: Likewise.
10096 * include/grub/i386/pc/time.h: Likewise.
10097 * include/grub/i386/pc/vbe.h: Likewise.
10098 * include/grub/i386/pc/vbeblit.h: Likewise.
10099 * include/grub/i386/pc/vbefill.h: Likewise.
10100 * include/grub/i386/pc/vbeutil.h: Likewise.
10101 * include/grub/i386/pc/vga.h: Likewise.
10102 * include/grub/ieee1275/ieee1275.h: Likewise.
10103 * include/grub/ieee1275/ofdisk.h: Likewise.
10104 * include/grub/powerpc/libgcc.h: Likewise.
10105 * include/grub/powerpc/setjmp.h: Likewise.
10106 * include/grub/powerpc/types.h: Likewise.
10107 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10108 * include/grub/powerpc/ieee1275/console.h: Likewise.
10109 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10110 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10111 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10112 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10113 * include/grub/powerpc/ieee1275/time.h: Likewise.
10114 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10115 * include/grub/sparc64/libgcc.h: Likewise.
10116 * include/grub/sparc64/setjmp.h: Likewise.
10117 * include/grub/sparc64/types.h: Likewise.
10118 * include/grub/sparc64/ieee1275/console.h: Likewise.
10119 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10120 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10121 * include/grub/sparc64/ieee1275/time.h: Likewise.
10122 * include/grub/util/biosdisk.h: Likewise.
10123 * include/grub/util/getroot.h: Likewise.
10124 * include/grub/util/lvm.h: Likewise.
10125 * include/grub/util/misc.h: Likewise.
10126 * include/grub/util/raid.h: Likewise.
10127 * include/grub/util/resolve.h: Likewise.
10128 * io/gzio.c: Likewise.
10129 * kern/device.c: Likewise.
10130 * kern/disk.c: Likewise.
10131 * kern/dl.c: Likewise.
10132 * kern/elf.c: Likewise.
10133 * kern/env.c: Likewise.
10134 * kern/err.c: Likewise.
10135 * kern/file.c: Likewise.
10136 * kern/fs.c: Likewise.
10137 * kern/loader.c: Likewise.
10138 * kern/main.c: Likewise.
10139 * kern/misc.c: Likewise.
10140 * kern/mm.c: Likewise.
10141 * kern/parser.c: Likewise.
10142 * kern/partition.c: Likewise.
10143 * kern/rescue.c: Likewise.
10144 * kern/term.c: Likewise.
10145 * kern/efi/efi.c: Likewise.
10146 * kern/efi/init.c: Likewise.
10147 * kern/efi/mm.c: Likewise.
10148 * kern/i386/dl.c: Likewise.
10149 * kern/i386/efi/init.c: Likewise.
10150 * kern/i386/efi/startup.S: Likewise.
10151 * kern/i386/pc/init.c: Likewise.
10152 * kern/i386/pc/lzo1x.S: Likewise.
10153 * kern/i386/pc/startup.S: Likewise.
10154 * kern/ieee1275/ieee1275.c: Likewise.
10155 * kern/powerpc/cache.S: Likewise.
10156 * kern/powerpc/dl.c: Likewise.
10157 * kern/powerpc/ieee1275/cmain.c: Likewise.
10158 * kern/powerpc/ieee1275/crt0.S: Likewise.
10159 * kern/powerpc/ieee1275/init.c: Likewise.
10160 * kern/powerpc/ieee1275/openfw.c: Likewise.
10161 * kern/sparc64/cache.S: Likewise.
10162 * kern/sparc64/dl.c: Likewise.
10163 * kern/sparc64/ieee1275/init.c: Likewise.
10164 * kern/sparc64/ieee1275/openfw.c: Likewise.
10165 * loader/efi/chainloader.c: Likewise.
10166 * loader/efi/chainloader_normal.c: Likewise.
10167 * loader/i386/efi/linux.c: Likewise.
10168 * loader/i386/efi/linux_normal.c: Likewise.
10169 * loader/i386/pc/chainloader.c: Likewise.
10170 * loader/i386/pc/chainloader_normal.c: Likewise.
10171 * loader/i386/pc/linux.c: Likewise.
10172 * loader/i386/pc/linux_normal.c: Likewise.
10173 * loader/i386/pc/multiboot.c: Likewise.
10174 * loader/i386/pc/multiboot_normal.c: Likewise.
10175 * loader/powerpc/ieee1275/linux.c: Likewise.
10176 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10177 * normal/arg.c: Likewise.
10178 * normal/cmdline.c: Likewise.
10179 * normal/command.c: Likewise.
10180 * normal/completion.c: Likewise.
10181 * normal/execute.c: Likewise.
10182 * normal/function.c: Likewise.
10183 * normal/lexer.c: Likewise.
10184 * normal/main.c: Likewise.
10185 * normal/menu.c: Likewise.
10186 * normal/menu_entry.c: Likewise.
10187 * normal/misc.c: Likewise.
10188 * normal/parser.y: Likewise.
10189 * normal/script.c: Likewise.
10190 * normal/i386/setjmp.S: Likewise.
10191 * normal/powerpc/setjmp.S: Likewise.
10192 * normal/sparc64/setjmp.S: Likewise.
10193 * partmap/acorn.c: Likewise.
10194 * partmap/amiga.c: Likewise.
10195 * partmap/apple.c: Likewise.
10196 * partmap/gpt.c: Likewise.
10197 * partmap/pc.c: Likewise.
10198 * partmap/sun.c: Likewise.
10199 * term/gfxterm.c: Likewise.
10200 * term/terminfo.c: Likewise.
10201 * term/efi/console.c: Likewise.
10202 * term/i386/pc/console.c: Likewise.
10203 * term/i386/pc/serial.c: Likewise.
10204 * term/i386/pc/vesafb.c: Likewise.
10205 * term/i386/pc/vga.c: Likewise.
10206 * term/ieee1275/ofconsole.c: Likewise.
10207 * util/biosdisk.c: Likewise.
10208 * util/console.c: Likewise.
10209 * util/genmoddep.c: Likewise.
10210 * util/getroot.c: Likewise.
10211 * util/grub-emu.c: Likewise.
10212 * util/grub-mkdevicemap.c: Likewise.
10213 * util/grub-probe.c: Likewise.
10214 * util/lvm.c: Likewise.
10215 * util/misc.c: Likewise.
10216 * util/raid.c: Likewise.
10217 * util/resolve.c: Likewise.
10218 * util/update-grub.in: Likewise.
10219 * util/update-grub_lib.in: Likewise.
10220 * util/grub.d/00_header.in: Likewise.
10221 * util/grub.d/10_hurd.in: Likewise.
10222 * util/grub.d/10_linux.in: Likewise.
10223 * util/i386/efi/grub-install.in: Likewise.
10224 * util/i386/efi/grub-mkimage.c: Likewise.
10225 * util/i386/pc/grub-install.in: Likewise.
10226 * util/i386/pc/grub-mkimage.c: Likewise.
10227 * util/i386/pc/grub-mkrescue.in: Likewise.
10228 * util/i386/pc/grub-setup.c: Likewise.
10229 * util/i386/pc/misc.c: Likewise.
10230 * util/powerpc/ieee1275/grub-install.in: Likewise.
10231 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10232 * util/powerpc/ieee1275/misc.c: Likewise.
10233 * video/bitmap.c: Likewise.
10234 * video/video.c: Likewise.
10235 * video/i386/pc/vbe.c: Likewise.
10236 * video/i386/pc/vbeblit.c: Likewise.
10237 * video/i386/pc/vbefill.c: Likewise.
10238 * video/i386/pc/vbeutil.c: Likewise.
10239 * video/readers/tga.c: Likewise.
10240
10241 2007-07-02 Robert Millan <rmh@aybabtu.com>
10242
10243 * conf/i386-efi.rmk: Replace obsolete reference to
10244 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10245 with util/getroot.c.
10246 * conf/powerpc-ieee1275.rmk: Likewise.
10247 * conf/sparc64-ieee1275.rmk: Likewise.
10248
10249 * util/grub-emu.c (main): Fix unchecked pointer handling.
10250
10251 2007-07-02 Robert Millan <rmh@aybabtu.com>
10252
10253 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10254 invocation to fail, in order to support partition-less media.
10255
10256 * util/i386/pc/grub-install.in: Likewise.
10257
10258 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10259 which fs or partmap modules are needed (akin to its sister scripts).
10260
10261 Also use grub-probe to get rid of unportable /proc/mounts check.
10262
10263 Print the same informational message that the other scripts do, before
10264 exiting.
10265
10266 2007-06-23 Robert Millan <rmh@aybabtu.com>
10267
10268 * util/update-grub_lib.in (font_path): New function. Determine whether
10269 a font file can be found and, if so, echo the GRUB path to it.
10270
10271 * util/update-grub.in: Handle multiple terminals depending on user
10272 input, platform availability and font file presence. Propagate
10273 variables of our findings to /etc/grub.d/ children.
10274
10275 * util/grub.d/00_header.in: Handle multiple terminals, based on
10276 environment setup by update-grub.
10277
10278 2007-06-23 Robert Millan <rmh@aybabtu.com>
10279
10280 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10281
10282 2007-06-21 Robert Millan <rmh@aybabtu.com>
10283
10284 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10285 indicate end of data section in kernel image.
10286 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10287 GRUB_KERNEL_MACHINE_DATA_END.
10288
10289 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10290 space for it.
10291 * kern/i386/efi/startup.S: Likewise.
10292
10293 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10294 during image generation. Implement --prefix option to override this
10295 patch.
10296 * util/i386/efi/grub-mkimage.c: Likewise.
10297
10298 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10299 code to make path relative to its root into a separate function.
10300
10301 * util/i386/pc/grub-install.in: Use newly provided
10302 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10303 pass the result to grub-install --prefix.
10304
10305 2007-06-13 Robert Millan <rmh@aybabtu.com>
10306
10307 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10308 DEFAULT_DEVICE_MAP.
10309 * util/grub-emu.c: Use above definitions from misc.h instead of
10310 defining them.
10311 * util/grub-mkdevicemap.c: Likewise.
10312 * util/i386/pc/grub-setup.c: Likewise.
10313 * util/grub-probe.c: Likewise.
10314 (probe): Abort with grub_util_error() when either
10315 grub_guess_root_device or grub_util_get_grub_dev fails.
10316
10317 2007-06-12 Robert Millan <rmh@aybabtu.com>
10318
10319 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10320 "pager" assignment.
10321 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10322 "pcdata".
10323 * util/grub-probe.c (probe): Likewise for "drive_name".
10324
10325 2007-06-11 Robert Millan <rmh@aybabtu.com>
10326
10327 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10328 not just the cdrom one.
10329
10330 2007-06-11 Robert Millan <rmh@aybabtu.com>
10331
10332 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10333 Add --pkglibdir=DIR option to override pkglibdir.
10334 Mention --image-type=TYPE in help output.
10335 Fix --grub-mkimage (it was a no-op).
10336 Abort gracefully when no parameter is given.
10337
10338 2007-06-11 Robert Millan <rmh@aybabtu.com>
10339
10340 * util/i386/pc/grub-mkrescue.in: New file.
10341 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10342 * Makefile.in: Handle bin_SCRIPTS.
10343
10344 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10345
10346 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10347 list of video modes.
10348
10349 2007-06-06 Robert Millan <rmh@aybabtu.com>
10350
10351 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10352 file doesn't exist, or if it is in a filesystem grub can't read.
10353
10354 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10355 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10356 header comment to fit in 80 columns when the variables are resolved.
10357
10358 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10359 could be identified by update-grub. Remove redundant check for
10360 unifont.pff existence (since convert_system_path_to_grub_path now
10361 handles that).
10362
10363 2007-06-04 Robert Millan <rmh@aybabtu.com>
10364
10365 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10366
10367 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10368
10369 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10370
10371 2007-06-04 Robert Millan <rmh@aybabtu.com>
10372
10373 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10374
10375 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10376 grub_apple_partition_map_fini.
10377
10378 * util/biosdisk.c
10379 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10380 to access >2 TiB disks).
10381
10382 Print disk->total_sectors with %llu instead of %lu, since this
10383 variable is always 64-bit (prevents wrong disk size from being displayed
10384 on either >2 TiB disk or big-endian CPU).
10385
10386 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10387 into a generic case that supports all (sane) partition maps.
10388
10389 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10390 breaks big-endian.
10391
10392 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10393 and grub_apple_partition_map_fini() after that.
10394
10395 2007-06-01 Robert Millan <rmh@aybabtu.com>
10396
10397 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10398
10399 * util/grub.d/00_header.in: Only enable gfxterm when
10400 convert_system_path_to_grub_path() succeeds.
10401
10402 2007-05-20 Robert Millan <rmh@aybabtu.com>
10403
10404 * util/update-grub_lib.in: New file.
10405 * DISTLIST: Add update-grub_lib.in.
10406 * conf/common.rmk: Generate update-grub_lib and install it in
10407 $(lib_DATA).
10408 * Makefile.in: Add install routine for $(lib_DATA).
10409
10410 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10411 function provided by update-grub_lib to support arbitrary paths of
10412 unifont.pff.
10413 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10414 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10415
10416 2007-05-19 Robert Millan <rmh@aybabtu.com>
10417
10418 * commands/i386/cpuid.c: New module.
10419 * DISTLIST: Add it.
10420 * conf/i386-efi.rmk: Enable cpuid.mod.
10421 * conf/i386-pc.rmk: Likewise.
10422
10423 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10424
10425 * kern/disk.c (grub_disk_read): Check return value of
10426 grub_realloc().
10427
10428 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10429
10430 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10431 arrays.
10432 * disk/raid.c (grub_raid_open): Likewise.
10433
10434 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10435
10436 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10437 stack instead of on the heap.
10438
10439 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10440 before doing a read on it.
10441
10442 * configure.ac: Only use -fno-stack-protector for the target
10443 environment.
10444
10445 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10446
10447 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10448 __attribute_ ((unused)) to mode_type argument.
10449
10450 * util/getroot.c (grub_guess_root_device): Fix #endif.
10451
10452 * kern/misc.c (memcmp): Fix prototype.
10453
10454 * include/grub/partition.h [GRUB_UTIL]
10455 (grub_gpt_partition_map_init): Add prototype.
10456 (grub_gpt_partition_map_fini): Likewise.
10457
10458 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10459 at the right place.
10460
10461 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10462 (grub_fat_read_data): Likewise.
10463 (grub_fat_find_dir): Likewise.
10464
10465 * font/manager.c (find_glyph): Make table a const.
10466 (grub_font_get_glyph): Remove bitmap from if statement.
10467
10468 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10469
10470 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10471 code, first search for device in /dev/mapper, then in /dev.
10472 (grub_util_get_grub_dev): New function.
10473 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10474 prototype.
10475 * util/grub-probe.c (probe): Remove check for RAID, call
10476 grub_util_get_grub_dev() instead of
10477 grub_util_biosdisk_get_grub_dev().
10478 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10479 grub_util_biosdisk_get_grub_dev().
10480 * util/i386/pc/grub-setup.c (main): Likewise.
10481
10482 2007-05-16 Robert Millan <rmh@aybabtu.com>
10483
10484 * DISTLIST: Update for the latest changes.
10485 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10486 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10487 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10488 grub/util/biosdisk.h.
10489 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10490 grub/util/biosdisk.h.
10491
10492 2007-05-16 Robert Millan <rmh@aybabtu.com>
10493
10494 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10495
10496 2007-05-16 Robert Millan <rmh@aybabtu.com>
10497
10498 * util/i386/efi/grub-install.in: New.
10499 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10500 newly added grub-install.
10501 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10502 include.
10503 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10504 grub/util/biosdisk.h.
10505 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10506 grub/util/biosdisk.h.
10507
10508 2007-05-16 Robert Millan <rmh@aybabtu.com>
10509
10510 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10511 * include/grub/util/biosdisk.h: ... here.
10512 * util/i386/pc/biosdisk.c: Moved to ...
10513 * util/biosdisk.c: ... here.
10514 * util/i386/pc/getroot.c: Moved to ...
10515 * util/getroot.c: ... here.
10516 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10517 * util/grub-mkdevicemap.c: ... here.
10518 * util/i386/pc/grub-probe.c: Moved to ...
10519 * util/grub-probe.c: ... here.
10520
10521 2007-05-15 Robert Millan <rmh@aybabtu.com>
10522
10523 * util/update-grub.in: Remove duplicated line in grub.cfg header
10524 message.
10525
10526 2007-05-13 Robert Millan <rmh@aybabtu.com>
10527
10528 * util/update-grub.in: Fix a few assumptions about the devices holding
10529 /, /boot and /boot/grub being the same.
10530 * util/grub.d/00_header.in: Likewise.
10531 * util/grub.d/10_hurd.in: Likewise.
10532 * util/grub.d/10_linux.in: Likewise.
10533
10534 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10535 patterns. Use that to define the `.old' suffix as older than `'.
10536
10537 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10538
10539 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10540 the grub.cfg header message.
10541
10542 2007-05-11 Robert Millan <rmh@aybabtu.com>
10543
10544 * util/update-grub.in: Create device.map if it doesn't already exist,
10545 before attempting to run grub-probe.
10546 Check for grub-probe and grub-mkdevicemap with the same code
10547 grub-install is using.
10548 Remove test mode.
10549
10550 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10551
10552 * Makefile.in: Add the datarootdir autoconf variable.
10553
10554 2007-05-09 Robert Millan <rmh@aybabtu.com>
10555
10556 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10557 fail gracefully if dev->disk->partition == NULL.
10558
10559 2007-05-07 Robert Millan <rmh@aybabtu.com>
10560
10561 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10562 determine partition map module.
10563 * util/i386/pc/grub-install.in: Use this feature to decide which
10564 partition module to load, instead of hardcoding pc and gpt.
10565
10566 2007-05-07 Robert Millan <rmh@aybabtu.com>
10567
10568 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10569 source directory differs from build directory.
10570
10571 2007-05-05 Robert Millan <rmh@aybabtu.com>
10572
10573 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10574 initialisation.
10575
10576 2007-05-05 Robert Millan <rmh@aybabtu.com>
10577
10578 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10579
10580 2007-05-05 Robert Millan <rmh@aybabtu.com>
10581
10582 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10583 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10584
10585 2007-05-05 Robert Millan <rmh@aybabtu.com>
10586
10587 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10588 (grub_probe_SOURCES): Likewise.
10589 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10590 GPT and initialize dos_part and bsd_part accordingly.
10591 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10592 install_bsd_part.
10593 (main): Activate gpt module for use during partition identification,
10594 and deactivate it afterwards.
10595 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10596 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10597 partition identification, and deactivate it afterwards.
10598
10599 2007-05-05 Robert Millan <rmh@aybabtu.com>
10600
10601 * term/i386/pc/console.c (grub_console_fini): Call
10602 grub_term_set_current() before grub_term_unregister().
10603
10604 2007-05-04 Robert Millan <rmh@aybabtu.com>
10605
10606 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10607 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10608 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10609 and update-grub_DATA.
10610 * conf/common.rmk: Build and install update-grub components.
10611 * conf/common.mk: Regenerate.
10612 * util/update-grub.in: New. Core of update-grub.
10613 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10614 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10615 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10616 * util/grub.d/README: New. Document grub.d directory layout.
10617
10618 2007-05-01 Robert Millan <rmh@aybabtu.com>
10619
10620 * util/grub-emu.c: Move initialization functions
10621 grub_util_biosdisk_init() and grub_init_all() before
10622 grub_util_biosdisk_get_grub_dev(), which relies on them.
10623
10624 2007-04-19 Robert Millan <rmh@aybabtu.com>
10625
10626 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10627 it is used later.
10628
10629 2007-04-18 Jerone Young <jerone@gmail.com>
10630
10631 * kernel/elf.c: Add missing parenthesis for conditional statement
10632 stanza.
10633
10634 2007-04-10 Jerone Young <jerone@gmail.com>
10635
10636 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10637 continue on and look for device node with real device name.
10638
10639 2007-04-10 Jerone Young <jerone@gmail.com>
10640
10641 * configure.ac: Add argument for autoconf to use transformation
10642 ability.
10643 * Makefile.in: Add autoconf package transformation code.
10644 * util/i386/pc/grub-install.in: Likewise.
10645 * util/powerpc/ieee1275/grub-install.in: Likewise.
10646
10647 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10648
10649 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10650 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10651 (EXT2_REVISION): Likewise.
10652 (EXT2_INODE_SIZE): Likewise.
10653 (struct grub_ext2_block_group): Added a missing member
10654 "used_dirs".
10655 (grub_ext2_read_inode): Divide by the inode size in a superblock
10656 instead of 128 to obtain INODES_PER_BLOCK.
10657 Use the macro EXT2_INODE_SIZE instead of directly using
10658 SBLOCK->INODE_SIZE.
10659
10660 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10661
10662 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10663 superblock instead of the structure size to compute an
10664 offset. This fixes the problem that GRUB could not read a
10665 filesystem when inode size is different from 128-byte.
10666
10667 2007-03-05 Marco Gerards <marco@gnu.org>
10668
10669 * normal/main.c (read_config_file): When "menu" is not set, create
10670 an initial context.
10671
10672 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10673
10674 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10675 (HEAP_LIMIT): New macro.
10676 (grub_claim_heap): Claim memory up to `heaplimit'.
10677
10678 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10679
10680 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10681 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10682 (_start): Likewise.
10683 (grub_arch_modules_addr): Return address after `_end'.
10684 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10685 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10686 (add_segments): Calculate `_end' from phdr size and location.
10687 (ALIGN_UP): Moved to ...
10688 * include/grub/misc.h: here.
10689 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10690 New macro.
10691 (GRUB_IEEE1275_MODULE_BASE): Removed.
10692
10693 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10694
10695 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10696 loop boundary.
10697
10698 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10699
10700 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10701 All users updated.
10702 (grub_elf64_load_hook_t): Likewise.
10703 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10704 debug output.
10705
10706 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10707
10708 * kern/mm.c: Update copyright.
10709 (grub_mm_debug): Correct syntax error.
10710 (grub_mm_dump_free): New function.
10711 (grub_debug_free): Call `grub_free'.
10712 * include/grub/mm.h: Update copyright.
10713 (grub_mm_dump_free): Add declaration.
10714
10715 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10716
10717 * include/grub/ieee1275/ieee1275.h: Update copyright.
10718 * kern/powerpc/ieee1275/init.c: Likewise.
10719 * kern/powerpc/ieee1275/openfw.c: Likewise.
10720
10721 * loader/powerpc/ieee1275/linux.c: Likewise.
10722 * include/grub/elfload.h: Likewise.
10723 * kern/elf.c: Likewise.
10724 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10725 callers.
10726 (grub_elf64_load): Likewise.
10727 (grub_elf32_load_segment): Move to a nested function.
10728 (grub_elf64_load_segment): Likewise.
10729
10730 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10731
10732 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10733 prototype.
10734 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10735 (grub_heap_len): Likewise.
10736 (HEAP_SIZE): New macro.
10737 (grub_claim_heap): New function.
10738 (grub_machine_init): Don't claim heap directly. Call
10739 `grub_claim_heap'.
10740 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10741 (grub_available_iterate): New function.
10742
10743 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10744
10745 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10746 * configure.ac: Use it for testing the HOST and TARGET compilers.
10747
10748 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10749
10750 * Makefile.in (enable_grub_emu): New variable.
10751 * configure.ac (--enable-grub-emu): New option.
10752 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10753 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10754 * conf/i386-pc.rmk: Likewise.
10755 * conf/powerpc-ieee1275.rmk: Likewise.
10756 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10757
10758 2006-12-12 Marco Gerards <marco@gnu.org>
10759
10760 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10761
10762 * kern/env.c (grub_env_unset): Don't free the member `value' when
10763 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10764 pointer.
10765
10766 * normal/main.c (current_menu): Removed.
10767 (free_menu): Unset the `menu' environment variable.
10768 (grub_normal_menu_addentry): Make use of the environment variable
10769 `menu', instead of using the global `current_menu'. Allocate
10770 memory for the sourcecode of this entry.
10771 (read_config_file): New argument `nested', changed all callers.
10772 Only in the case of a new context, initialize a new menu. Set the
10773 `menu' environment variable.
10774 (grub_normal_execute): Don't set and unset the environment
10775 variable `menu' here anymore. Only free the menu when leaving the
10776 context.
10777
10778 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10779 leak.
10780
10781 2006-12-11 Marco Gerards <marco@gnu.org>
10782
10783 * normal/menu_entry.c (run): Fix off by one bug so the last line
10784 is executed. Move the loader check to outside the loop.
10785
10786 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10787
10788 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10789
10790 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10791
10792 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10793 the number of sectors. Reported by Andrey Shuvikov
10794 <mr_hyro@yahoo.com>.
10795
10796 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10797
10798 * kern/disk.c (grub_disk_read): When there is a read error, always
10799 try to read only the necessary data.
10800
10801 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10802 disk/raid.c.
10803 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10804 prototype.
10805 [GRUB_UTIL] (grub_raid_fini): Likewise.
10806 [GRUB_UTIL] (grub_lvm_init): Likewise.
10807 [GRUB_UTIL] (grub_lvm_fini): Likewise.
10808 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10809 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10810 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10811 and grub_raid_fini().
10812
10813 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10814
10815 * include/grub/types.h (__unused): Rename to UNUSED.
10816 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10817 (grub_elf64_size): Likewise.
10818
10819 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10820
10821 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10822 grub_error_push and grub_error_pop in the error-handling path.
10823 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10824 length.
10825
10826 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10827
10828 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10829 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10830 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10831 (kernel_elf_SOURCES): Likewise.
10832 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10833 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10834 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10835 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10836 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10837 (elf_mod_SOURCES): New variable.
10838 (elf_mod_CFLAGS): Likewise.
10839 (elf_mod_LDFLAGS): Likewise.
10840 * include/grub/types.h (__unused): New macro.
10841 * include/grub/elfload.h: New file.
10842 * kern/elf.c: Likewise.
10843 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10844 (ELF32_LOADMASK): New macro.
10845 (ELF64_LOADMASK): Likewise.
10846 (vmlinux): Removed.
10847 (grub_linux_load32): New function.
10848 (grub_linux_load64): Likewise.
10849 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10850 Use grub_elf_t instead of grub_file_t.
10851
10852 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10853
10854 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10855 `catch_result' to struct set_color_args.
10856
10857 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10858
10859 * normal/menu.c: Include grub/script.h.
10860 * normal/menu_entry.c: Likewise.
10861 * include/grub/normal.h: Do not include grub/script.h.
10862
10863 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10864
10865 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10866
10867 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10868
10869 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10870 disk.
10871 (grub_disk_close): Print debug messages when closing a disk.
10872 (grub_disk_read): Print debug messages when disk read fails.
10873 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10874 filesystem type.
10875 * kern/partition.c: Include misc.h.
10876 (grub_partition_iterate): Print debug messages when detecting
10877 partition type.
10878
10879 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10880
10881 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10882 is negative.
10883 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10884
10885 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10886
10887 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10888 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10889
10890 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10891
10892 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10893 instead of sizeof(lv). Patch by Michael Guntsche.
10894
10895 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10896
10897 * disk/lvm.c: Rename VGS to VG_LIST.
10898 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10899 (grub_lvm_open): Likewise.
10900 Thanks to Michael Guntsche for finding this bug.
10901
10902 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10903
10904 * configure.ac (AC_INIT): Bumped to 1.95.
10905
10906 2006-10-14 Robert Millan <rmh@aybabtu.com>
10907
10908 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10909 with "/dev/.static/dev/md".
10910
10911 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10912
10913 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10914 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10915 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10916 DRIVE_NAME are always freed.
10917
10918 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10919 DOS_PART, as a DOS partition is counted from one instead of zero
10920 now. Reported by Robert Millan.
10921
10922 2006-10-14 Robert Millan <rmh@aybabtu.com>
10923
10924 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10925 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10926 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10927 string returned by grub_guess_root_device.
10928 * util/i386/pc/grub-setup.c: Likewise.
10929 * util/i386/pc/grub-probefs.c: Likewise.
10930
10931 * util/i386/pc/grub-probefs.c: Rename to ...
10932 * util/i386/pc/grub-probe.c: ... this.
10933 * DISTLIST: Remove grub-probefs, add grub-probe.
10934 * conf/i386-efi.rmk: Likewise.
10935 * conf/i386-pc.rmk: Likewise.
10936 * util/i386/pc/grub-install.in: Likewise.
10937
10938 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10939 choose which information we want to print.
10940
10941 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10942
10943 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10944 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10945 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10946 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10947 video/readers/tga.c and video/i386/pc/vbeutil.c.
10948
10949 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10950
10951 Added support for RAID and LVM.
10952
10953 * disk/lvm.c: New file.
10954 * disk/raid.c: Likewise.
10955 * include/grub/lvm.h: Likewise.
10956 * include/grub/raid.h: Likewise.
10957 * include/grub/util/lvm.h: Likewise.
10958 * include/grub/util/raid.h: Likewise.
10959 * util/lvm.c: Likewise.
10960 * util/raid.c: Likewise.
10961
10962 * include/grub/disk.h (grub_disk_dev_id): Add
10963 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10964 (grub_disk_get_size): New prototype.
10965 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10966 returns a partition.
10967 (grub_disk_get_size): New function.
10968
10969 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10970 verbatim if grub_install_dos_part is -2.
10971
10972 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10973 and LVM devices.
10974
10975 * util/i386/pc/grub-setup.c (setup): New argument
10976 MUST_EMBED. Force embedding of GRUB when the argument is
10977 true. Close FILE before returning.
10978 (main): Add support for RAID and LVM.
10979
10980 * conf/common.rmk: Add RAID and LVM modules.
10981 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10982 util/lvm.c.
10983 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10984
10985 * kern/misc.c (grub_strstr): New function.
10986 * include/grub/misc.h (grub_strstr): New prototype.
10987
10988 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10989
10990 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10991
10992 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10993
10994 * kern/misc.c (grub_strtoull): Guess the base only if not
10995 specified.
10996
10997 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10998
10999 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11000 PowerMac support.
11001
11002 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11003
11004 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11005
11006 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11007 Remove `flags' argument. All callers changed.
11008 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11009 (IEEE1275_IHANDLE_INVALID): New variable.
11010 (IEEE1275_CELL_INVALID): New variable.
11011 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11012 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11013 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11014 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11015 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11016 codes from Open Firmware. All callers updated.
11017 (grub_ieee1275_next_property): Directly return Open Firmware return
11018 code.
11019 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11020 Standardize error checking from `grub_ieee1275_get_property'.
11021 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11022 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11023
11024 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11025
11026 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11027 `instance_to_package_args' to `instance_to_path_args'.
11028
11029 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11030 `grub_ieee1275_chosen'.
11031
11032 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11033 `grub_ieee1275_interpret'.
11034
11035 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11036
11037 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11038
11039 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11040
11041 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11042 (__cmpdi): Likewise.
11043
11044 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11045 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11046 `grub_ssize_t'.
11047
11048 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11049
11050 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11051 to type `grub_ssize_t'.
11052 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11053
11054 2006-09-22 Marco Gerards <marco@gnu.org>
11055
11056 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11057 newlines.
11058
11059 2006-09-22 Marco Gerards <marco@gnu.org>
11060
11061 * commands/echo.c: New file.
11062
11063 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11064
11065 * conf/common.rmk (echo_mod_SOURCES): New variable.
11066 (echo_mod_CFLAGS): Likewise.
11067 (echo_mod_LDFLAGS): Likewise.
11068
11069 2006-09-22 Marco Gerards <marco@gnu.org>
11070
11071 * normal/main.c (get_line): Malloc memory instead of using
11072 preallocated memory. Removed the arguments `cmdline' and
11073 `max_len'. Updated all callers.
11074
11075 2006-09-22 Marco Gerards <marco@gnu.org>
11076
11077 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11078 (normal_mod_DEPENDENCIES): Likewise.
11079
11080 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11081 (normal_mod_DEPENDENCIES): Likewise.
11082
11083 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11084
11085 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11086
11087 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11088 programs.
11089 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11090 (normal_mod_DEPENDENCIES): Likewise.
11091 * conf/i386-pc.mk: Regenerate.
11092 * conf/i386-efi.mk: Likewise
11093 * conf/common.mk: Likewise.
11094 * conf/powerpc-ieee1275.mk: Likewise.
11095 * conf/sparc64-ieee1275.mk: Likewise.
11096
11097 2006-09-22 Robert Millan <rmh@aybabtu.com>
11098
11099 Sync with i386 version.
11100 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11101 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11102
11103 2006-09-21 Robert Millan <rmh@aybabtu.com>
11104
11105 Import from GRUB Legacy (lib/device.c):
11106 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11107 (init_device_map) [__linux__]: Add support for I2O devices.
11108
11109 2006-09-14 Marco Gerards <marco@gnu.org>
11110
11111 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11112 `-melf_i386'.
11113
11114 2006-09-14 Robert Millan <rmh@aybabtu.com>
11115
11116 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11117 /boot/grub/*.lst.
11118
11119 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11120
11121 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11122 before adding it to device.map.
11123
11124 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11125
11126 * genmk.rb: Let GCC generate dependencies the first time it
11127 compiles a file; using the -MD option.
11128 * conf/common.mk: Regenerate.
11129 * conf/i386-pc.mk: Likewise.
11130 * conf/i386-efi.mk: Likewise.
11131 * conf/powerpc-ieee1275.mk: Likewise.
11132 * conf/sparc64-ieee1275.mk: Likewise.
11133
11134 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11135
11136 Move the prototypes of grub_setjmp and grub_longjmp to
11137 cpu/setjmp.h, so that each architecture may specify different
11138 attributes.
11139
11140 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11141 (grub_longjmp): Likewise.
11142 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11143 (grub_longjmp): Likewise.
11144 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11145 (grub_longjmp): Likewise.
11146
11147 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11148 [!GRUB_UTIL] (grub_longjmp): Removed.
11149
11150 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11151
11152 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11153 "color!" method does not return any value.
11154
11155 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11156
11157 * include/grub/bitmap.h: New file.
11158
11159 * include/grub/i386/pc/vbeutil.h: Likewise.
11160
11161 * video/bitmap.c: Likewise.
11162
11163 * video/readers/tga.c: Likewise.
11164
11165 * video/i386/pc/vbeutil.c: Likewise.
11166
11167 * commands/videotest.c: Code cleanup and updated to reflect to new
11168 video API.
11169
11170 * term/gfxterm.c: Likewise.
11171
11172 * video/video.c: Likewise.
11173
11174 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11175 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11176 (bitmap_mod_SOURCES): New entry.
11177 (bitmap_mod_CFLAGS): Likewise.
11178 (bitmap_mod_LDFLAGS): Likewise.
11179 (tga_mod_SOURCES): Likewise.
11180 (tga_mod_CFLAGS): Likewise.
11181 (tga_mod_LDFLAGS): Likewise.
11182
11183 * include/grub/video.h (grub_video_blit_operators): New enum type.
11184 (grub_video_render_target): Changed as forward declaration and moved
11185 actual definition to be video driver specific.
11186 (grub_video_adapter.blit_bitmap): Added blitting operator.
11187 (grub_video_adapter.blit_render_target): Likewise.
11188 (grub_video_blit_bitmap): Likewise.
11189 (grub_video_blit_render_target): Likewise.
11190
11191 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11192 driver specific render target definition.
11193 (grub_video_vbe_map_rgba): Added driver internal helper.
11194 (grub_video_vbe_unmap_color): Updated to use
11195 grub_video_i386_vbeblit_info.
11196 (grub_video_vbe_get_video_ptr): Likewise.
11197
11198 * include/grub/i386/pc/vbeblit.h
11199 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11200 grub_video_i386_vbeblit_info.
11201 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11202 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11203 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11204 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11205 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11206 (grub_video_i386_vbeblit_index_index): Likewise.
11207 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11208 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11209 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11210 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11211 operator.
11212 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11213 operator.
11214
11215 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11216 include/grub/i386/pc/vbeblit.h.
11217
11218 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11219 Updated to use grub_video_i386_vbeblit_info.
11220 (grub_video_i386_vbefill_R8G8B8): Likewise.
11221 (grub_video_i386_vbefill_index): Likewise.
11222 (grub_video_i386_vbefill): Added generic filler.
11223
11224 * video/i386/pc/vbefill.c: Updated to reflect changes on
11225 include/grub/i386/pc/vbefill.h.
11226
11227 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11228 grub_video_i386_vbeblit_info.
11229 (grub_video_vbe_unmap_color): Likewise.
11230 (grub_video_vbe_blit_glyph): Likewise.
11231 (grub_video_vbe_scroll): Likewise.
11232 (grub_video_vbe_draw_pixel): Removed function.
11233 (grub_video_vbe_get_pixel): Likewise.
11234 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11235 updated code to use it.
11236 (common_blitter): Added common blitter for render target and bitmap.
11237 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11238 (grub_video_vbe_blit_render_target): Likewise.
11239
11240 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
11241
11242 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11243 is in text mode if there is no console control protocol instance
11244 available.
11245
11246 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11247
11248 * include/grub/video.h: Code cleanup.
11249
11250 * include/grub/i386/pc/vbe.h: Likewise.
11251
11252 * video/i386/pc/vbe.c: Likewise.
11253
11254 * video/i386/pc/vbeblit.c: Likewise.
11255
11256 * video/i386/pc/vbefill.c: Likewise.
11257
11258 * video/video.c: Likewise. Also added more comments.
11259
11260 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11261
11262 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11263 (struct grub_biosdisk_dap): Likewise.
11264
11265 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11266 linkage settings for all functions.
11267
11268 2006-07-12 Marco Gerards <marco@gnu.org>
11269
11270 * configure.ac (--enable-mm-debug): Fix typo.
11271
11272 * genkernsyms.sh.in: Use proper quoting for `CC'.
11273
11274 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11275
11276 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11277 (normal_mod_ASFLAGS): Remove "-m32".
11278
11279 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11280
11281 * util/misc.c: Include config.h.
11282 [!HAVE_MEMALIGN]: Do not include malloc.h.
11283 (grub_memalign): Use posix_memalign, if present. Then, use
11284 memalign, if present. Otherwise, emit an error.
11285
11286 * util/grub-emu.c: Do not include malloc.h.
11287
11288 * include/grub/util/misc.h: Include unistd.h. This is required for
11289 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11290 D. Eades III <hde@foobar-qux.org>.
11291
11292 * configure.ac (AC_GNU_SOURCE): Added.
11293 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11294 type.
11295
11296 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11297
11298 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11299 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11300
11301 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11302
11303 * include/grub/types.h (grub_host_addr_t): Rename to
11304 grub_target_addr_t.
11305 (grub_host_off_t): Rename to grub_target_off_t.
11306 (grub_host_size_t): Rename to grub_target_size_t.
11307 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11308 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11309
11310 * include/grub/kernel.h (struct grub_module_header): Change type
11311 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11312 (grub_module_info): Likewise.
11313
11314 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11315
11316 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11317 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11318 Velazquez <jesus.velazquez@gmail.com>.
11319
11320 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11321
11322 Count partitions from 1 instead of 0 in the string representation
11323 of partitions. Still use 0-based internally.
11324
11325 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11326 (sun_partition_map_iterate): Use grub_partition_t instead of
11327 struct grub_partition *. Cast DESC->START_CYLINDER to
11328 grub_uint64_t after converting the endian.
11329 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11330 (sun_partition_map_get_name): Add 1 to P->INDEX.
11331
11332 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11333 PCDATA->DOS_PART.
11334 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11335
11336 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11337 zero instead of one.
11338 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11339 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11340
11341 * partmap/apple.c (apple_partition_map_iterate): Change the type
11342 of POS to unsigned.
11343 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11344 (apple_partition_map_get_name): Add 1 into P->INDEX.
11345
11346 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11347 of POS to unsigned.
11348 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11349 calculate the offset of a partition.
11350 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11351 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11352
11353 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11354 SECTOR to grub_disk_addr_t.
11355 (acorn_partition_map_iterate): Likewise.
11356 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11357 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11358 top.
11359 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11360
11361 * kern/i386/pc/init.c (make_install_device): Add 1 into
11362 GRUB_INSTALL_DOS_PART.
11363
11364 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11365 conditional.
11366
11367 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11368
11369 Clean up the code to support 64-bit addressing in disks and
11370 files. This change is not enough for filesystems yet.
11371
11372 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11373 type of "start" to grub_uint64_t.
11374 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11375 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11376 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11377 convert addresses.
11378
11379 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11380 to grub_disk_addr_t.
11381
11382 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11383 string.
11384
11385 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11386
11387 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11388 to char *.
11389
11390 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11391
11392 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11393
11394 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11395
11396 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11397 to grub_off_t, to detect an error from grub_file_seek.
11398 (grub_multiboot_load_elf32): Likewise.
11399
11400 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11401 maximum unsigned long value when an overflow is detected.
11402 (grub_strtoull): New function.
11403 (grub_divmod64): Likewise.
11404 (grub_lltoa): use grub_divmod64.
11405
11406 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11407 grub_disk_addr_t.
11408 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11409 the pointer to next character. Use grub_strtoull instead of
11410 grub_strtoul.
11411 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11412 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11413 respectively.
11414
11415 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11416 return value is signed.
11417 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11418 test if OFFSET is less than zero, as OFFSET is unsigned now.
11419
11420 * kern/disk.c (struct grub_disk_cache): Change the type of
11421 "sector" to grub_disk_addr_t.
11422 (grub_disk_cache_get_index): Change the type of SECTOR to
11423 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11424 unsigned after shifting.
11425 (grub_disk_cache_invalidate): Change the type of SECTOR to
11426 grub_disk_addr_t.
11427 (grub_disk_cache_unlock): Likewise.
11428 (grub_disk_cache_store): Likewise.
11429 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11430 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11431 grub_disk_addr_t and grub_uint64_t, respectively.
11432 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11433 body, as the value of OFFSET is tweaked by
11434 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11435 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11436 respectively.
11437 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11438 body, as the value of OFFSET is tweaked by
11439 grub_disk_check_range. Change the types of LEN and N to
11440 grub_size_t.
11441
11442 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11443 and "saved_offset" to grub_off_t.
11444 (test_header): Cast BUF to char *.
11445 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11446 to char *.
11447 (grub_gzio_read): Change the types of OFFSET and SIZE to
11448 grub_off_t and grub_size_t, respectively.
11449
11450 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11451 Removed.
11452 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11453 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11454 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11455 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11456 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11457
11458 * include/grub/types.h (grub_off_t): Unconditionally set to
11459 grub_uint64_t.
11460 (grub_disk_addr_t): Changed to grub_uint64_t.
11461
11462 * include/grub/partition.h (struct grub_partition): Change the
11463 types of "start", "len" and "offset" to grub_disk_addr_t,
11464 grub_uint64_t and grub_disk_addr_t, respectively.
11465 (grub_partition_get_start): Return grub_disk_addr_t.
11466 (grub_partition_get_len): Return grub_uint64_t.
11467
11468 * include/grub/misc.h (grub_strtoull): New prototype.
11469 (grub_divmod64): Likewise.
11470
11471 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11472 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11473 grub_off_t, respectively.
11474 All callers and references changed.
11475
11476 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11477 grub_size_t in "read".
11478 All callers and references changed.
11479
11480 * include/grub/file.h (struct grub_file): Change the types of
11481 "offset" and "size" to grub_off_t and grub_off_t,
11482 respectively. Change the type of SECTOR to grub_disk_addr_t in
11483 "read_hook".
11484 (grub_file_read): Change the type of LEN to grub_size_t.
11485 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11486 grub_off_t.
11487 (grub_file_size): Return grub_off_t.
11488 (grub_file_tell): Likewise.
11489 All callers and references changed.
11490
11491 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11492 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11493 "write".
11494 (struct grub_disk): Change the type of "total_sectors" to
11495 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11496 "read_hook".
11497 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11498 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11499 (grub_disk_write): Likewise.
11500 All callers and references changed.
11501
11502 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11503 char * for grub_strncmp to silence gcc.
11504 (grub_iso9660_mount): Likewise.
11505 (grub_iso9660_mount): Likewise.
11506 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11507 return statement.
11508 (grub_iso9660_iterate_dir): Likewise.
11509 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11510
11511 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11512 LEN to grub_disk_addr_t and grub_size_t, respectively.
11513
11514 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11515
11516 * fs/jfs.c (grub_jfs_read_file): Likewise.
11517
11518 * fs/minix.c (grub_jfs_read_file): Likewise.
11519
11520 * fs/sfs.c (grub_jfs_read_file): Likewise.
11521
11522 * fs/ufs.c (grub_jfs_read_file): Likewise.
11523
11524 * fs/xfs.c (grub_jfs_read_file): Likewise.
11525
11526 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11527 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11528 respectively.
11529
11530 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11531 BLKNR to -1 instead of returning GRUB_ERRNO.
11532 (grub_ext2_read_file): Change the types of SECTOR and
11533 LEN to grub_disk_addr_t and grub_size_t, respectively.
11534
11535 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11536 LEN to grub_disk_addr_t and grub_size_t, respectively.
11537
11538 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11539 grub_file_read.
11540
11541 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11542 string. Do not cast SECTOR explicitly.
11543
11544 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11545 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11546 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11547 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11548 over 2TB and LBA mode is not supported, raise an error.
11549 (get_safe_sectors): New function.
11550 (grub_biosdisk_read): Use get_safe_sectors.
11551 (grub_biosdisk_write): Likewise.
11552
11553 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11554 (grub_efidisk_write): Likewise.
11555
11556 * disk/loopback.c (delete_loopback): Cosmetic changes.
11557 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11558 correctly.
11559 (grub_loopback_open): Likewise.
11560 (grub_loopback_read): Likewise. Also, change the type of POS to
11561 grub_off_t, and fix the usage of grub_memset.
11562
11563 * commands/i386/pc/play.c: Include grub/machine/time.h.
11564
11565 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11566 print FILE->SIZE.
11567
11568 * commands/configfile.c: Include grub/env.h.
11569
11570 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11571 GRUB_ERRNO directly instead. Change the type of POS to
11572 grub_off_t. Follow the coding standard.
11573
11574 * commands/blocklist.c: Include grub/partition.h.
11575 (grub_cmd_blocklist): Return an error if the underlying device is
11576 not a disk. Take the starting sector of a partition into account,
11577 if a partition is used.
11578
11579 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11580 a length field.
11581 (lba_mode): Support 64-bit addresses.
11582 (chs_mode): Likewise.
11583 (copy_buffer): Adapted to the new offsets of a length field and a
11584 segment field.
11585 (blocklist_default_start): Allocate 64-bit space.
11586
11587 * boot/i386/pc/boot.S (force_lba): Removed.
11588 (boot_drive): Moved to under KERNEL_SECTOR.
11589 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11590 space.
11591 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11592 is useless.
11593 (lba_mode): Refactored to support a 64-bit address. More size
11594 optimization.
11595 (setup_sectors): Likewise.
11596
11597 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11598
11599 * DISTLIST: Added include/grub/i386/linux.h. Removed
11600 include/grub/i386/pc/linux.h
11601
11602 * configure.ac (AC_INIT): Bumped to 1.94.
11603
11604 * config.guess: Updated from gnulib.
11605 * config.sub: Likewise.
11606 * install-sh: Likewise.
11607 * mkinstalldirs: Likewise.
11608
11609 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11610
11611 * conf/common.rmk (grub_modules_init.lst): Depended on
11612 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11613 MODSRCFILES.
11614
11615 * genmk.rb (PModule::rule): Reverted the previous change.
11616
11617 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11618
11619 * conf/common.rmk (grub_modules_init.lst): Depends on
11620 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11621 that the target does not exist before producing.
11622 (grub_modules_init.h): Remove the target before generating.
11623 (grub_emu_init.c): Likewise.
11624
11625 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11626
11627 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11628
11629 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11630 for the target-specific tests. Make sure that we also have the
11631 up-to-date target variables for those tests.
11632
11633 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11634
11635 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11636 (PModule::rule): Likewise.
11637
11638 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11639
11640 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11641 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11642 target-specific flags should be prefixed.
11643 (PModule::rule): Likewise.
11644
11645 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11646
11647 * configure.ac (CMP): Check if cmp is available explicitly.
11648
11649 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11650
11651 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11652 (target_cpu): New variable.
11653 (pkglibdir): Use target_cpu instead of host_cpu.
11654
11655 * util/i386/pc/grub-install.in (host_cpu): Removed.
11656 (target_cpu): New variable.
11657 (pkglibdir): Use target_cpu instead of host_cpu.
11658
11659 * util/genmoddep.c: Removed.
11660
11661 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11662 instead of GRUB_HOST_SIZEOF_VOID_P.
11663 * kern/dl.c: Likewise.
11664
11665 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11666 ...
11667 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11668 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11669 (GRUB_TARGET_SIZEOF_LONG): ... this.
11670 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11671 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11672 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11673 to ...
11674 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11675 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11676 (GRUB_TARGET_SIZEOF_LONG): ... this.
11677 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11678 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11679 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11680 to ...
11681 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11682 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11683 (GRUB_TARGET_SIZEOF_LONG): ... this.
11684 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11685 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11686
11687 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11688 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11689 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11690 instead of GRUB_HOST_SIZEOF_LONG.
11691 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11692 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11693 GRUB_CPU_WORDS_BIGENDIAN.
11694 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11695 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11696 grub_host_ssize_t.
11697
11698 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11699 (genmoddep_SOURCES): Likewise.
11700 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11701 (genmoddep_SOURCES): Likewise.
11702 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11703 (genmoddep_SOURCES): Likewise.
11704 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11705 Likewise.
11706 (genmoddep_SOURCES): Likewise.
11707
11708 * genmoddep.awk: New file.
11709
11710 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11711 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11712 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11713 (PModule::rule): Likewise.
11714 (Program::rule): Likewise.
11715 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11716 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11717 respectively.
11718
11719 * configure.ac: Rewritten intensively to use host and target
11720 instead of build and host, respectively.
11721
11722 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11723 (host_cpu): Removed.
11724 (target_cpu): New variable.
11725 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11726 (BUILD_CC): Removed.
11727 (BUILD_CFLAGS): Likewise.
11728 (BUILD_CPPFLAGS): Likewise.
11729 (TARGET_CC): New variable.
11730 (TARGET_CFLAGS): Likewise.
11731 (TARGET_CPPFLAGS): Likewise.
11732 (TARGET_LDFLAGS): Likewise.
11733 (AWK): Likewise.
11734 (include): Use target_cpu instead of host_cpu.
11735 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11736
11737 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11738
11739 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11740
11741 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11742 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11743 field 'false' to 'exec_on_false'.
11744 (grub_script_create_cmdif): Renamed argument names to reflect above
11745 changes.
11746
11747 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11748
11749 * normal/script.c (grub_script_create_cmdif): Likewise.
11750
11751 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11752
11753 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11754 top.
11755 (grub_hfsplus_btree_recptr): Likewise.
11756 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11757 FILEBLOCK both to pass a block number and store next block
11758 number.
11759 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11760 overflow file correctly. Specify errors appropriately, because
11761 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11762 grub_hfsplus_btree_recptr to get the pointer to a found key.
11763 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11764 is found.
11765
11766 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11767 linux.mod.
11768 (_linux_mod_SOURCES): New variable.
11769 (_linux_mod_CFLAGS): Likewise.
11770 (_linux_mod_LDFLAGS): Likewise.
11771 (linux_mod_SOURCES): Likewise.
11772 (linux_mod_CFLAGS): Likewise.
11773 (linux_mod_LDFLAGS): Likewise.
11774
11775 * DISTLIST: Added loader/i386/efi/linux.c,
11776 loader/i386/efi/linux_normal.c and
11777 include/grub/i386/efi/loader.h.
11778
11779 * loader/i386/efi/linux.c: New file.
11780 * loader/i386/efi/linux_normal.c: Likewise.
11781 * include/grub/i386/efi/loader.h: Likewise.
11782
11783 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11784
11785 * commands/blocklist.c: New file.
11786
11787 * DISTLIST: Added commands/blocklist.c.
11788
11789 * term/efi/console.c (grub_console_highlight_color): Use a lighter
11790 color for the background, and a darker color for the foreground.
11791 (grub_console_checkkey): Return READ_KEY.
11792 (grub_console_cls): Set the background to
11793 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11794
11795 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11796
11797 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11798 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11799
11800 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11801 prototype.
11802
11803 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11804 BG. The spec is wrong again.
11805
11806 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11807 prototype.
11808 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11809
11810 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11811 commands/blocklist.c.
11812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11813
11814 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11815 (blocklist_mod_SOURCES): New variable.
11816 (blocklist_mod_CFLAGS): Likewise.
11817 (blocklist_mod_LDFLAGS): Likewise.
11818
11819 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11820
11821 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11822 duplication.
11823 (lba_mode): Use %eax more intensively to reduce the code size.
11824
11825 2006-05-20 Marco Gerards <marco@gnu.org>
11826
11827 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11828
11829 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11830 for `menuentry'.
11831 (script): Accept leading newlines.
11832 (newlines): New rule to describe 0 or more newlines.
11833 (commands): Accept `command' with trailing newline. Fixed the
11834 order in which arguments were passed to `grub_script_add_cmd'.
11835 Accept commands separated by newlines.
11836 (function): Changed to accept newlines.
11837 (menuentry) Rewritten.
11838
11839 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11840 front of the list, instead of to the end.
11841
11842 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11843
11844 * util/i386/pc/grub-install.in (bindir): New variable.
11845 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11846 Shaver <lbgwjl@gmail.com>.
11847
11848 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11849
11850 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11851 grub/machine/linux.h
11852 * loader/i386/pc/linux.c: Likewise.
11853
11854 * include/grub/i386/pc/linux.h: Moved to ...
11855 * include/grub/i386/linux.h: ... here.
11856
11857 * include/grub/i386/linux.h (struct linux_kernel_params): New
11858 struct.
11859
11860 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11861
11862 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11863 checking.
11864 (grub_video_vbe_blit_glyph): Likewise.
11865 (grub_video_vbe_blit_bitmap): Likewise.
11866 (grub_video_vbe_blit_render_target): Likewise.
11867
11868 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11869
11870 * configure.ac (--with-platform): Properly quote the square
11871 brackets.
11872
11873 2006-05-08 Marco Gerards <marco@gnu.org>
11874
11875 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11876 this...
11877 (kernel_elf_HEADERS): ...to this. Updated all users.
11878 (grubof_symlist.c): Renamed from this...
11879 (kernel_elf_symlist.c): ...to this. Updated all users.
11880 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11881 (grubof_SOURCES): Renamed from this...
11882 (kernel_elf_SOURCES): ...to this.
11883 (grubof_HEADERS): Renamed from this...
11884 (kernel_elf_HEADERS): ...to this.
11885 (grubof_CFLAGS): Renamed from this...
11886 (kernel_elf_CFLAGS): ...to this.
11887 (grubof_ASFLAGS): Renamed from this...
11888 (kernel_elf_ASFLAGS): ...to this.
11889 (grubof_LDFLAGS): Renamed from this...
11890 (kernel_elf_LDFLAGS): ...to this.
11891
11892 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11893 this...
11894 (kernel_elf_HEADERS): ...to this. Updated all users.
11895 (grubof_symlist.c): Renamed from this...
11896 (kernel_elf_symlist.c): ...to this. Updated all users.
11897 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11898 (grubof_SOURCES): Renamed from this...
11899 (kernel_elf_SOURCES): ...to this.
11900 (grubof_HEADERS): Renamed from this...
11901 (kernel_elf_HEADERS): ...to this.
11902 (grubof_CFLAGS): Renamed from this...
11903 (kernel_elf_CFLAGS): ...to this.
11904 (grubof_ASFLAGS): Renamed from this...
11905 (kernel_elf_ASFLAGS): ...to this.
11906 (grubof_LDFLAGS): Renamed from this...
11907 (kernel_elf_LDFLAGS): ...to this.
11908
11909 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11910 `kernel.elf' instead of `grubof'.
11911
11912 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11913
11914 Add --with-platform to configure. Use pkglibdir instead of
11915 pkgdatadir. This is reported by Roger Leigh.
11916
11917 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11918 (host_vendor): Likewise.
11919 (host_os): Likewise.
11920 (pkgdatadir): Likewise.
11921 (platform): New variable.
11922 (pkglibdir): Likewise.
11923 Use PKGLIBDIR instead of PKGDATADIR.
11924
11925 * util/i386/pc/grub-install.in (datadir): Removed.
11926 (host_vendor): Likewise.
11927 (host_os): Likewise.
11928 (pkgdatadir): Likewise.
11929 (platform): New variable.
11930 (pkglibdir): Likewise.
11931 Use PKGLIBDIR instead of PKGDATADIR.
11932
11933 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11934 instead of GRUB_DATADIR.
11935 (main): Likewise.
11936 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11937 (main): Likewise.
11938 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11939 (main): Likewise.
11940
11941 * configure.ac (--with-platform): New option.
11942 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11943
11944 * Makefile.in: Include a makefile based on PLATFORM instead of
11945 HOST_VENDOR.
11946 (pkgdatadir): Not appended by the machine type.
11947 (pkglibdir): Appended by the machine type.
11948 (host_vendor): Removed.
11949 (platform): New variable.
11950 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11951 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11952 (uninstall): Likewise.
11953
11954 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11955
11956 Use the environment context in the menu. Remove the commands
11957 "default" and "timeout", and use variables instead.
11958
11959 * normal/menu.c: Include grub/env.h.
11960 (print_entry): Cast TITLE to silence gcc.
11961 (get_timeout): New function.
11962 (set_timeout): Likewise.
11963 (get_entry_number): Likewise.
11964 (run_menu): Use a default entry, a fallback entry and a timeout
11965 in the environment variables "default", "fallback" and
11966 "timeout". Also, tweak the default entry if it is not within the
11967 current menu entries.
11968 (grub_menu_run): Use a fallback entry in the environment variable
11969 "fallback".
11970
11971 * normal/main.c (read_config_file): Do not initialize
11972 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11973 NEWMENU->TIMEOUT.
11974 (grub_normal_execute): Use a data slot to store the menu.
11975
11976 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11977 fallback_entry and timeout.
11978 (struct grub_menu_list): Removed.
11979 (grub_menu_list_t): Likewise.
11980 (struct grub_context): Likewise.
11981 (grub_context_t): Likewise.
11982 (grub_context_get): Likewise.
11983 (grub_context_get_current_menu): Likewise.
11984 (grub_context_push_menu): Likewise.
11985 (grub_context_pop_menu): Likewise.
11986 (grub_default_init): Likewise.
11987 (grub_default_fini): Likewise.
11988 (grub_timeout_init): Likewise.
11989 (grub_timeout_fini): Likewise.
11990
11991 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11992 and timeout.mod.
11993 (normal_mod_SOURCES): Removed normal/context.c.
11994
11995 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11996 commands/default.c, commands/timeout.c and normal/context.c.
11997 (normal_mod_SOURCES): Removed normal/context.c.
11998
11999 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12000 commands/timeout.c and normal/context.c.
12001 (normal_mod_SOURCES): Removed normal/context.c.
12002
12003 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12004 commands/default.c, commands/timeout.c and normal/context.c.
12005 (normal_mod_SOURCES): Removed normal/context.c.
12006
12007 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12008 timeout.mod.
12009 (default_mod_SOURCES): Removed.
12010 (default_mod_CFLAGS): Likewise.
12011 (default_mod_LDFLAGS): Likewise.
12012 (timeout_mod_SOURCES): Removed.
12013 (timeout_mod_CFLAGS): Likewise.
12014 (timeout_mod_LDFLAGS): Likewise.
12015
12016 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12017 normal/context.c.
12018
12019 * commands/default.c: Removed.
12020 * commands/timeout.c: Likewise.
12021 * normal/context.c: Likewise.
12022
12023 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12024
12025 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12026
12027 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12028
12029 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12030 "next" to "prev" for readability.
12031 (struct grub_env_sorted_var): New struct.
12032 (grub_env_context): Renamed to ...
12033 (initial_context): ... this.
12034 (grub_env_var_context): Renamed to ...
12035 (current_context): ... this.
12036 (grub_env_find): Look only at CURRENT_CONTEXT.
12037 (grub_env_context_open): Rewritten to copy exported variables from
12038 previous context.
12039 (grub_env_context_close): Rewritten according to the new
12040 scheme. Also, add an assertion to prevent the initial context from
12041 removed.
12042 (grub_env_insert): Removed the code for the sorted list.
12043 (grub_env_remove): Likewise.
12044 (grub_env_export): Simply mark the variable with
12045 GRUB_ENV_VAR_GLOBAL.
12046 (grub_env_set): A cosmetic change for naming consistency.
12047 (grub_env_get): Likewise.
12048 (grub_env_unset): Likewise.
12049 (grub_env_iterate): Rewritten to sort variables within this
12050 function.
12051 (grub_register_variable_hook): Fixed for naming consistency. Call
12052 grub_env_find again, only if NAME is not found at the first time.
12053 (mangle_data_slot_name): New function.
12054 (grub_env_set_data_slot): Likewise.
12055 (grub_env_get_data_slot): Likewise.
12056 (grub_env_unset_data_slot): Likewise.
12057
12058 * include/grub/env.h (grub_env_var_type): New enum.
12059 (GRUB_ENV_VAR_LOCAL): New constant.
12060 (GRUB_ENV_VAR_GLOBAL): Likewise.
12061 (GRUB_ENV_VAR_DATA): Likewise.
12062 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12063 "type".
12064 (grub_env_set): Replace VAR with NAME for consistency.
12065 (grub_register_variable_hook): Likewise.
12066 (grub_env_export): Specify the name of the argument.
12067 (grub_env_set_data_slot): New prototype.
12068 (grub_env_get_data_slot): Likewise.
12069 (grub_env_unset_data_slot): Likewise.
12070
12071 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12072
12073 Extend the loader so that GRUB can accept a loader which comes
12074 back to GRUB when a loaded image exits. Also, this change adds
12075 support for a chainloader on EFI.
12076
12077 * term/efi/console.c: Include grub/misc.h.
12078 (grub_console_checkkey): Display a scan code on the top for
12079 debugging. This will be removed once the EFI port gets stable.
12080 Correct the scan code mapping.
12081
12082 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12083 allocate memory from larger regions, in order to reduce the number
12084 of allocated regions. Otherwise, the MacOSX loader panics.
12085 (filter_memory_map): Avoid less than 1MB for compatibility with
12086 other loaders.
12087 (add_memory_regions): Allocate from the tail of a region, if
12088 possible, to avoid allocating a region near to 1MB, for the MacOSX
12089 loader.
12090
12091 * kern/efi/init.c (grub_efi_set_prefix): Specify
12092 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12093
12094 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12095 argument IMAGE_HANDLE and specify it to get a loaded image.
12096 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12097 grub_efi_get_loaded_image.
12098 (grub_efi_get_filename): Divide the length by the size of
12099 grub_efi_char16_t.
12100 (grub_efi_get_device_path): New function.
12101 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12102 the length by the size of grub_efi_char16_t for a file path device
12103 path node.
12104
12105 * kern/loader.c (grub_loader_noreturn): New variable.
12106 (grub_loader_set): Accept a new argument NORETURN. Set
12107 GRUB_LOADER_NORETURN to NORETURN.
12108 All callers changed.
12109 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12110 grub_machine_fini.
12111
12112 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12113 prototype.
12114 (grub_efi_get_loaded_image): Take an argument to specify an image
12115 handle.
12116
12117 * include/grub/loader.h (grub_loader_set): Added one more argument
12118 NORETURN.
12119
12120 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12121 instead of grub_efi_open_protocol.
12122 (grub_efidisk_get_device_name): Likewise.
12123 (grub_efidisk_close): Print a newline.
12124 (grub_efidisk_get_device_handle): Fixed to use
12125 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12126 GRUB_EFI_DEVICE_PATH_TYPE.
12127
12128 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12129 * kern/efi/efi.c (device_path_guid): ... here.
12130
12131 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12132 chain.mod.
12133 (kernel_mod_HEADERS): Added efi/disk.h.
12134 (_chain_mod_SOURCES): New variable.
12135 (_chain_mod_CFLAGS): Likewise.
12136 (_chain_mod_LDFLAGS): Likewise.
12137 (chain_mod_SOURCES): Likewise.
12138 (chain_mod_CFLAGS): Likewise.
12139 (chain_mod_LDFLAGS): Likewise.
12140
12141 * DISTLIST: Added include/grub/efi/chainloader.h,
12142 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12143
12144 * include/grub/efi/chainloader.h: New file.
12145 * loader/efi/chainloader.c: Likewise.
12146 * loader/efi/chainloader_normal.c: Likewise.
12147
12148 2006-04-30 Marco Gerards <marco@gnu.org>
12149
12150 * commands/configfile.c (grub_cmd_source): New function.
12151 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12152 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12153
12154 2006-04-30 Marco Gerards <marco@gnu.org>
12155
12156 * normal/execute.c (grub_script_execute_cmd): Change the return
12157 type to `grub_err_t'. Correctly return the error.
12158 (grub_script_execute_cmdline): In case a command line is not a
12159 command or a function, try to interpret it as an assignment.
12160
12161 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12162
12163 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12164 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12165 skip a node whose name is obviously invalid as UTF-16,
12166 i.e. contains a NUL character. Stop the iteration when the last
12167 directory entry is found. Instead of using the return value of
12168 grub_hfsplus_btree_iterate_node, store the value in RET and use
12169 it, because the iterator can be stopped by the last directory
12170 entry.
12171
12172 2006-04-30 Marco Gerards <marco@gnu.org>
12173
12174 * include/grub/env.h (grub_env_export): New prototype. Reported
12175 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12176
12177 2006-04-30 Marco Gerards <marco@gnu.org>
12178
12179 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12180 size of the extents in a catalog file record.
12181
12182 2006-04-29 Marco Gerards <marco@gnu.org>
12183
12184 * commands/configfile.c (grub_cmd_configfile): Execute the
12185 configfile within its own context.
12186
12187 * include/grub/env.h (grub_env_context_open): New prototype.
12188 (grub_env_context_close): Likewise.
12189
12190 * kern/env.c (grub_env): Removed.
12191 (grub_env_sorted): Likewise.
12192 (grub_env_context): New variable.
12193 (grub_env_var_context): Likewise.
12194 (grub_env_find): Search both the active context and the global
12195 context.
12196 (grub_env_context_open): New function.
12197 (grub_env_context_close): Likewise.
12198 (grub_env_insert): Likewise.
12199 (grub_env_remove): Likewise.
12200 (grub_env_export): Likewise.
12201 (grub_env_set): Changed to use helper functions to avoid code
12202 duplication.
12203 (grub_env_iterate): Rewritten so both the current context and the
12204 global context are being used.
12205
12206 * normal/command.c (export_command): New function.
12207 (grub_command_init): Register the `export' function.
12208
12209 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12210
12211 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12212 explicitly to suppress gcc's warnings.
12213 * fs/fat.c (grub_fat_find_dir): Likewise.
12214 (grub_fat_label): Likewise.
12215 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12216 (grub_xfs_mount): Likewise.
12217 (grub_xfs_label): Likewise.
12218 * fs/affs.c (grub_affs_mount): Likewise.
12219 (grub_affs_label): Likewise.
12220 (grub_affs_iterate_dir): Likewise.
12221 * fs/sfs.c (grub_sfs_mount): Likewise.
12222 (grub_sfs_iterate_dir): Likewise.
12223 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12224 * fs/hfs.c (grub_hfs_mount): Likewise.
12225 (grub_hfs_cmp_catkeys): Likewise.
12226 (grub_hfs_find_dir): Likewise.
12227 (grub_hfs_dir): Likewise.
12228 (grub_hfs_label): Likewise.
12229 * fs/jfs.c (grub_jfs_mount): Likewise.
12230 (grub_jfs_opendir): Likewise.
12231 (grub_jfs_getent): Likewise.
12232 (grub_jfs_lookup_symlink): Likewise.
12233 (grub_jfs_label): Likewise.
12234 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12235 (grub_hfsplus_iterate_dir): Likewise.
12236 (grub_hfsplus_btree_iterate_node): Made static.
12237
12238 * util/grub-emu.c (prefix): New variable.
12239 (grub_machine_set_prefix): New function.
12240 (main): Do not set the environment variable "prefix" here. Only
12241 set PREFIX, which is used later by grub_machine_set_prefix.
12242
12243 * include/grub/video.h: Do not include grub/symbol.h.
12244 (grub_video_register): Not exported. This symbol is not defined in
12245 the kernel.
12246 (grub_video_unregister): Likewise.
12247 (grub_video_iterate): Likewise.
12248 (grub_video_setup): Likewise.
12249 (grub_video_restore): Likewise.
12250 (grub_video_get_info): Likewise.
12251 (grub_video_get_blit_format): Likewise.
12252 (grub_video_set_palette): Likewise.
12253 (grub_video_get_palette): Likewise.
12254 (grub_video_set_viewport): Likewise.
12255 (grub_video_get_viewport): Likewise.
12256 (grub_video_map_color): Likewise.
12257 (grub_video_map_rgb): Likewise.
12258 (grub_video_map_rgba): Likewise.
12259 (grub_video_fill_rect): Likewise.
12260 (grub_video_blit_glyph): Likewise.
12261 (grub_video_blit_bitmap): Likewise.
12262 (grub_video_blit_render_target): Likewise.
12263 (grub_video_scroll): Likewise.
12264 (grub_video_swap_buffers): Likewise.
12265 (grub_video_create_render_target): Likewise.
12266 (grub_video_delete_render_target): Likewise.
12267 (grub_video_set_active_render_target): Likewise.
12268
12269 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12270 Undefined.
12271 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12272
12273 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12274 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12275 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12276 instead of $(srcdir)/genkernsyms.sh.
12277
12278 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12279 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12280 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12281 instead of $(srcdir)/genkernsyms.sh.
12282
12283 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12284 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12285 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12286 instead of $(srcdir)/genkernsyms.sh.
12287
12288 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12289 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12290 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12291 instead of $(srcdir)/genkernsyms.sh.
12292
12293 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12294 genkernsyms.sh.
12295
12296 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12297 genkernsyms.sh.
12298 (gensymlist.sh): New target.
12299 (genkernsyms.sh): Likewise.
12300
12301 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12302 genkernsyms.sh.in and gensymlist.sh.in.
12303
12304 * genkernsyms.sh: Removed.
12305 * gensymlist.sh: Likewise.
12306
12307 * genkernsyms.sh.in: New file.
12308 * gensymlist.sh.in: Likewise.
12309
12310 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12311
12312 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12313 clobber "prefix", since we may have already set it manually.
12314
12315 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12316
12317 * kern/misc.c (abort): New alias for grub_abort.
12318
12319 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12320
12321 A new machine-specific function "grub_machine_set_prefix" is
12322 defined. This is called after loading modules, so that a prefix
12323 initialization can use modules. Also, this change adds an
12324 intensive debugging feature for the memory manager via the
12325 configure option "--enable-mm-debug".
12326
12327 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12328 PART.LEN.
12329
12330 * kern/sparc64/ieee1275/init.c (abort): Removed.
12331 (grub_stop): Likewise.
12332 (grub_exit): New function.
12333 (grub_set_prefix): Renamed to ...
12334 (grub_machine_set_prefix): ... this.
12335 (grub_machine_init): Do not call grub_set_prefix.
12336
12337 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12338 (grub_machine_set_prefix): ... this.
12339 (grub_machine_init): Do not call grub_set_prefix.
12340
12341 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12342 (grub_machine_init): Do not set the prefix here.
12343
12344 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12345
12346 * kern/efi/init.c: Include grub/mm.h.
12347 (grub_efi_set_prefix): New function.
12348
12349 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12350 (grub_efi_get_filename): New function.
12351 (grub_print_device_path): Renamed to ...
12352 (grub_efi_print_device_path): ... this.
12353
12354 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12355 [MM_DEBUG] (grub_realloc): Likewise.
12356 [MM_DEBUG] (grub_free): Likewise.
12357 [MM_DEBUG] (grub_memalign): Likewise.
12358 [MM_DEBUG] (grub_mm_debug): New variable.
12359 [MM_DEBUG] (grub_debug_malloc): New function.
12360 [MM_DEBUG] (grub_debug_free): New function.
12361 [MM_DEBUG] (grub_debug_realloc): New function.
12362 [MM_DEBUG] (grub_debug_memalign): New function.
12363
12364 * kern/misc.c (grub_abort): Print a newline to distinguish
12365 the message.
12366
12367 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12368 grub_set_root_dev after loading modules. This is necessary when
12369 setting a prefix depends on modules.
12370
12371 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12372 (grub_efi_print_device_path): ... this.
12373 (grub_efi_get_filename): New prototype.
12374 (grub_efi_set_prefix): Likewise.
12375
12376 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12377 and grub/disk.h.
12378 (grub_efidisk_get_device_handle): New prototype.
12379 (grub_efidisk_get_device_name): Likewise.
12380
12381 * include/grub/mm.h: Include config.h.
12382 (MM_DEBUG): Removed.
12383 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12384 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12385 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12386 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12387 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12388 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12389 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12390 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12391 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12392
12393 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12394
12395 * disk/efi/efidisk.c: Include grub/partition.h.
12396 (iterate_child_devices): New function.
12397 (add_device): First, compare only last device path nodes, so that
12398 devices are sorted by the types.
12399 (grub_efidisk_get_device_handle): New function.
12400 (grub_efidisk_get_device_name): Likewise.
12401
12402 * configure.ac (--enable-mm-debug): New option to enable the
12403 memory manager debugging feature. This makes the binary much
12404 bigger, so is disabled by default.
12405
12406 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12407
12408 Use grub_abort instead of grub_stop, and grub_exit must be
12409 define in each architecture now. Also, this change adds support
12410 for EFI disks.
12411
12412 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12413 (grub_getkey): New function.
12414 (grub_term_get_current): Likewise.
12415
12416 * util/i386/pc/grub-setup.c: Include grub/term.h.
12417 (grub_getkey): New function.
12418 (grub_term_get_current): Likewise.
12419
12420 * util/misc.c (grub_stop): Renamed to ...
12421 (grub_exit): ... this.
12422
12423 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12424 (grub_exit): ... this.
12425 (grub_machine_init): Use grub_abort instead of abort.
12426 (grub_stop): Removed.
12427
12428 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12429 abort.
12430
12431 * kern/i386/pc/startup.S (grub_exit): New function.
12432 (cold_reboot): New label.
12433
12434 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12435 (grub_efi_init): Call grub_efidisk_init.
12436 (grub_efi_fini): Call grub_efidisk_fini.
12437
12438 * kern/efi/efi.c: Include grub/mm.h.
12439 (grub_efi_console_control_guid): Renamed to ...
12440 (console_control_guid): ... this.
12441 (grub_efi_loaded_image_guid): Renamed to ...
12442 (loaded_image_guid): ... this.
12443 (grub_efi_locate_handle): New function.
12444 (grub_efi_open_protocol): Likewise.
12445 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12446 GRUB_EFI_CONSOLE_CONTROL_GUID.
12447 (grub_efi_exit): Removed.
12448 (grub_stop): Likewise.
12449 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12450 (grub_exit): New function.
12451 (grub_print_device_path): Likewise.
12452
12453 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12454 (grub_enter_rescue_mode): Register "exit".
12455
12456 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12457 (grub_abort): New function.
12458
12459 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12460
12461 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12462
12463 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12464
12465 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12466 (grub_print_device_path): New prototype.
12467 (grub_efi_locate_handle): Likewise.
12468 (grub_efi_open_protocol): Likewise.
12469
12470 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12471 * disk/efi/efidisk.c: Likewise.
12472
12473 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12474
12475 * include/grub/efi/console_control.h
12476 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12477
12478 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12479 last 8 bytes as an array.
12480 (GRUB_EFI_DISK_IO_GUID): New macro.
12481 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12482 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12483 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12484 grub_uint8_t.
12485 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12486 (struct grub_efi_device_path): Rename the member "sub_type" to
12487 "subtype".
12488 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12489 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12490 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12491 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12492 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12493 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12494 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12495 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12496 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12497 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12498 (struct grub_efi_pci_device_path): New structure.
12499 (grub_efi_pci_device_path_t): New type.
12500 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12501 (struct grub_efi_pccard_device_path): New structure.
12502 (grub_efi_pccard_device_path_t): New type.
12503 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12504 (struct grub_efi_memory_mapped_device_path): New structure.
12505 (grub_efi_memory_mapped_device_path_t): New type.
12506 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12507 (struct grub_efi_vendor_device_path): New structure.
12508 (grub_efi_vendor_device_path_t): New type.
12509 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12510 (struct grub_efi_controller_device_path): New structure.
12511 (grub_efi_controller_device_path_t): New type.
12512 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12513 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12514 (struct grub_efi_acpi_device_path): New structure.
12515 (grub_efi_acpi_device_path_t): New type.
12516 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12517 (struct grub_efi_expanded_acpi_device_path): New structure.
12518 (grub_efi_expanded_acpi_device_path_t): New type.
12519 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12520 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12521 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12522 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12523 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12524 (struct grub_efi_atapi_device_path): New structure.
12525 (grub_efi_atapi_device_path_t): New type.
12526 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12527 (struct grub_efi_fibre_channel_device_path): New structure.
12528 (grub_efi_fibre_channel_device_path_t): New type.
12529 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12530 (struct grub_efi_1394_device_path): New structure.
12531 (grub_efi_1394_device_path_t): New type.
12532 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12533 (struct grub_efi_usb_device_path): New structure.
12534 (grub_efi_usb_device_path_t): New type.
12535 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12536 (struct grub_efi_usb_class_device_path): New structure.
12537 (grub_efi_usb_class_device_path_t): New type.
12538 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12539 (struct grub_efi_i2o_device_path): New structure.
12540 (grub_efi_i2o_device_path_t): New type.
12541 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12542 (struct grub_efi_mac_address_device_path): New structure.
12543 (grub_efi_mac_address_device_path_t): New type.
12544 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12545 (struct grub_efi_ipv4_device_path): New structure.
12546 (grub_efi_ipv4_device_path_t): New type.
12547 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12548 (struct grub_efi_ipv6_device_path): New structure.
12549 (grub_efi_ipv6_device_path_t): New type.
12550 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12551 (struct grub_efi_infiniband_device_path): New structure.
12552 (grub_efi_infiniband_device_path_t): New type.
12553 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12554 (struct grub_efi_uart_device_path): New structure.
12555 (grub_efi_uart_device_path_t): New type.
12556 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12557 (struct grub_efi_vendor_messaging_device_path): New structure.
12558 (grub_efi_vendor_messaging_device_path_t): New type.
12559 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12560 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12561 (struct grub_efi_hard_drive_device_path): New structure.
12562 (grub_efi_hard_drive_device_path_t): New type.
12563 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12564 (struct grub_efi_cdrom_device_path): New structure.
12565 (grub_efi_cdrom_device_path_t): New type.
12566 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12567 (struct grub_efi_vendor_media_device_path): New structure.
12568 (grub_efi_vendor_media_device_path_t): New type.
12569 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12570 (struct grub_efi_file_path_device_path): New structure.
12571 (grub_efi_file_path_device_path_t): New type.
12572 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12573 (struct grub_efi_protocol_device_path): New structure.
12574 (grub_efi_protocol_device_path_t): New type.
12575 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12576 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12577 (struct grub_efi_bios_device_path): New structure.
12578 (grub_efi_bios_device_path_t): New type.
12579 (struct grub_efi_disk_io): New structure.
12580 (grub_efi_disk_io_t): New type.
12581 (struct grub_efi_block_io_media): New structure.
12582 (grub_efi_block_io_media_t): New type.
12583 (struct grub_efi_block_io): New structure.
12584 (grub_efi_block_io_t): New type.
12585
12586 * include/grub/misc.h (grub_stop): Removed.
12587 (grub_exit): New prototype.
12588 (grub_abort): Likewise.
12589
12590 * include/grub/disk.h (enum grub_disk_dev_id): Added
12591 GRUB_DISK_DEVICE_EFIDISK_ID.
12592
12593 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12594 disk/efi/efidisk.c.
12595 (kernel_syms.lst): Remove the target if an error occurs.
12596
12597 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12598
12599 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12600 as it was simply too buggy.
12601
12602 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12603
12604 * kern/misc.c (grub_lltoa): New function.
12605 (grub_vsprintf): Added support for the long long suffix,
12606 i.e. "ll".
12607
12608 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12609
12610 * Makefile.in (LDFLAGS): Add variable.
12611 (LD): Remove variable.
12612 * configure.ac: Add -m32 to LDFLAGS.
12613 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12614 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12615 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12616 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12617 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12618 variables.
12619 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12620 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12621 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12622
12623 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12624
12625 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12626 length for unknown glyph.
12627
12628 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12629
12630 Add support for pre-loaded modules into the EFI port.
12631
12632 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12633 completely. Accept one more argument DIR. The caller has changed.
12634
12635 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12636
12637 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12638 (grub_efi_loaded_image_guid): New variable.
12639 (grub_efi_get_loaded_image): New function.
12640 (grub_arch_modules_addr): Likewise.
12641
12642 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12643 prototype.
12644
12645 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12646 (struct grub_efi_loaded_image): New structure.
12647 (grub_efi_loaded_image_t): New type.
12648
12649 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12650
12651 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12652 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12653 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12654
12655 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12656
12657 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12658
12659 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12660
12661 * DISTLIST: Added include/grub/efi/console.h,
12662 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12663 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12664
12665 * include/grub/efi/console.h: New file.
12666 * include/grub/efi/time.h: Likewise.
12667 * include/grub/i386/efi/kernel.h: Likewise.
12668 * kern/efi/init.c: Likewise.
12669 * kern/efi/mm.c: Likewise.
12670 * term/efi/console.c: Likewise.
12671
12672 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12673 (grub_stop): Removed.
12674 (grub_get_rtc): Likewise.
12675 (grub_machine_init): Simply call grub_efi_init.
12676 (grub_machine_fini): Call grub_efi_fini.
12677
12678 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12679 (grub_efi_output_string): Removed.
12680 (grub_efi_stall): New function.
12681 (grub_stop): Likewise.
12682 (grub_get_rtc): Likewise.
12683
12684 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12685 (grub_efi_stall): New prototype.
12686 (grub_efi_allocate_pages): Likewise.
12687 (grub_efi_free_pages): Likewise.
12688 (grub_efi_get_memory_map): Likewise.
12689 (grub_efi_mm_init): Likewise.
12690 (grub_efi_mm_fini): Likewise.
12691 (grub_efi_init): Likewise.
12692 (grub_efi_fini): Likewise.
12693
12694 * include/grub/i386/efi/time.h: Do not include
12695 grub/symbol.h. Include grub/efi/time.h.
12696 (GRUB_TICKS_PER_SECOND): Removed.
12697 (grub_get_rtc): Likewise.
12698
12699 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12700 Added padding. The EFI spec is buggy.
12701 (GRUB_EFI_BLACK): New macro.
12702 (GRUB_EFI_BLUE): Likewise.
12703 (GRUB_EFI_GREEN): Likewise.
12704 (GRUB_EFI_CYAN): Likewise.
12705 (GRUB_EFI_RED): Likewise.
12706 (GRUB_EFI_MAGENTA): Likewise.
12707 (GRUB_EFI_BROWN): Likewise.
12708 (GRUB_EFI_LIGHTGRAY): Likewise.
12709 (GRUB_EFI_BRIGHT): Likewise.
12710 (GRUB_EFI_DARKGRAY): Likewise.
12711 (GRUB_EFI_LIGHTBLUE): Likewise.
12712 (GRUB_EFI_LIGHTGREEN): Likewise.
12713 (GRUB_EFI_LIGHTCYAN): Likewise.
12714 (GRUB_EFI_LIGHTRED): Likewise.
12715 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12716 (GRUB_EFI_YELLOW): Likewise.
12717 (GRUB_EFI_WHITE): Likewise.
12718 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12719 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12720 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12721 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12722 (GRUB_EFI_BACKGROUND_RED): Likewise.
12723 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12724 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12725 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12726 (GRUB_EFI_TEXT_ATTR): Likewise.
12727
12728 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12729 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12730 (kernel_mod_HEADERS): Added efi/time.h.
12731
12732 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12733
12734 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12735 include/grub/efi/api.h, include/grub/efi/console_control.h,
12736 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12737 include/grub/i386/efi/time.h, kern/efi/efi.c,
12738 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12739 and util/i386/efi/grub-mkimage.c.
12740
12741 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12742
12743 * genmk.rb (PModule#rule): Do not export symbols if
12744 #{prefix}_EXPORTS is set to "no".
12745
12746 * conf/i386-efi.mk: New file.
12747 * conf/i386-efi.rmk: Likewise.
12748 * include/grub/efi/api.h: Likewise.
12749 * include/grub/efi/console_control.h: Likewise.
12750 * include/grub/efi/efi.h: Likewise.
12751 * include/grub/efi/pe32.h: Likewise.
12752 * include/grub/i386/efi/time.h: Likewise.
12753 * kern/efi/efi.c: Likewise.
12754 * kern/i386/efi/init.c: Likewise.
12755 * kern/i386/efi/startup.S: Likewise.
12756 * util/i386/efi/grub-mkimage.c: Likewise.
12757
12758 2006-04-17 Marco Gerards <marco@gnu.org>
12759
12760 * include/grub/script.h: Include <grub/parser.h> and
12761 "grub_script.tab.h".
12762 (struct grub_lexer_param): New struct.
12763 (struct grub_parser_param): Likewise.
12764 (grub_script_create_arglist): Pass the state in an argument.
12765 (grub_script_add_arglist): Likewise.
12766 (grub_script_create_cmdline): Likewise.
12767 (grub_script_create_cmdblock): Likewise.
12768 (grub_script_create_cmdif): Likewise.
12769 (grub_script_create_cmdmenu): Likewise.
12770 (grub_script_add_cmd): Likewise.
12771 (grub_script_arg_add): Likewise.
12772 (grub_script_lexer_ref): Likewise.
12773 (grub_script_lexer_deref): Likewise.
12774 (grub_script_lexer_record_start): Likewise.
12775 (grub_script_lexer_record_stop): Likewise.
12776 (grub_script_mem_record): Likewise.
12777 (grub_script_mem_record_stop): Likewise.
12778 (grub_script_malloc): Likewise.
12779 (grub_script_yylex): Likewise.
12780 (grub_script_yyparse): Likewise.
12781 (grub_script_yyerror): Likewise.
12782 (grub_script_yylex): Likewise.
12783 (grub_script_lexer_init): Return the state.
12784
12785 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12786 (grub_script_lexer_done): Likewise.
12787 (grub_script_lexer_getline): Likewise.
12788 (grub_script_lexer_refs): Likewise.
12789 (script): Likewise.
12790 (newscript): Likewise.
12791 (record): Likewise.
12792 (recording): Likewise.
12793 (recordpos): Likewise.
12794 (recordlen): Likewise.
12795 (grub_script_lexer_init): Return the state instead of setting
12796 global variables.
12797 (grub_script_lexer_ref): Use the newly added argument for state
12798 instead of globals.
12799 (grub_script_lexer_deref): Likewise.
12800 (grub_script_lexer_record_start): Likewise.
12801 (grub_script_lexer_record_stop): Likewise.
12802 (recordchar): Likewise.
12803 (nextchar): Likewise.
12804 (grub_script_yylex2): Likewise.
12805 (grub_script_yylex): Likewise.
12806 (grub_script_yyerror): Likewise.
12807
12808 * normal/parser.y (func_mem): Removed variable.
12809 (menu_entry): Likewise.
12810 (err): Likewise.
12811 (%lex-param): New parser option.
12812 (%parse-param): Likewise.
12813 (script): Always return the AST.
12814 (argument): Pass the state around.
12815 (arguments): Likewise.
12816 (grubcmd): Likewise.
12817 (commands): Likewise.
12818 (function): Likewise.
12819 (menuentry): Likewise.
12820 (if_statement): Likewise.
12821 (if): Likewise.
12822
12823 * normal/script.c (grub_script_memused): Removed variable.
12824 (grub_script_parsed): Likewise.
12825 (grub_script_malloc): Added a state argument. Use that instead of
12826 global variables.
12827 (grub_script_mem_record): Likewise.
12828 (grub_script_mem_record_stop): Likewise.
12829 (grub_script_arg_add): Likewise.
12830 (grub_script_add_arglist): Likewise.
12831 (grub_script_create_cmdline): Likewise.
12832 (grub_script_create_cmdif): Likewise.
12833 (grub_script_create_cmdmenu): Likewise.
12834 (grub_script_add_cmd): Likewise.
12835 (grub_script_parse): Setup the state before calling the parser.
12836
12837 2006-04-16 Marco Gerards <marco@gnu.org>
12838
12839 * normal/command.c (grub_command_init): Remove the title command.
12840
12841 * normal/lexer.c (grub_script_yylex): Renamed from this...
12842 (grub_script_yylex2): ... to this.
12843 (grub_script_yylex): New function. Temporary
12844 introduced to filter some tokens.
12845 (grub_script_yyerror): Print a newline.
12846
12847 * normal/main.c (read_config_file): Output information about the
12848 lines that contain errors. Wait for a key after all lines have
12849 been processed. Don't return an empty menu.
12850
12851 * normal/parser.y (func_mem): Don't initialize.
12852 (menu_entry): Likewise.
12853 (err): New variable.
12854 (script): Don't return anything when an error was encountered.
12855 (ws, returns): Removed rules.
12856 (argument): Disabled concatenated variable support.
12857 (arguments): Remove explicit separators.
12858 (grubcmd): Likewise.
12859 (function): Likewise.
12860 (menuentry): Likewise.
12861 (if): Likewise.
12862 (commands): Likewise. Add error handling.
12863
12864 * normal/script.c (grub_script_create_cmdline): If
12865 `grub_script_parsed' is 0, assume the parser encountered an error.
12866
12867 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12868
12869 * configure.ac: Add support for EFI. Fix the typo
12870 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12871
12872 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12873
12874 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12875 foreign multibyte characters should be shown correctly.
12876
12877 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12878
12879 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12880 calculation.
12881 (read_config_file): Made it to close file before returning.
12882
12883 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12884
12885 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12886 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12887 video/i386/pc/vbefill.c.
12888
12889 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12890 video/i386/pc/vbefill.c.
12891
12892 * include/grub/video.h (grub_video_blit_format): New enum.
12893 (grub_video_mode_info): Added new member blit_format.
12894 (grub_video_get_blit_format): New function prototype.
12895
12896 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12897 function prototype.
12898 (grub_video_vbe_map_rgb): Likewise.
12899 (grub_video_vbe_unmap_color): Likewise.
12900
12901 * include/grub/i386/pc/vbeblit.h: New file.
12902
12903 * include/grub/i386/pc/vbefill.h: New file.
12904
12905 * video/video.c (grub_video_get_blit_format): New function.
12906 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12907 (grub_video_vbe_map_rgb): Likewise.
12908 (grub_video_vbe_unmap_color): Likewise.
12909
12910 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12911 optimized fills.
12912 (grub_video_vbe_blit_render_target): Changed to use more optimized
12913 blits.
12914 (grub_video_vbe_setup): Added detection for optimized settings.
12915 (grub_video_vbe_create_render_target): Likewise.
12916
12917 * video/i386/pc/vbeblit.c: New file.
12918
12919 * video/i386/pc/vbefill.c: New file.
12920
12921 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12922
12923 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12924 here...
12925
12926 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12927 parsing to support both hex and dec ranges. If filename was missing
12928 show usage information.
12929
12930 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12931
12932 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12933 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12934
12935 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12936 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12937 (video_mod_SOURCES): Added.
12938 (video_mod_CFLAGS): Likewise.
12939 (video_mod_LDFLAGS): Likewise.
12940 (gfxterm_mod_SOURCES): Likewise.
12941 (gfxterm_mod_CFLAGS): Likewise.
12942 (gfxterm_mod_LDFLAGS): Likewise.
12943 (videotest_mod_SOURCES): Likewise.
12944 (videotest_mod_CFLAGS): Likewise.
12945 (videotest_mod_LDFLAGS): Likewise.
12946 (vesafb_mod_SOURCES): Removed.
12947 (vesafb_mod_CFLAGS): Likewise.
12948 (vesafb_mod_LDFLAGS): Likewise.
12949 (vga_mod_SOURCES): Likewise.
12950 (vga_mod_CFLAGS): Likewise.
12951 (vga_mod_LDFLAGS): Likewise.
12952
12953 * commands/videotest.c: New file.
12954
12955 * font/manager.c (fill_with_default_glyph): Modified to use
12956 grub_font_glyph.
12957 (grub_font_get_glyph): Likewise.
12958 (fontmanager): Renamed from this...
12959 (font_manager): ... to this.
12960
12961 * include/grub/font.h (grub_font_glyph): Added new structure.
12962 (grub_font_get_glyph): Modified to use grub_font_glyph.
12963
12964 * include/grub/misc.h (grub_abs): Added as inline function.
12965
12966 * include/grub/video.h: New file.
12967
12968 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12969 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12970 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12971 (grub_vbe_get_controller_info): Renamed from this...
12972 (grub_vbe_bios_get_controller_info): ... to this.
12973 (grub_vbe_get_mode_info): Renamed from this...
12974 (grub_vbe_bios_get_mode_info): ... to this.
12975 (grub_vbe_set_mode): Renamed from this...
12976 (grub_vbe_bios_set_mode): ... to this.
12977 (grub_vbe_get_mode): Renamed from this...
12978 (grub_vbe_bios_get_mode): ... to this.
12979 (grub_vbe_set_memory_window): Renamed from this...
12980 (grub_vbe_bios_set_memory_window): ... to this.
12981 (grub_vbe_get_memory_window): Renamed from this...
12982 (grub_vbe_bios_get_memory_window): ... to this.
12983 (grub_vbe_set_scanline_length): Renamed from this...
12984 (grub_vbe_set_scanline_length): ... to this.
12985 (grub_vbe_get_scanline_length): Renamed from this...
12986 (grub_vbe_bios_get_scanline_length): ... to this.
12987 (grub_vbe_set_display_start): Renamed from this...
12988 (grub_vbe_bios_set_display_start): ... to this.
12989 (grub_vbe_get_display_start): Renamed from this...
12990 (grub_vbe_bios_get_display_start): ... to this.
12991 (grub_vbe_set_palette_data): Renamed from this...
12992 (grub_vbe_bios_set_palette_data): ... to this.
12993 (grub_vbe_set_pixel_rgb): Removed.
12994 (grub_vbe_set_pixel_index): Likewise.
12995
12996 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12997 from this...
12998 (grub_vbe_bios_get_controller_info): ... to this.
12999 (grub_vbe_get_mode_info): Renamed from this...
13000 (grub_vbe_bios_get_mode_info): ... to this.
13001 (grub_vbe_set_mode): Renamed from this...
13002 (grub_vbe_bios_set_mode): ... to this.
13003 (grub_vbe_get_mode): Renamed from this...
13004 (grub_vbe_bios_get_mode): ... to this.
13005 (grub_vbe_set_memory_window): Renamed from this...
13006 (grub_vbe_bios_set_memory_window): ... to this.
13007 (grub_vbe_get_memory_window): Renamed from this...
13008 (grub_vbe_bios_get_memory_window): ... to this.
13009 (grub_vbe_set_scanline_length): Renamed from this...
13010 (grub_vbe_set_scanline_length): ... to this.
13011 (grub_vbe_get_scanline_length): Renamed from this...
13012 (grub_vbe_bios_get_scanline_length): ... to this.
13013 (grub_vbe_set_display_start): Renamed from this...
13014 (grub_vbe_bios_set_display_start): ... to this.
13015 (grub_vbe_get_display_start): Renamed from this...
13016 (grub_vbe_bios_get_display_start): ... to this.
13017 (grub_vbe_set_palette_data): Renamed from this...
13018 (grub_vbe_bios_set_palette_data): ... to this.
13019 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13020 getting corrupted after calling it. Added more pushes and pops.
13021 (grub_vbe_bios_set_mode): Likewise.
13022 (grub_vbe_bios_get_mode): Likewise.
13023 (grub_vbe_bios_get_memory_window): Likewise.
13024 (grub_vbe_bios_set_scanline_length): Likewise.
13025 (grub_vbe_bios_get_scanline_length): Likewise.
13026 (grub_vbe_bios_get_display_start): Likewise.
13027 (grub_vbe_bios_set_palette_data): Likewise.
13028
13029 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13030 (cl_insert): Likewise.
13031 (cl_delete): Likewise.
13032
13033 * term/gfxterm.c: New file.
13034
13035 * term/i386/pc/vesafb.c: Removed file.
13036
13037 * video/video.c: New file.
13038
13039 * video/i386/pc/vbe.c (real2pm): Added new function.
13040 (grub_video_vbe_draw_pixel): Likewise.
13041 (grub_video_vbe_get_video_ptr): Likewise.
13042 (grub_video_vbe_get_pixel): Likewise
13043 (grub_video_vbe_init): Likewise.
13044 (grub_video_vbe_fini): Likewise.
13045 (grub_video_vbe_setup): Likewise.
13046 (grub_video_vbe_get_info): Likewise.
13047 (grub_video_vbe_set_palette): Likewise.
13048 (grub_video_vbe_get_palette): Likewise.
13049 (grub_video_vbe_set_viewport): Likewise.
13050 (grub_video_vbe_get_viewport): Likewise.
13051 (grub_video_vbe_map_color): Likewise.
13052 (grub_video_vbe_map_rgb): Likewise.
13053 (grub_video_vbe_map_rgba): Likewise.
13054 (grub_video_vbe_unmap_color): Likewise.
13055 (grub_video_vbe_fill_rect): Likewise.
13056 (grub_video_vbe_blit_glyph): Likewise.
13057 (grub_video_vbe_blit_bitmap): Likewise.
13058 (grub_video_vbe_blit_render_target): Likewise.
13059 (grub_video_vbe_scroll): Likewise.
13060 (grub_video_vbe_swap_buffers): Likewise.
13061 (grub_video_vbe_create_render_target): Likewise.
13062 (grub_video_vbe_delete_render_target): Likewise.
13063 (grub_video_vbe_set_active_render_target): Likewise.
13064 (grub_vbe_set_pixel_rgb): Remove function.
13065 (grub_vbe_set_pixel_index): Likewise.
13066 (index_color_mode): Remove static variable.
13067 (active_mode): Likewise.
13068 (framebuffer): Likewise.
13069 (bytes_per_scan_line): Likewise.
13070 (grub_video_vbe_adapter): Added new static variable.
13071 (framebuffer): Likewise.
13072 (render_target): Likewise.
13073 (initial_mode): Likewise.
13074 (mode_in_use): Likewise.
13075 (mode_list): Likewise.
13076
13077 2006-03-10 Marco Gerards <marco@gnu.org>
13078
13079 * configure.ac (AC_INIT): Bumped to 1.93.
13080
13081 * DISTLIST: Added `include/grub/hfs.h'.
13082
13083 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13084
13085 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13086 18H, which might help the BIOS falling back to next boot media.
13087
13088 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13089
13090 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13091 Poe Chen <poe.poechen@gmail.com>.
13092
13093 2006-01-17 Marco Gerards <marco@gnu.org>
13094
13095 * include/grub/normal.h: Include <grub/script.h>.
13096 (grub_command_list): Removed struct.
13097 (grub_command_list_t): Removed type.
13098 (grub_menu_entry): Remove members `num' and `command_list'. Add
13099 members `commands' and `sourcecode'.
13100 * include/grub/script.h: Add inclusion guards.
13101 (grub_script_cmd_menuentry): New struct.
13102 (grub_script_execute_menuentry): New prototype.
13103 (grub_script_lexer_record_start): Likewise.
13104 (grub_script_lexer_record_stop): Likewise.
13105 * normal/execute.c (grub_script_execute_menuentry): New function.
13106 * normal/lexer.c (record, recording, recordpos, recordlen): New
13107 variables.
13108 (grub_script_lexer_record_start): New function.
13109 (grub_script_lexer_record_stop): Likewise.
13110 (recordchar): Likewise.
13111 (nextchar): Likewise.
13112 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13113 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13114 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13115 (current_menu): New variable.
13116 (free_menu): Mainly rewritten.
13117 (grub_normal_menu_addentry): New function.
13118 (read_config_file): Rewritten.
13119 * normal/menu.c (run_menu_entry): Mainly rewritten.
13120 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13121 the menu entry.
13122 (run): Mainly rewritten.
13123 * normal/parser.y (menu_entry): New variable.
13124 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13125 (menuentry): New rule.
13126 (command): Add `menuentry'.
13127 (if_statement): Allow additional returns before `fi'.
13128 * normal/script.c (grub_script_create_cmdmenu): New function.
13129
13130 2006-01-03 Marco Gerards <marco@gnu.org>
13131
13132 * INSTALL: GNU Bison is required.
13133 * configure.ac: Rewritten the test to detect Bison.
13134 * Makefile.in (YACC): New variable. Reported by Xun Sun
13135 <xun.sun.cn@gmail.com>.
13136
13137 2006-01-03 Marco Gerards <marco@gnu.org>
13138
13139 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13140 the HFS+ filesystem to filesystem blocks.
13141 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13142 GCC warning is silenced.
13143
13144 2006-01-03 Marco Gerards <marco@gnu.org>
13145
13146 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13147 read from disk from big endian to host byte order.
13148
13149 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13150
13151 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13152 documentation.
13153 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13154 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13155 embedded HFS+ filesystem.
13156 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13157 (grub_hfs_sblock): Move from here...
13158 * include/grub/hfs.h: To here... New file.
13159 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13160 documentation.
13161 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13162 New macros.
13163 (grub_hfsplus_volheader): Change type of member `magic' to
13164 `grub_uint16_t'.
13165 (grub_hfsplus_data): Add new member `embedded_offset'.
13166 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13167 returned block.
13168 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13169 Calculate the offset.
13170
13171 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13172
13173 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13174 Removed.
13175 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13176
13177 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13178
13179 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13180 ENV->NAME is NULL after allocating ENV->VALUE.
13181
13182 2005-12-25 Marco Gerards <marco@gnu.org>
13183
13184 * kern/env.c (grub_env_set): Rewritten the error handling code.
13185
13186 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13187
13188 * geninit.sh: Made more robust, and more portable.
13189
13190 2005-12-25 Marco Gerards <marco@gnu.org>
13191
13192 Add support for Apple HFS+ filesystems.
13193
13194 * fs/hfsplus.c: New file.
13195
13196 * DISTLIST: Added `fs/hfsplus.c'.
13197
13198 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13199 (hfsplus_mod_SOURCES): New variable.
13200 (hfsplus_mod_CFLAGS): Likewise.
13201 (hfsplus_mod_LDFLAGS): Likewise.
13202 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13203 (grub_setup_SOURCES): Likewise.
13204 (grub_mkdevicemap_SOURCES): Likewise.
13205 (grub_emu_SOURCES): Likewise.
13206 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13207
13208 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13209
13210 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13211
13212 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13213
13214 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13215 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13216 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13217 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13218 normal/lexer.c, normal/parser.y, normal/script.c, and
13219 partmap/gpt.c.
13220 Removed kern/sparc64/cache.c.
13221
13222 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13223 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13224 grub_emu_init.c.
13225
13226 * configure.ac (AC_INIT): Bumped to 1.92.
13227
13228 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13229
13230 * kern/err.c (grub_error_push): Added new function to support error
13231 stacks.
13232 (grub_error_pop): Likewise.
13233 (grub_error_stack_items): New local variable to support error stacks.
13234 (grub_error_stack_pos): Likewise.
13235 (grub_error_stack_assert): Likewise.
13236 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13237 stack depth.
13238 (grub_print_error): Added support to print errors from error stack.
13239
13240 * include/grub/err.h (grub_error_push): Added function prototype.
13241 (grub_error_pop): Likewise.
13242
13243 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13244
13245 * configure.ac: Accept `powerpc64' as host_cpu.
13246 (amd64): Rename to `biarch32'.
13247
13248 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13249 non-cacheline-aligned addresses.
13250
13251 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13252 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13253 if `size' is non-zero.
13254
13255 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
13256
13257 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13258 and `cd' to make sure the filename is not prefixed with a
13259 directory name.
13260 (pkgdata_MODULES): Add `gpt.mod'.
13261 (gpt_mod_SOURCES): New variable.
13262 (gpt_mod_CFLAGS): Likewise.
13263 (gpt_mod_LDFLAGS): Likewise.
13264
13265 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13266
13267 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13268 New macro.
13269
13270 * partmap/gpt.c: New file.
13271
13272 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13273 GPT partition map is detected.
13274
13275 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13276
13277 * commands/i386/pc/play.c: New file.
13278 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13279 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13280 macros.
13281
13282 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
13283
13284 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13285 ((unused))' to silence gcc warning.
13286
13287 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13288
13289 * configure.ac: Correct `AC_PROG_YACC' test.
13290
13291 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13292
13293 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13294 check before installing files.
13295
13296 2005-11-22 Mike Small <smallm@panix.com>
13297
13298 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13299 number regex so multidigit numbers are recognized correctly.
13300
13301 2005-11-22 Mike Small <smallm@panix.com>
13302
13303 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13304 debugging message before attempting to claim memory.
13305 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13306 multiple addresses in case of failure.
13307
13308 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13309
13310 * term/tparm.c (get_space): Remove empty `if' statement.
13311
13312 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13313
13314 * kern/parser.c (check_varstate): Rename `state' to 's'.
13315
13316 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13317
13318 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13319 variable definitions to the beginning of each function. Sort stack
13320 variables by size.
13321 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13322 `buf' argument to `char *'.
13323
13324 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13325
13326 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13327 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13328 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13329 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13330 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13331 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13332 configfile.mod, search.mod, gzio.mod and test.mod.
13333 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13334 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13335 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13336 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13337 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13338 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13339 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13340 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13341 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13342 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13343 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13344 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13345 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13346 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13347 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13348 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13349 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13350 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13351 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13352 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13353 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13354 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13355 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13356
13357 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13358 `grep --include'.
13359 (pkgdata_MODULES): Add test.mod.
13360
13361 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13362
13363 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13364 appending to variables with "+=".
13365 (PModule): Use full pathname to generate *.lst filenames.
13366
13367 * Makefile.in: Fixed list rules moved from genmk.rb.
13368 (.DELETE_ON_ERROR): New special target.
13369 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13370
13371 * conf/i386-pc.rmk: Include conf/common.mk.
13372 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13373 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13374 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13375 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13376 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13377 configfile.mod, search.mod, gzio.mod and test.mod.
13378 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13379 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13380 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13381 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13382 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13383 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13384 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13385 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13386 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13387 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13388 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13389 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13390 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13391 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13392 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13393 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13394 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13395 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13396 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13397 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13398 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13399 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13400 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13401 here...
13402 * conf/common.rmk: ... to here. New file.
13403
13404 * conf/common.mk: New file.
13405
13406 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13407
13408 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13409 (grub_script.tab.c): ... here.
13410
13411 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13412 (grub_script.tab.c): ... here.
13413
13414 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13415 (grub_script.tab.c): ... here.
13416
13417 * normal/command.c (grub_command_find): Fixed a memory leak of
13418 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13419
13420 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13421
13422 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13423 "@" which marks the start of a comment on ARM.
13424 (VARIABLE): Likewise.
13425
13426 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13427
13428 Add support for Linux/ADFS partition tables.
13429
13430 * partmap/acorn.c: New file.
13431
13432 * include/grub/acorn_filecore.h: Likewise.
13433
13434 * DISTLIST: Added `partmap/acorn.c' and
13435 `include/grub/acorn_filecore.h'.
13436
13437 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13438 `partmap/acorn.c'.
13439 (pkgdata_MODULES): Add `acorn.mod'.
13440 (acorn_mod_SOURCES): New variable.
13441 (acorn_mod_CFLAGS): Likewise.
13442
13443 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13444 `partmap/acorn.c'.
13445 (pkgdata_MODULES): Add `acorn.mod'.
13446 (acorn_mod_SOURCES): New variable.
13447 (acorn_mod_CFLAGS): Likewise.
13448
13449 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13450 (pkgdata_MODULES): Add `acorn.mod'.
13451 (acorn_mod_SOURCES): New variable.
13452 (acorn_mod_CFLAGS): Likewise.
13453 (acorn_mod_LDFLAGS): Likewise.
13454
13455 * include/types.h (grub_disk_addr_t): New typedef.
13456
13457 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
13458
13459 * geninit.sh: New file.
13460
13461 * geninitheader.sh: Likewise.
13462
13463 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13464 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13465 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13466 * commands/configfile.c (grub_configfile_init)
13467 (grub_configfile_fini): Likewise.
13468 * commands/default.c (grub_default_init, grub_default_fini):
13469 Likewise.
13470 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13471 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13472 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13473 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13474 Likewise.
13475 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13476 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13477 Likewise.
13478 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13479 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13480 Likewise.
13481 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13482 Likewise.
13483 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13484 Likewise.
13485 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13486 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13487 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13488 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13489 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13490 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13491 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13492 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13493 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13494 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13495 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13496 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13497 * partmap/amiga.c (grub_amiga_partition_map_init)
13498 (grub_amiga_partition_map_fini): Likewise.
13499 * partmap/apple.c (grub_apple_partition_map_init)
13500 (grub_apple_partition_map_fini): Likewise.
13501 * partmap/pc.c (grub_pc_partition_map_init)
13502 (grub_pc_partition_map_fini): Likewise.
13503 * partmap/sun.c (grub_sun_partition_map_init,
13504 grub_sun_partition_map_fini): Likewise.
13505 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13506 Likewise.
13507
13508 * util/grub-emu.c: Include <grub_modules_init.h>.
13509 (main): Don't initialize and de-initialize any modules directly,
13510 use `grub_init_all' and `grub_fini_all' instead.
13511
13512 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13513 `grub_vesafb_mod_init'.
13514 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13515 all users.
13516 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13517 `grub_vga_mod_init'. Updated all users.
13518 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13519
13520 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13521 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13522 rules.
13523
13524 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13525 Generate a function to initialize the module in utilities.
13526 Updated all callers.
13527 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13528 initialize the module in utilities. Updated all callers.
13529
13530 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13531
13532 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13533 escape sequence and a literal ^L to clear the screen.
13534
13535 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13536 when returning from Open Firmware.
13537
13538 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13539
13540 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13541 (grub_ofconsole_height): Likewise.
13542 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13543 manually insert a '\n'.
13544 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13545 `grub_ofconsole_height'. Return early if these are already set.
13546
13547 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13548
13549 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13550 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13551 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13552 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13553 and `normal/script.c'.
13554 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13555 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13556 (test_mod_SOURCES): New variable.
13557 (test_mod_CFLAGS): Likewise.
13558 (test_mod_LDFLAGS): Likewise.
13559 (pkgdata_MODULES): Add `test.mod'.
13560 (grub_script.tab.c): New rule.
13561 (grub_script.tab.h): Likewise.
13562
13563 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
13564
13565 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13566 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13567 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13568 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13569 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13570 (test_mod_SOURCES): New variable.
13571 (test_mod_CFLAGS): Likewise.
13572 (pkgdata_MODULES): Add `test.mod'.
13573 (grub_script.tab.c): New rule.
13574 (grub_script.tab.h): Likewise.
13575
13576 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
13577
13578 Add initial scripting support.
13579
13580 * commands/test.c: New file.
13581 * include/grub/script.h: Likewise.
13582 * normal/execute.c: Likewise.
13583 * normal/function.c: Likewise.
13584 * normal/lexer.c: Likewise.
13585 * normal/parser.y: Likewise.
13586 * normal/script.c: Likewise.
13587
13588 * configure.ac: Add `AC_PROG_YACC' test.
13589
13590 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13591 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13592 `normal/function.c' and `normal/script.c'.
13593 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13594 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13595 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13596 variables.
13597 (pkgdata_MODULES): Add `test.mod'.
13598 (grub_script.tab.c): New rule.
13599 (grub_script.tab.h): Likewise.
13600
13601 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13602
13603 * include/grub/normal.h (grub_test_init): New prototype.
13604 (grub_test_fini): Likewise.
13605
13606 * normal/command.c: Include <grub/script.h>.
13607 (grub_command_execute): Rewritten.
13608
13609 * util/grub-emu.c (main): Call `grub_test_init' and
13610 `grub_test_fini'.
13611
13612 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13613
13614 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13615 to 0.
13616 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13617 there are no pending characters.
13618
13619 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13620
13621 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13622 `grub_strndup' to drop device arguments. Replace unnecessary
13623 `grub_strndup' with `grub_strdup'.
13624
13625 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13626
13627 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13628 `debug' environment variable has been set.
13629
13630 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
13631
13632 * Makefile.in (install-local): Use $(DATA).
13633 (uninstall): Likewise.
13634 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13635 (sbin_UTILITIES): ... to here.
13636 (sbin_SCRIPTS): New variable.
13637 (grub_install_SOURCES): New variable.
13638 * util/powerpc/ieee1275/grub-install.in: New file.
13639 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13640 variable.
13641 (add_segments): Call `grub_util_get_path'.
13642
13643 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13644
13645 From Timothy Baldwin:
13646 * commands/ls.c (grub_ls_list_files): Close FILE with
13647 grub_file_close.
13648 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13649
13650 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
13651
13652 * include/grub/parser.h: New file.
13653
13654 * kern/parser.c: Likewise.
13655
13656 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13657 (grub_setup_SOURCES): Likewise.
13658 (grub_probefs_SOURCES): Likewise.
13659 (grub_emu_SOURCES): Likewise.
13660 (kernel_img_HEADERS): Add `parser.h'.
13661
13662 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13663 (grub_emu_SOURCES): Add `kern/parser.c'.
13664 (grubof_SOURCES): Likewise.
13665
13666 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13667 (grubof_SOURCES): Add `kern/parser.c'.
13668
13669 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13670
13671 * kern/misc.c (grub_split_cmdline): Removed function.
13672
13673 * kern/rescue.c: Include <grub/parser.h>.
13674 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13675 of `grub_split_cmdline'.
13676
13677 * normal/command.c: Include <grub/parser.h>.
13678 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13679 of `grub_split_cmdline'.
13680
13681 * normal/completion.c: Include <grub/parser.h>.
13682 (cmdline_state): New variable.
13683 (iterate_dir): End the filename with a quote depending on the
13684 command line state.
13685 (get_state): new function.
13686 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13687 split the arguments and determine the current argument. When the
13688 argument string is not quoted, escape all spaces.
13689
13690 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13691
13692 * normal/sparc64/setjmp.S: New file.
13693
13694 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13695
13696 * include/grub/sparc64/libgcc.h: New file.
13697 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13698 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13699 normal/sparc64/setjmp.c.
13700
13701 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13702
13703 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13704 * kern/sparc64/cache.S: New file.
13705 * kern/sparc64/cache.c: Removed.
13706 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13707 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13708 -mtune=ultrasparc.
13709 (COMMON_LDFLAGS): Add -melf64_sparc.
13710 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13711 (grubof_SOURCES): Use cache.S instead of cache.c.
13712 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13713 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13714 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13715 commented though.
13716 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13717 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13718 (linux_mod_CFLAGS): Commented out.
13719 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13720 out because module isn't built.
13721 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13722 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13723 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13724 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13725 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13726 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13727 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13728 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13729 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13730 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13731 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13732 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13733 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13734 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13735
13736 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13737
13738 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13739 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13740 longer, because HFS should not be used on PC.
13741
13742 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13743
13744 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13745 consistently within the loop.
13746
13747 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
13748
13749 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13750 directory can not be read.
13751
13752 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13753
13754 * configure.ac (AC_INIT): Increase the version number to 1.91.
13755
13756 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13757 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13758 term/i386/pc/serial.c.
13759
13760 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13761
13762 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13763 file size must be permitted.
13764
13765 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13766 between %ah and %al.
13767
13768 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13769
13770 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13771 grub_uint64_t.
13772 Call the hook with a NUL-terminated filename.
13773 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13774 grub_cpu_to_be32.
13775
13776 * kern/term.c (cursor_state): New variable.
13777 (grub_term_set_current): Reset the cursor state on a new
13778 terminal.
13779 (grub_setcursor): Rewritten to use CURSOR_STATE.
13780 (grub_getcursor): New function.
13781
13782 * include/grub/term.h (grub_getcursor): New prototype.
13783
13784 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13785 integers on ARM. Reported by Timothy Baldwin
13786 <T.E.Baldwin99@members.leeds.ac.uk>.
13787
13788 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
13789
13790 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13791 allocated.
13792 (grub_sfs_dir): Likewise.
13793
13794 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
13795
13796 Add support for the SFS filesystem.
13797
13798 * fs/sfs.c: New file.
13799
13800 * DISTLIST: Added `fs/sfs.c'.
13801
13802 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13803 (grub_probefs_SOURCES): Likewise.
13804 (grub_emu_SOURCES): Likewise.
13805 (pkgdata_MODULES): Add `sfs.mod'.
13806 (sfs_mod_SOURCES): New variable.
13807 (sfs_mod_CFLAGS): Likewise.
13808 (sfs_mod_LDFLAGS): Likewise.
13809
13810 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13811 (pkgdata_MODULES): Add `sfs.mod'.
13812 (sfs_mod_SOURCES): New variable.
13813 (sfs_mod_CFLAGS): Likewise.
13814
13815 * util/grub-emu.c (main): Call `grub_sfs_init' and
13816 `grub_sfs_fini'.
13817
13818 * include/grub/fs.h (grub_sfs_init): New prototype.
13819 (grub_sfs_fini): Likewise.
13820
13821 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
13822
13823 Add support for the AFFS filesystem.
13824
13825 * fs/affs.c: New file.
13826
13827 * DISTLIST: Added `fs/affs.c'.
13828
13829 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13830 (grub_probefs_SOURCES): Likewise.
13831 (grub_emu_SOURCES): Likewise.
13832 (pkgdata_MODULES): Add `affs.mod'.
13833 (affs_mod_SOURCES): New variable.
13834 (affs_mod_CFLAGS): Likewise.
13835 (affs_mod_LDFLAGS): Likewise.
13836
13837 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13838 (pkgdata_MODULES): Add `affs.mod'.
13839 (affs_mod_SOURCES): New variable.
13840 (affs_mod_CFLAGS): Likewise.
13841
13842 * util/grub-emu.c (main): Call `grub_affs_init' and
13843 `grub_affs_fini'.
13844
13845 * include/grub/fs.h (grub_affs_init): New prototype.
13846 (grub_affs_fini): Likewise.
13847
13848 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13849
13850 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13851
13852 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13853
13854 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13855 `-m32' to CFLAGS.
13856
13857 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13858 linking.
13859
13860 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13861 (COMMON_LDFLAGS): New variable.
13862 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13863 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13864 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13865 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13866 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13867 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13868 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13869 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13870 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13871 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13872 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13873 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13874 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13875 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13876 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13877 variables.
13878 (normal_mod_ASFLAGS): Add `-m32'.
13879
13880 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13881 (grub_host_size_t, grub_host_ssize_t): New types.
13882 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13883 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13884 `GRUB_HOST_SIZEOF_VOID_P'.
13885
13886 * include/grub/kernel.h (struct grub_module_header): Type of
13887 member offset changed to `grub_host_off_t'. Type of member size
13888 changed to `grub_host_size_t'.
13889 (struct grub_module_info): Type of member offset changed to
13890 `grub_host_off_t'. Type of member size changed to
13891 `grub_host_size_t'.
13892
13893 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13894
13895 Make GRUB's kernel compliant to Multiboot Specification.
13896
13897 * kern/i386/pc/startup.S (multiboot_header): New label.
13898 (multiboot_entry): Likewise.
13899 (multiboot_trampoline): Likewise.
13900
13901 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13902 Increased to 0x4A0.
13903
13904 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13905 put parentheses after a question mark.
13906 [!GRUB_UTIL] (my_mod): New variable.
13907
13908 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13909
13910 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13911
13912 Adds support for the XFS filesystem. Btrees are not supported
13913 yet.
13914
13915 * fs/xfs.c: New file.
13916
13917 * DISTLIST: Added `fs/xfs.c'.
13918
13919 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13920 (grub_probefs_SOURCES): Likewise.
13921 (grub_emu_SOURCES): Likewise.
13922 (pkgdata_MODULES): Add `xfs.mod'.
13923 (xfs_mod_SOURCES): New variable.
13924 (xfs_mod_CFLAGS): Likewise.
13925
13926 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13927 (pkgdata_MODULES): Add `xfs.mod'.
13928 (xfs_mod_SOURCES): New variable.
13929 (xfs_mod_CFLAGS): Likewise.
13930
13931 * util/grub-emu.c (main): Call `grub_xfs_init' and
13932 `grub_xfs_fini'.
13933
13934 * include/grub/fs.h (grub_xfs_init): New prototype.
13935 (grub_xfs_fini): Likewise.
13936
13937
13938 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13939
13940 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13941 color modes, allow greater than 16 colors to be configured as
13942 a default palette.
13943
13944 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13945
13946 * normal/completion.c (complete_arguments): Add the qualifier
13947 const into OPTIONS.
13948
13949 From Omniflux <omniflux+lists@omniflux.com>:
13950 * include/grub/terminfo.h: New file.
13951 * include/grub/tparm.h: Likewise.
13952 * include/grub/i386/pc/serial.h: Likewise.
13953 * term/terminfo.c: Likewise.
13954 * term/tparm.c: Likewise.
13955 * term/i386/pc/serial.c: Likewise.
13956 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13957 serial.mod.
13958 (terminfo_mod_SOURCES): New variable.
13959 (terminfo_mod_CFLAGS): Likewise.
13960 (serial_mod_SOURCES): Likewise.
13961 (serial_mod_CFLAGS): Likewise.
13962
13963 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13964
13965 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13966 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13967 and kern/powerpc/ieee1275/cmain.c, respectively.
13968
13969 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13970 * kern/powerpc/ieee1275/crt0.S: ... here.
13971
13972 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13973 * kern/powerpc/ieee1275/cmain.c: ... here.
13974
13975 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13976 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13977 instead of boot/powerpc/ieee1275/crt0.S and
13978 boot/powerpc/ieee1275/cmain.c, respectively.
13979
13980 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13981 sectors. It was not used anyway.
13982
13983 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13984
13985 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13986 `unused parameter' warning.
13987
13988 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13989
13990 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13991 function.
13992 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13993 getcharwidth.
13994
13995 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13996
13997 * include/grub/normal.h (enum grub_completion_type): Added
13998 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13999
14000 * normal/cmdline.c (print_completion): Handle
14001 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14002 * normal/menu_entry.c (store_completion): Likewise.
14003
14004 * normal/completion.c (complete_arguments): New function.
14005 (grub_normal_do_completion): Call `complete_arguments' when the
14006 current words start with a dash.
14007
14008 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14009
14010 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14011 `gzio.mod' instead of `io.mod').
14012
14013 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14014
14015 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14016 (DISTDIRS): Added io and video.
14017 Rewrite the search routine to make an output consistently.
14018
14019 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14020 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14021 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14022 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14023 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14024 util/powerpc/ieee1275/misc.c.
14025
14026 * include/grub/gzio.h: New file.
14027 * io/gzio.c: Likewise.
14028
14029 * kern/file.c (grub_file_close): Call grub_device_close only if
14030 FILE->DEVICE is not NULL.
14031
14032 * include/grub/mm.h [!NULL] (NULL): New macro.
14033
14034 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14035
14036 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14037 (pkgdata_MODULES): Added gzio.mod.
14038 (gzio_mod_SOURCES): New variable.
14039 (gzio_mod_CFLAGS): Likewise.
14040
14041 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14042 (pkgdata_MODULES): Added gzio.mod.
14043 (gzio_mod_SOURCES): New variable.
14044 (gzio_mod_CFLAGS): Likewise.
14045
14046 * commands/cat.c: Include grub/gzio.h.
14047 (grub_cmd_cat): Use grub_gzfile_open instead of
14048 grub_file_open.
14049
14050 * commands/cmp.c: Include grub/gzio.h.
14051 (grub_cmd_cmp): Use grub_gzfile_open instead of
14052 grub_file_open.
14053
14054 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14055 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14056 grub_file_open.
14057 (grub_rescue_cmd_module): Likewise.
14058
14059 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14060
14061 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14062 kern/sparc64/ieee1275/init.c because it contains _start.
14063 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14064
14065 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14066
14067 * configure.ac: Add support for sparc64 host with ieee1275
14068 firmware.
14069 * configure: Generated from configure.ac.
14070 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14071 instead of int.
14072 (grub_ofdisk_read): Likewise.
14073 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14074 pointers as (void *) to remove a warning.
14075 (grub_ofdisk_close): Likewise.
14076 (grub_ofdisk_read): Likewise.
14077 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14078 returns, so make it return void to remove a warning.
14079 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14080 Corresponding prototype change.
14081 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14082 values, and cast the pointers as (void *) to remove a warning.
14083 (grub_mm_dump): Likewise.
14084 * conf/sparc64-ieee1275.mk: New file.
14085 * conf/sparc64-ieee1275.rmk: Likewise.
14086 * include/grub/sparc64/setjmp.h: Likewise.
14087 * include/grub/sparc64/types.h: Likewise.
14088 * include/grub/sparc64/ieee1275/console.h: Likewise.
14089 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14090 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14091 * include/grub/sparc64/ieee1275/time.h: Likewise.
14092 * kern/sparc64/cache.c: Likewise.
14093 * kern/sparc64/dl.c: Likewise.
14094 * kern/sparc64/ieee1275/init.c: Likewise.
14095 * kern/sparc64/ieee1275/openfw.c: Likewise.
14096
14097 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14098
14099 * util/console.c (grub_ncurses_putchar): If C is greater than
14100 0x7f, set C to a question mark.
14101 (grub_ncurses_getcharwidth): New function.
14102 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14103 getcharwidth.
14104
14105 * normal/menu.c (print_entry): Made aware of Unicode. First,
14106 convert TITLE to UCS-4, and predict the cursor position by
14107 grub_getcharwidth.
14108
14109 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14110 const to SRC.
14111 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14112
14113 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14114
14115 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14116 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14117 grub_strcat.
14118
14119 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14120 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14121 grub_strcpy and grub_strlen. Take it into account that a space
14122 character is inserted as a delimiter.
14123
14124 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14125
14126 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14127 invalid magic in the error.
14128
14129 * commands/search.c: New file.
14130
14131 * util/grub-emu.c (main): Call grub_search_init and
14132 grub_search_fini.
14133
14134 * kern/rescue.c (grub_rescue_print_disks): Removed.
14135 (grub_rescue_print_devices): New function.
14136 (grub_rescue_cmd_ls): Use grub_device_iterate with
14137 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14138 grub_rescue_print_disks.
14139
14140 * kern/partition.c (grub_partition_iterate): Return the result of
14141 PARTMAP->ITERATE instead of GRUB_ERRNO.
14142
14143 * kern/device.c: Include grub/partition.h.
14144 (grub_device_iterate): New function.
14145
14146 * include/grub/partition.h (grub_partition_iterate): Return int
14147 instead of grub_err_t.
14148
14149 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14150 prototype.
14151 [GRUB_UTIL] (grub_search_fini): Likewise.
14152
14153 * include/grub/device.h (grub_device_iterate): New prototype.
14154
14155 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14156 commands/search.c.
14157 (pkgdata_MODULES): Added search.mod.
14158 (search_mod_SOURCES): New variable.
14159 (search_mod_CFLAGS): Likewise.
14160
14161 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14162 (pkgdata_MODULES): Added search.mod.
14163 (search_mod_SOURCES): New variable.
14164 (search_mod_CFLAGS): Likewise.
14165
14166 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14167 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14168 All callers changed.
14169
14170 * DISTLIST: Added commands/search.c.
14171
14172 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14173
14174 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14175 conversion.
14176 (grub_getcharwidth): New function.
14177
14178 * kern/misc.c (grub_utf8_to_ucs4): New function.
14179
14180 * include/grub/term.h (struct grub_term): Added a new member
14181 "getcharwidth".
14182 (grub_getcharwidth): New prototype.
14183
14184 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14185
14186 * term/i386/pc/console.c (map_char): New function. Segregated from
14187 grub_console_putchar.
14188 (grub_console_putchar): Use map_char.
14189 (grub_console_getcharwidth): New function.
14190 (grub_console_term): Specified grub_console_getcharwidth as
14191 getcharwidth.
14192
14193 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14194 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14195
14196 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14197 GRUB_ERRNO.
14198 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14199 on grub_strtoul completely.
14200 (write_char): Declare local variables in the beginning of the
14201 function.
14202 (grub_vesafb_getcharwidth): New function.
14203 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14204 getcharwidth.
14205
14206 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14207
14208 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14209 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14210 commands/i386/pc/vbetest.c.
14211
14212 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14213 call grub_vbe_get_controller_info again, because the returned
14214 information is volatile.
14215 (grub_vbe_set_video_mode): Mostly rewritten.
14216 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14217 grub_vbe_status_t correctly.
14218 (grub_vbe_get_video_mode_info): Likewise.
14219 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14220 several if statements.
14221
14222 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14223 * commands/i386/pc/vbeinfo.c: ... this.
14224
14225 * commands/i386/pc/vbe_test.c: Renamed to ...
14226 * commands/i386/pc/vbetest.c: ... this.
14227
14228 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14229 ...
14230 (grub_cmd_vbeinfo): ... this. Save video modes before
14231 iterating. Skip a video mode, if it is not available, not enough
14232 information is given or it is monochrome. Show the memory
14233 model. Leave the interpretation of MODEVAR to grub_strtoul
14234 completely.
14235 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14236 (GRUB_MOD_FINI): Likewise.
14237
14238 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14239 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14240 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14241 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14242 grub_strtoul completely.
14243 (real2pm): Removed.
14244 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14245 (GRUB_MOD_FINI): Likewise.
14246
14247 * normal/misc.c: Include grub/mm.h.
14248
14249 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14250 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14251 (vbe_list_modes_mod_SOURCES): Removed.
14252 (vbe_list_modes_mod_CFLAGS): Likewise.
14253 (vbe_test_mod_SOURCES): Likewise.
14254 (vbe_test_mod_CFLAGS): Likewise.
14255 (vbeinfo_mod_SOURCES): New variable.
14256 (vbeinfo_mod_CFLAGS): Likewise.
14257 (vbetest_mod_SOURCES): Likewise.
14258 (vbetest_mod_CFLAGS): Likewise.
14259
14260 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14261
14262 * normal/misc.c: New file.
14263
14264 * DISTLIST: Added normal/misc.c.
14265
14266 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14267 DISK to HOOK. Call HOOK with DISK.
14268 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14269 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14270 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14271
14272 * normal/menu_entry.c (struct screen): Added a new member
14273 "completion_shown".
14274 (completion_buffer): New global variable.
14275 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14276 (store_completion): New function.
14277 (complete): Likewise.
14278 (clear_completions): Likewise.
14279 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14280 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14281 a tab, call complete.
14282
14283 * normal/completion.c (disk_dev): Removed.
14284 (print_simple_completion): Likewise.
14285 (print_partition_completion): Likewise.
14286 (print_func): New global variable.
14287 (add_completion): Do not take the arguments WHAT or PRINT any
14288 longer. Added a new argument TYPE. Instead of printing directly,
14289 call PRINT_FUNC if not NULL.
14290 All callers changed.
14291 (complete_device): Use a local variable DEV instead of
14292 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14293 (grub_normal_do_completion): Take a new argument HOOK. Do not
14294 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14295 empty string, return NULL instead.
14296 All callers changed.
14297
14298 * normal/cmdline.c (print_completion): New function.
14299
14300 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14301 to HOOK.
14302 All callers changed.
14303
14304 * kern/disk.c (grub_print_partinfo): Removed.
14305
14306 * include/grub/partition.h (struct grub_partition_map): Add a new
14307 argument DISK into HOOK of ITERATE.
14308 (grub_partition_iterate): Add a new argument DISK to HOOK.
14309
14310 * include/grub/normal.h (enum grub_completion_type): New enum.
14311 (grub_completion_type_t): New type.
14312 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14313 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14314 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14315 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14316 (grub_normal_do_completion): Added a new argument HOOK.
14317 (grub_normal_print_device_info): New prototype.
14318
14319 * include/grub/disk.h (grub_print_partinfo): Removed.
14320
14321 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14322 (normal_mod_SOURCES): Likewise.
14323 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14324 (normal_mod_SOURCES): Likewise.
14325
14326 * commands/ls.c (grub_ls_list_disks): Use
14327 grub_normal_print_device_info instead of grub_print_partinfo. Free
14328 PNAME.
14329 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14330 duplicating the code.
14331
14332 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14333
14334 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14335 follow GCS more precisely.
14336 * commands/i386/pc/vbe_test.c: Likewise.
14337 * include/grub/i386/pc/vbe.h: Likewise.
14338 * term/i386/pc/vesafb.c: Likewise.
14339 * video/i386/pc/vbe.c: Likewise.
14340
14341 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14342
14343 * DISTLIST: Added term/i386/pc/vesafb.c
14344 DISTLIST: Added video/i386/pc/vbe.c
14345 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14346 DISTLIST: Added commands/i386/pc/vbe_test.c.
14347 * commands/i386/pc/vbe_list_modes.c: New file.
14348 * commands/i386/pc/vbe_test.c: Likewise.
14349 * term/i386/pc/vesafb.c: Likewise.
14350 * video/i386/pc/vbe.c: Likewise.
14351 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14352 (grub_vbe_probe) Added prototype.
14353 (grub_vbe_set_video_mode) Likewise.
14354 (grub_vbe_get_video_mode) Likewise.
14355 (grub_vbe_get_video_mode_info) Likewise.
14356 (grub_vbe_set_pixel_rgb) Likewise.
14357 (grub_vbe_set_pixel_index) Likewise.
14358 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14359 (pkgdata_MODULES): Added vesafb.mod.
14360 (pkgdata_MODULES): Added vbe_list_modes.mod.
14361 (pkgdata_MODULES): Added vbe_test.mod.
14362 (vbe_mod_SOURCES): Added.
14363 (vbe_mod_CFLAGS): Likewise.
14364 (vesafb_mod_SOURCES): Likewise.
14365 (vesafb_mod_CFLAGS): Likewise.
14366 (vbe_list_modes_mod_SOURCES): Likewise.
14367 (vbe_list_modes_mod_CFLAGS): Likewise.
14368 (vbe_test_mod_SOURCES): Likewise.
14369 (vbe_test_mod_CFLAGS): Likewise.
14370
14371 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14372
14373 * normal/command.c (grub_command_execute): If INTERACTIVE is
14374 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14375 CMDLINE. Disable the pager if INTERACTIVE is true.
14376 All callers are changed.
14377
14378 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14379 before reading a config file.
14380 * normal/main.c (read_config_file): Even if a command is not
14381 found, register it if it is within an entry.
14382
14383 * util/grub-emu.c: Include sys/types.h and unistd.h.
14384 (options): Added --hold.
14385 (struct arguments): Added a new member "hold".
14386 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14387 missing.
14388 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14389 cleared by a debugger, if it is not zero.
14390
14391 * include/grub/normal.h (grub_command_execute): Add an argument
14392 INTERACTIVE.
14393
14394 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14395
14396 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14397
14398 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14399
14400 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14401 program with another one, because the old one didn't detect a bug
14402 in gcc-3.4. Always use regparm 2, because the new test is still
14403 not enough for gcc-4.0. Someone must investigate a simple test
14404 case which detects a bug in gcc-4.0.
14405
14406 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14407
14408 * DISTLIST: Added normal/completion.c.
14409
14410 * normal/completion.c: New file.
14411
14412 * term/i386/pc/console.c (grub_console_getwh): New function.
14413 (grub_console_term): Assign grub_console_getwh to getwh.
14414
14415 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14416 function is defined in normal/completion.c as
14417 grub_normal_do_completion.
14418 (grub_cmdline_get): Use grub_normal_do_completion instead of
14419 grub_tab_complete.
14420
14421 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14422 returns non-zero, otherwise return 0.
14423 (grub_partition_iterate): First, probe the partition map. Then,
14424 call ITERATE only for this partition map.
14425
14426 * kern/misc.c (grub_strncmp): Rewritten.
14427
14428 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14429 returns non-zero. Otherwise return 0.
14430
14431 * include/grub/partition.h (grub_partition_map_iterate): Return
14432 int instead of void.
14433
14434 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14435
14436 * include/grub/misc.h (grub_strncmp): Change the type of N to
14437 grub_size_t.
14438
14439 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14440 of void.
14441
14442 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14443 unsigned explicitly before comparing it with I.
14444
14445 * kern/main.c (grub_env_write_root): Add the attribute unused into
14446 VAR.
14447
14448 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14449 normal/completion.c.
14450 (normal_mod_SOURCES): Likewise.
14451 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14452 (normal_mod_SOURCES): Likewise.
14453
14454 * normal/command.c (grub_iterate_commands): If ITERATE returns
14455 non-zero, return one immediately.
14456
14457 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14458
14459 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14460 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14461 descriptions.
14462 (grub_vbe_get_controller_info): New function.
14463 (grub_vbe_get_mode_info): Likewise.
14464 (grub_vbe_set_mode): Likewise.
14465 (grub_vbe_get_mode): Likewise.
14466 (grub_vbe_set_memory_window): Likewise.
14467 (grub_vbe_get_memory_window): Likewise.
14468 (grub_vbe_set_scanline_length): Likewise.
14469 (grub_vbe_get_scanline_length): Likewise.
14470 (grub_vbe_set_display_start): Likewise.
14471 (grub_vbe_get_display_start): Likewise.
14472 (grub_vbe_set_palette_data): Likewise.
14473 * include/grub/i386/pc/vbe.h: New file.
14474
14475 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14476
14477 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14478 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14479 * DISTLIST: Likewise.
14480 * kern/ieee1275/of.c: Moved to ...
14481 * kern/ieee1275/ieee1275.c: ... here.
14482
14483 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14484
14485 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14486 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14487 Pass 0 as `end' parameter to grub_strtoul().
14488
14489 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14490
14491 * include/grub/powerpc/ieee1275/console.h: Do not include
14492 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14493 ifdef.
14494 (grub_console_cur_color): Remove i386-specific prototype.
14495 (grub_console_real_putchar): Likewise.
14496 (grub_console_checkkey): Likewise.
14497 (grub_console_getkey): Likewise.
14498 (grub_console_getxy): Likewise.
14499 (grub_console_gotoxy): Likewise.
14500 (grub_console_cls): Likewise.
14501 (grub_console_setcursor): Likewise.
14502 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14503 Include <grub/machine/console.h>.
14504 * term/ieee1275/ofconsole.c: Likewise.
14505
14506 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14507
14508 * Makefile.in (LIBLZO): New variable.
14509
14510 * configure.ac: Check for LZO version 2.
14511
14512 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14513 lzo/lzo1x.h instead of lzo1x.h.
14514
14515 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14516 of -llzo.
14517
14518 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14519 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14520
14521 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14522 copying the data from PARTITION to P.
14523
14524 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14525
14526 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14527 negative, unload the module.
14528
14529 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14530 map is "pc_partition_map" but not "pc".
14531 (usage): Fix the description. The options are --boot-image and
14532 --core-image but not --boot-file or --core-file.
14533 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14534 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14535 DEFAULT_DIRECTORY.
14536
14537 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14538 --core-file. Specify INSTALL_DEVICE as an argument.
14539
14540 * util/console.c: Include config.h.
14541 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14542 [HAVE_NCURSES_H]: Include ncurses.h.
14543 [HAVE_CURSES_H]: Include curses.h.
14544 [!A_NORMAL] (A_NORMAL): Defined as zero.
14545 [!A_STANDOUT] (A_STANDOUT): Likewise.
14546
14547 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14548 -lncurses.
14549 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14550
14551 * configure.ac: Check for curses libraries and headers.
14552
14553 * Makefile.in (LIBCURSES): New variable.
14554
14555 * genmk.rb (Script::rule): Set the executable bits.
14556
14557 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14558 name of the PC partition map is "pc_partition_map" but not "pc".
14559
14560 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14561
14562 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14563 (modules): Likewise.
14564 (usage): Added descriptions for --modules and --grub-probefs.
14565 Handle --modules and --grub-probefs. Save the arguments in MODULES
14566 and GRUB_PROBEFS, respectively.
14567 Auto-detect a filesystem module against GRUBDIR. If the result is
14568 empty and modules are not specified explicitly, abort the
14569 installation. Add the result to MODULES.
14570
14571 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14572 disk/powerpc/ieee1275/ofdisk.c,
14573 include/grub/powerpc/ieee1275/init.h and
14574 term/powerpc/ieee1275/ofconsole.c.
14575 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14576 term/ieee1275/ofconsole.c.
14577
14578 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14579
14580 * COPYING: Upgraded to the latest version. Only the address of the
14581 FSF office has changed.
14582
14583 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14584
14585 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14586 kern/ieee1275.c with kern/ieee1275/of.c.
14587
14588 * kern/ieee1275.c: Moved to ...
14589 * kern/ieee1275/of.c: ... here.
14590
14591 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14592
14593 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14594 readability.
14595
14596 * config.guess: Updated to the latest version from gnulib.
14597 * config.sub: Likewise.
14598 * install.sh: Likewise.
14599 * mkinstalldirs: Likewise.
14600
14601 * include/grub/console.h: Removed. This file is arch-specific. Do
14602 not put this in include/grub.
14603
14604 * include/grub/i386/pc/console.h: Resurrected.
14605
14606 * util/console.c: Include grub/machine/console.h instead of
14607 grub/console.h.
14608 * util/grub-emu.c: Likewise.
14609
14610 2005-08-04 Marco Gerards <metgerards@student.han.nl>
14611
14612 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14613 hardcoded value.
14614
14615 From Vincent Pelletier <subdino2004@yahoo.fr>
14616 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14617 Redefined to use grub_getwh.
14618 (grub_term): New member named getwh.
14619 (grub_getwh): New prototype.
14620 * kern/term.c (grub_getwh): New function.
14621 * term/i386/pc/console.c (grub_console_getwh): New function.
14622 (grub_console_term): New member `getwh'.
14623 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14624 (grub_vga_term): New member `getwh'.
14625 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14626 grub_ssize_t.
14627 (grub_ofconsole_getw): New function.
14628 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14629 (grub_ofconsole_term): New field named getwh and new initial
14630 value.
14631
14632 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14633
14634 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14635 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14636 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14637 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14638 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14639 of <grub/machine/ieee1275.h>.
14640 * commands/ieee1275/reboot.c: Likewise.
14641 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14642 * kern/ieee1275.c: ... to here. All users updated. Change all
14643 parameter structs to use new type `grub_ieee1275_cell_t'.
14644 * term/powerpc/ieee1275/ofconsole.c: Move ...
14645 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14646 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14647 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14648 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14649 to return int.
14650 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14651 Remove unused prototypes. All users updated.
14652 * include/grub/powerpc/ieee1275/console.h: Removed.
14653 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14654 `grub_ieee1275_cell_t'.
14655 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14656 Cast comparisons with -1 to the correct type.
14657 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14658 type to match `grub_ieee1275_entry_fn'.
14659
14660 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14661
14662 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14663
14664 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14665 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14666 partmap/sun.c.
14667 (grub_probefs_SOURCES): New variable.
14668
14669 * util/i386/pc/grub-probefs.c: New file.
14670
14671 * util/i386/pc/grub-setup.c (main): Call
14672 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14673 grub_hfs_init and grub_jfs_init to initialize the system. Call
14674 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14675 grub_pc_partition_map_fini to finish the system.
14676
14677 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14678
14679 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14680 function.
14681 (grub_multiboot_load_elf32): Likewise.
14682 (grub_multiboot_is_elf64): Likewise.
14683 (grub_multiboot_load_elf64): Likewise.
14684 (grub_multiboot_load_elf): Likewise.
14685 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14686 an ELF32 or ELF64 file.
14687 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14688
14689 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14690 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14691 NULL before calling FS->LABEL.
14692 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14693 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14694 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14695 before calling FS->LABEL.
14696
14697 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14698
14699 * util/i386/pc/grub-install.in (datadir): New variable.
14700 (libdir): Removed.
14701 (pkgdatadir): New variable.
14702 (pkglibdir): Removed.
14703
14704 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14705
14706 * DISTLIST: Added util/i386/pc/grub-install.in.
14707
14708 * util/i386/pc/grub-install.in: New file.
14709
14710 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14711 (grub_install_SOURCES): Likewise.
14712
14713 * genmk.rb: Added support for scripts.
14714 (Script): New class.
14715 (scripts): New variable.
14716
14717 * Makefile.in (install-local): Install sbin_SCRIPTS by
14718 INSTALL_SCRIPT.
14719 (uninstall): Remove sbin_SCRIPTS.
14720
14721 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14722 device, try to get a GRUB device by
14723 grub_util_biosdisk_get_grub_dev.
14724 Free DEST_DEV.
14725
14726 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14727 description for --device-map.
14728
14729 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14730
14731 Change the semantics of variable hooks. They now return strings
14732 instead of error values.
14733
14734 * util/i386/pc/grub-setup.c: Include grub/env.h.
14735 (setup): Use grub_device_set_root instead of grub_env_set.
14736
14737 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14738 grub_env_get instead of grub_device_set_root and
14739 grub_device_get_root, respectively.
14740
14741 * kern/main.c (grub_env_write_root): New function.
14742 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14743 grub_env_set instead of grub_device_set_root.
14744
14745 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14746 many variables.
14747 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14748 rather than calling ENV->WRITE_HOOK afterwards.
14749 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14750 passing a pointer of a pointer.
14751 (grub_register_variable_hook): Change the types of "read_hook" and
14752 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14753 respectively.
14754 Allocate the default empty string on the heap, because this string
14755 may be freed later.
14756
14757 * kern/device.c: Include grub/env.h.
14758 (grub_device_set_root): Removed.
14759 (grub_device_get_root): Likewise.
14760 (grub_device_open): Use grub_env_get instead of
14761 grub_device_get_root.
14762
14763 * include/grub/env.h (grub_env_read_hook_t): New type.
14764 (grub_env_write_hook_t): Likewise.
14765 (grub_env_var): Change the types of "read_hook" and "write_hook"
14766 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14767 (grub_register_variable_hook): Likewise.
14768
14769 * include/grub/device.h (grub_device_set_root): Removed.
14770 (grub_device_set_root): Likewise.
14771
14772 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14773 make sure that DIRNAME terminates with '/', so that
14774 grub_fat_find_dir will fail if PATH is not a directory.
14775
14776 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14777 from DIRNAME.
14778 Use the qualifier auto for print_files and print_files_long.
14779 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14780 as a regular file.
14781 Put a newline only if there is no error.
14782 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14783 used.
14784
14785 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14786
14787 * kern/partition.c (grub_partition_probe): Initialize PART to
14788 NULL. Otherwise, when no partition map is registered, this returns
14789 a garbage.
14790
14791 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14792
14793 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14794 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14795 valid.
14796
14797 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14798
14799 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14800 information on each device, if it does not have partitions. Print
14801 "Device" instead of "Disk", because this function is not specific
14802 to disk devices.
14803
14804 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14805 static to ensure that it is put on the memory rather than a
14806 register.
14807
14808 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14809
14810 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14811 (grub_cat_init): Likewise.
14812 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14813 (options): Likewise.
14814 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14815 (grub_configfile_init): Likewise.
14816 * font/manager.c (GRUB_MOD_INIT): Likewise.
14817 * commands/help.c (GRUB_MOD_INIT): Likewise.
14818 (grub_help_init): Likewise.
14819 * normal/command.c (grub_command_init): Likewise.
14820 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14821 * disk/loopback.c (grub_loop_init): Likewise.
14822 (GRUB_MOD_INIT): Likewise.
14823 * commands/ls.c (grub_ls_init): Likewise.
14824 (GRUB_MOD_INIT): Likewise.
14825 (options): Likewise.
14826 * commands/boot.c (grub_boot_init): Likewise.
14827 (GRUB_MOD_INIT): Likewise.
14828 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14829 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14830 (GRUB_MOD_INIT): Likewise.
14831 * commands/cmp.c (grub_cmp_init): Likewise.
14832 (GRUB_MOD_INIT): Likewise.
14833
14834 * normal/arg.c: Use <> instead of "" to include header files.
14835 (SHORT_ARG_HELP): New macro.
14836 (SHORT_ARG_USAGE): Likewise.
14837 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14838 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14839 descriptions.
14840 (find_short): Check if C is 'h' or 'u' explicitly.
14841 (grub_arg_show_help): Use space characters instead of tabs. Treat
14842 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14843 are shown with --help and --usage only if they are not used for
14844 the command itself.
14845 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14846 'h' and 'u'.
14847
14848 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14849 const into "longarg". Change the type of "shortarg" to int.
14850
14851 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14852
14853 * boot/i386/pc/boot.S (boot_drive_check): New label.
14854
14855 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14856 macro.
14857
14858 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14859 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14860
14861 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14862
14863 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14864 When turning off Gate A20, skip the check and return immediately,
14865 because this is not fatal usually.
14866
14867 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14868
14869 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14870 be 0x7C00 instead of 0x8000.
14871
14872 * boot/i386/pc/pxeboot.S: Rewritten.
14873
14874 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14875 EXT_C.
14876 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14877 result.
14878
14879 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14880
14881 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14882 robustness. This routine now supports a BIOS call and System
14883 Control Port A to modify the gate A20.
14884
14885 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14886 Increased to 0x440.
14887
14888 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14889
14890 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14891 device path and resulting ihandle.
14892 (grub_ofdisk_close): dprintf the ihandle being closed.
14893 (grub_ofdisk_read): dprintf function parameters.
14894 * kern/mm.c (grub_mm_init_region): Likewise.
14895 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14896 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14897 size, and boot arguments.
14898 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14899 before loading into memory.
14900 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14901 before loading into memory.
14902
14903 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14904
14905 * kern/mm.c: Added much documentation.
14906 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14907 8, set to 5 instead of 8.
14908
14909 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14910
14911 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14912
14913 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14914 (grub_mkdevicemap_SOURCES): New variable.
14915
14916 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14917 lib/device.c of GRUB Legacy.
14918
14919 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14920
14921 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14922 instead of PATH is NULL.
14923
14924 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14925
14926 * commands/cmp.c (BUFFER_SIZE): New macro.
14927 (grub_cmd_cmp): Close the right file at the right time. Compare
14928 only data just read. Don't report files of different size as
14929 identical. Dynamically allocate buffers. Move variable
14930 declarations at the beginning of function.
14931
14932 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14933
14934 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14935 reverse.
14936
14937 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14938
14939 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14940 when backspace is pressed at beginning of line.
14941
14942 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14943
14944 * DISTLIST: Added genfslist.sh.
14945
14946 * normal/main.c (fs_module_list): New variable.
14947 (autoload_fs_module): New function.
14948 (read_fs_list): Likewise.
14949 (grub_normal_execute): Call read_fs_list.
14950
14951 * kern/fs.c (grub_fs_autoload_hook): New variable.
14952 (grub_fs_probe): Added support for auto-loading.
14953
14954 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14955 (grub_fs_module_list_t): New type.
14956
14957 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14958 (grub_fs_autoload_hook): New prototype.
14959
14960 * genfslist.sh: New file.
14961
14962 * genmk.rb: Added a rule to generate a filesystem list.
14963
14964 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14965
14966 * configure.ac: Fix the test for cross-compiling.
14967
14968 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14969 define GRUB_UTIL anymore.
14970
14971 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14972 so this function works on other systems than just big endian.
14973 (load_modules): Likewise.
14974 (add_segments): Likewise.
14975
14976 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14977
14978 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14979 contains `l' modifier, get a long from va_arg().
14980
14981 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14982
14983 * kern/mm.c (grub_free): If the next free block which is being
14984 merged is the first free block, set the first block to the block
14985 being freed.
14986 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14987
14988 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14989
14990 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14991 `grub_ieee1275_chosen'.
14992
14993 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14994
14995 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14996 (grub_ieee1275_chosen): New variable.
14997 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14998 `chosen'.
14999 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15000 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15001 Rename first argument to `phandle' for consistency.
15002 (grub_ieee1275_get_property_length): Likewise.
15003 (grub_ieee1275_next_property): Likewise. Change type of first argument
15004 to grub_ieee1275_phandle_t.
15005 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15006 Move export next to declaration.
15007 (grub_ieee1275_chosen): New variable.
15008 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15009 Correct cosmetic typo.
15010 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15011 `grub_ieee1275_chosen'.
15012 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15013 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15014 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15015 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15016 `grub_ieee1275_chosen'.
15017
15018 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15019
15020 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15021 /chosen/bootargs.
15022 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15023 /chosen/bootargs as "variable=value" pairs.
15024
15025 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15026
15027 * include/grub/misc.h (grub_dprintf): New macro.
15028 (grub_real_dprintf): New prototype.
15029 (grub_strword): Likewise.
15030 (grub_iswordseparator): Likewise.
15031 * kern/misc.c (grub_real_dprintf): New function.
15032 (grub_strword): Likewise.
15033 (grub_iswordseparator): Likewise.
15034
15035 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15036
15037 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15038 (roundup): Remove macro.
15039 (grub_ieee1275_flags): Make static.
15040 (grub_ieee1275_realmode): Remove.
15041 (grub_ieee1275_test_flag): New function.
15042 (grub_ieee1275_set_flag): Likewise.
15043 (find_options): Rename to `grub_ieee1275_find_options'; update
15044 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15045 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15046 (cmain): New prototype.
15047 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15048 `grub_ieee1275_flags' directly.
15049 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15050 machine/biosdisk.h.
15051 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15052 Don't include grub/machine/init.h.
15053 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15054 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15055 Remove prototype.
15056 (grub_ieee1275_realmode): Likewise.
15057 (grub_ieee1275_flag): New enum.
15058 (grub_ieee1275_test_flag): New prototype.
15059 (grub_ieee1275_set_flag): New prototype.
15060 * include/grub/powerpc/ieee1275/init.h: Remove file.
15061 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15062 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15063 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15064 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15065 comment.
15066 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15067 `grub_ieee1275_test_flag'.
15068 (grub_ieee1275_encode_devname): Likewise.
15069
15070 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15071
15072 * include/grub/powerpc/ieee1275/ieee1275.h
15073 (grub_ieee1275_encode_devname): New prototype.
15074 (grub_ieee1275_get_filename): Likewise.
15075 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15076 function.
15077 (grub_set_prefix): Likewise.
15078 (grub_machine_init): Call grub_set_prefix.
15079 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15080 (grub_parse_type): New enum.
15081 (grub_ieee1275_get_devargs): New function.
15082 (grub_ieee1275_get_devname): Likewise.
15083 (grub_ieee1275_parse_args): Likewise.
15084 (grub_ieee1275_get_filename): Likewise.
15085 (grub_ieee1275_encode_devname): Likewise.
15086
15087 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15088
15089 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15090 `grub_loader_unset'.
15091
15092 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15093
15094 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15095 instead of grub_ieee1275_interpret.
15096 (grub_halt_init): New function.
15097 (grub_halt_fini): Likewise.
15098 (GRUB_MOD_INIT): Correct message grammar.
15099 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15100 instead of grub_ieee1275_interpret.
15101 (grub_reboot_init): New function.
15102 (grub_reboot_fini): Likewise.
15103 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15104 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15105 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15106 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15107 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15108 function.
15109 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15110 Add prototype.
15111 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15112 prototype.
15113 (grub_halt): Likewise.
15114 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15115 (cmain): Remove __attribute__((unused)).
15116 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15117 (grub_heap_len): Likewise.
15118 (grub_machine_fini): New function.
15119 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15120 (grub_halt): Likewise.
15121 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15122 function.
15123 * util/powerpc/ieee1275/misc.c: New file.
15124
15125 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15126
15127 * DISTLIST: New file.
15128 * gendistlist.sh: Likewise.
15129
15130 * Makefile.in (COMMON_DISTFILES): Removed.
15131 (BOOT_DISTFILES): Likewise.
15132 (CONF_DISTFILES): Likewise.
15133 (DISK_DISTFILES): Likewise.
15134 (FS_DISTFILES): Likewise.
15135 (INCLUDE_DISTFILES): Likewise.
15136 (KERN_DISTFILES): Likewise.
15137 (LOADER_DISTFILES): Likewise.
15138 (TERM_DISTFILES): Likewise.
15139 (UTIL_DISTFILES): Likewise.
15140 (DISTFILES): Likewise.
15141 (uninstall): Uninstall files in $(pkgdata_DATA).
15142 (DISTLIST): New target.
15143 (distdir): Use the contents of the file DISTLIST to get a list of
15144 distributed files.
15145
15146 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15147
15148 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15149 descriptor. This is ported from GRUB Legacy.
15150
15151 * gencmdlist.sh: Added an extra semicolon to make it work with
15152 old sed versions. Reported by Robert Bihlmeyer
15153 <robbe@orcus.priv.at>.
15154
15155 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
15156
15157 Automatic loading of commands is supported.
15158
15159 * normal/main.c (read_command_list): New function.
15160 (grub_normal_execute): Call read_command_list.
15161
15162 * normal/command.c (grub_register_command): Return zero or CMD.
15163 Allocate CMD->NAME from the heap.
15164 Initialize CMD->MODULE_NAME to zero.
15165 Find the same name as well. If the same command is found and it is
15166 a dummy command, overwrite members. If it is not a dummy command,
15167 return zero.
15168 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15169 (grub_command_find): If a dummy command is found, load a module
15170 and retry to find a command only once.
15171
15172 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15173 make sure that each command is loaded.
15174
15175 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15176 macro.
15177 (struct grub_command): Remove const from the member `name'.
15178 Add a new member `module_name'.
15179 (grub_register_command): Return grub_command_t.
15180
15181 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15182 sure that each command is loaded.
15183
15184 * genmk.rb (PModule::rule): Specify a module name without the
15185 suffix ".mod" to gencmdlist.sh.
15186
15187 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15188
15189 * gencmdlist.sh: New file.
15190
15191 * genmk.rb (PModule::rule): Generate a rule for a command list.
15192 Clean command.lst.
15193 Generate command.lst from $(COMMANDFILES).
15194
15195 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15196 (DATA): Added $(pkgdata_DATA).
15197 (install-local): Install files in $(pkgdata_DATA).
15198
15199 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15200
15201 * term/i386/pc/vga.c (debug_command): Removed.
15202 (GRUB_MOD_INIT): Do not register the command "debug".
15203
15204 From Hollis Blanchard:
15205 * commands/configfile.c: New file.
15206 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15207 commands/configfile.c.
15208 (pkgdata_MODULES): Added configfile.mod.
15209 (configfile_mod_SOURCES): New variable.
15210 (configfile_mod_CFLAGS): Likewise.
15211 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15212 commands/configfile.c.
15213 (pkgdata_MODULES): Added configfile.mod.
15214 (configfile_mod_SOURCES): New variable.
15215 (configfile_mod_CFLAGS): Likewise.
15216 * util/grub-emu.c (main): Call grub_configfile_init and
15217 grub_configfile_fini.
15218 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15219 prototype.
15220 [GRUB_UTIL] (grub_configfile_fini): Likewise.
15221
15222 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15223
15224 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15225 address.
15226
15227 * commands/help.c (grub_cmd_help): Do not print newlines after
15228 the last command in print_command_help.
15229
15230 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15231
15232 * commands/default.h: New file.
15233 * commands/timeout.h: Likewise.
15234 * normal/context.c: Likewise.
15235
15236 * util/misc.c: Do not include sys/times.h.
15237 Include sys/time.h and grub/machine/time.h.
15238 (grub_get_rtc): Rewritten with gettimeofday.
15239
15240 * util/grub-emu.c (main): Call grub_default_init and
15241 grub_timeout_init before grub_normal_init, and call
15242 grub_timeout_fini and grub_default_fini after grub_main.
15243
15244 * util/console.c (grub_ncurses_checkkey): Return the read
15245 character or -1.
15246
15247 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15248 timeouts.
15249
15250 * normal/main.c (read_config_file): Push MENU. If this fails,
15251 print an error and wait for a user input.
15252 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15253 If a menu is empty or an error occurs, pop MENU.
15254 (grub_normal_execute): Pop and free MENU after grub_menu_run
15255 returns.
15256
15257 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15258
15259 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15260 include time.h.
15261 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15262 without GRUB_UTIL.
15263 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15264 time.h.
15265 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15266 without GRUB_UTIL.
15267
15268 * include/grub/normal.h (struct grub_menu_list): New struct.
15269 (grub_menu_list_t): New type.
15270 (struct grub_context): New struct.
15271 (grub_context_t): New type.
15272 (grub_register_command): Got rid of EXPORT_FUNC.
15273 (grub_unregister_command): Likewise.
15274 (grub_context_get): New prototype.
15275 (grub_context_get_current_menu): Likewise.
15276 (grub_context_push_menu): Likewise.
15277 (grub_context_pop_menu): Likewise.
15278 [GRUB_UTIL] (grub_default_init): Likewise.
15279 [GRUB_UTIL] (grub_default_fini): Likewise.
15280 [GRUB_UTIL] (grub_timeout_init): Likewise.
15281 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15282
15283 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15284 commands/timeout.c and normal/context.c.
15285 (pkgdata_MODULES): Added default.mod and timeout.mod.
15286 (normal_mod_SOURCES): Added normal/context.c.
15287 (default_mod_SOURCES): New variable.
15288 (default_mod_CFLAGS): Likewise.
15289 (timeout_mod_SOURCES): Likewise.
15290 (timeout_mod_CFLAGS): Likewise.
15291 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15292 conf/i386-pc.rmk.
15293 (pkgdata_MODULES): Added default.mod and timeout.mod.
15294 (normal_mod_SOURCES): Added normal/context.c.
15295 (default_mod_SOURCES): New variable.
15296 (default_mod_CFLAGS): Likewise.
15297 (timeout_mod_SOURCES): Likewise.
15298 (timeout_mod_CFLAGS): Likewise.
15299
15300 * Makefile.in (all-local): Added $(MKFILES).
15301
15302 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15303
15304 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15305 (grub_emu_SOURCES): Likewise.
15306 (pkgdata_MODULES): Add `sun.mod'.
15307 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15309 `partmap/sun.c'.
15310 (pkgdata_MODULES): Add `sun.mod'.
15311 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15312 * include/grub/partition.h (grub_sun_partition_map_init): New
15313 prototype.
15314 (grub_sun_partition_map_fini): Likewise.
15315 * partmap/sun.c: New file.
15316 * util/grub-emu.c (main): Initialize and de-initialize the sun
15317 partitionmap support.
15318
15319 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15320
15321 This implements an Emacs-like menu entry editor.
15322
15323 * normal/menu_entry.c: New file.
15324
15325 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15326 characters to ASCII.
15327 (saved_char): New variable.
15328 (grub_ncurses_checkkey): Rewritten completely.
15329 (grub_ncurses_getkey): Likewise.
15330 (grub_ncurses_init): Call raw instead of cbreak.
15331
15332 * normal/menu.c (print_entry): Do not put a space.
15333 (init_page): Renamed to ...
15334 (grub_menu_init_page): ... this. All callers changed.
15335 (edit_menu_entry): Removed.
15336 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15337
15338 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15339
15340 * kern/misc.c (grub_vprintf): Call grub_refresh.
15341
15342 * normal/menu.c (DISP_LEFT): Renamed to ...
15343 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15344 * normal/menu.c (DISP_UP): Renamed to ...
15345 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15346 * normal/menu.c (DISP_RIGHT): Renamed to ...
15347 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15348 * normal/menu.c (DISP_DOWN): Renamed to ...
15349 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15350 * normal/menu.c (DISP_HLINE): Renamed to ...
15351 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15352 * normal/menu.c (DISP_VLINE): Renamed to ...
15353 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15354 * normal/menu.c (DISP_UL): Renamed to ...
15355 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15356 * normal/menu.c (DISP_UR): Renamed to ...
15357 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15358 * normal/menu.c (DISP_LL): Renamed to ...
15359 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15360 * normal/menu.c (DISP_LR): Renamed to ...
15361 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15362 * normal/menu.c (TERM_WIDTH): Renamed to ...
15363 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15364 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15365 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15366 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15367 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15368 * normal/menu.c (TERM_MARGIN): Renamed to ...
15369 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15370 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15371 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15372 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15373 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15374 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15375 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15376 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15377 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15378 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15379 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15380 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15381 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15382 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15383 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15384 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15385 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15386 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15387 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15388 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15389 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15390 All callers changed.
15391
15392 * include/grub/normal.h: New prototype.
15393
15394 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15395 normal/menu_entry.c.
15396 (normal_mod_SOURCES): Likewise.
15397 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15398 (normal_mod_SOURCES): Likewise.
15399
15400 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15401
15402 * include/grub/normal.h (grub_halt_init): New prototype.
15403 (grub_halt_fini): Likewise.
15404 (grub_reboot_init): Likewise.
15405 (grub_reboot_fini): Likewise.
15406
15407 * util/grub-emu.c: Include signal.h.
15408 (main_env): New global variable.
15409 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15410 catch C-c.
15411 (grub_machine_fini): New function.
15412 (main): Call grub_halt_init and grub_reboot_init before
15413 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15414 Call setjmp with MAIN_ENV to go back afterwards.
15415 Call grub_machine_fini right before return.
15416
15417 * include/grub/util/misc.h: Include setjmp.h.
15418 (main_env): New prototype.
15419
15420 * include/grub/kernel.h (grub_machine_fini): New prototype.
15421 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15422 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15423
15424 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15425 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15426 * term/i386/pc/console.c (grub_console_fini): Likewise.
15427
15428 * util/i386/pc/misc.c: New file.
15429
15430 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15431 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15432 commands/i386/pc/reboot.c.
15433
15434 2005-02-14 Guillem Jover <guillem@hadrons.org>
15435
15436 * include/grub/dl.h (grub_dl_check_header): New prototype.
15437 (grub_arch_dl_check_header): Change return type to grub_err_t,
15438 remove size parameter and export function. Update all callers.
15439 * kern/dl.c (grub_dl_check_header): New function.
15440 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15441 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15442 are inside the core.
15443 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15444 independent ELF header checks.
15445 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15446 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15447 `grub_dl_check_header' instead of explicit checks. Check for the
15448 ELF type.
15449 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15450 `grub_dl_check_header' instead of explicit checks. Remove arch
15451 specific ELF header checks.
15452
15453 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15454 argument SIZE.
15455
15456 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15457
15458 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15459 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15460
15461 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15462
15463 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15464 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15465 (part_map_iterate): Clear `grub_errno' and return 0 if
15466 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15467 * partmap/amiga.c (amiga_partition_map_iterate): Return
15468 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15469 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15470
15471 2005-02-01 Guillem Jover <guillem@hadrons.org>
15472
15473 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15474 help info.
15475
15476 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15477
15478 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15479 Removed prototype.
15480 (grub_rescue_cmd_linux): New prototype.
15481 (grub_rescue_cmd_initrd): Likewise.
15482 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15483 `bi_rec'.
15484 (grub_linux_release_mem): Release the memory for the initrd.
15485 (grub_load_linux): Renamed from this...
15486 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15487 Changed `entry' not to be static. Loop over memory regions to
15488 find another one when the default fails.
15489 (grub_rescue_cmd_initrd): New function.
15490 (grub_linux_init): Remove function.
15491 (grub_linux_fini): Likewise.
15492 (GRUB_MOD_INIT): Register `initrd'.
15493 (GRUB_MOD_FINI): Unregister `initrd'.
15494 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15495 Function removed.
15496 (grub_linux_normal_fini): Likewise.
15497 (GRUB_MOD_INIT): Register `initrd'.
15498 (GRUB_MOD_FINI): Unregister `initrd'.
15499
15500 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15501
15502 * commands/help.c: New file.
15503 * normal/arg.c (show_help): Renamed to...
15504 (grub_arg_show_help): ... this.
15505 * commands/i386/pc/halt.c: New file.
15506 * commands/i386/pc/reboot.c: Likewise.
15507 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15508 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15509 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15510 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15511 variables.
15512 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15513 `commands/help.c'.
15514 (pkgdata_MODULES): Add `help.mod'.
15515 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15516 * grub/i386/pc/init.h (grub_reboot): New prototype.
15517 (grub_halt): Likewise.
15518 * include/grub/normal.h (grub_arg_show_help): New prototype.
15519 (grub_help_init): Likewise.
15520 (grub_help_fini): Likewise.
15521 * util/grub-emu.c (main): Initialize and deinitialize the help
15522 command.
15523
15524 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15525
15526 * normal/command.c (grub_command_init): Fixed the description of
15527 the `set' and `unset' commands.
15528
15529 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15530
15531 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15532 function.
15533 * commands/ieee1275/halt.c: New file.
15534 * commands/ieee1275/reboot.c: Likewise.
15535 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15536 `__attribute__ ((unused))'. Some GCS related fixed.
15537 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15538 (grub_suspend_fini): Likewise.
15539 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15540 and `halt.mod'.
15541 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15542 (halt_mod_CFLAGS): New variables.
15543 * include/grub/powerpc/ieee1275/ieee1275.h
15544 (grub_ieee1275_interpret): New prototype.
15545
15546 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15547
15548 * include/grub/misc.h (memmove): New prototype.
15549 (memcpy): Likewise.
15550
15551 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15552
15553 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15554 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15555
15556 2005-01-22 Marco Gerards <metgerards@student.han.nl>
15557
15558 * kern/misc.c (grub_strndup): Function rewritten.
15559
15560 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15561
15562 * normal/menu.c (TERM_WIDTH): Macro redefined.
15563 (TERM_TOP_BORDER_Y): Likewise.
15564 (draw_border): Replaced while-loop by a for-loop. Make the number
15565 of lines consistent with the number of lines displayed in
15566 print_entries. Added a margin below the rectangle.
15567 (print_entry): Make the entry fit in the rectangle.
15568 (print_entries): Display the scroll arrows next to the right
15569 border.
15570
15571 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15572
15573 * fs/minix.c (grub_minix_find_file): Reserve more space for
15574 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15575 `grub_strncpy' to copy `path' into it.
15576
15577 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15578
15579 Add the loopback device, a device via which files can be accessed
15580 as devices.
15581
15582 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15583 (pkgdata_MODULES): Add loopback.mod.
15584 (loopback_mod_SOURCES): New variable.
15585 (loopback_mod_CFLAGS): Likewise.
15586 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15587 `disk/loopback.c'.
15588 (pkgdata_MODULES): Add loopback.mod.
15589 (loopback_mod_SOURCES): New variable.
15590 (loopback_mod_CFLAGS): Likewise.
15591 * disk/loopback.c: new file.
15592 * include/grub/normal.h (grub_loop_init): New prototype.
15593 (grub_loop_fini): New prototype.
15594 * util/grub-emu.c (main): Initialize and de-initialize loopback
15595 support.
15596 * include/grub/disk.h (grub_disk_dev_id): Add
15597 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15598
15599 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15600
15601 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15602 function.
15603 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15604 (suspend_mod_SOURCES): New variable.
15605 (suspend_mod_CFLAGS): Likewise.
15606 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15607 New prototype.
15608 * commands/ieee1275/suspend.c: New file.
15609
15610 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15611
15612 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15613 ((unused))' to `__attribute__ ((used))'.
15614 (GRUB_MOD_FINI): Likewise.
15615 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15616 * genmk.rb (PModule): Assign space to common symbols when linking
15617 modules.
15618
15619 2005-01-20 Marco Gerards <metgerards@student.han.nl>
15620
15621 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15622 `unsigned' arguments to `grub_size_t'.
15623 (grub_malloc): Likewise.
15624 (grub_realloc): Likewise.
15625 (grub_memalign): Likewise.
15626 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15627 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15628 * util/misc.c (grub_malloc): Likewise.
15629 (grub_realloc): Likewise.
15630 * kern/mm.c (get_header_from_pointer): Change the casts to
15631 `unsigned' into a cast to `grub_size_t'.
15632
15633 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15634 point to `currnode' when `currnode' is changed.
15635
15636 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15637 Schottelius <nico-linux@schottelius.org>.
15638
15639 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15640
15641 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15642 (note_path): Remove variable.
15643 (GRUB_IEEE1275_NOTE_NAME): New macro.
15644 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15645 (grub_ieee1275_note_hdr): New structure.
15646 (grub_ieee1275_note_desc): Likewise.
15647 (grub_ieee1275_note): Likewise.
15648 (load_note): Remove `dir' argument. All callers updated. Remove
15649 `note_img' and `path'. Do not load a file from `note_path'.
15650 Initialize a struct grub_ieee1275_note and write that to `out'.
15651 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15652
15653 2005-01-05 Marco Gerards <metgerards@student.han.nl>
15654
15655 * util/misc.c (grub_util_read_image): Revert last change. It
15656 called `grub_util_read_at', which seeks from the beginning of the
15657 file.
15658
15659 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15660
15661 * TODO: Add note about endianness in grub-mkimage.
15662 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15663 section.
15664 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15665 (grub_mkimage_SOURCES): New target.
15666 * include/grub/kernel.h (grub_start_addr): Remove variable.
15667 (grub_end_addr): Likewise.
15668 (grub_total_module_size): Likewise.
15669 (grub_kernel_image_size): Likewise.
15670 (GRUB_MODULE_MAGIC): New constant.
15671 (grub_module_info): New structure.
15672 (grub_arch_modules_addr): New prototype.
15673 (grub_get_end_addr): Remove prototype.
15674 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15675 * include/grub/powerpc/ieee1275/kernel.h: New file.
15676 * include/grub/util/misc.h (grub_util_get_fp_size): New
15677 prototype.
15678 (grub_util_read_at): Likewise.
15679 (grub_util_write_image_at): Likewise.
15680 * kern/main.c (grub_get_end_addr): Remove function.
15681 (grub_load_modules): Call grub_arch_modules_addr instead of using
15682 grub_end_addr. Look for a grub_module_info struct in memory. Use
15683 the grub_module_info fields instead of calling grub_get_end_addr
15684 as loop conditions. Move grub_add_unused_region code here.
15685 (grub_add_unused_region): Remove function.
15686 * kern/i386/pc/init.c: Include grub/cache.h.
15687 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15688 one call to add_mem_region.
15689 (grub_arch_modules_addr): New function.
15690 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15691 (grub_total_module_size): Likewise.
15692 Include grub/machine/kernel.h.
15693 (grub_arch_modules_addr): New function.
15694 * util/grub-emu.c (grub_end_addr): Remove variable.
15695 (grub_total_module_size): Likewise.
15696 (grub_arch_modules_addr): New function.
15697 * util/misc.c: Include unistd.h.
15698 (grub_util_get_fp_size): New function.
15699 (grub_util_read_at): Likewise.
15700 (grub_util_write_image_at): Likewise.
15701 (grub_util_read_image): Call grub_util_read_at.
15702 (grub_util_write_image): Call grub_util_write_image_at.
15703 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15704 additional memory in kernel_img for a struct grub_module_info.
15705 Fill in that grub_module_info.
15706 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15707
15708 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15709
15710 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15711 New function.
15712 * include/grub/powerpc/ieee1275/ieee1275.h
15713 (grub_ieee1275_milliseconds): New prototype.
15714 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15715 Change to 1000.
15716 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15717 grub_ieee1275_milliseconds.
15718
15719 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15720
15721 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15722 variable.
15723 (find_options): New function.
15724 (cmain): Call find_options.
15725 * include/grub/powerpc/ieee1275/ieee1275.h
15726 (grub_ieee1275_realmode): New extern variable.
15727 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15728 grub_map if grub_ieee1275_realmode is false.
15729
15730 2004-12-29 Marco Gerards <metgerards@student.han.nl>
15731
15732 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15733 lines are inserted and make it work like readline. Reported by
15734 Vincent Pelletier <subdino2004@yahoo.fr>.
15735
15736 2004-12-28 Marco Gerards <metgerards@student.han.nl>
15737
15738 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15739
15740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15741 `kern/powerpc/cache.S'.
15742
15743 2004-12-27 Marco Gerards <metgerards@student.han.nl>
15744
15745 * genmk.rb: Handle the `Program' class in the main loop. Written
15746 by Johan Rydberg <jrydberg@gnu.org>.
15747 (Program): New class.
15748 (programs): New variable.
15749 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15750 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15751 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15752 (help_arch): Function removed.
15753 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15754 `powerpc/libgcc.h' and `loader.h'.
15755 (pkgdata_PROGRAMS): New variable.
15756 (sbin_UTILITIES): Variable removed.
15757 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15758 (grubof_SOURCES): Variable re-defined so it only includes the
15759 core functionality.
15760 (grubof_CFLAGS): Remove `-DGRUBOF'.
15761 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15762 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15763 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15764 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15765 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15766 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15767 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15768 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15769 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15770 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15771 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15772 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15773 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15774 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15775 (pc_mod_CFLAGS): New variables.
15776 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15777 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15778 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15779 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15780 Moved from here...
15781 * include/grub/i386/pc/init.h (grub_os_area_addr)
15782 (rub_os_area_size): ... to here.
15783 * include/grub/powerpc/ieee1275/ieee1275.h
15784 (grub_ieee1275_entry_fn): Export symbol.
15785 * include/grub/powerpc/ieee1275/init.h: New file.
15786 * include/grub/powerpc/libgcc.h: Likewise.
15787 * include/grub/cache.h: Likewise.
15788 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15789 <hollis@penguinppc.org>.
15790 * kern/dl.c: Include <grub/cache.h>.
15791 (grub_dl_flush_cache): New function.
15792 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15793 for this module.
15794 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15795 (grub_console_init): Removed prototypes.
15796 (grub_machine_init): Don't initialize the modules anymore.
15797 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15798 static.
15799 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15800 Macro undef removed.
15801 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15802 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15803 relocation `R_PPC_REL32'. Return an error when the relocation is
15804 unknown.
15805 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15806 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15807 * util/misc.c (grub_arch_sync_caches): Likewise.
15808
15809 2004-12-19 Marco Gerards <metgerards@student.han.nl>
15810
15811 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15812 `symlist.c', add `grubof_symlist.c'.
15813 (symlist.c): Variable removed.
15814 (grubof_HEADERS): Variable added.
15815 (grubof_symlist.c): New target.
15816 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15817 `kernel_img_HEADERS'.
15818 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15819 * kern/powerpc/dl.c: New file.
15820 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15821 Function removed.
15822 (grub_arch_dl_relocate_symbols): Likewise.
15823 (grub_register_exported_symbols): Likewise.
15824
15825 2004-12-13 Marco Gerards <metgerards@student.han.nl>
15826
15827 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15828 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15829 to fail instead. Reported by Vincent Pelletier
15830 <subdino2004@yahoo.fr>.
15831
15832 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15833 it is not allocated. Reported by Vincent Pelletier
15834 <subdino2004@yahoo.fr>.
15835
15836 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15837 output so the output looks better.
15838
15839 2004-12-04 Marco Gerards <metgerards@student.han.nl>
15840
15841 Modulize the partition map support and add support for the amiga
15842 partition map.
15843
15844 * commands/ls.c: Include <grub/partition.h> instead of
15845 <grub/machine/partition.h>.
15846 * kern/disk.c: Likewise.
15847 * kern/rescue.c: Likewise.
15848 * loader/i386/pc/chainloader.c: Likewise.
15849 * normal/cmdline.c: Likewise.
15850 * kern/powerpc/ieee1275/init.c: Likewise.
15851 (grub_machine_init): Call `grub_pc_partition_map_init',
15852 `grub_amiga_partition_map_init' and
15853 `grub_apple_partition_map_init'.
15854 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15855 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15856 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15857 `partition.h' and `pc_partition.h'.
15858 (grub_setup_SOURCES): Remove
15859 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15860 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15861 (grub_emu_SOURCES): Likewise.
15862 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15863 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15864 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15865 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15866 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15867 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15868 (grubof_SOURCES): Likewise.
15869 * disk/i386/pc/partition.c: File removed.
15870 * disk/powerpc/ieee1275/partition.c: Likewise.
15871 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15872 * include/grub/i386/pc/partition.h: Likewise.
15873 * kern/partition.c: New file.
15874 * partmap/amiga.c: Likewise.
15875 * partmap/apple.c: Likewise.
15876 * partmap/pc.c: Likewise.
15877 * include/grub/partition.h: Likewise..
15878 * include/grub/pc_partition.h: Likewise.
15879 * util/grub-emu.c: Include <grub/partition.h> instead of
15880 <grub/machine/partition.h>.
15881 (main): Call `grub_pc_partition_map_init',
15882 `grub_amiga_partition_map_init' and
15883 `grub_apple_partition_map_init' and deinitialize afterwards.
15884 * util/i386/pc/biosdisk.c: Include `#include
15885 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15886 `<grub/machine/partition.h>'.
15887 * util/i386/pc/grub-setup.c: Likewise.
15888 * util/i386/pc/biosdisk.c: Likewise.
15889 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15890 partition information in case of a PC partition.
15891 * util/i386/pc/grub-setup.c: Include `#include
15892 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15893 `<grub/machine/partition.h>'.
15894 (setup): Only access the PC specific partition information in case
15895 of a PC partition.
15896
15897 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15898
15899 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15900 (grub_longjmp): Likewise.
15901 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15902 20.
15903 * normal/powerpc/setjmp.S: New file.
15904 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15905 `normal/powerpc/setjmp.S'.
15906 (grubof_CFLAGS): Add `-DGRUBOF'.
15907 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15908 [GRUB_UTIL && !GRUBOF].
15909
15910 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15911
15912 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15913 property named `name'. Correctly handle the error returned by
15914 `grub_ieee1275_finddevice' if a device can not be opened.
15915
15916 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15917
15918 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15919 `actual' for negativity.
15920 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15921 kern/fshelp.c.
15922
15923 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15924
15925 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15926 (PAGE_OFFSET): New macro.
15927 (CRTC_ADDR_PORT): Likewise.
15928 (CRTC_DATA_PORT): Likewise.
15929 (START_ADDR_HIGH_REGISTER): Likewise.
15930 (START_ADDR_LOW_REGISTER): Likewise.
15931 (GRAPHICS_ADDR_PORT): Likewise.
15932 (GRAPHICS_DATA_PORT): Likewise.
15933 (READ_MAP_REGISTER): Likewise.
15934 (INPUT_STATUS1_REGISTER): Likewise.
15935 (INPUT_STATUS1_VERTR_BIT): Likewise.
15936 (page): New variable.
15937 (wait_vretrace): New function.
15938 (set_read_map): Likewise.
15939 (set_start_address): Likewise.
15940 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15941 the right page.
15942 (check_vga_mem): Take the page into account.
15943 (write_char): Likewise.
15944 (write_cursor): Likewise.
15945 (scroll_up): Likewise. Copy the page to the page that is not
15946 shown and switch between both pages.
15947 (grub_vga_putchar): Fix off by one error.
15948 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15949 account.
15950
15951 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15952
15953 Add support for iso9660 (including rockridge).
15954
15955 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15956 (iso9660_mod_SOURCES): New variable.
15957 (iso9660_mod_CFLAGS): Likewise.
15958 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15959 * include/grub/fs.h (grub_iso9660_init): New prototype.
15960 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15961 * fs/iso9660.c: New file.
15962
15963 * include/grub/misc.h (grub_strncat): New prototype.
15964 * kern/misc.c (grub_strncat): New function.
15965
15966 * fs/hfs.c (grub_hfs_mount): Translate the error
15967 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15968 * fs/jfs.c (grub_jfs_mount): Likewise.
15969 * fs/ufs.c (grub_ufs_mount): Likewise.
15970
15971 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15972
15973 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15974 which initialized BAT registers.
15975 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15976 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15977 Move from here...
15978 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15979 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15980 ... to here.
15981 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15982 (grub_mapclaim): Likewise.
15983 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15984 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15985 hand.
15986
15987 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15988
15989 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15990 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15991 -ffreestanding and -msoft-float.
15992
15993 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15994
15995 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15996 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15997 set in grub_ieee1275_flags.
15998
15999 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16000
16001 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16002 prototype.
16003 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16004 grub_console_init first.
16005 Change the memory range used for grub_ieee1275_claim and
16006 grub_mm_init_region.
16007 Print an error message if the claim fails.
16008 Include <grub/misc.h>.
16009
16010 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16011
16012 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16013 Call grub_children_iterate for device nodes of type `scsi',
16014 `ide', or `ata'.
16015 (grub_ofdisk_open): Remove manual device alias resolution.
16016 Fix memory leak when device cannot be opened.
16017 * include/grub/powerpc/ieee1275/ieee1275.h
16018 (grub_children_iterate): New prototype.
16019 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16020 New function.
16021 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16022 Return -1 if args.size was -1.
16023
16024 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16025
16026 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16027 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16028 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16029 Open Firmware's memory for it; claim memory from _start to _end.
16030 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16031 (_end): New extern.
16032 (_start): Zero BSS from __bss_start to _end.
16033 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16034 New extern.
16035 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16036
16037 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16038
16039 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16040 -1 if args.base was -1.
16041
16042 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16043
16044 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16045 escape sequence instead of a literal ^L. Also call
16046 grub_ofconsole_gotoxy.
16047
16048 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16049
16050 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16051 void * arguments to grub_addr_t. All callers updated. Also make
16052 the `result' argument optional.
16053 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16054 All callers updated.
16055
16056 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16057
16058 * commands/ls.c (grub_ls_list_files): Use the string following the
16059 initial ')', if present, as the filesystem path.
16060 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16061
16062 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16063
16064 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16065
16066 Make the source code of the menu interface more readable.
16067
16068 * normal/menu.c: Include grub/mm.h.
16069 (TERM_WIDTH): New macro.
16070 (TERM_HEIGHT): Likewise.
16071 (TERM_INFO_HEIGHT): Likewise.
16072 (TERM_MARGIN): Likewise.
16073 (TERM_SCROLL_WIDTH): Likewise.
16074 (TERM_TOP_BORDER_Y): Likewise.
16075 (TERM_LEFT_BORDER_X): Likewise.
16076 (TERM_BORDER_WIDTH): Likewise.
16077 (TERM_MESSAGE_HEIGHT): Likewise.
16078 (TERM_BORDER_HEIGHT): Likewise.
16079 (TERM_NUM_ENTRIES): Likewise.
16080 (TERM_FIRST_ENTRY_Y): Likewise.
16081 (TERM_ENTRY_WIDTH): Likewise.
16082 (TERM_CURSOR_X): Likewise.
16083 (draw_border): Use macros instead of magic numbers.
16084 (print_entry): Likewise.
16085 (print_entries): Likewise.
16086 (run_menu): Likewise. Also, handle the key 'e'.
16087 (run_menu_entry): Ignore empty command lines.
16088 (print_message): Added a new argument EDIT. If EDIT is true,
16089 print a different message.
16090 (init_page): Likewise.
16091 (edit_menu_entry): New function. Not implemented yet.
16092
16093 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16094
16095 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16096 can be loaded from normal mode.
16097
16098 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16099 `multiboot.mod'.
16100 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16101 (multiboot_mod_CFLAGS): New variables.
16102 * loader/i386/pc/linux_normal.c: New file.
16103 * loader/i386/pc/multiboot_normal.c: Likewise.
16104
16105 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16106 attribute `unused'.
16107
16108 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16109 `fdiro' to read the mode information from instead of `diro'.
16110
16111 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16112 looking up a symlink.
16113
16114 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16115 macro.
16116 * normal/command.c (grub_command_execute): Don't parse the
16117 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16118 flags of the command.
16119
16120 * normal/menu.c (grub_menu_run): Fix typo.
16121
16122 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16123
16124 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16125
16126 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16127 `y + 1' instead of `y - 1'.
16128
16129 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16130
16131 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16132
16133 From Hollis Blanchard <hollis@penguinppc.org>:
16134 * kern/misc.c (memmove): New alias for grub_memmove.
16135 (memcmp): New alias for grub_memcmp.
16136 (memset): New alias for grub_memset.
16137 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16138 Change "int handle" to "grub_ieee1275_phandle_t handle".
16139 * include/grub/powerpc/ieee1275/ieee1275.h
16140 (grub_ieee1275_get_property): Likewise.
16141
16142 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16143
16144 Added normal mode command `chainloader' as module chain.mod, which
16145 depends on normal.mod and _chain.mod.
16146
16147 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16148 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16149 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16150 Deleted prototype.
16151 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16152 but arguments parsing moved to ...
16153 (grub_chainloader_cmd): ... here. New function.
16154 * include/grub/i386/pc/chainloader.h: New file.
16155 * loader/i386/pc/chainloader_normal.c: Likewise.
16156
16157 2004-09-11 Marco Gerards <metgerards@student.han.nl>
16158
16159 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16160 (grub_mkimage_LDFLAGS): Likewise.
16161 (grub_emu_SOURCES): Likewise.
16162 (kernel_img_HEADERS): Added fshelp.h.
16163 * fs/ext2.c: Include <grub/fshelp.h>.
16164 (FILETYPE_REG): New macro.
16165 (FILETYPE_INO_REG): Likewise.
16166 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16167 Changed all users.
16168 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16169 all users.
16170 (grub_fshelp_node): New struct.
16171 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16172 to a pointer.
16173 (grub_ext2_get_file_block): Removed function.
16174 (grub_ext2_read_block): New function.
16175 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16176 This function was written.
16177 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16178 (grub_ext2_find_file): Removed function.
16179 (grub_ext2_read_symlink): New function.
16180 (grub_ext2_iterate_dir): Likewise.
16181 (grub_ext2_open): Rewritten.
16182 (grub_ext2_dir): Rewritten.
16183 * include/grub/fshelp.h: New file.
16184 * fs/fshelp.c: Likewise.
16185
16186 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16187
16188 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16189 (print_message): Add a missing newline.
16190 (run_menu): Added timeout support.
16191 (run_menu_entry): New local function.
16192 (grub_menu_run): Added support for booting.
16193
16194 * kern/loader.c (grub_loader_is_loaded): New function.
16195
16196 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16197 (grub_get_rtc): Exported.
16198
16199 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16200 (grub_get_rtc): Exported.
16201
16202 * include/grub/normal.h (struct grub_command_list): Remove
16203 constant from the member `command'.
16204
16205 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16206
16207 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16208
16209 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16210
16211 2004-08-28 Marco Gerards <metgerards@student.han.nl>
16212
16213 Add support for the JFS filesystem.
16214
16215 * fs/jfs.c: New file.
16216 * include/grub/fs.h (grub_jfs_init): New prototype.
16217 (grub_jfs_fini): New prototype.
16218 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16219 (grub_emu_SOURCES): Likewise.
16220 (pkgdata_MODULES): Add jfs.mod.
16221 (jfs_mod_SOURCES): New variable.
16222 (jfs_mod_CFLAGS): Likewise.
16223 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16224 (grubof_SOURCES): Likewise.
16225 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16226
16227 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16228 endian to the host endian.
16229 (grub_fat_utf16_to_utf8): Move function from there...
16230 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
16231 the endianness of the source string anymore.
16232 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16233
16234 2004-08-24 Marco Gerards <metgerards@student.han.nl>
16235
16236 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16237 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16238 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16239 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16240
16241 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16242 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16243 for `node_found' and `it_dir'.
16244 (grub_hfs_dir): Add prototype for `dir_hook'.
16245
16246 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16247 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16248 and `indir32' to silence a gcc warning.
16249
16250 * include/grub/fs.h (grub_hfs_init): New prototype.
16251 (grub_hfs_fini): Likewise.
16252
16253
16254 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16255
16256 Each disk device has its own id now. This is useful to make use
16257 of multiple disk devices.
16258
16259 * include/grub/disk.h (grub_disk_dev_id): New enum.
16260 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16261 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16262
16263 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16264 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16265
16266 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16267 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16268
16269 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16270 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16271
16272 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16273 "id" which is used by the cache manager.
16274
16275 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16276 of just "GRUB".
16277
16278 2004-08-18 Marco Gerards <metgerards@student.han.nl>
16279
16280 * fs/hfs.c: New file.
16281 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16282 (grub_emu_SOURCES): Likewise.
16283 (pkgdata_MODULES): Add hfs.mod.
16284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16285 (grubof_SOURCES): Likewise.
16286 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16287
16288 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16289 * kern/misc.c (grub_strncasecmp): Add function.
16290
16291 2004-08-14 Marco Gerards <metgerards@student.han.nl>
16292
16293 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16294 with parentheses.
16295
16296 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16297 (grub_ext2_dir): In case the directory entry type is unknown, read
16298 it from the inode.
16299
16300 2004-08-02 Peter Bruin <pjbruin@dds.nl>
16301
16302 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16303 grub_load_linux instead of grub_rescue_cmd_linux as second
16304 argument of grub_rescue_register_command.
16305
16306 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16307
16308 2004-07-27 Marco Gerards <metgerards@student.han.nl>
16309
16310 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16311 function.
16312 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16313 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16314 `loader/powerpc/ieee1275/linux.c',
16315 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16316 * include/grub/powerpc/ieee1275/ieee1275.h
16317 (grub_ieee1275_release): New prototype.
16318 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16319 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16320 normal, boot, linux and linux_normal.
16321 * loader/powerpc/ieee1275/linux.c: New file.
16322 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16323
16324 2004-07-12 Marco Gerards <metgerards@student.han.nl>
16325
16326 * normal/arg.c (grub_arg_parse): Correct error handling after
16327 reallocating the argumentlist (check if `argl' is not null instead
16328 of checking if `args' is not null).
16329 * kern/mm.c (grub_realloc): Return the same pointer when using the
16330 same region, instead of returning the header address.
16331
16332 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16333
16334 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16335 one block instead of two when looking for the initial partition.
16336 (grub_partition_probe): Initialize the local variable `p' with 0.
16337 Use base 10 for the grub_strtoul call.
16338 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16339 need for one local variable.
16340 (grub_strtoul): Don't add the new value to `num', instead of that
16341 just assign it.
16342
16343 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16344
16345 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16346 (pxeboot_img_SOURCES): New variable.
16347 (pxeboot_img_ASFLAGS): Likewise.
16348 (pxeboot_img_LDFLAGS): Likewise.
16349 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16350 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16351 <lode_leroy@hotmail.com>.
16352
16353 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16354
16355 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16356 there was no input.
16357
16358 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16359
16360 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16361 the history buffer logic.
16362
16363 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16364
16365 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16366 (FILETYPE_INO_SYMLINK): New macros.
16367 (grub_ext2_find_file): Check if the node is a directory using the
16368 inode stat information instead of using the filetype in the
16369 dirent. Exclude the first character of an absolute symlink.
16370 (grub_ext2_dir): Mask out the filetype part of the mode member of
16371 the inode.
16372
16373 2004-05-24 Marco Gerards <metgerards@student.han.nl>
16374
16375 Add support for UFS version 1 and 2. Add support for the minix
16376 filesystem version 1 and 2, both the variants with 14 and 30 long
16377 filenames.
16378
16379 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16380 fs/minix.c.
16381 (grub_emu_SOURCES): Likewise.
16382 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16383 (ufs_mod_SOURCES): New variable.
16384 (ufs_mod_CFLAGS): Likewise.
16385 (minix_mod_SOURCES): Likewise.
16386 (minix_mod_CFLAGS): Likewise.
16387 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16388 fs/minix.c.
16389 (grubof_SOURCES): Likewise.
16390 * fs/ufs.c: New file.
16391 * fs/minix.c: New file.
16392 * include/grub/fs.h (grub_ufs_init): New prototype.
16393 (grub_ufs_fini): Likewise.
16394 (grub_minix_init): Likewise.
16395 (grub_minix_fini): Likewise.
16396 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16397 minix fs.
16398
16399 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16400
16401 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16402 commands/ls.c, commands/terminal.c, commands/boot.c,
16403 commands/cmp.c and commands/cat.c.
16404 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16405
16406 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16407 "env.h"
16408
16409 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16410
16411 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16412 and grub_, respectively. Because the conversion is trivial and
16413 mechanical, I omit the details here. Please refer to the CVS
16414 if you need more information.
16415
16416 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16417
16418 * include/pupa: Renamed to ...
16419 * include/grub: ... this.
16420 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16421 * util/i386/pc/grub-mkimage.c: ... this.
16422 * util/i386/pc/pupa-setup.c: Renamed to ...
16423 * util/i386/pc/grub-setup.c: ... this.
16424 * util/pupa-emu.c: Renamed to ...
16425 * util/grub-emu.c: ... this.
16426
16427 2004-03-29 Marco Gerards <metgerards@student.han.nl>
16428
16429 Add support for the newworld apple macintosh (PPC). This has been
16430 tested on the powerbook 2000 only. It only adds support for
16431 generic ieee1275 functions, console and disk support. This should
16432 be easy to port to other architectures with support for Open
16433 Firmware.
16434
16435 * configure.ac: Accept the powerpc as host_cpu. In the case of
16436 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16437 specific tests are only executed while building for the i386.
16438 Inverse test for crosscompile.
16439 * genmk.rb (Utility): Allow assembler files.
16440 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16441 * conf/powerpc-ieee1275.rmk: New file.
16442 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16443 * disk/powerpc/ieee1275/partition.c: Likewise.
16444 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16445 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16446 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16447 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16448 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16449 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16450 * include/pupa/powerpc/ieee1275/loader.h
16451 * include/pupa/powerpc/setjmp.h: Likewise.
16452 * include/pupa/powerpc/types.h: Likewise.
16453 * kern/powerpc/ieee1275/init.c: Likewise.
16454 * kern/powerpc/ieee1275/openfw.c: Likewise.
16455 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16456
16457 These files were written by Johan Rydberg
16458 (jrydberg@night.trouble.net) and I only modified them slightly.
16459
16460 * boot/powerpc/ieee1275/cmain.c: New file.
16461 * boot/powerpc/ieee1275/crt0.S: Likewise.
16462 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16463 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16464
16465 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16466
16467 * Makefile.in: Update copyright.
16468 * genmodsrc.sh: Likewise.
16469 * gensymlist.sh: Likewise.
16470 * term/i386/pc/vga.c: Indent correctly.
16471
16472 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16473 bugreporting address.
16474 * util/i386/pc/pupa-setup.c (usage): Likewise,
16475 (main): Call pupa_ext2_init and pupa_ext2_fini.
16476
16477 * fs/fat.c (log2): Renamed to ...
16478 (fat_log2): ... this.
16479 All callers changed.
16480 * kern/misc.c (memcpy): Alias to pupa_memmove.
16481 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16482 lvalue cast.
16483 * util/console.c (pupa_ncurses_fini): Return 0.
16484
16485 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16486 Move fail label here.
16487 [__GNU__]: Don't warn when using stat.
16488 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16489 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16490 long int. Use strtol instead of strtoul.
16491
16492 2004-03-14 Marco Gerards <metgerards@student.han.nl>
16493
16494 * commands/boot.c: New file.
16495 * commands/cat.c: Likewise.
16496 * commands/cmp.c: Likewise.
16497 * commands/ls.c: Likewise.
16498 * commands/terminal.c: Likewise.
16499 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16500 (pupa_register_command): Changed interface to match the new
16501 argument parser.
16502 (pupa_command_execute): Changed (almost rewritten) so it uses
16503 pupa_split_command. Added support for setting variables using the
16504 syntax `foo=bar'.
16505 (rescue_command): Changed to work with the new argument parser.
16506 (terminal_command): Moved from here to commands/terminal.c.
16507 (set_command): New function.
16508 (unset_command): New function.
16509 (insmod_command): New function.
16510 (rmmod_command): New function.
16511 (lsmod_command): New function.
16512 (pupa_command_init): Don't initialize the command terminal
16513 anymore. Initialize the commands set, unset, insmod, rmmod and
16514 lsmod.
16515 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16516 (kernel_img_HEADERS): Add arg.h and env.h.
16517 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16518 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16519 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16520 normal/arg.c.
16521 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16522 terminal.mod.
16523 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16524 (boot_mod_SOURCES): New variable.
16525 (terminal_mod_SOURCES): Likewise.
16526 (ls_mod_SOURCES): Likewise.
16527 (cmp_mod_SOURCES): Likewise.
16528 (cat_mod_SOURCES): Likewise.
16529
16530 * normal/arg.c: New file.
16531 * kern/env.c: Likewise.
16532 * include/pupa/arg.h: Likewise.
16533 * include/pupa/env.h: Likewise.
16534 * font/manager.c (font_command): Changed to match argument parsing
16535 interface changes.
16536 (PUPA_MOD_INIT): Likewise.
16537 * hello/hello.c (pupa_cmd_hello): Likewise.
16538 (PUPA_MOD_INIT): Likewise.
16539 * include/pupa/disk.h: Include <pupa/device.h>.
16540 (pupa_print_partinfo): New prototype.
16541 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16542 (pupa_dl_get_prefix): Likewise.
16543 * include/pupa/misc.h: Include <pupa/err.h>.
16544 (pupa_isgraph): New prototype.
16545 (pupa_isdigit): Likewise.
16546 (pupa_split_cmdline): Likewise.
16547 * include/pupa/normal.h: Include <pupa/arg.h>.
16548 (pupa_command): Changed the prototype of the member `func' to
16549 match the argument parsing interface. Added member `options'.
16550 (pupa_register_command): Updated to match function.
16551 (pupa_arg_parse): New prototype.
16552 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16553 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16554 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16555 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16556 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16557 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16558 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16559 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16560 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16561 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16562 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16563 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16564 * kern/disk.c: Include <pupa/file.h>.
16565 (pupa_print_partinfo): New function.
16566 * kern/dl.c: Include <pupa/env.h>.
16567 (pupa_dl_dir): Variable removed.
16568 (pupa_dl_load): Use the environment variable `prefix' instead of
16569 the variable pupa_dl_dir.
16570 (pupa_dl_set_prefix): Function removed.
16571 (pupa_dl_get_prefix): Likewise.
16572 * kern/i386/pc/init.c: Include <pupa/env.h>.
16573 (pupa_machine_init): Use the environment variable `prefix' instead of
16574 using pupa_dl_set_prefix to set the prefix.
16575 * kern/main.c: Include <pupa/env.h>.
16576 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16577 using pupa_dl_get_prefix to get the prefix.
16578 * kern/misc.c: Include <pupa/env.h>.
16579 (pupa_isdigit): New function.
16580 (pupa_isgraph): Likewise.
16581 (pupa_ftoa): Likewise.
16582 (pupa_vsprintf): Added support for printing values of the type
16583 `double'. Make it possible to format variable output when using
16584 formatting like `%1.2%f'.
16585 (pupa_split_cmdline): New function.
16586 * kern/rescue.c: Include <pupa/env.h>.
16587 (next_word): Removed function.
16588 (pupa_rescue_cmd_prefix): Likewise.
16589 (pupa_rescue_cmd_set): New function.
16590 (pupa_rescue_cmd_unset): New function.
16591 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16592 split the command line instead of splitting it here. Added
16593 support for setting variables using the syntax `foo=bar'. Don't
16594 initialize the prefix command anymore. Initialized the set and
16595 unset commands.
16596 * normal/cmdline.c: Include <pupa/env.h>.
16597 (pupa_tab_complete): Added prototypes for print_simple_completion,
16598 print_partition_completion, add_completion, iterate_commands,
16599 iterate_dev, iterate_part and iterate_dir. Moved code to print
16600 partition information from here to kern/disk.c.
16601 (pupa_cmdline_run): Don't check if the function exists anymore.
16602 * normal/main.c: Include <pupa/env.h>.
16603 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16604 instead of using pupa_dl_get_prefix to get the prefix.
16605 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16606 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16607 warning.
16608 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16609 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16610 ((unused))' to silence a gcc warning.
16611 (pupa_vga_setcolor): Likewise.
16612 (debug_command): Changed to match argument parsing
16613 interface changes.
16614 * util/pupa-emu.c: Include <pupa/env.h>.
16615 (options): Added 0's for unused fields to silence a gcc warning.
16616 (argp): Likewise.
16617 (main): Use the environment variable `prefix' instead of using
16618 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16619 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16620 and terminal.
16621
16622 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16623 * util/misc.c: Include <malloc.h>.
16624 (pupa_malloc): Rewritten so errors are correctly reported.
16625 (pupa_realloc): Likewise.
16626 (pupa_memalign): Likewise.
16627 (pupa_mm_init_region): Declare unused variables with
16628 `__attribute__ ((unused))' to silence a gcc warning.
16629 * normal/i386/setjmp.S: Remove tab at the end of the file to
16630 silence a gcc warning.
16631 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16632 variables with `__attribute__ ((unused))' to silence a gcc
16633 warning.
16634 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16635 local variable i unsigned to silence a gcc warning.
16636
16637 * kern/term.c: Include <pupa/misc.h>.
16638 (pupa_more_lines): New variable.
16639 (pupa_more): Likewise.
16640 (pupa_putcode): When the pager is active pause at the end of every
16641 screen.
16642 (pupa_set_more): New function.
16643 * include/pupa/term.h (pupa_set_more): New prototype.
16644
16645
16646 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16647
16648 Now this project is GRUB 2 rather than PUPA. The location of
16649 the CVS repository was moved to GRUB's.
16650
16651 * configure.ac: Use bug-grub as the reporting address.
16652 Use GRUB instead of PUPA.
16653 Change the version number to 1.90.
16654
16655 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16656
16657 * genkernsyms.sh: Updated copyright information.
16658 * genmk.rb: Likewise.
16659 * genmodsrc.sh: Likewise.
16660 * gensymlist.sh: Likewise.
16661 * boot/i386/pc/boot.S: Likewise.
16662 * boot/i386/pc/diskboot.S: Likewise.
16663 * disk/i386/pc/biosdisk.c: Likewise.
16664 * disk/i386/pc/partition.c: Likewise.
16665 * font/manager.c: Likewise.
16666 * fs/ext2.c: Likewise.
16667 * fs/fat.c: Likewise.
16668 * include/pupa/boot.h: Likewise.
16669 * include/pupa/device.h: Likewise.
16670 * include/pupa/disk.h: Likewise.
16671 * include/pupa/dl.h: Likewise.
16672 * include/pupa/elf.h: Likewise.
16673 * include/pupa/err.h: Likewise.
16674 * include/pupa/file.h: Likewise.
16675 * include/pupa/font.h: Likewise.
16676 * include/pupa/fs.h: Likewise.
16677 * include/pupa/kernel.h: Likewise.
16678 * include/pupa/loader.h: Likewise.
16679 * include/pupa/misc.h: Likewise.
16680 * include/pupa/mm.h: Likewise.
16681 * include/pupa/net.h: Likewise.
16682 * include/pupa/normal.h: Likewise.
16683 * include/pupa/rescue.h: Likewise.
16684 * include/pupa/setjmp.h: Likewise.
16685 * include/pupa/symbol.h: Likewise.
16686 * include/pupa/term.h: Likewise.
16687 * include/pupa/types.h: Likewise.
16688 * include/pupa/i386/setjmp.h: Likewise.
16689 * include/pupa/i386/types.h: Likewise.
16690 * include/pupa/i386/pc/biosdisk.h: Likewise.
16691 * include/pupa/i386/pc/boot.h: Likewise.
16692 * include/pupa/i386/pc/console.h: Likewise.
16693 * include/pupa/i386/pc/init.h: Likewise.
16694 * include/pupa/i386/pc/kernel.h: Likewise.
16695 * include/pupa/i386/pc/linux.h: Likewise.
16696 * include/pupa/i386/pc/loader.h: Likewise.
16697 * include/pupa/i386/pc/memory.h: Likewise.
16698 * include/pupa/i386/pc/multiboot.h: Likewise.
16699 * include/pupa/i386/pc/partition.h: Likewise.
16700 * include/pupa/i386/pc/time.h: Likewise.
16701 * include/pupa/i386/pc/vga.h: Likewise.
16702 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16703 * include/pupa/util/getroot.h: Likewise.
16704 * include/pupa/util/misc.h: Likewise.
16705 * include/pupa/util/resolve.h: Likewise.
16706 * kern/device.c: Likewise.
16707 * kern/disk.c: Likewise.
16708 * kern/dl.c: Likewise.
16709 * kern/err.c: Likewise.
16710 * kern/file.c: Likewise.
16711 * kern/fs.c: Likewise.
16712 * kern/loader.c: Likewise.
16713 * kern/main.c: Likewise.
16714 * kern/misc.c: Likewise.
16715 * kern/mm.c: Likewise.
16716 * kern/rescue.c: Likewise.
16717 * kern/term.c: Likewise.
16718 * kern/i386/dl.c: Likewise.
16719 * kern/i386/pc/init.c: Likewise.
16720 * kern/i386/pc/lzo1x.S: Likewise.
16721 * kern/i386/pc/startup.S: Likewise.
16722 * loader/i386/pc/chainloader.c: Likewise.
16723 * loader/i386/pc/linux.c: Likewise.
16724 * loader/i386/pc/multiboot.c: Likewise.
16725 * normal/cmdline.c: Likewise.
16726 * normal/command.c: Likewise.
16727 * normal/main.c: Likewise.
16728 * normal/menu.c: Likewise.
16729 * normal/i386/setjmp.S: Likewise.
16730 * term/i386/pc/console.c: Likewise.
16731 * term/i386/pc/vga.c: Likewise.
16732 * util/console.c: Likewise.
16733 * util/genmoddep.c: Likewise.
16734 * util/misc.c: Likewise.
16735 * util/pupa-emu.c: Likewise.
16736 * util/resolve.c: Likewise.
16737 * util/unifont2pff.rb: Likewise.
16738 * util/i386/pc/biosdisk.c: Likewise.
16739 * util/i386/pc/getroot.c: Likewise.
16740 * util/i386/pc/pupa-mkimage.c: Likewise.
16741 * util/i386/pc/pupa-setup.c: Likewise.
16742
16743 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16744
16745 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16746 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16747 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16748 reading and reset it after reading.
16749 (pupa_ext2_close): Return PUPA_ERR_NONE.
16750
16751 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16752 Correct value.
16753 (struct linux_kernel_header): Add kernel_version and
16754 initrd_addr_max.
16755 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16756 pupa_file_read succeeds.
16757 (pupa_rescue_cmd_initrd): Implement.
16758
16759 2003-12-03 Marco Gerards <metgerards@student.han.nl>
16760
16761 * fs/ext2.c (pupa_ext2_label): New function.
16762 (pupa_ext2_fs): Added label.
16763 * fs/fat.c (pupa_fat_label): New function.
16764 (pupa_fat_fs): Added label.
16765 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16766
16767 * kern/misc.c (pupa_strndup): New function.
16768 * include/pupa/misc.h (pupa_strndup): New prototype.
16769
16770 * include/pupa/normal.h: Include <pupa/err.h>.
16771 (pupa_set_history): New prototype.
16772 (pupa_iterate_commands): New prototype.
16773 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16774 <pupa/disk.h>, <pupa/file.h>.
16775 (hist_size): New variable.
16776 (hist_lines): Likewise.
16777 (hist_end): Likewise.
16778 (hist_used): Likewise.
16779 (pupa_set_history): New function.
16780 (pupa_history_get): Likewise.
16781 (pupa_history_add): Likewise.
16782 (pupa_history_replace): Likewise.
16783 (pupa_tab_complete): Likewise.
16784 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16785 completion shows partitionnames while completing partitions, this
16786 feature was suggested by Jeff Bailey.
16787 * normal/command.c (pupa_iterate_commands): New function.
16788 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16789 (pupa_normal_init): Initialize history buffer.
16790 (PUPA_MOD_INIT): Likewise.
16791 (pupa_normal_fini): Free the history buffer.
16792 (PUPA_MOD_FINI): Likewise.
16793
16794 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16795 key.
16796
16797 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16798 * configure.ac [i386]: Check for regparam bug.
16799 (NESTED_FUNC_ATTR) [! i386]: Defined.
16800
16801 2003-11-17 Marco Gerards <metgerards@student.han.nl>
16802
16803 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16804 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16805 (pupa_emu_SOURCES): New variable.
16806 (pupa_emu_LDFLAGS): Likewise.
16807 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16808 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16809 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16810 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16811 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16812 (pupa_jmp_buf): New typedef.
16813 (pupa_setjmp) [PUPA_UTIL]: New macro.
16814 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16815 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16816 (pupa_refresh): New prototype.
16817 * include/pupa/util/getroot.h: New file.
16818 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16819 it.
16820 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16821 (pupa_rescue_cmd_cat): Likewise.
16822 (pupa_rescue_cmd_ls): Likewise.
16823 (pupa_rescue_cmd_testload): Likewise.
16824 (pupa_rescue_cmd_lsmod): Likewise.
16825 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16826 * normal/menu.c (run_menu): Likewise.
16827 * kern/term.c (pupa_cls): Likewise.
16828 (pupa_refresh): New function.
16829 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16830 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16831 * util/console.c: New file.
16832
16833 * util/i386/pc/getroot.c: New file.
16834 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16835 (pupa_putchar): New function.
16836 (pupa_refresh): Likewise.
16837 (xgetcwd): Function moved to ...
16838 (strip_extra_slashes): Likewise.
16839 (get_prefix): Likewise.
16840 * util/i386/pc/getroot.c: ... here.
16841 (find_root_device): Function moved and renamed to...
16842 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16843 Changed all callers.
16844 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16845 and renamed to...
16846 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16847 Changed all callers.
16848 * util/misc.c (pupa_memalign): New function.
16849 (pupa_mm_init_region): Likewise.
16850 (pupa_register_exported_symbols): Likewise.
16851 (pupa_putchar): Function removed.
16852 * util/pupa-emu.c: New file.
16853
16854 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16855
16856 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16857 (_multiboot_mod_SOURCES): New variable.
16858 (_multiboot_mod_CFLAGS): Likewise.
16859 * loader/i386/pc/multiboot.c: New file.
16860 * include/pupa/i386/pc/multiboot.h: Likewise.
16861 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16862 (pupa_multiboot_real_boot): New function.
16863 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16864 (pupa_multiboot_real_boot): New prototype.
16865 (pupa_rescue_cmd_multiboot): Likewise
16866 (pupa_rescue_cmd_module): Likewise.
16867
16868 * kern/loader.c (pupa_loader_set): Continue when
16869 pupa_loader_unload_func() fails.
16870 (pupa_loader_unset): New function.
16871 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16872
16873 * kern/misc.c (pupa_stpcpy): New function.
16874 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16875
16876 2003-11-12 Marco Gerards <metgerards@student.han.nl>
16877
16878 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16879 for available extensions.
16880
16881 * include/pupa/i386/pc/time.h: New file.
16882 * kern/disk.c: Include <pupa/machine/time.h>.
16883 (PUPA_CACHE_TIMEOUT): New macro.
16884 (pupa_last_time): New variable.
16885 (pupa_disk_open): Flush the cache when there was a timeout.
16886 (pupa_disk_close): Reset the timer.
16887 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16888 pupa_currticks.
16889 * util/misc.c: Include <sys/times.h>
16890 (pupa_get_rtc): New function.
16891
16892 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16893
16894 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16895 as blocks.
16896 (pupa_ext2_get_file_block): Use blocks member.
16897
16898 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16899 first block. Return -1 instead of pupa_errno on error.
16900
16901 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16902
16903 * README: In the pupa-mkimage example use _chain instead of chain
16904 and ext2 instead of fat.
16905 * TODO: Replace ext2fs with jfs as an example. Add an item for
16906 adding journal playback for ext2fs.
16907 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16908 (pkgdata_MODULES): Added ext2.mod.
16909 (ext2_mod_SOURCES): New variable.
16910 (ext2_mod_CFLAGS): Likewise.
16911 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16912 * include/pupa/misc.h (pupa_strncpy): New prototype.
16913 (pupa_strcat): Likewise.
16914 (pupa_strncmp): Likewise.
16915 * kern/misc.c (pupa_strcat): Enable function.
16916 (pupa_strncpy): New function.
16917 (pupa_strncmp): Likewise.
16918 * fs/ext2.c: New file.
16919
16920 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16921 when the read failed before retrying.
16922 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16923 (_FILE_OFFSET_BITS): Likewise.
16924 * configure.ac: Added AC_SYS_LARGEFILE.
16925
16926 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16927
16928 * genmk.rb (PModule#rule): Make sure to get only symbol names
16929 from the output of nm.
16930 Reported by Robert Millan <zeratul2@wanadoo.es>.
16931
16932 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16933
16934 I forgot to check in these changes for a long time. This adds
16935 incomplete support for VGA console, and this is still very
16936 buggy. Also, a lot of consideration is required for I18N,
16937 UNICODE, and VGA font issues. Therefore, assume that this is
16938 such that "better than nothing".
16939
16940 * font/manager.c: New file.
16941 * include/pupa/font.h: Likewise.
16942 * include/pupa/i386/pc/vga.h: Likewise.
16943 * term/i386/pc/vga.c: Likewise.
16944 * util/unifont2pff.rb: Likewise.
16945
16946 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16947 (pkgdata_MODULES): Added vga.mod and font.mod.
16948 (vga_mod_SOURCES): New variables.
16949 (vga_mod_CFLAGS): Likewise.
16950 (font_mod_SOURCES): Likewise.
16951 (font_mod_CFLAGS): Likewise.
16952
16953 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16954
16955 * include/pupa/term.h: Include pupa/err.h.
16956 (struct pupa_term): Added init and fini.
16957 Changed the argument of putchar to pupa_uint32_t.
16958
16959 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16960 (pupa_console_real_putchar): New prototype.
16961 (pupa_console_putchar): Removed.
16962 (pupa_console_checkkey): Exported.
16963 (pupa_console_getkey): Likewise.
16964
16965 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16966 characters.
16967
16968 * kern/term.c (pupa_term_set_current): Rewritten.
16969 (pupa_putchar): Likewise.
16970 (pupa_putcode): New function.
16971
16972 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16973 (pupa_console_real_putchar): ... this.
16974 (pupa_vga_set_mode): New function.
16975 (pupa_vga_get_font): Likewise.
16976
16977 * normal/command.c: Include pupa/term.h.
16978 (terminal_command): New function.
16979 (pupa_command_init): Register the command "terminal".
16980
16981 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16982 (DISP_UP): Likewise.
16983 (DISP_RIGHT): Likewise.
16984 (DISP_DOWN): Likewise.
16985 (DISP_HLINE): Likewise.
16986 (DISP_VLINE): Likewise.
16987 (DISP_UL): Likewise.
16988 (DISP_UR): Likewise.
16989 (DISP_LL): Likewise.
16990 (DISP_LR): Likewise.
16991
16992 * term/i386/pc/console.c (pupa_console_putchar): New function.
16993
16994 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16995
16996 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16997 FIX. Reverse the path_list.
16998
16999 * include/pupa/normal.h: Export pupa_register_command and
17000 pupa_unregister_command.
17001
17002 * hello/hello.c (pupa_cmd_hello): New module.
17003 * conf/i386-pc.rmk: Added hello.mod.
17004
17005 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17006
17007 * kern/i386/pc/lzo1x.S: New file.
17008
17009 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17010 (compress_kernel): New variable.
17011 (generate_image): Heavily modified to support compressing a
17012 large part of the core image.
17013
17014 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17015 leak.
17016 (pupa_util_load_image): New function.
17017
17018 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17019 (pupa_compressed_size): New variable.
17020 (codestart): Enable Gate A20 here.
17021 Decompress the compressed part of the core image.
17022 Rearrange the code to put functions and variables which are
17023 required for initialization in the non-compressed part.
17024 Include lzo1x.S.
17025
17026 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17027 here.
17028
17029 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17030
17031 * include/pupa/i386/pc/kernel.h
17032 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17033 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17034 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17035 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17036 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17037
17038 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17039
17040 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17041 (Utility#rule): Likewise.
17042
17043 * configure.ac: Check if LZO is available.
17044
17045 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17046
17047 * include/pupa/normal.h: New file.
17048 * include/pupa/setjmp.h: Likewise.
17049 * include/pupa/i386/setjmp.h: Likewise.
17050 * normal/cmdline.c: Likewise.
17051 * normal/command.c: Likewise.
17052 * normal/main.c: Likewise.
17053 * normal/menu.c: Likewise.
17054 * normal/i386/setjmp.S: Likewise.
17055
17056 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17057 (pupa_rescue_cmd_initrd): Likewise.
17058
17059 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17060 Likewise.
17061
17062 * kern/i386/pc/startup.S (translation_table): New variable.
17063 (translate_keycode): New function.
17064 (pupa_console_getkey): Call translate_keycode.
17065
17066 * kern/rescue.c (attempt_normal_mode): New function.
17067 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17068 it failed, print a message.
17069
17070 * kern/mm.c (pupa_real_malloc): Print more information when a
17071 free magic is broken.
17072 (pupa_free): If the first free header is not free actually, set
17073 it to P.
17074
17075 * kern/main.c (pupa_load_normal_mode): Just load the module
17076 "normal".
17077 (pupa_main): Don't print the message
17078 "Entering into rescue mode..." here.
17079
17080 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17081 Declared.
17082 (pupa_rescue_cmd_initrd): Likewise.
17083 (pupa_rescue_cmd_initrd): Likewise.
17084
17085 * include/pupa/symbol.h (FUNCTION): Specify the type.
17086 (VARIABLE): Likewise.
17087
17088 * include/pupa/err.h (pupa_err_t): Added
17089 PUPA_ERR_UNKNOWN_COMMAND.
17090
17091 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17092 (pupa_dl_get_prefix): Likewise.
17093
17094 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17095 Added _chain.mod and _linux.mod instead of chain.mod and
17096 linux.mod.
17097 (chain_mod_SOURCES): Renamed to ...
17098 (_chain_mod_SOURCES): ... this.
17099 (chain_mod_CFLAGS): Renamed to ...
17100 (_chain_mod_CFLAGS): ... this.
17101 (linux_mod_SOURCES): Renamed to ...
17102 (_linux_mod_SOURCES): ... this.
17103 (linux_mod_CFLAGS): Renamed to ...
17104 (_linux_mod_CFLAGS): ... this.
17105 (normal_mod_SOURCES): New variable.
17106 (normal_mod_CFLAGS): Likewise.
17107 (normal_mod_ASFLAGS): Likewise.
17108
17109 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17110
17111 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17112 possible.
17113
17114 * kern/dl.c (pupa_dl_ref): Refer depending modules
17115 recursively.
17116 (pupa_dl_unref): Unrefer depending modules recursively.
17117 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17118 a module is unloaded before one depending on that module is
17119 unloaded.
17120 (pupa_dl_unload): Unload depending modules explicitly,
17121 if possible.
17122
17123 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17124
17125 * include/pupa/i386/pc/linux.h: New file.
17126 * loader/i386/pc/linux.c: Likewise.
17127
17128 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17129 Removed.
17130 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17131 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17132 of PUPA_CHAINLOADER_BOOT_SECTOR.
17133
17134 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17135 (pupa_linux_prot_size): New variable.
17136 (pupa_linux_tmp_addr): Likewise.
17137 (pupa_linux_real_addr): Likewise.
17138 (pupa_linux_boot_zimage): New function.
17139 (pupa_linux_boot_bzimage): Likewise.
17140
17141 * kern/i386/pc/init.c (struct mem_region): New structure.
17142 (MAX_REGIONS): New macro.
17143 (mem_regions): New variable.
17144 (num_regions): Likewise.
17145 (pupa_os_area_addr): Likewise.
17146 (pupa_os_area_size): Likewise.
17147 (pupa_lower_mem): Likewise.
17148 (pupa_upper_mem): Likewise.
17149 (add_mem_region): New function.
17150 (compact_mem_regions): Likewise.
17151 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17152 the size of the conventional memory and that of so-called upper
17153 memory (before the first memory hole).
17154 Instead of adding each found region to free memory, use
17155 add_mem_region and add them after removing overlaps.
17156 Also, add only 1/4 of the upper memory to free memory. The rest
17157 is used for loading OS images. Maybe this is ad hoc, but this
17158 makes it much easier to relocate OS images when booting.
17159
17160 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17161 (pupa_enter_rescue_mode): Don't register initrd and module.
17162
17163 * kern/mm.c: Include pupa/dl.h.
17164
17165 * kern/main.c: Include pupa/file.h and pupa/device.h.
17166
17167 * kern/loader.c (pupa_loader_load_module_func): Removed.
17168 (pupa_loader_load_module): Likewise.
17169
17170 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17171 ``.o''.
17172
17173 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17174 (pupa_linux_tmp_addr): Likewise.
17175 (pupa_linux_real_addr): Likewise.
17176 (pupa_linux_boot_zimage): Likewise.
17177 (pupa_linux_boot_bzimage): Likewise.
17178
17179 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17180 (pupa_upper_mem): Likewise.
17181 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17182 module is too dangerous.
17183
17184 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17185 (pupa_os_area_size): Likewise.
17186 (pupa_loader_set): Remove the first argument. Loader doesn't
17187 manage modules or initrd any longer.
17188 (pupa_loader_load_module): Removed.
17189
17190 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17191 (linux_mod_SOURCES): New variable.
17192 (linux_mod_CFLAGS): Likewise.
17193
17194 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17195
17196 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17197 the length of a blocklist correctly.
17198
17199 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17200 Use ioctl only if the OS file is a block device.
17201 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17202 not very useful for normal files.
17203
17204 * kern/main.c (pupa_set_root_dev): New function.
17205 (pupa_load_normal_mode): Likewise.
17206 (pupa_main): Call those above.
17207
17208 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17209 pupa_uint16_t.
17210
17211 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17212
17213 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17214
17215 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17216 (setup): Configure the installed partition information and the
17217 dl prefix.
17218
17219 * loader/i386/pc/chainloader.c (my_mod): New variable.
17220 (pupa_chainloader_unload): New function.
17221 (pupa_rescue_cmd_chainloader): Refer itself.
17222 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17223
17224 * kern/i386/pc/startup.S (install_partition): Removed.
17225 (version_string): Likewise.
17226 (config_file): Likewise.
17227 (pupa_install_dos_part): New variable.
17228 (pupa_install_bsd_part): Likewise.
17229 (pupa_prefix): Likewise.
17230 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17231
17232 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17233 and pupa/misc.h.
17234 (make_install_device): New function.
17235 (pupa_machine_init): Set the dl prefix.
17236
17237 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17238 (buf): Renamed to ...
17239 (linebuf): ... this.
17240 (pupa_rescue_cmd_prefix): New function.
17241 (pupa_rescue_cmd_insmod): Likewise.
17242 (pupa_rescue_cmd_rmmod): Likewise.
17243 (pupa_rescue_cmd_lsmod): Likewise.
17244 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17245 rmmod and lsmod.
17246
17247 * kern/mm.c (pupa_memalign): If failed even after invalidating
17248 disk caches, unload unneeded modules and retry.
17249
17250 * kern/misc.c (pupa_memmove): New function.
17251 (pupa_memcpy): Removed.
17252 (pupa_strcpy): New function.
17253 (pupa_itoa): Made static.
17254
17255 * kern/dl.c (pupa_dl_iterate): New function.
17256 (pupa_dl_ref): Likewise.
17257 (pupa_dl_unref): Likewise.
17258 (pupa_dl_unload): Return if succeeded or not.
17259 (pupa_dl_unload_unneeded): New function.
17260 (pupa_dl_unload_all): Likewise.
17261 (pupa_dl_init): Renamed to ...
17262 (pupa_dl_set_prefix): ... this.
17263 (pupa_dl_get_prefix): New function.
17264
17265 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17266 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17267 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17268 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17269 (pupa_install_dos_part): Declared.
17270 (pupa_install_bsd_part): Likewise.
17271 (pupa_prefix): Likewise.
17272 (pupa_boot_drive): Likewise.
17273
17274 * include/pupa/types.h: Fix a typo.
17275
17276 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17277 pupa_memmove.
17278 (pupa_memmove): Declared.
17279 (pupa_strcpy): Likewise.
17280
17281 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17282 pupa_mod_init takes one argument, its own module.
17283 (pupa_dl_unload_unneeded): Declared.
17284 (pupa_dl_unload_all): Likewise.
17285 (pupa_dl_ref): Likewise.
17286 (pupa_dl_unref): Likewise.
17287 (pupa_dl_iterate): Likewise.
17288 (pupa_dl_init): Renamed to ...
17289 (pupa_dl_set_prefix): ... this.
17290 (pupa_dl_get_prefix): Declared.
17291
17292 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17293 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17294 unloaded.
17295 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17296 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17297
17298 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17299 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17300
17301 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17302
17303 * util/i386/pc/pupa-setup.c (setup): Define the internal
17304 function find_first_partition_start at the top level, because GCC
17305 3.0.x cannot compile internal functions in deeper scopes
17306 correctly.
17307 (find_root_device): Use lstat instead of stat.
17308 Don't follow symbolic links.
17309 Fix the path-constructing code.
17310
17311 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17312 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17313 by a BLKGETSIZE ioctl first, because block devices don't fill
17314 the member st_mode of the structure stat on Linux.
17315 [__linux__] (linux_find_partition): Use a temporary buffer
17316 REAL_DEV for the working space. Copy it to DEV before returning.
17317 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17318 buffer cache consistent.
17319 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17320 strncmp. The previous value was merely wrong.
17321 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17322
17323 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17324 FAT size is 12. The previous value was merely wrong.
17325
17326 * kern/main.c (pupa_main): Don't split the starting message from
17327 newlines.
17328
17329 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17330 LF, because BIOS goes crazy about character attributes in this
17331 case.
17332
17333 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17334
17335 * include/i386/pc/util/biosdisk.h: New file.
17336 * util/i386/pc/biosdisk.c: Likewise.
17337 * util/i386/pc/pupa-setup.c: Likewise.
17338
17339 * Makefile.in (INCLUDE_DISTFILES): Added
17340 include/pupa/i386/pc/util/biosdisk.h.
17341 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17342 directory util/i386/pc.
17343 (install-local): Added a rule for sbin_UTILITIES.
17344 (uninstall): Likewise.
17345
17346 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17347
17348 * util/misc.c (xrealloc): New function.
17349 (pupa_malloc): Likewise.
17350 (pupa_free): Likewise.
17351 (pupa_realloc): Likewise.
17352 (pupa_stop): Likewise.
17353 (pupa_putchar): Likewise.
17354
17355 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17356
17357 * include/pupa/util/misc.h (xrealloc): Declared.
17358
17359 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17360 macro.
17361 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17362 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17363
17364 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17365 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17366
17367 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17368 way should be implemented.
17369 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17370
17371 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17372 the size of NAME for safety.
17373 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17374 0x88.
17375
17376 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17377 (pupa_setup_SOURCES): Likewise.
17378
17379 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17380
17381 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17382
17383 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17384 bunch of pushl's from pusha, because this destroys the return
17385 value.
17386
17387 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17388
17389 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17390 This means that any missing prototypes could be fatal. Also, you
17391 must take care when writing assembly code. See the comments at
17392 the beginning of startup.S, for more details.
17393
17394 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17395 compilation mechanism.
17396 (pupa_chainloader_real_boot): Likewise.
17397 (pupa_biosdisk_rw_int13_extensions): Likewise.
17398 (pupa_biosdisk_rw_standard): Likewise.
17399 (pupa_biosdisk_check_int13_extensions): Likewise.
17400 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17401 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17402 (pupa_get_memsize): Likewise.
17403 (pupa_get_mmap_entry): Likewise.
17404 (pupa_console_putchar): Likewise.
17405 (pupa_console_setcursor): Likewise.
17406 (pupa_getrtsecs): Use pushl instead of push.
17407
17408 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17409 memory instead of the stack for a mmap entry, because some
17410 BIOSes may ignore the maximum size and overflow.
17411
17412 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17413
17414 * genmk.rb (PModule#rule): Compile automatically generated
17415 sources with module-specific CFLAGS as well as other sources.
17416
17417 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17418
17419 * configure.ac: Check ld.
17420 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17421 respectively, before checking endianness and sizes.
17422
17423 * Makefile.in (LD): New variable.
17424
17425 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17426
17427 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17428
17429 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17430
17431 * Changelog: New file.
17432