]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
87b8f28c 12009-06-09 Robert Millan <rmh.grub@aybabtu.com>
2
3 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
4 disk limit to 26 for IDE, Virtio, Xen and SCSI.
5
8ec4a6d0 62009-06-09 Felix Zielcke <fzielcke@z-51.de>
7
8 * util/i386/pc/grub-install.in: Change the error message if UUIDs
9 aren't avaible if ata.mod gets used.
10
e23721e8 112009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
12
8ec4a6d0 13 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 14 initialising controller.
8ec4a6d0 15 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 16
255a27d4 172009-06-08 Felix Zielcke <fzielcke@z-51.de>
18
19 * util/i386/pc/grub-install.in: Add a parameter --disk-module
20 to choose between ata and biosdisk module on i386-pc.
21
69da8877 222009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
23
d55842d8 24 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
25 Subclass and Programming Interface fields in terms of the 3 byte
26 Class Code register.
27 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
28
fa5db0b1 29 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
30 interface is OHCI. Add grub_dprintf for symmetry with
31 bus/usb/uhci.c.
32 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
33 interface is UHCI. Add interf variable for programming
34 interface. Print interface with class/subclass.
35
c0947beb 36 * bus/usb/ohci.c: Set interf with correct field.
37
69da8877 38 * bus/usb/uhci.c: Remove unneeded doubled lines.
39 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
40 Remove whitespace inside comment.
41
9e172e30 422009-06-08 Robert Millan <rmh.grub@aybabtu.com>
43
44 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
45 as fallback an equivalent option without depth.
46
de65ee2b 472009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
48
49 Not fail if unable to retrieve C/H/S on LBA disks
50
51 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
52 if unable to retrieve C/H/S on LBA disks
53
b57ea2c9 542009-06-08 Pavel Roskin <proski@gnu.org>
55
56 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
57 about aliasing.
58
af361263 592009-06-08 Felix Zielcke <fzielcke@z-51.de>
60
61 * Makefile.in (uninstall): Remove all $lib_DATA files.
62
4c9ec6b3 632009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
64
65 Bugfix: install on partitionless device
66
67 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
68 is a whole disk
69
e76fc924 702009-06-08 Felix Zielcke <fzielcke@z-51.de>
71
72 * Makefile.in (uninstall): Remove all $include_DATA files.
73
ba5a0d05 742009-06-08 Felix Zielcke <fzielcke@z-51.de>
75
76 * commands/true.c: New file. Implement the true and false commands.
77 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
78 (true_mod_SOURCES): New variable.
79 (true_mod_CFLAGS): Likewise.
80 (true_mod_LDFLAGS): Likewise.
81
c8048e32 822009-06-05 Colin D Bennett <colin@gibibit.com>
83
84 Optimized font character lookup using binary search instead of linear
85 search. Fonts now are required to have the character index ordered by
86 code point.
87
88 * font/font.c (load_font_index): Verify that fonts have ordered
89 character indices.
90 (find_glyph): Use binary search instead of linear search to find a
91 character in a font.
92
408305be 932009-06-05 Michael Scherer <misc@mandriva.org>
94
95 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
96 uses case sensitive btree.
97 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
98 only for case insensitive filesystems.
99
8ee1e0d9 1002009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
101
102 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
103 * conf/common.rmk (search_mod_CFLAGS): likewise
104
a9966eb1 1052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
106
107 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
108 compensate a compiler bug
109
9e7100fb 1102009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
111
112 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitely define as 8
113 instead of '\b'
114
ede21d71 1152009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
116
117 Definitions for creating asm symbols with Apple's CC
118
119 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
120 [APPLE_CC] (VARIABLE): likewise
121
9dbf7653 1222009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
123
124 Disable lnxboot.img when compiled
125 with Apple's CC
126
127 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
128 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
129 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
130 [! APPLE_CC] (CODE_LENG): skip
131 [! APPLE_CC] (setup_sects): likewise
132 [! APPLE_CC]: skip filling
133
e93cdc3d 1342009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
135
136 Address in trampolines based on 32-bit registers when compiled
137 with Apple's CC
138
139 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
140 for addresses
141 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
142
6c688477 1432009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
144
145 Avoid aliases when compiling with Apple's CC for PCBIOS machine
146
147 * kern/misc.c [APPLE_CC] (memcpy): new function
148 [APPLE_CC] (memmove): likewise
149 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
150 (memcpy): define alias conditionaly on !APPLE_CC
151 (memset): likewise
152 (abort): likewise
153 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
154 APPLE_CC are defined
155 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
156 (grub_assert_fail): make prototype conditional
157
e37ffc5c 1582009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
159
160 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
161
162 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
163 grub-macho2img
164 (CLEANFILES): add grub-macho2img
165 (grub_macho2img_SOURCES): new variable
166 * kern/i386/pc/startup.S (bss_start): new variable
167 (bss_end): likewise
168 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
169 * util/grub-macho2img.c: new file
170
cf00df31 1712009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
172
173 Use objconv when compiling with Apple's CC
174
175 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
176 (efiemu64.o): likewise
177 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
178 when compiling with Apple's CC
179 (efiemu64_s.o): likewise
180 * configure.ac: check for objconv when compiling with Apple's CC
181 * genmk.rb: use objconv for modules when compiled with Apple's CC
182
d119a20c 1832009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
184
185 Define segment as well as section when compiling with
186 Apple's CC
187
188 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
189 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
190 (efiemu_convert_pointer): likewise
191 (efiemu_set_virtual_address_map): likewise
192 (efiemu_convert_pointer): likewise
193 (efiemu_getcrc32): likewise
194 (init_crc32_table): likewise
195 (reflect): likewise
196 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
197 (GRUB_MOD_DEP): likewise
198
c8600122 1992009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
200
201 Allow a compilation without -mcmodel=large
202
203 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
204 when compiled without -mcmodel=large
205 (filter_memory_map): remove memory post 4 GiB when compiled
206 without -mcmodel=large
207 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
208 TARGET_CFLAGS when -mcmodel=large isn't supported
209
e8df1d4e 2102009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
211
212 Remove nested functions in efiemu core
213
214 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
215
cc6c3ac1 2162009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
217
218 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
219
220 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
221 temporary storage
222 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
223 using Apple's CC
224 (grub_cpu_is_tsc_supported): likewise
225 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
226
3e325901 2272009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
228
229 Absolute addressing through constant with Apple's cc
230
231 * kern/i386/pc/startup.S: Define necessary constants
232 and address through it when using ABS with Apple's CC
233 * boot/i386/pc/diskboot.S: likewise
234 * boot/i386/pc/boot.S: likewise
235 * boot/i386/pc/lnxboot.S: likewise
236 * boot/i386/pc/cdboot.S: likewise
237 * mmap/i386/pc/mmap_helper.S: likewise
238 * commands/i386/pc/drivemap_int13h.S: likewise
239
2b167a72 2402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
241
242 Check if compiler is apple cc
243
244 * Makefile.in (ASFLAGS): new variable
245 (TARGET_ASFLAGS): likewise
246 (TARGET_MODULE_FORMAT): likewise
247 (TARGET_APPLE_CC): likewise
248 (OBJCONV): likewise
249 (TARGET_IMG_CFLAGS): likewise
250 (TARGET_CPPFLAGS): add includedir
251 * configure.ac: call grub_apple_cc and grub_apple_target_cc
252 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
253 Check for linker script only if compiler isn't Apple's CC
254 (TARGET_MODULE_FORMAT): set
255 (TARGET_APPLE_CC): likewise
256 (TARGET_ASFLAGS): likewise
257 (ASFLAGS): likewise
258 Check for objcopy only if compiler isn't Apple's CC
259 Check for BSS symbol only if compiler isn't Apple's CC
260 * genmk.rb: adapt nm options if we use Apple's utils
261 * aclocal.m4 (grub_apple_cc): new test
262 (grub_apple_target_cc): likewise
263
fb14123e 2642009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
265
266 Simplify sed expressions and improve awk
267
268 * Makefile.in (install-local): simplify sed expression
269 * gencmdlist.sh: likewise
270 * genmoddep.awk: avoid adding module as a dependency of itself
271
5b889789 2722009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
273
274 Add missing start symbols
275
276 * boot/i386/pc/boot.S: add start
fb14123e 277 * boot/i386/pc/pxeboot.S: likewise
5b889789 278
fd2bf2e3 2792009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
280
281 Fix wrong assumptions with grub-mkimage on EFI
282
283 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
284 (relocate_addresses): consider both r_addend and value at offset
285 (make_mods_section): zerofill modinfo and header
286 (convert_elf): write prefix here
287
5389763d 2882009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
289
290 Use .asciz instead of .string
291
292 * i386/pc/diskboot.S: use .asciz instead of .string
293 * i386/pc/boot.S: likewise
294 * include/grub/dl.h (GRUB_MOD_DEP): likewise
295 (GRUB_MOD_NAME): likewise
296
3eb5ed4e 2972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
298
299 gfxpayload support
300
301 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
302 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
303 (grub_video_setup): remove
304 (grub_video_set_mode): new prototype
305 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
306 (vid_mode): remove
307 (linux_vesafb_res): compile only on PCBIOS
308 (grub_linux_boot): support gfxpayload
309 * loader/i386/pc/xnu.c (video_hook): new function
310 (grub_xnu_set_video): support gfxpayload
311 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
312 (DEFAULT_VIDEO_HEIGHT): likewise
313 (DEFAULT_VIDEO_FLAGS): likewise
314 (DEFAULT_VIDEO_MODE): new definition
315 (video_hook): new function
316 (grub_gfxterm_init): use grub_video_set_mode
317 * util/grub.d/30_os-prober.in: remove explicit modesetting before
318 loading xnu
319 * video/video.c (grub_video_setup): removed
320 (grub_video_set_mode): new function based on grub_gfxterm_init and
321 grub_video_setup
322
4b0e1143 3232009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
324
325 Avoid calling biosdisk in drivemap
326
327 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
328 (revparse_biosdisk): likewise
329 (list_mappings): derive name from id directly
330 (grub_cmd_drivemap): use tryparse_diskstring
331
fda6cb98 3322009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
333
334 Script fixes
335
336 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
337 (grub_lexer_param): add tokenonhold
338 (grub_script_create_cmdline): remove cmdline. All callers updated
339 (grub_script_function_create): make functionname
340 grub_script_arg. All callers updated
341 (grub_script_execute_argument_to_string): new prototype
342 * kern/parser.c (state_transitions): reorder
343 (grub_parser_cmdline_state): fix a bug and make more compact
344 * script/sh/execute.c (grub_script_execute_argument_to_string):
345 make global
346 (grub_script_execute_cmdline): use new format
347 * script/sh/function.c (grub_script_function_create): make functionname
348 grub_script_arg. All callers updated
349 * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
350 (grub_script_yylex): remove
351 (grub_script_yylex2): renamed to ...
352 (grub_script_yylex): ...renamed
353 parse the expressions like a${b}c
354 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
355 (GRUB_PARSER_TOKEN_VAR): remove
356 (GRUB_PARSER_TOKEN_NAME): likewise
357 ("if"): declare as typeless
358 ("while"): likewise
359 ("function"): likewise
360 ("else"): likewise
361 ("then"): likewise
362 ("fi"): likewise
363 (text): remove
364 (argument): likewise
365 (script): accept empty scripts and make exit on error
366 (arguments): use GRUB_PARSER_TOKEN_ARG
367 (function): likewise
368 (command): move error handling to script
369 (menuentry): move grub_script_lexer_ref before
370 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
371 argument. All callers updated
372
f4448a07 3732009-06-04 Robert Millan <rmh.grub@aybabtu.com>
374
375 Prevent GRUB from probing floppies during boot.
376
377 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
378 * commands/search.c (options): Add --no-floppy.
379 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
380 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
381 --no-floppy when searching for UUIDs.
382
2bf5885a 3832009-06-04 Robert Millan <rmh.grub@aybabtu.com>
384
385 Simplify the code duplication in commands/search.c.
386
387 * commands/search.c (search_label, search_fs_uuid): Merge into ...
388 (search_fs): ... this. Update all users.
389
f6fd460a 3902009-06-03 Felix Zielcke <fzielcke@z-51.de>
391
392 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
393
cbb3c83e 3942009-05-28 Pavel Roskin <proski@gnu.org>
395
57788cfd 396 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
397 Remove the original symlink explicitly.
398
cbb3c83e 399 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
400 just one slash. That's how grub_fshelp_find_file() does it.
401
cd0d5e30 4022009-05-26 Pavel Roskin <proski@gnu.org>
403
f0f8bbe2 404 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
405 to `str'.
406
cd0d5e30 407 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
408 possibly unused.
409
8c2cab51 4102009-05-25 Christian Franke <franke@computer.org>
411
412 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
413 register.
414 (grub_atapi_identify): Add wait after drive select.
415 (grub_ata_identify): Do more strict status register check before
416 calling grub_atapi_identify (). Suppress error message if status
417 register is 0x00 after command failure. Add status register
418 check after PIO read to avoid bogus identify due to stuck DRQ.
419 Thanks to Pavel Roskin for testing.
420 (grub_device_initialize): Remove unsafe status register check.
421 Thanks to 'phcoder' for problem report and patch.
422 Prevent sign extension in debug message.
423
230c0ad6 4242009-05-23 Colin D Bennett <colin@gibibit.com>
425
426 Cleaned up `include/grub/normal.h'. Grouped prototypes by
427 definition file, and functions defined in `normal/menu.c' have had
428 their prototypes moved to `include/grub/menu.h' for consistency.
429
430 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
431 from normal.h.
432 (grub_menu_get_entry): Likewise.
433 (grub_menu_get_timeout): Likewise.
434 (grub_menu_set_timeout): Likewise.
435 (grub_menu_execute_entry): Likewise.
436 (grub_menu_execute_with_fallback): Likewise.
437 (grub_menu_entry_run): Likewise.
438
439 * include/grub/normal.h: Re-ordered and grouped function
440 prototypes by file that the function is defined in.
441 (grub_menu_execute_callback): Removed; moved to menu.h.
442 (grub_menu_get_entry): Likewise.
443 (grub_menu_get_timeout): Likewise.
444 (grub_menu_set_timeout): Likewise.
445 (grub_menu_execute_entry): Likewise.
446 (grub_menu_execute_with_fallback): Likewise.
447 (grub_menu_entry_run): Likewise.
448 (grub_menu_addentry): Renamed from this ...
449 (grub_normal_add_menu_entry): ... to this.
450
451 * normal/main.c (grub_menu_addentry): Renamed from this ...
452 (grub_normal_add_menu_entry): ... to this.
453
454 * script/sh/execute.c (grub_script_execute_menuentry): Update
455 reference to renamed grub_menu_addentry function.
456
861f03a5 4572009-05-23 Felix Zielcke <fzielcke@z-51.de>
458
459 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
460
96b1619a 4612009-05-22 Pavel Roskin <proski@gnu.org>
462
bf6a5fb2 463 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
464 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
465 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
466 compiling for the i386 targets, but not for the utilities.
467
96b1619a 468 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
469 to grub_uint8_t.
470 (grub_root_drive): Likewise.
471 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
472 remove alignment.
473 (grub_root_drive): Change size to byte.
474 (grub_start_addr): Remove.
475 (grub_end_addr): Likewise.
476 (grub_apm_bios_info): Likewise.
477
b729776b 4782009-05-21 Felix Zielcke <fzielcke@z-51.de>
479
480 * normal/i386: Remove.
481 * normal/powerpc: Likewise.
482 * normal/sparc64: Likewise.
483 * normal/x86_64: Likewise.
484
0a15ce80 4852009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
486
487 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
488 * loader/i386/linux_trampoline.S: Fix identation
489 * loader/i386/xnu_helper.S: Likewise
d6da58e6 490
33db9015 4912009-05-18 Colin D Bennett <colin@gibibit.com>
492
d6da58e6 493 Display error messages when parsing a Lua statement fails.
494 Previously, executing a syntactically invalid statement like
495 ")foo" or "bar;" would silently fail.
33db9015 496
497 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 498 (grub_lua_parse_line): Improved reporting of Lua parser and
499 execution errors.
33db9015 500
46422c89 5012009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
502
503 Remove -Werror which causes build to fail on some systems
504
505 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
506 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
507 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 508
22f53a96 5092009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
510
511 trampoline for linux on 64-bit platform
512
18f547ad 513 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
514 loader/i386/efi/linux_trampoline.S
515 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
22f53a96 516 declration
d6da58e6 517 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
518 here
22f53a96 519 * loader/i386/linux_trampoline.S: moved here
d6da58e6 520 * loader/i386/efi/linux.c (allocate_pages): reserve space for
521 trampoline
22f53a96 522 (jumpvector): removed
523 (grub_linux_trampoline_start): new declaration
524 (grub_linux_trampoline_end): likewise
525 (grub_linux_boot): use trampoline when on 64-bit platform
526 * loader/i386/linux.c: likewise
527
cb5a0f40 5282009-05-16 Pavel Roskin <proski@gnu.org>
529
530 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
531 const to avoid a warning.
532 (grub_lua_setenv): Likewise.
533 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
534 lmsg to fix a warning.
535
334f2c28 5362009-05-16 Felix Zielcke <fzielcke@z-51.de>
537
538 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 539 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
540 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
541 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
542 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
543 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
544 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
545 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 546
59e5d3ec 5472009-05-16 Felix Zielcke <fzielcke@z-51.de>
548
549 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
550
9d87a1ba 5512009-05-16 Bean <bean123ch@gmail.com>
552
553 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
554 (lua_mod_SOURCES): New variable.
555 (lua_mod_CFLAGS): Likewise.
556 (lua_mod_LDFLAGS): Likewise.
557
558 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
559 (setjmp_mod_SOURCES): New variable.
560 (setjmp_mod_CFLAGS): Likewise.
561 (setjmp_LDFLAGS): Likewise.
562
563 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
564 (setjmp_mod_SOURCES): New variable.
565 (setjmp_mod_CFLAGS): Likewise.
566 (setjmp_LDFLAGS): Likewise.
567
568 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
569 (setjmp_mod_SOURCES): New variable.
570 (setjmp_mod_CFLAGS): Likewise.
571 (setjmp_LDFLAGS): Likewise.
572
573 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
574 (setjmp_mod_SOURCES): New variable.
575 (setjmp_mod_CFLAGS): Likewise.
576 (setjmp_LDFLAGS): Likewise.
577
578 * normal/i386/setjmp.S: Moved from here ...
579 * lib/i386/setjmp.S: ... Moved here
580 * normal/x86_64/setjmp.S: Moved from here ...
581 * lib/x86_64/setjmp.S: ... Moved here
582 * normal/powerpc/setjmp.S: Moved from here ...
583 * lib/powerpc/setjmp.S: ... Moved here
584 * normal/sparc64/setjmp.S: Moved from here ...
585 * lib/sparc64/setjmp.S: ... Moved here
586
587 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
588 returns_twice in mingw.
589
590 * script/lua/grub_lib.c: New file.
591 * script/lua/grub_lib.h: Likewise.
592 * script/lua/grub_lua.h: Likewise.
593 * script/lua/grub_main.c: Likewise.
594 * script/lua/lapi.c: Likewise.
595 * script/lua/lapi.h: Likewise.
596 * script/lua/lauxlib.c: Likewise.
597 * script/lua/lauxlib.h: Likewise.
598 * script/lua/lbaselib.c: Likewise.
599 * script/lua/lcode.c: Likewise.
600 * script/lua/lcode.h: Likewise.
601 * script/lua/ldblib.c: Likewise.
602 * script/lua/ldebug.c: Likewise.
603 * script/lua/ldebug.h: Likewise.
604 * script/lua/ldo.c: Likewise.
605 * script/lua/ldo.h: Likewise.
606 * script/lua/ldump.c: Likewise.
607 * script/lua/lfunc.c: Likewise.
608 * script/lua/lfunc.h: Likewise.
609 * script/lua/lgc.c: Likewise.
610 * script/lua/lgc.h: Likewise.
611 * script/lua/linit.c: Likewise.
612 * script/lua/liolib.c: Likewise.
613 * script/lua/llex.c: Likewise.
614 * script/lua/llex.h: Likewise.
615 * script/lua/llimits.h: Likewise.
616 * script/lua/lmathlib.c: Likewise.
617 * script/lua/lmem.c: Likewise.
618 * script/lua/lmem.h: Likewise.
619 * script/lua/loadlib.c: Likewise.
620 * script/lua/lobject.c: Likewise.
621 * script/lua/lobject.h: Likewise.
622 * script/lua/lopcodes.c: Likewise.
623 * script/lua/lopcodes.h: Likewise.
624 * script/lua/loslib.c: Likewise.
625 * script/lua/lparser.c: Likewise.
626 * script/lua/lparser.h: Likewise.
627 * script/lua/lstate.c: Likewise.
628 * script/lua/lstate.h: Likewise.
629 * script/lua/lstring.c: Likewise.
630 * script/lua/lstring.h: Likewise.
631 * script/lua/lstrlib.c: Likewise.
632 * script/lua/ltable.c: Likewise.
633 * script/lua/ltable.h: Likewise.
634 * script/lua/ltablib.c: Likewise.
635 * script/lua/ltm.c: Likewise.
636 * script/lua/ltm.h: Likewise.
637 * script/lua/lua.h: Likewise.
638 * script/lua/luaconf.h: Likewise.
639 * script/lua/lualib.h: Likewise.
640 * script/lua/lundump.c: Likewise.
641 * script/lua/lundump.h: Likewise.
642 * script/lua/lvm.c: Likewise.
643 * script/lua/lvm.h: Likewise.
644 * script/lua/lzio.c: Likewise.
645 * script/lua/lzio.h: Likewise.
646
5e898c9d 6472009-05-16 Bean <bean123ch@gmail.com>
648
649 * include/grub/kernel.h (grub_module_header_types): Add type
650 OBJ_TYPE_CONFIG.
651
652 * kern/main.c (grub_load_config): New function.
653 (grub_main): Call grub_load_config to read boot config.
654
655 * grub-mkimage (generate_image): New parameter config_path.
656 (options): New option --config.
657 (main): Parse --config option, and pass it to generate_image.
658
cf353a47 6592009-05-14 Christian Franke <franke@computer.org>
660
661 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
662 This fixes build on Cygwin.
663
3834887f 6642009-05-14 Pavel Roskin <proski@gnu.org>
665
666 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
667 jump. This saves two bytes, so the typical case of 2 swapped
668 drives would fit 32 bytes.
669
8090fc01 6702009-05-13 Pavel Roskin <proski@gnu.org>
671
ac963883 672 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
673 grub_uint32_t to avoid a warning.
674
8090fc01 675 * loader/i386/linux.c (allocate_pages): When assigning
676 real_mode_mem, cast through grub_size_t to fix a warning. The
677 code already makes sure that the value would fit a pointer.
678 (grub_linux_setup_video): Cast render_target->data to
679 grub_size_t to fix a warning.
680
18f547ad 6812009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 682
683 * commands/i386/pc/drivemap.c: New file - implement drivemap
684 command.
685 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
686 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
687
6f6a8b28 6882009-05-13 Pavel Roskin <proski@gnu.org>
689
690 * util/i386/pc/grub-setup.c (setup): Remove unused variable
691 embedding_area_exists.
692
15fbf4c4 6932009-05-13 Robert Millan <rmh.grub@aybabtu.com>
694
695 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
696 it easier to understand / work with.
59978c8a 697 Improve warning messages for cases where there's no embedding area,
698 or when it is too small (or core.img too large).
15fbf4c4 699
238e871f 7002009-05-13 Pavel Roskin <proski@gnu.org>
701
0ab3a9a4 702 * loader/i386/pc/multiboot2.c: Add necessary includes for
703 grub_multiboot2_real_boot().
704
a2c8c5f8 705 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
706 PX record is always little-endian. We only need the lower 2
707 bytes of the mode.
708
faec96af 709 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
710 facilitate code reuse.
711 (grub_cpio_mount): Use "struct head", not a char buffer. This
712 fixes a warning reported by gcc 4.4.
713
238e871f 714 * kernel/disk.c (grub_disk_read): Use void pointer for the
715 buffer.
716 (grub_disk_write): Use const void pointer for the buffer.
717 Adjust all callers. Remove unnecessary casts.
718
901d2f0c 7192009-05-10 Robert Millan <rmh.grub@aybabtu.com>
720
721 * util/i386/pc/grub-install.in: Update copyright year.
722
18f547ad 7232009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 724
725 gptsync
726
727 * commands/gptsync.c: new file
728 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
729 (gptsync_mod_SOURCES): new variable
730 (gptsync_mod_CFLAGS): likewise
731 (gptsync_mod_LDFLAGS): likewise
18f547ad 732 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 733 new definition
734 (GRUB_PC_PARTITION_TYPE_HFS): likewise
735 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
736 * conf/i386-ieee1275.rmk: likewise
737 * conf/i386-pc.rmk: likewise
738 * conf/powerpc-ieee1275.rmk: likewise
739
b4ba690a 7402009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
741
742 Fixed grub-emu
743
744 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
745 (grub_dl_ref): likewise
746
317e1a44 7472009-05-08 Robert Millan <rmh.grub@aybabtu.com>
748
749 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
750 split in two functions (one for msdos and one for gpt).
751
041b8094 7522009-05-08 Pavel Roskin <proski@gnu.org>
753
752473c2 754 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
755 not modified.
756
041b8094 757 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
758 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
759 Initialize them with -1. Add sanity check for bad1. Eliminate
760 nerr variable.
761
172800ce 7622009-05-08 David S. Miller <davem@davemloft.net>
763
764 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
765
29aa5e81 7662009-05-06 Robert Millan <rmh.grub@aybabtu.com>
767
768 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
769 existance.
770
96613b62 7712009-05-05 Felix Zielcke <fzielcke@z-51.de>
772
773 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 774 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 775
eef73c8a 7762009-05-05 David S. Miller <davem@davemloft.net>
777
778 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
779
119494b5 7802009-05-05 Pavel Roskin <proski@gnu.org>
781
782 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
783 of grub_dl_ref() and grub_dl_unref().
784 * commands/parttool.c: Remove preprocessor conditionals around
785 grub_dl_ref() and grub_dl_unref().
786 * fs/affs.c: Likewise.
787 * fs/afs.c: Likewise.
788 * fs/cpio.c: Likewise.
789 * fs/ext2.c: Likewise.
790 * fs/fat.c: Likewise.
791 * fs/hfs.c: Likewise.
792 * fs/hfsplus.c: Likewise.
793 * fs/iso9660.c: Likewise.
794 * fs/jfs.c: Likewise.
795 * fs/minix.c: Likewise.
796 * fs/ntfs.c: Likewise.
797 * fs/reiserfs.c: Likewise.
798 * fs/sfs.c: Likewise.
799 * fs/udf.c: Likewise.
800 * fs/ufs.c: Likewise.
801 * fs/xfs.c: Likewise.
802 * include/grub/dl.h: Likewise.
803 * loader/xnu.c: Likewise.
804
de5fd76e 8052009-05-04 Pavel Roskin <proski@gnu.org>
806
807 * commands/acpi.c: Remove unused variable my_mod.
808 * partmap/amiga.c: Likewise.
809 * partmap/apple.c: Likewise.
810 * partmap/gpt.c: Likewise.
811 * partmap/pc.c: Likewise.
812 * partmap/sun.c: Likewise.
813 * term/gfxterm.c: Likewise.
814 * term/i386/pc/vesafb.c: Likewise.
815 * term/i386/pc/vga.c: Likewise.
816
983598ad 8172009-05-04 David S. Miller <davem@davemloft.net>
818
819 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
820 pointer args to grub_ieee1275_get_property().
821
8aadec43 822 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
823
9554b15e 824 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
825 devices, and do not traverse down under controller nodes.
826
67e23c90 827 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
828 (grub_ofdisk_open): Use it to un-escape "," characters.
829 * kern/disk.c (find_part_sep): New.
830 (grub_disk_open): Use it to find the first non-escaped ','
831 character in the disk name.
832 * util/ieee1275/devicemap.c (escape_of_path): New.
833 (grub_util_emit_devicemap_entry): Use it.
834 * util/sparc64/ieee1275/grub-install.in: Update script to
835 strip partition specifiers properly by not triggering on
836 '\' escaped ',' characters.
837
74bfdd2f 8382009-05-04 Robert Millan <rmh.grub@aybabtu.com>
839
840 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
841 to 0x300.
842 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
843 resolutions.
844 (linux_vesafb_modes): Add a lot of additional modes to the list (based
845 on documentation from Wikipedia).
846
4241d2b1 8472009-05-04 Pavel Roskin <proski@gnu.org>
848
849 * disk/ata.c: Spelling fixes.
850 * disk/raid.c: Likewise.
851 * disk/usbms.c: Likewise.
852 * disk/dmraid_nvidia.c: Likewise.
853 * kern/ieee1275/openfw.c: Likewise.
854 * kern/ieee1275/init.c: Likewise.
855 * kern/ieee1275/cmain.c: Likewise.
856 * boot/i386/pc/cdboot.S: Likewise.
857 * video/readers/png.c: Likewise.
858 * video/i386/pc/vbe.c: Likewise.
859 * fs/udf.c: Likewise.
860 * fs/hfs.c: Likewise.
861 * fs/reiserfs.c: Likewise.
862 * efiemu/runtime/efiemu.c: Likewise.
863 * efiemu/main.c: Likewise.
864 * efiemu/mm.c: Likewise.
865 * include/grub/elf.h: Likewise.
866 * include/grub/xnu.h: Likewise.
867 * include/grub/usbdesc.h: Likewise.
868 * include/grub/usb.h: Likewise.
869 * include/grub/script_sh.h: Likewise.
870 * include/grub/lib/LzmaEnc.h: Likewise.
871 * include/grub/efiemu/efiemu.h: Likewise.
872 * include/grub/command.h: Likewise.
873 * normal/menu.c: Likewise.
874 * normal/main.c: Likewise.
875 * normal/datetime.c: Likewise.
876 * bus/usb/uhci.c: Likewise.
877 * mmap/i386/uppermem.c: Likewise.
878 * mmap/mmap.c: Likewise.
879 * commands/acpi.c: Likewise.
880 * commands/test.c: Likewise.
881 * partmap/apple.c: Likewise.
882 * font/font.c: Likewise.
883 * loader/sparc64/ieee1275/linux.c: Likewise.
884 * loader/macho.c: Likewise.
885 * loader/i386/bsd_trampoline.S: Likewise.
886 * loader/i386/bsd.c: Likewise.
887 * loader/xnu.c: Likewise.
888 * term/i386/pc/vesafb.c: Likewise.
889 * term/usb_keyboard.c: Likewise.
890 * util/resolve.c: Likewise.
891 * util/getroot.c: Likewise.
892
0cfc0083 8932009-05-04 Felix Zielcke <fzielcke@z-51.de>
894
895 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
896
7c1d00cd 8972009-05-04 Robert Millan <rmh.grub@aybabtu.com>
898
899 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
900 build error.
901
b01f0548 9022009-05-04 Robert Millan <rmh.grub@aybabtu.com>
903
904 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
905 parameter only available on BIOS.
906
ecc3eb22 9072009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
908
909 Removed wrong semicolon in declaration
910
911 * grub/misc.h (grub_dprintf): remove semicolon
912
112972a9 9132009-05-04 Robert Millan <rmh.grub@aybabtu.com>
914
915 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
916 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
917 is done by grub_cmd_linux() now).
918 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
919 restore video to text mode.
920 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
921 indicates lack of "vga=" parameter. "vga=0" is mapped to
922 `GRUB_LINUX_VID_MODE_NORMAL'.
923
afd5c115 9242009-05-04 Felix Zielcke <fzielcke@z-51.de>
925
926 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
927 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
928 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 929 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 930 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
931 `grub_script.tab.c'.
932
933 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
934 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
936 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
937 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
938
faa517ce 939 * Makefile.in: Remove duplicated 2008 in Copyright line.
940
ae0c0bdc 9412009-05-04 Robert Millan <rmh.grub@aybabtu.com>
942
943 * util/misc.c (grub_util_warn): New function. Emmits a warning
944 unconditionally.
945 * include/grub/util/misc.h (grub_util_warn): New declaration.
946
947 * util/i386/pc/grub-install.in: Understand --force and pass it down
948 to grub-setup.
949
950 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
951 down to setup().
952 (setup): Improve error messages and add warnings when requested to
953 install in odd layouts. Refuse to install using blocklists unless
954 --force was set.
955
18f547ad 9562009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 957
958 * disk/raid.c (grub_raid_scan_device): Improve debug message.
959
6d260daa 9602009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
961
962 Updated copyright year
963
964 * fs/hfsplus.c: updated copyright year
18f547ad 965
69f853f8 9662009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
967
968 HFS+ UUID
969
18f547ad 970 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 971 in the space previously used by unused3
972 (grub_hfsplus_uuid): new function
973 (grub_hfsplus_fs): added uuid field
974
4c402e73 9752009-05-03 Pavel Roskin <proski@gnu.org>
976
977 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
978 suppress warnings. It's no longer needed.
979 * disk/host.c: Likewise.
980 * disk/ata_pthru.c: Likewise.
981 * disk/loopback.c: Likewise.
982 * hook/datehook.c: Likewise.
983 * parttool/pcpart.c: Likewise.
984 * fs/i386/pc/pxe.c: Likewise.
985 * fs/ntfscomp.c: Likewise.
986 * efiemu/main.c: Likewise.
987 * mmap/mmap.c: Likewise.
988 * commands/crc.c: Likewise.
989 * commands/hexdump.c: Likewise.
990 * commands/hdparm.c: Likewise.
991 * commands/acpi.c: Likewise.
992 * commands/echo.c: Likewise.
993 * commands/minicmd.c: Likewise.
994 * commands/blocklist.c: Likewise.
995 * commands/memrw.c: Likewise.
996 * commands/loadenv.c: Likewise.
997 * commands/usbtest.c: Likewise.
998 * commands/lsmmap.c: Likewise.
999 * commands/boot.c: Likewise.
1000 * commands/parttool.c: Likewise.
1001 * commands/configfile.c: Likewise.
1002 * commands/search.c: Likewise.
1003 * commands/ieee1275/suspend.c: Likewise.
1004 * commands/cat.c: Likewise.
1005 * commands/i386/pc/pxecmd.c: Likewise.
1006 * commands/i386/pc/play.c: Likewise.
1007 * commands/i386/pc/halt.c: Likewise.
1008 * commands/i386/pc/vbeinfo.c: Likewise.
1009 * commands/i386/pc/vbetest.c: Likewise.
1010 * commands/lspci.c: Likewise.
1011 * commands/date.c: Likewise.
1012 * commands/handler.c: Likewise.
1013 * commands/ls.c: Likewise.
1014 * commands/test.c: Likewise.
1015 * commands/cmp.c: Likewise.
1016 * commands/efi/loadbios.c: Likewise.
1017 * commands/efi/fixvideo.c: Likewise.
1018 * commands/halt.c: Likewise.
1019 * commands/help.c: Likewise.
1020 * commands/reboot.c: Likewise.
1021 * hello/hello.c: Likewise.
1022 * script/sh/main.c: Likewise.
1023 * loader/xnu.c: Likewise.
1024 * term/terminfo.c: Likewise.
1025 * term/i386/pc/serial.c: Likewise.
1026 * term/usb_keyboard.c: Likewise.
1027
515b5079 10282009-05-03 David S. Miller <davem@davemloft.net>
1029
1030 * normal/menu.c: Include grub/parser.h
1031
dfc31a22 10322009-05-03 Pavel Roskin <proski@gnu.org>
1033
2fee74f1 1034 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1035 not char*.
1036 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1037 Suggested by Javier Martín <lordhabbit@gmail.com>
1038
dfc31a22 1039 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1040 efiemu??.o doesn't exist.
1041 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1042 copying.
1043
18f547ad 10442009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 1045
1046 FreeBSD 64-bit support
1047
18f547ad 1048 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 1049 and loader/i386/bsd_trampoline.S
1050 (bsd_mod_ASFLAGS): new variable
1051 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1052 (FREEBSD_MODTYPE_KERNEL64): likewise
1053 (grub_bsd64_trampoline_start): likewise
1054 (grub_bsd64_trampoline_end): likewise
1055 (grub_bsd64_trampoline_selfjump): likewise
1056 (grub_bsd64_trampoline_gdt): likewise
1057 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1058 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1059 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1060 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 1061 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 1062 of "attrib" member
1063 * loader/i386/bsd_pagetable.c: new file
1064 * loader/i386/bsd_trampoline.S: likewise
1065 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1066 (ALIGN_VAR): likewise
1067 (entry_hi): new variable
1068 (kern_end_mdofs): likewise
1069 (is_64bit): likewise
1070 (grub_freebsd_add_meta): use ALIGN_VAR
1071 (grub_e820_mmap): new declaration
1072 (grub_freebsd_add_mmap): new function
1073 (grub_freebsd_add_meta_module): support 64 bit kernels
1074 (grub_freebsd_list_modules): use ALIGN_VAR
1075 (gdt_descriptor): new declaration
1076 (grub_freebsd_boot): support 64 bit kernels
1077 (grub_bsd_elf64_hook): new function
1078 (grub_bsd_load_elf): support elf64
1079
038c5720 10802009-05-03 Bean <bean123ch@gmail.com>
1081
1082 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1083 after we get the result of if statement.
1084
fc45fb58 10852009-05-03 Bean <bean123ch@gmail.com>
1086
1087 * Makefile.in (enable_efiemu): New variable.
1088
1089 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1090 set.
1091 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1092 path.
1093 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1094 path, add -mno-red-zone option.
1095 (efiemu64_s.o): Likewise.
1096 (efiemu64.o): Use macro $^ for source file.
1097
1098 * configure.ac (--enable-efiemu): New option.
1099
bbee0f2b 11002009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1101
1102 xnu support
1103
1104 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1105 (pkglib_MODULES): add xnu.mod
1106 (xnu_mod_SOURCES): new variable
1107 (xnu_mod_CFLAGS): likewise
1108 (xnu_mod_LDFLAGS): likewise
1109 (xnu_mod_ASFLAGS): likewise
1110 * conf/i386-pc.rmk: likewise
1111 * conf/x86_64-efi.rmk: likewise
7dd4a573 1112 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1113 new declaration
1114 * include/grub/i386/macho.h: new file
1115 * include/grub/i386/xnu.h: likewise
1116 * include/grub/macho.h: likewise
1117 * include/grub/machoload.h: likewise
1118 * include/grub/x86_64/macho.h: likewise
1119 * include/grub/x86_64/xnu.h: likewise
1120 * include/grub/xnu.h: likewise
1121 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1122 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1123 * loader/i386/efi/xnu.c: new file
1124 * loader/i386/pc/xnu.c: likewise
1125 * loader/i386/xnu.c: likewise
1126 * loader/i386/xnu_helper.S: likewise
1127 * loader/macho.c: likewise
1128 * loader/xnu.c: likewise
1129 * loader/xnu_resume.c: likewise
1130 * util/grub-dumpdevtree: likewise
1131 * include/grub/i386/pit.h: include grub/err.h
1132 (grub_pit_wait): export
1133 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1134
5caf964d 11352009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1136
1137 Efiemu
7dd4a573 1138
5caf964d 1139 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1140 _linux_efi, linux_efi.
1141 new files in grub-emu
5caf964d 1142 new targets efiemu32.o and efiemu64.o
1143 * loader/linux_normal_efiemu.c: likewise
1144 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1145 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1146 files to copy
1147 * include/grub/autoefi.h: new file
7dd4a573 1148 * include/grub/i386/efiemu.h: likewise
5caf964d 1149 * include/grub/i386/pc/efiemu.h: likewise
1150 * include/grub/efi/api.h: add LL suffix when necessary
1151 new definitions relating to tables
1152 * include/grub/efiemu/efiemu.h: new file
1153 * include/grub/efiemu/runtime.h: likewise
1154 * efiemu/prepare.c: likewise
1155 * efiemu/loadcore_common.c: likewise
1156 * efiemu/loadcore64.c: likewise
1157 * efiemu/runtime/efiemu.sh: likewise
1158 * efiemu/runtime/efiemu.S: likewise
1159 * efiemu/runtime/efiemu.c: likewise
1160 * efiemu/runtime/config.h: likewise
1161 * efiemu/prepare32.c: likewise
1162 * efiemu/main.c: likewise
1163 * efiemu/modules/pnvram.c: likewise
1164 * efiemu/modules/i386: likewise
1165 * efiemu/modules/i386/pc: likewise
1166 * efiemu/modules/acpi.c: likewise
1167 * efiemu/i386/pc/cfgtables.c: likewise
1168 * efiemu/i386/loadcore64.c: likewise
1169 * efiemu/i386/loadcore32.c: likewise
1170 * efiemu/prepare64.c: likewise
1171 * efiemu/loadcore.c: likewise
1172 * efiemu/symbols.c: likewise
1173 * efiemu/mm.c: likewise
1174 * efiemu/loadcore32.c: likewise
7dd4a573 1175
11762009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 1177
1178 ACPI spoofing
1179
1180 * commands/acpi.c: new file
1181 * commands/i386/pc/acpi.c: likewise
1182 * commands/efi/acpi.c: likewise
1183 * include/grub/acpi.h: likewise
1184 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1185 (acpi_mod_SOURCES): new variable
1186 (acpi_mod_CFLAGS): likewise
1187 (acpi_mod_LDFLAGS): likewise
1188 * conf/i386-efi.rmk: likewise
1189 * conf/x86_64-efi.rmk: likewise
1190
7dd4a573 11912009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 1192
1193 Missing part from mmap patch
1194
1195 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1196 (grub_mmap_unregister)
1197 (grub_mmap_free_and_unregister): use grub_mmap_register
1198
7dd4a573 11992009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 1200
1201 Mmap services
1202
1203 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1204 * loader/i386/linux.c (find_mmap_size): likewise
1205 (allocate_pages): likewise
1206 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1207 (grub_fill_multiboot_mmap): likewise
1208 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1209 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1210 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1211 (OPENBSD_MMAP_RESERVED): likewise
1212 * include/grub/i386/pc/memory.h: include grub/memory.h
1213 (grub_lower_mem): removed
1214 (grub_upper_mem): likewise
1215 (GRUB_MACHINE_MEMORY_ACPI): new definition
1216 (GRUB_MACHINE_MEMORY_NVS): likewise
1217 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1218 (GRUB_MACHINE_MEMORY_HOLE): likewise
1219 (grub_machine_mmap_register): likewise
1220 (grub_machine_mmap_unregister): likewise
1221 (grub_machine_get_upper): likewise
1222 (grub_machine_get_lower): likewise
1223 (grub_machine_get_post64): likewise
1224 * include/grub/i386/efi/memory.h: new file
1225 * include/grub/x86_64/efi/memory.h: likewise
1226 * include/grub/efi/memory.h: likewise
1227 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1228 (mmap_mod_SOURCES): new variable
1229 (mmap_mod_LDFLAGS): likewise
1230 (mmap_mod_ASFLAGS): likewise
1231 * conf/i386-coreboot.rmk: likewise
1232 * conf/i386-ieee1275.rmk: likewise
1233 * conf/i386-efi.rmk: likewise
1234 * conf/x86_64-efi.rmk: likewise
1235 * include/grub/types.h (UINT_TO_PTR): new macro
1236 (PTR_TO_UINT32): likewise
1237 (PTR_TO_UINT64): likewise
1238 * include/grub/memory.h: new file
1239 * mmap/i386/pc/mmap.c: likewise
1240 * mmap/i386/pc/mmap_helper.S: likewise
1241 * mmap/i386/uppermem.c: likewise
1242 * mmap/mmap.c: likewise
1243 * mmap/efi/mmap.c: likewise
7dd4a573 1244 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 1245 grub_upper_mem
1246 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1247 (grub_upper_mem): likewise
1248 (grub_machine_init): don't use grub_upper_mem,
1249 make grub_lower_mem local
1250 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1251 grub_mmap_iterate and grub_mmap_get_upper
1252 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1253
d558e6b5 12542009-05-02 Bean <bean123ch@gmail.com>
1255
1256 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1257 script/sh/parser.y.
1258 (pkglib_MODULES): Add normal.mod and sh.mod.
1259 (normal_SOURCES): New variable.
1260 (normal_mod_CFLAGS): Likewise.
1261 (normal_mod_LDFLAGS): Likewise.
1262 (sh_mod_SOURCES): Likewise.
1263 (sh_mod_CFLAGS): Likewise.
1264 (sh_mod_LDFLAGS): Likewise.
1265
1266 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1267 script/sh/lexer.c_DEPENDENCIES.
1268 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1269 kern/rescue_reader.c and kern/rescue_parser.c.
1270 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1271 (grub_emu_SOURCES): Change source files.
1272 (pkglib_MODULES): Remove normal.mod.
1273 (normal_SOURCES): Removed.
1274 (normal_mod_CFLAGS): Likewise.
1275 (normal_mod_LDFLAGS): Likewise.
1276 * conf/i386-coreboot.rmk: Likewise.
1277 * conf/i386-efi.rmk: Likewise.
1278 * conf/i386-ieee1276.rmk: Likewise.
1279 * conf/powerpc-ieee1275.rmk: Likewise.
1280 * conf/sparc64-ieee1275.rmk: Likewise.
1281 * conf/x86_64-efi.rmk: Likewise.
1282
1283 * include/grub/command.h (grub_command_execute): New inline function.
1284
1285 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1286
1287 * include/grub/normal.h: Remove <grub/setjmp.h>.
1288 (grub_fs_module_list): Moved to normal/autofs.c.
1289 (grub_exit_env): Removed.
1290 (grub_command_execute): Likewise.
1291 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1292 parameter script.
1293 (read_command_list): New function declaration.
1294 (read_fs_list): Likewise.
1295
1296 * include/parser.h: Include <grub/reader.h>.
1297 (grub_parser_split_cmdline): Change type of getline parameter.
1298 (grub_parser): New structure.
1299 (grub_parser_class): New variable.
1300 (grub_parser_execute): New function declaration.
1301 (grub_register_rescue_parser): Likewise.
1302 (grub_parser_register): New inline function.
1303 (grub_parser_unregister): Likewise.
1304 (grub_parser_get_current): Likewise.
1305 (grub_parser_set_current): Likewise.
1306
1307 * include/grub/reader.h: New file.
1308 * kern/reader.c: Likewise.
1309 * kern/rescue_parser.c: Likewise.
1310 * kern/rescue_reader.c: Likewise.
1311 * normal/autofs.c: Likewise.
1312 * normal/dyncmd.c: Likewise.
1313
1314 * include/grub/rescue.h: Removed.
1315 * normal/command.h: Likewise.
1316
1317 * include/grub/script.h: Moved to ...
1318 * include/grub/script_sh.h: ... Moved here.
1319 * normal/execute.c: Moved to ...
1320 * script/sh/execute.c: ... Moved here.
1321 * normal/function.c: Moved to ...
1322 * script/sh/function.c: ... Moved here.
1323 * normal/lexer.c: Moved to ...
1324 * script/sh/lexer.c: ... Moved here.
1325 * normal/parser.y: Moved to ...
1326 * script/sh/parser.y: ... Moved here.
1327 * normal/script.c: Moved to ...
1328 * script/sh/script.c: ... Moved here.
1329
1330 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1331 <grub/reader.h>.
1332 (grub_exit_env): Removed.
1333 (fs_module_list): Moved to normal/autofs.c.
1334 (grub_file_getline): Don't handle comment here.
1335 (free_menu): Skip removed field entry->commands.
1336 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1337 script parameter.
1338 (read_config_file): Removed nested parameter, change getline function.
1339 (grub_enter_normal_mode): Removed.
1340 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1341 (read_command_list): Likewise.
1342 (autoload_fs_module): Moved to normal/autofs.c.
1343 (read_fs_list): Likewise.
1344 (reader_nested): New variable.
1345 (grub_normal_execute): Run parser.sh to switch to sh parser.
1346 (grub_cmd_rescue): Removed.
1347 (cmd_normal): Removed.
1348 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1349 rescue command.
1350 (grub_cmdline_run): New function.
1351 (grub_normal_reader_init): Likewise.
1352 (grub_normal_read_line): Likewise.
1353 (grub_env_write_pager): Likewise.
1354 (cmdline): New variable.
1355 (grub_normal_reader): Likewise.
1356 (GRUB_MOD_INIT): Register normal reader and set as current, register
1357 pager hook, register normal command with grub_register_command_prio,
1358 so that it won't show up in command.lst.
1359 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1360 grub_fs_autoload_hook.
1361
1362 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1363 (grub_menu_execute_entry): Replace grub_script_execute with
1364 grub_parser_execute, change parameter to grub_command_execute.
1365
1366 * normal/menu_text.c: Remove <grub/script.h>.
1367
1368 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1369 and <grub/parser.h>.
1370 (run): Change editor_getline to use new parser interface. Change
1371 parameter to grub_command_execute.
1372
1373 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1374 <grub/reader.h> and <grub/parser.h>.
1375 (grub_load_normal_mode): Execute normal command.
1376 (grub_main): Call grub_register_core_commands,
1377 grub_register_rescue_parser and grub_register_rescue_reader, use
1378 grub_reader_loop to enter input loop.
1379
7dd4a573 1380 * kern/parser.c (grub_parser_split_cmdline): Change type of
1381 getline parameter.
d558e6b5 1382 (grub_parser_class): New variable.
1383 (grub_parser_execute): New function.
1384
1385 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1386 * loader/multiboot2.c: Likewise.
1387 * loader/sparc64/ieee1275/linux.c: Likewise.
1388
1389 * util/grub-emu.c (read_command_list): New dummy function.
1390
18db813d 13912009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1392
1393 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1394 count to 16 for CCISS and IDA.
1395
6c67de15 13962009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1397
1398 * normal/menu_text.c (grub_wait_after_message): Print a newline
1399 after waiting for user input.
1400
1401 * loader/i386/linux.c: Include `<grub/normal.h>'.
1402 (grub_cmd_linux): Improve the error message about `ask' mode, by
1403 waiting for user input so it's not missed (we can do this, since
1404 user requested interaction).
1405
d9dc87b0 14062009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1407
1408 Added missing lst to grub-mkrescue
1409
1410 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1411 and ${input_dir}/parttool.lst
1412
ac8a2baa 14132009-04-30 David S. Miller <davem@davemloft.net>
1414
ad22a610 1415 * util/hostdisk.c (device_is_wholedisk): New function.
1416 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1417 zero only if device_is_wholedisk() returns true.
1418
6966215d 1419 * util/hostdisk.c (convert_system_partition_to_system_disk):
1420 Handle virtual disk devices named /dev/vdiskX as found on sparc
1421 and powerpc.
1422
ac8a2baa 1423 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1424 lettered partition specifier is found, convert to numbered.
1425
979b4fb4 14262009-04-29 David S. Miller <davem@davemloft.net>
1427
e2bf39b2 1428 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1429 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1430
3c64e104 1431 * normal/command.c: Add missing newline at end of file.
1432
979b4fb4 1433 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1434 warnings.
1435 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1436 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1437 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1438 ihandles have a 32-bit type but need to be stored in a "void *".
1439
136d9f82 14402009-04-28 Pavel Roskin <proski@gnu.org>
1441
9459c306 1442 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1443 not disk. Adjust all dependencies.
2e08a26a 1444 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 1445 grub_disk_close().
1446
136d9f82 1447 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1448 parent's partition, don't copy it by reference, as it gets freed
1449 on close.
1450
7dd4a573 14512009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 1452
1453 Preboot hooks support
1454
1455 * commands/boot.c (struct grub_preboot_t): new declaration
1456 (preboots_head): new variable
1457 (preboots_tail): likewise
1458 (grub_loader_register_preboot_hook): new function
1459 (grub_loader_unregister_preboot_hook): likewise
1460 (grub_loader_set): launch preboot hooks
1461 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1462 (grub_loader_register_preboot_hook): new declaration
1463 (grub_loader_unregister_preboot_hook): likewise
1464
5af922b5 14652009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1466
1467 Warning fix
1468
7dd4a573 1469 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 1470 calling grub_dprintf
1471
a5562c30 14722009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1473
1474 Bug and warning fixes
1475
7dd4a573 1476 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 1477 declaration
1478 * commands/test.c (test_parse): fixed bug with file tests and corrected
1479 declaration of find_file
1480
4006f85c 14812009-04-26 Pavel Roskin <proski@gnu.org>
1482
1483 * Makefile.in: Don't install empty manual pages if help2man is
1484 missing. Use help2man option for output, not shell redirection.
1485
5c77c3de 14862009-04-26 David S. Miller <davem@davemloft.net>
1487
1488 * util/grub-mkdevicemap.c (make_device_map): Add missing
1489 NESTED_FUNC_ATTR to process_device().
1490
033b10a8 14912009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1492
1493 Test command
1494
1495 * commands/test.c: rewritten to use bash-like test
1496
e4343593 14972009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1498
1499 Parttool autoloading and improvements
1500
7dd4a573 1501 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 1502 (parttool.lst): new target
1503 * genmk.rb: generate parttool-*
1504 (CLEANFILES): add #{parttool}
1505 (PARTTOOLFILES): new variable
1506 * genparttoollist.sh: new file
7dd4a573 1507 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 1508 (grub_pcpart_type): likewise
1509 * commands/parttool.c (helpmsg): new variable
1510 (grub_cmd_parttool): output help if not enough arguments are supplied
1511 autoload modules
1512 (GRUB_MOD_INIT(parttool)): use helpmsg
1513
0d312500 15142009-04-24 David S. Miller <davem@davemloft.net>
1515
7dd4a573 1516 Avoiding opening same device multiple times in device iterator.
0d312500 1517
1518 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 1519 and use it to build a list of partitions in iterate_disk() and
0d312500 1520 iterate_partition().
1521
ac20caff 1522 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1523 on disk->data.
1524
0dcf7495 1525 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1526 grub_devalias_iterate() result instead of unconditional 0.
1527 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1528 Also, capture hook return value, either directly or via
1529 grub_children_iterate(), and propagate to caller.
1530 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1531 grub_children_iterate): Return value is now 'int' instead of
1532 'grub_err_t'.
1533 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1534 like a proper iterator, stopping when hooks return non-zero.
1535 (grub_devalias_iterate): Likewise.
1536
c8c08833 15372009-04-23 David S. Miller <davem@davemloft.net>
1538
1539 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1540
f01005a8 15412009-04-22 David S. Miller <davem@davemloft.net>
1542
1543 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1544 is larger than address_cells, use that value for address_cells too.
1545
4e8269da 1546 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1547 IEEE1275_MAX_PATH_LEN): Define.
1548 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1549 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1550 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1551 'devtype'. Explicitly NULL terminate devalias expansion.
1552
a1447506 1553 * util/sparc64/ieee1275/misc.c: New file.
1554 * util/sparc64/ieee1275/grub-setup.c: New file.
1555 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1556 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1557 * util/sparc64/ieee1275/grub-install.in: New file.
1558 * util/ieee1275/ofpath.c: New file.
1559 * util/ieee1275/devicemap.c: New file.
1560 * util/devicemap.c: New file.
1561 * util/deviceiter.c: New file.
1562 * kern/sparc64/ieee1275/init.c: New file.
1563 * include/grub/util/ofpath.h: New file.
1564 * include/grub/util/deviceiter.h: New file.
1565 * util/grub-mkdevicemap.c: Include deviceiter.h.
1566 Implement using grub_util_emit_devicemap_entry and
1567 grub_util_iterate_devices.
1568 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1569 util/devicemap.c into grub-mkdevicemap
1570 * conf/i386-efi.rmk: Likewise.
1571 * conf/i386-ieee1275.rmk: Likewise.
1572 * conf/i386-pc.rmk: Likewise.
1573 * conf/powerpc-ieee1275.rmk: Likewise.
1574 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1575 images and installation utilities. Build kernel as image
1576 instead of as elf binary. Use common rules as much as possible.
1577
7dd4a573 15782009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 1579
1580 Correct GPT definition
1581
7dd4a573 1582 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 1583 of "attrib" member
1584
c6c5219f 15852009-04-19 Felix Zielcke <fzielcke@z-51.de>
1586
1587 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1588
0552ff9f 15892009-04-19 David S. Miller <davem@davemloft.net>
1590
1591 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1592 (grub_rescue_cmd_linux): Rename to...
1593 (grub_cmd_linux): and fix prototype.
1594 (grub_rescue_cmd_initrd): Rename to...
1595 (grub_cmd_initrd): and fix prototype.
1596 (cmd_linux, cmd_initrd): New.
1597 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1598 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1599
d1a282fc 16002009-04-17 Pavel Roskin <proski@gnu.org>
1601
07c5039f 1602 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1603 format.
1604 (grub_ohci_transfer): Likewise.
1605
b012002d 1606 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1607
1bc09c35 1608 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1609 return without a value. Fix inconsistent indentation.
1610
e0ff9126 1611 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1612 match struct grub_fs.
1613
d1a282fc 1614 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1615 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1616 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1617 * commands/lspci.c (grub_lspci_iter): Likewise.
1618
a96df3f2 16192009-04-16 Bean <bean123ch@gmail.com>
1620
1621 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1622 value.
1623
41bb0fe9 16242009-04-15 Pavel Roskin <proski@gnu.org>
1625
1626 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1627 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1628 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1629 definitions.
1630
596c6970 16312009-04-15 Felix Zielcke <fzielcke@z-51.de>
1632
1633 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 1634 that no multiple data or metadata areas are supported and `Unknown
596c6970 1635 metadata header'.
1636
7dd4a573 16372009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 1638
1639 Move loader out of the kernel
1640
1641 * kern/loader.c: moved to ...
1642 * commands/boot.c: ... moved here
1643 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1644 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1645 * include/grub/kernel.h (grub_machine_fini): export
1646 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1647 (grub_loader_set): likewise
1648 (grub_loader_unset): likewise
1649 (grub_loader_boot): likewise
1650 * conf/common.rmk: new module boot.mod
1651 (pkglib_MODULES): add boot.mod
1652 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1653 (grub_emu_SOURCES): likewise
1654 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1655 (grub_emu_SOURCES): likewise
1656 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1657 (grub_emu_SOURCES): likewise
1658 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1659 (grub_emu_SOURCES): likewise
1660 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1661 (grub_emu_SOURCES): likewise
7dd4a573 1662 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1663 (grub_emu_SOURCES): likewise
0d5d5653 1664 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 1665 (grub_emu_SOURCES): likewise
0d5d5653 1666
7dd4a573 16672009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 1668
1669 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 1670
5999d619 1671 * kern/misc.c (grub_itoa): Removed function
1672 (grub_ltoa): likewise
1673 (grub_vsprintf): use grub_lltoa
1674
7dd4a573 16752009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 1676
1677 Restore grub-emu
1678
1679 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1680 * conf/i386-coreboot.rmk: likewise
1681 * conf/i386-ieee1275.rmk: likewise
1682 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1683
20318222 16842009-04-15 Felix Zielcke <fzielcke@z-51.de>
1685
1686 * INSTALL: Add that `./autogen.sh' needs to be run before
1687 `./configure.'.
1688
d05f0df3 16892009-04-14 Bean <bean123ch@gmail.com>
1690
1691 * Makefile.in (pkglib_DATA): Add handler.lst.
1692 (handler.lst): New rule.
1693
1694 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1695 * conf/i386-coreboot.rmk: Likewise.
1696 * conf/i386-ieee1275.rmk: Likewise.
1697 * conf/i386-efi.rmk: Likewise.
1698 * conf/x86_64-efi.rmk: Likewise.
1699 * conf/powerpc-ieee1275.rmk: Likewise.
1700 * conf/sparc64-ieee1275.rmk: Likewise.
1701
1702 * genhandlerlist.sh: New file.
1703
1704 * genmk.rb: Add rules to generate handler.lst.
1705
1706 * include/grub/normal.h (grub_file_getline): New function definition.
1707 (read_handler_list): Likewise.
1708 (free_handler_list): Likewise.
1709
1710 * include/grub/term.h (grub_term_register_input): Add name parameter
1711 for auto generation of handler.lst.
1712 (grub_term_register_output): Likewise.
1713
1714 * normal/handler.c: New file.
1715
1716 * normal/main.c (get_line): Renamed to grub_file_getline.
1717 (read_config_file): Use the newly renamed grub_file_getline.
1718 (read_command_list): Likewise.
1719 (read_fs_list): Likewise.
1720 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1721 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1722
1723 * term/efi/console.c (grub_console_init): Add name parameter for auto
1724 generation of handler.lst.
1725 * term/gfxterm.c: Likewise.
1726 * term/i386/pc/at_keyboard.c: Likewise.
1727 * term/i386/pc/console.c: Likewise.
1728 * term/i386/pc/serial.c: Likewise.
1729 * term/i386/pc/vesafb.c: Likewise.
1730 * term/i386/pc/vga.c: Likewise.
1731 * term/i386/pc/vga_text.c: Likewise.
1732 * term/ieee1275/ofconsole.c: Likewise.
1733 * term/usb_keyboard.c: Likewise.
1734
33c846be 17352009-04-14 Bean <bean123ch@gmail.com>
1736
1737 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1738 properly with null character.
1739
4484e01e 17402009-04-14 Felix Zielcke <fzielcke@z-51.de>
1741
1742 * configure: Remove.
1743 * config.h.in: Likewise.
f93d668e 1744 * stamp-h.in: Likewise.
4484e01e 1745 * DISTLIST: Likewise.
1746 * conf/common.mk: Likewise.
1747 * conf/i386-coreboot.mk: Likewise.
1748 * conf/i386-efi.mk: Likewise.
1749 * conf/i386-ieee1275.mk: Likewise.
1750 * conf/i386.mk: Likewise.
1751 * conf/i386-pc.mk: Likewise.
1752 * conf/powerpc-ieee1275.mk: Likewise.
1753 * conf/sparc64-ieee1275.mk: Likewise.
1754 * conf/x86_64-efi.mk: Likewise.
1755
1756 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1757 develop on GRUB.
1758
7dd4a573 17592009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1760 David S. Miller <davem@davemloft.net>
1761
1762 * util/hostdisk.c (make_device_name): Fix buffer length
1763 calculations.
1764
e25b5a8c 17652009-04-14 Felix Zielcke <fzielcke@z-51.de>
1766
1767 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1768 <sys/param.h> and <sys/sysctl.h>.
1769 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1770 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1771 opening the device and reset them afterwards.
1772
1f1f580c 17732009-04-13 Pavel Roskin <proski@gnu.org>
1774
1775 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1776 Reported by John Stanley <jpsinthemix@verizon.net>
1777
7ebc2d6b 17782009-04-13 Robert Millan <rmh@aybabtu.com>
1779
1780 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1781 that name for menuentries when appropriate.
7ebc2d6b 1782
d8ba3667 17832009-04-13 Felix Zielcke <fzielcke@z-51.de>
1784
1785 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1786
cba416eb 17872009-04-13 Robert Millan <rmh@aybabtu.com>
1788
1789 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1790 to Linux, simply abort telling the user it's no longer supported.
1791
a547a745 17922009-04-13 Felix Zielcke <fzielcke@z-51.de>
1793
1794 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1795 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1796 `freebsd_loadenv' only when devices.hints exist.
1797
232a769c 17982009-04-13 Pavel Roskin <proski@gnu.org>
1799
1800 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1801
c3012039 18022009-04-13 Felix Zielcke <fzielcke@z-51.de>
1803
1804 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1805 partition number.
1806 (grub_drive): Likewise.
1807
234022fe 18082009-04-13 David S. Miller <davem@davemloft.net>
1809
1810 * kern/sparc64/ieee1275/ieee1275.c: New file.
1811 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1812 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1813 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1814 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1815 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1816 grub_ieee1275_alloc_physmem): Declare new exported functions.
1817
d8e1836c 1818 * include/grub/sparc64/ieee1275/loader.h: New file.
1819 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1820 * include/grub/sparc64/kernel.h: Likewise.
1821 * loader/sparc64/ieee1275/linux.c: Likewise.
1822
96bd81ec 1823 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1824 (grub_fstest_SOURCES): Likewise.
1825
6a4737e5 1826 * util/hostdisk.c (make_device_name): Do not make any assumptions
1827 about the length of drive names.
1828
1d7a72fd 1829 * kern/dl.c (grub_dl_load_file): Close file immediately when
1830 we are done using it.
1831
56bc2471 18322009-04-12 David S. Miller <davem@davemloft.net>
1833
1834 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1835 values. Noticed by Pavel Roskin.
1836
df38d0bb 1837 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1838 target compiler.
7dd4a573 1839
e382e93a 1840 * genmk.rb: Add more flexible image type specification, also
1841 pass --strip-unneeded to objcopy.
1842 * conf/i386-pc.rmk: Use *_FORMAT.
1843 * conf/i386-pc.mk: Rebuilt.
1844
f5dbbca9 1845 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1846 (OFDISK_HASH_SZ): Define.
1847 (ofdisk_hash): New hash table.
1848 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1849 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1850 instead of device phandle which is not unique.
1851
91c88b12 1852 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1853 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1854 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1855 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1856 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1857 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1858 GRUB_KERNEL_MACHINE_DATA_END): Define.
1859 (grub_kernel_image_size, grub_total_module_size): Declare.
1860
5b5d4aa5 18612009-04-12 Pavel Roskin <proski@gnu.org>
1862
7dd4a573 1863 * configure.ac: Change the logic when we check for target tools.
1864 Do it when the target is specified and it's different from the
1865 specified value of the host.
5b5d4aa5 1866
c91e1793 18672009-04-11 Felix Zielcke <fzielcke@z-51.de>
1868
1869 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1870 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1871 GNU/kFreeBSD. Check if a device is a character device. Use
1872 DIOCGMEDIASIZE to get the size.
1873 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1874 support for GNU/kFreeBSD.
1875 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1876 is a character device instead of a block device. Add support for
1877 FreeBSD device names.
1878
1879 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1880 is a character device instead of a block device.
1881
1882 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1883 is a character device instead of a block device.
1884
b1ac8644 18852009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1886
1887 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1888 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1889 FreeBSD. Check if a device is a character device. Use
1890 DIOCGMEDIASIZE to get the size.
1891 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1892 support for FreeBSD.
1893 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1894 is a character device instead of a block device. Add support for
1895 FreeBSD device names.
1896
1897 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1898 a character device instead of a block device.
1899 (grub_util_check_char_device): New function.
1900
1901 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1902 a character device instead of a block device.
1903
1904 * include/grub/util/getroot.h (grub_util_check_char_device): New
1905 prototype.
1906
a3f7515a 19072009-04-11 David S. Miller <davem@davemloft.net>
1908
1909 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1910 static libgcc.
1911 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1912 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1913 function, if present.
1914 (__bswapdi2): Likewise.
1915
0d44993d 1916 * include/grub/sparc64/ieee1275/boot.h: New file.
1917 * boot/sparc64/ieee1275/boot.S: Likewise.
1918 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1919
ed3d2bc2 1920 * kern/misc.c (grub_ltoa): New function.
1921 (grub_vsprintf): Use it to format 'long' integers.
1922
d3bfb59c 19232009-04-10 David S. Miller <davem@davemloft.net>
1924
1925 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1926 slots are of type grub_ieee1275_cell_t.
1927 (grub_nand_read): Likewise.
1928 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1929 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1930 macros are used to compare values in arg/ret block of the call.
1931 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1932 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1933 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1934 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1935 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1936 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1937 grub_ieee1275_close, grub_ieee1275_set_property,
1938 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1939 grub_ieee1275_cell_t.
1940 * kern/ieee1275/openfw.c (grub_map): Likewise.
1941 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1942 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1943
450e2238 1944 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1945 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1946 (grub_devalias_iterate): Likewise.
1947
7dd4a573 19482009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 1949
1950 UFS improvements
1951
1952 * fs/ufs.c (INODE_NBLOCKS): new definition
1953 (struct grub_ufs_dirent): added fields for non-BSD dirents
1954 (grub_ufs_get_file_block): fixed double indirect handling
1955 (grub_ufs_lookup_symlink): use more robust way to determine whether
1956 symlink is inline
1957 (grub_ufs_find_file): support for non-BSD dirents
1958 (grub_ufs_dir): support for non-BSD dirents
1959
e7e6862a 19602009-04-10 Bean <bean123ch@gnail.com>
1961
1962 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1963 attribute, otherwise the size would be wrong for i386 platform.
1964
1965 * include/grub/pci.h (grub_pci_read_word): New inline function.
1966 (grub_pci_read_byte): Likewise.
1967 (grub_pci_write): Likewise.
1968 (grub_pci_write_word): Likewise.
1969 (grub_pci_write_byte): Likewise.
1970
1971 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1972
1973 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1974 (find_framebuf): Scan pci to locate the frame buffer address.
1975
1976 * commands/efi/fixvideo.c: New file.
1977
1978 * commands/efi/loadbios.c: Likewise.
1979
1980 * commands/memrw.c: Likewise.
1981
1982 * util/grub-dumpbios.in: Likewise.
1983
1984 * conf/common.rmk (grub-dumpbios): New utility.
1985 (pkglib_MODULES): New module memrw.mod.
1986 (memrw_mod_SOURCE): New macro.
1987 (memrw_mod_CFLAGS): Likewise.
1988 (memrw_mod_LDFLAGS): Likewise.
1989
7dd4a573 1990 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1991 fixvideo.mod.
1992 (loadbios_mod_SOURCE): New macro.
1993 (loadbios_mod_CFLAGS): Likewise.
1994 (loadbios_mod_LDFLAGS): Likewise.
1995 (fixvideo_mod_SOURCE): Likewise.
1996 (fixvideo_mod_CFLAGS): Likewise.
1997 (fixvideo_mod_LDFLAGS): Likewise.
1998
7dd4a573 1999 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2000 fixvideo.mod.
2001 (loadbios_mod_SOURCE): New macro.
2002 (loadbios_mod_CFLAGS): Likewise.
2003 (loadbios_mod_LDFLAGS): Likewise.
2004 (fixvideo_mod_SOURCE): Likewise.
2005 (fixvideo_mod_CFLAGS): Likewise.
2006 (fixvideo_mod_LDFLAGS): Likewise.
2007
af63ada2 20082009-04-08 Felix Zielcke <fzielcke@z-51.de>
2009
2010 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2011
c2cdde70 20122009-04-07 David S. Miller <davem@davemloft.net>
2013
2014 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2015 support for R_SPARC_OLO10 relocations. Fix compile warning for
2016 R_SPARC_WDISP30 case.
ea3f72cf 2017 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 2018
761319cf 20192009-04-06 Pavel Roskin <proski@gnu.org>
2020
1007d1f5 2021 * include/grub/misc.h (ARRAY_SIZE): New macro.
2022 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2023 New macro.
2024 * loader/i386/linux.c (allocate_pages): Use free_pages().
2025 (grub_linux_unload): Don't use free_pages().
2026 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2027 wrong index. Treat all other modes as text modes.
2028 (grub_cmd_linux): Initialize vid_mode unconditionally to
2029 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2030
761319cf 2031 * commands/help.c (print_command_help): Use cmd->prio, not
2032 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2033
ea761d40 20342009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 2035
ea761d40 2036 Parttool
2037
2038 * parttool/pcpart.c: new file
2039 * commands/parttool.c: likewise
2040 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2041 (parttool_mod_SOURCES): new variable
2042 (parttool_mod_CFLAGS): likewise
2043 (parttool_mod_LDFLAGS): likewise
2044 (pcpart_mod_SOURCES): likewise
2045 (pcpart_mod_CFLAGS): likewise
2046 (pcpart_mod_LDFLAGS): likewise
7dd4a573 2047 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 2048 and parttool/pcpart.c
2049 * conf/i386-efi.rmk: likewise
2050 * conf/i386-ieee1275.rmk: likewise
2051 * conf/i386-pc.rmk: likewise
2052 * conf/powerpc-ieee1275.rmk: likewise
2053 * conf/sparc64-ieee1275.rmk: likewise
2054 * conf/x86_64-ieee1275.rmk: likewise
2055
05aaebfb 20562009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2057
2058 Support for mtime and further expandability of dir command
2059
2060 * include/grub/lib/datetime.h: moved to ...
7dd4a573 2061 * include/grub/datetime.h: ... moved here and added
05aaebfb 2062 declaration of grub_unixtime2datetime. All users updated
7dd4a573 2063 * include/grub/fs.h: new syntax for dir and mtime functions in
2064 struct grub_fs
05aaebfb 2065 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2066 and GRUB_FSHELP_FLAGS_MASK
2067 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2068 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2069 (grub_ext2_mtime): new function
2070 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2071 (grub_hfsplus_mtime): new function
2072 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2073 (GRUB_UFS_ATTR_FILE): likewise
2074 (GRUB_UFS_ATTR_LNK): likewise
2075 (struct grub_ufs_sblock): new fields mtime
2076 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2077 all users updated
2078 (grub_ufs_dir): mtime support
2079 (grub_ufs_mtime): new function
2080 * fs/affs.c (grub_affs_dir): use new dir syntax
2081 * fs/afs.c (grub_afs_dir): likewise
2082 * fs/cpio.c (grub_cpio_dir): likewise
2083 * fs/fat.c (grub_fat_find_dir): likewise
2084 * fs/hfs.c (grub_hfs_dir): likewise
2085 * fs/iso9660.c (grub_iso9660_dir): likewise
2086 * fs/jfs.c (grub_jfs_dir): likewise
2087 * fs/minix.c (grub_minix_dir): likewise
2088 * fs/ntfs.c (grub_ntfs_dir): likewise
2089 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2090 * fs/sfs.c (grub_sfs_dir): likewise
2091 * fs/xfs.c (grub_xfs_dir): likewise
2092 * util/hostfs.c (grub_hostfs_dir): likewise
2093 * lib/datetime.c: moved to ...
2094 * normal/datetime.c: ... moved here
2095 (grub_unixtime2datetime): new function
2096 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2097 * normal/completion.c (iterate_dir): use new dir syntax
2098 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2099 last modification time of a volume
7dd4a573 2100 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2101 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2102 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2103 (normal_mod_SOURCES): likewise
2104 (datetime_mod_SOURCES): Removed lib/datetime.c
2105 * conf/i386-efi.rmk: likewise
7dd4a573 2106 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2107 * conf/i386-pc.rmk: likewise
2108 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2109 * conf/sparc64-ieee1275.rmk: likewise
2110 * conf/x86_64-efi.rmk: likewise
05aaebfb 2111
8a7e1a14 21122009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2113
2114 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2115
2116 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2117 on grub_fat_find_dir
2118 (grub_fat_find_dir): use grub_fat_iterate_dir
2119 (grub_fat_label): likewise
2120
04186a9c 21212009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2122
7dd4a573 2123 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2124 and command.h
2125 remove extraneous kernel_elf_HEADERS
2126
da4c0bb6 21272009-04-04 Bean <bean123ch@gnail.com>
2128
2129 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2130
2131 * util/misc.c: Likewise.
2132
54ad9555 21332009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2134
2135 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2136 instead of grub_printf.
2137
7a6bf9f2 21382009-04-03 Robert Millan <rmh@aybabtu.com>
2139
2140 * loader/i386/linux.c (grub_linux_setup_video): Fill
2141 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2142 values from `mode info' structure instead of hardcoded
2143 values.
2144
3fcc2083 21452009-04-01 Pavel Roskin <proski@gnu.org>
2146
2147 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2148 unused now.
2149 * genmk.rb: Likewise.
2150 * configure.ac: Likewise.
2151
5ec9740b 21522009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2153
2154 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2155 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2156
5270cec8 21572009-04-01 David S. Miller <davem@davemloft.net>
2158
2159 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2160 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2161 (grub_setjmp): Mark with 'returns_twice' attribute.
2162 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2163 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2164 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2165
9c3dd854 21662009-04-01 Robert Millan <rmh@aybabtu.com>
2167
2168 Reapply fix from 2008-07-28 which was accidentally reverted; also
2169 perform the same fix to a similar check in same function.
2170
2171 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2172 with the same number are found, just use issue a warning with
2173 grub_dprintf(), as this error has been reported to be non-fatal.
2174
0d818b7e 21752009-03-31 Pavel Roskin <proski@gnu.org>
2176
2177 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2178 for cross-compilation.
2179
95646d92 21802009-03-30 Robert Millan <rmh@aybabtu.com>
2181
2182 Fix i386-ieee1275 build.
2183
2184 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2185 Remove declaration.
2186
6a003ed1 21872009-03-30 Pavel Roskin <proski@gnu.org>
2188
2189 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2190 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2191 zero-terminated, rely only on the strlen value. Fix comparison
2192 of strings differing in length.
2193
92f33540 21942009-03-30 Robert Millan <rmh@aybabtu.com>
2195
2196 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2197 checking for abi version. Improve error messages on BIOS to notify
2198 user about `linux16' command.
2199
a8c48fd5 22002009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2201
f968172e 2202 Leak fixes
a8c48fd5 2203
f968172e 2204 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2205 in case of collision
2206 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 2207
9c323f09 22082009-03-29 Robert Millan <rmh@aybabtu.com>
2209
2210 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2211 set `vid_mode' accordingly.
2212 (grub_linux_boot): Process `vid_mode' and set video mode.
2213
ae68f423 22142009-03-29 Robert Millan <rmh@aybabtu.com>
2215
2216 * util/grub.d/10_linux.in (linux_entry): New function.
2217 Factorize generation of Linux boot entries.
2218
5709cfc4 22192009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2220
2221 Make the format of Environment Block plain text. The boot loader
2222 part is not tested well yet.
7dd4a573 2223
5709cfc4 2224 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2225 (buffer): Removed.
2226 (envblk): Likewise.
2227 (usage): Remove "info" and "clear". Add "unset". Update the
2228 description of "set", as this does not delete variables any
2229 longer.
2230 (create_envblk_file): Complete rewrite.
2231 (open_envblk_file): Likewise.
2232 (cmd_info): Removed.
2233 (cmd_list): Likewise.
2234 (cmd_set): Likewise.
2235 (cmd_clear): Likewise.
2236 (list_variables): New function.
2237 (write_envblk): Likewise.
2238 (set_variables): Likewise.
2239 (unset_variables): Likewise.
2240 (main): Complete rewrite.
2241
2242 * commands/loadenv.c (buffer): Removed.
2243 (envblk): Likewise.
2244 (open_envblk_file): New function.
2245 (read_envblk_file): Complete rewrite.
2246 (grub_cmd_load_env): Likewise.
2247 (grub_cmd_list_env): Likewise.
2248 (struct blocklist): New struct.
2249 (free_blocklists): New function.
2250 (check_blocklists): Likewise.
2251 (write_blocklists): Likewise.
2252 (grub_cmd_save_env): Complete rewrite.
2253
2254 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2255 a plain text signature.
2256 (GRUB_ENVBLK_MAXLEN): Removed.
2257 (struct grub_envblk): Complete rewrite.
2258 (grub_envblk_find): Removed.
2259 (grub_envblk_insert): Likewise.
2260 (grub_envblk_open): New prototype.
2261 (grub_envblk_set): Likewise.
2262 (grub_envblk_delete): Put const to VALUE.
2263 (grub_envblk_iterate): Put const to NAME and VALUE.
2264 (grub_envblk_close): New prototype.
2265 (grub_envblk_buffer): New inline function.
2266 (grub_envblk_size): Likewise.
2267
2268 * lib/envblk.c: Include grub/mm.h.
2269 (grub_env_find): Removed.
2270 (grub_envblk_open): New function.
2271 (grub_envblk_close): Likewise.
2272 (escaped_value_len): Likewise.
2273 (find_next_line): Likewise.
2274 (grub_envblk_insert): Removed.
2275 (grub_envblk_set): New function.
2276 (grub_envblk_delete): Complete rewrite.
2277 (grub_envblk_iterate): Likewise.
2278
a9368fd3 22792009-03-28 Robert Millan <rmh@aybabtu.com>
2280
2281 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2282 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2283 variables. Use 16-bit loader.
2284 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2285 loader.
2286 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2287 (grub_linux16_boot): ... this. Update all users.
2288 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2289 (grub_linux_boot): ... this. Update all users.
2290
2291 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2292 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2293 commands to `linux16' and `initrd16'.
2294 (GRUB_MOD_FINI(linux)): Rename to ...
2295 (GRUB_MOD_FINI(linux16)): ... this.
2296
e4dd5a7e 22972009-03-24 Pavel Roskin <proski@gnu.org>
2298
2299 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2300 not just for compilation.
2301
c04d6e05 23022009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2303
2304 Move multiboot helper out of kernel
2305
2306 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2307 `loader/i386/multiboot_helper.S'.
2308 * conf/i386-coreboot.rmk: Likewise
2309 * conf/i386-ieee1275.rmk: Likewise
2310
2311 * kern/i386/loader.S: Move multiboot helpers from here...
2312 * loader/i386/multiboot_helper.S: ...moved here
2313 * include/grub/i386/loader.h: Move declarations of multiboot
2314 helpers from here...
2315 * include/grub/i386/multiboot.h: ...moved here
2316 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2317
42a5b3fc 23182009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2319
2320 * kern/env.c (grub_env_context_open): Added an argument to specify
2321 whether a new context inherits exported variables from current
2322 one. This is useful when making a sandbox to interpret a config
2323 file.
2324 All callers updated.
2325
2326 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2327
b28bbc4e 23282009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2329
2330 * kern/env.c (grub_env_context_close): Fix memory leaks.
2331
f04f02e4 23322009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2333
2334 * normal/main.c (grub_normal_execute): Added an argument
2335 BATCH to specify if an interactive interface should be provided
2336 after reading a config file.
2337 All callers updated.
2338 (read_command_list): Prevent being executed twice.
2339 (read_fs_list): Likewise.
2340
42a5b3fc 2341 * include/grub/normal.h (grub_normal_execute): Updated the
2342 prototype.
f04f02e4 2343
41473ac2 23442009-03-22 Pavel Roskin <proski@gno.org>
2345
fbc00b0c 2346 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2347 _start.
2348 * kern/i386/pc/startup.S: Likewise.
2349 * kern/i386/efi/startup.S: Likewise.
2350 * kern/i386/ieee1275/startup.S: Likewise.
2351 * kern/i386/coreboot/startup.S: Likewise.
2352 * kern/x86_64/efi/startup.S: Likewise.
2353
41473ac2 2354 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2355 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2356 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2357
2274cc8f 23582009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2359
2360 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2361
2362 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2363 limit detection.
2364 Use vaddr of correct segment for entry_point.
2365
b1b797cb 23662009-03-21 Bean <bean123ch@gmail.com>
2367
2368 * commands/blocklist.c: Add include file <grub/command.h>, remove
2369 <grub/normal.h> and <grub/arg.h>.
2370 (grub_cmd_blocklist): Use the new command interface.
2371 (GRUB_MOD_INIT): Likewise.
2372 (GRUB_MOD_FINI): Likewise.
2373 * commands/boot.c: Likewise.
2374 * commands/cat.c: Likewise.
2375 * commands/cmp.c: Likewise.
2376 * commands/configfile.c: Likewise.
2377 * commands/crc.c: Likewise.
2378 * commands/echo.c: Likewise.
2379 * commands/halt.c: Likewise.
2380 * commands/handler.c: Likewise.
2381 * commands/hdparm.c: Likewise.
2382 * commands/help.c: Likewise.
2383 * commands/hexdump.c: Likewise.
2384 * commands/loadenv.c: Likewise.
2385 * commands/ls.c: Likewise.
2386 * commands/lsmmap.c: Likewise.
2387 * commands/lspci.c: Likewise.
2388 * commands/loadenv.c: Likewise.
2389 * commands/read.c: Likewise.
2390 * commands/reboot.c: Likewise.
2391 * commands/search.c: Likewise.
2392 * commands/sleep.c: Likewise.
2393 * commands/test.c: Likewise.
2394 * commands/usbtest.c: Likewise.
2395 * commands/videotest.c: Likewise.
2396 * commands/i386/cpuid.c: Likewise.
2397 * commands/i386/pc/halt.c: Likewise.
2398 * commands/i386/pc/play.c: Likewise.
2399 * commands/i386/pc/pxecmd.c: Likewise.
2400 * commands/i386/pc/vbeinfo.c: Likewise.
2401 * commands/i386/pc/vbetest.c: Likewise.
2402 * commands/ieee1275/suspend.c: Likewise.
2403 * disk/loopback.c: Likewise.
2404 * font/font_cmd.c: Likewise.
2405 * hello/hello.c: Likewise.
2406 * loader/efi/appleloader.c: Likewise.
2407 * loader/efi/chainloader.c: Likewise.
2408 * loader/i386/bsd.c: Likewise.
2409 * loader/i386/efi/linux.c: Likewise.
2410 * loader/i386/ieee1275/linux.c: Likewise.
2411 * loader/i386/linux.c: Likewise.
2412 * loader/i386/pc/chainloader.c: Likewise.
2413 * loader/i386/pc/linux.c: Likewise.
2414 * loader/powerpc/ieee1275/linux.c: Likewise.
2415 * loader/multiboot_loader.c: Likewise.
2416 * term/gfxterm.c: Likewise.
2417 * term/i386/pc/serial.c: Likewise.
2418 * term/terminfo.c: Likewise.
2419
2420 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2421 * term/i386/pc/vga.c: Likewise.
2422 * video/readers/jpeg.c: Likewise.
2423 * video/readers/png.c: Likewise.
2424 * video/readers/tga.c: Likewise.
2425
2426 * util/grub-fstest (cmd_loopback): Removed.
2427 (cmd_blocklist): Likewise.
2428 (cmd_ls): Likewise.
2429 (grub_register_command): Likewise.
2430 (grub_unregister_command): Likewise.
2431 (execute_command): Use grub_command_find to locate command and execute
2432 it.
2433
2434 * include/grub/efi/chainloader.h: Removed.
2435 * loader/efi/chainloader_normal.c: Likewise.
2436 * loader/i386/bsd_normal.c: Likewise.
2437 * loader/i386/pc/chainloader_normal.c: Likewise.
2438 * loader/i386/pc/multiboot_normal.c: Likewise.
2439 * loader/linux_normal.c: Likewise.
2440 * loader/multiboot_loader_normal.c: Likewise.
2441 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2442
2443 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2444 and grub_register_command_p1.
2445
2446 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2447 kern/command.c, lib/arg.c and commands/extcmd.c.
2448 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2449 (minicmd_mod_SOURCES): New variable.
2450 (minicmd_mod_CFLAGS): Likewise.
2451 (minicmd_mod_LDFLAGS): Likewise.
2452 (extcmd_mod_SOURCES): Likewise.
2453 (extcmd_mod_CFLAGS): Likewise.
2454 (extcmd_mod_LDFLAGS): Likewise.
2455 (boot_mod_SOURCES): Removed.
2456 (boot_mod_CFLAGS): Likewise.
2457 (boot_mod_LDFLAGS): Likewise.
2458
2459 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2460 kern/corecmd.c.
2461 (kernel_img_HEADERS): Add command.h.
2462 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2463 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2464 and lib/arg.c.
2465 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2466 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2467 remove the corresponding normal mode command.
2468 (normal_mod_SOURCES): Remove normal/arg.c.
2469 * conf/i386-coreboot.rmk: Likewise.
2470 * conf/i386-efi.rmk: Likewise.
2471 * conf/i386-ieee1275.rmk: Likewise.
2472 * conf/powerpc-ieee1275.rmk: Likewise.
2473 * conf/x86_64-efi.rmk: Likewise.
2474
2475 * include/grub/arg.h: Move from here ...
2476 * include/grub/lib/arg.h: ... to here.
2477
2478 * normal/arg.c: Move from here ...
2479 * lib/arg.c: ... to here.
2480
2481 * commands/extcmd.c: New file.
2482 * commands/minicmd.c: Likewise.
2483 * include/grub/command.h: Likewise.
2484 * include/grub/extcmd.h: Likewise.
2485 * kern/command.c: Likewise.
2486 * kern/corecmd.c: Likewise.
2487
2488 * kern/list.c (grub_list_iterate): Return int instead of void.
2489 (grub_list_insert): New function.
2490 (grub_prio_list_insert): Likewise.
2491
2492 * kern/rescue.c (grub_rescue_command): Removed.
2493 (grub_rescue_command_list): Likewise.
2494 (grub_rescue_register_command): Likewise.
2495 (grub_rescue_unregister_command): Likewise.
2496 (grub_rescue_cmd_boot): Move to minicmd.c
2497 (grub_rescue_cmd_help): Likewise.
2498 (grub_rescue_cmd_info): Likewise.
2499 (grub_rescue_cmd_boot): Likewise.
2500 (grub_rescue_cmd_testload): Likewise.
2501 (grub_rescue_cmd_dump): Likewise.
2502 (grub_rescue_cmd_rmmod): Likewise.
2503 (grub_rescue_cmd_lsmod): Likewise.
2504 (grub_rescue_cmd_exit): Likewise.
2505 (grub_rescue_print_devices): Moved to corecmd.c.
2506 (grub_rescue_print_files): Likewise.
2507 (grub_rescue_cmd_ls): Likewise.
2508 (grub_rescue_cmd_insmod): Likewise.
2509 (grub_rescue_cmd_set): Likewise.
2510 (grub_rescue_cmd_unset): Likewise.
7d074e3c 2511 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 2512 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 2513 commands, remove grub_rescue_register_command calls.
b1b797cb 2514
7d074e3c 2515 * normal/command.c (grub_register_command): Removed.
b1b797cb 2516 (grub_unregister_command): Likewise.
2517 (grub_command_find): Likewise.
2518 (grub_iterate_commands): Likewise.
2519 (rescue_command): Likewise.
2520 (export_command): Moved to corecmd.c.
2521 (set_command): Removed.
2522 (unset_command): Likewise.
2523 (insmod_command): Likewise.
2524 (rmmod_command): Likewise.
2525 (lsmod_command): Likewise.
2526 (grub_command_init): Likewise.
2527
2528 * normal/completion.c (iterate_command): Use cmd->prio to check for
2529 active command.
2530 (complete_arguments): Use grub_extcmd_t structure to find options.
2531 (grub_normal_do_completion): Change function grub_iterate_commands to
2532 grub_command_iterate.
2533
2534 * normal/execute.c (grub_script_execute_cmd): No need to parse
2535 argument here.
2536
2537 * normal/main.c (grub_dyncmd_dispatcher): New function.
2538 (read_command_list): Register unload commands as dyncmd.
2539 (grub_cmd_normal): Use new command interface, register rescue,
2540 unregister normal at entry, register normal, unregister rescue at exit.
2541
2542 * include/grub/list.h (grub_list_test_t): New type.
2543 (grub_list_iterate): Return int instead of void.
2544 (grub_list_insert): New function.
2545 (GRUB_AS_NAMED_LIST_P): New macro.
2546 (GRUB_AS_PRIO_LIST): Likewise.
2547 (GRUB_AS_PRIO_LIST_P): Likewise.
2548 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2549 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2550 (grub_prio_list): New structure.
2551 (grub_prio_list_insert): New function.
2552 (grub_prio_list_remove): New inline function.
2553
2554 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2555 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2556 (GRUB_COMMAND_FLAG_MENU): Likewise.
2557 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2558 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2559 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2560 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2561 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2562 (grub_command): Likewise.
2563 (grub_register_command): Likewise.
2564 (grub_command_find): Likewise.
2565 (grub_iterate_commands): Likewise.
2566 (grub_command_init): Likewise.
2567 (grub_arg_parse): Likewise.
2568 (grub_arg_show_help): Likewise.
2569
2570 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2571 (grub_rescue_unregister_command): Likewise.
2572
2573 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2574 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2575 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2576
2577 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2578 grub_rescue_cmd_initrd.
2579 * include/grub/i386/loader.h: Likewise.
2580 * include/grub/x86_64/loader.h: Likewise.
2581
2582 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2583
1f4147aa 25842009-03-21 Bean <bean123ch@gmail.com>
2585
2586 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2587 instead of stat in mingw environment.
2588
2589 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2590
2591 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2592
2593 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2594 AC_CONFIG_LINKS.
2595
2156d5ba 25962009-03-21 Bean <bean123ch@gmail.com>
2597
2598 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2599 out of range error.
2600
177b82ca 26012009-03-18 Michel Dänzer <michel@daenzer.net>
2602
2603 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2604 checking inode flags for EXT4_EXTENTS_FLAG.
2605
14aad807 26062009-03-18 Robert Millan <rmh@aybabtu.com>
2607
2608 * loader/i386/linux.c: Include `<grub/video.h>' and
2609 `<grub/i386/pc/vbe.h>'..
2610 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2611 (grub_linux32_boot): Attempt to configure video settings with
2612 grub_linux_setup_video().
2613 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2614 to avoid grub_console_fini() which would step out of graphical mode
2615 unconditionally.
2616
8cf83a27 26172009-03-14 Robert Millan <rmh@aybabtu.com>
2618
2619 Fix build on powerpc.
2620 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2621
40164e75 26222009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2623
2624 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2625 background image command.
2626
c58bc32a 26272009-03-12 Colin D Bennett <colin@gibibit.com>
2628
2629 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2630 (grub_gfxterm_putchar): Extract pairs of identical calls to
2631 draw_cursor out of conditional blocks.
2632
5415144a 26332009-03-11 Pavel Roskin <proski@gnu.org>
2634
2635 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2636 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2637
6394042e 26382009-03-11 Robert Millan <rmh@aybabtu.com>
2639
2640 * loader/i386/multiboot_elfxx.c
2641 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2642
b7b50e5f 26432009-03-11 Felix Zielcke <fzielcke@z-51.de>
2644
2645 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2646 `kern/handler.c'.
2647
1ca7fc96 26482009-03-11 Robert Millan <rmh@aybabtu.com>
2649
2650 * loader/i386/multiboot.c (code_size): New variable.
2651 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 2652 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 2653 4-byte alignment to MBI and others by increasing
7d074e3c 2654 `boot_loader_name_length' appropriately.
1ca7fc96 2655
2656 * loader/i386/multiboot_elfxx.c
2657 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2658
a83ea1d2 26592009-03-09 Felix Zielcke <fzielcke@z-51.de>
2660
2661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2662 `fs/ext2.c'.
2663
aa9f3bff 26642009-03-08 Robert Millan <rmh@aybabtu.com>
2665
2666 Make loader/i386/linux.c usable on i386-pc again.
2667
2668 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2669 memory to heap.
2670 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2671 `#error' stanza.
2672
d8b3b60e 26732009-03-07 Bean <bean123ch@gmail.com>
2674
2675 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2676 allocation.
2677
b362c9e9 26782009-03-06 Robert Millan <rmh@aybabtu.com>
2679
2680 Fix display issue on terminals with screen size other than 80x25
2681 (e.g. gfxterm with resolution higher than 640x480).
2682
2683 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 2684 position relative to the center of the terminal instead of relying
b362c9e9 2685 on a hardcoded offset.
2686
9304eef1 26872009-03-04 Robert Millan <rmh@aybabtu.com>
2688
2689 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2690 installed.
2691
2692 * Makefile.in (host_kernel): New variable.
2693 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2694 scripts instead of just the windows one.
2695 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2696
eabc95fb 26972009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 2698
2699 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2700 `kern/handler.c'.
2701 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2702 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2703 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2705 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2706 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2707
ceb1223c 27082009-03-04 Felix Zielcke <fzielcke@z-51.de>
2709
2710 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2711 or if there's no space for the disk label and print the partition number on a
2712 invalid magic.
2713
4910684a 27142009-03-04 Felix Zielcke <fzielcke@z-51.de>
2715
2716 * util/misc.c: Include <time.h>.
2717 (grub_millisleep): New function.
2718
7e9ca17a 27192009-03-04 Bean <bean123ch@gmail.com>
2720
2721 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2722 another option -mno-red-zone.
2723
2724 * commands/handler.c: Change module description.
2725
2726 * kern/handler.c: Add missing space at the end of description line.
2727
2728 * kern/list.c: Likewise.
2729
f501677c 27302009-03-03 Robert Millan <rmh@aybabtu.com>
2731
2732 Move more components to the relocation area, and fix mbi pointer
2733 handling to use the destination rather than the origin (thanks to
2734 Vladimir Serbinenko for spotting).
2735
2736 * loader/i386/multiboot.c (mbi_dest): New variable.
2737 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2738 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2739 relocation area.
2740
9902d047 27412009-03-01 Bean <bean123ch@gmail.com>
2742
50fb7002 2743 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 2744 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2745 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2746 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2747
2748 * loader/i386/efi/linux.c (acpi_guid): New variable.
2749 (acpi_guid): Likewise.
2750 (EBDA_SEG_ADDR): New constant.
2751 (LOW_MEM_ADDR): Likewise.
2752 (FAKE_EBDA_SEG): Likewise.
2753 (fake_bios_data): New function.
2754 (grub_linux_boot): Call fake_bios_data.
2755
71b9f361 27562009-03-01 Bean <bean123ch@gmail.com>
2757
2758 * commands/terminal.c: Removed.
2759
2760 * commands/handler.c: New file.
2761
2762 * include/grub/list.h: Likewise.
2763
2764 * include/grub/handler.h: Likewise.
2765
2766 * kern/list.c: Likewise.
2767
2768 * kern/handler.c: Likewise.
2769
2770 * kern/term.h: Include header file <grub/handler.h>.
2771 (grub_term_input): Move next field to the beginning.
2772 (grub_term_output): Likewise.
2773 (grub_term_input_class): New variable.
2774 (grub_term_output_class): Likewise.
2775 (grub_term_register_input): Changed to inline function.
2776 (grub_term_register_output): Likewise.
2777 (grub_term_unregister_input): Likewise.
2778 (grub_term_unregister_output): Likewise.
2779 (grub_term_set_current_input): Likewise.
2780 (grub_term_set_current_output): Likewise.
2781 (grub_term_get_current_input): Likewise.
2782 (grub_term_get_current_output): Likewise.
2783 (grub_term_iterate_input): Removed.
2784 (grub_term_iterate_output): Likewise.
2785
2786 * kern/term.c (grub_term_list_input): Removed.
2787 (grub_term_list_output): Likewise.
2788 (grub_term_input_class): New variable.
2789 (grub_term_output_class): Likewise.
50fb7002 2790 (grub_cur_term_input): Change variable as macro.
71b9f361 2791 (grub_cur_term_output): Likewise.
2792 (grub_term_register_input): Removed.
2793 (grub_term_register_output): Likewise.
2794 (grub_term_unregister_input): Likewise.
2795 (grub_term_unregister_output): Likewise.
2796 (grub_term_set_current_input): Likewise.
2797 (grub_term_set_current_output): Likewise.
2798 (grub_term_iterate_input): Likewise.
2799 (grub_term_iterate_output): Likewise.
2800 (grub_term_get_current_input): Likewise.
2801 (grub_term_get_current_output): Likewise.
2802
2803 * util/grub-editenv.c: Include header file <grub/handler.h>.
2804 (grub_term_get_current_input): Removed.
2805 (grub_term_get_current_output): Likewise.
2806 (grub_term_input_class): New variable.
50fb7002 2807 (grub_term_output_class): Likewise.
71b9f361 2808
2809 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2810 (grub_term_get_current_output): Likewise.
2811 (grub_term_input_class): New variable.
50fb7002 2812 (grub_term_output_class): Likewise.
71b9f361 2813
2814 * util/grub-probe.c (grub_term_get_current_input): Removed.
2815 (grub_term_get_current_output): Likewise.
2816 (grub_term_input_class): New variable.
50fb7002 2817 (grub_term_output_class): Likewise.
71b9f361 2818
2819 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2820 (grub_term_get_current_output): Likewise.
2821 (grub_term_input_class): New variable.
50fb7002 2822 (grub_term_output_class): Likewise.
71b9f361 2823
2824 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2825 (terminal_mod_SOURCES): Likewise.
2826 (terminal_mod_CFLAGS): Likewise.
2827 (terminal_mod_LDFLAGS): Likewise.
2828
2829 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2830 handler.c.
2831 (kernel_img_SOURCES): Add list.c and handler.c.
2832 (kernel_img_HEADERS): Add list.h and handler.h.
2833
2834 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2835 handler.c.
2836 (kernel_mod_SOURCES): Add list.c and handler.c.
2837 (kernel_mod_HEADERS): Add list.h and handler.h.
2838
2839 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2840 handler.c.
2841 (kernel_elf_SOURCES): Add list.c and handler.c.
2842 (kernel_elf_HEADERS): Add list.h and handler.h.
2843
2844 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2845 handler.c.
2846 (kernel_elf_SOURCES): Add list.c and handler.c.
2847 (kernel_elf_HEADERS): Add list.h and handler.h.
2848
2849 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2850 handler.c.
2851 (kernel_mod_SOURCES): Add list.c and handler.c.
2852 (kernel_mod_HEADERS): Add list.h and handler.h.
2853
2854 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2855 handler.c.
2856 (kernel_elf_SOURCES): Add list.c and handler.c.
2857 (kernel_elf_HEADERS): Add list.h and handler.h.
2858
8a31787f 28592009-02-27 Robert Millan <rmh@aybabtu.com>
2860
2861 Factorize elf32 / elf64 code in Multiboot loader. This will
2862 prevent it from getting out of sync again.
2863
2864 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2865 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2866 grub_multiboot_load_elf64): Move from here ...
2867 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2868 grub_multiboot_load_elf): ... to here (new file).
2869
51cd3dfc 28702009-02-27 Robert Millan <rmh@aybabtu.com>
2871
2872 * util/grub.d/10_linux.in: Rename "single-user mode" to
2873 "recovery mode".
2874
6e8c9c3a 28752009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2876
2877 Don't leak in SCSI code.
2878 * disk/scsi.c (grub_scsi_close): free `scsi'.
2879
4b6bf4f9 28802009-02-27 Robert Millan <rmh@aybabtu.com>
2881
2882 * loader/i386/pc/multiboot.c: Move from here ...
2883 * loader/i386/multiboot.c: ... to here. Update all users.
2884
b9413424 28852009-02-27 Robert Millan <rmh@aybabtu.com>
2886
2887 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2888 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2889
50fb7002 28902009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 2891
2892 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2893 b-tree.
2894
8cc50345 28952009-02-27 Robert Millan <rmh@aybabtu.com>
2896
2897 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2898 `0x' qualifier as 0 when base is specified as parameter).
2899
6e09b8b7 29002009-02-24 Bean <bean123ch@gmail.com>
2901
2902 * configure.ac: Check for -mcmodel=large in x86_64 target.
2903
2904 * include/grub/efi/api.h (efi_call_10): New macro.
2905 (efi_wrap_10): New function.
2906
2907 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2908 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2909 (GRUB_PE32_REL_BASED_LOW): Likewise.
2910 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2911 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2912 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2913 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2914 (GRUB_PE32_REL_BASED_REL): Likewise.
2915 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2916 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2917 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2918
2919 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2920 issue.
2921
2922 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2923 (efi_wrap_10): New function.
2924
2925 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2926
2927 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2928 MB/MBP model (NV chipset).
2929 (devdata_devs): Add devpath_5 to the list.
2930
2931 * load/i386/efi/linux.c (video_base): Remove variable.
2932 (RGB_MASK): New macro.
2933 (RGB_MAGIC): Likewise.
2934 (LINE_MIN): Likewise.
2935 (LINE_MAX): Likewise.
2936 (FBTEST_STEP): Likewise.
2937 (FBTEST_COUNT): Likewise.
2938 (fb_list): New variable.
2939 (grub_find_video_card): Remove function.
2940 (find_framebuf): New function.
2941 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2942 line length.
2943
2944 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2945 problem for x86_64.
2946
74b21bee 29472009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2948
2949 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2950
2951 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2952 coding tool name.
2953
a455f472 29542009-02-22 Robert Millan <rmh@aybabtu.com>
2955
2956 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2957 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2958 in our relocation, instead of using it directly from heap. Also
2959 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2960
6374daf3 29612009-02-21 Robert Millan <rmh@aybabtu.com>
2962
2963 Implement USB keyboard support (based on patch by Marco Gerards)
2964
2965 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2966 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2967 (usb_keyboard_mod_LDFLAGS): New variables.
2968
2969 * term/usb_keyboard.c: New file.
2970
8fa4ea70 29712009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2972
2973 Corrected wrong declaration
2974
2975 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2976
353976ac 29772009-02-14 Christian Franke <franke@computer.org>
2978
2979 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2980 (grub_lspci_iter): Print class code and programming interface byte.
2981
6aa1169b 29822009-02-14 Christian Franke <franke@computer.org>
2983
2984 * gendistlist.sh: Ignore `.svn' directories.
2985
265372ca 29862009-02-14 Felix Zielcke <fzielcke@z-51.de>
2987
2988 * fs/fat.c: Add 2009 to Copyright line.
2989
9ff516f3 29902009-02-14 Christian Franke <franke@computer.org>
2991
2992 * commands/hdparm.c: New file. Provides `hdparm' command
2993 which sends ATA commands via grub_disk_ata_pass_through ().
2994
2995 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2996
2997 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2998 and <grub/cpu/io.h> to include/grub/ata.h.
2999 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3000 (GRUB_CDROM_SECTOR_SIZE): Remove.
3001 (GRUB_ATA_*): Move to include/grub/ata.h.
3002 (GRUB_ATAPI_*): Likewise.
3003 (enum grub_ata_commands): Likewise.
3004 (enum grub_ata_timeout_milliseconds): Likewise.
3005 (struct grub_ata_device): Likewise.
3006 (grub_ata_regset): Likewise.
3007 (grub_ata_regget): Likewise.
3008 (grub_ata_regset2): Likewise.
3009 (grub_ata_regget2): Likewise.
3010 (grub_ata_check_ready): Likewise.
3011 (grub_ata_wait_not_busy): Remove static, exported in
3012 include/grub/ata.h.
3013 (grub_ata_wait_drq): Likewise.
3014 (grub_ata_pio_read): Likewise.
3015
3016 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3017 function for hdparm.mod.
3018
3019 * include/grub/ata.h: New file, contains declarations from
3020 disk/ata.c.
3021 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3022
3023 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3024 (grub_disk_ata_pass_through): New exported variable.
3025
3026 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3027
772e23da 30282009-02-13 Colin D Bennett <colin@gibibit.com>
3029
3030 Support multiple fallback entries, and provide an API to support
3031 executing default+fallback menu entries. Renamed the `terminal' menu
3032 viewer to `text'.
3033
3034 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3035 variable declaration.
3036 (grub_menu_execute_callback): New structure declaration.
3037 (grub_menu_execute_callback_t): New typedef.
3038 (grub_menu_execute_with_fallback): New function declaration.
3039 (grub_menu_get_entry): Likewise.
3040 (grub_menu_get_timeout): Likewise.
3041 (grub_menu_set_timeout): Likewise.
3042
3043 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3044
3045 * normal/menu.c (grub_wait_after_message): Moved to
3046 `normal/menu_text.c'.
3047 (draw_border): Likewise.
3048 (print_message): Likewise.
3049 (print_entry): Likewise.
3050 (print_entries): Likewise.
3051 (grub_menu_init_page): Likewise.
3052 (get_entry_number): Likewise.
3053 (print_timeout): Likewise.
3054 (run_menu): Likewise.
3055 (grub_menu_execute_entry): Likewise.
3056 (show_text_menu): Likewise.
3057 (get_and_remove_first_entry_number): New function.
3058 (grub_menu_execute_with_fallback): Likewise.
3059 (get_entry): Renamed to ...
3060 (grub_menu_get_entry): .. this and made it global.
3061 (get_timeout): Renamed to ...
3062 (grub_menu_get_timeout): ... this and made it global.
3063 (set_timeout): Renamed to ...
3064 (grub_menu_set_timeout): ... this and made it global.
3065 (grub_normal_terminal_menu_viewer): Renamed to ...
3066 (grub_normal_text_menu_viewer): ... this.
3067
3068 * normal/menu_text.c: New file. Extracted text-menu-specific code
3069 from normal/menu.c.
3070
3071 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3072 (normal_mod_SOURCES): Likewise.
3073
3074 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3075 (normal_mod_SOURCES): Likewise.
3076
3077 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3078 (normal_mod_SOURCES): Likewise.
3079
3080 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3081 (normal_mod_SOURCES): Likewise.
3082
3083 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3084 (normal_mod_SOURCES): Likewise.
3085
3086 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3087 (normal_mod_SOURCES): Likewise.
3088
3089 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3090 (normal_mod_SOURCES): Likewise.
3091
16ac430e 30922009-02-11 Robert Millan <rmh@aybabtu.com>
3093
3094 * util/grub.d/00_header.in: Update old reference to `font' command.
3095
06ff20fc 30962009-02-10 Felix Zielcke <fzielcke@z-51.de>
3097
3098 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3099
3100 Based on patch from Javier Martín.
3101
96da9407 31022009-02-09 Felix Zielcke <fzielcke@z-51.de>
3103
3104 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3105 to avoid false positives with FAT.
96da9407 3106 (grub_fstest_SOURCES): Likewise.
3107 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3108 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3110 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3111 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3112 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3113
6dca6fe4 31142009-02-09 Felix Zielcke <fzielcke@z-51.de>
3115
06ff20fc 3116 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3117 bpb.version_specific.fat12_or_fat16.fstype and
3118 bpb.version_specific.fat32.fstype.
3119
2550c62f 31202009-02-08 Robert Millan <rmh@aybabtu.com>
3121
be110b30 3122 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3123
56978920 31242009-02-08 Robert Millan <rmh@aybabtu.com>
3125
3126 * Makefile.in (host_os, host_cpu): New variables.
3127 (target_os): Remove. Update all users.
3128
d64399b5 31292009-02-08 Marco Gerards <marco@gnu.org>
3130
3131 * Makefile.in (enable_grub_emu_usb): New variable.
3132 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3133 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3134 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3135 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3136 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3137 `usbtest.mod' and `usbms.mod'.
3138 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3139 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3140 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3141 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3142 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3143 variables.
3144
3145 * disk/usbms.c: New file.
3146
3147 * include/grub/usb.h: Likewise.
3148
3149 * include/grub/usbtrans.h: Likewise.
3150
3151 * include/grub/usbdesc.h: Likewise.
3152
3153 * bus/usb/usbtrans.c: Likewise.
3154
3155 * bus/usb/ohci.c: Likewise.
3156
3157 * bus/usb/uhci.c: Likewise.
3158
3159 * bus/usb/usbhub.c: Likewise.
3160
3161 * bus/usb/usb.c: Likewise.
3162
3163 * commands/usbtest.c: Likewise.
3164
3165 * util/usb.c: Likewise.
50fb7002 3166
d64399b5 3167 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3168
3169 * configure.ac: Test for libusb presence.
50fb7002 3170
d64399b5 3171 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3172
2b40d6bb 31732009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3174
3175 * kern/mm.c: Add more comments.
3176
73a4ce81 31772009-02-08 Robert Millan <rmh@aybabtu.com>
3178
3179 Patch from Javier Martín.
3180 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3181 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3182
f821ce59 31832009-02-08 Robert Millan <rmh@aybabtu.com>
3184
3185 * fs/cpio.c: Split tar functionality to ...
3186 * fs/tar.c: ... here (new file). Update all users.
3187
aebfc4b0 31882009-02-07 Robert Millan <rmh@aybabtu.com>
3189
3190 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3191 backward-incompatible features.
3192
3193 Based on patch from Javier Martín, with some adjustments.
3194
50fb7002 31952009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 3196
3197 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3198
0bb5115e 31992009-02-07 Robert Millan <rmh@aybabtu.com>
3200
3201 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3202 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3203 after the RAID stuff.
3204
38a0f8e7 32052009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3206
50fb7002 3207 Fixes problem when running vbetest command as reported by
38a0f8e7 3208 Vladimir Serbinenko <phcoder@gmail.com>.
3209
3210 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3211
3143cc1c 32122009-02-04 Felix Zielcke <fzielcke@z-51.de>
3213
3214 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3215 /dev/md/NpN style mdraid devices.
3216
9cba6fce 32172009-02-03 Felix Zielcke <fzielcke@z-51.de>
3218
3219 * util/unifont2pff.rb: Remove.
3220
e507a2c1 32212009-02-03 Felix Zielcke <fzielcke@z-51.de>
3222
3223 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3224 `#'.
3225
d2c2b4cd 32262009-02-03 Felix Zielcke <fzielcke@z-51.de>
3227
3228 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3229 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3230 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3231 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3232 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3233 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3234 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3235
b4315fb0 32362009-02-02 Christian Franke <franke@computer.org>
3237
3238 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3239
de3aa260 32402009-02-01 Felix Zielcke <fzielcke@z-51.de>
3241
7c3ff286 3242 * INSTALL: Note that we now require at least autoconf 2.59 and
3243 that LZO is optional.
de3aa260 3244
825a182b 32452009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3246
3247 Base on patch on bug #24154 created by Tomas Tintera
3248 <trosos@seznam.cz>.
3249
3250 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3251
a69ef770 32522009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3253
7c3ff286 3254 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 3255 <bero@arklinux.org>.
3256
3257 * normal/parser.y (script_init): Add missing semicolon.
3258
6fa42fa6 32592009-01-31 Colin D Bennett <colin@gibibit.com>
3260
7c3ff286 3261 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 3262 (free_menu_entry_classes): Added.
3263 (grub_normal_menu_addentry): Added class property handling.
3264 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3265 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3266
3267 * normal/menu_viewer.c: New file.
3268
3269 * normal/menu.c (run_menu_entry): Renamed to ...
3270 (grub_menu_execute_entry): ... this and made it as global.
3271 (grub_menu_run): Renamed to ...
3272 (show_text_menu): ... this and made it local.
3273 (show_text_menu): Adapt to new function names.
3274 (grub_normal_terminal_menu_viewer): New global variable.
3275
3276 * include/grub/menu.h: New file.
3277
3278 * include/grub/menu_viewer.h: New file.
3279
3280 * include/grub/normal.h: Added include to grub/menu.h.
3281 (grub_menu_entry): Moved to include/grub/menu.h.
3282 (grub_menu_entry_t): Likewise.
3283 (grub_menu): Likewise.
3284 (grub_menu_t): Likewise.
3285 (grub_normal_terminal_menu_viewer): Added.
3286 (grub_menu_execute_entry): Likewise.
3287 (grub_menu_run): Removed.
3288
3289 * DISTLIST: Added include/grub/menu.h.
3290 Added include/grub/menu_viewer.h.
3291 Added normal/menu_viewer.c.
3292
32932009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3294
3295 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3296 arglist for menutitle arguments.
3297
3298 * normal/main.c (grub_normal_menu_addentry): Likewise.
3299
3300 * normal/parser.y (menuentry): Likewise.
3301
3302 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3303
3304 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3305 (grub_script_create_cmdmenu): Likewise.
3306
3307 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3308
3309 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3310 changes.
3311
3312 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3313
3314 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3315
3316 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3317
3318 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3319
3320 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3321
3322 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3323
56192c23 33242009-01-30 Christian Franke <franke@computer.org>
3325
3326 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3327 in option help text.
3328
d72521b3 33292009-01-27 Pavel Roskin <proski@gnu.org>
3330
3331 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3332
994b5e84 33332009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3334
3335 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3336
3337 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3338
3339 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3340 unregister function.
3341
6a7eab2c 33422009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3343
3344 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3345
3346 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3347
3348 * util/grub-mkfont.c (usage): Fix typo.
3349
3350 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3351
1806b56e 33522009-01-26 Daniel Mierswa <impulze@impulze.org>
3353
3fb18f09 3354 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3355
336e1fb9 3356 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3357
1806b56e 3358 * kern/misc.c (grub_strcasecmp): New function.
3359 (grub_strcasecmp): Use grub_size_t instead of int for length.
3360 Fix return value.
3361 * include/grub/misc.h: Update function prototypes.
3362
580b2a0f 33632009-01-26 Robert Millan <rmh@aybabtu.com>
3364
3365 * configure.ac: Fix cross-compilation check.
ef257b36 3366
d31c24f1 33672009-01-22 Christian Franke <franke@computer.org>
3368
3369 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3370 (precision) digit string. Allow `.format2' without `format1' (width).
3371 Limit input chars for `%s' output to `format2' if specified. This is
3372 compatible with standard printf ().
3373
3138b44c 33742009-01-22 Christian Franke <franke@computer.org>
3375
3376 * disk/ata.c (grub_ata_wait_status): Replace by ...
3377 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3378 other status bits may be invalid while BSY is asserted.
3379 (grub_ata_check_ready): New function.
3380 (grub_ata_cmd): Removed.
3381 (grub_ata_wait_drq): New function.
3382 (grub_ata_strncpy): Remove inline.
3383 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3384 and error check now done by grub_ata_wait_drq ().
3385 (grub_ata_pio_write): Likewise.
3386 (grub_atapi_identify): Set DEV before check for !BSY. Use
3387 grub_ata_wait_drq () to wait for data.
3388 (grub_ata_device_initialize): Add status register check to
3389 detect missing SATA slave devices. Add debug messages.
3390 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3391 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3392 transfer loop by grub_ata_pio_write ().
3393 (grub_ata_identify): Set DEV before check for !BSY. Use
3394 grub_ata_wait_drq () to wait for data.
ef257b36 3395 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 3396 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3397 read/write in one loop. Fix invalid command on write. Fix incomplete
3398 command on (size % batch) == 0. Add missing error check after write of
3399 last block. Add debug messages.
3400 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3401
59a64ef6 34022009-01-19 Christian Franke <franke@computer.org>
3403
3404 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3405 (GRUB_ATAPI_IREASON_*): Likewise.
3406 (grub_ata_pio_write): Fix timeout error return.
3407 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3408 (grub_atapi_wait_drq): New function.
3409 (grub_atapi_packet): New parameter `size'.
3410 Use grub_atapi_wait_drq () and direct write instead of
3411 grub_ata_pio_write ().
3412 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3413 reads the number of bytes requested by the device for each DRQ
3414 assertion.
3415 (grub_atapi_write): Remove old implementation, return not
3416 implemented instead.
3417
1cfe20b3 34182009-01-19 Christian Franke <franke@computer.org>
3419
3420 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3421 of 512 to calculate data size.
3422 (grub_scsi_read12): Likewise.
3423 (grub_scsi_write10): Likewise.
3424 (grub_scsi_write12): Likewise.
3425 (grub_scsi_read): Adjust size according to blocksize.
3426 Add checks for invalid blocksize and unaligned transfer.
3427
bee5fe5d 34282009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3429
3430 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3431
ef257b36 3432 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 3433 width glyphs.
3434
3e643f8c 34352009-01-19 Robert Millan <rmh@aybabtu.com>
3436
3437 * config.guess: Update to latest version from config git.
3438 * config.sub: Likewise.
3439
4fa80998 34402009-01-17 Felix Zielcke <fzielcke@z-51.de>
3441
3442 * Makefile.in: Change font compilation to use new grub-mkfont instead
3443 of java version.
3444
3445 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3446 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3447 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3448 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3449 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3450 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3451 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3452 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3453 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3454
7086085b 34552009-01-16 Christian Franke <franke@computer.org>
3456
3457 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3458 (enum grub_ata_timeout_milliseconds): New enum.
3459 (grub_ata_wait_status): Add parameter milliseconds.
3460 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3461 recovery from timed-out commands.
3462 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3463 return grub_errno instead of REG_ERROR.
3464 (grub_ata_pio_write): Add parameter milliseconds.
3465 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3466 Pass milliseconds to grub_ata_wait_status () and
3467 grub_ata_pio_read ().
3468 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3469 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3470 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3471 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3472 It is not suitable for device detection, because DEV bit is ignored,
3473 the command may run too long, and not all devices set the signature
3474 properly.
3475 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3476 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3477 Fix device selection, DEV bit must be set first to address the registers
3478 of the correct device.
3479 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3480 grub_ata_pio_read/write ().
3481 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3482 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3483
4a412913 34842009-01-13 Carles Pina i Estany <carles@pina.cat>
3485
3486 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3487
7795c55e 34882009-01-13 Bean <bean123ch@gmail.com>
d913988c 3489
3490 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3491
7795c55e 34922009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 3493
3494 * Makefile.in: (enable_grub_mkfont): New variable.
3495 (freetype_cflags): Likewise.
3496 (freetype_libs): Likewise.
3497
3498 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3499 (grub_mkfont_SOURCES): New variable.
3500 (grub_mkfont_CFLAGS): Likewise.
3501 (grub_mkfont_LDFLAGS): Likewise.
3502
3503 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3504 library if `--enable-grub-mkfont' is requested.
3505 (enable_grub_mkfont): New variable.
3506 (freetype_cflags): Likewise.
3507 (freetype_libs): Likewise.
3508
3509 * util/grub-mkfont.c: New file.
3510
093af1fe 35112009-01-12 Christian Franke <franke@computer.org>
3512
3513 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3514 mode check. Fix setting of compat_use[].
3515
f36cc108 35162009-01-10 Robert Millan <rmh@aybabtu.com>
3517
3518 Update a few copyright years which we forgot to do in 2008 (only for
3519 files whose changes made in 2008 were copyright-significant)
3520
3521 * Makefile.in: Add 2008 to Copyright line.
3522 * disk/ieee1275/ofdisk.c: Likewise.
3523 * disk/efi/efidisk.c: Likewise.
3524 * kern/dl.c: Likewise.
3525 * kern/sparc64/ieee1275/init.c: Likewise.
3526 * kern/mm.c: Likewise.
3527 * kern/efi/mm.c: Likewise.
3528 * boot/i386/pc/boot.S: Likewise.
3529 * genfslist.sh: Likewise.
3530 * fs/iso9660.c: Likewise.
3531 * fs/hfs.c: Likewise.
3532 * fs/jfs.c: Likewise.
3533 * fs/minix.c: Likewise.
3534 * fs/ufs.c: Likewise.
3535 * gensymlist.sh.in: Likewise.
3536 * genkernsyms.sh.in: Likewise.
3537 * include/grub/misc.h: Likewise.
3538 * include/grub/types.h: Likewise.
3539 * include/grub/symbol.h: Likewise.
3540 * include/grub/elf.h: Likewise.
3541 * include/grub/kernel.h: Likewise.
3542 * include/grub/disk.h: Likewise.
3543 * include/grub/dl.h: Likewise.
3544 * include/grub/i386/linux.h: Likewise.
3545 * include/grub/i386/pc/biosdisk.h: Likewise.
3546 * include/grub/efi/api.h: Likewise.
3547 * include/grub/efi/pe32.h: Likewise.
3548 * include/grub/util/misc.h: Likewise.
3549 * normal/execute.c: Likewise.
3550 * normal/arg.c: Likewise.
3551 * normal/completion.c: Likewise.
3552 * normal/lexer.c: Likewise.
3553 * normal/parser.y: Likewise.
3554 * normal/misc.c: Likewise.
3555 * commands/i386/pc/vbeinfo.c: Likewise.
3556 * commands/hexdump.c: Likewise.
3557 * commands/terminal.c: Likewise.
3558 * commands/ls.c: Likewise.
3559 * commands/help.c: Likewise.
3560 * partmap/pc.c: Likewise.
3561 * loader/efi/chainloader.c: Likewise.
3562 * loader/multiboot_loader.c: Likewise.
3563 * loader/i386/pc/multiboot2.c: Likewise.
3564 * term/efi/console.c: Likewise.
3565 * term/i386/pc/serial.c: Likewise.
3566 * util/lvm.c: Likewise.
3567 * util/console.c: Likewise.
3568 * util/i386/efi/grub-mkimage.c: Likewise.
3569 * util/raid.c: Likewise.
3570
7f02114b 35712009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3572
3573 * commands/videotest.c: Removed include to grub/machine/memory.h.
3574
3575 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3576 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3577 (video_mod_SOURCES): Removed.
3578 (video_mod_CFLAGS): Likewise.
3579 (video_mod_LDFLAGS): Likewise.
3580 (gfxterm_mod_SOURCES): Likewise.
3581 (gfxterm_mod_CFLAGS): Likewise.
3582 (gfxterm_mod_LDFLAGS): Likewise.
3583 (videotest_mod_SOURCES): Likewise.
3584 (videotest_mod_CFLAGS): Likewise.
3585 (videotest_mod_LDFLAGS): Likewise.
3586 (bitmap_mod_SOURCES): Likewise.
3587 (bitmap_mod_CFLAGS): Likewise.
3588 (bitmap_mod_LDFLAGS): Likewise.
3589 (tga_mod_SOURCES): Likewise.
3590 (tga_mod_CFLAGS): Likewise.
3591 (tga_mod_LDFLAGS): Likewise.
3592 (jpeg_mod_SOURCES): Likewise.
3593 (jpeg_mod_CFLAGS): Likewise.
3594 (jpeg_mod_LDFLAGS): Likewise.
3595 (png_mod_SOURCES): Likewise.
3596 (png_mod_CFLAGS): Likewise.
3597 (png_mod_LDFLAGS): Likewise.
3598
3599 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3600 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3601 (video_mod_SOURCES): Added.
3602 (video_mod_CFLAGS): Likewise.
3603 (video_mod_LDFLAGS): Likewise.
3604 (videotest_mod_SOURCES): Likewise.
3605 (videotest_mod_CFLAGS): Likewise.
3606 (videotest_mod_LDFLAGS): Likewise.
3607 (bitmap_mod_SOURCES): Likewise.
3608 (bitmap_mod_CFLAGS): Likewise.
3609 (bitmap_mod_LDFLAGS): Likewise.
3610 (tga_mod_SOURCES): Likewise.
3611 (tga_mod_CFLAGS): Likewise.
3612 (tga_mod_LDFLAGS): Likewise.
3613 (jpeg_mod_SOURCES): Likewise.
3614 (jpeg_mod_CFLAGS): Likewise.
3615 (jpeg_mod_LDFLAGS): Likewise.
3616 (png_mod_SOURCES): Likewise.
3617 (png_mod_CFLAGS): Likewise.
3618 (png_mod_LDFLAGS): Likewise.
3619 (gfxterm_mod_SOURCES): Likewise.
3620 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 3621 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 3622
3623 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3624 grub/machine/console.h.
3625
644fff97 36262009-01-04 Jerone Young <jerone@gmail.com>
3627
3628 Make on screen instructions clearer
3629
3630 Based on patch created by Jidanni <jidanni@jidanni.org>
3631
3632 * normal/menu.c: print clearer instructions on the screen
3633
1e901a75 36342009-01-02 Colin D Bennett <colin@gibibit.com>
3635
3636 New font engine.
34c44600 3637
1e901a75 3638 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3639 build system and fixed gfxterm.c to work with different sized fonts.
3640
3641 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 3642
1e901a75 3643 * configure: Re-generated.
34c44600 3644
1e901a75 3645 * DISTLIST: Removed font/manager.c.
3646 Added font/font.c.
3647 Added font/font_cmd.c.
34c44600 3648
1e901a75 3649 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3650 compilation.
34c44600 3651
1e901a75 3652 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 3653
3654 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 3655
3656 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 3657
1e901a75 3658 * normal/menu.c: Likewise.
34c44600 3659
1e901a75 3660 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3661 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 3662
1e901a75 3663 * include/grub/font.h: Replaced with new file.
34c44600 3664
1e901a75 3665 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3666 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3667 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3668 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3669 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 3670 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 3671 fg_red, fg_green, fg_blue, fg_alpha.
3672 (grub_video_adapter): Removed blit_glyph.
34c44600 3673 (grub_video_blit_glyph): Removed.
3674
1e901a75 3675 * font/manager.c: Removed file.
34c44600 3676
3677 * font/font.c: New file.
3678
1e901a75 3679 * font/font_cmd.c: Likewise.
34c44600 3680
1e901a75 3681 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 3682
1e901a75 3683 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3684 (grub_video_vbe_map_rgba): Likewise.
3685 (grub_video_vbe_unmap_color_int): Likewise.
3686 (grub_video_vbe_blit_glyph): Removed.
3687 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 3688
1e901a75 3689 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3690 (get_pixel): Likewise.
34c44600 3691 (set_pixel): Likewise.
3692
1e901a75 3693 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 3694
1e901a75 3695 * term/gfxterm.c: Adapted to new font engine.
34c44600 3696
1e901a75 3697 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 3698
1e901a75 3699 * term/i386/pc/vga.c: Likewise.
34c44600 3700
1e901a75 3701 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 3702
1e901a75 3703 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 3704
1e901a75 3705 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3706
1e901a75 3707 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3708
1e901a75 3709 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 3710
1e901a75 3711 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 3712
1e901a75 3713 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 3714
1e901a75 3715 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 3716
1e901a75 3717 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3718
3719 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 3720
1e901a75 3721 * util/grub-mkconfig_lib.in: Changed font extension.
3722
278922e8 37232008-12-28 Felix Zielcke <fzielcke@z-51.de>
3724
3725 * util/getroot.c (grub_util_get_grub_dev): Add support for
3726 /dev/md/dNNpNN style partitionable mdraid devices.
3727
3ced05cf 37282008-12-12 Alex Smith <alex@alex-smith.me.uk>
3729
3730 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3731 at a time limit of the PXE TFTP API correctly.
3732 (grub_pxefs_close): Likewise.
3733
7fd0ee30 37342008-11-29 Robert Millan <rmh@aybabtu.com>
3735
34c44600 3736 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 3737 grub_ata_device_initialize() calls.
3738
34c44600 37392008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 3740
3741 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3742 iteration failed.
3743 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3744
89313780 37452008-11-28 Robert Millan <rmh@aybabtu.com>
3746
3747 Fix build on powerpc-ieee1275. Based on patch created by
3748 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3749 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3750 `kern/ieee1275/mmap.c'.
3751 * include/grub/powerpc/ieee1275/memory.h: New file.
3752
15257703 3753 Provide grub-install on coreboot.
3754 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3755 (grub_install_SOURCES): New variable.
3756 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3757 usable on coreboot.
3758
9fc5388a 37592008-11-25 Felix Zielcke <fzielcke@z-51.de>
3760
3761 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3762 to `grub_term_input_t'.
3763 (grub_term_get_current_output): Change return type to
3764 `grub_term_output_t'.
3765
bc3a2f31 37662008-11-22 Robert Millan <rmh@aybabtu.com>
3767
34c44600 3768 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3769 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3770 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3771 grub_vga_text_cls().
3772
80fc88f2 3773 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3774 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3775
cbf36fd3 3776 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3777 to 0x200000 (avoids trouble with some OFW implementations, and matches
3778 with the one in Yaboot).
3779 Reported by Manoel Abranches
3780
73e8e268 37812008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3782
3783 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3784 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3785
73e8e268 3786 * util/grub-mkconfig_lib.in (grub_warn): New function.
3787 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3788 warnings, to obtain consistent formatting.
3789 * util/grub.d/00_header.in: Likewise.
3790 * util/update-grub_lib.in: Likewise.
3791
e94045a1 3792 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3793 Move comment text to `#error' stanza.
e94045a1 3794
79d29fd7 3795 Harmonize ieee1275's grub_available_iterate() with the generic
3796 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3797 build problem on i386-ieee1275):
3798 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3799 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3800 parameter `type'. Update all users of this function.
3801 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3802 `kern/ieee1275/mmap.c'.
3803 * kern/ieee1275/init.c
3804 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3805 with ...
3806 (grub_machine_mmap_iterate): ... this.
3807 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3808 return type to `grub_err_t'. Update all implementations of this
3809 function prototype.
3810 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3811 Likewise.
3812
60d6b16e 3813 Add `lsmmap' command (lists firmware-provided memory map):
3814 * commands/lsmmap.c: New file.
3815 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3816 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3817 variables.
3818 * conf/powerpc-ieee1275.rmk: Likewise.
3819 * conf/i386-coreboot.rmk: Likewise.
3820 * conf/i386-ieee1275.rmk: Likewise.
3821
ebaaf49b 38222008-11-19 Robert Millan <rmh@aybabtu.com>
3823
3824 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3825 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3826 constraints to initrd allocation (based on code from
3827 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3828 for Linux to find it.
ebaaf49b 3829
dfab719f 38302008-11-14 Robert Millan <rmh@aybabtu.com>
3831
3832 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3833 order to cope with duplicate slashes.
3834
10fc3eb9 38352008-11-14 Robert Millan <rmh@aybabtu.com>
3836
3837 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3838 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3839 don't want to mess with lower memory, because it is used in the Linux
3840 loader.
3841
3842 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 3843 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 3844 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3845 is in our heap (probably as a result of it being corrupted during
2f2a3442 3846 decompression). Add #error instance with comment to explain why this
3847 loader isn't currently usable on PC/BIOS.
10fc3eb9 3848
e2e07847 38492008-11-14 Robert Millan <rmh@aybabtu.com>
3850
3851 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 3852 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 3853
fe8e8d69 38542008-11-12 Robert Millan <rmh@aybabtu.com>
3855
3856 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3857
3858 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3859 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3860 from here ...
3861 * include/grub/i386/pc/memory.h: ... to here.
3862
976b07d0 38632008-11-12 Robert Millan <rmh@aybabtu.com>
3864
3865 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3866 split).
3867
3868 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3869 (grub_console_cur_color, grub_console_real_putchar)
3870 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3871 (grub_console_setcolorstate, grub_console_setcolor)
3872 (grub_console_getcolor): Move from here ...
3873 * include/grub/i386/vga_common.h: ... to here (new file).
3874
3875 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3876 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3877 `<grub/i386/io.h>'.
3878 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3879 `<grub/i386/vga_common.h>'.
3880
76679cd3 38812008-11-12 Robert Millan <rmh@aybabtu.com>
3882
3883 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3884 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3885 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3886 variables.
3887 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3888 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3889
3890 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3891 grub_console_init() with call to grub_vga_text_init().
3892 (grub_machine_fini): Replace call to
3893 grub_console_fini() with call to grub_vga_text_fini() and
3894 grub_at_keyboard_fini().
3895
3896 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3897 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3898 (grub_console_setcolorstate, grub_console_setcolor)
3899 (grub_console_getcolor): New function prototypes.
3900
3901 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3902 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3903 (grub_vga_text_setcursor): Static-ize.
3904 (grub_vga_text_term): New structure.
3905 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3906
3907 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3908 (grub_console_cur_color, grub_console_standard_color)
3909 (grub_console_normal_color, grub_console_highlight_color)
3910 (map_char, grub_console_putchar, grub_console_getcharwidth)
3911 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3912 (grub_console_getcolor): Move from here ...
3913 * term/i386/vga_common.c: ... to here (same function names).
3914
95b841d3 39152008-11-12 Robert Millan <rmh@aybabtu.com>
3916
3917 Use newly-added Multiboot support in coreboot.
3918
3919 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3920 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3921
3922 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3923 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3924 (codestart): Store the MBI in `startup_multiboot_info' when we're
3925 being loaded using Multiboot.
3926
3927 * kern/i386/coreboot/init.c (grub_machine_init): Move
3928 grub_at_keyboard_init() call to beginning of function (useful for
3929 debugging). Call grub_machine_mmap_init() before attempting to use
3930 grub_machine_mmap_iterate().
3931 (grub_lower_mem, grub_upper_mem): Move from here ...
3932 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3933 here (new file).
3934
3935 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3936 function prototype.
3937
761ca975 39382008-11-12 Robert Millan <rmh@aybabtu.com>
3939
3940 Fix a regression introduced by the at_keyboard.mod split. Because
3941 some terminals are default on some platforms and non-default on
3942 others, the first terminal being registered determines which is
3943 going to be default.
3944
3945 * kern/term.c (grub_term_register_input): If this is the first
3946 terminal being registered, set it as the current one.
3947 (grub_term_register_output): Likewise.
3948
3949 * term/efi/console.c (grub_console_init): Do not call
3950 grub_term_set_current_output() or grub_term_set_current_input().
3951 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3952 * term/i386/pc/console.c (grub_console_init): Likewise.
3953 (grub_console_fini): Do not call grub_term_set_current_input()
3954 (but leave grub_term_set_current_output() to restore text mode).
3955
6c529df7 39562008-11-10 Robert Millan <rmh@aybabtu.com>
3957
3958 * util/grub.d/00_header.in: Add backward compatibility check for
3959 versions of terminal.mod that don't understand `terminal_input' or
3960 `terminal_output'.
3961
132e4113 39622008-11-09 Robert Millan <rmh@aybabtu.com>
3963
3964 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3965 `terminal_input' / `terminal_output', not `terminal'.
3966
ac293d50 39672008-11-08 Robert Millan <rmh@aybabtu.com>
3968
3969 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 3970 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 3971
0025933a 39722008-11-08 Robert Millan <rmh@aybabtu.com>
3973
3974 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 3975 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 3976 members. Update all users.
3977 * util/console.c (grub_ncurses_term): Split in ...
3978 (grub_ncurses_term_input): ... this, and ...
3979 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 3980 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 3981
37c86336 39822008-11-08 Robert Millan <rmh@aybabtu.com>
3983
3984 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3985 (PKGDATA): Add $(pkgdata_SRCDIR).
3986 (pkglib_BUILDDIR): New variable.
3987 (pkgdata_SRCDIR): New variable.
3988 (build_env.mk): New target.
3989 (include_DATA): New variable.
3990 (install-local): Install $(include_DATA) files in $(includedir).
3991
b6c15a2d 39922008-11-07 Pavel Roskin <proski@gnu.org>
3993
d99d46f1 3994 * gendistlist.sh: Use C locale for sorting to ensure consistent
3995 output on all systems.
3996
b6c15a2d 3997 * util/grub.d/00_header.in: Remove incorrect space before
3998 "serial".
3999
c32ee8c9 40002008-11-07 Robert Millan <rmh@aybabtu.com>
4001
4002 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4003 per specification.
4004 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4005 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4006 (based on find_multi_boot1_header).
4007 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4008 using find_multi_boot2_header(), and abort if neither Multiboot or
4009 Multiboot headers were found.
4010
651c29b7 40112008-11-07 Robert Millan <rmh@aybabtu.com>
4012
4013 Modularize at_keyboard.mod:
4014
4015 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4016 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4017 (at_keyboard_mod_LDFLAGS): New variables.
4018
4019 Actual terminal split:
4020
4021 * include/grub/term.h (struct grub_term): Split in ...
4022 (struct grub_term_input): ... this, and ...
4023 (struct grub_term_output): ... this. Update all users.
4024 (grub_term_set_current): Split in ...
4025 (grub_term_set_current_input): ... this, and ...
4026 (grub_term_set_current_output): ... this.
4027 (grub_term_get_current): Split in ...
4028 (grub_term_get_current_input): ... this, and ...
4029 (grub_term_get_current_output): ... this.
4030 (grub_term_register): Split in ...
4031 (grub_term_register_input): ... this, and ...
4032 (grub_term_register_output): ... this.
4033 (grub_term_unregister): Split in ...
4034 (grub_term_unregister_input): ... this, and ...
4035 (grub_term_unregister_output): ... this.
4036 (grub_term_iterate): Split in ...
4037 (grub_term_iterate_input): ... this, and ...
4038 (grub_term_iterate_output): ... this.
4039
4040 * kern/term.c (grub_term_list): Split in ...
4041 (grub_term_list_input): ... this, and ...
4042 (grub_term_list_output): ... this. Update all users.
4043 (grub_cur_term): Split in ...
4044 (grub_cur_term_input): ... this, and ...
4045 (grub_cur_term_output): ... this. Update all users.
4046 (grub_term_set_current): Split in ...
4047 (grub_term_set_current_input): ... this, and ...
4048 (grub_term_set_current_output): ... this.
4049 (grub_term_get_current): Split in ...
4050 (grub_term_get_current_input): ... this, and ...
4051 (grub_term_get_current_output): ... this.
4052 (grub_term_register): Split in ...
4053 (grub_term_register_input): ... this, and ...
4054 (grub_term_register_output): ... this.
4055 (grub_term_unregister): Split in ...
4056 (grub_term_unregister_input): ... this, and ...
4057 (grub_term_unregister_output): ... this.
4058 (grub_term_iterate): Split in ...
4059 (grub_term_iterate_input): ... this, and ...
4060 (grub_term_iterate_output): ... this.
4061
4062 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4063 a check for input and one for output (and only attempt to get keys
4064 from user when input works).
4065
4066 * util/grub-probe.c (grub_term_get_current): Split in ...
4067 (grub_term_get_current_input): ... this, and ...
4068 (grub_term_get_current_output): ... this.
4069 * util/grub-fstest.c: Likewise.
4070 * util/i386/pc/grub-setup.c: Likewise.
4071 * util/grub-editenv.c: Likewise.
4072
4073 Portability adjustments:
4074
4075 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4076 `term/i386/pc/at_keyboard.c'.
4077 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4078 grub_keyboard_controller_init() (now handled by terminal .init).
4079 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4080 grub_at_keyboard_init().
4081 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4082 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4083 at_keyboard.mod via input terminal interface).
4084 * include/grub/i386/coreboot/console.h: Convert into a stub for
4085 `<grub/i386/pc/console.h>'.
4086
4087 Migrate full terminals to new API:
4088
4089 * term/efi/console.c (grub_console_term): Split into ...
4090 (grub_console_term_input): ... this, and ...
4091 (grub_console_term_output): ... this. Update all users.
4092 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4093 (grub_ofconsole_init): Split into ...
4094 (grub_ofconsole_init_input): ... this, and ...
4095 (grub_ofconsole_init_output): ... this.
4096 (grub_ofconsole_term): Split into ...
4097 (grub_ofconsole_term_input): ... this, and ...
4098 (grub_ofconsole_term_output): ... this. Update all users.
4099 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4100 (grub_serial_term_input): ... this, and ...
4101 (grub_serial_term_output): ... this. Update all users.
4102 * term/i386/pc/console.c (grub_console_term): Split into ...
4103 (grub_console_term_input): ... this, and ...
4104 (grub_console_term_output): ... this. Update all users.
4105 (grub_console_term_input): Only enable it on PC/BIOS platform.
4106 (grub_console_init): Remove grub_keyboard_controller_init() call.
4107
4108 Migrate input terminals to new API:
4109
4110 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4111 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4112 i386-specific anyway).
4113 (grub_console_checkkey): Rename to ...
4114 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4115 users.
4116 (grub_keyboard_controller_orig): New variable.
4117 (grub_console_getkey): Rename to ...
4118 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4119 users.
4120 (grub_keyboard_controller_init): Static-ize. Save original
4121 controller value so that it can be restored ...
4122 (grub_keyboard_controller_fini): ... here (new function).
4123 (grub_at_keyboard_term): New structure.
4124 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4125 functions.
4126
4127 Migrate output terminals to new API:
4128
4129 * term/i386/pc/vga.c (grub_vga_term): Change type to
4130 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4131 members. Update all users.
4132 * term/gfxterm.c (grub_video_term): Change type to
4133 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4134 members. Update all users.
4135 * include/grub/i386/pc/console.h (grub_console_checkkey)
4136 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4137 etc).
4138
4139 Migrate `terminal' command and userland tools to new API:
4140
4141 * commands/terminal.c (grub_cmd_terminal): Split into ...
4142 (grub_cmd_terminal_input): ... this, and ...
4143 (grub_cmd_terminal_output): ... this.
4144 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4145 `terminal_input' and `terminal_output'.
4146 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4147 `terminal_input' / `terminal_output' API.
4148 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4149 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4150 provided ${GRUB_TERMINAL}, convert it).
4151
96e5d876 41522008-11-04 Robert Millan <rmh@aybabtu.com>
4153
4154 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4155 for FreeBSD.
4156 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4157
556f3775 41582008-11-03 Bean <bean123ch@gmail.com>
4159
4160 * kern/elf.c (grub_elf32_load): Revert to previous code.
4161 (grub_elf64_load): Likewise.
4162
4163 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4164
926b9823 41652008-11-01 Robert Millan <rmh@aybabtu.com>
4166
4167 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4168 (TARGET_CPPFLAGS): Likewise.
4169 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4170
1432e958 41712008-11-01 Carles Pina i Estany <carles@pina.cat>
4172
4173 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4174
dba3f844 41752008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 4176
4177 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4178 addition of objects until the code is not going to be able to fail.
4179
dba3f844 41802008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 4181
4182 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4183 (add a missing NULL check, and correct them by moving the pointer
4184 operations after the actual check).
4185
7ab28c21 41862008-10-29 Robert Millan <rmh@aybabtu.com>
4187
4188 * util/i386/pc/grub-install.in: Handle empty string as output from
4189 make_system_path_relative_to_its_root().
4190
1b7748eb 41912008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4192
4193 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4194 circular metadata worst case scenario. If the metadata is circular
4195 then copy the wrap in place.
4196 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4197 project lib/format_text/layout.h
4198 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4199
c9618ab2 42002008-10-03 Felix Zielcke <fzielcke@z-51.de>
4201
7a36edca 4202 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 4203
bf981c62 42042008-10-03 Felix Zielcke <fzielcke@z-51.de>
4205
4206 * util/update-grub_lib.in: Mention filename in warning message.
4207
6d994591 42082008-09-29 Felix Zielcke <fzielcke@z-51.de>
4209
4210 * NEWS: Update for rename of update-grub to grub-mkconfig.
4211
18ade780 42122008-09-29 Felix Zielcke <fzielcke@z-51.de>
4213
4214 * util/update-grub_lib.in: Copy to ...
4215 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 4216 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 4217 * util/update-grub.in: Rename to ...
4218 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4219 option. Add `--output' option to allow users to specify the generated
4220 configuration file. Default to stdout.
4221 (update_grub_dir): Rename to ...
4222 (grub_mkconfig_dir): ... this.
4223 (grub_cfg): Default to an empty string.
4224 * conf/common.rmk (update-grub): Rename to ...
4225 (grub-mkconfig): ... this.
4226 (update-grub_lib): Copy to ...
4227 (grub-mkconfig_lib): ... this.
4228 (update-grub_SCRIPTS): Copy to ...
4229 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4230 (update-grub_DATA): Rename to ...
4231 (grub-mkconfig_DATA): ... this.
4232
556ce6ac 42332008-09-28 Robert Millan <rmh@aybabtu.com>
4234
4235 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4236 to `modified'. Add the real `created' field.
4237 (grub_iso9660_uuid): Use `modified' rather than `created' for
4238 constructing the UUID.
4239
42402008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 4241
4242 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4243 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4244
92274e85 42452008-09-28 Bean <bean123ch@gmail.com>
4246
4247 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4248 Thanks to Christian Franke for finding this bug.
4249
add6f17a 42502008-09-25 Robert Millan <rmh@aybabtu.com>
4251
4252 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4253 instances of grub_util_get_disk_name() (see previous commit).
4254
d2a367b8 42552008-09-25 Robert Millan <rmh@aybabtu.com>
4256
4257 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4258 `util/i386/get_disk_name.c'.
4259 * conf/i386-efi.rmk: Likewise.
4260 * conf/x86_64-efi.rmk: Likewise.
4261 * conf/i386-coreboot.rmk: Likewise.
4262 * conf/i386-ieee1275.rmk: Likewise.
4263 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4264 `util/ieee1275/get_disk_name.c'.
4265 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4266 * util/ieee1275/get_disk_name.c: Remove file.
4267 * util/i386/get_disk_name.c: Remove file.
4268 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4269 "hd%d" for device.map entries, rather than using
4270 grub_util_get_disk_name().
4271
81a06771 42722008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 4273
4274 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4275 warning.
4276 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4277
5a004279 42782008-09-24 Carles Pina i Estany <carles@pina.cat>
4279
4280 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4281 Changed to 0x5100.
4282 (GRUB_TERM_PPAGE): Changed to 0x4900.
4283
397093d3 42842008-09-24 Robert Millan <rmh@aybabtu.com>
4285
4286 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4287 macros (they were i386-pc specific).
4288 * include/grub/sparc64/ieee1275/console.h: Likewise.
4289 * include/grub/efi/console.h: Likewise.
4290
a91b6c7c 42912008-09-22 Bean <bean123ch@gmail.com>
4292
4293 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4294 resident and in attribute list.
4295
4296 * include/grub/ntfs.h (BMP_LEN): Removed.
4297
c40fd116 42982008-09-22 Bean <bean123ch@gmail.com>
4299
81a06771 4300 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 4301 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4302
4303 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4304 error occurs, as grub_disk_open will call grub_disk_close, which will
4305 call p->close (scsi).
4306
81a06771 43072008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 4308
4309 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4310 (AC_PREREQ): Bumped to 2.59.
4311 (AC_TRY_COMPILE): Replace obsolete macro with ...
4312 (AC_COMPILE_IFELSE): ... this.
4313 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4314 (AC_LINK_IFELSE): ... this.
4315
5dc43410 43162008-09-21 Felix Zielcke <fzielcke@z-51.de>
4317
4318 * autogen.sh: Add a call to `gendistlist.sh'.
4319
9035dce4 43202008-09-19 Christian Franke <franke@computer.org>
4321
4322 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4323 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4324 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4325 Export __enable_execute_stack() to modules.
4326 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4327 New function.
4328
7fd75377 43292008-09-09 Felix Zielcke <fzielcke@z-51.de>
4330
040030b3 4331 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4332 Sort the list.
4333
43342008-09-09 Felix Zielcke <fzielcke@z-51.de>
4335
4336 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 4337 #include <grub/util/hostdisk.h>.
4338
89d5ffcf 43392008-09-08 Robert Millan <rmh@aybabtu.com>
4340
4341 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4342 segments when their filesz is zero (grub_file_read() interprets
81a06771 4343 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 4344 Use `lowest_segment' rather than 0 for calculating the current
4345 segment load address.
4346
40da438f 43472008-09-08 Robert Millan <rmh@aybabtu.com>
4348
4349 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4350 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4351 clobbered useful information.
4352
ddbf5556 43532008-09-08 Robert Millan <rmh@aybabtu.com>
4354
4355 * include/grub/util/biosdisk.h: Move to ...
4356 * include/grub/util/hostdisk.h: ... here. Update all users.
4357 * util/biosdisk.c: Move to ...
4358 * util/hostdisk.c: ... here. Update all users.
4359
783d0f48 43602008-09-07 Robert Millan <rmh@aybabtu.com>
4361
4362 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4363 variables.
4364 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4365 and length can be stored directly in the `mbi->mmap_addr' and
4366 `mbi->mmap_length' struct fields.
4367
548e2ea5 43682008-09-07 Robert Millan <rmh@aybabtu.com>
4369
4370 * conf/i386.rmk: New file. Provides declaration for building
4371 `cpuid.mod'.
4372 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4373 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4374 variables.
4375 Include `conf/i386.mk'.
4376 * conf/i386-efi.rmk: Likewise.
4377 * conf/x86_64-efi.rmk: Likewise.
4378 * conf/i386-coreboot.rmk: Likewise.
4379 * conf/i386-ieee1275.rmk: Likewise.
4380
0ea85a37 43812008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4382
4383 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4384 Adds optimization support for BGR based modes.
4385
4386 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4387 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4388 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4389 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4390 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4391 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4392 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4393 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4394 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4395 (grub_video_i386_vbeblit_index_index): Likewise.
4396 (grub_video_i386_vbeblit_replace_directN): Added.
4397 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4398 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4399 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4400 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4401 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4402 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 4403 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 4404 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4405 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4406 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4407 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4408 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4409 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4410
4411 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4412 (grub_video_i386_vbefill_R8G8B8): Likewise.
4413 (grub_video_i386_vbefill_index): Likewise.
4414 (grub_video_i386_vbefill_direct32): Added.
4415 (grub_video_i386_vbefill_direct24): Likewise.
4416 (grub_video_i386_vbefill_direct16): Likewise.
4417 (grub_video_i386_vbefill_direct8): Likewise.
4418
81a06771 4419 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 4420 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4421 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4422 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4423 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4424 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 4425
0ea85a37 4426 * video/video.c (grub_video_get_blit_format): Updated to use new
4427 blit formats. Added handling for 16 bit color modes.
81a06771 4428
4429 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 4430 fillers.
4431 (common_blitter): Updated to use new blitters.
4432
4433 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4434 Removed.
4435 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4436 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4437 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4438 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4439 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4440 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4441 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4442 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4443 (grub_video_i386_vbeblit_index_index): Likewise.
4444 (grub_video_i386_vbeblit_replace_directN): Added.
4445 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4446 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4447 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4448 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4449 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4450 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4451 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4452 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4453 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4454 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4455 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4456 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4457 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 4458
0ea85a37 4459 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4460 (grub_video_i386_vbefill_R8G8B8): Likewise.
4461 (grub_video_i386_vbefill_index): Likewise.
4462 (grub_video_i386_vbefill_direct32): Added.
4463 (grub_video_i386_vbefill_direct24): Likewise.
4464 (grub_video_i386_vbefill_direct16): Likewise.
4465 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 4466
0ea85a37 4467 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4468 types.
81a06771 4469
0ea85a37 4470 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4471 types.
81a06771 4472
0ea85a37 4473 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4474 blitter types.
81a06771 4475
0ea85a37 4476 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4477 types.
4478
e8a83df6 44792008-09-06 Felix Zielcke <fzielcke@z-51.de>
4480
4481 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4482 RAID level 1.
4483
6bcd8ee5 44842008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 4485
6bcd8ee5 4486 * fs/iso9660.c (grub_iso9660_date): New structure.
4487 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4488 (grub_iso9660_uuid): New function.
c375ae58 4489
59261157 44902008-09-05 Bean <bean123ch@gmail.com>
4491
4492 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4493
4494 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4495 insensitive bit for names in Win32 and Win32 & DOS namespace.
4496
4497 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4498
4499 * include/grub/types.h (LONG_MAX): Likewise.
4500
58b6645a 45012008-09-04 Felix Zielcke <fzielcke@z-51.de>
4502
4ee55921 4503 * util/getroot.c: Include <config.h>.
4504 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4505 add support for /dev/md/N devices and handle LVM double dash escaping.
4506
45072008-09-04 Felix Zielcke <fzielcke@z-51.de>
4508
4509 * config.guess: Update to latest version from config git.
4510 * config.sub: Likewise.
58b6645a 4511
9124f65d 45122008-09-03 Robert Millan <rmh@aybabtu.com>
4513
4514 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4515 `disk->total_sectors'.
4516
81a06771 45172008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 4518
4519 * include/grub/normal.h: Fixed incorrect comment for
4520 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4521
81a06771 45222008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 4523
4524 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4525 values with defines.
4526
4527 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4528 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4529 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4530 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4531 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4532 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4533 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4534 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4535 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4536 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4537 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4538 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4539 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4540 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4541 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4542 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4543 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4544 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4545 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4546
93d5cbf8 45472008-08-31 Robert Millan <rmh@aybabtu.com>
4548
4549 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4550 declaration.
4551 (grub_multiboot): Fix a few warnings.
4552
21751d50 45532008-08-31 Robert Millan <rmh@aybabtu.com>
4554
4555 * loader/i386/pc/multiboot.c: Update comment not to say that
4556 boot_device support is unimplemented.
4557
e27a75c5 45582008-08-31 Robert Millan <rmh@aybabtu.com>
4559
4560 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4561 or memory map support are unimplemented.
4562
81a06771 45632008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 4564
4565 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4566
81a06771 45672008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 4568
4569 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4570 total video memory in 'vbeinfo' output; show color format details for
4571 each video mode.
4572
7c5d8d95 45732008-08-30 Pavel Roskin <proski@gnu.org>
4574
4575 * util/genmoddep.c: Remove for real this time.
4576 * DISTLIST: Remove util/genmoddep.c.
4577
4cebd25a 45782008-08-30 Robert Millan <rmh@aybabtu.com>
4579
4580 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4581 as required by Multiboot spec (it was already 4-byte aligned, but
4582 only by chance).
4583
b497a269 45842008-08-29 Pavel Roskin <proski@gnu.org>
4585
e3925185 4586 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4587 * kern/powerpc/ieee1275/startup.S: ... this.
4588 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4589 * DISTLIST: Likewise.
4590
b497a269 4591 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4592 grub/cpu/kernel.h. Add start label for consistency with other
4593 platforms. Add grub_prefix immediately after start. Add jump
4594 to the code after grub_prefix.
4595 * include/grub/powerpc/kernel.h: Provide valid values for
4596 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4597
6e5a42fe 45982008-08-29 Bean <bean123ch@gmail.com>
4599
4600 * configure.ac: Change host_os to cygwin for mingw.
4601 (asprintf): New check for function.
4602
4603 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4604 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4605
4606 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 4607 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 4608 sync, sleep and grub_util_get_disk_size for mingw.
4609
4610 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4611 to get size in mingw.
4612 (open_device): Use flag O_BINARY if it's defined.
4613 (find_root_device): Add dummy code for mingw.
4614
4615 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4616 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4617 (get_scsi_disk_name): Return 0 for mingw.
4618
4619 * util/hostfs.c: #include <grub/util/misc.h>.
4620 (grub_hostfs_open): Use "rb" flag to open file, use
4621 grub_util_get_disk_size to get disk size for mingw.
4622
4623 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4624 (asprintf): New function if HAVE_ASPRINTF is not set.
4625 (sync): New function for mingw.
4626 (sleep): Likewise.
4627 (grub_util_get_disk_size): Likewise.
4628
ab3f2673 46292008-08-28 Pavel Roskin <proski@gnu.org>
4630
4631 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4632 kern/time.c.
4633
1c282483 46342008-08-28 Robert Millan <rmh@aybabtu.com>
4635
4636 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4637
678e849c 46382008-08-28 Robert Millan <rmh@aybabtu.com>
4639
4640 Change find_grub_drive() syntax so it doesn't prevent it from
4641 detecting NULL names as errors.
4642
4643 * util/biosdisk.c (find_grub_drive): Move free slot search code
4644 from here ...
4645 (find_free_slot): ... to here.
4646 (read_device_map): Use find_free_slot() to search for free slots.
4647
965c75ca 46482008-08-27 Marco Gerards <marco@gnu.org>
4649
4650 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4651 (scsi_mod_SOURCES): New variable.
4652 (scsi_mod_CFLAGS): Likewise
4653 (scsi_mod_LDFLAGS): Likewise.
4654
4655 * disk/scsi.c: New file.
4656
4657 * include/grub/scsi.h: Likewise.
4658
4659 * include/grub/scsicmd.h: Likewise.
4660
4661 * disk/ata.c: Include <grub/scsi.h>.
4662 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4663 instead.
4664 (grub_ata_iterate): Skip ATAPI devices.
4665 (grub_ata_open): Only handle ATAPI devices.
4666 (struct grub_atapi_read): Removed.
4667 (grub_atapi_readsector): Likewise.
4668 (grub_ata_read): No longer handle ATAPI devices.
4669 (grub_ata_write): Likewise.
4670 (grub_atapi_iterate): New function.
4671 (grub_atapi_read): Likewise.
4672 (grub_atapi_write): Likewise.
4673 (grub_atapi_open): Likewise.
4674 (grub_atapi_close): Likewise.
4675 (grub_atapi_dev): New variable.
4676 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4677 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4678
4679 * include/grub/disk.h (enum grub_disk_dev_id): Add
4680 `GRUB_DISK_DEVICE_SCSI_ID'.
4681
c07ae501 46822008-08-26 Robert Millan <rmh@aybabtu.com>
4683
4684 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4685 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4686 descriptive.
4687
5ed20adc 46882008-08-23 Bean <bean123ch@gmail.com>
4689
4690 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4691 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4692 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4693 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4694 dm_nv.mod.
4695 (raid5rec_mod_SOURCES): New macro.
4696 (raid5rec_mod_CFLAGS): Likewise.
4697 (raid5rec_mod_LDFLAGS): Likewise.
4698 (raid6rec_mod_SOURCES): Likewise.
4699 (raid6rec_mod_CFLAGS): Likewise.
4700 (raid6rec_mod_LDFLAGS): Likewise.
4701 (mdraid_mod_SOURCES): Likewise.
4702 (mdraid_mod_CFLAGS): Likewise.
4703 (mdraid_mod_LDFLAGS): Likewise.
4704 (dm_nv_mod_SOURCES): Likewise.
4705 (dm_nv_mod_CFLAGS): Likewise.
4706 (dm_nv_mod_LDFLAGS): Likewise.
4707
4708 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4709 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4710 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4711
4712 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4713 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4714
4715 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4716
4717 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4718
4719 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4720
4721 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4722
4723 * disk/raid5_recover.c: New file.
4724
4725 * disk/raid6_recover.c: Likewise.
4726
4727 * disk/mdraid_linux.c: Likewise.
4728
4729 * disk/dmraid_nvidia.c: Likewise.
4730
4731 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4732 ULONG_MAX.
4733
4734 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4735 calculate the size of raid device.
4736 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4737 different layout of raid5.
4738 (grub_raid_scan_device): Remove code specific to mdraid.
4739 (grub_raid_list): New variable.
4740 (free_array): New function.
4741 (grub_raid_register): Likewise.
4742 (grub_raid_unregister): Likewise.
4743 (grub_raid_rescan): Likewise.
4744 (GRUB_MOD_INIT): Don't iterate device here.
4745 (GRUB_MOD_FINI): Use free_array to release resource.
4746
4747 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4748 (grub_raid5_recover_func_t): New function variable type.
4749 (grub_raid6_recover_func_t): Likewise.
4750 (grub_raid5_recover_func): New variable.
4751 (grub_raid6_recover_func): Likewise.
4752 (grub_raid_register): New function.
4753 (grub_raid_unregister): Likewise.
4754 (grub_raid_rescan): Likewise.
4755 (grub_raid_block_xor): Likewise.
4756
4757 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4758 (CMD_CRC): New macro.
4759 (part): Removed.
4760 (read_file): Handle device as well as file.
4761 (cmd_crc): New function.
4762 (fstest): Handle multiple disks.
4763 (options): Remove part, raw and long, add root and diskcount.
4764 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4765 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4766 add handling for the new options, support multiple disks.
4767
4768 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4769
29c18915 47702008-08-23 Bean <bean123ch@gmail.com>
4771
4772 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4773
4774 * genfslist.sh: Ignore kernel.mod.
4775
4776 * genpartmaplist.sh: Likewise.
4777
8415f261 47782008-08-23 Robert Millan <rmh@aybabtu.com>
4779
4780 * util/getroot.c (find_root_device): Skip anything that starts with
4781 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4782
d5a7dc5b 47832008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4784
d5a7dc5b 4785 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4786 * util/grub.d/00_header.in: Allow the administrator to change default
4787 gfxmode via ${GRUB_GFXMODE}.
4788
380cfbb4 47892008-08-21 Felix Zielcke <fzielcke@z-51.de>
4790
4791 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4792
c9baafe7 47932008-08-21 Robert Millan <rmh@aybabtu.com>
4794
4795 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4796 loader.
4797 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4798 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4799
e290bef2 48002008-08-20 Carles Pina i Estany <carles@pina.cat>
4801
4802 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4803 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4804
f9dbfc96 48052008-08-19 Robert Millan <rmh@aybabtu.com>
4806
4807 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4808 (struct grub_virtual_screen): Remove `cursor_color'.
4809 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4810 initialization.
4811 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4812
dd6bd6ab 48132008-08-18 Robert Millan <rmh@aybabtu.com>
4814
4815 Unify (identical) linux_normal.c files.
4816 * loader/i386/efi/linux_normal.c: Move from here ...
4817 * loader/linux_normal.c: ... to here. Update all users.
4818 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4819 * loader/i386/ieee1275/linux_normal.c: Likewise.
4820
7f42f83e 48212008-08-18 Robert Millan <rmh@aybabtu.com>
4822
4823 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4824 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4825 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4826 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4827 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4828 New macros.
4829 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4830 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4831 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4832 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4833 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4834 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4835 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4836 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4837 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4838 portably using grub_getxy().
4839 Replace `-EFI' with `-bzImage' in boot message.
4840
38487ddb 48412008-08-17 Robert Millan <rmh@aybabtu.com>
4842
4843 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4844
deceb3ec 48452008-08-17 Robert Millan <rmh@aybabtu.com>
4846
4847 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4848
4849 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4850 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4851 (grub_machine_mmap_iterate): New function declaration.
4852 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4853 structure.
4854 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4855 macros.
4856
4857 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4858 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4859 Move e820 parsing from here ...
4860 * kern/i386/pc/mmap.c: New file.
4861 (grub_machine_mmap_iterate): ... to here.
4862
4863 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4864 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4865 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4866 (grub_available_iterate): Redeclare to return `void', and redeclare
4867 its hook to use grub_uint64_t as addr and size parameters, and rename
4868 to ...
4869 (grub_machine_mmap_iterate): ... this. Update all users.
4870
4871 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4872 to make it more readable. Rename to ...
4873 (grub_machine_mmap_iterate): ... this.
4874
4875 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4876 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4877 (grub_multiboot): Allocate an extra region after the payload, and fill
4878 it with a Multiboot memory map. Adjust a.out loader to calculate size
4879 with the extra space.
4880 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4881 with the extra space.
4882
f8aa0f43 48832008-08-17 Carles Pina i Estany <carles@pina.cat>
4884
9807deb9 4885 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 4886
605f5bb6 48872008-08-17 Felix Zielcke <fzielcke@z-51.de>
4888
4889 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4890 mdate-sh to the list `find' searches for.
4891 * DISTLIST: Regenerated.
4892
210db6c6 48932008-08-16 Felix Zielcke <fzielcke@z-51.de>
4894
4895 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4896 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 4897 genmoddep.awk, gensymlist.sh.in.
4898 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 4899 * DISTLIST: Regenerated.
48cdbfd4 4900 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 4901
1082b929 49022008-08-16 Robert Millan <rmh@aybabtu.com>
4903
4904 * disk/raid.c (grub_raid_init): Handle/report errors set by
4905 grub_device_iterate().
4906 * disk/lvm.c (grub_lvm_init): Likewise.
4907
42ce5170 49082008-08-15 Bean <bean123ch@gmail.com>
4909
4910 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4911 and datehook.mod.
4912 (datetime_mod_SOURCES): New macro.
4913 (datetime_mod_CFLAGS): Likewise.
4914 (datetime_mod_LDFLAGS): Likewise.
4915 (date_mod_SOURCES): Likewise.
4916 (date_mod_CFLAGS): Likewise.
4917 (date_mod_LDFLAGS): Likewise.
4918 (datehook_mod_SOURCES): Likewise.
4919 (datehook_mod_CFLAGS): Likewise.
4920 (datehook_mod_LDFLAGS): Likewise.
4921
4922 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4923 and datehook.mod.
4924 (datetime_mod_SOURCES): New macro.
4925 (datetime_mod_CFLAGS): Likewise.
4926 (datetime_mod_LDFLAGS): Likewise.
4927 (date_mod_SOURCES): Likewise.
4928 (date_mod_CFLAGS): Likewise.
4929 (date_mod_LDFLAGS): Likewise.
4930 (datehook_mod_SOURCES): Likewise.
4931 (datehook_mod_CFLAGS): Likewise.
4932 (datehook_mod_LDFLAGS): Likewise.
4933
4934 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4935 and datehook.mod.
4936 (datetime_mod_SOURCES): New macro.
4937 (datetime_mod_CFLAGS): Likewise.
4938 (datetime_mod_LDFLAGS): Likewise.
4939 (date_mod_SOURCES): Likewise.
4940 (date_mod_CFLAGS): Likewise.
4941 (date_mod_LDFLAGS): Likewise.
4942 (datehook_mod_SOURCES): Likewise.
4943 (datehook_mod_CFLAGS): Likewise.
4944 (datehook_mod_LDFLAGS): Likewise.
4945
4946 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4947 and datehook.mod.
4948 (datetime_mod_SOURCES): New macro.
4949 (datetime_mod_CFLAGS): Likewise.
4950 (datetime_mod_LDFLAGS): Likewise.
4951 (date_mod_SOURCES): Likewise.
4952 (date_mod_CFLAGS): Likewise.
4953 (date_mod_LDFLAGS): Likewise.
4954 (datehook_mod_SOURCES): Likewise.
4955 (datehook_mod_CFLAGS): Likewise.
4956 (datehook_mod_LDFLAGS): Likewise.
4957
4958 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4959 and datehook.mod.
4960 (datetime_mod_SOURCES): New macro.
4961 (datetime_mod_CFLAGS): Likewise.
4962 (datetime_mod_LDFLAGS): Likewise.
4963 (date_mod_SOURCES): Likewise.
4964 (date_mod_CFLAGS): Likewise.
4965 (date_mod_LDFLAGS): Likewise.
4966 (datehook_mod_SOURCES): Likewise.
4967 (datehook_mod_CFLAGS): Likewise.
4968 (datehook_mod_LDFLAGS): Likewise.
4969
4970 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4971
4972 * commands/date.c: New file.
4973
4974 * hook/datehook.c: Likewise.
4975
4976 * include/grub/lib/datetime.h: Likewise.
4977
4978 * include/grub/i386/cmos.h: Likewise.
4979
4980 * lib/datetime.c: Likewise.
4981
4982 * lib/i386/datetime.c: Likewise.
4983
4984 * lib/efi/datetime.c: Likewise.
4985
0e9242da 49862008-08-14 Robert Millan <rmh@aybabtu.com>
4987
4988 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4989 (grub_mkelfimage_SOURCES): New variable.
4990 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4991
4992 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4993 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4994 * conf/powerpc-ieee1275.rmk: Likewise.
4995 * conf/i386-ieee1275.rmk: Likewise.
4996
4997 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4998 * kern/i386/coreboot/init.c: Likewise.
4999
5000 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5001 with `<grub/cpu/kernel.h>'.
5002 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5003 to ...
5004 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5005 * kern/i386/coreboot/startup.S: Likewise.
5006
5007 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5008 (GRUB_MOD_GAP): Remove.
5009 * include/grub/powerpc/kernel.h: New file.
5010 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5011 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5012 * include/grub/i386/kernel.h: New file.
5013 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5014 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5015 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5016
5017 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5018 `grub-mkelfimage'.
5019 Use --directory when invoking grub_mkimage.
5020
5021 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5022 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5023 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5024 and GRUB_KERNEL_CPU_PREFIX.
5025
b86408f8 50262008-08-14 Felix Zielcke <fzielcke@z-51.de>
5027
d5e619ca 5028 * include/grub/err.h (grub_err_printf): New function prototype.
5029 * util/misc.c (grub_err_printf): New function.
5030 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5031 grub_printf.
5032 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 5033
7161f0e0 50342008-08-13 Robert Millan <rmh@aybabtu.com>
5035
5036 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5037
a1967522 50382008-08-13 Robert Millan <rmh@aybabtu.com>
5039
5040 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5041 boot entry.
5042
371458b5 50432008-08-12 Robert Millan <rmh@aybabtu.com>
5044
5045 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5046 of the relocation code from here ...
5047 (grub_multiboot): ... to here.
5048 (forward_relocator, backward_relocator): Move from here ...
5049 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5050 (grub_multiboot_backward_relocator): ... to here.
5051 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5052 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5053 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5054 (grub_multiboot_forward_relocator_end)
5055 (grub_multiboot_backward_relocator)
5056 (grub_multiboot_backward_relocator_end): New variables.
5057
05f9452b 50582008-08-12 Bean <bean123ch@gmail.com>
5059
5060 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5061
20024ab0 50622008-08-11 Robert Millan <rmh@aybabtu.com>
5063
5064 * kern/i386/linuxbios/startup.S: Move from here ...
5065 * kern/i386/coreboot/startup.S: ... to here.
5066
5067 * kern/i386/linuxbios/init.c: Move from here ...
5068 * kern/i386/coreboot/init.c: ... to here.
5069
5070 * kern/i386/linuxbios/table.c: Move from here ...
5071 * kern/i386/coreboot/mmap.c: ... to here.
5072
5073 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5074
e352e9cd 50752008-08-11 Robert Millan <rmh@aybabtu.com>
5076
5077 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5078 errors. Leave it to the upper layer to handle them.
5079
2d05bc6a 50802008-08-09 Christian Franke <franke@computer.org>
5081
5082 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5083 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5084 Install `grub.d/10_windows' only on Cygwin.
5085 * configure.ac: Add subst of `target_os'.
5086 Check `target_os' also before setting TARGET_OBJ2ELF.
5087 Add `--enable-grub-pe2elf'.
5088
042bd419 50892008-08-08 Robert Millan <rmh@aybabtu.com>
5090
5091 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5092 (grub_last_time): Change type to grub_uint64_t.
5093 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5094 (grub_disk_close): Likewise.
5095
5096 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5097 (run_menu): Migrate code from to using grub_get_time_ms().
5098
5099 * util/misc.c (grub_get_time_ms): New function.
5100
7f280db5 51012008-08-08 Marco Gerards <marco@gnu.org>
5102
5103 * disk/ata.c (grub_ata_regget): Change return type to
5104 `grub_uint8_t'.
5105 (grub_ata_regget2): Likewise.
5106 (grub_ata_wait_status): New function.
5107 (grub_ata_wait_busy): Removed function, updated all users to use
5108 `grub_ata_wait_status'.
5109 (grub_ata_wait_drq): Likewise.
5110 (grub_ata_cmd): New function.
5111 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5112 error handling.
5113 (grub_ata_pio_write): Add error handling.
5114 (grub_atapi_identify): Likewise.
5115 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5116 handling.
5117 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5118 handling. Actually use the detected registers. Reorder the
5119 detection logic such that it is easier to read.
5120 (grub_ata_pciinit): Do not assign the same ID to each controller.
5121 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5122 handling.
5123 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5124
5125 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5126
1fbc5e66 51272008-08-08 Marco Gerards <marco@gnu.org>
5128
5129 * NEWS: Update.
5130
819ce6c0 51312008-08-07 Bean <bean123ch@gmail.com>
5132
5133 * include/grub/x86_64/pci.h: New file.
5134
5c41d44d 51352008-08-07 Christian Franke <franke@computer.org>
5136
5137 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5138 (TIMER2_GATE): Likewise.
5139 (grub_pit_wait): Add enable/disable of the timer2 gate
5140 bit of port 0x61. This fixes a possible infinite loop.
5141
5ebc275d 51422008-08-07 Bean <bean123ch@gmail.com>
5143
5144 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5145 kern/i386/tsc.c and kern/i386/pit.c.
5146
5147 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5148 x86_64 platform.
5149
5150 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5151 <grub/i386/tsc.h>.
5152
5153 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5154
e383b3d0 51552008-08-07 Bean <bean123ch@gmail.com>
5156
5157 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5158
5159 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5160
5161 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5162 multiple inclusion. Add #include <grub/types.h>.
5163
1cbb58ac 51642008-08-06 Christian Franke <franke@computer.org>
5165
5166 * conf/common.rmk: Build and install `10_windows'.
5167 * util/grub.d/10_windows.in: New script.
5168
337f5a1e 51692008-08-06 Pavel Roskin <proski@gnu.org>
5170
5171 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5172
057bc4ac 51732008-08-06 Robert Millan <rmh@aybabtu.com>
5174
5175 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5176 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5177
2b99f123 51782008-08-06 Bean <bean123ch@gmail.com>
5179
5180 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5181 (grub_pxefs_fs_int): Remove dummy definition.
5182 (grub_pxefs_open): Use data->block_size to store the current block
5183 size setting.
5184 (grub_pxefs_read): Use block size stored in data->block_size. As the
5185 value of grub_pxe_blksize can be changed after the file is opened.
5186
9f0234cb 51872008-08-06 Bean <bean123ch@gmail.com>
5188
5189 * fs/i386/pc/pxe.c (curr_file): new variable.
5190 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5191 require the dummy internal file system anymore.
5192 (grub_pxefs_read): Removed.
5193 (grub_pxefs_close): Likewise.
5194 (grub_pxefs_fs_int): Likewise.
5195 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5196 connection when we switch file.
5197 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5198
a55d42e0 51992008-08-06 Robert Millan <rmh@aybabtu.com>
5200
5201 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5202 `halt.mod'.
5203 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5204 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5205
5206 * kern/i386/halt.c: New file.
5207 * kern/i386/reboot.c: Likewise.
5208 * include/grub/i386/reboot.h: Likewise.
5209 * include/grub/i386/halt.h: Likewise.
5210
5211 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5212 Include `<grub/cpu/halt.h>'.
5213 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5214 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5215
5216 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5217 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5218 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5219 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5220 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5221 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5222 from here ...
5223 * include/grub/i386/at_keyboard.h: ... to here.
5224
24371d26 52252008-08-05 Robert Millan <rmh@aybabtu.com>
5226
5227 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5228 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5229 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5230 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5231 `kern/generic/millisleep.c'.
5232
5233 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5234 instead of grub_get_rtc().
5235 (grub_tsc_init): Initialize `tsc_boot_time'.
5236
5237 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5238 (grub_machine_init): Use grub_tsc_init() rather than
5239 installing an RTC-based handler via grub_install_get_time_ms().
5240
5241 * kern/i386/pit.c: New file.
5242 * include/grub/i386/pit.h: Likewise.
5243
9e7007b3 52442008-08-05 Bean <bean123ch@gmail.com>
5245
5246 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5247
5248 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5249 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5250 (pxe_mod_SOURCES): New macro.
5251 (pxe_mod_CFLAGS): Likewise.
5252 (pxe_mod_LDFLAGS): Likewise.
5253 (pxecmd_mod_SOURCES): Likewise.
5254 (pxecmd_mod_CFLAGS): Likewise.
5255 (pxecmd_mod_LDFLAGS): Likewise.
5256
5257 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5258 (grub_pxe_call): Likewise.
5259
5260 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5261
5262 * commands/i386/pc/pxecmd.c: New file.
5263
9f0234cb 5264 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 5265
5266 * include/grub/i386/pc/pxe.h: Likewise.
5267
6977d49f 52682008-08-05 Bean <bean123ch@gmail.com>
5269
5270 * util/console.c (grub_console_cur_color): New variable.
5271 (grub_console_standard_color): Likewise.
5272 (grub_console_normal_color): Likewise.
5273 (grub_console_highlight_color): Likewise.
5274 (color_map): Likewise.
5275 (use_color): Likewise.
5276 (NUM_COLORS): New macro.
5277 (grub_ncurses_setcolorstate): Handle color properly.
5278 (grub_ncurses_setcolor): Don't change color here, just remember the
5279 settings, color will be set in grub_ncurses_setcolorstate.
5280 (grub_ncurses_getcolor): New function.
5281 (grub_ncurses_init): Initialize color pairs.
5282 (grub_ncurses_term): New member grub_ncurses_getcolor.
5283
9c2ff3ee 52842008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 5285
9c2ff3ee 5286 High resolution timer support. Implemented for x86 CPUs using TSC.
5287 Extracted generic grub_millisleep() so it's linked in only as needed.
5288 This requires a Pentium compatible CPU; if the RDTSC instruction is
5289 not supported, then it falls back on the generic grub_get_time_ms()
5290 implementation that uses the machine's RTC.
5291
5292 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5293 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5294 `kern/generic/millisleep.c'.
5295
5296 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5297 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5298
5299 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5300 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5301
5302 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5303
5304 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5305 `kern/generic/millisleep.c'.
5306
5307 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5308
5309 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5310
5311 * kern/generic/rtc_get_time_ms.c: New file.
5312
5313 * kern/generic/millisleep.c: New file.
337f5a1e 5314
9c2ff3ee 5315 * kern/misc.c: Don't include
5316 <kern/time.h> anymore.
5317 (grub_millisleep_generic): Removed.
5318
5319 * commands/sleep.c (grub_interruptible_millisleep): Uses
5320 grub_get_time_ms() instead of grub_get_rtc().
5321
5322 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5323 function.
5324 (grub_cpu_is_cpuid_supported): New inline function.
5325 (grub_cpu_is_tsc_supported): New inline function.
5326 (grub_tsc_init): New function prototype.
5327 (grub_tsc_get_time_ms): New function prototype.
5328
5329 * kern/i386/tsc.c (grub_get_time_ms): New file.
5330
5331 * include/grub/time.h: Include <grub/types.h.
5332 (grub_millisleep_generic): Removed.
5333 (grub_get_time_ms): New prototype.
5334 (grub_install_get_time_ms): New prototype.
5335 (grub_rtc_get_time_ms): New prototype.
5336
5337 * kern/time.c (grub_get_time_ms): New function.
5338 (grub_install_get_time_ms): New function.
5339
5340 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5341 <grub/time.h> anymore.
5342 (grub_millisleep): Removed.
5343 (grub_machine_init): Call grub_tsc_init.
5344
5345 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5346 get_time_ms() implementation.
5347
5348 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5349 (ieee1275_get_time_ms): New function.
5350 (grub_machine_init): Install get_time_ms() implementation.
5351
5352 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5353 (grub_machine_init): Call grub_tsc_init().
5354 (grub_millisleep): Removed.
bf06a93f 5355
9c2ff3ee 5356 * kern/ieee1275/init.c (grub_millisleep): Removed.
5357 (grub_machine_init): Install ieee1275_get_time_ms()
5358 implementation.
5359 (ieee1275_get_time_ms): New function.
5360 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5361 real work.
5362
9ec92aaf 53632008-08-05 Marco Gerards <marco@gnu.org>
5364
5365 * disk/ata.c: Include <grub/pci.h>.
5366 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5367 (grub_ata_initialize): Rewritten.
5368 (grub_ata_device_initialize): New function.
5369
8d23f507 53702008-08-04 Pavel Roskin <proski@gnu.org>
5371
5372 * kern/main.c: Include grub/mm.h.
5373
5e15ee3d 53742008-08-04 Robert Millan <rmh@aybabtu.com>
5375
5376 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5377 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5378 corruption problem).
5379
a9053f8f 53802008-08-04 Robert Millan <rmh@aybabtu.com>
5381
5382 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5383 warnings introduced in my last commit.
5384
dd19c7d7 53852008-08-03 Robert Millan <rmh@aybabtu.com>
5386
5387 Make PCI available on all i386 architectures.
5388
5389 * include/grub/i386/pc/pci.h: Move from here ...
5390 * include/grub/i386/pci.h: ... to here.
5391
5392 * include/grub/i386/pc/pci.h: Remove.
5393 * include/grub/i386/efi/pci.h: Remove.
5394 * include/grub/x86_64/efi/pci.h: Remove.
5395
5396 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5397 `<grub/cpu/pci.h>'.
5398
5399 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5400 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5401 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5402
5403 * conf/i386-ieee1275.rmk: Likewise.
5404
e14a6184 54052008-08-03 Robert Millan <rmh@aybabtu.com>
5406
5407 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5408 (grub_console_setcursor): Make it possible to set cursor off.
5409
52768e37 54102008-08-03 Robert Millan <rmh@aybabtu.com>
5411
5412 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5413 of modules instead of assuming which platform provides what.
5414 * util/update-grub.in: Likewise.
5415
2d52f57f 54162008-08-03 Robert Millan <rmh@aybabtu.com>
5417
5418 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5419 instead of `grub_install_dos_part' to determine whether a drive needs
5420 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 5421 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 5422
2a5cd121 54232008-08-02 Robert Millan <rmh@aybabtu.com>
5424
5425 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5426
93808428 54272008-08-02 Robert Millan <rmh@aybabtu.com>
5428
5429 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5430 of informational grub_dprintf() calls.
5431
3bd0a12a 54322008-08-02 Robert Millan <rmh@aybabtu.com>
5433
5434 * disk/memdisk.c (memdisk_size): Don't initialize.
5435 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5436
5437 * include/grub/i386/pc/kernel.h
5438 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5439 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5440 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5441 (grub_arch_memdisk_size): Remove.
5442
5443 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5444 field (was only used to transfer a constant). Add `type' field to
5445 support multiple module types.
5446 (grub_module_iterate): New function.
5447
5448 * kern/device.c (grub_device_open): Do not hide error messages
5449 when grub_disk_open() fails. Use grub_print_error() instead.
5450
5451 * kern/i386/pc/init.c (grub_arch_modules_addr)
5452 (grub_arch_memdisk_size): Remove functions.
5453 (grub_arch_modules_addr): Return the module address in high memory
5454 (now that it isn't copied anymore).
5455
5456 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5457 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5458 decompression routine (grub_total_module_size already includes that
5459 now). Don't copy modules back to low memory.
5460
5461 * kern/main.c: Include `<grub/mm.h>'.
5462 (grub_load_modules): Split out (and use) ...
5463 (grub_module_iterate): ... this function, which iterates through
5464 module objects and runs a hook.
5465 Comment out grub_mm_init_region() call, as it would cause non-ELF
5466 modules to be overwritten.
5467
5468 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5469 the memdisk image in its own region, make it part of the module list.
5470 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5471 (main): Parse --memdisk|-m option, and pass user-provided path as
5472 parameter to generate_image().
5473 (add_segments): Pass `memdisk_path' down to load_modules().
5474 (load_modules): Embed memdisk image in module section when requested.
5475 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5476 `header.type' instead of `header.offset'.
5477
5478 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5479 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5480 (memdisk_mod_LDFLAGS): New variables.
5481 * conf/i386-coreboot.rmk: Likewise.
5482 * conf/i386-ieee1275.rmk: Likewise.
5483
a927cc73 54842008-08-02 Robert Millan <rmh@aybabtu.com>
5485
5486 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5487 (backward_relocator): New variables. Used to allocate and relocate
5488 the payload, respectively.
5489 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 5490 address, install the appropriate relocator code in each bound of
a927cc73 5491 the payload, and set the entry point such that
5492 grub_multiboot_real_boot() will jump to one of them.
5493
5494 * kern/i386/loader.S (grub_multiboot_payload_size)
5495 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5496 (grub_multiboot_payload_entry_offset): New variables.
5497 (grub_multiboot_real_boot): Set cpu context to what the relocator
5498 expects, and jump to the relocator instead of the payload.
5499
5500 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5501 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5502 (grub_multiboot_payload_entry_offset): Export.
5503
b15d8a0c 55042008-08-01 Bean <bean123ch@gmail.com>
5505
5506 * normal/menu_entry.c (editor_getline): Don't return the original
5507 string as result, as it will be released by lexer once it has done
5508 using it.
5509
cdfb3d22 55102008-08-01 Robert Millan <rmh@aybabtu.com>
5511
5512 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5513 within menuentries, not before them.
5514 util/grub.d/10_hurd.in: Likewise.
5515
9175e93d 55162008-08-01 Bean <bean123ch@gmail.com>
5517
5518 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5519 (bufio_mod_SOURCES): New macro.
5520 (bufio_mod_CFLAGS): Likewise.
5521 (bufio_mod_LDFLAGS): Likewise.
5522
5523 * include/grub/bufio.h: New file.
5524
5525 * io/bufio.c: Likewise.
5526
5527 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5528 (grub_video_reader_png): Use grub_buffile_open to open file.
5529
5530 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5531 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5532
5533 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5534 (grub_video_reader_tga): Use grub_buffile_open to open file.
5535
5536 * font/manager.c: Include <grub/bufio.h>.
5537 (add_font): Use grub_buffile_open to open file.
5538
3d8383e7 55392008-07-31 Robert Millan <rmh@aybabtu.com>
5540
5541 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5542 ELF segments, use a macro for arbitrarily accessing any of them instead
5543 of preparing a pointer that allows access to one at a time.
5544 (grub_multiboot_load_elf64): Likewise.
5545
16e641b6 55462008-07-31 Bean <bean123ch@gmail.com>
5547
5548 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5549 GRUB_KERNEL_MACHINE_DATA_END.
5550
59198b72 55512008-07-30 Robert Millan <rmh@aybabtu.com>
5552
5553 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5554 Increase from 0x50 to 0x60.
5555 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5556 use UUIDs to identify the root drive for them. If that's not
5557 possible, abort.
5558 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5559 check, for cross-disk installs.
5560
ae88bca3 55612008-07-30 Robert Millan <rmh@aybabtu.com>
5562
5563 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5564 is non-empty, use it to set the `prefix' environment variable instead
5565 of the usual approach.
5566 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5567 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5568 environment variable instead of dummy make_install_device().
5569
5570 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5571 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 5572 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 5573
5574 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5575 New variable reference.
5576 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5577 New macro. Defines offset of `grub_prefix' within startup.S (relative
5578 to `start').
5579 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5580 section within startup.S (relative to `start').
5581 * include/grub/i386/coreboot/kernel.h: Likewise.
5582
5583 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5584 Overwrite grub_prefix with its contents, at the beginning of the
5585 first segment.
5586 (main): Understand -p|--prefix.
5587
14f41dd1 55882008-07-30 Robert Millan <rmh@aybabtu.com>
5589
5590 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5591
4ca049a3 55922008-07-30 Robert Millan <rmh@aybabtu.com>
5593
5594 * term/i386/pc/vga_text.c (grub_console_cls): Use
5595 grub_console_gotoxy() to go back to beginning of the screen.
5596 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5597
2921d337 55982008-07-29 Christian Franke <franke@computer.org>
5599
5600 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5601 Add conversion of emulated mount points on Cygwin.
5602
b609876d 56032008-07-29 Christian Franke <franke@computer.org>
5604
5605 * util/update-grub.in: Add a check for admin
5606 group on Cygwin.
5607 Remove old `grub.cfg.new' before creation.
5608 Add `-f' to `mv' to handle the different filesystem
5609 semantics of Windows.
5610
e93e4679 56112008-07-29 Bean <bean123ch@gmail.com>
5612
5613 * normal/main.c (get_line): Fix buffer overflow bug.
5614
41694fd0 56152008-07-28 Robert Millan <rmh@aybabtu.com>
5616
5617 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5618 (struct grub_apple_header): New struct. Describes the layout of
5619 the partmap header.
5620 (apple_partition_map_iterate): Check the header magic as well as the
5621 partition magic (which was already being checked).
5622
cfd0b4e6 56232008-07-28 Pavel Roskin <proski@gnu.org>
5624
5625 * genmk.rb: Add a warning to the beginning of the output that
5626 it's a generated file and should not be edited.
5627
93cce016 56282008-07-28 Robert Millan <rmh@aybabtu.com>
5629
5630 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5631 with the same number are found, just use issue a warning with
5632 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 5633
cd1df915 56342008-07-27 Robert Millan <rmh@aybabtu.com>
5635
5636 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5637 information.
5638
b70a8427 56392008-07-27 Bean <bean123ch@gmail.com>
5640
5641 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5642 (grub_fat_find_dir): Ignore case when comparing filename.
5643
8f5e379f 56442008-07-27 Bean <bean123ch@gmail.com>
5645
5646 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5647 smallino, as it's more descriptive, and i8count can be confused with
5648 the other field count.
5649 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5650 inode type.
5651
a85cd5a0 56522008-07-27 Bean <bean123ch@gmail.com>
5653
5654 * commands/crc.c: New file.
5655
5656 * lib/crc.c: Likewise.
5657
5658 * include/grub/lib/crc.h: Likewise.
5659
5660 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5661
5662 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5663 (hexdump): Move this function to ...
5664
5665 * lib/hexdump.c: ... here.
5666
5667 * include/grub/hexdump.h: Renamed to ...
5668
5669 * include/grub/lib/hexdump.h: ... this.
5670
5671 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5672
5673 * util/grub-editenv.c: Likewise.
5674
5675 * include/envblk.h: Renamed to ...
5676
5677 * include/lib/envblk.h: ... this.
5678
5679 * util/envblk.c: Renamed to ...
5680
5681 * lib/envblk.c: ... this.
5682
5683 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5684 lib/hexdump.c.
5685 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5686 (pkglib_MODULES): Add crc.mod.
5687 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5688 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5689 (crc_mod_SOURCES): New macro.
5690 (crc_mod_CFLAGS): Likewise.
5691 (crc_mod_LDFLAGS): Likewise.
5692
5693 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5694
5695 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5696
5697 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5698
5699 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5700
5701 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5702
c298def0 57032008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 5704
5705 * commands/help.c: Include <grub/term.h>.
5706 (TERM_WIDTH): Removed. Updated all users.
5707
cc349fb3 57082008-07-27 Pavel Roskin <proski@gnu.org>
5709
5710 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5711 spurious warnings about a comment within a comment.
5712
9051607e 57132008-07-25 Robert Millan <rmh@aybabtu.com>
5714
5715 * util/getroot.c (find_root_device): Skip devices that match
5716 /dev/dm-[0-9]. This lets the real device be found for any type of
5717 abstraction (LVM, EVMS, RAID..).
5718 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5719 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5720 device is found first, find_root_device() will now skip it.
5721
01453bfc 57222008-07-24 Pavel Roskin <proski@gnu.org>
5723
5724 * include/grub/types.h: Use __builtin_bswap32() and
5725 __builtin_bswap64() with gcc 4.3 and newer.
5726
6af9849f 57272008-07-24 Christian Franke <franke@computer.org>
5728
3a0fa256 5729 * util/i386/pc/grub-install.in: If `--debug' is specified,
5730 pass `--verbose' to grub-setup.
5731 Abort script if make_system_path_relative_to_its_root() fails.
5732
7810e747 57332008-07-24 Bean <bean123ch@gmail.com>
5734
5735 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5736 variable `target_platform' should be `platform'.
5737
42290e17 57382008-07-24 Bean <bean123ch@gmail.com>
5739
51cc5193 5740 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 5741 (grub_png_init_fixed_block): New function.
5742 (grub_png_decode_image_data): Handle fixed huffman code compression.
5743
2a8a80e4 57442008-07-24 Bean <bean123ch@gmail.com>
5745
5746 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5747 (grub_pe2elf_SOURCES): New macro.
5748 (CLEANFILES): Add grub-pe2elf.
5749
5750 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5751 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5752 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5753 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5754 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5755 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5756 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5757 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5758 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5759 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5760 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5761 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5762 (GRUB_PE32_DT_FUNCTION): Likewise.
5763 (GRUB_PE32_REL_I386_DIR32): Likewise.
5764 (GRUB_PE32_REL_I386_REL32): Likewise.
5765 (grub_pe32_symbol): New structure.
5766 (grub_pe32_reloc): Likewise.
5767
5768 * util/grub-pe2elf.c: New file.
5769
5770 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5771 start symbol in non pc platform.
5772
5773 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5774
5775 The following patches are from Christian Franke.
5776
5777 * include/grub/dl.h: Remove .previous, gas supports this only
5778 for ELF format.
5779
5780 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5781 Remove .type, gas supports this only for ELF format.
5782
5783 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5784 nullbytes in symbol table. This fixes an infinite loop if table is
5785 zero filled.
5786
5787 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5788 TARGET_IMG_LDFLAGS and EXEEXT.
5789
5790 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5791 TARGET_IMG_LDFLAGS_AC.
5792 (grub_CHECK_STACK_ARG_PROBE): New function.
5793
5794 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5795
5796 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5797
5798 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5799 to set TARGET_IMG_LD* accordingly.
5800 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5801 Add call to grub_CHECK_STACK_ARG_PROBE.
5802 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5803
5804 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5805
5806 * genmk.rb: Add EXEEXT to CLEANFILES.
5807
12ccdb75 58082008-07-23 Robert Millan <rmh@aybabtu.com>
5809
5810 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5811 define the codes for arrows and lines used for the menu).
5812 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5813 as well.
5814
5815 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5816 fonts, because the latter are too slow.
5817
18eeaf04 58182008-07-21 Bean <bean123ch@gmail.com>
5819
5820 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5821 a20. Run keyboard test last, as it will cause macbook to halt.
5822
b095e2ad 58232008-07-18 Pavel Roskin <proski@gnu.org>
5824
5825 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5826 load foreign architecture modules correctly anyway. Keep
5827 support for loading host architecture modules, whether we
5828 compile them or not.
5829
737feb35 58302008-07-17 Pavel Roskin <proski@gnu.org>
5831
3f4ce737 5832 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5833 change target_cpu. The compiler default can mismatch target_cpu
5834 in any case.
5835
4ad2d049 5836 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5837 * kern/efi/efi.c: Likewise.
5838
f6130a12 5839 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5840 target compiler is functional.
5841 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5842 are set up.
5843
58393a2d 5844 * configure.ac: Default to efi platform for x86_64-apple. Allow
5845 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5846 adjustments from the rest, only do them if target is not
5847 explicitly given. Merge other adjustments with the final sanity
5848 check. Remove an extraneous check for supported CPU. Be
5849 specific which CPU and which platform is not supported.
5850
737feb35 5851 * configure.ac: Default to pc platform for x86_64.
5852
546f966a 58532008-07-17 Robert Millan <rmh@aybabtu.com>
5854
5855 Partial LinuxBIOS -> Coreboot rename.
5856
5857 * conf/i386-linuxbios.rmk: Renamed to ...
5858 * conf/i386-coreboot.rmk: ... this.
5859 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5860 * configure.ac: Accept "coreboot" as input platform (but maintain
5861 compatibility with "linuxbios").
5862 * include/grub/i386/linuxbios: Renamed to ...
5863 * include/grub/i386/coreboot: ... this.
5864
20011694 58652008-07-17 Bean <bean123ch@gmail.com>
5866
5867 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 5868 (appleldr_mod_SOURCE): New variable.
20011694 5869 (appleldr_mod_CFLAGS): Likewise.
5870 (appleldr_mod_LDFLAGS): Likewise.
5871 (pci_mod_SOURCES): Likewise.
5872 (pci_mod_CFLAGS): Likewise.
5873 (pci_mod_LDFLAGS): Likewise.
5874 (lspci_mod_SOURCES): Likewise.
5875 (lspci_mod_CFLAGS): Likewise.
5876 (lspci_mod_LDFLAGS): Likewise.
5877
5878 * conf/x86_64-efi.rmk: New file.
5879
5880 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5881 macro.
5882 (grub_efidisk_write): Likewise.
5883
5884 * include/efi/api.h (efi_call_0): New macro.
5885 (efi_call_1): Likewise.
5886 (efi_call_2): Likewise.
5887 (efi_call_3): Likewise.
5888 (efi_call_4): Likewise.
5889 (efi_call_5): Likewise.
5890 (efi_call_6): Likewise.
5891
5892 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5893 grub_rescue_cmd_chainloader.
5894
5895 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5896 (grub_pe32_optional_header): Change some fields based on i386 or
5897 x86_64 platform.
5898 (GRUB_PE32_PE32_MAGIC): Likewise.
5899
5900 * include/grub/efi/uga_draw.h: New file.
5901
5902 * include/grub/elf.h (STN_ABS): New constant.
5903 (R_X86_64_NONE): Relocation constant for x86_64.
5904 (R_X86_64_64): Likewise.
5905 (R_X86_64_PC32): Likewise.
5906 (R_X86_64_GOT32): Likewise.
5907 (R_X86_64_PLT32): Likewise.
5908 (R_X86_64_COPY): Likewise.
5909 (R_X86_64_GLOB_DAT): Likewise.
5910 (R_X86_64_JUMP_SLOT): Likewise.
5911 (R_X86_64_RELATIVE): Likewise.
5912 (R_X86_64_GOTPCREL): Likewise.
5913 (R_X86_64_32): Likewise.
5914 (R_X86_64_32S): Likewise.
5915 (R_X86_64_16): Likewise.
5916 (R_X86_64_PC16): Likewise.
5917 (R_X86_64_8): Likewise.
5918 (R_X86_64_PC8): Likewise.
5919
5920 * include/grub/i386/efi/pci.h: New file.
5921
5922 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5923 Change it value based on platform.
5924 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5925 (GRUB_E820_RAM): Likewise.
5926 (GRUB_E820_RESERVED): Likewise.
5927 (GRUB_E820_ACPI): Likewise.
5928 (GRUB_E820_NVS): Likewise.
5929 (GRUB_E820_EXEC_CODE): Likewise.
5930 (GRUB_E820_MAX_ENTRY): Likewise.
5931 (grub_e820_mmap): New structure.
5932 (linux_kernel_header): Change the efi field according to different
5933 kernel version, also field from linux_kernel_header.
5934
5935 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5936
5937 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5938 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5939 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5940 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5941 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5942 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5943 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5944 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5945 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5946 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5947
5948 * include/grub/x86_64/efi/kernel.h: New file.
5949
5950 * include/grub/x86_64/efi/loader.h: Likewise.
5951
5952 * include/grub/x86_64/efi/machine.h: Likewise.
5953
5954 * include/grub/x86_64/efi/pci.h: Likewise.
5955
5956 * include/grub/x86_64/efi/time.h: Likewise.
5957
5958 * include/grub/x86_64/linux.h: Likewise.
5959
5960 * include/grub/x86_64/setjmp.h: Likewise.
5961
5962 * include/grub/x86_64/time.h: Likewise.
5963
5964 * include/grub/x86_64/types.h: Likewise.
5965
5966 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5967 GRUB_TARGET_SIZEOF_VOID_P.
5968
5969 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5970 (grub_efi_locate_handle): Likewise.
5971 (grub_efi_open_protocol): Likewise.
5972 (grub_efi_set_text_mode): Likewise.
5973 (grub_efi_stall): Likewise.
5974 (grub_exit): Likewise.
5975 (grub_reboot): Likewise.
5976 (grub_halt): Likewise.
5977 (grub_efi_exit_boot_services): Likewise.
5978 (grub_get_rtc): Likewise.
5979
5980 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5981 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5982 (grub_efi_allocate_pages): Wrap efi calls.
5983 (grub_efi_free_pages): Wrap efi calls.
5984 (grub_efi_get_memory_map): Wrap efi calls.
5985
5986 * kern/x86_64/dl.c: New file.
5987
5988 * kern/x86_64/efi/callwrap.S: Likewise.
5989
5990 * kern/x86_64/efi/startup.S: Likewise.
5991
5992 * loader/efi/appleloader.c: Likewise.
5993
5994 * loader/efi/chainloader.c (cmdline): New variable.
5995 (grub_chainloader_unload): Wrap efi calls.
5996 (grub_chainloader_boot): Likewise.
5997 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5998 command line.
5999
6000 * loader/efi/chainloader_normal.c (chainloader_command):
6001 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6002 command line.
6003
6004 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6005 method.
6006 (grub_e820_add_region): New function.
6007 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6008 booting.
6009 (grub_find_video_card): New function.
6010 (grub_linux_setup_video): New function.
6011 (grub_rescue_cmd_linux): Probe for video information.
6012
6013 * normal/x86_64/setjmp.S: New file.
6014
6015 * term/efi/console.c (map_char): New function.
6016 (grub_console_putchar): Map unicode char.
6017 (grub_console_checkkey): Wrap efi calls.
6018 (grub_console_getkey): Likewise.
6019 (grub_console_getwh): Likewise.
6020 (grub_console_gotoxy): Likewise.
6021 (grub_console_cls): Likewise.
6022 (grub_console_setcolorstate): Likewise.
6023 (grub_console_setcursor): Likewise.
6024
6025 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6026
59652a20 60272008-07-16 Pavel Roskin <proski@gnu.org>
6028
ef294055 6029 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6030 format strings.
6031
59652a20 6032 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6033 pointer, not an integer. This fixes a warning and prevents
6034 precision loss on 64-bit systems.
6035 (relocate_addresses): Remove unneeded cast.
6036
afc3b5d7 60372008-07-15 Pavel Roskin <proski@gnu.org>
6038
506b2b3e 6039 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6040
62ead89c 6041 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6042
c4cd51d7 6043 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6044 Fix comparison between signed and unsigned.
6045
0d3d8f28 6046 * include/grub/i386/ieee1275/console.h: Declare
6047 grub_console_init() and grub_console_fini().
6048
8804b286 6049 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6050 It's empty and unused.
6051
ee01cf35 6052 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6053 beginning to avoid warnings with some compilers.
6054
afc3b5d7 6055 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6056 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6057
e4e8eaa5 60582008-07-14 Pavel Roskin <proski@gnu.org>
6059
407aceb4 6060 * kern/env.c (grub_register_variable_hook): Don't copy empty
6061 string, it leaks memory. Pass "" to grub_env_set(), it should
6062 handle constant strings.
6063
e4e8eaa5 6064 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6065 * commands/cmp.c (grub_cmd_cmp): Likewise.
6066 * kern/dl.c (grub_dl_flush_cache): Likewise.
6067 (grub_dl_load_core): Likewise.
6068 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6069 (grub_elf64_load_phdrs): Likewise.
6070
d4e2dad3 60712008-07-13 Pavel Roskin <proski@gnu.org>
6072
6073 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6074 between signed and unsigned.
6075 (LzmaEnc_Finish): Fix warning about an unused parameter.
6076
aa24b516 60772008-07-13 Bean <bean123ch@gmail.com>
6078
6079 * Makefile.in (enable_lzo): New rule.
6080
6081 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6082
6083 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6084
6085 * boot/i386/pc/lnxboot.S: #include <config.h>.
6086
6087 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 6088 its value according to the compression algorithm used, lzo or lzma.
aa24b516 6089
6090 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6091 compression algorithm according to configure macro.
6092
6093 * kern/i386/pc/startup.S (codestart): Likewise.
6094
6095 * kern/i386/pc/lzma_decode.S: New file.
6096
6097 * include/grub/lib/LzFind.h: Likewise.
6098
6099 * include/grub/lib/LzHash.h: Likewise.
6100
6101 * include/grub/lib/LzmaDec.h: Likewise.
6102
6103 * include/grub/lib/LzmaEnc.h: Likewise.
6104
6105 * include/grub/lib/LzmaTypes.h: Likewise.
6106
6107 * lib/LzFind.c: Likewise.
6108
6109 * lib/LzmaDec.c: Likewise.
6110
6111 * lib/LzmaEnc.c: Likewise.
6112
4ae821ac 61132008-07-13 Bean <bean123ch@gmail.com>
6114
6115 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6116 (grub_ext4_extent_header): New structure.
6117 (grub_ext4_extent): Likewise.
6118 (grub_ext4_extent_idx): Likewise.
6119 (grub_ext4_find_leaf): New function.
6120 (grub_ext2_read_block): Handle extents.
6121
9a745147 61222008-07-12 Robert Millan <rmh@aybabtu.com>
6123
6124 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6125
d49a4cf6 61262008-07-11 Robert Millan <rmh@aybabtu.com>
6127
6128 * util/grub.d/40_custom.in: New file. Example on how to add custom
6129 entries to /etc/grub.d.
6130 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6131 40_custom (implicitly, by merging all the grub.d rules).
6132
947414b4 61332008-07-11 Pavel Roskin <proski@gnu.org>
6134
0059cf6f 6135 * commands/read.c (grub_getline): Fix invalid memory access.
6136 Don't add newline to the variable value.
6137
947414b4 6138 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6139 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6140 (serial_hw_get_port): Check validity of the port number.
6141 (grub_cmd_serial): Check return value of serial_hw_get_port().
6142
62a02d00 61432008-07-07 Pavel Roskin <proski@gnu.org>
6144
6145 * boot/i386/pc/diskboot.S (notification_string): Replace
6146 "Loading kernel" with just "loading". This is shorter, less
6147 confusing and saves a few bytes for possible future changes.
6148
3e5581b0 61492008-07-05 Pavel Roskin <proski@gnu.org>
6150
ea387a48 6151 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6152 size for ATAPI devices, they are undefined. Output sector
6153 number in decimal form.
6154
3e5581b0 6155 * disk/ata.c: Use named constants for status bits.
6156
fdecb8fd 61572008-07-04 Pavel Roskin <proski@gnu.org>
6158
bcd35b90 6159 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6160 grub_addr_t before casting it to the void pointer to fix a
6161 warning. Non-addressable regions are discarded earlier.
6162 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6163 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6164 (check_signature): Don't shadow table_header.
6165 (grub_linuxbios_table_iterate): Cast numeric constants to
6166 grub_linuxbios_table_header_t.
6167 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6168 grub_stop().
6169
af58ab3d 6170 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6171 prevent warnings.
6172
1759aa57 6173 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6174 pointer, which can cause warnings. Support 64-bit addresses.
6175
fdecb8fd 6176 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6177 of sizeof(long). This fixes PowerPC image generation on x86_64.
6178
8516d2a8 61792008-07-04 Robert Millan <rmh@aybabtu.com>
6180
6181 This fixes a performance issue when pc & gpt partmap iterators
6182 didn't abort iteration even after our hook found what it was
fe987087 6183 looking for (often causing expensive probes of non-existent drives).
8516d2a8 6184
6185 Some callers relied on previous buggy behaviour, since they would
34c44600 6186 raise an error when their own hooks caused early abortion of its
8516d2a8 6187 iteration.
6188
6189 * kern/device.c (grub_device_open): Improve error message.
6190 * disk/lvm.c (grub_lvm_open): Likewise.
6191 * disk/raid.c (grub_raid_open): Likewise.
6192
6193 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6194 when hook requests it, independently of grub_errno.
6195 (pc_partition_map_probe): Do not fail when find_func() caused
6196 early abortion of pc_partition_map_iterate().
6197
6198 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6199 when hook requests it, independently of grub_errno.
6200 (gpt_partition_map_probe): Do not fail when find_func() caused
6201 early abortion of gpt_partition_map_iterate().
6202
6203 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6204 when hook requests it, independently of grub_errno. Do not fail when
6205 part_map_iterate_hook() caused early abortion of p->iterate().
6206
6207 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6208 when grub_partition_iterate() returned with non-zero.
6209
277d0de9 62102008-07-03 Pavel Roskin <proski@gnu.org>
6211
6212 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6213 like we do in grub_ata_pio_read().
6214 (grub_ata_readwrite): Always write individual sectors. Fix the
6215 sector count for the remainder.
6216 (grub_ata_write): Enable writing to ATA devices. Correctly
6217 report error for ATAPI devices.
6218
d4c9b428 62192008-07-02 Pavel Roskin <proski@gnu.org>
6220
e43fc690 6221 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6222 warning.
6223
f707af42 6224 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6225 for every read sector, we already increment it for the whole
6226 batch. This fixes reading more than 256 sectors at once.
6227
11e16b15 6228 * util/grub-editenv.c (cmd_info): Cast argument to long
6229 explicitly. ptrdiff_t reduces to int on i386.
6230
cbabfdd4 6231 * util/grub-editenv.c (main): Be specific which parameter is
6232 missing.
6233
b8fbce0a 6234 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6235 (memdisk): Make memdisk_orig_addr a pointer.
6236
c9c8e606 6237 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6238 for file offsets, use grub_off_t instead. Fix printf format
6239 warnings.
6240
ca62e598 6241 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6242 there. Real unexpected warnings should not drown in the noise
6243 about known problems.
6244
ce8d1766 6245 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6246 grub_disk_addr_t for memory addresses.
6247
00c7a56a 6248 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6249 explicitly to fix a warning.
6250
08d3ef09 6251 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6252
cb71ba20 6253 * Makefile.in (MODULE_LDFLAGS): New variable.
6254 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6255 the linker accepts --build-id=none.
6256 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6257 MODULE_LDFLAGS.
6258 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6259
d4c9b428 6260 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6261 those in Linux XFS code. Provide a way to access 64-bit parent
6262 inode.
6263 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6264 the end of struct grub_xfs_dir_header.
6265
d4156eee 62662008-07-02 Bean <bean123ch@gmail.com>
6267
6268 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6269 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6270 and GRUB_IEEE1275_FLAG_NO_ANSI.
6271
6272 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6273 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6274 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6275
6276 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6277 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6278
6279 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6280 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6281
6282 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6283 esc sequence on non ANSI terminal.
6284 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6285
6286 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6287 beginning of file.
6288
2270f77b 62892008-07-02 Bean <bean123ch@gmail.com>
6290
6291 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6292 (grub_editenv_SOURCES): New variable.
6293 (pkglib_MODULES): Add loadenv.mod.
6294 (loadenv_mod_SOURCES): New variable.
6295 (loadenv_mod_CFLAGS): Likewise.
6296 (loadenv_mod_LDFLAGS): Likewise.
6297
6298 * include/grub/envblk.h: New file.
6299
6300 * util/envblk.c: New file.
6301
6302 * util/grub-editenv.c: New file.
6303
6304 * commands/loadenv.c: New file.
6305
0e9e51ec 63062008-07-01 Pavel Roskin <proski@gnu.org>
6307
d89b7634 6308 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6309 not unsigned char. This fixes warnings and is consistent with
6310 other tags.
6311
bf1835b1 6312 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6313
8222a04b 6314 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6315
6a42d99d 6316 * term/tparm.c (analyze): Always set *popcount.
6317
10b159d1 6318 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6319 cast to fix a warning.
6320
b8789f6c 6321 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6322 cast to suppress a warning.
6323
29d7e38a 6324 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6325 grub_fshelp_read_file() expects.
6326
f341f669 6327 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6328 write uuid as a 32-bit value in CPU byte order, so declare and
6329 use it as such.
6330
0e9e51ec 6331 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6332 long if the format specifier expects it.
6333 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6334 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6335 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6336 long to fix a warning.
6337 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6338 grub_dprintf() arguments to fix warnings.
6339
3aefa857 63402008-06-30 Pavel Roskin <proski@gnu.org>
6341
56c7668b 6342 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6343 install_bsd_part immediately before core.img is embedded or
6344 modified on disk. This fixes core.img verification if core.img
6345 cannot be embedded.
6346
3aefa857 6347 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6348 core_path to calculate the blocklist.
6349 Patch from Javier Martín <lordhabbit@gmail.com>
6350
5444088d 63512008-06-29 Robert Millan <rmh@aybabtu.com>
6352
6353 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6354 block to disk block.
6355 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6356 Patch from Niels Böhm <bitbucket@arcor.de>
6357
674835c8 63582008-06-29 Robert Millan <rmh@aybabtu.com>
6359
6360 * util/update-grub_lib.in (font_path): Search for fonts in
6361 /boot/grub first, which is more likely to be readable (we aren't
6362 deciding where fonts live, just looking for them).
6363
f527dbc8 63642008-06-26 Pavel Roskin <proski@gnu.org>
6365
6c2d8df6 6366 * util/biosdisk.c (read_device_map): Don't leave dead map
6367 entries for devices failing stat() check.
6368
f527dbc8 6369 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6370 core_path_dev for the core.img path on the target device.
6371
aebe3d13 63722008-06-26 Robert Millan <rmh@aybabtu.com>
6373
6374 * disk/fs_uuid.c: New file.
6375 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6376 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6377 (fs_uuid_mod_LDFLAGS): New variables.
6378 * include/grub/disk.h (grub_disk_dev_id): Add
6379 `GRUB_DISK_DEVICE_UUID_ID'.
6380 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6381 implement iterate().
6382
37aaf354 63832008-06-26 Robert Millan <rmh@aybabtu.com>
6384
6385 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6386 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6387 Linux image includes no initrd.
6388
25ff262a 63892008-06-21 Javier Martín <lordhabbit@gmail.com>
6390
6391 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6392 call to resolve the core image location that effectively appended the
6393 name twice.
6394
76a2bd44 63952008-06-21 Robert Millan <rmh@aybabtu.com>
6396
6397 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6398 call from here ...
6399
6400 * util/grub.d/10_hurd.in: ... to here ...
6401 * util/grub.d/10_linux.in: ... and here.
6402
650e1c79 64032008-06-19 Robert Millan <rmh@aybabtu.com>
6404
fe987087 6405 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 6406 after it has been set by grub_machine_set_prefix().
6407
6ce63911 64082008-06-19 Robert Millan <rmh@aybabtu.com>
6409
6410 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6411 search result when not saving to variable, not the other way around.
6412 When saving to variable, abort iteration as soon as a match is found.
6413
73940cec 64142008-06-19 Robert Millan <rmh@aybabtu.com>
6415
6416 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6417 check for partition that provides /boot/grub. Its logic is flawed,
6418 as it prevents prepare_grub_to_access_device() from being called
6419 multiple times.
6420
3c62a39d 64212008-06-19 Robert Millan <rmh@aybabtu.com>
6422
6423 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6424 "insmod" command directly when abstraction modules are needed,
fe987087 6425 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 6426 since it had already been processed).
6427
47395a42 64282008-06-19 Pavel Roskin <proski@gnu.org>
6429
6430 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6431 changed. This is needed in case GRUB_LIBDIR changes.
6432 * conf/i386-ieee1275.rmk: Likewise.
6433 * conf/i386-linuxbios.rmk: Likewise.
6434 * conf/i386-pc.rmk: Likewise.
6435 * conf/powerpc-ieee1275.rmk: Likewise.
6436
a145ac2d 64372008-06-18 Pavel Roskin <proski@gnu.org>
6438
6439 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6440 kernel_elf_symlist.c to symlist.c for consistency with other
6441 architectures. Update all users.
6442 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6443
7847c51e 64442008-06-18 Robert Millan <rmh@aybabtu.com>
6445
6446 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6447 it in prefix.
6448
6449 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6450 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6451 a RAID device, run setup() for all members independently on whether
6452 LVM abstraction is being used.
6453 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6454 If grub-mkimage has set `*install_dos_part == -2', don't override this
6455 value.
6456 Perform *install_dos_part adjustments independently on whether
6457 we're embedding or not.
6458 Clarify error message when image is too big for embedding.
6459 Remove duplicate *install_dos_part stanza.
6460
b23e5644 64612008-06-17 Robert Millan <rmh@aybabtu.com>
6462
6463 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6464 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6465 variables.
6466 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6467 values in grub_ofconsole_normal_color and
6468 grub_ofconsole_highlight_color (they're not directly related to
6469 background and foreground).
6470 (grub_ofconsole_setcolorstate): Extract background and foreground
6471 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6472
0aac2f79 64732008-06-17 Robert Millan <rmh@aybabtu.com>
6474
6475 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6476 /boot/grub for the check in last commit, not /boot (they could be
6477 different partitions).
6478
3cca7ef3 64792008-06-16 Robert Millan <rmh@aybabtu.com>
6480
6481 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6482 asked to setup access for the same partition that provides /boot,
6483 don't bother using UUIDs since our root already has the value we
6484 want.
6485
347396d8 64862008-06-16 Robert Millan <rmh@aybabtu.com>
6487
6488 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6489 I2O devices.
6490 Patch from Sven Mueller <sven@debian.org>.
6491
991477f8 64922008-06-16 Robert Millan <rmh@aybabtu.com>
6493
6494 * util/update-grub.in: Check for $EUID instead of $UID.
6495 Reported by Vincent Zweije.
6496
d31a32a1 64972008-06-16 Bean <bean123ch@gmail.com>
6498
fe987087 6499 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 6500 (grub_ext2_read_block): Likewise.
6501 (grub_ext2_read_inode): Likewise.
6502 (grub_ext2_mount): Likewise.
6503 (grub_ext2_close): Likewise.
6504 (grub_ext3_get_journal): Removed.
6505
fe987087 6506 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 6507 (grub_reiserfs_read_symlink): Likewise.
6508 (grub_reiserfs_mount): Likewise.
6509 (grub_reiserfs_open): Likewise.
6510 (grub_reiserfs_read): Likewise.
6511 (grub_reiserfs_close): Likewise.
6512 (grub_reiserfs_get_journal): Removed.
6513
6514 * fs/fshelp.c (grub_fshelp_read): Removed.
6515 (grub_fshelp_map_block): Likewise.
6516
6517 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6518 (grub_fshelp_journal): Likewise.
6519 (grub_fshelp_read): Likewise.
6520 (grub_fshelp_map_block): Likewise.
6521
3540a760 65222008-06-16 Pavel Roskin <proski@gnu.org>
6523
6524 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6525 floating point anymore.
6526 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6527
95614c84 65282008-06-15 Pavel Roskin <proski@gnu.org>
6529
6530 * commands/ls.c (grub_ls_list_files): Use integer calculations
6531 for human readable format, avoid floating point use.
6532 * kern/misc.c (grub_ftoa): Remove.
6533 (grub_vsprintf): Remove floating point support.
6534
50465dd6 65352008-06-15 Robert Millan <rmh@aybabtu.com>
6536
fe6b695a 6537 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 6538 devices.
6539 Reported by Max Vozeler.
6540
a9207284 65412008-06-15 Robert Millan <rmh@aybabtu.com>
6542
6543 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6544 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6545 skipped later.
6546 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6547 the beginning of the prefix.
6548
6549 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6550 It is assumed that if we have a memdisk, grub-mkimage has set
6551 grub_prefix to include the "(memdisk)" drive in it.
6552
a7cbd45a 65532008-06-15 Robert Millan <rmh@aybabtu.com>
6554
6555 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6556 Initialize keyboard controller after registering the terminal, so that
6557 grub_printf() can be called from grub_keyboard_controller_init().
6558
21cf716a 65592008-06-15 Robert Millan <rmh@aybabtu.com>
6560
6561 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6562 extent-btree which is written as big endian on disk.
6563 Reported by Alain Greppin <al@chilibi.org>.
6564
23a64d8e 65652008-06-14 Robert Millan <rmh@aybabtu.com>
6566
6567 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6568 * util/i386/pc/grub-install.in (modules): Likewise.
6569
d687651c 65702008-06-13 Pavel Roskin <proski@gnu.org>
6571
6572 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6573
dfe9ddd4 65742008-06-13 Bean <bean123ch@gmail.com>
6575
6576 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6577
6578 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6579
6580 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6581 to indicate sparse block.
6582
16ae7781 65832008-06-12 Pavel Roskin <proski@gnu.org>
6584
e6d1a308 6585 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6586 number, grub_fshelp_read() does it for us.
6587
16ae7781 6588 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6589 linear disk read with journal translation.
6590 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6591 * include/grub/fshelp.h: Declare grub_fshelp_read().
6592
40fd3a2b 65932008-06-09 Pavel Roskin <proski@gnu.org>
6594
6595 * fs/minix.c (grub_minix_mount): Handle error reading
6596 superblock.
6597
f5679726 65982008-06-08 Robert Millan <rmh@aybabtu.com>
6599
6600 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6601 don't append the RAID prefix afterwards.
6602 Reported by Clint Adams.
6603
ce525529 66042008-06-08 Robert Millan <rmh@aybabtu.com>
6605
6606 Based on description from Pavel:
6607 * kern/disk.c (grub_disk_check_range): Rename to ...
6608 (grub_disk_adjust_range): ... this. Add a comment explaining the
6609 tasks performed by this function.
6610
ad4936a0 66112008-06-08 Robert Millan <rmh@aybabtu.com>
6612
6613 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6614 `num_serial' (for consistency with other variables).
6615 (struct grub_ntfs_data): Add `uuid' member.
6616 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6617 (grub_ntfs_uuid): New function.
6618 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6619
dc20b0f9 66202008-06-07 Pavel Roskin <proski@gnu.org>
6621
6622 * util/biosdisk.c (open_device): Revert last change to the
6623 function, it broke installation. The sector needs to be
6624 different dependent on which device is opened.
6625
c5e3cfba 66262008-06-06 Robert Millan <rmh@aybabtu.com>
6627
6628 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6629 rest of GRUB, and breakage doesn't happen if its value were modified.
6630
6631 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6632 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6633 a constant (same value).
6634 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6635 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6636
26a1f8c4 66372008-06-06 Robert Millan <rmh@aybabtu.com>
6638
6639 * util/biosdisk.c (open_device): Do not modify sector offset when
6640 accessing a partition. kern/disk.c already handles this for us.
6641
25d6b327 66422008-06-06 Robert Millan <rmh@aybabtu.com>
6643
6644 * util/grub-emu.c (grub_machine_init): Move code in this function from
6645 here ...
6646 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6647 segfault in case grub_printf() is called).
6648
6649 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6650 grub_probe. Update all users not to explicitly add it again.
6651 (grub_device): New variable; contains corresponding device for grubdir.
6652 (fs_module, partmap_module, devabstraction_module): Pass
6653 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6654 every time.
6655
9ece62fb 66562008-06-05 Robert Millan <rmh@aybabtu.com>
6657
6658 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6659 is found, print it (same layout as with labels).
6660
1ad36d37 66612008-06-04 Robert Millan <rmh@aybabtu.com>
6662
6663 * util/biosdisk.c (get_drive): Rename to ...
6664 (find_grub_drive): ... this. Update all users.
6665
6666 (get_os_disk): Rename to ...
6667 (convert_system_partition_to_system_disk): ... this. Update all users.
6668
6669 (find_drive): Rename to ...
6670 (find_system_device): ... this. Update all users.
6671
e6a30859 66722008-06-04 Robert Millan <rmh@aybabtu.com>
6673
6674 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6675 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6676 (make_device_map): Likewise.
6677
00c108a4 66782008-06-01 Robert Millan <rmh@aybabtu.com>
6679
6680 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6681 before dereferencing it.
6682
6683 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6684 union with fat12/fat16-specific ones. Add some new fields, including
6685 `num_serial' for both versions.
6686 (struct grub_fat_data): Add `uuid' member.
6687 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6688 names. Initialize `data->uuid' using `num_serial'.
6689 (grub_fat_uuid): New function.
6690 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6691
6692 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6693 (grub_reiserfs_uuid): New function.
6694 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6695 member.
6696
6697 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6698 (grub_xfs_uuid): New function.
6699 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6700
1385c5bb 67012008-06-01 Robert Millan <rmh@aybabtu.com>
6702
6703 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6704 code that is backward compatible with pre-uuid search command.
6705
c682dfd7 67062008-05-31 Robert Millan <rmh@aybabtu.com>
6707
6708 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6709 floppies after everything else, to ensure floppy drive isn't accessed
6710 unnecessarily (patch from Bean).
6711
b7db5d47 67122008-05-31 Robert Millan <rmh@aybabtu.com>
6713
6714 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6715 not print device names when we were asked to set a variable.
6716
6e037aa9 67172008-05-31 Robert Millan <rmh@aybabtu.com>
6718
6719 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6720 using "cursor-on" and "cursor-off" commands (understood at least by
6721 the Open Firmware flavour on OLPC).
6722
41305bc8 67232008-05-31 Michael Gorven <michael@gorven.za.net>
6724
6725 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6726 on and off sequences.
6727
69ba137e 67282008-05-31 Robert Millan <rmh@aybabtu.com>
6729
6730 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6731 * util/update-grub.in: Likewise.
6732
520ae21b 67332008-05-30 Pavel Roskin <proski@gnu.org>
6734
6735 * util/biosdisk.c (linux_find_partition): Simplify logic and
6736 make the code more universal. Keep special processing for
6737 devfs, but use a simple rule for all other devices. If the
6738 device ends with a number, append 'p' and the partition number.
6739 Otherwise, append only the partition number.
6740
5786569b 67412008-05-30 Robert Millan <rmh@aybabtu.com>
6742
6743 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6744 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6745 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6746 the `root' parameter to Linux.
6747
51500452 67482008-05-30 Robert Millan <rmh@aybabtu.com>
6749
6750 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6751 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6752 --fs_uuid with --fs-uuid.
6753 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6754 all filesystems support them).
6755
811d3878 67562008-05-30 Robert Millan <rmh@aybabtu.com>
6757
6758 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6759 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6760
cab63c95 67612008-05-30 Robert Millan <rmh@aybabtu.com>
6762
6763 * util/grub.d/00_header.in: Remove obsolete comment referencing
6764 convert_system_path_to_grub_path().
6765 * util/update-grub.in: Likewise.
6766 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6767 (convert_system_path_to_grub_path): Add a warning message explaining
6768 that this function is deprecated. Rely on is_path_readable_by_grub()
6769 for the readability checks.
6770 (font_path): Use is_path_readable_by_grub() for the readability
6771 check rather than convert_system_path_to_grub_path().
6772
972e2f7a 67732008-05-30 Robert Millan <rmh@aybabtu.com>
6774
6775 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6776 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6777 converting it first.
6778 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6779 grub.cfg for access to font file, and afterwards call it again to set
6780 the root device.
6781
62191274 67822008-05-30 Robert Millan <rmh@aybabtu.com>
6783
6784 * commands/search.c (options): Add --fs_uuid option.
6785 (search_fs_uuid): New function.
6786 (grub_cmd_search): Fix --set argument passing.
6787 Use search_fs_uuid() when requested via --fs_uuid.
6788 (grub_search_init): Update help message.
6789 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6790 and redeclare it as an array of 16-bit words.
6791 (grub_ext2_uuid): New function.
6792 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6793 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6794 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6795 (GRUB_DEVICE_BOOT_UUID): New variables.
6796 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6797 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6798 whenever possible.
6799 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6800 just assume `root' variable has the right value.
6801 * util/grub.d/10_linux.in: Likewise.
6802 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6803 via PRINT_FS_UUID.
6804 (main): Recognise `-t fs_uuid' argument.
6805
01b73ec8 68062008-05-30 Robert Millan <rmh@aybabtu.com>
6807
6808 * util/biosdisk.c (map): Redefine structure to hold information
6809 about GRUB drive name.
fe6b695a 6810 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6811 drive names.
6812 (call_hook): Remove.
6813 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6814 member. Assume drive has partitions.
6815 (grub_util_biosdisk_open): Access device names via `.device' struct
6816 member.
6817 (open_device): Likewise.
6818 (find_drive): Likewise.
6819 (read_device_map): Adjust map[] usage to match the new struct
6820 definition. Don't check for duplicates (still possible, but not cheap
6821 anymore).
6822 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6823 (make_device_name): Remove assumption of BIOS-like drive names.
6824
22f16596 68252008-05-30 Pavel Roskin <proski@gnu.org>
6826
6827 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6828 compiling execute.c doesn't need grub_script.tab.h anymore.
6829 (normal/command.c_DEPENDENCIES): Likewise.
6830 (normal/function.c_DEPENDENCIES): Likewise.
6831 * conf/i386-ieee1275.rmk: Likewise.
6832 * conf/i386-linuxbios.rmk: Likewise.
6833 * conf/i386-pc.rmk: Likewise.
6834 * conf/powerpc-ieee1275.rmk: Likewise.
6835 * conf/sparc64-ieee1275.rmk: Likewise.
6836
528ad8f2 68372008-05-29 Pavel Roskin <proski@gnu.org>
6838
d1dff95d 6839 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6840 when scanning metadata for volume group name.
6841
528ad8f2 6842 * include/grub/script.h: Don't include grub_script.tab.h. It's
6843 a generated file, which may only be included from the files with
6844 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6845 use union YYSTYPE, as the later allows forward declaration.
6846 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6847
47248e08 68482008-05-29 Robert Millan <rmh@aybabtu.com>
6849
6850 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6851 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6852 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6853 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6854 scan codes.
6855
ee632529 68562008-05-29 Robert Millan <rmh@aybabtu.com>
6857
6858 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6859 control key combinations.
6860
eee96e08 68612008-05-29 Robert Millan <rmh@aybabtu.com>
6862
6863 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6864 * util/ieee1275/grub-install.in: ... to here.
6865 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6866 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6867 (grub_install_SOURCES): Likewise.
6868
da9a6a94 68692008-05-29 Robert Millan <rmh@aybabtu.com>
6870
6871 * fs/affs.c: Update copyright year.
6872 * fs/ext2.c: Likewise.
6873 * fs/fshelp.c: Likewise.
6874 * fs/hfsplus.c: Likewise.
6875 * fs/ntfs.c: Likewise.
6876 * fs/xfs.c: Likewise.
6877 * include/grub/fshelp.h: Likewise.
6878 * util/grub-mkdevicemap.c: Likewise.
6879
12e65f3a 68802008-05-28 Robert Millan <rmh@aybabtu.com>
6881
6882 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6883 might need to be fatfs to support some firmware implementations
6884 (e.g. OFW or EFI).
6885
23023641 68862008-05-28 Robert Millan <rmh@aybabtu.com>
6887
6888 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6889 devices.
6890 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6891 (make_device_map): Likewise.
6892
887d2619 68932008-05-20 Bean <bean123ch@gmail.com>
6894
6895 * fs/fshelp.c (grub_fshelp_map_block): New function.
6896 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6897 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6898
6899 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6900 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6901 (grub_fshelp_journal): New structure.
6902 (grub_fshelp_map_block): New function prototype.
6903 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6904 (grub_fshelp_map_block): Likewise.
6905
6906 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6907 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6908 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6909 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6910 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6911 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6912 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6913 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6914 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6915 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6916 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6917 (grub_ext2_sblock): New members for journal support.
6918 (grub_ext3_journal_header): New structure.
6919 (grub_ext3_journal_revoke_header): Likewise.
6920 (grub_ext3_journal_block_tag): Likewise.
6921 (grub_ext3_journal_sblock): Likewise.
6922 (grub_fshelp_node): New members logfile and journal.
6923 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6924 grub_fshelp_map_block to get real block number.
6925 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6926 number.
6927 (grub_ext2_read_inode): Likewise.
6928 (grub_ext3_get_journal): New function.
6929 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6930 (grub_ext2_close): Release memory used by journal.
6931
6932 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6933 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6934 (grub_reiserfs_transaction_header): Renamed to
6935 grub_reiserfs_description_block, replace field data with real_blocks.
6936 (grub_reiserfs_commit_block): New structure.
6937 (grub_reiserfs_data): New member journal.
6938 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6939 number.
6940 (grub_reiserfs_read_symlink): Likewise.
6941 (grub_reiserfs_iterate_dir): Likewise.
6942 (grub_reiserfs_open): Likewise.
6943 (grub_reiserfs_read): Likewise.
6944 (grub_reiserfs_get_journal): New function.
6945 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6946 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6947 using grub_reiserfs_get_journal.
6948 (grub_reiserfs_close): Release memory used by journal.
6949
6950 * fs/affs.c (grub_affs_read_block): Change block type to
6951 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6952
6953 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6954
6955 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6956
6957 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6958
6959 * fs/udf.c (grub_udf_read_block): Change block type to
6960 grub_disk_addr_t. Use type cast to avoid warning.
6961
6962 * fs/xfs.c (grub_xfs_read_block): Likewise.
6963
b7c6bed5 69642008-05-16 Christian Franke <franke@computer.org>
6965
6966 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6967 to ensure that break with ESC will always work.
6968 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6969 Remove ESC from keyboard queue.
6970
eedf167f 69712008-05-16 Christian Franke <franke@computer.org>
6972
6973 * util/biosdisk.c: [__CYGWIN__] Add includes.
6974 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6975 (get_os_disk): Move variable declarations to OS specific
6976 parts to avoid warning.
6977 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6978 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6979 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6980 Cygwin.
6981 * util/getroot.c: [__CYGWIN__] Add includes.
6982 (strip_extra_slashes): Fix "/" case.
6983 [__CYGWIN__] (get_win32_path): New function.
6984 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6985 [__CYGWIN__] (find_root_device): Disable.
6986 [__CYGWIN__] (get_bootsec_serial): New function.
6987 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6988 [__linux__] (grub_guess_root_device): Add early returns to simplify
6989 structure.
6990 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6991 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6992 check for Linux only.
6993
a079699e 69942008-05-15 Bean <bean123ch@gmail.com>
6995
6996 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6997 keyboard hang problem in apple's intel mac.
6998
1cf4059a 69992008-05-09 Robert Millan <rmh@aybabtu.com>
7000
7001 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7002 devices.
7003 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7004 (make_device_map): Likewise.
7005 Reported by Aurelien Jarno <aurel32@debian.org>
7006
ed759390 70072008-05-07 Ian Campbell <ijc@hellion.org.uk>
7008
7009 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7010 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7011 (make_device_map): Output entries for xvd type disks.
7012
b56c4eaa 70132008-05-07 Robert Millan <rmh@aybabtu.com>
7014
7015 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7016 devices.
7017 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7018 (make_device_map): Likewise.
7019 Reported by Roland Dreier <rdreier@cisco.com>
7020
7f8866ed 70212008-05-07 Robert Millan <rmh@aybabtu.com>
7022
7023 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7024 grub_strstr() call. Correct a few mistakes in failure path handling.
7025
b0346e0f 70262008-05-06 Robert Millan <rmh@aybabtu.com>
7027
7028 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7029 Do not print a trailing slash (therefore, the root directory is an
7030 empty string).
7031 (convert_system_path_to_grub_path): Do not remove trailing slash
7032 from make_system_path_relative_to_its_root() output.
7033
7034 * util/i386/pc/grub-install.in: Add trailing slash to output from
7035 make_system_path_relative_to_its_root().
7036
6cf12cbd 70372008-05-06 Robert Millan <rmh@aybabtu.com>
7038
7039 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7040 ensures that output lines aren't intermangled with those sent to
7041 stderr (via grub_util_info()).
7042 * util/grub-probe.c (grub_refresh): Likewise.
7043 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7044
0fbb3117 70452008-05-05 Christian Franke <franke@computer.org>
7046
7047 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7048 Add Cygwin device names.
7049 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7050 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7051 (check_device): Return error instead of success on empty name.
7052 (make_device_map): Move label inside linux specific code to
7053 prevent compiler warning.
7054
8124cdb7 70552008-04-30 Robert Millan <rmh@aybabtu.com>
7056
7057 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7058 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7059 first boot option.
7060 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7061
094c01d0 70622008-04-29 Robert Millan <rmh@aybabtu.com>
7063
7064 * docs/grub.cfg: New file (example GRUB configuration).
7065
f4b1fc02 70662008-04-26 Robert Millan <rmh@aybabtu.com>
7067
329ce2a5 7068 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7069 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7070 and `disk/ieee1275/nand.c'.
f4b1fc02 7071
25f16ec1 70722008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 7073
25f16ec1 7074 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7075 i386-linuxbios.
7076
7077 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7078 change the buffer size to 4096 for cdrom device.
7079
7080 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7081 and nand.mod.
7082 (_linux_mod_SOURCES): New variable.
7083 (_linux_mod_CFLAGS): Likewise.
7084 (_linux_mod_LDFLAGS): Likewise.
7085 (linux_mod_SOURCES): Likewise.
7086 (linux_mod_CFLAGS): Likewise.
7087 (linux_mod_LDFLAGS): Likewise.
7088 (nand_mod_SOURCES): Likewise.
7089 (nand_mod_CFLAGS): Likewise.
7090 (nand_mod_LDFLAGS): Likewise.
7091
7092 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7093 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7094 type property. (nand device in olpc don't have this property)
7095
7096 * include/grub/disk.h (grub_disk_dev_id): New macro
7097 GRUB_DISK_DEVICE_NAND_ID.
7098
7099 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7100 function prototype.
7101 (grub_rescue_cmd_initrd): Likewise.
7102
7103 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7104 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7105 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7106
25f16ec1 7107 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7108 GRUB_MACHINE_IEEE1275 is defined.
7109
7110 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7111 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7112
7113 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7114 on nested function heap_init.
7115 (grub_upper_mem): New variable for i386-ieee1275.
7116 (grub_get_extended_memory): New function for i386-ieee1275.
7117 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7118
7119 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7120 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7121 property.
f19dbdb7 7122
25f16ec1 7123 * loader/i386/ieee1275/linux.c: New file.
7124
7125 * loader/i386/ieee1275/linux_normal.c: New file.
7126
7127 * disk/ieee1275/nand.c: New file.
7128
e89d61e9 71292008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7130
7131 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7132 value.
7133 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7134
602566f6 71352008-04-18 Robert Millan <rmh@aybabtu.com>
7136
7137 Restructures early code path on ieee1275 to unify grub_main() as
7138 the first C function that is executed in every platform.
7139
7140 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7141 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7142 cmain().
7143 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7144 * kern/ieee1275/cmain.c (cmain): Rename to ...
7145 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7146 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7147 at the beginning.
7148
57490c2b 71492008-04-18 Robert Millan <rmh@aybabtu.com>
7150
7151 * util/update-grub.in: Fix syntax error when setting
7152 `GRUB_PRELOAD_MODULES'.
7153 Reported by Stephane Chazelas <stephane@artesyncp.com>
7154
1977517d 71552008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7156
7157 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7158 section into account, newer toolchains generate unique build ids
7159 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7160 we want build ids to be preserved
1977517d 7161 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7162 far from other sections don't cause the raw binary images grow
7163 size
7164
bfb1f1a2 71652008-04-15 Robert Millan <rmh@aybabtu.com>
7166
7167 * disk/lvm.c: Update copyright year.
7168 * kern/misc.c: Likewise.
7169
01979850 71702008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7171
7172 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 7173 there is no memory left for physical volume name.
01979850 7174
0a1150e2 71752008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7176
7177 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7178 volume name mapping to support bigger than 9 character names properly.
7179
82ead3fe 71802008-04-13 Robert Millan <rmh@aybabtu.com>
7181
7182 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7183 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7184
e54a72f5 71852008-04-13 Christian Franke <franke@computer.org>
7186
7187 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7188 to create a floppy emulation boot CD when non emulation mode
7189 does not work.
7190 Enable Joliet CD filesystem extension.
7191
9fe86034 71922008-04-13 Robert Millan <rmh@aybabtu.com>
7193
7194 * kern/misc.c (grub_strncat): Fix off-by-one error.
7195 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7196
7197 * kern/env.c (grub_env_context_close): Clear current context, not
7198 previous one.
7199 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7200
7201 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7202
7ceeee39 72032008-04-13 Robert Millan <rmh@aybabtu.com>
7204
7205 Improve robustness when handling LVM.
7206
7207 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 7208 (and leave `*p' unmodified).
7ceeee39 7209 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7210 through it.
7211 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7212 iterating through it.
7213 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7214 through it.
fe6b695a 7215 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 7216 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7217 Don't assume `vg->pvs != NULL' when iterating through it.
7218
58cd3d85 72192008-04-13 Robert Millan <rmh@aybabtu.com>
7220
7221 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7222 * genmk.rb (partmap): New variable.
7223 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7224 (#{partmap}): New target rule.
7225 * genpartmaplist.sh: New file.
7226 * Makefile.in (pkglib_DATA): Add partmap.lst.
7227 (partmap.lst): New target rule.
7228 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7229 modules (including all partition maps), instead of preloading them.
7230
78b51059 72312007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7232
7233 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7234 `linux-boot-prober' (if installed) to detect other operating
7235 systems which are installed on the computer and add them to
7236 the boot menu.
7237 * conf/common.rmk: Build and install 30_os-prober.
7238
a91627b4 72392008-04-12 Robert Millan <rmh@aybabtu.com>
7240
7241 * kern/powerpc/ieee1275/init.c: Move from here ...
7242 * kern/ieee1275/init.c: ... to here. Update all users.
7243
7244 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7245 * kern/ieee1275/cmain.c: ... to here. Update all users.
7246
7247 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7248 * kern/ieee1275/openfw.c: ... to here. Update all users.
7249
7250 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7251 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7252
322562ea 72532008-04-10 Pavel Roskin <proski@gnu.org>
7254
7255 * configure.ac: Always use "_cv_" in cache variables for
7256 compatibility with Autoconf 2.62.
7257
a02a73c5 72582008-04-07 Robert Millan <rmh@aybabtu.com>
7259
7260 Revert grub/machine/init.h addition by Pavel (since it breaks on
7261 i386-ieee1275 and others):
7262 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7263 * util/powerpc/ieee1275/misc.c: Likewise.
7264
25c024b1 72652008-04-07 Robert Millan <rmh@aybabtu.com>
7266
7267 * util/grub-probe.c (probe): Improve error message.
7268
3cbd2f98 72692008-04-07 Robert Millan <rmh@aybabtu.com>
7270
7271 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7272 (this prevents the presence of a bogus entry from ruining the whole
7273 thing).
7274
87a297bf 72752008-04-06 Pavel Roskin <proski@gnu.org>
7276
36747a62 7277 * util/biosdisk.c: Include grub/util/biosdisk.h.
7278 * util/grub-fstest.c (execute_command): Make static.
7279 * util/grub-mkdevicemap.c (check_device): Likewise.
7280 * util/i386/pc/misc.c: Include grub/machine/init.h.
7281 * util/powerpc/ieee1275/misc.c: Likewise.
7282 * util/lvm.c: Include grub/util/lvm.h.
7283 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7284 grub/cache.h.
7285 * util/raid.c: Include grub/util/raid.h.
7286 (grub_util_getdiskname): Make static.
7287
87a297bf 7288 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7289 grub_hostfs_fini(), as they are called from grub_init_all() and
7290 grub_fini_all() respectively. This fixes an infinite loop in
7291 grub-fstest due to double registration of hostfs.
7292 Reported by Christian Franke <Christian.Franke@t-online.de>
7293
f6ce7629 72942008-04-05 Pavel Roskin <proski@gnu.org>
7295
7296 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7297 all 8 functions. Otherwise, probe function 0 only.
7298
070e49e4 72992008-04-04 Pavel Roskin <proski@gnu.org>
7300
8b088a4c 7301 * commands/lspci.c (grub_lspci_iter): Print the bus number
7302 correctly.
7303
4f657021 7304 * commands/lspci.c (grub_pci_classes): Fix typos.
7305 (grub_lspci_iter): Don't print func twice. Print vendor ID
7306 before device ID, as it's normally done.
7307
070e49e4 7308 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7309 Fix signedness warnings.
7310 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7311 Likewise.
7312 * util/ieee1275/get_disk_name.c: Include config.h so that
7313 _GNU_SOURCE is defined and getline() is declared. Mark an
7314 unused argument as such. Fix a signedness warning.
7315
ba7328dc 73162008-04-02 Pavel Roskin <proski@gnu.org>
7317
26887f22 7318 * genkernsyms.sh.in: Use more robust assignments for CC and
7319 srcdir. Quote srcdir.
7320 * gensymlist.sh.in: Likewise. Assert at the compile time that
7321 the symbol table is not empty.
7322
ba7328dc 7323 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7324 * fs/cpio.c (grub_cpio_read): Likewise.
7325
0f582c6b 73262008-04-01 Pavel Roskin <proski@gnu.org>
7327
4b6e1995 7328 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7329 * disk/host.c (grub_host_open): Likewise.
7330 * disk/loopback.c (grub_loopback_open): Likewise.
7331 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7332 disk->id as in disk/host.c, not a multi-character constant.
7333
828a2768 7334 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7335 later is obsolete, potentially dangerous and sets a bad example.
7336 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7337 * util/misc.c (grub_util_get_image_size): Likewise.
7338
2bb4fb47 7339 * disk/loopback.c (options): Improve help for "--partitions".
7340
0f582c6b 7341 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7342 options to align them with the short options, e.g. "echo -e".
7343
a33224e0 73442008-03-31 Bean <bean123ch@gmail.com>
7345
7346 * video/reader/png.c (grub_png_data): New member is_16bit and
7347 image_data.
7348 (grub_png_decode_image_header): Detect 16 bit png image.
7349 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7350 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7351 (grub_video_reader_png): Release memory occupied by image_data.
7352
7353 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7354 4096 bytes.
7355 (grub_nfs_mount): Skip the test for sector per cluster.
7356
7357 * include/grub/ntfs.h (MAX_SPC): Removed.
7358
86cb4f54 73592008-03-31 Bean <bean123ch@gmail.com>
7360
7361 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7362 (grub_probe_SOURCES): Add fs/afs.c.
7363 (grub_fstest_SOURCES): Likewise.
7364 (afs_mod_SOURCES): New variable.
7365 (afs_mod_CFLAGS): Likewise.
7366 (afs_mod_LDFLAGS): Likewise.
7367
7368 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7369 (grub_emu_SOURCES): Likewise.
7370
7371 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7372
7373 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7374
7375 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7376
7377 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7378
7379 * fs/afs.c: New file.
7380
17c74c21 73812008-03-30 Pavel Roskin <proski@gnu.org>
7382
4cb68e89 7383 * disk/host.c: Include grub/misc.h to fix a warning.
7384 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7385 warnings about implicit declarations.
7386
8790bb04 7387 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7388 variable.
7389 * include/grub/i386/loader.h: Change declaration of
7390 grub_linux_boot() to match what grub_loader_set() expects.
7391 * util/getroot.c (grub_guess_root_device): Return const char* to
7392 fix a warning.
7393 * util/grub-probe.c (probe): Fix a warning about uninitialized
7394 abstraction_name variable.
7395 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7396 second argument as unused to fix a warning.
7397
9a3f3296 7398 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7399 missing grub_error() call.
7400
0ecef90d 7401 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7402 2.60 and newer uses it to define datadir.
7403
0bf6d401 7404 * commands/sleep.c: Fix warning about implicit declaration.
7405 * disk/memdisk.c: Likewise.
7406 * loader/aout.c: Likewise.
7407 * loader/i386/bsd_normal.c: Likewise.
7408 * util/grub-probe.c: Likewise.
7409
7cdacf97 7410 * commands/i386/cpuid.c (has_longmode): Make static.
7411 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7412 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7413
17c74c21 7414 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7415 GDT. This is more robust, as %ds can change.
7416 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7417 calling real_to_prot().
7418 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7419
80a3e68b 74202008-03-28 Pavel Roskin <proski@gnu.org>
7421
7422 * kern/i386/pc/startup.S: Assert that uncompressed functions
7423 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7424 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7425 code, as they push parts of the code (error handlers) beyond
7426 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7427 code as correctness and size.
7428
77bcd272 74292008-03-28 Pavel Roskin <proski@gnu.org>
7430
7431 * kern/i386/pc/startup.S
7432 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7433 data block address to the real mode, keep offset minimal. This
7434 works around a bug in AWARD BIOS on old Athlon systems, which
7435 makes CD detection hang.
7436
c5dfd43b 74372008-03-26 Pavel Roskin <proski@gnu.org>
7438
7439 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7440 const.
7441 * include/grub/normal.h: Add grub_parse_color_name_pair()
7442 declaration.
7443
bf962df2 74442008-03-24 Bean <bean123ch@gmail.com>
7445
7446 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7447 (cd_count): Removed.
7448 (cd_drive): New variable.
7449 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7450 (grub_biosdisk_call_hook): Likewise.
7451 (grub_biosdisk_iterate): Change cdrom detection method.
7452 (grub_biosdisk_open): Replace cd_start with cd_drive.
7453 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7454 detect cdrom device.
7455
7456 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7457 Removed.
7458 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7459 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7460 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7461 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7462 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7463 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7464 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7465 (grub_biosdisk_cdrp): New structure.
7466 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7467
7468 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7469
7470 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7471 device.
7472
7473 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7474 New function.
7475
68e7fc7a 74762008-03-20 Robert Millan <rmh@aybabtu.com>
7477
7478 Remove 2 TiB limit in ata.mod.
7479 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7480 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7481 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7482 grub_uint64_t instead of grub_uint32_t.
7483
38ad2cf5 74842008-03-05 Bean <bean123ch@gmail.com>
7485
7486 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7487 (grub_multiboot): Set boot device.
7488
7489 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7490
2b89344e 74912008-03-02 Bean <bean123ch@gmail.com>
7492
7493 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7494 symlink_buffer.
7495
87a95d1f 74962008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7497
7498 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7499 texinfo.tex.
7500
7501 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7502 modified.
7503
7504 * docs/fdl.texi: New file.
f19dbdb7 7505
87a95d1f 7506 * docs/mdate-sh: New file. Copied from gnulib.
7507 * docs/texinfo.tex: Likewise.
7508
7509 * config.guess: Updated from gnulib.
7510 * install-sh: Likewise.
7511
7dc15d8e 75122008-02-28 Robert Millan <rmh@aybabtu.com>
7513
7514 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7515 (aout_mod_SOURCES): New variable.
7516 (aout_mod_CFLAGS): Likewise.
7517 (aout_mod_LDFLAGS): Likewise.
7518
7519 * conf/i386-ieee1275.rmk: Likewise.
7520
b00ab696 75212008-02-28 Robert Millan <rmh@aybabtu.com>
7522
7523 * util/update-grub.in: Reorganise terminal validity check. Accept
7524 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7525 Based on suggestion by Franklin PIAT.
7526
79ca2d78 75272008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7528
7529 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7530 function.
7531 * util/getroot.c (grub_util_check_block_device): New function that
7532 returns the given argument if it is a block device and returns NULL else.
7533 * util/grub-probe.c (argument_is_device): New variable.
7534 (probe): Promote device_name from a variable to an argument. Receive
7535 device_name from grub_util_check_block_device() if path is NULL and from
7536 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 7537 (options): Introduce new parameter '-d, --device'.
79ca2d78 7538 (main): Add description of the new parameter to the help screen.
7539 Rename path variable to argument. Set argument_is_device if the '-d'
7540 option is given. Pass argument to probe() depending on
7541 argument_is_device.
7542
0d16e571 75432008-02-24 Bean <bean123ch@gmail.com>
7544
7545 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7546 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7547 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7548 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7549 (GRUB_ISO9660_VOLDESC_END): Likewise.
7550 (grub_iso9660_primary_voldesc): New member escape.
7551 (grub_iso9660_data): New member joliet.
7552 (grub_iso9660_convert_string): New function.
7553 (grub_iso9660_mount): Detect joliet extension.
7554 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7555 (grub_iso9660_iso9660_label): Likewise.
7556
7557 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7558 (grub_setup_SOURCES): Add fs/udf.c.
7559 (grub_fstest_SOURCES): Likewise.
7560 (udf_mod_SOURCES): New variable.
7561 (udf_mod_CFLAGS): Likewise.
7562 (udf_mod_LDFLAGS): Likewise.
7563
7564 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7565 (grub_emu_SOURCES): Likewise.
7566
7567 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7568
7569 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7570
7571 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7572
7573 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7574
7575 * fs/udf.c: New file.
7576
8a594a17 75772008-02-24 Robert Millan <rmh@aybabtu.com>
7578
7579 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7580 (normal/lexer.c_DEPENDENCIES): New variables.
7581 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7582 (normal/lexer.c_DEPENDENCIES): Likewise.
7583 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7584 (normal/lexer.c_DEPENDENCIES): Likewise.
7585 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7586 (normal/lexer.c_DEPENDENCIES): Likewise.
7587 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7588 (normal/lexer.c_DEPENDENCIES): Likewise.
7589 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7590 (normal/lexer.c_DEPENDENCIES): Likewise.
7591
2dc33c03 75922008-02-23 Robert Millan <rmh@aybabtu.com>
7593
7594 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7595 since they were intended to be in hex. This didn't break previously
7596 because of a bug in gpt_partition_map_iterate() (see below).
7597
7598 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7599 when checking the validity of GPT header.
7600 Remove `partno', since it always provides the same information as `i'.
7601
f6f4cfb0 76022008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7603
7604 * include/grub/efi/time.h: Fix a wrong comment.
7605
79ff665f 76062008-02-19 Pavel Roskin <proski@gnu.org>
7607
7608 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7609 message.
7610
d38e24c2 76112008-02-19 Bean <bean123ch@gmail.com>
7612
7613 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7614 (aout_mod_SOURCES): New variable.
7615 (aout_mod_CFLAGS): Likewise.
7616 (aout_mod_LDFLAGS): Likewise.
7617 (_bsd_mod_SOURCES): New variable.
7618 (_bsd_mod_CFLAGS): Likewise.
7619 (_bsd_mod_LDFLAGS): Likewise.
7620 (bsd_mod_SOURCES): New variable.
7621 (bsd_mod_CFLAGS): Likewise.
7622 (bsd_mod_LDFLAGS): Likewise.
7623
7624 * include/grub/aout.h: New file.
7625
7626 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7627
7628 * include/grub/i386/bsd.h: New file.
7629
7630 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7631 to make it public.
7632
7633 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7634 function is called, so that it's possible to change it inside the hook.
7635 (grub_elf64_load): Likewise.
7636 (grub_elf_file): Don't close the file if elf header is not found.
7637 (grub_elf_close): Close the file if grub_elf_file fails (The new
7638 grub_elf_file won't close it).
7639 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7640 (grub_elf64_size): Likewise.
7641
7642 * kern/i386/loader.S (grub_unix_real_boot): New function.
7643
7644 * loader/aout.c: New file.
7645
7646 * loader/i386/bsd.c: New file.
7647
7648 * loader/i386/bsd_normal.c: New file.
7649
7650 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7651
7652 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 7653 can test other formats.
d38e24c2 7654
b93bdb0f 76552008-02-19 Robert Millan <rmh@aybabtu.com>
7656
7657 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7658 (grub_gpt_partition_type_empty): Redefine with macro from
7659 `<grub/gpt_partition.h>'.
7660 (gpt_partition_map_iterate): Adjust partition type comparison.
7661
7662 Export `entry' as partmap-specific `part.data' struct.
7663 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7664
7665 * include/grub/gpt_partition.h (grub_gpt_header)
7666 (grub_gpt_partentry): ... to here (new file).
7667
7668 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7669
7670 (grub_gpt_partition_type_bios_boot): New const variable, defined
7671 with macro from `<grub/gpt_partition.h>'.
7672
7673 (setup): Replace `first_start' with `embed_region', which keeps
7674 track of the embed region (and is partmap-agnostic).
7675
7676 Replace find_first_partition_start() with find_usable_region(),
7677 which finds a usable region for embedding using partmap-specific
7678 knowledge (supports PC/MSDOS and GPT).
7679
7680 Fix all assumptions that the embed region start at sector 1, using
7681 `embed_region.start' from now on. Similarly, use `embed_region.end'
7682 rather than `first_start' to calculate available size.
7683
7684 In grub_util_info() message, replace "into after the MBR" with an
7685 indication of the specific sector our embed region starts at.
7686
66cb40f6 76872008-02-19 Robert Millan <rmh@aybabtu.com>
7688
7689 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7690 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7691 `commands/reboot.c'.
7692 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7693 (halt_mod_SOURCES): Likewise.
7694 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7695 (halt_mod_SOURCES): Likewise.
7696
b7202015 76972008-02-17 Christian Franke <franke@computer.org>
7698
7699 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7700
32b0fc49 77012008-02-17 Robert Millan <rmh@aybabtu.com>
7702
7703 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7704 set `first_start' to 0 for non-PC/MSDOS partition maps.
7705
aca63502 77062008-02-16 Robert Millan <rmh@aybabtu.com>
7707
7708 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7709 do not assume partition map is PC/MSDOS before performing checks that
7710 are specific to that layout.
7711
0de8be86 77122008-02-13 Robert Millan <rmh@aybabtu.com>
7713
7714 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7715 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7716 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7717
c3db8364 77182008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7719
7720 * configure.ac: Only a cosmetic change on the handling of
7721 -fno-stack-protector.
7722
f714229e 77232008-02-12 Alexandre Boeglin <alex@boeglin.org>
7724
c3db8364 7725 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7726 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7727 reboot.c.
f714229e 7728 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7729 (halt_mod_SOURCES): New variable.
7730 (halt_mod_CFLAGS): Likewise.
7731 (halt_mod_LDFLAGS): Likewise.
7732 (reboot_mod_SOURCES): Likewise.
7733 (reboot_mod_CFLAGS): Likewise.
7734 (reboot_mod_LDFLAGS): Likewise.
7735
c3db8364 7736 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7737 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7738 reboot.c.
f714229e 7739 (halt_mod_SOURCES): Likewise.
7740 (reboot_mod_SOURCES): Likewise.
7741
c3db8364 7742 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7743 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 7744 (reboot_mod_SOURCES): Likewise.
7745
7746 * commands/i386/pc/reboot.c: merge this file ...
7747
7748 * commands/ieee1275/reboot.c: ... and this file ...
7749
7750 * commands/reboot.c: ... to this file.
c3db8364 7751 Add some precompiler directive to include the correct header for
7752 each machine.
f714229e 7753
7754 * commands/ieee1275/halt.c: move this file ...
7755
7756 * commands/halt.c: ... to here.
c3db8364 7757 Add some precompiler directive to include the correct header for
7758 each machine.
f714229e 7759
7760 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7761 (grub_halt): Likewise.
7762
7763 * kern/efi/efi.c (grub_reboot): New function.
7764 (grub_halt): Likewise.
7765
c74493e0 77662008-02-12 Robert Millan <rmh@aybabtu.com>
7767
7768 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7769 /dev (like it is done for /dev/mapper). This doesn't provide support
7770 for EVMS, but at least it is now easy to identify the problem when it
7771 arises.
7772
d0db4b04 77732008-02-11 Robert Millan <rmh@aybabtu.com>
7774
7775 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7776 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7777 comparing it with -1, not 0.
7778
bf748642 77792008-02-10 Robert Millan <rmh@aybabtu.com>
7780
7781 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7782 `disk/lvm.c'.
7783 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7784 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7785
7786 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7787 `disk/lvm.c' to the end of the list.
7788 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7789 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7790
b5db202a 77912008-02-10 Robert Millan <rmh@aybabtu.com>
7792
7793 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7794 grub_print_error() instead. This will let user know why we're entering
7795 rescue mode.
7796 Based on suggestions from Sam Morris.
7797
83abee31 77982008-02-10 Alexandre Boeglin <alex@boeglin.org>
7799
7800 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7801 on remaining N args, instead of "--" arg N times.
7802
78d5a08b 78032008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7804
7805 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7806 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7807 pattern for unknown glyphs.
7808
68807e5f 78092008-02-09 Robert Millan <rmh@aybabtu.com>
7810
7811 * configure.ac: Probe for `help2man'.
7812 * Makefile.in (builddir): New variable.
7813 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7814 or otherwise add a few flags/options to it.
7815 (install-local): For every executable utility or script that is
7816 installed, invoke $(HELP2MAN) to install a manpage based on --help
7817 output.
7818
7819 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7820 that it doesn't prevent --help from working in build tree.
7821
7822 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7823 with `bug-grub@gnu.org'.
7824 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7825 * util/update-grub.in (usage): New function.
7826 Implement proper argument check, with support for --help and --version
7827 (as well as existing -y).
7828
78292008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7830
7831 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7832 avoid overwriting previous output.
7833 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7834
c1962162 78352008-02-09 Robert Millan <rmh@aybabtu.com>
7836
7837 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7838 drawing the menu.
7839
3dac2e3f 78402008-02-09 Robert Millan <rmh@aybabtu.com>
7841
7842 * commands/sleep.c: New file.
7843 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7844 (sleep_mod_SOURCES): New variable.
7845 (sleep_mod_CFLAGS): Likewise.
7846 (sleep_mod_LDFLAGS): Likewise.
7847
7a634e08 78482008-02-09 Robert Millan <rmh@aybabtu.com>
7849
7850 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7851 situations in which we can deduce the RAID size and the superblock
7852 doesn't match it.
7853
b92f0c18 78542008-02-09 Robert Millan <rmh@aybabtu.com>
7855
7856 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7857 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7858 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7859
7860 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7861 and return a grub_diskmemberlist_t composed of physical array members.
7862 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7863
7864 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7865 prototype.
7866 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7867 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7868 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7869
7870 * util/grub-probe.c (probe): Move partmap probing code from here ...
7871 (probe_partmap): ... to here.
7872 (probe): Use probe_partmap() once for the disk we're probing, and
7873 additionally, when such disk contains a memberlist() struct member,
7874 once for each disk that is contained in the structure returned by
7875 memberlist().
7876
91a4bf68 78772008-02-09 Robert Millan <rmh@aybabtu.com>
7878
7879 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7880 environment variable to 'all' in order to obtain debug output from
7881 non-util/ code.
7882 * util/i386/pc/grub-setup.c (main): Likewise.
7883
a96f9caa 78842008-02-08 Robert Millan <rmh@aybabtu.com>
7885
7886 * disk/raid.c (grub_raid_scan_device): Check for
7887 `array->device[sb.this_disk.number]' rather than for
7888 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 7889 guaranteed to be accessible.
a96f9caa 7890
b37a9222 78912008-02-08 Robert Millan <rmh@aybabtu.com>
7892
7893 * disk/raid.c: Update copyright.
7894 * fs/cpio.c: Likewise.
7895 * include/grub/raid.h: Likewise.
7896 * loader/i386/pc/multiboot.c: Likewise.
7897 * util/hostfs.c: Likewise.
7898
5626aee1 78992008-02-08 Robert Millan <rmh@aybabtu.com>
7900
7901 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7902 to a grub_disk_t array.
7903 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7904 `device[x]'.
7905 (grub_raid_scan_device): Replace `device[x].name' accesses with
7906 `device[x]->name'. Simplify initialization of `array->device[x]'.
7907
554f0187 79082008-02-08 Robert Millan <rmh@aybabtu.com>
7909
7910 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7911 grub_dprintf() calls.
7912 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7913 error message.
7914
1ec8425d 79152008-02-07 Christian Franke <franke@computer.org>
7916
7917 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7918 instead of fseek and ftell to support large files.
7919 (grub_hostfs_read): Likewise.
7920
f2156fda 79212008-02-07 Robert Millan <rmh@aybabtu.com>
7922
7923 Patch from Jeroen Dekkers.
7924 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 7925 failure, since successfully reading all array members might not be
f2156fda 7926 required.
7927
9216e0e7 79282008-02-06 Robert Millan <rmh@aybabtu.com>
7929
7930 * util/grub-probe.c (probe): Simplify partmap probing (with the
7931 assumption that the first word up to the underscore equals to
7932 the module name).
7933
b0dfd29a 79342008-02-06 Christian Franke <franke@computer.org>
7935
7936 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7937 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7938 last block of a cpio or tar stream.
7939 Check for "TRAILER!!!" instead of any empty data
7940 block to detect last block of a cpio stream.
7941 (grub_cpio_dir): Fix constness of variable np.
7942 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7943 cpio or tar trailer is detected. This fixes a crash
7944 on open of a non existing file.
7945
c32865bf 79462008-02-05 Bean <bean123ch@gmail.com>
7947
7948 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7949 address of entry.
7950 (grub_multiboot_load_elf64): Likewise.
7951 (grub_multiboot): Initialize mbi structure.
7952
7953 * util/grub-fstest.c: Don't include unused header file script.h.
7954
fe6b695a 7955 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 7956 of file.
7957 (grub_fstest_SOURCES): Likewise.
7958
409480b7 79592008-02-05 Robert Millan <rmh@aybabtu.com>
7960
7961 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7962 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7963 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7964 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7965
7966 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7967 (translation_table): Replace hardcoded values with macros
7968 provided by `<grub/term.h>'.
7969
7970 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7971 (keyboard_map): Correct/add a few values, with macros provided
7972 by `<grub/term.h>'.
7973 (keyboard_map_shift): Zero values that don't differ from their
7974 `keyboard_map' equivalents.
7975 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7976 Discard the second scan code that is always sent by Caps lock.
7977 Only use `keyboard_map_shift' when it provides a non-zero value,
7978 otherwise fallback to `keyboard_map'.
7979
99fadbaa 79802008-02-04 Bean <bean123ch@gmail.com>
7981
7982 * Makefile.in (enable_grub_fstest): New variable.
7983
7984 * conf/common.rmk (grub_fstest_init.lst): New rule.
7985 (grub_fstest_init.h): Likewise.
7986 (grub_fstest_init.c): Likewise.
7987 (util/grub-fstest.c_DEPENDENCIES): New variable.
7988 (grub_fstest_SOURCES): Likewise.
7989
7990 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7991
7992 * util/grub-fstest.c: New file.
7993
bf567c50 79942008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7995
7996 Make grub-setup handle a separate root device.
f19dbdb7 7997
bf567c50 7998 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7999 so that the root device can be compared with the destination
8000 device.
8001 When embedding the core image, if the root and destination devices
8002 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8003 0xFF.
8004 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 8005
9be6b98b 80062008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8007
8008 Add support for having a grub directory in a different drive. This
8009 is still only the data handling part.
f19dbdb7 8010
9be6b98b 8011 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8012 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8013 (grub_root_drive): New variable.
8014
8015 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8016 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8017 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8018 as it was.
8019
8020 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8021
8022 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8023 macro.
8024 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8025
8026 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8027 is bogus, because PXE booting does not specify any drive
8028 correctly.
8029
8030 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8031 am not sure if this is really correct.
8032
8033 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8034 is always identical to the boot drive when booting from a CD.
8035
8036 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8037 longer.
8038 (root_drive): New variable.
8039 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8040 (setup_sectors): Push %dx right after popping it, because %dh will
8041 be modified later.
8042 (copy_buffer): Restore %dx.
8043
e0ca0677 80442008-02-03 Robert Millan <rmh@aybabtu.com>
8045
8046 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8047 use `cdboot.img' for cdrom images.
8048
3b3f6629 80492008-02-03 Robert Millan <rmh@aybabtu.com>
8050
8051 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8052 only setup gfxterm when `font' command has succeeded.
8053
d42b3672 80542008-02-03 Robert Millan <rmh@aybabtu.com>
8055
8056 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8057 (grub_rescue_cmd_multiboot_loader)
8058 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8059
fa370ea6 80602008-02-03 Pavel Roskin <proski@gnu.org>
8061
e0c5dacb 8062 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 8063 %edx and %esi from stack only after grub_gate_a20() is called.
8064 grub_gate_a20() clobbers %edx.
8065
f2a76e1d 80662008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8067
8068 * configure.ac (AC_INIT): Bumped to 1.96.
8069
8070 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8071 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8072 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8073 video/readers/png.c.
8074
90fd32d1 80752008-02-03 Bean <bean123ch@gmail.com>
9be665dd 8076
8077 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8078 (cdboot_img_SOURCES): New variable.
8079 (cdboot_img_ASFLAGS): New variable.
8080 (cdboot_img_LDFLAGS): New variable.
8081
8082 * boot/i386/pc/cdboot.S: New file.
8083
8084 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8085 (cd_count): Likewise.
8086 (grub_biosdisk_get_drive): Add support for cd device.
8087 (grub_biosdisk_call_hook): Likewise.
8088 (grub_biosdisk_iterate): Likewise.
8089 (grub_biosdisk_open): Likewise.
8090 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8091 (grub_biosdisk_rw): Support reading from cd device.
8092 (GRUB_MOD_INIT): Iterate cd devices.
8093
8094 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8095 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8096 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8097
8098 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8099
4020aa53 81002008-02-02 Robert Millan <rmh@aybabtu.com>
8101
8102 * commands/read.c: New file.
8103 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8104 (read_mod_SOURCES): New variable.
8105 (read_mod_CFLAGS): Likewise.
8106 (read_mod_LDFLAGS): Likewise.
8107
e03a1132 81082008-02-02 Robert Millan <rmh@aybabtu.com>
8109
8110 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8111 determining whether menu has to be displayed.
8112
58c69220 81132008-02-02 Marco Gerards <marco@gnu.org>
8114
8115 * bus/pci.c: New file.
8116
8117 * include/grub/pci.h: Likewise.
8118
8119 * include/grub/i386/pc/pci.h: Likewise.
8120
8121 * commands/lspci.c: Likewise.
8122
8123 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8124 `lspci.mod'.
8125 (pci_mod_SOURCES): New variable.
8126 (pci_mod_CFLAGS): Likewise.
8127 (pci_mod_LDFLAGS): Likewise.
8128 (lspci_mod_SOURCES): Likewise.
8129 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8130 (lspci_mod_LDFLAGS): Likewise.
58c69220 8131
c004e1b4 81322008-02-02 Bean <bean123ch@gmail.com>
8133
8134 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8135 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8136
8137 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8138 (grub_xfs_btree_node): New structure.
8139 (grub_xfs_btree_root): New structure.
8140 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8141 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8142 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8143 (GRUB_XFS_EXTENT_SIZE): Likewise.
8144 (grub_xfs_read_block): Support btree format type.
8145 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8146 Use directory block as basic unit.
8147
8148 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8149
8150 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8151 __attribute__ ((__regparm__ (1))).
8152
f95562bf 81532008-02-01 Robert Millan <rmh@aybabtu.com>
8154
8155 Correct a mistake in previous commit.
8156
8157 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8158 top.
8159 (normal/command.c_DEPENDENCIES): New variable.
8160
7d31f41f 81612008-02-01 Robert Millan <rmh@aybabtu.com>
8162
8163 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8164 top.
8165 (normal/command.c_DEPENDENCIES): New variable.
8166 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8167 * conf/i386-ieee1275.rmk: Likewise.
8168 * conf/i386-linuxbios.rmk: Likewise.
8169 * conf/i386-pc.rmk: Likewise.
8170 * conf/sparc64-ieee1275.rmk: Likewise.
8171 * conf/powerpc-ieee1275.rmk: Likewise.
8172 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8173
8174 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8175
60b6be74 81762008-02-01 Robert Millan <rmh@aybabtu.com>
8177
8178 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8179 call at beginning of function.
8180
078522ab 81812008-01-31 Pavel Roskin <proski@gnu.org>
8182
8183 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 8184 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8185 (grub_mkrescue_SOURCES): Likewise.
078522ab 8186 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8187
ccaa8a5f 81882008-01-30 Robert Millan <rmh@aybabtu.com>
8189
8190 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8191 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8192 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8193 (grub_probe_SOURCES): ... to here.
8194
8195 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8196 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8197 * conf/i386-ieee1275.rmk: Likewise.
8198 * conf/i386-linuxbios.rmk: Likewise.
8199 * conf/powerpc-ieee1275.rmk: Likewise.
8200
ae5a9cd7 82012008-01-30 Tristan Gingold <gingold@free.fr>
8202
8203 * kern/rescue.c: Silently accept empty lines.
8204
70bc2ef2 82052008-01-29 Bean <bean123ch@gmail.com>
8206
8207 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8208 (real_code_2): Code cleanup and change comment style.
8209 (move_memory): Avoid using 32-bit address mode.
8210
6a4d50ea 82112008-01-29 Bean <bean123ch@gmail.com>
8212
8213 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8214 (png_mod_SOURCES): New variable.
8215 (png_mod_CFLAGS): Likewise.
8216 (png_mod_LDFLAGS): Likewise.
8217
8218 * video/readers/png.c: New file.
8219
11cc30ac 82202008-01-28 Robert Millan <rmh@aybabtu.com>
8221
8222 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8223 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8224 `ifndef GRUB_MOD_GAP' hack.
8225 * util/elf/grub-mkimage.c (add_segments): Likewise.
8226
3abc589f 82272008-01-27 Robert Millan <rmh@aybabtu.com>
8228
8229 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8230 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 8231 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 8232
e1907778 82332008-01-27 Robert Millan <rmh@aybabtu.com>
8234
8235 Get grub-emu to build again (including parallel builds).
8236
8237 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8238 Split into ...
8239 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8240 (normal/execute.c_DEPENDENCIES): ... this, ...
8241 (grub-emu_DEPENDENCIES): ... and this.
8242
8243 * conf/i386-efi.rmk: Likewise.
8244 * conf/i386-linuxbios.rmk: Likewise.
8245 * conf/i386-ieee1275.rmk: Likewise.
8246 * conf/powerpc-ieee1275.rmk: Likewise.
8247 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8248
2216b101 82492008-01-27 Robert Millan <rmh@aybabtu.com>
8250
8251 * NEWS: Add a few items.
8252
f75172d9 82532008-01-27 Robert Millan <rmh@aybabtu.com>
8254
8255 Fix parallel builds with grub-emu. Based on earlier commit for
8256 grub-probe and grub-setup.
8257
8258 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8259 (util/grub-emu.c_DEPENDENCIES): ... this.
8260 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8261 (util/grub-emu.c_DEPENDENCIES): ... this.
8262 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8263 (util/grub-emu.c_DEPENDENCIES): ... this.
8264 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8265 (util/grub-emu.c_DEPENDENCIES): ... this.
8266 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8267 (util/grub-emu.c_DEPENDENCIES): ... this.
8268
3f51de77 82692008-01-27 Pavel Roskin <proski@gnu.org>
8270
8271 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8272 to create a gap between _end and the modules added to the image
8273 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8274 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8275 * util/elf/grub-mkimage.c (add_segments): Likewise.
8276
2033f53e 82772008-01-26 Pavel Roskin <proski@gnu.org>
8278
8279 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8280 just return an error.
8281
22da1f6f 82822008-01-26 Bean <bean123ch@gmail.com>
8283
8284 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8285 (grub_reiserfs_get_item): Save offset of the next item.
8286 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8287
2a9525e6 82882008-01-25 Robert Millan <rmh@aybabtu.com>
8289
8290 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8291 make all filesystem sources appear together (possibly fixing omissions
8292 while at it).
8293 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8294 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8295 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8296 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8297
8298 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8299 add `kern/file.c'.
8300 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8301 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8302 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8303 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8304
8305 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8306 (probe): Add a sanity check to make sure of our ability to read
8307 requested files when probing for filesystem type.
8308
8309 * genmk.rb: Update copyright year (2007).
8310
8311 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8312 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8313 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8314 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8315 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8316 : Remove function prototypes.
8317
b95f71b5 83182008-01-25 Robert Millan <rmh@aybabtu.com>
8319
8320 Revert my previous commits (based on wrong assumption of how grub_errno
8321 works).
8322
fe6b695a 8323 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 8324 * kern/file.c (grub_file_open): Likewise.
8325
d08bbb49 83262008-01-24 Pavel Roskin <proski@gnu.org>
8327
8328 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8329 that hang if GRUB tries to setup colors.
8330 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8331 colors for firmwares that don't support it.
8332 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8333 Recognize Open Hack'Ware, set flags to work around its
8334 limitations.
8335
605e36ed 83362008-01-24 Robert Millan <rmh@aybabtu.com>
8337
8338 * kern/file.c (grub_file_open): Do not account previous failures of
8339 unrelated functions when grub_errno is checked for.
8340 Reported by Oleg Strikov.
8341
bac332a1 83422008-01-24 Bean <bean123ch@gmail.com>
8343
8344 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8345 (grub_ufs_sblock): New member volume name.
8346 (grub_ufs_find_file): Fix string copy bug.
8347 (grub_ufs_label): Implement this function properly.
8348
8349 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8350 (grub_hfs_iterate_records): Use the correct file number for extents
8351 and catalog file. Fix problem in next index calculation.
8352 (grub_hfs_find_node): Replace recursive function call with loop.
8353 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8354
15c80c09 83552008-01-23 Robert Millan <rmh@aybabtu.com>
8356
8357 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8358 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8359 (grub_multiboot2_real_boot): New function prototype.
8360
8361 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8362 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8363
8364 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8365 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8366
305338fd 83672008-01-23 Robert Millan <rmh@aybabtu.com>
8368
8369 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8370 #ifdef'ed out grub_printf().
8371
3ea52685 83722008-01-23 Robert Millan <rmh@aybabtu.com>
8373
8374 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8375 grub_dprintf calls, since they make "debug=all" mode unusable.
8376 (grub_console_checkkey): Likewise.
8377
5882ae4b 83782008-01-23 Robert Millan <rmh@aybabtu.com>
8379
8380 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8381 `term/i386/pc/at_keyboard.c'.
8382 (pkglib_MODULES): Add `serial.mod'.
8383 (serial_mod_SOURCES): New variable.
8384 (serial_mod_CFLAGS): Likewise.
8385 (serial_mod_LDFLAGS): Likewise.
8386
8387 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8388 `<grub/powerpc/ieee1275/console.h>'.
8389 (grub_keyboard_controller_init): New function prototype.
8390 (grub_console_checkkey): Likewise.
8391 (grub_console_getkey): Likewise.
8392
8393 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8394 keyboard on i386.
8395
8396 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8397 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8398
06ab5303 83992008-01-23 Robert Millan <rmh@aybabtu.com>
8400
8401 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8402 present, "(memdisk)/boot/grub" becomes the default prefix.
8403
8404 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8405 a memdisk tarball with all the modules. Add --overlay=DIR option that
8406 allows users to overlay additional files into the image.
8407
dbb475a4 84082008-01-23 Robert Millan <rmh@aybabtu.com>
8409
8410 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8411 and `machine/memory.h'.
8412 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8413 (_multiboot_mod_SOURCES): New variable.
8414 (_multiboot_mod_CFLAGS): Likewise.
8415 (_multiboot_mod_LDFLAGS): Likewise.
8416 (multiboot_mod_SOURCES): Likewise.
8417 (multiboot_mod_CFLAGS): Likewise.
8418 (multiboot_mod_LDFLAGS): Likewise.
8419
8420 * include/grub/i386/ieee1275/loader.h: New file.
8421
8422 * include/grub/i386/ieee1275/machine.h: Likewise.
8423
8424 * include/grub/i386/ieee1275/memory.h: Likewise.
8425
8426 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8427 variable declaration.
8428 (grub_os_area_size): Likewise.
8429
8430 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8431 (grub_lower_mem, grub_upper_mem): New variables.
8432 (grub_stop_floppy): New function (just to make
8433 grub_multiboot2_real_boot() happy).
8434
8435 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8436 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8437 (grub_stop): New function.
8438 Include `"../realmode.S"' and `"../loader.S"'.
8439
8440 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8441 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8442
8443 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8444 rely on grub_multiboot2_real_boot() for final boot.
8445
25638629 84462008-01-22 Robert Millan <rmh@aybabtu.com>
8447
8448 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8449 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8450 device that doesn't look like an SD card.
8451 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8452 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8453 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8454 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8455 found.
8456
9dad816d 84572008-01-22 Robert Millan <rmh@aybabtu.com>
8458
8459 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8460 avoid claiming over our own code.
8461
34842f2d 84622008-01-22 Bean <bean123ch@gmail.com>
8463
8464 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8465 (jpeg_mod_SOURCES): New variable.
8466 (jpeg_mod_CFLAGS): Likewise.
8467 (jpeg_mod_LDFLAGS): Likewise.
8468
8469 * video/readers/jpeg.c : New file.
8470
44023a28 84712008-01-22 Bean <bean123ch@gmail.com>
8472
8473 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8474 there are no more items.
8475
bc2d8ac6 84762008-01-21 Robert Millan <rmh@aybabtu.com>
8477
8478 * kern/mm.c (grub_mm_init_region): Improve debug message.
8479
261bd4bc 84802008-01-21 Robert Millan <rmh@aybabtu.com>
8481
8482 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8483 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8484 address.
8485 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8486 a C macro.
8487 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8488 Indicates start of upper memory.
8489 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8490 (generate_image): Abort when image size is big enough to corrupt
8491 upper memory.
8492
8493 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8494 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8495 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8496 instead of hardcoding 0xA0000.
8497 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8498 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8499 instead of hardcoding 0xA0000.
8500
f970b55e 85012008-01-21 Robert Millan <rmh@aybabtu.com>
8502
8503 * disk/memdisk.c (memdisk_size): New variable.
8504 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8505 `memdisk_size'.
8506 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8507 image to dynamic memory.
8508 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8509 `memdisk_size'. Free memdisk block.
8510
1a8b0526 85112008-01-21 Robert Millan <rmh@aybabtu.com>
8512
8513 Fix detection of very small filesystems (like tar).
8514
8515 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8516 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8517 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8518 a problem with this disk).
8519
6e9b4aab 85202008-01-21 Robert Millan <rmh@aybabtu.com>
8521
8522 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8523 on grub_biosdisk_rw_standard() error.
8524
0d8837b2 85252008-01-21 Robert Millan <rmh@aybabtu.com>
8526
8527 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8528 recent changes.
8529 * kern/elf.c: Likewise.
8530 * kern/ieee1275/ieee1275.c: Likewise.
8531 * kern/powerpc/ieee1275/openfw.c: Likewise.
8532 * term/ieee1275/ofconsole.c: Likewise.
8533
ffd36e34 85342008-01-21 Robert Millan <rmh@aybabtu.com>
8535
8536 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8537
3f0093d0 8538 * include/grub/kernel.h (grub_arch_memdisk_addr)
8539 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 8540
3f0093d0 8541 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8542 (grub_arch_memdisk_size): ... to here.
ffd36e34 8543
6c391b21 85442008-01-21 Robert Millan <rmh@aybabtu.com>
8545
8546 Mostly based on bugfix from Bean.
8547
8548 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8549 attribute with hook() parameter.
8550 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8551 declaration.
8552 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8553 attribute with hook() parameter.
8554 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8555 declaration.
8556
55a581dc 85572008-01-21 Robert Millan <rmh@aybabtu.com>
8558
8559 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8560 (pkglib_MODULES): Add `memdisk.mod'.
8561 (memdisk_mod_SOURCES): New variable.
8562 (memdisk_mod_CFLAGS): Likewise.
8563 (memdisk_mod_LDFLAGS): Likewise.
8564
8565 * disk/memdisk.c: New file.
8566
8567 * include/grub/disk.h (grub_disk_dev_id): Add
8568 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8569
8570 * include/grub/i386/pc/kernel.h
8571 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8572 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8573 (grub_kernel_image_size): New variable declaration.
8574 (grub_total_module_size): Likewise.
8575 (grub_memdisk_image_size): Likewise.
8576
8577 * include/grub/i386/pc/memory.h
8578 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8579
8580 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8581 (grub_arch_memdisk_addr): New variable declaration.
8582 (grub_arch_memdisk_size): Likewise.
8583
8584 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8585 (grub_arch_memdisk_size): Likewise.
8586
8587 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8588 (codestart): Replace hardcoded `0x100000' with
8589 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8590
8591 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8592 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8593 not NULL, append the contents of the file it refers to, at the end of
8594 the compressed kernel image. Initialize `grub_memdisk_image_size'
8595 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8596 (options): Add "memdisk"|'m' option.
8597 (main): Parse --memdisk|-m option, and pass user-provided path as
8598 parameter to generate_image().
8599
3d7f54c9 86002008-01-20 Robert Millan <rmh@aybabtu.com>
8601
8602 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8603 grub_dprintf() calls from here ...
8604 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8605
0bf74728 86062008-01-20 Robert Millan <rmh@aybabtu.com>
8607
8608 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8609
8610 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8611 declaration.
8612 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8613 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8614 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 8615 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 8616 property).
8617 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8618 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8619
33bf70a7 86202008-01-19 Robert Millan <rmh@aybabtu.com>
8621
fe6b695a 8622 Get rid of confusing function (superseded by
33bf70a7 8623 `grub_ieee1275_get_integer_property')
8624 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8625 prototype.
8626 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8627 function.
8628 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8629 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 8630 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 8631
e2da7d26 86322008-01-19 Robert Millan <rmh@aybabtu.com>
8633
8634 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8635 command after "shut-down", since implementations differ on which
8636 the command for halt is.
8637
59f1fd8d 86382008-01-19 Robert Millan <rmh@aybabtu.com>
8639
8640 * include/grub/i386/linuxbios/console.h: Add header protection.
8641 (grub_keyboard_controller_init): New function prototype.
8642 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8643 (KEYBOARD_COMMAND_READ): Likewise.
8644 (KEYBOARD_COMMAND_WRITE): Likewise.
8645 (KEYBOARD_SCANCODE_SET1): Likewise.
8646 (grub_keyboard_controller_write): New function.
8647 (grub_keyboard_controller_read): Likewise.
8648 (grub_keyboard_controller_init): Likewise.
8649
8650 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8651 (grub_console_init): On coreboot/LinuxBIOS, call
8652 grub_keyboard_controller_init().
8653
5f5a7c15 86542008-01-19 Robert Millan <rmh@aybabtu.com>
8655
8656 PowerPC changes provided by Pavel Roskin.
8657
8658 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8659 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8660 don't rely on cmain() doing it.
8661 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8662 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8663
1210e168 86642008-01-16 Robert Millan <rmh@aybabtu.com>
8665
8666 * include/grub/i386/linuxbios/memory.h
8667 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8668 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8669 receive `table_header' as argument. Instead, probe for it in the
8670 known memory ranges where it can be present.
8671 (grub_available_iterate): Do not pass a fixed `table_header' address
8672 to grub_linuxbios_table_iterate().
8673
3d04eab8 86742008-01-15 Robert Millan <rmh@aybabtu.com>
8675
8676 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8677 * conf/i386-ieee1275.rmk: New file.
8678 * include/grub/i386/ieee1275/console.h: Likewise.
8679 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8680 * include/grub/i386/ieee1275/kernel.h: Likewise.
8681 * include/grub/i386/ieee1275/time.h: Likewise.
8682 * kern/i386/ieee1275/init.c: Likewise.
8683 * kern/i386/ieee1275/startup.S: Likewise.
8684
d1bc1b73 86852008-01-15 Robert Millan <rmh@aybabtu.com>
8686
8687 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8688 when pointers are 32-bit (but still do set it to one when they are
8689 64-bit).
8690
66a65807 86912008-01-15 Robert Millan <rmh@aybabtu.com>
8692
8693 * include/grub/ieee1275/ieee1275.h
8694 (grub_ieee1275_get_integer_property): New function prototype.
8695
8696 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8697 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 8698 grub_ieee1275_get_property() to handle endianness.
66a65807 8699
8700 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8701 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 8702 where appropriate.
66a65807 8703 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8704 (grub_map): Likewise.
8705 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8706
a83ccafd 87072008-01-15 Bean <bean123ch@gmail.com>
8708
8709 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8710 (grub_script_execute_cmdline): Reset grub_errno.
8711
8712 * normal/main.c (read_config_file): Reset grub_errno.
8713
8714 * normal/parse.y (script_init): New.
8715 (script): Move function and menuentry here.
8716 (delimiter): New.
8717 (command): Add delimiter at the end of command.
8718 (commands): Adjust to match the new command.
8719 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 8720 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 8721 (if): Use the new commands.
8722
8723 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8724
df6ecfc6 87252008-01-15 Robert Millan <rmh@aybabtu.com>
8726
8727 * normal/menu.c (run_menu): Move timeout message from here ...
8728 (print_timeout): ... to here.
8729 (run_menu): Use print_timeout() once during initial draw to print
8730 the whole message, and again in every clock tick to update only
8731 the number of seconds.
8732
87ae25eb 87332008-01-15 Robert Millan <rmh@aybabtu.com>
8734
8735 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8736 actual size of `available' from grub_ieee1275_get_property(), and
8737 restrict parsing to that bound.
8738
47bf09a4 87392008-01-15 Christian Franke <franke@computer.org>
8740
8741 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8742 (argp_program_version): Remove variable.
8743 (argp_program_bug_address): Likewise.
8744 (options): Convert from struct argp_option to struct option.
8745 (struct arguments): Remove.
8746 (parse_opt): Remove.
8747 (usage): New function.
8748 (main): Replace struct args members by simple variables.
8749 Replace argp_parse() by getopt_long().
8750 Add switch to evaluate options.
8751 Add missing "(...)" around root_dev in prefix string.
8752
c86f1469 87532008-01-14 Robert Millan <rmh@aybabtu.com>
8754
8755 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8756 for grub_ieee1275_exit(), in order to improve portability.
8757
e622c559 87582008-01-14 Robert Millan <rmh@aybabtu.com>
8759
8760 * util/grub.d/10_linux.in (prefix): Define.
8761 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8762
44cb1ec8 87632008-01-13 Pavel Roskin <proski@gnu.org>
8764
8765 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8766 grub_errno if no errors have been detected.
8767
1eb8c802 87682008-01-12 Robert Millan <rmh@aybabtu.com>
8769
8770 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8771 (grub_util_get_dev_abstraction): New function prototype.
8772
8773 * util/getroot.c: Include `<grub/util/getroot.h>'
8774 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8775 (grub_util_get_dev_abstraction): ... here (new function).
8776
8777 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8778 `PRINT_ABSTRACTION'.
8779 (probe): Probe for abstraction type when requested.
8780 (main): Understand `--target=abstraction'.
8781
8782 * util/i386/efi/grub-install.in: Add abstraction module to core
8783 image when it is found to be necessary.
8784 * util/i386/pc/grub-install.in: Likewise.
8785 * util/powerpc/ieee1275/grub-install.in: Likewise.
8786
8787 * util/update-grub_lib.in (font_path): Return system path without
8788 converting to GRUB path.
8789 * util/update-grub.in: Convert system path returned by font_path()
8790 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8791 abstraction module is needed for loading fonts (if any). Export
8792 that as `GRUB_PRELOAD_MODULES'.
8793 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8794 insmod commands).
8795
52bd3de9 87962008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8797
8798 Remove some unused code from reiserfs.
f19dbdb7 8799
52bd3de9 8800 * fs/reiserfs.c (struct grub_reiserfs_key)
8801 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8802 (struct grub_reiserfs_node_body): Removed.
8803 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8804 Likewise.
8805 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8806 Likewise.
8807 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8808 Likewise.
8809 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8810 Likewise.
8811 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8812 Likewise.
8813 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8814 Likewise.
8815 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8816 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8817 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8818
2f80039d 88192008-01-10 Robert Millan <rmh@aybabtu.com>
8820
8821 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8822 Determines if a file is garbage left by packaging systems, etc.
8823 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8824 for processing /etc/grub.d scripts.
8825 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8826 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8827 as a condition for processing Linux images.
8828
87888032 88292008-01-10 Pavel Roskin <proski@gnu.org>
8830
8831 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8832 to compile reiserfs.c on PowerPC.
8833
7e54fced 88342008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8835
8836 * kern/device.c (grub_device_iterate): Do not abort device iteration
8837 when one of the devices cannot be opened.
8838 * kern/disk.c (grub_disk_open): Do not account previous failures of
8839 unrelated functions when grub_errno is checked for.
8840
5aa541e6 88412008-01-08 Robert Millan <rmh@aybabtu.com>
8842
8843 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8844 `! grub_linux_is_bzimage', change order of address comparison to make
8845 it more intuitive, and improve "too big zImage" error message.
8846
7076340d 88472008-01-08 Robert Millan <rmh@aybabtu.com>
8848
8849 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8850 `$(update-grub_DATA)'.
8851 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8852 targets.
8853
9ca70333 88542008-01-07 Robert Millan <rmh@aybabtu.com>
8855
8856 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8857 which instruction is modified by grub-setup during installation
8858 (since it wasn't obvious by only looking at this file).
8859
38ccf575 88602008-01-07 Robert Millan <rmh@aybabtu.com>
8861
8862 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8863 listing actual TODO items.
8864
f5db4291 88652008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8866
868967cf 8867 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8868 correctly.
8869 (grub_reiserfs_get_key_offset): Likewise.
8870 (grub_reiserfs_set_key_offset): Likewise.
8871 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 8872 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 8873
8874 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8875 better to remove the bitfield version completely.
f19dbdb7 8876
868967cf 88772008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8878
f5db4291 8879 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8880 allocated from the heap, due to the fshelp implementation.
8881 (grub_reiserfs_dir): Free NODE, due to the same reason.
8882
492e6d9d 88832008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8884
8885 Mostly from Vincent Pelletier:
f19dbdb7 8886
492e6d9d 8887 * fs/reiserfs.c: New file.
f19dbdb7 8888
492e6d9d 8889 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8890 (reiserfs_mod_SOURCES): New variable.
8891 (reiserfs_mod_CFLAGS): Likewise.
8892 (reiserfs_mod_LDFLAGS): Likewise.
8893
8894 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8895 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8896 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8897 normal/color.c.
8898
9ce3e7c1 88992008-01-06 Robert Millan <rmh@aybabtu.com>
8900
8901 * normal/color.c: Remove `<grub/env.h>'.
8902
f3b58148 89032008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8904
8905 * include/grub/normal.h: Include <grub/env.h>.
8906
7ac3bcfa 89072008-01-05 Robert Millan <rmh@aybabtu.com>
8908
8909 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8910 usage example with `(hd0,1)'.
fb358190 8911 Reported by Samuel Thibault.
7ac3bcfa 8912
c8ee99d7 89132008-01-05 Robert Millan <rmh@aybabtu.com>
8914
8915 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8916 (grub_linux_boot_zimage): Rename to ...
8917 (grub_linux_boot): ... this.
8918 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8919 (grub_linux_boot_zimage): Conditionalize zImage copy.
8920
8921 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8922 (grub_linux_boot_bzimage): Remove prototype.
8923 (grub_linux_boot_zimage): Rename to ...
8924 (grub_linux_boot): ... this.
8925
8926 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8927 (grub_linux_boot): Remove function.
8928
0ece25b1 89292008-01-05 Robert Millan <rmh@aybabtu.com>
8930
8931 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8932 (grub_env_write_color_highlight): Likewise.
8933 (grub_wait_after_message): Likewise.
8934
8935 * normal/color.c: New file.
8936
8937 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8938 (normal_mod_DEPENDENCIES): Likewise.
8939
8940 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8941 (normal_mod_DEPENDENCIES): Likewise.
8942
8943 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8944 (normal_mod_DEPENDENCIES): Likewise.
8945
8946 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8947 (normal_mod_DEPENDENCIES): Likewise.
8948
8949 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8950 for waiting after a message is printed.
8951 * normal/main.c (read_config_file): Likewise.
8952 (grub_normal_init): Register grub_env_write_color_normal() and
8953 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8954 `color_highlight' variables as global.
8955
8956 * normal/menu.c (grub_wait_after_message): New function.
8957 (grub_color_menu_normal): New variable. Replaces ...
8958 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8959 (grub_color_menu_highlight): New variable. Replaces ...
8960 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8961 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8962 `GRUB_TERM_COLOR_STANDARD'.
8963 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8964 `normal_code' and `highlight_code' to `old_color_normal' and
8965 `old_color_highlight', respectively.
8966 (grub_menu_init_page): Update colors when drawing the menu, based on
8967 `menu_color_normal' and `menu_color_highlight' variables.
8968 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8969 a message is printed.
8970
182dd4e5 89712008-01-05 Robert Millan <rmh@aybabtu.com>
8972
8973 * kern/env.c (grub_env_context_open): Propagate hooks for global
8974 variables to new context.
8975
8976 * kern/main.c (grub_set_root_dev): Export `root' variable.
8977
ddf8f6ad 89782008-01-05 Robert Millan <rmh@aybabtu.com>
8979
8980 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 8981 discs unconditionally, since udev and others have options to provide
ddf8f6ad 8982 them.
8983
d8b43d9b 89842008-01-05 Robert Millan <rmh@aybabtu.com>
8985
8986 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8987
2bff2de3 89882008-01-04 Christian Franke <franke@computer.org>
8989
8990 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8991 of eisa_mmap.
8992
97eab917 89932008-01-03 Pavel Roskin <proski@gnu.org>
8994
8995 * kern/i386/linuxbios/init.c: Put "void" to all function
8996 declarations with no arguments.
8997 * kern/powerpc/ieee1275/init.c: Likewise.
8998 * term/i386/pc/at_keyboard.c: Likewise.
8999 * term/i386/pc/vga_text.c: Likewise.
9000 * util/grub-mkdevicemap.c: Likewise.
9001
b9416d00 90022008-01-02 Robert Millan <rmh@aybabtu.com>
9003
9004 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9005 message when loaded image is out of bounds.
9006 (grub_multiboot_load_elf64): Likewise.
9007
92695df9 90082008-01-02 Pavel Roskin <proski@gnu.org>
9009
9010 * util/grub.d/10_linux.in: Try version without ".old" when
9011 looking for initrd. It's better to use initrd from the newer
9012 kernel of the same version than no initrd at all.
9013
d98d9cad 90142008-01-01 Robert Millan <rmh@aybabtu.com>
9015
9016 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9017
dbfdce36 90182008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9019
f19dbdb7 9020 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 9021 grub_video_get_active_render_target.
9022 (grub_video_adapter): Added unmap_color and get_active_render_target.
9023
f19dbdb7 9024 * video/video.c: Added grub_video_unmap_color and
dbfdce36 9025 grub_video_get_active_render_target.
9026 (grub_video_get_info): Changed method to accept NULL pointer as an
9027 argument to allow detection of active video adapter.
9028
9029 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9030 grub_video_vbe_unmap_color_int.
9031 Added grub_video_vbe_unmap_color and
9032 grub_video_vbe_get_active_render_target.
9033 (grub_video_vbe_adapter): Added unmap_color and
9034 get_active_render_target.
9035
f19dbdb7 9036 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 9037 with grub_video_vbe_unmap_color_int.
9038
9039 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9040 (DEFAULT_NORMAL_COLOR): Likewise.
9041 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9042 (DEFAULT_FG_COLOR): Removed.
9043 (DEFAULT_BG_COLOR): Likewise.
9044 (DEFAULT_CURSOR_COLOR): Changed value.
9045 (grub_virtual_screen): Added standard_color_setting,
9046 normal_color_setting, highlight_color_setting and term_color.
9047 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9048 (bitmap_width): Added.
9049 (bitmap_height): Likewise.
9050 (bitmap): Likewise.
9051 (set_term_color): Likewise.
9052 (grub_virtual_screen_setup): Changed to use new terminal coloring
9053 settings.
9054 (grub_gfxterm_init): Added init for bitmap.
9055 (grub_gfxterm_fini): Added destroy for bitmap.
9056 (redraw_screen_rect): Updated to use background bitmap and new
9057 terminal coloring.
9058 (scroll_up): Added optimization for case when there is no bitmap.
9059 (grub_gfxterm_cls): Fixed to use correct background color.
9060 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9061 coloring.
9062 (grub_virtual_screen_setcolor): Likewise.
9063 (grub_virtual_screen_getcolor): Added.
9064 (grub_gfxterm_background_image_cmd): Likewise.
9065 (grub_video_term): Added setcolor and getcolor.
9066 (MOD_INIT): Added registration of background_image command.
9067 (MOD_TERM): Added unregistration for background_image command.
9068
c3c20931 90692007-12-30 Pavel Roskin <proski@gnu.org>
9070
9071 * loader/multiboot_loader.c: Fix multiboot command
9072 unregistration. Fix all typos in the word "multiboot".
9073
df266716 90742007-12-29 Pavel Roskin <proski@gnu.org>
94239199 9075
9076 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9077 support for initrd names used in Fedora.
9078
fc6e896c 90792007-12-26 Bean <bean123ch@gmail.com>
9080
9081 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9082 (cpio_mod_SOURCES): New variable.
9083 (cpio_mod_CFLAGS): Likewise.
9084 (cpio_mod_LDFLAGS): Likewise.
9085
9086 * fs/cpio.c: New file.
9087
9088 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9089
9090 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9091
9092 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9093
9094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9095
533110ad 90962007-12-25 Robert Millan <rmh@aybabtu.com>
9097
9098 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9099 (grub_getcolor): New function.
9100
9101 * kern/term.c (grub_getcolor): New function.
9102 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9103 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9104 (print_entry): Set normal and highlight colors to
9105 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9106 respectively, before printing and restore them to old
9107 values afterwards.
9108 (grub_menu_init_page): Likewise. Fill an additional colored space
9109 that would otherwise be left blank.
9110
9111 * term/efi/console.c (grub_console_getcolor): New function.
9112 (struct grub_console_term.getcolor): New variable.
9113 * term/i386/pc/console.c (grub_console_getcolor): New function.
9114 (struct grub_console_term.getcolor): New variable.
9115 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9116 (struct grub_console_term.getcolor): New variable.
9117
9118 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9119 (struct grub_console_term.setcolor): Remove variable.
9120 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9121 (struct grub_console_term.setcolor): Remove variable.
9122 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9123 (struct grub_console_term.setcolor): Remove variable.
9124 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9125 (struct grub_console_term.setcolor): Remove variable.
9126
4931827f 91272007-12-25 Robert Millan <rmh@aybabtu.com>
9128
9129 * configure.ac: Search for possible unifont.hex locations, and
9130 define UNIFONT_HEX if found.
9131
9132 * Makefile.in (UNIFONT_HEX): Define variable.
9133 (DATA): Rename to ...
9134 (PKGLIB): ... this. Update all users.
9135 (PKGDATA): New variable.
9136 (pkgdata_IMAGES): Rename to ...
9137 (pkglib_IMAGES): ... this. Update all users.
9138 (pkgdata_MODULES): Rename to ...
9139 (pkglib_MODULES): ... this. Update all users.
9140 (pkgdata_PROGRAMS): Rename to ...
9141 (pkglib_PROGRAMS): ... this. Update all users.
9142 (pkgdata_DATA): Rename to ...
9143 (pkglib_DATA): ... this. Update all users.
9144 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9145 (unicode.pff, ascii.pff): New rules.
9146 (all-local): Add `$(PKGDATA)' dependency.
9147 (install-local): Process `$(PKGDATA)'.
9148
9149 * util/update-grub_lib.in (font_path): Search for *.pff files in
9150 a few more locations, including `${pkgdata}'.
9151
57e57e31 91522007-12-23 Robert Millan <rmh@aybabtu.com>
9153
9154 Patch from Bean <bean123ch@gmail.com>:
9155 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9156 `size'.
9157
4bc72aa9 91582007-12-21 Bean <bean123ch@gmail.com>
9159
9160 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9161 (ntfscomp_mod_SOURCES): New variable.
9162 (ntfscomp_mod_CFLAGS): Likewise.
9163 (ntfscomp_mod_LDFLAGS): Likewise.
9164
9165 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9166 (grub_probe_SOURCES): Likewise.
9167 (grub_emu_SOURCES): Likewise.
9168
9169 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9170 (grub_emu_SOURCES): Likewise.
9171
9172 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9173 (grub_emu_SOURCES): Likewise.
9174
9175 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9176 (grub_emu_SOURCES): Likewise.
9177
9178 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9179 (read_run_list): Renamed to grub_ntfs_read_run_list.
9180 (decomp_nextvcn): Moved to ntfscomp.c.
9181 (decomp_getch): Likewise.
9182 (decomp_get16): Likewise.
9183 (decomp_block): Likewise.
9184 (read_block): Likewise.
9185 (read_data): Partially moved to ntfscomp.c.
9186 (fixup): Change unsigned to grub_uint16_t.
9187 (read_mft): Change unsigned long to grub_uint32_t.
9188 (read_attr): Likewise.
9189 (read_data): Likewise.
9190 (read_run_data): Likewise.
9191 (read_run_list): Likewise.
9192 (read_mft): Likewise.
9193
9194 * fs/ntfscomp.c: New file.
9195
9196 * include/grub/ntfs.h: New file.
9197
af680a87 91982007-12-16 Robert Millan <rmh@aybabtu.com>
9199
9200 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9201 IDE disk check, since Linux is known to support 20 IDE disks.
9202 Reported by Colin Watson.
9203
84be7599 92042007-12-15 Bean <bean123ch@gmail.com>
9205
9206 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9207 (lnxboot_img_SOURCES): New variable.
9208 (lnxboot_img_ASFLAGS): Likewise.
9209 (lnxboot_img_LDFLAGS): Likewise.
9210
9211 * boot/i386/pc/lnxboot.S: New file.
9212
6af9db01 92132007-11-24 Pavel Roskin <proski@gnu.org>
9214
9215 * configure.ac: Test if '--build-id=none' is supported by the
9216 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9217 objcopy to generate incorrect binary files (binutils
9218 2.17.50.0.18-1 as shipped by Fedora 8).
9219 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9220 linking, so that build ID doesn't break the test.
9221
7361cfe6 92222007-11-24 Pavel Roskin <proski@gnu.org>
9223
9224 * include/grub/i386/time.h: use "void" in the argument list
9225 of grub_cpu_idle().
9226 * include/grub/powerpc/time.h: Likewise.
9227 * include/grub/sparc64/time.h: Likewise.
9228
1593e10c 92292007-11-18 Christian Franke <franke@computer.org>
9230
9231 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9232 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9233 This fixes the problem that function keys did not work in grub-emu.
9234
3b8db1a8 92352007-11-18 Christian Franke <franke@computer.org>
9236
9237 * disk/host.c (grub_host_open): Remove attribute unused from
9238 name parameter. Add check for "host". This fixes the problem
9239 that grub-emu does not find partitions.
9240
2e29408d 92412007-11-18 Christian Franke <franke@computer.org>
9242
9243 * util/hostfs.c (is_dir): New function.
9244 (grub_hostfs_dir): Handle missing dirent.d_type case.
9245 (grub_hostfs_read): Add missing fseek().
9246 (grub_hostfs_label): Clear label pointer. This fixes a crash
9247 of grub-emu on "ls (host)".
9248
398cd047 92492007-11-18 Christian Franke <franke@computer.org>
9250
9251 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9252 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9253 to 64 bit boundary by default.
9254
c405c391 92552007-11-18 Bean <bean123ch@gmail.com>
9256
9257 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9258 (hexdump_mod_SOURCES): New variable.
9259 (hexdump_mod_CFLAGS): Likewise.
9260 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 9261
c405c391 9262 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9263
9264 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9265
9266 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9267
9268 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9269
9270 * include/grub/hexdump.h: New file.
9271
9272 * commands/hexdump.c: New file.
9273
5cced7fd 92742007-11-10 Robert Millan <rmh@aybabtu.com>
9275
9276 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9277 in grub_outb() calls.
9278 (beep_on): Likewise.
9279
8b714eb0 92802007-11-10 Christian Franke <franke@computer.org>
9281
9282 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9283 (grub_menu_run): Likewise.
9284
ce0f1839 92852007-11-10 Robert Millan <rmh@aybabtu.com>
9286
9287 * include/grub/i386/efi/machine.h: New file.
9288 * include/grub/i386/linuxbios/machine.h: Likewise.
9289 * include/grub/i386/pc/machine.h: Likewise.
9290 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9291 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9292
9293 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9294 (serial_hw_io_addr): New variable.
9295 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9296 instead of `(unsigned short *) 0x400'.
9297
270c237d 92982007-11-10 Bean <bean123ch@gmail.com>
9299
9300 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9301
a87783bf 93022007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9303
9304 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9305 (vga_mod_SOURCES): Added.
9306 (vga_mod_CFLAGS): Likewise.
9307 (vga_mod_LDFLAGS): Likewise.
9308
9309 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9310 grub_outb() calls.
9311 (set_map_mask): Likewise.
9312 (set_read_map): Likewise.
9313 (set_read_address): Likewise.
9314 (vga_font): Removed variable.
9315 (get_vga_glyph): Removed function.
9316 (invalidate_char): Likewise.
9317 (write_char): Changed to use grub_font_get_glyph() for font
9318 information.
9319 (grub_vga_putchar): Likewise.
9320 (grub_vga_getcharwidth): Likewise.
9321
6433b448 93222007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9323
9324 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9325 flags.
9326 (pxeboot_img_LDFLAGS): Likewise.
9327 (diskboot_img_LDFLAGS): Likewise.
9328 (kernel_img_LDFLAGS): Likewise.
9329
49178511 93302007-11-06 Robert Millan <rmh@aybabtu.com>
9331
9332 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9333 in grub_outb() calls.
9334 (serial_hw_init): Likewise.
9335
53b052de 93362007-11-05 Robert Millan <rmh@aybabtu.com>
9337
9338 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9339 spaces. Skip non-regular files.
9340
5ab33bba 93412007-11-05 Robert Millan <rmh@aybabtu.com>
9342
9343 * kern/disk.c (grub_disk_firmware_fini)
9344 (grub_disk_firmware_is_tainted): New variables.
9345
9346 * include/grub/disk.h (grub_disk_firmware_fini)
9347 (grub_disk_firmware_is_tainted): Likewise.
9348
9349 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9350 (grub_disk_biosdisk_fini): ... to here.
9351 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9352 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9353 is set. Register grub_disk_biosdisk_fini() in
9354 `grub_disk_firmware_fini'.
9355
9356 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9357 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9358 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9359 to finish existing firmware disk interface.
9360
9361 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9362 (ata_mod_SOURCES): New variable.
9363 (ata_mod_CFLAGS): Likewise.
9364 (ata_mod_LDFLAGS): Likewise.
9365
0149ab7c 93662007-11-05 Robert Millan <rmh@aybabtu.com>
9367
9368 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9369 (grub_ata_wait): Reimplement using grub_millisleep().
9370
9371 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9372 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9373
be7ac41e 93742007-11-03 Marco Gerards <marco@gnu.org>
9375
9376 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9377 (CRTC_ADDR_PORT): New macro.
9378 (CRTC_DATA_PORT): Likewise.
9379 (CRTC_CURSOR): Likewise.
9380 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9381 (CRTC_CURSOR_ADDR_LOW): Likewise.
9382 (update_cursor): New function.
9383 (grub_console_real_putchar): Call `update_cursor'.
9384 (grub_console_gotoxy): Likewise.
9385 (grub_console_cls): Set the default color when clearing the
9386 screen.
9387 (grub_console_setcursor): Implemented.
9388
bb06ab2e 93892007-11-03 Marco Gerards <marco@gnu.org>
9390
9391 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9392 become activate.
9393 (grub_ata_pio_write): Likewise.
9394
9395 (grub_atapi_identify): Wait after issuing an ATA command.
9396 (grub_atapi_packet): Likewise.
9397 (grub_ata_identify): Likewise.
9398 (grub_ata_readwrite): Likewise.
9399
cf8f780b 94002007-11-03 Marco Gerards <marco@gnu.org>
9401
9402 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9403 (grub_ata_pio_write): Likewise.
9404 (grub_ata_readwrite): Use `grub_error', instead of
9405 returning `grub_errno'.
9406
ed649e54 94072007-11-03 Marco Gerards <marco@gnu.org>
9408
9409 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9410 grub_ata_pio_write once for every single sector, instead of for
9411 multiple sectors.
9412
ca25d8f0 94132007-10-31 Robert Millan <rmh@aybabtu.com>
9414
9415 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9416
9417 * conf/i386-linuxbios.rmk: New file.
9418
9419 * kern/i386/pc/hardware.c: Likewise.
9420 * term/i386/pc/at_keyboard.c: Likewise.
9421 * term/i386/pc/vga_text.c: Likewise.
9422
9423 * include/grub/i386/linuxbios/boot.h: Likewise.
9424 * include/grub/i386/linuxbios/console.h: Likewise.
9425 * include/grub/i386/linuxbios/init.h: Likewise.
9426 * include/grub/i386/linuxbios/kernel.h: Likewise.
9427 * include/grub/i386/linuxbios/loader.h: Likewise.
9428 * include/grub/i386/linuxbios/memory.h: Likewise.
9429 * include/grub/i386/linuxbios/serial.h: Likewise.
9430 * include/grub/i386/linuxbios/time.h: Likewise.
9431
9432 * kern/i386/linuxbios/init.c: Likewise.
9433 * kern/i386/linuxbios/startup.S: Likewise.
9434 * kern/i386/linuxbios/table.c: Likewise.
9435
e911ecc1 94362007-10-31 Marco Gerards <marco@gnu.org>
9437
9438 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9439 (ata_mod_SOURCES): New variable.
9440 (ata_mod_CFLAGS): Likewise.
9441 (ata_mod_LDFLAGS): Likewise.
9442
9443 * disk/ata.c: New file.
9444
9445 * include/grub/disk.h (grub_disk_dev_id): Add
9446 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 9447
7f66d0e0 94482007-10-31 Robert Millan <rmh@aybabtu.com>
9449
9450 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9451 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9452
9453 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9454 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9455
9456 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9457 `<grub/types.h>'.
9458
9459 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9460
5cd7dd46 94612007-10-27 Robert Millan <rmh@aybabtu.com>
9462
3236ca65 9463 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 9464
2ebfc90f 94652007-10-22 Robert Millan <rmh@aybabtu.com>
9466
9467 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9468 `"../realmode.S"'.
9469 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9470
73fcb0f3 94712007-10-22 Robert Millan <rmh@aybabtu.com>
9472
9473 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9474 (pkgdata_MODULES): Add `biosdisk.mod'.
9475 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9476 variables.
9477
9478 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9479 (grub_biosdisk_init): Replace with ...
9480 (GRUB_MOD_INIT(biosdisk)): ... this.
9481 (grub_biosdisk_fini): Replace with ...
9482 (GRUB_MOD_FINI(biosdisk)): ... this.
9483
9484 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9485 (grub_machine_init): Remove call to grub_biosdisk_init().
9486 (grub_machine_fini): Remove call to grub_machine_fini().
9487
9488 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9489
3381d274 94902007-10-22 Robert Millan <rmh@aybabtu.com>
9491
9492 * include/grub/time.h: New file.
9493 * include/grub/i386/time.h: Likewise.
9494 * include/grub/powerpc/time.h: Likewise.
9495 * include/grub/sparc64/time.h: Likewise.
9496
9497 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9498 instances to ...
9499 (KERNEL_MACHINE_TIME_HEADER): ... this.
9500 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9501 instances to ...
9502 (KERNEL_MACHINE_TIME_HEADER): ... this.
9503 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9504 instances to ...
9505 (KERNEL_MACHINE_TIME_HEADER): ... this.
9506
9507 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9508 (grub_millisleep): New function.
9509 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9510 (grub_millisleep): New function.
9511 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9512 Remove `grub/machine/time.h' include.
9513 (grub_millisleep): New function.
9514 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9515 Remove `grub/machine/time.h' include.
9516 (grub_millisleep): New function.
9517
9518 * include/grub/misc.h (grub_div_roundup): New function.
9519
9520 * kern/misc.c: Include `<grub/time.h>'.
9521 (grub_millisleep_generic): New function.
9522
9523 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9524 Add `time.h'.
9525 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9526 Add `time.h'.
9527 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9528 `machine/time.h'. Add `time.h'.
9529 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9530
a39a0312 95312007-10-21 Robert Millan <rmh@aybabtu.com>
9532
9533 * include/grub/misc.h (grub_max): New function.
9534
2aad70e2 95352007-10-21 Robert Millan <rmh@aybabtu.com>
9536
9537 * util/misc.c (grub_util_info): Call fflush() before returning.
9538
54b71c4b 95392007-10-20 Robert Millan <rmh@aybabtu.com>
9540
9541 * genmk.rb (Image): Copy `extra_flags' from here ...
9542 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9543
9544 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9545 to `argc' and `args' arguments.
9546
a979f513 95472007-10-17 Robert Millan <rmh@aybabtu.com>
9548
9549 * kern/i386/loader.S: New file.
9550
9551 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9552 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9553 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9554 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9555 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9556 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9557 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9558 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9559 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9560 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9561 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9562 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9563 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9564 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9565
9566 * kern/i386/realmode.S: New file.
9567
9568 * kern/i386/pc/startup.S (protstack): Moved from here ...
9569 * kern/i386/realmode.S (protstack)... to here.
9570 * kern/i386/pc/startup.S (gdt): Moved from here ...
9571 * kern/i386/realmode.S (gdt)... to here.
9572 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9573 * kern/i386/realmode.S (prot_to_real)... to here.
9574
9575 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9576 `kern/i386/realmode.S'.
9577
825fc8fd 95782007-10-17 Robert Millan <rmh@aybabtu.com>
9579
9580 * include/grub/i386/loader.h: New file.
9581
9582 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9583 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9584 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9585 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9586 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9587 * include/grub/i386/loader.h (grub_linux_prot_size)
9588 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9589 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9590 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9591 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9592
9593 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9594
e179b2f4 95952007-10-15 Robert Millan <rmh@aybabtu.com>
9596
9597 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9598 filesystem when dev->disk is unset.
9599 Do probe for filesystem even when dev->disk->has_partitions is set.
9600 In case a filesystem is found, always report it.
9601 In case it isn't, if dev->disk->has_partitions is set, report that
9602 a partition table was found instead of reporting that no filesystem
9603 could be identified.
9604
5db82af6 96052007-10-12 Robert Millan <rmh@aybabtu.com>
9606
9607 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9608 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9609
68f6ac74 9610 * include/grub/types.h (grub_host_to_target16): New macro.
9611 (grub_host_to_target32): Likewise.
9612 (grub_host_to_target64): Likewise.
9613 (grub_target_to_host16): Likewise.
9614 (grub_target_to_host32): Likewise.
9615 (grub_target_to_host64): Likewise.
5db82af6 9616
9617 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9618 Renamed from to ...
9619 (GRUB_MOD_ALIGN): ...this. Update all users.
9620
68f6ac74 9621 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9622 grub_host_to_target32.
9623 Replace grub_be_to_cpu32 with grub_target_to_host32.
9624 (load_modules): Likewise.
9625 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9626 Replace grub_be_to_cpu32 with grub_target_to_host32.
9627 Replace grub_cpu_to_be16 with grub_host_to_target16.
9628 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 9629
3cf497cc 96302007-10-12 Robert Millan <rmh@aybabtu.com>
9631
9632 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9633 * util/elf/grub-mkimage.c: ... here.
9634
9635 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9636 `util/powerpc/ieee1275/grub-mkimage.c'.
9637
c8cc3692 96382007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 9639
c8cc3692 9640 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9641 and make it easier to figure out.
9642 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9643 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9644 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9645 leave us with less than HEAP_MIN_SIZE total heap.
9646 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 9647
5c58b791 96482007-10-03 Robert Millan <rmh@aybabtu.com>
9649
9650 * include/grub/i386/io.h: New file.
9651 * commands/i386/pc/play.c (inb): Removed.
9652 (outb): Removed.
9653 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9654 with grub_outb().
afcd2ef8 9655 * term/i386/pc/serial.c (inb): Removed.
9656 (outb): Removed.
9657 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9658 with grub_outb().
9659 * term/i386/pc/vga.c (inb): Removed.
9660 (outb): Removed.
9661 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9662 with grub_outb().
5c58b791 9663
1a477ed6 96642007-10-02 Robert Millan <rmh@aybabtu.com>
9665
9666 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9667 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9668 Reported by Marcin Kurek.
9669
6b5d80fa 96702007-09-07 Robert Millan <rmh@aybabtu.com>
9671
9672 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9673 SmartFirmware version updates (as released by Sven Luther), and avoid
9674 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9675 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9676 known broken.
9677
5618afbf 96782007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9679
9680 From Hitoshi Ozeki:
9681 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9682 when merging two regions.
9683
6139dcd9 96842007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9685
508e39ee 9686 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9687 * normal/completion.c (grub_normal_do_completion): Likewise.
9688 Reported by Hitoshi Ozeki.
9689
96902007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9691
6139dcd9 9692 Do not use devices at boot in chainloading.
f19dbdb7 9693
6139dcd9 9694 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9695 (boot_part_addr): Likewise.
9696 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9697 with BOOT_DRIVE and BOOT_PART_ADDR.
9698 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9699 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9700
38da6516 97012007-08-29 Robert Millan <rmh@aybabtu.com>
9702
9703 Patch from Simon Peter <dn.tlp@gmx.net>:
9704 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9705 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9706 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9707 util/i386/pc/grub-setup.c_DEPENDENCIES.
9708 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9709 util/grub-probe.c_DEPENDENCIES.
9710 * conf/powerpc-ieee1275.rmk: Likewise.
9711
29d0928c 97122007-08-28 Robert Millan <rmh@aybabtu.com>
9713
9714 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9715 to tell grub-mkdevicemap how to name devices.
9716 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9717 feature).
9718
9719 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9720 util/i386/get_disk_name.c.
9721 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9722 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9723 util/ieee1275/get_disk_name.c.
9724
9725 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9726
9727 * DISTLIST: Add util/i386/get_disk_name.c and
9728 util/ieee1275/get_disk_name.c.
9729
9730 * util/grub-mkdevicemap.c: Replace device naming logic with
9731 grub_util_get_disk_name() calls.
9732
5a0d3cca 97332007-08-20 Robert Millan <rmh@aybabtu.com>
9734
9735 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9736 (so that it works for both plural and singular quantities).
9737
8b72db2f 97382007-08-05 Robert Millan <rmh@aybabtu.com>
9739
9740 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9741 so that [xz] isn't taken into account when determining order.
9742
352466bf 97432007-08-02 Marco Gerards <marco@gnu.org>
9744
9745 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9746 `include/multiboot2.h', `include/grub/elfload.h',
9747 `include/multiboot.h', `include/grub/multiboot.h',
9748 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9749 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9750 `kern/elf.c', `loader/multiboot_loader.c',
9751 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9752 `loader/i386/pc/multiboot2.c',
9753 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9754 `util/i386/pc/grub-mkrescue.in'. Remove
9755 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9756 `include/grub/i386/pc/util/biosdisk.h' and
9757 `include/grub/powerpc/ieee1275/multiboot.h'.
9758
8f096014 97592007-08-02 Bean <bean123ch@gmail.com>
9760
9761 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9762 (ntfs_mod_SOURCES): New variable.
9763 (ntfs_mod_CFLAGS): Likewise.
9764 (ntfs_mod_LDFLAGS): Likewise.
9765
9766 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9767 (grub_probe_SOURCES): Likewise.
9768 (grub_emu_SOURCES): Likewise.
9769
9770 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9771 (grub_emu_SOURCES): Likewise.
9772
9773 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9774 (grub_emu_SOURCES): Likewise.
f19dbdb7 9775
8f096014 9776 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9777
9778 * fs/ntfs.c: New file.
9779
9959f7db 97802007-08-02 Bean <bean123ch@gmail.com>
9781
9782 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9783
9784 * file.h (grub_file): Likewise.
9785
9786 * fshelp.h (grub_fshelp_read_file): Likewise.
9787
9788 * util/i386/pc/grub-setup.c (setup): Likewise.
9789 (save_first_sector): Likewise.
9790 (save_blocklists): Likewise.
f19dbdb7 9791
9959f7db 9792 * fs/affs.c (grub_affs_read_file): Likewise.
9793
9794 * fs/ext2.c (grub_ext2_read_file): Likewise.
9795
9796 * fs/fat.c (grub_fat_read_data): Likewise.
9797
9798 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9799
9800 * fs/hfs.c (grub_hfs_read_file): Likewise.
9801
9802 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9803
9804 * fs/jfs.c (grub_jfs_read_file): Likewise.
9805
9806 * fs/minix.c (grub_minix_read_file): Likewise.
9807
9808 * fs/sfs.c (grub_sfs_read_file): Likewise.
9809
9810 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9811
9959f7db 9812 * fs/xfs.c (grub_xfs_read_file): Likewise.
9813
9814 * command/blocklist.c (read_blocklist): Likewise.
9815 (print_blocklist): Likewise.
9816
0a203f83 98172007-08-02 Marco Gerards <marco@gnu.org>
9818
9819 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9820 `util/hostfs.c'.
9821
9822 * disk/host.c: New file.
9823
9824 * util/hostfs.c: Likewise.
9825
9826 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9827 return `GRUB_ERR_BAD_FS'.
9828 * fs/sfs.c (grub_sfs_mount): Likewise.
9829 * fs/xfs.c (grub_xfs_mount): Likewise.
9830
9831 * include/grub/disk.h (enum grub_disk_dev_id): Add
9832 `GRUB_DISK_DEVICE_HOST_ID'.
9833
9834 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9835
e5dfe777 98362007-07-24 Jerone Young <jerone@gmail.com>
9837
f19dbdb7 9838 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9839 modules for compilation.
9840 * conf/powerpc-ieee1275.rmk: Likewise.
9841
9842 * include/multiboot.h: Move multiboot definitions to one file. Rename
9843 many definitions to not get grub specific.
9844 * include/multiboot2.h: Create header with multiboot 2 definitions.
9845 * include/grub/multiboot.h: Header for grub specific function
9846 prototypes and definitions.
9847 * include/grub/multiboot2.h: Likewise.
9848 * include/grub/multiboot_loader.h: Likewise.
9849 * include/grub/i386/pc/multiboot.h: Removed.
9850 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9851
9852 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9853 and 2 to allow for one multiboot and module commands.
9854 * loader/multiboot2.c: Add multiboot2 functionality.
9855 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9856 and definition names.
9857 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9858 2 functions.
9859 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9860 ieee1275 specific multiboot2 code.
9861
9862 * kern/i386/pc/startup.S: Change headers and definition names for
9863 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9864
daf0f0ba 98652007-07-22 Robert Millan <rmh@aybabtu.com>
9866
9867 * geninitheader.sh: Process file specified in first parameter rather
9868 than hardcoding grub_modules_init.lst.
fe6b695a 9869 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 9870 than hardcoding grub_modules_init.h.
9871
9872 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9873 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9874 grub_probe_init.[ch] and grub_setup_init.[ch].
9875
9876 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9877 grub_modules_init.h with grub_emu_init.h.
9878 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9879 grub_probe_init.[ch] files.
9880 * conf/i386-efi.rmk: Likewise.
9881 * conf/i386-pc.rmk: Likewise.
9882 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9883 grub_setup_init.[ch] files.
9884
9885 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9886 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9887 to initialize modules rather than a list of hardcoded functions.
9888 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9889 grub_init_all() to initialize modules rather than a list of hardcoded
9890 functions.
9891
54cdc1cc 98922007-07-22 Robert Millan <rmh@aybabtu.com>
9893
9894 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9895 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9896
ad0686cc 98972007-07-22 Robert Millan <rmh@aybabtu.com>
9898
9899 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9900 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9901 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9902 flag when running on SmartFirmware.
9903 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9904 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9905 was set.
9906
9907 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9908 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9909 rather than decreasing it.
9910
9911 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9912 there's not enough space to do it, fail in the same way as when it
9913 can't be done because there are no partitions.
9914
9915 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9916 when nvsetenv failed.
9917
969c02ec 99182007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9919
9920 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9921 because this rule is automatically generated.
9922 (grub-mkrescue): Removed for the same reason as above.
9923
5a79f472 99242007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9925
9926 Migrate to GNU General Public License Version 3.
f19dbdb7 9927
5a79f472 9928 * COPYING: Replaced with the plain text version of GPLv3.
9929
9930 * config.guess: Updated from gnulib.
9931 * config.sub: Likewise.
9932
9933 * geninit.sh: Output a GPLv3 copyright notice.
9934 * geninitheader.sh: Likewise.
9935 * genmodsrc.sh: Likewise.
9936 * gensymlist.sh.in: Likewise.
9937
9938 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9939 * boot/i386/pc/diskboot.S: Likewise.
9940 * boot/i386/pc/pxeboot.S: Likewise.
9941 * commands/blocklist.c: Likewise.
9942 * commands/boot.c: Likewise.
9943 * commands/cat.c: Likewise.
9944 * commands/cmp.c: Likewise.
9945 * commands/configfile.c: Likewise.
9946 * commands/echo.c: Likewise.
9947 * commands/help.c: Likewise.
9948 * commands/ls.c: Likewise.
9949 * commands/search.c: Likewise.
9950 * commands/terminal.c: Likewise.
9951 * commands/test.c: Likewise.
9952 * commands/videotest.c: Likewise.
9953 * commands/i386/cpuid.c: Likewise.
9954 * commands/i386/pc/halt.c: Likewise.
9955 * commands/i386/pc/play.c: Likewise.
9956 * commands/i386/pc/reboot.c: Likewise.
9957 * commands/i386/pc/vbeinfo.c: Likewise.
9958 * commands/i386/pc/vbetest.c: Likewise.
9959 * commands/ieee1275/halt.c: Likewise.
9960 * commands/ieee1275/reboot.c: Likewise.
9961 * commands/ieee1275/suspend.c: Likewise.
9962 * disk/loopback.c: Likewise.
9963 * disk/lvm.c: Likewise.
9964 * disk/raid.c: Likewise.
9965 * disk/efi/efidisk.c: Likewise.
9966 * disk/i386/pc/biosdisk.c: Likewise.
9967 * disk/ieee1275/ofdisk.c: Likewise.
9968 * font/manager.c: Likewise.
9969 * fs/affs.c: Likewise.
9970 * fs/ext2.c: Likewise.
9971 * fs/fat.c: Likewise.
9972 * fs/fshelp.c: Likewise.
9973 * fs/hfs.c: Likewise.
9974 * fs/hfsplus.c: Likewise.
9975 * fs/iso9660.c: Likewise.
9976 * fs/jfs.c: Likewise.
9977 * fs/minix.c: Likewise.
9978 * fs/sfs.c: Likewise.
9979 * fs/ufs.c: Likewise.
9980 * fs/xfs.c: Likewise.
9981 * hello/hello.c: Likewise.
9982 * include/grub/acorn_filecore.h: Likewise.
9983 * include/grub/arg.h: Likewise.
9984 * include/grub/bitmap.h: Likewise.
9985 * include/grub/boot.h: Likewise.
9986 * include/grub/cache.h: Likewise.
9987 * include/grub/device.h: Likewise.
9988 * include/grub/disk.h: Likewise.
9989 * include/grub/dl.h: Likewise.
9990 * include/grub/elfload.h: Likewise.
9991 * include/grub/env.h: Likewise.
9992 * include/grub/err.h: Likewise.
9993 * include/grub/file.h: Likewise.
9994 * include/grub/font.h: Likewise.
9995 * include/grub/fs.h: Likewise.
9996 * include/grub/fshelp.h: Likewise.
9997 * include/grub/gzio.h: Likewise.
9998 * include/grub/hfs.h: Likewise.
9999 * include/grub/kernel.h: Likewise.
10000 * include/grub/loader.h: Likewise.
10001 * include/grub/lvm.h: Likewise.
10002 * include/grub/misc.h: Likewise.
10003 * include/grub/mm.h: Likewise.
10004 * include/grub/net.h: Likewise.
10005 * include/grub/normal.h: Likewise.
10006 * include/grub/parser.h: Likewise.
10007 * include/grub/partition.h: Likewise.
10008 * include/grub/pc_partition.h: Likewise.
10009 * include/grub/raid.h: Likewise.
10010 * include/grub/rescue.h: Likewise.
10011 * include/grub/script.h: Likewise.
10012 * include/grub/setjmp.h: Likewise.
10013 * include/grub/symbol.h: Likewise.
10014 * include/grub/term.h: Likewise.
10015 * include/grub/terminfo.h: Likewise.
10016 * include/grub/tparm.h: Likewise.
10017 * include/grub/types.h: Likewise.
10018 * include/grub/video.h: Likewise.
10019 * include/grub/efi/api.h: Likewise.
10020 * include/grub/efi/chainloader.h: Likewise.
10021 * include/grub/efi/console.h: Likewise.
10022 * include/grub/efi/console_control.h: Likewise.
10023 * include/grub/efi/disk.h: Likewise.
10024 * include/grub/efi/efi.h: Likewise.
10025 * include/grub/efi/pe32.h: Likewise.
10026 * include/grub/efi/time.h: Likewise.
10027 * include/grub/i386/linux.h: Likewise.
10028 * include/grub/i386/setjmp.h: Likewise.
10029 * include/grub/i386/types.h: Likewise.
10030 * include/grub/i386/efi/kernel.h: Likewise.
10031 * include/grub/i386/efi/loader.h: Likewise.
10032 * include/grub/i386/efi/time.h: Likewise.
10033 * include/grub/i386/pc/biosdisk.h: Likewise.
10034 * include/grub/i386/pc/boot.h: Likewise.
10035 * include/grub/i386/pc/chainloader.h: Likewise.
10036 * include/grub/i386/pc/console.h: Likewise.
10037 * include/grub/i386/pc/init.h: Likewise.
10038 * include/grub/i386/pc/kernel.h: Likewise.
10039 * include/grub/i386/pc/loader.h: Likewise.
10040 * include/grub/i386/pc/memory.h: Likewise.
10041 * include/grub/i386/pc/multiboot.h: Likewise.
10042 * include/grub/i386/pc/serial.h: Likewise.
10043 * include/grub/i386/pc/time.h: Likewise.
10044 * include/grub/i386/pc/vbe.h: Likewise.
10045 * include/grub/i386/pc/vbeblit.h: Likewise.
10046 * include/grub/i386/pc/vbefill.h: Likewise.
10047 * include/grub/i386/pc/vbeutil.h: Likewise.
10048 * include/grub/i386/pc/vga.h: Likewise.
10049 * include/grub/ieee1275/ieee1275.h: Likewise.
10050 * include/grub/ieee1275/ofdisk.h: Likewise.
10051 * include/grub/powerpc/libgcc.h: Likewise.
10052 * include/grub/powerpc/setjmp.h: Likewise.
10053 * include/grub/powerpc/types.h: Likewise.
10054 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10055 * include/grub/powerpc/ieee1275/console.h: Likewise.
10056 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10057 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10058 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10059 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10060 * include/grub/powerpc/ieee1275/time.h: Likewise.
10061 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10062 * include/grub/sparc64/libgcc.h: Likewise.
10063 * include/grub/sparc64/setjmp.h: Likewise.
10064 * include/grub/sparc64/types.h: Likewise.
10065 * include/grub/sparc64/ieee1275/console.h: Likewise.
10066 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10067 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10068 * include/grub/sparc64/ieee1275/time.h: Likewise.
10069 * include/grub/util/biosdisk.h: Likewise.
10070 * include/grub/util/getroot.h: Likewise.
10071 * include/grub/util/lvm.h: Likewise.
10072 * include/grub/util/misc.h: Likewise.
10073 * include/grub/util/raid.h: Likewise.
10074 * include/grub/util/resolve.h: Likewise.
10075 * io/gzio.c: Likewise.
10076 * kern/device.c: Likewise.
10077 * kern/disk.c: Likewise.
10078 * kern/dl.c: Likewise.
10079 * kern/elf.c: Likewise.
10080 * kern/env.c: Likewise.
10081 * kern/err.c: Likewise.
10082 * kern/file.c: Likewise.
10083 * kern/fs.c: Likewise.
10084 * kern/loader.c: Likewise.
10085 * kern/main.c: Likewise.
10086 * kern/misc.c: Likewise.
10087 * kern/mm.c: Likewise.
10088 * kern/parser.c: Likewise.
10089 * kern/partition.c: Likewise.
10090 * kern/rescue.c: Likewise.
10091 * kern/term.c: Likewise.
10092 * kern/efi/efi.c: Likewise.
10093 * kern/efi/init.c: Likewise.
10094 * kern/efi/mm.c: Likewise.
10095 * kern/i386/dl.c: Likewise.
10096 * kern/i386/efi/init.c: Likewise.
10097 * kern/i386/efi/startup.S: Likewise.
10098 * kern/i386/pc/init.c: Likewise.
10099 * kern/i386/pc/lzo1x.S: Likewise.
10100 * kern/i386/pc/startup.S: Likewise.
10101 * kern/ieee1275/ieee1275.c: Likewise.
10102 * kern/powerpc/cache.S: Likewise.
10103 * kern/powerpc/dl.c: Likewise.
10104 * kern/powerpc/ieee1275/cmain.c: Likewise.
10105 * kern/powerpc/ieee1275/crt0.S: Likewise.
10106 * kern/powerpc/ieee1275/init.c: Likewise.
10107 * kern/powerpc/ieee1275/openfw.c: Likewise.
10108 * kern/sparc64/cache.S: Likewise.
10109 * kern/sparc64/dl.c: Likewise.
10110 * kern/sparc64/ieee1275/init.c: Likewise.
10111 * kern/sparc64/ieee1275/openfw.c: Likewise.
10112 * loader/efi/chainloader.c: Likewise.
10113 * loader/efi/chainloader_normal.c: Likewise.
10114 * loader/i386/efi/linux.c: Likewise.
10115 * loader/i386/efi/linux_normal.c: Likewise.
10116 * loader/i386/pc/chainloader.c: Likewise.
10117 * loader/i386/pc/chainloader_normal.c: Likewise.
10118 * loader/i386/pc/linux.c: Likewise.
10119 * loader/i386/pc/linux_normal.c: Likewise.
10120 * loader/i386/pc/multiboot.c: Likewise.
10121 * loader/i386/pc/multiboot_normal.c: Likewise.
10122 * loader/powerpc/ieee1275/linux.c: Likewise.
10123 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10124 * normal/arg.c: Likewise.
10125 * normal/cmdline.c: Likewise.
10126 * normal/command.c: Likewise.
10127 * normal/completion.c: Likewise.
10128 * normal/execute.c: Likewise.
10129 * normal/function.c: Likewise.
10130 * normal/lexer.c: Likewise.
10131 * normal/main.c: Likewise.
10132 * normal/menu.c: Likewise.
10133 * normal/menu_entry.c: Likewise.
10134 * normal/misc.c: Likewise.
10135 * normal/parser.y: Likewise.
10136 * normal/script.c: Likewise.
10137 * normal/i386/setjmp.S: Likewise.
10138 * normal/powerpc/setjmp.S: Likewise.
10139 * normal/sparc64/setjmp.S: Likewise.
10140 * partmap/acorn.c: Likewise.
10141 * partmap/amiga.c: Likewise.
10142 * partmap/apple.c: Likewise.
10143 * partmap/gpt.c: Likewise.
10144 * partmap/pc.c: Likewise.
10145 * partmap/sun.c: Likewise.
10146 * term/gfxterm.c: Likewise.
10147 * term/terminfo.c: Likewise.
10148 * term/efi/console.c: Likewise.
10149 * term/i386/pc/console.c: Likewise.
10150 * term/i386/pc/serial.c: Likewise.
10151 * term/i386/pc/vesafb.c: Likewise.
10152 * term/i386/pc/vga.c: Likewise.
10153 * term/ieee1275/ofconsole.c: Likewise.
10154 * util/biosdisk.c: Likewise.
10155 * util/console.c: Likewise.
10156 * util/genmoddep.c: Likewise.
10157 * util/getroot.c: Likewise.
10158 * util/grub-emu.c: Likewise.
10159 * util/grub-mkdevicemap.c: Likewise.
10160 * util/grub-probe.c: Likewise.
10161 * util/lvm.c: Likewise.
10162 * util/misc.c: Likewise.
10163 * util/raid.c: Likewise.
10164 * util/resolve.c: Likewise.
10165 * util/update-grub.in: Likewise.
10166 * util/update-grub_lib.in: Likewise.
10167 * util/grub.d/00_header.in: Likewise.
10168 * util/grub.d/10_hurd.in: Likewise.
10169 * util/grub.d/10_linux.in: Likewise.
10170 * util/i386/efi/grub-install.in: Likewise.
10171 * util/i386/efi/grub-mkimage.c: Likewise.
10172 * util/i386/pc/grub-install.in: Likewise.
10173 * util/i386/pc/grub-mkimage.c: Likewise.
10174 * util/i386/pc/grub-mkrescue.in: Likewise.
10175 * util/i386/pc/grub-setup.c: Likewise.
10176 * util/i386/pc/misc.c: Likewise.
10177 * util/powerpc/ieee1275/grub-install.in: Likewise.
10178 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10179 * util/powerpc/ieee1275/misc.c: Likewise.
10180 * video/bitmap.c: Likewise.
10181 * video/video.c: Likewise.
10182 * video/i386/pc/vbe.c: Likewise.
10183 * video/i386/pc/vbeblit.c: Likewise.
10184 * video/i386/pc/vbefill.c: Likewise.
10185 * video/i386/pc/vbeutil.c: Likewise.
10186 * video/readers/tga.c: Likewise.
10187
3572d015 101882007-07-02 Robert Millan <rmh@aybabtu.com>
10189
10190 * conf/i386-efi.rmk: Replace obsolete reference to
10191 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10192 with util/getroot.c.
10193 * conf/powerpc-ieee1275.rmk: Likewise.
10194 * conf/sparc64-ieee1275.rmk: Likewise.
10195
10196 * util/grub-emu.c (main): Fix unchecked pointer handling.
10197
2c2a681b 101982007-07-02 Robert Millan <rmh@aybabtu.com>
10199
10200 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10201 invocation to fail, in order to support partition-less media.
10202
10203 * util/i386/pc/grub-install.in: Likewise.
10204
10205 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10206 which fs or partmap modules are needed (akin to its sister scripts).
10207
10208 Also use grub-probe to get rid of unportable /proc/mounts check.
10209
10210 Print the same informational message that the other scripts do, before
fe6b695a 10211 exiting.
2c2a681b 10212
6193defe 102132007-06-23 Robert Millan <rmh@aybabtu.com>
10214
fe6b695a 10215 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 10216 a font file can be found and, if so, echo the GRUB path to it.
10217
10218 * util/update-grub.in: Handle multiple terminals depending on user
10219 input, platform availability and font file presence. Propagate
10220 variables of our findings to /etc/grub.d/ children.
10221
10222 * util/grub.d/00_header.in: Handle multiple terminals, based on
10223 environment setup by update-grub.
10224
eface1dc 102252007-06-23 Robert Millan <rmh@aybabtu.com>
10226
ba50d28f 10227 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 10228
bf697e28 102292007-06-21 Robert Millan <rmh@aybabtu.com>
10230
10231 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10232 indicate end of data section in kernel image.
10233 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10234 GRUB_KERNEL_MACHINE_DATA_END.
10235
10236 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10237 space for it.
10238 * kern/i386/efi/startup.S: Likewise.
10239
10240 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10241 during image generation. Implement --prefix option to override this
10242 patch.
10243 * util/i386/efi/grub-mkimage.c: Likewise.
10244
10245 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10246 code to make path relative to its root into a separate function.
10247
10248 * util/i386/pc/grub-install.in: Use newly provided
10249 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10250 pass the result to grub-install --prefix.
10251
baa574b4 102522007-06-13 Robert Millan <rmh@aybabtu.com>
10253
10254 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10255 DEFAULT_DEVICE_MAP.
10256 * util/grub-emu.c: Use above definitions from misc.h instead of
10257 defining them.
10258 * util/grub-mkdevicemap.c: Likewise.
10259 * util/i386/pc/grub-setup.c: Likewise.
10260 * util/grub-probe.c: Likewise.
10261 (probe): Abort with grub_util_error() when either
10262 grub_guess_root_device or grub_util_get_grub_dev fails.
10263
0215dcbf 102642007-06-12 Robert Millan <rmh@aybabtu.com>
10265
10266 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10267 "pager" assignment.
10268 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10269 "pcdata".
10270 * util/grub-probe.c (probe): Likewise for "drive_name".
10271
8af2ab7b 102722007-06-11 Robert Millan <rmh@aybabtu.com>
10273
10274 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10275 not just the cdrom one.
10276
59d31694 102772007-06-11 Robert Millan <rmh@aybabtu.com>
10278
10279 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10280 Add --pkglibdir=DIR option to override pkglibdir.
10281 Mention --image-type=TYPE in help output.
10282 Fix --grub-mkimage (it was a no-op).
fe6b695a 10283 Abort gracefully when no parameter is given.
59d31694 10284
7ee367e4 102852007-06-11 Robert Millan <rmh@aybabtu.com>
10286
10287 * util/i386/pc/grub-mkrescue.in: New file.
10288 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10289 * Makefile.in: Handle bin_SCRIPTS.
10290
29b0ed46 102912007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10292
10293 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10294 list of video modes.
10295
c0f90770 102962007-06-06 Robert Millan <rmh@aybabtu.com>
10297
10298 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10299 file doesn't exist, or if it is in a filesystem grub can't read.
10300
10301 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10302 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10303 header comment to fit in 80 columns when the variables are resolved.
10304
10305 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10306 could be identified by update-grub. Remove redundant check for
fe6b695a 10307 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 10308 handles that).
10309
fb36dc26 103102007-06-04 Robert Millan <rmh@aybabtu.com>
10311
10312 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10313
10314 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10315
10316 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10317
0c68c93e 103182007-06-04 Robert Millan <rmh@aybabtu.com>
10319
10320 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10321
10322 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10323 grub_apple_partition_map_fini.
10324
10325 * util/biosdisk.c
10326 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10327 to access >2 TiB disks).
10328
10329 Print disk->total_sectors with %llu instead of %lu, since this
10330 variable is always 64-bit (prevents wrong disk size from being displayed
10331 on either >2 TiB disk or big-endian CPU).
10332
10333 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10334 into a generic case that supports all (sane) partition maps.
10335
10336 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10337 breaks big-endian.
10338
10339 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10340 and grub_apple_partition_map_fini() after that.
10341
0f23eb74 103422007-06-01 Robert Millan <rmh@aybabtu.com>
10343
10344 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10345
10346 * util/grub.d/00_header.in: Only enable gfxterm when
10347 convert_system_path_to_grub_path() succeeds.
10348
42c71976 103492007-05-20 Robert Millan <rmh@aybabtu.com>
10350
10351 * util/update-grub_lib.in: New file.
10352 * DISTLIST: Add update-grub_lib.in.
10353 * conf/common.rmk: Generate update-grub_lib and install it in
10354 $(lib_DATA).
10355 * Makefile.in: Add install routine for $(lib_DATA).
10356
10357 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10358 function provided by update-grub_lib to support arbitrary paths of
10359 unifont.pff.
10360 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10361 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10362
5beb2291 103632007-05-19 Robert Millan <rmh@aybabtu.com>
10364
10365 * commands/i386/cpuid.c: New module.
10366 * DISTLIST: Add it.
10367 * conf/i386-efi.rmk: Enable cpuid.mod.
10368 * conf/i386-pc.rmk: Likewise.
10369
7262eca1 103702007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10371
10372 * kern/disk.c (grub_disk_read): Check return value of
10373 grub_realloc().
10374
260ba823 103752007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10376
10377 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10378 arrays.
10379 * disk/raid.c (grub_raid_open): Likewise.
10380
1ecb6cf2 103812007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10382
10383 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10384 stack instead of on the heap.
10385
10386 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10387 before doing a read on it.
10388
10389 * configure.ac: Only use -fno-stack-protector for the target
10390 environment.
f19dbdb7 10391
21c8cbb1 103922007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10393
10394 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10395 __attribute_ ((unused)) to mode_type argument.
10396
10397 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 10398
21c8cbb1 10399 * kern/misc.c (memcmp): Fix prototype.
10400
10401 * include/grub/partition.h [GRUB_UTIL]
10402 (grub_gpt_partition_map_init): Add prototype.
10403 (grub_gpt_partition_map_fini): Likewise.
10404
10405 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10406 at the right place.
10407
10408 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10409 (grub_fat_read_data): Likewise.
10410 (grub_fat_find_dir): Likewise.
10411
10412 * font/manager.c (find_glyph): Make table a const.
10413 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 10414
849d55d3 104152007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10416
10417 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10418 code, first search for device in /dev/mapper, then in /dev.
10419 (grub_util_get_grub_dev): New function.
10420 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10421 prototype.
10422 * util/grub-probe.c (probe): Remove check for RAID, call
10423 grub_util_get_grub_dev() instead of
10424 grub_util_biosdisk_get_grub_dev().
10425 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10426 grub_util_biosdisk_get_grub_dev().
10427 * util/i386/pc/grub-setup.c (main): Likewise.
10428
8fff7c2f 104292007-05-16 Robert Millan <rmh@aybabtu.com>
10430
10431 * DISTLIST: Update for the latest changes.
10432 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10433 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10434 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10435 grub/util/biosdisk.h.
10436 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10437 grub/util/biosdisk.h.
10438
48e12b52 104392007-05-16 Robert Millan <rmh@aybabtu.com>
10440
10441 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10442
46b9d128 104432007-05-16 Robert Millan <rmh@aybabtu.com>
10444
10445 * util/i386/efi/grub-install.in: New.
10446 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10447 newly added grub-install.
10448 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10449 include.
10450 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10451 grub/util/biosdisk.h.
10452 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10453 grub/util/biosdisk.h.
10454
2d1a40a9 104552007-05-16 Robert Millan <rmh@aybabtu.com>
10456
10457 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10458 * include/grub/util/biosdisk.h: ... here.
10459 * util/i386/pc/biosdisk.c: Moved to ...
10460 * util/biosdisk.c: ... here.
10461 * util/i386/pc/getroot.c: Moved to ...
10462 * util/getroot.c: ... here.
10463 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10464 * util/grub-mkdevicemap.c: ... here.
10465 * util/i386/pc/grub-probe.c: Moved to ...
10466 * util/grub-probe.c: ... here.
10467
9e26e3bc 104682007-05-15 Robert Millan <rmh@aybabtu.com>
10469
10470 * util/update-grub.in: Remove duplicated line in grub.cfg header
10471 message.
10472
57f96397 104732007-05-13 Robert Millan <rmh@aybabtu.com>
10474
10475 * util/update-grub.in: Fix a few assumptions about the devices holding
10476 /, /boot and /boot/grub being the same.
10477 * util/grub.d/00_header.in: Likewise.
10478 * util/grub.d/10_hurd.in: Likewise.
10479 * util/grub.d/10_linux.in: Likewise.
10480
10481 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10482 patterns. Use that to define the `.old' suffix as older than `'.
10483
10484 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10485
10486 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10487 the grub.cfg header message.
10488
2e610d62 104892007-05-11 Robert Millan <rmh@aybabtu.com>
10490
10491 * util/update-grub.in: Create device.map if it doesn't already exist,
10492 before attempting to run grub-probe.
10493 Check for grub-probe and grub-mkdevicemap with the same code
10494 grub-install is using.
10495 Remove test mode.
10496
3f6a10ef 104972007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10498
10499 * Makefile.in: Add the datarootdir autoconf variable.
10500
02e7b75e 105012007-05-09 Robert Millan <rmh@aybabtu.com>
10502
10503 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 10504 fail gracefully if dev->disk->partition == NULL.
02e7b75e 10505
75f396cc 105062007-05-07 Robert Millan <rmh@aybabtu.com>
10507
10508 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10509 determine partition map module.
10510 * util/i386/pc/grub-install.in: Use this feature to decide which
10511 partition module to load, instead of hardcoding pc and gpt.
10512
da65cb36 105132007-05-07 Robert Millan <rmh@aybabtu.com>
10514
10515 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10516 source directory differs from build directory.
10517
b57d6a91 105182007-05-05 Robert Millan <rmh@aybabtu.com>
10519
10520 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10521 initialisation.
10522
509d00f1 105232007-05-05 Robert Millan <rmh@aybabtu.com>
10524
10525 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10526
c48f23ef 105272007-05-05 Robert Millan <rmh@aybabtu.com>
10528
10529 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10530 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10531
20b97658 105322007-05-05 Robert Millan <rmh@aybabtu.com>
10533
10534 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10535 (grub_probe_SOURCES): Likewise.
10536 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10537 GPT and initialize dos_part and bsd_part accordingly.
10538 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10539 install_bsd_part.
10540 (main): Activate gpt module for use during partition identification,
10541 and deactivate it afterwards.
10542 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10543 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10544 partition identification, and deactivate it afterwards.
10545
99123174 105462007-05-05 Robert Millan <rmh@aybabtu.com>
10547
10548 * term/i386/pc/console.c (grub_console_fini): Call
10549 grub_term_set_current() before grub_term_unregister().
10550
ebd97f6e 105512007-05-04 Robert Millan <rmh@aybabtu.com>
10552
10553 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10554 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10555 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10556 and update-grub_DATA.
10557 * conf/common.rmk: Build and install update-grub components.
10558 * conf/common.mk: Regenerate.
10559 * util/update-grub.in: New. Core of update-grub.
10560 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10561 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10562 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10563 * util/grub.d/README: New. Document grub.d directory layout.
10564
b06a264d 105652007-05-01 Robert Millan <rmh@aybabtu.com>
10566
10567 * util/grub-emu.c: Move initialization functions
10568 grub_util_biosdisk_init() and grub_init_all() before
10569 grub_util_biosdisk_get_grub_dev(), which relies on them.
10570
41f0050e 105712007-04-19 Robert Millan <rmh@aybabtu.com>
10572
10573 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10574 it is used later.
10575
04582bb3 105762007-04-18 Jerone Young <jerone@gmail.com>
10577
f19dbdb7 10578 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 10579 stanza.
10580
08db4632 105812007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 10582
08db4632 10583 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10584 continue on and look for device node with real device name.
10585
801b76be 105862007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 10587
fe6b695a 10588 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 10589 ability.
10590 * Makefile.in: Add autoconf package transformation code.
10591 * util/i386/pc/grub-install.in: Likewise.
10592 * util/powerpc/ieee1275/grub-install.in: Likewise.
10593
6795c4e1 105942007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10595
10596 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10597 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10598 (EXT2_REVISION): Likewise.
10599 (EXT2_INODE_SIZE): Likewise.
10600 (struct grub_ext2_block_group): Added a missing member
10601 "used_dirs".
10602 (grub_ext2_read_inode): Divide by the inode size in a superblock
10603 instead of 128 to obtain INODES_PER_BLOCK.
10604 Use the macro EXT2_INODE_SIZE instead of directly using
10605 SBLOCK->INODE_SIZE.
10606
d70af616 106072007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10608
10609 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10610 superblock instead of the structure size to compute an
10611 offset. This fixes the problem that GRUB could not read a
10612 filesystem when inode size is different from 128-byte.
10613
3b801603 106142007-03-05 Marco Gerards <marco@gnu.org>
10615
10616 * normal/main.c (read_config_file): When "menu" is not set, create
10617 an initial context.
10618
4785bfe4 106192007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10620
10621 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10622 (HEAP_LIMIT): New macro.
10623 (grub_claim_heap): Claim memory up to `heaplimit'.
10624
a0cbb023 106252007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10626
10627 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10628 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10629 (_start): Likewise.
10630 (grub_arch_modules_addr): Return address after `_end'.
10631 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10632 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10633 (add_segments): Calculate `_end' from phdr size and location.
10634 (ALIGN_UP): Moved to ...
10635 * include/grub/misc.h: here.
10636 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10637 New macro.
10638 (GRUB_IEEE1275_MODULE_BASE): Removed.
10639
fd7d8eba 106402007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10641
10642 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10643 loop boundary.
10644
9b09e6fc 106452007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10646
10647 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10648 All users updated.
10649 (grub_elf64_load_hook_t): Likewise.
10650 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10651 debug output.
10652
3ce27299 106532007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10654
10655 * kern/mm.c: Update copyright.
10656 (grub_mm_debug): Correct syntax error.
10657 (grub_mm_dump_free): New function.
10658 (grub_debug_free): Call `grub_free'.
10659 * include/grub/mm.h: Update copyright.
10660 (grub_mm_dump_free): Add declaration.
10661
077d5fee 106622007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10663
10664 * include/grub/ieee1275/ieee1275.h: Update copyright.
10665 * kern/powerpc/ieee1275/init.c: Likewise.
10666 * kern/powerpc/ieee1275/openfw.c: Likewise.
10667
10668 * loader/powerpc/ieee1275/linux.c: Likewise.
10669 * include/grub/elfload.h: Likewise.
10670 * kern/elf.c: Likewise.
10671 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10672 callers.
10673 (grub_elf64_load): Likewise.
10674 (grub_elf32_load_segment): Move to a nested function.
10675 (grub_elf64_load_segment): Likewise.
10676
dc946850 106772007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10678
10679 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10680 prototype.
10681 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10682 (grub_heap_len): Likewise.
10683 (HEAP_SIZE): New macro.
10684 (grub_claim_heap): New function.
10685 (grub_machine_init): Don't claim heap directly. Call
10686 `grub_claim_heap'.
10687 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10688 (grub_available_iterate): New function.
10689
baa2a121 106902007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10691
10692 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10693 * configure.ac: Use it for testing the HOST and TARGET compilers.
10694
4fe9862e 106952006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10696
10697 * Makefile.in (enable_grub_emu): New variable.
10698 * configure.ac (--enable-grub-emu): New option.
10699 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10700 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10701 * conf/i386-pc.rmk: Likewise.
10702 * conf/powerpc-ieee1275.rmk: Likewise.
10703 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10704
a8aa5762 107052006-12-12 Marco Gerards <marco@gnu.org>
10706
10707 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10708
10709 * kern/env.c (grub_env_unset): Don't free the member `value' when
10710 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10711 pointer.
10712
10713 * normal/main.c (current_menu): Removed.
10714 (free_menu): Unset the `menu' environment variable.
10715 (grub_normal_menu_addentry): Make use of the environment variable
10716 `menu', instead of using the global `current_menu'. Allocate
10717 memory for the sourcecode of this entry.
10718 (read_config_file): New argument `nested', changed all callers.
10719 Only in the case of a new context, initialize a new menu. Set the
10720 `menu' environment variable.
10721 (grub_normal_execute): Don't set and unset the environment
10722 variable `menu' here anymore. Only free the menu when leaving the
10723 context.
10724
10725 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10726 leak.
10727
957b3a3e 107282006-12-11 Marco Gerards <marco@gnu.org>
10729
10730 * normal/menu_entry.c (run): Fix off by one bug so the last line
10731 is executed. Move the loader check to outside the loop.
10732
ef875714 107332006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10734
10735 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10736
4e739985 107372006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10738
10739 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10740 the number of sectors. Reported by Andrey Shuvikov
10741 <mr_hyro@yahoo.com>.
f19dbdb7 10742
790707f2 107432006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10744
10745 * kern/disk.c (grub_disk_read): When there is a read error, always
10746 try to read only the necessary data.
f19dbdb7 10747
790707f2 10748 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10749 disk/raid.c.
10750 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10751 prototype.
10752 [GRUB_UTIL] (grub_raid_fini): Likewise.
10753 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10754 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10755 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10756 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10757 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10758 and grub_raid_fini().
f19dbdb7 10759
03e58196 107602006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10761
10762 * include/grub/types.h (__unused): Rename to UNUSED.
10763 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10764 (grub_elf64_size): Likewise.
f19dbdb7 10765
ae4f23bf 107662006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10767
10768 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10769 grub_error_push and grub_error_pop in the error-handling path.
10770 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10771 length.
10772
2166cc83 107732006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10774
10775 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10776 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10777 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10778 (kernel_elf_SOURCES): Likewise.
10779 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10780 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10781 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10782 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10783 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10784 (elf_mod_SOURCES): New variable.
10785 (elf_mod_CFLAGS): Likewise.
10786 (elf_mod_LDFLAGS): Likewise.
10787 * include/grub/types.h (__unused): New macro.
10788 * include/grub/elfload.h: New file.
10789 * kern/elf.c: Likewise.
10790 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10791 (ELF32_LOADMASK): New macro.
10792 (ELF64_LOADMASK): Likewise.
10793 (vmlinux): Removed.
10794 (grub_linux_load32): New function.
10795 (grub_linux_load64): Likewise.
10796 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10797 Use grub_elf_t instead of grub_file_t.
10798
a09d5aa5 107992006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10800
10801 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10802 `catch_result' to struct set_color_args.
10803
d976fc51 108042006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10805
10806 * normal/menu.c: Include grub/script.h.
10807 * normal/menu_entry.c: Likewise.
10808 * include/grub/normal.h: Do not include grub/script.h.
10809
67507549 108102006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10811
10812 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10813
69203a99 108142006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10815
10816 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10817 disk.
10818 (grub_disk_close): Print debug messages when closing a disk.
10819 (grub_disk_read): Print debug messages when disk read fails.
10820 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10821 filesystem type.
10822 * kern/partition.c: Include misc.h.
10823 (grub_partition_iterate): Print debug messages when detecting
10824 partition type.
10825
e2b8278c 108262006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10827
10828 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10829 is negative.
10830 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10831
97b2f2ff 108322006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10833
10834 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10835 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10836
6555d655 108372006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10838
10839 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10840 instead of sizeof(lv). Patch by Michael Guntsche.
10841
4d42b77f 108422006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10843
10844 * disk/lvm.c: Rename VGS to VG_LIST.
10845 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10846 (grub_lvm_open): Likewise.
10847 Thanks to Michael Guntsche for finding this bug.
10848
5d74d927 108492006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10850
10851 * configure.ac (AC_INIT): Bumped to 1.95.
10852
a1bb27e4 108532006-10-14 Robert Millan <rmh@aybabtu.com>
10854
10855 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10856 with "/dev/.static/dev/md".
10857
e0994b8b 108582006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10859
10860 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10861 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10862 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10863 DRIVE_NAME are always freed.
10864
10865 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10866 DOS_PART, as a DOS partition is counted from one instead of zero
10867 now. Reported by Robert Millan.
10868
ddd5cee9 108692006-10-14 Robert Millan <rmh@aybabtu.com>
10870
10871 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10872 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10873 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10874 string returned by grub_guess_root_device.
10875 * util/i386/pc/grub-setup.c: Likewise.
10876 * util/i386/pc/grub-probefs.c: Likewise.
10877
10878 * util/i386/pc/grub-probefs.c: Rename to ...
10879 * util/i386/pc/grub-probe.c: ... this.
10880 * DISTLIST: Remove grub-probefs, add grub-probe.
10881 * conf/i386-efi.rmk: Likewise.
10882 * conf/i386-pc.rmk: Likewise.
10883 * util/i386/pc/grub-install.in: Likewise.
10884
10885 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10886 choose which information we want to print.
10887
2b002173 108882006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10889
10890 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10891 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10892 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10893 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10894 video/readers/tga.c and video/i386/pc/vbeutil.c.
10895
108962006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10897
10898 Added support for RAID and LVM.
f19dbdb7 10899
2b002173 10900 * disk/lvm.c: New file.
10901 * disk/raid.c: Likewise.
10902 * include/grub/lvm.h: Likewise.
f19dbdb7 10903 * include/grub/raid.h: Likewise.
2b002173 10904 * include/grub/util/lvm.h: Likewise.
10905 * include/grub/util/raid.h: Likewise.
10906 * util/lvm.c: Likewise.
10907 * util/raid.c: Likewise.
10908
10909 * include/grub/disk.h (grub_disk_dev_id): Add
10910 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10911 (grub_disk_get_size): New prototype.
10912 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10913 returns a partition.
10914 (grub_disk_get_size): New function.
f19dbdb7 10915
2b002173 10916 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10917 verbatim if grub_install_dos_part is -2.
10918
10919 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10920 and LVM devices.
10921
10922 * util/i386/pc/grub-setup.c (setup): New argument
10923 MUST_EMBED. Force embedding of GRUB when the argument is
10924 true. Close FILE before returning.
10925 (main): Add support for RAID and LVM.
f19dbdb7 10926
2b002173 10927 * conf/common.rmk: Add RAID and LVM modules.
10928 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10929 util/lvm.c.
10930 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10931
10932 * kern/misc.c (grub_strstr): New function.
10933 * include/grub/misc.h (grub_strstr): New prototype.
10934
050548d0 109352006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10936
10937 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10938
da849d2d 109392006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10940
10941 * kern/misc.c (grub_strtoull): Guess the base only if not
10942 specified.
10943
97b2f2ff 109442006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 10945
10946 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10947 PowerMac support.
10948
97b2f2ff 109492006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 10950
10951 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10952
10953 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10954 Remove `flags' argument. All callers changed.
10955 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10956 (IEEE1275_IHANDLE_INVALID): New variable.
10957 (IEEE1275_CELL_INVALID): New variable.
10958 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10959 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10960 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10961 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10962 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10963 codes from Open Firmware. All callers updated.
10964 (grub_ieee1275_next_property): Directly return Open Firmware return
10965 code.
10966 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10967 Standardize error checking from `grub_ieee1275_get_property'.
10968 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10969 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10970
97b2f2ff 109712006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 10972
10973 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10974 `instance_to_package_args' to `instance_to_path_args'.
10975
10976 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10977 `grub_ieee1275_chosen'.
10978
10979 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10980 `grub_ieee1275_interpret'.
10981
97b2f2ff 109822006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 10983
10984 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10985
97b2f2ff 109862006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 10987
10988 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10989 (__cmpdi): Likewise.
10990
10991 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10992 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10993 `grub_ssize_t'.
10994
02bb8acc 10995 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 10996
10997 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10998 to type `grub_ssize_t'.
10999 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11000
7f9a8531 110012006-09-22 Marco Gerards <marco@gnu.org>
11002
11003 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11004 newlines.
11005
b5ef1102 110062006-09-22 Marco Gerards <marco@gnu.org>
11007
11008 * commands/echo.c: New file.
11009
11010 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11011
11012 * conf/common.rmk (echo_mod_SOURCES): New variable.
11013 (echo_mod_CFLAGS): Likewise.
11014 (echo_mod_LDFLAGS): Likewise.
11015
2cff3677 110162006-09-22 Marco Gerards <marco@gnu.org>
11017
11018 * normal/main.c (get_line): Malloc memory instead of using
11019 preallocated memory. Removed the arguments `cmdline' and
11020 `max_len'. Updated all callers.
11021
6ba4688b 110222006-09-22 Marco Gerards <marco@gnu.org>
11023
11024 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11025 (normal_mod_DEPENDENCIES): Likewise.
11026
11027 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11028 (normal_mod_DEPENDENCIES): Likewise.
11029
11030 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11031
e02ac02c 110322006-09-22 Johan Rydberg <jrydberg@gnu.org>
11033
11034 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11035 programs.
11036 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11037 (normal_mod_DEPENDENCIES): Likewise.
11038 * conf/i386-pc.mk: Regenerate.
11039 * conf/i386-efi.mk: Likewise
11040 * conf/common.mk: Likewise.
11041 * conf/powerpc-ieee1275.mk: Likewise.
11042 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11043
8d252e44 110442006-09-22 Robert Millan <rmh@aybabtu.com>
11045
11046 Sync with i386 version.
11047 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11048 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11049
209bf7ac 110502006-09-21 Robert Millan <rmh@aybabtu.com>
11051
11052 Import from GRUB Legacy (lib/device.c):
11053 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11054 (init_device_map) [__linux__]: Add support for I2O devices.
11055
6b146090 110562006-09-14 Marco Gerards <marco@gnu.org>
11057
11058 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11059 `-melf_i386'.
11060
e38600a8 110612006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 11062
11063 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11064 /boot/grub/*.lst.
78fa1790 11065
2952da5d 11066 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 11067
2952da5d 11068 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11069 before adding it to device.map.
11070
01b82a64 110712006-08-15 Johan Rydberg <jrydberg@gnu.org>
11072
fe6b695a 11073 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 11074 compiles a file; using the -MD option.
11075 * conf/common.mk: Regenerate.
11076 * conf/i386-pc.mk: Likewise.
11077 * conf/i386-efi.mk: Likewise.
11078 * conf/powerpc-ieee1275.mk: Likewise.
11079 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11080
1064790d 110812006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11082
11083 Move the prototypes of grub_setjmp and grub_longjmp to
11084 cpu/setjmp.h, so that each architecture may specify different
11085 attributes.
f19dbdb7 11086
1064790d 11087 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11088 (grub_longjmp): Likewise.
11089 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11090 (grub_longjmp): Likewise.
11091 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11092 (grub_longjmp): Likewise.
11093
11094 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11095 [!GRUB_UTIL] (grub_longjmp): Removed.
11096
29dda3ed 110972006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11098
11099 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11100 "color!" method does not return any value.
11101
ad2a06ed 111022006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11103
11104 * include/grub/bitmap.h: New file.
11105
11106 * include/grub/i386/pc/vbeutil.h: Likewise.
11107
11108 * video/bitmap.c: Likewise.
11109
11110 * video/readers/tga.c: Likewise.
11111
11112 * video/i386/pc/vbeutil.c: Likewise.
11113
11114 * commands/videotest.c: Code cleanup and updated to reflect to new
11115 video API.
11116
11117 * term/gfxterm.c: Likewise.
11118
11119 * video/video.c: Likewise.
11120
11121 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11122 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11123 (bitmap_mod_SOURCES): New entry.
11124 (bitmap_mod_CFLAGS): Likewise.
11125 (bitmap_mod_LDFLAGS): Likewise.
11126 (tga_mod_SOURCES): Likewise.
11127 (tga_mod_CFLAGS): Likewise.
11128 (tga_mod_LDFLAGS): Likewise.
11129
11130 * include/grub/video.h (grub_video_blit_operators): New enum type.
11131 (grub_video_render_target): Changed as forward declaration and moved
11132 actual definition to be video driver specific.
11133 (grub_video_adapter.blit_bitmap): Added blitting operator.
11134 (grub_video_adapter.blit_render_target): Likewise.
11135 (grub_video_blit_bitmap): Likewise.
11136 (grub_video_blit_render_target): Likewise.
11137
11138 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11139 driver specific render target definition.
11140 (grub_video_vbe_map_rgba): Added driver internal helper.
11141 (grub_video_vbe_unmap_color): Updated to use
11142 grub_video_i386_vbeblit_info.
11143 (grub_video_vbe_get_video_ptr): Likewise.
11144
11145 * include/grub/i386/pc/vbeblit.h
11146 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11147 grub_video_i386_vbeblit_info.
11148 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11149 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11150 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11151 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11152 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11153 (grub_video_i386_vbeblit_index_index): Likewise.
11154 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11155 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11156 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11157 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11158 operator.
11159 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11160 operator.
11161
11162 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11163 include/grub/i386/pc/vbeblit.h.
11164
11165 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11166 Updated to use grub_video_i386_vbeblit_info.
11167 (grub_video_i386_vbefill_R8G8B8): Likewise.
11168 (grub_video_i386_vbefill_index): Likewise.
11169 (grub_video_i386_vbefill): Added generic filler.
11170
11171 * video/i386/pc/vbefill.c: Updated to reflect changes on
11172 include/grub/i386/pc/vbefill.h.
11173
11174 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11175 grub_video_i386_vbeblit_info.
11176 (grub_video_vbe_unmap_color): Likewise.
11177 (grub_video_vbe_blit_glyph): Likewise.
11178 (grub_video_vbe_scroll): Likewise.
11179 (grub_video_vbe_draw_pixel): Removed function.
11180 (grub_video_vbe_get_pixel): Likewise.
11181 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11182 updated code to use it.
11183 (common_blitter): Added common blitter for render target and bitmap.
11184 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11185 (grub_video_vbe_blit_render_target): Likewise.
11186
bc8c036d 111872006-07-30 Johan Rydberg <jrydberg@gnu.org>
11188
11189 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11190 is in text mode if there is no console control protocol instance
11191 available.
11192
684a8eff 111932006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11194
11195 * include/grub/video.h: Code cleanup.
11196
11197 * include/grub/i386/pc/vbe.h: Likewise.
11198
11199 * video/i386/pc/vbe.c: Likewise.
11200
11201 * video/i386/pc/vbeblit.c: Likewise.
11202
11203 * video/i386/pc/vbefill.c: Likewise.
11204
11205 * video/video.c: Likewise. Also added more comments.
11206
5915059b 112072006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11208
11209 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11210 (struct grub_biosdisk_dap): Likewise.
11211
11212 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11213 linkage settings for all functions.
11214
90ce5d56 112152006-07-12 Marco Gerards <marco@gnu.org>
11216
11217 * configure.ac (--enable-mm-debug): Fix typo.
11218
11219 * genkernsyms.sh.in: Use proper quoting for `CC'.
11220
43e7f879 112212006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11222
11223 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11224 (normal_mod_ASFLAGS): Remove "-m32".
11225
4889bdec 112262006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11227
11228 * util/misc.c: Include config.h.
11229 [!HAVE_MEMALIGN]: Do not include malloc.h.
11230 (grub_memalign): Use posix_memalign, if present. Then, use
11231 memalign, if present. Otherwise, emit an error.
11232
11233 * util/grub-emu.c: Do not include malloc.h.
11234
11235 * include/grub/util/misc.h: Include unistd.h. This is required for
11236 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11237 D. Eades III <hde@foobar-qux.org>.
11238
11239 * configure.ac (AC_GNU_SOURCE): Added.
11240 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11241 type.
11242
fd39d4da 112432006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11244
11245 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11246 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11247
b786f3b5 112482006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11249
11250 * include/grub/types.h (grub_host_addr_t): Rename to
11251 grub_target_addr_t.
11252 (grub_host_off_t): Rename to grub_target_off_t.
11253 (grub_host_size_t): Rename to grub_target_size_t.
11254 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11255 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11256
11257 * include/grub/kernel.h (struct grub_module_header): Change type
11258 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11259 (grub_module_info): Likewise.
f19dbdb7 11260
051988bb 112612006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11262
11263 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11264 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11265 Velazquez <jesus.velazquez@gmail.com>.
11266
deae281b 112672006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11268
11269 Count partitions from 1 instead of 0 in the string representation
11270 of partitions. Still use 0-based internally.
f19dbdb7 11271
deae281b 11272 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11273 (sun_partition_map_iterate): Use grub_partition_t instead of
11274 struct grub_partition *. Cast DESC->START_CYLINDER to
11275 grub_uint64_t after converting the endian.
11276 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11277 (sun_partition_map_get_name): Add 1 to P->INDEX.
11278
11279 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11280 PCDATA->DOS_PART.
11281 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11282
11283 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11284 zero instead of one.
11285 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11286 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11287
11288 * partmap/apple.c (apple_partition_map_iterate): Change the type
11289 of POS to unsigned.
11290 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11291 (apple_partition_map_get_name): Add 1 into P->INDEX.
11292
11293 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11294 of POS to unsigned.
11295 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11296 calculate the offset of a partition.
11297 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11298 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11299
11300 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11301 SECTOR to grub_disk_addr_t.
11302 (acorn_partition_map_iterate): Likewise.
11303 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11304 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11305 top.
11306 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11307
11308 * kern/i386/pc/init.c (make_install_device): Add 1 into
11309 GRUB_INSTALL_DOS_PART.
11310
11311 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11312 conditional.
11313
524a1e6a 113142006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11315
11316 Clean up the code to support 64-bit addressing in disks and
11317 files. This change is not enough for filesystems yet.
f19dbdb7 11318
524a1e6a 11319 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11320 type of "start" to grub_uint64_t.
11321 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11322 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11323 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11324 convert addresses.
11325
11326 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11327 to grub_disk_addr_t.
11328
11329 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11330 string.
11331
11332 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11333
11334 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11335 to char *.
11336
11337 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11338
11339 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11340
11341 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11342
11343 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11344 to grub_off_t, to detect an error from grub_file_seek.
11345 (grub_multiboot_load_elf32): Likewise.
11346
11347 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11348 maximum unsigned long value when an overflow is detected.
11349 (grub_strtoull): New function.
11350 (grub_divmod64): Likewise.
11351 (grub_lltoa): use grub_divmod64.
11352
11353 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11354 grub_disk_addr_t.
11355 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11356 the pointer to next character. Use grub_strtoull instead of
11357 grub_strtoul.
11358 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11359 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11360 respectively.
11361
fe6b695a 11362 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 11363 return value is signed.
11364 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11365 test if OFFSET is less than zero, as OFFSET is unsigned now.
11366
11367 * kern/disk.c (struct grub_disk_cache): Change the type of
11368 "sector" to grub_disk_addr_t.
11369 (grub_disk_cache_get_index): Change the type of SECTOR to
11370 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11371 unsigned after shifting.
11372 (grub_disk_cache_invalidate): Change the type of SECTOR to
11373 grub_disk_addr_t.
11374 (grub_disk_cache_unlock): Likewise.
11375 (grub_disk_cache_store): Likewise.
11376 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11377 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11378 grub_disk_addr_t and grub_uint64_t, respectively.
11379 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11380 body, as the value of OFFSET is tweaked by
11381 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11382 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11383 respectively.
11384 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11385 body, as the value of OFFSET is tweaked by
11386 grub_disk_check_range. Change the types of LEN and N to
11387 grub_size_t.
11388
11389 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11390 and "saved_offset" to grub_off_t.
11391 (test_header): Cast BUF to char *.
11392 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11393 to char *.
11394 (grub_gzio_read): Change the types of OFFSET and SIZE to
11395 grub_off_t and grub_size_t, respectively.
11396
11397 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11398 Removed.
11399 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11400 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11401 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11402 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11403 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11404
11405 * include/grub/types.h (grub_off_t): Unconditionally set to
11406 grub_uint64_t.
11407 (grub_disk_addr_t): Changed to grub_uint64_t.
11408
11409 * include/grub/partition.h (struct grub_partition): Change the
11410 types of "start", "len" and "offset" to grub_disk_addr_t,
11411 grub_uint64_t and grub_disk_addr_t, respectively.
11412 (grub_partition_get_start): Return grub_disk_addr_t.
11413 (grub_partition_get_len): Return grub_uint64_t.
11414
11415 * include/grub/misc.h (grub_strtoull): New prototype.
11416 (grub_divmod64): Likewise.
11417
11418 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11419 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11420 grub_off_t, respectively.
11421 All callers and references changed.
11422
11423 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11424 grub_size_t in "read".
11425 All callers and references changed.
11426
11427 * include/grub/file.h (struct grub_file): Change the types of
11428 "offset" and "size" to grub_off_t and grub_off_t,
11429 respectively. Change the type of SECTOR to grub_disk_addr_t in
11430 "read_hook".
11431 (grub_file_read): Change the type of LEN to grub_size_t.
11432 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11433 grub_off_t.
11434 (grub_file_size): Return grub_off_t.
11435 (grub_file_tell): Likewise.
11436 All callers and references changed.
11437
11438 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11439 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11440 "write".
11441 (struct grub_disk): Change the type of "total_sectors" to
11442 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 11443 "read_hook".
524a1e6a 11444 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11445 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11446 (grub_disk_write): Likewise.
11447 All callers and references changed.
11448
11449 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11450 char * for grub_strncmp to silence gcc.
11451 (grub_iso9660_mount): Likewise.
11452 (grub_iso9660_mount): Likewise.
11453 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11454 return statement.
11455 (grub_iso9660_iterate_dir): Likewise.
11456 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11457
11458 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11459 LEN to grub_disk_addr_t and grub_size_t, respectively.
11460
11461 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11462
11463 * fs/jfs.c (grub_jfs_read_file): Likewise.
11464
11465 * fs/minix.c (grub_jfs_read_file): Likewise.
11466
11467 * fs/sfs.c (grub_jfs_read_file): Likewise.
11468
11469 * fs/ufs.c (grub_jfs_read_file): Likewise.
11470
11471 * fs/xfs.c (grub_jfs_read_file): Likewise.
11472
11473 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11474 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11475 respectively.
11476
11477 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11478 BLKNR to -1 instead of returning GRUB_ERRNO.
11479 (grub_ext2_read_file): Change the types of SECTOR and
11480 LEN to grub_disk_addr_t and grub_size_t, respectively.
11481
11482 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11483 LEN to grub_disk_addr_t and grub_size_t, respectively.
11484
11485 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11486 grub_file_read.
11487
11488 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11489 string. Do not cast SECTOR explicitly.
11490
11491 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11492 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11493 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11494 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11495 over 2TB and LBA mode is not supported, raise an error.
11496 (get_safe_sectors): New function.
11497 (grub_biosdisk_read): Use get_safe_sectors.
11498 (grub_biosdisk_write): Likewise.
11499
11500 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11501 (grub_efidisk_write): Likewise.
11502
11503 * disk/loopback.c (delete_loopback): Cosmetic changes.
11504 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11505 correctly.
11506 (grub_loopback_open): Likewise.
11507 (grub_loopback_read): Likewise. Also, change the type of POS to
11508 grub_off_t, and fix the usage of grub_memset.
11509
11510 * commands/i386/pc/play.c: Include grub/machine/time.h.
11511
11512 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11513 print FILE->SIZE.
11514
11515 * commands/configfile.c: Include grub/env.h.
11516
11517 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11518 GRUB_ERRNO directly instead. Change the type of POS to
11519 grub_off_t. Follow the coding standard.
11520
11521 * commands/blocklist.c: Include grub/partition.h.
11522 (grub_cmd_blocklist): Return an error if the underlying device is
11523 not a disk. Take the starting sector of a partition into account,
11524 if a partition is used.
11525
11526 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11527 a length field.
11528 (lba_mode): Support 64-bit addresses.
11529 (chs_mode): Likewise.
11530 (copy_buffer): Adapted to the new offsets of a length field and a
11531 segment field.
11532 (blocklist_default_start): Allocate 64-bit space.
11533
11534 * boot/i386/pc/boot.S (force_lba): Removed.
11535 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 11536 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 11537 space.
11538 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11539 is useless.
11540 (lba_mode): Refactored to support a 64-bit address. More size
11541 optimization.
11542 (setup_sectors): Likewise.
11543
53af98ad 115442006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11545
11546 * DISTLIST: Added include/grub/i386/linux.h. Removed
11547 include/grub/i386/pc/linux.h
11548
11549 * configure.ac (AC_INIT): Bumped to 1.94.
11550
11551 * config.guess: Updated from gnulib.
11552 * config.sub: Likewise.
11553 * install-sh: Likewise.
11554 * mkinstalldirs: Likewise.
11555
b4c1940a 115562006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11557
11558 * conf/common.rmk (grub_modules_init.lst): Depended on
11559 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11560 MODSRCFILES.
11561
11562 * genmk.rb (PModule::rule): Reverted the previous change.
11563
cfca1cfd 115642006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11565
11566 * conf/common.rmk (grub_modules_init.lst): Depends on
11567 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11568 that the target does not exist before producing.
11569 (grub_modules_init.h): Remove the target before generating.
11570 (grub_emu_init.c): Likewise.
11571
11572 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11573
aa6d7826 115742006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11575
11576 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11577 for the target-specific tests. Make sure that we also have the
11578 up-to-date target variables for those tests.
11579
26c607b9 115802006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11581
11582 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11583 (PModule::rule): Likewise.
11584
0162321a 115852006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11586
11587 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11588 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11589 target-specific flags should be prefixed.
11590 (PModule::rule): Likewise.
11591
6c826348 115922006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11593
11594 * configure.ac (CMP): Check if cmp is available explicitly.
11595
b977bf01 115962006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11597
11598 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11599 (target_cpu): New variable.
11600 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 11601
b977bf01 11602 * util/i386/pc/grub-install.in (host_cpu): Removed.
11603 (target_cpu): New variable.
11604 (pkglibdir): Use target_cpu instead of host_cpu.
11605
11606 * util/genmoddep.c: Removed.
f19dbdb7 11607
b977bf01 11608 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11609 instead of GRUB_HOST_SIZEOF_VOID_P.
11610 * kern/dl.c: Likewise.
11611
11612 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11613 ...
11614 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11615 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11616 (GRUB_TARGET_SIZEOF_LONG): ... this.
11617 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11618 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11619 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11620 to ...
11621 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11622 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11623 (GRUB_TARGET_SIZEOF_LONG): ... this.
11624 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11625 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11626 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11627 to ...
11628 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11629 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11630 (GRUB_TARGET_SIZEOF_LONG): ... this.
11631 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11632 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11633
11634 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11635 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11636 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11637 instead of GRUB_HOST_SIZEOF_LONG.
11638 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11639 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11640 GRUB_CPU_WORDS_BIGENDIAN.
11641 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11642 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11643 grub_host_ssize_t.
11644
11645 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11646 (genmoddep_SOURCES): Likewise.
11647 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11648 (genmoddep_SOURCES): Likewise.
11649 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11650 (genmoddep_SOURCES): Likewise.
11651 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11652 Likewise.
11653 (genmoddep_SOURCES): Likewise.
11654
11655 * genmoddep.awk: New file.
11656
11657 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11658 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11659 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11660 (PModule::rule): Likewise.
11661 (Program::rule): Likewise.
11662 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11663 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11664 respectively.
11665
11666 * configure.ac: Rewritten intensively to use host and target
11667 instead of build and host, respectively.
11668
11669 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11670 (host_cpu): Removed.
11671 (target_cpu): New variable.
11672 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11673 (BUILD_CC): Removed.
11674 (BUILD_CFLAGS): Likewise.
11675 (BUILD_CPPFLAGS): Likewise.
11676 (TARGET_CC): New variable.
11677 (TARGET_CFLAGS): Likewise.
11678 (TARGET_CPPFLAGS): Likewise.
11679 (TARGET_LDFLAGS): Likewise.
11680 (AWK): Likewise.
11681 (include): Use target_cpu instead of host_cpu.
11682 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 11683
b977bf01 11684 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11685
f09771a1 116862006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11687
11688 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11689 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11690 field 'false' to 'exec_on_false'.
11691 (grub_script_create_cmdif): Renamed argument names to reflect above
11692 changes.
11693
11694 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11695
11696 * normal/script.c (grub_script_create_cmdif): Likewise.
11697
118f4fb3 116982006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11699
11700 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11701 top.
11702 (grub_hfsplus_btree_recptr): Likewise.
11703 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11704 FILEBLOCK both to pass a block number and store next block
11705 number.
11706 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11707 overflow file correctly. Specify errors appropriately, because
11708 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11709 grub_hfsplus_btree_recptr to get the pointer to a found key.
11710 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11711 is found.
11712
11713 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11714 linux.mod.
11715 (_linux_mod_SOURCES): New variable.
11716 (_linux_mod_CFLAGS): Likewise.
11717 (_linux_mod_LDFLAGS): Likewise.
11718 (linux_mod_SOURCES): Likewise.
11719 (linux_mod_CFLAGS): Likewise.
11720 (linux_mod_LDFLAGS): Likewise.
11721
11722 * DISTLIST: Added loader/i386/efi/linux.c,
11723 loader/i386/efi/linux_normal.c and
11724 include/grub/i386/efi/loader.h.
11725
11726 * loader/i386/efi/linux.c: New file.
11727 * loader/i386/efi/linux_normal.c: Likewise.
11728 * include/grub/i386/efi/loader.h: Likewise.
11729
89a7d726 117302006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11731
11732 * commands/blocklist.c: New file.
11733
11734 * DISTLIST: Added commands/blocklist.c.
11735
11736 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 11737 color for the background, and a darker color for the foreground.
89a7d726 11738 (grub_console_checkkey): Return READ_KEY.
11739 (grub_console_cls): Set the background to
11740 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11741
11742 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11743
11744 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11745 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11746
11747 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11748 prototype.
11749
11750 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11751 BG. The spec is wrong again.
11752
11753 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11754 prototype.
11755 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11756
11757 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11758 commands/blocklist.c.
11759 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11760
89a7d726 11761 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11762 (blocklist_mod_SOURCES): New variable.
11763 (blocklist_mod_CFLAGS): Likewise.
11764 (blocklist_mod_LDFLAGS): Likewise.
11765
75c8f258 117662006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11767
11768 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11769 duplication.
11770 (lba_mode): Use %eax more intensively to reduce the code size.
11771
da2eb181 117722006-05-20 Marco Gerards <marco@gnu.org>
11773
11774 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11775
11776 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11777 for `menuentry'.
11778 (script): Accept leading newlines.
11779 (newlines): New rule to describe 0 or more newlines.
11780 (commands): Accept `command' with trailing newline. Fixed the
11781 order in which arguments were passed to `grub_script_add_cmd'.
11782 Accept commands separated by newlines.
11783 (function): Changed to accept newlines.
11784 (menuentry) Rewritten.
11785
11786 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11787 front of the list, instead of to the end.
11788
577b4050 117892006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11790
11791 * util/i386/pc/grub-install.in (bindir): New variable.
11792 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11793 Shaver <lbgwjl@gmail.com>.
11794
0d6e1189 117952006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11796
11797 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11798 grub/machine/linux.h
11799 * loader/i386/pc/linux.c: Likewise.
11800
11801 * include/grub/i386/pc/linux.h: Moved to ...
11802 * include/grub/i386/linux.h: ... here.
11803
11804 * include/grub/i386/linux.h (struct linux_kernel_params): New
11805 struct.
f19dbdb7 11806
31b86e9f 118072006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11808
11809 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11810 checking.
11811 (grub_video_vbe_blit_glyph): Likewise.
11812 (grub_video_vbe_blit_bitmap): Likewise.
11813 (grub_video_vbe_blit_render_target): Likewise.
11814
83b984de 118152006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11816
11817 * configure.ac (--with-platform): Properly quote the square
11818 brackets.
11819
5f0413bd 118202006-05-08 Marco Gerards <marco@gnu.org>
11821
11822 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11823 this...
11824 (kernel_elf_HEADERS): ...to this. Updated all users.
11825 (grubof_symlist.c): Renamed from this...
11826 (kernel_elf_symlist.c): ...to this. Updated all users.
11827 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11828 (grubof_SOURCES): Renamed from this...
11829 (kernel_elf_SOURCES): ...to this.
11830 (grubof_HEADERS): Renamed from this...
11831 (kernel_elf_HEADERS): ...to this.
11832 (grubof_CFLAGS): Renamed from this...
11833 (kernel_elf_CFLAGS): ...to this.
11834 (grubof_ASFLAGS): Renamed from this...
11835 (kernel_elf_ASFLAGS): ...to this.
11836 (grubof_LDFLAGS): Renamed from this...
11837 (kernel_elf_LDFLAGS): ...to this.
11838
11839 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11840 this...
11841 (kernel_elf_HEADERS): ...to this. Updated all users.
11842 (grubof_symlist.c): Renamed from this...
11843 (kernel_elf_symlist.c): ...to this. Updated all users.
11844 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11845 (grubof_SOURCES): Renamed from this...
11846 (kernel_elf_SOURCES): ...to this.
11847 (grubof_HEADERS): Renamed from this...
11848 (kernel_elf_HEADERS): ...to this.
11849 (grubof_CFLAGS): Renamed from this...
11850 (kernel_elf_CFLAGS): ...to this.
11851 (grubof_ASFLAGS): Renamed from this...
11852 (kernel_elf_ASFLAGS): ...to this.
11853 (grubof_LDFLAGS): Renamed from this...
11854 (kernel_elf_LDFLAGS): ...to this.
11855
11856 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11857 `kernel.elf' instead of `grubof'.
11858
05568c2e 118592006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11860
11861 Add --with-platform to configure. Use pkglibdir instead of
11862 pkgdatadir. This is reported by Roger Leigh.
11863
11864 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11865 (host_vendor): Likewise.
11866 (host_os): Likewise.
11867 (pkgdatadir): Likewise.
11868 (platform): New variable.
11869 (pkglibdir): Likewise.
11870 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 11871
05568c2e 11872 * util/i386/pc/grub-install.in (datadir): Removed.
11873 (host_vendor): Likewise.
11874 (host_os): Likewise.
11875 (pkgdatadir): Likewise.
11876 (platform): New variable.
11877 (pkglibdir): Likewise.
11878 Use PKGLIBDIR instead of PKGDATADIR.
11879
11880 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11881 instead of GRUB_DATADIR.
11882 (main): Likewise.
11883 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11884 (main): Likewise.
11885 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11886 (main): Likewise.
11887
11888 * configure.ac (--with-platform): New option.
11889 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11890
11891 * Makefile.in: Include a makefile based on PLATFORM instead of
11892 HOST_VENDOR.
11893 (pkgdatadir): Not appended by the machine type.
11894 (pkglibdir): Appended by the machine type.
11895 (host_vendor): Removed.
11896 (platform): New variable.
11897 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11898 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11899 (uninstall): Likewise.
11900
4e93851c 119012006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11902
11903 Use the environment context in the menu. Remove the commands
11904 "default" and "timeout", and use variables instead.
f19dbdb7 11905
4e93851c 11906 * normal/menu.c: Include grub/env.h.
11907 (print_entry): Cast TITLE to silence gcc.
11908 (get_timeout): New function.
11909 (set_timeout): Likewise.
11910 (get_entry_number): Likewise.
11911 (run_menu): Use a default entry, a fallback entry and a timeout
11912 in the environment variables "default", "fallback" and
11913 "timeout". Also, tweak the default entry if it is not within the
11914 current menu entries.
11915 (grub_menu_run): Use a fallback entry in the environment variable
11916 "fallback".
11917
11918 * normal/main.c (read_config_file): Do not initialize
11919 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11920 NEWMENU->TIMEOUT.
11921 (grub_normal_execute): Use a data slot to store the menu.
11922
11923 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11924 fallback_entry and timeout.
11925 (struct grub_menu_list): Removed.
11926 (grub_menu_list_t): Likewise.
11927 (struct grub_context): Likewise.
11928 (grub_context_t): Likewise.
11929 (grub_context_get): Likewise.
11930 (grub_context_get_current_menu): Likewise.
11931 (grub_context_push_menu): Likewise.
11932 (grub_context_pop_menu): Likewise.
11933 (grub_default_init): Likewise.
11934 (grub_default_fini): Likewise.
11935 (grub_timeout_init): Likewise.
11936 (grub_timeout_fini): Likewise.
11937
11938 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11939 and timeout.mod.
11940 (normal_mod_SOURCES): Removed normal/context.c.
11941
11942 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11943 commands/default.c, commands/timeout.c and normal/context.c.
11944 (normal_mod_SOURCES): Removed normal/context.c.
11945
11946 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11947 commands/timeout.c and normal/context.c.
11948 (normal_mod_SOURCES): Removed normal/context.c.
11949
11950 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11951 commands/default.c, commands/timeout.c and normal/context.c.
11952 (normal_mod_SOURCES): Removed normal/context.c.
11953
11954 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11955 timeout.mod.
11956 (default_mod_SOURCES): Removed.
11957 (default_mod_CFLAGS): Likewise.
11958 (default_mod_LDFLAGS): Likewise.
11959 (timeout_mod_SOURCES): Removed.
11960 (timeout_mod_CFLAGS): Likewise.
11961 (timeout_mod_LDFLAGS): Likewise.
11962
11963 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11964 normal/context.c.
11965
11966 * commands/default.c: Removed.
11967 * commands/timeout.c: Likewise.
11968 * normal/context.c: Likewise.
11969
1eb9cc1d 119702006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11971
11972 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11973
385bd9c1 119742006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11975
11976 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11977 "next" to "prev" for readability.
11978 (struct grub_env_sorted_var): New struct.
11979 (grub_env_context): Renamed to ...
11980 (initial_context): ... this.
11981 (grub_env_var_context): Renamed to ...
11982 (current_context): ... this.
11983 (grub_env_find): Look only at CURRENT_CONTEXT.
11984 (grub_env_context_open): Rewritten to copy exported variables from
11985 previous context.
11986 (grub_env_context_close): Rewritten according to the new
11987 scheme. Also, add an assertion to prevent the initial context from
11988 removed.
11989 (grub_env_insert): Removed the code for the sorted list.
11990 (grub_env_remove): Likewise.
11991 (grub_env_export): Simply mark the variable with
11992 GRUB_ENV_VAR_GLOBAL.
11993 (grub_env_set): A cosmetic change for naming consistency.
11994 (grub_env_get): Likewise.
11995 (grub_env_unset): Likewise.
11996 (grub_env_iterate): Rewritten to sort variables within this
11997 function.
11998 (grub_register_variable_hook): Fixed for naming consistency. Call
11999 grub_env_find again, only if NAME is not found at the first time.
12000 (mangle_data_slot_name): New function.
12001 (grub_env_set_data_slot): Likewise.
12002 (grub_env_get_data_slot): Likewise.
12003 (grub_env_unset_data_slot): Likewise.
12004
12005 * include/grub/env.h (grub_env_var_type): New enum.
12006 (GRUB_ENV_VAR_LOCAL): New constant.
12007 (GRUB_ENV_VAR_GLOBAL): Likewise.
12008 (GRUB_ENV_VAR_DATA): Likewise.
12009 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12010 "type".
12011 (grub_env_set): Replace VAR with NAME for consistency.
12012 (grub_register_variable_hook): Likewise.
12013 (grub_env_export): Specify the name of the argument.
12014 (grub_env_set_data_slot): New prototype.
12015 (grub_env_get_data_slot): Likewise.
12016 (grub_env_unset_data_slot): Likewise.
12017
7f362539 120182006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12019
12020 Extend the loader so that GRUB can accept a loader which comes
12021 back to GRUB when a loaded image exits. Also, this change adds
12022 support for a chainloader on EFI.
f19dbdb7 12023
7f362539 12024 * term/efi/console.c: Include grub/misc.h.
12025 (grub_console_checkkey): Display a scan code on the top for
12026 debugging. This will be removed once the EFI port gets stable.
12027 Correct the scan code mapping.
12028
12029 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12030 allocate memory from larger regions, in order to reduce the number
12031 of allocated regions. Otherwise, the MacOSX loader panics.
12032 (filter_memory_map): Avoid less than 1MB for compatibility with
12033 other loaders.
12034 (add_memory_regions): Allocate from the tail of a region, if
12035 possible, to avoid allocating a region near to 1MB, for the MacOSX
12036 loader.
12037
12038 * kern/efi/init.c (grub_efi_set_prefix): Specify
12039 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12040
12041 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12042 argument IMAGE_HANDLE and specify it to get a loaded image.
12043 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12044 grub_efi_get_loaded_image.
fe6b695a 12045 (grub_efi_get_filename): Divide the length by the size of
7f362539 12046 grub_efi_char16_t.
12047 (grub_efi_get_device_path): New function.
12048 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12049 the length by the size of grub_efi_char16_t for a file path device
12050 path node.
12051
12052 * kern/loader.c (grub_loader_noreturn): New variable.
12053 (grub_loader_set): Accept a new argument NORETURN. Set
12054 GRUB_LOADER_NORETURN to NORETURN.
12055 All callers changed.
12056 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12057 grub_machine_fini.
12058
12059 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12060 prototype.
12061 (grub_efi_get_loaded_image): Take an argument to specify an image
12062 handle.
12063
12064 * include/grub/loader.h (grub_loader_set): Added one more argument
12065 NORETURN.
12066
12067 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12068 instead of grub_efi_open_protocol.
12069 (grub_efidisk_get_device_name): Likewise.
12070 (grub_efidisk_close): Print a newline.
12071 (grub_efidisk_get_device_handle): Fixed to use
12072 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12073 GRUB_EFI_DEVICE_PATH_TYPE.
12074
12075 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12076 * kern/efi/efi.c (device_path_guid): ... here.
12077
12078 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12079 chain.mod.
12080 (kernel_mod_HEADERS): Added efi/disk.h.
12081 (_chain_mod_SOURCES): New variable.
12082 (_chain_mod_CFLAGS): Likewise.
12083 (_chain_mod_LDFLAGS): Likewise.
12084 (chain_mod_SOURCES): Likewise.
12085 (chain_mod_CFLAGS): Likewise.
12086 (chain_mod_LDFLAGS): Likewise.
12087
12088 * DISTLIST: Added include/grub/efi/chainloader.h,
12089 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12090
12091 * include/grub/efi/chainloader.h: New file.
12092 * loader/efi/chainloader.c: Likewise.
12093 * loader/efi/chainloader_normal.c: Likewise.
12094
c0111d6e 120952006-04-30 Marco Gerards <marco@gnu.org>
12096
12097 * commands/configfile.c (grub_cmd_source): New function.
12098 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12099 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12100
df5341da 121012006-04-30 Marco Gerards <marco@gnu.org>
12102
12103 * normal/execute.c (grub_script_execute_cmd): Change the return
12104 type to `grub_err_t'. Correctly return the error.
12105 (grub_script_execute_cmdline): In case a command line is not a
12106 command or a function, try to interpret it as an assignment.
12107
f85934bd 121082006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12109
12110 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12111 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12112 skip a node whose name is obviously invalid as UTF-16,
12113 i.e. contains a NUL character. Stop the iteration when the last
12114 directory entry is found. Instead of using the return value of
12115 grub_hfsplus_btree_iterate_node, store the value in RET and use
12116 it, because the iterator can be stopped by the last directory
12117 entry.
12118
8f8a2cf8 121192006-04-30 Marco Gerards <marco@gnu.org>
12120
12121 * include/grub/env.h (grub_env_export): New prototype. Reported
12122 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12123
a27e84ce 121242006-04-30 Marco Gerards <marco@gnu.org>
12125
12126 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12127 size of the extents in a catalog file record.
12128
eaef0553 121292006-04-29 Marco Gerards <marco@gnu.org>
12130
12131 * commands/configfile.c (grub_cmd_configfile): Execute the
12132 configfile within its own context.
12133
12134 * include/grub/env.h (grub_env_context_open): New prototype.
12135 (grub_env_context_close): Likewise.
12136
12137 * kern/env.c (grub_env): Removed.
12138 (grub_env_sorted): Likewise.
12139 (grub_env_context): New variable.
12140 (grub_env_var_context): Likewise.
12141 (grub_env_find): Search both the active context and the global
12142 context.
12143 (grub_env_context_open): New function.
12144 (grub_env_context_close): Likewise.
12145 (grub_env_insert): Likewise.
12146 (grub_env_remove): Likewise.
12147 (grub_env_export): Likewise.
12148 (grub_env_set): Changed to use helper functions to avoid code
12149 duplication.
12150 (grub_env_iterate): Rewritten so both the current context and the
12151 global context are being used.
12152
12153 * normal/command.c (export_command): New function.
12154 (grub_command_init): Register the `export' function.
12155
7b455f4d 121562006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12157
12158 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12159 explicitly to suppress gcc's warnings.
12160 * fs/fat.c (grub_fat_find_dir): Likewise.
12161 (grub_fat_label): Likewise.
12162 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12163 (grub_xfs_mount): Likewise.
12164 (grub_xfs_label): Likewise.
12165 * fs/affs.c (grub_affs_mount): Likewise.
12166 (grub_affs_label): Likewise.
12167 (grub_affs_iterate_dir): Likewise.
12168 * fs/sfs.c (grub_sfs_mount): Likewise.
12169 (grub_sfs_iterate_dir): Likewise.
12170 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12171 * fs/hfs.c (grub_hfs_mount): Likewise.
12172 (grub_hfs_cmp_catkeys): Likewise.
12173 (grub_hfs_find_dir): Likewise.
12174 (grub_hfs_dir): Likewise.
12175 (grub_hfs_label): Likewise.
12176 * fs/jfs.c (grub_jfs_mount): Likewise.
12177 (grub_jfs_opendir): Likewise.
12178 (grub_jfs_getent): Likewise.
12179 (grub_jfs_lookup_symlink): Likewise.
12180 (grub_jfs_label): Likewise.
12181 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12182 (grub_hfsplus_iterate_dir): Likewise.
12183 (grub_hfsplus_btree_iterate_node): Made static.
12184
12185 * util/grub-emu.c (prefix): New variable.
12186 (grub_machine_set_prefix): New function.
12187 (main): Do not set the environment variable "prefix" here. Only
12188 set PREFIX, which is used later by grub_machine_set_prefix.
12189
12190 * include/grub/video.h: Do not include grub/symbol.h.
12191 (grub_video_register): Not exported. This symbol is not defined in
12192 the kernel.
12193 (grub_video_unregister): Likewise.
12194 (grub_video_iterate): Likewise.
12195 (grub_video_setup): Likewise.
12196 (grub_video_restore): Likewise.
12197 (grub_video_get_info): Likewise.
12198 (grub_video_get_blit_format): Likewise.
12199 (grub_video_set_palette): Likewise.
12200 (grub_video_get_palette): Likewise.
12201 (grub_video_set_viewport): Likewise.
12202 (grub_video_get_viewport): Likewise.
12203 (grub_video_map_color): Likewise.
12204 (grub_video_map_rgb): Likewise.
12205 (grub_video_map_rgba): Likewise.
12206 (grub_video_fill_rect): Likewise.
12207 (grub_video_blit_glyph): Likewise.
12208 (grub_video_blit_bitmap): Likewise.
12209 (grub_video_blit_render_target): Likewise.
12210 (grub_video_scroll): Likewise.
12211 (grub_video_swap_buffers): Likewise.
12212 (grub_video_create_render_target): Likewise.
12213 (grub_video_delete_render_target): Likewise.
12214 (grub_video_set_active_render_target): Likewise.
12215
12216 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12217 Undefined.
12218 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12219
12220 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12221 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12222 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12223 instead of $(srcdir)/genkernsyms.sh.
12224
12225 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12226 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12227 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12228 instead of $(srcdir)/genkernsyms.sh.
12229
12230 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12231 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12232 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12233 instead of $(srcdir)/genkernsyms.sh.
12234
12235 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12236 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12237 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12238 instead of $(srcdir)/genkernsyms.sh.
12239
12240 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12241 genkernsyms.sh.
12242
12243 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12244 genkernsyms.sh.
12245 (gensymlist.sh): New target.
12246 (genkernsyms.sh): Likewise.
12247
12248 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12249 genkernsyms.sh.in and gensymlist.sh.in.
12250
12251 * genkernsyms.sh: Removed.
12252 * gensymlist.sh: Likewise.
f19dbdb7 12253
7b455f4d 12254 * genkernsyms.sh.in: New file.
12255 * gensymlist.sh.in: Likewise.
12256
1885bb27 122572006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12258
12259 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12260 clobber "prefix", since we may have already set it manually.
12261
71538dff 122622006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12263
12264 * kern/misc.c (abort): New alias for grub_abort.
12265
2965c7cc 122662006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12267
12268 A new machine-specific function "grub_machine_set_prefix" is
12269 defined. This is called after loading modules, so that a prefix
12270 initialization can use modules. Also, this change adds an
12271 intensive debugging feature for the memory manager via the
12272 configure option "--enable-mm-debug".
f19dbdb7 12273
2965c7cc 12274 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12275 PART.LEN.
12276
12277 * kern/sparc64/ieee1275/init.c (abort): Removed.
12278 (grub_stop): Likewise.
12279 (grub_exit): New function.
12280 (grub_set_prefix): Renamed to ...
12281 (grub_machine_set_prefix): ... this.
12282 (grub_machine_init): Do not call grub_set_prefix.
12283
12284 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12285 (grub_machine_set_prefix): ... this.
12286 (grub_machine_init): Do not call grub_set_prefix.
12287
12288 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12289 (grub_machine_init): Do not set the prefix here.
12290
12291 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12292
12293 * kern/efi/init.c: Include grub/mm.h.
12294 (grub_efi_set_prefix): New function.
12295
12296 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12297 (grub_efi_get_filename): New function.
12298 (grub_print_device_path): Renamed to ...
12299 (grub_efi_print_device_path): ... this.
12300
12301 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12302 [MM_DEBUG] (grub_realloc): Likewise.
12303 [MM_DEBUG] (grub_free): Likewise.
12304 [MM_DEBUG] (grub_memalign): Likewise.
12305 [MM_DEBUG] (grub_mm_debug): New variable.
12306 [MM_DEBUG] (grub_debug_malloc): New function.
12307 [MM_DEBUG] (grub_debug_free): New function.
12308 [MM_DEBUG] (grub_debug_realloc): New function.
12309 [MM_DEBUG] (grub_debug_memalign): New function.
12310
12311 * kern/misc.c (grub_abort): Print a newline to distinguish
12312 the message.
12313
12314 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12315 grub_set_root_dev after loading modules. This is necessary when
12316 setting a prefix depends on modules.
12317
12318 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12319 (grub_efi_print_device_path): ... this.
12320 (grub_efi_get_filename): New prototype.
12321 (grub_efi_set_prefix): Likewise.
12322
12323 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12324 and grub/disk.h.
12325 (grub_efidisk_get_device_handle): New prototype.
12326 (grub_efidisk_get_device_name): Likewise.
12327
12328 * include/grub/mm.h: Include config.h.
12329 (MM_DEBUG): Removed.
12330 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12331 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12332 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12333 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12334 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12335 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12336 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12337 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12338 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12339
12340 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12341
12342 * disk/efi/efidisk.c: Include grub/partition.h.
12343 (iterate_child_devices): New function.
12344 (add_device): First, compare only last device path nodes, so that
12345 devices are sorted by the types.
12346 (grub_efidisk_get_device_handle): New function.
12347 (grub_efidisk_get_device_name): Likewise.
12348
12349 * configure.ac (--enable-mm-debug): New option to enable the
12350 memory manager debugging feature. This makes the binary much
12351 bigger, so is disabled by default.
12352
9cacaa17 123532006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12354
12355 Use grub_abort instead of grub_stop, and grub_exit must be
12356 define in each architecture now. Also, this change adds support
12357 for EFI disks.
f19dbdb7 12358
9cacaa17 12359 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12360 (grub_getkey): New function.
12361 (grub_term_get_current): Likewise.
12362
12363 * util/i386/pc/grub-setup.c: Include grub/term.h.
12364 (grub_getkey): New function.
12365 (grub_term_get_current): Likewise.
12366
12367 * util/misc.c (grub_stop): Renamed to ...
12368 (grub_exit): ... this.
12369
12370 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12371 (grub_exit): ... this.
12372 (grub_machine_init): Use grub_abort instead of abort.
12373 (grub_stop): Removed.
12374
12375 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12376 abort.
12377
12378 * kern/i386/pc/startup.S (grub_exit): New function.
12379 (cold_reboot): New label.
12380
12381 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12382 (grub_efi_init): Call grub_efidisk_init.
12383 (grub_efi_fini): Call grub_efidisk_fini.
12384
12385 * kern/efi/efi.c: Include grub/mm.h.
12386 (grub_efi_console_control_guid): Renamed to ...
12387 (console_control_guid): ... this.
12388 (grub_efi_loaded_image_guid): Renamed to ...
12389 (loaded_image_guid): ... this.
12390 (grub_efi_locate_handle): New function.
12391 (grub_efi_open_protocol): Likewise.
12392 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12393 GRUB_EFI_CONSOLE_CONTROL_GUID.
12394 (grub_efi_exit): Removed.
12395 (grub_stop): Likewise.
12396 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12397 (grub_exit): New function.
12398 (grub_print_device_path): Likewise.
12399
12400 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12401 (grub_enter_rescue_mode): Register "exit".
12402
12403 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12404 (grub_abort): New function.
12405
12406 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12407
12408 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12409
12410 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12411
12412 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12413 (grub_print_device_path): New prototype.
12414 (grub_efi_locate_handle): Likewise.
12415 (grub_efi_open_protocol): Likewise.
12416
12417 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12418 * disk/efi/efidisk.c: Likewise.
12419
12420 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12421
12422 * include/grub/efi/console_control.h
12423 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12424
12425 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12426 last 8 bytes as an array.
12427 (GRUB_EFI_DISK_IO_GUID): New macro.
12428 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12429 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12430 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12431 grub_uint8_t.
12432 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12433 (struct grub_efi_device_path): Rename the member "sub_type" to
12434 "subtype".
12435 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12436 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12437 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12438 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12439 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12440 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12441 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12442 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12443 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12444 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12445 (struct grub_efi_pci_device_path): New structure.
12446 (grub_efi_pci_device_path_t): New type.
12447 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12448 (struct grub_efi_pccard_device_path): New structure.
12449 (grub_efi_pccard_device_path_t): New type.
12450 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12451 (struct grub_efi_memory_mapped_device_path): New structure.
12452 (grub_efi_memory_mapped_device_path_t): New type.
12453 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12454 (struct grub_efi_vendor_device_path): New structure.
12455 (grub_efi_vendor_device_path_t): New type.
12456 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12457 (struct grub_efi_controller_device_path): New structure.
12458 (grub_efi_controller_device_path_t): New type.
12459 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12460 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12461 (struct grub_efi_acpi_device_path): New structure.
12462 (grub_efi_acpi_device_path_t): New type.
12463 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12464 (struct grub_efi_expanded_acpi_device_path): New structure.
12465 (grub_efi_expanded_acpi_device_path_t): New type.
12466 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12467 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12468 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12469 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12470 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12471 (struct grub_efi_atapi_device_path): New structure.
12472 (grub_efi_atapi_device_path_t): New type.
12473 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12474 (struct grub_efi_fibre_channel_device_path): New structure.
12475 (grub_efi_fibre_channel_device_path_t): New type.
12476 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12477 (struct grub_efi_1394_device_path): New structure.
12478 (grub_efi_1394_device_path_t): New type.
12479 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12480 (struct grub_efi_usb_device_path): New structure.
12481 (grub_efi_usb_device_path_t): New type.
12482 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12483 (struct grub_efi_usb_class_device_path): New structure.
12484 (grub_efi_usb_class_device_path_t): New type.
12485 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12486 (struct grub_efi_i2o_device_path): New structure.
12487 (grub_efi_i2o_device_path_t): New type.
12488 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12489 (struct grub_efi_mac_address_device_path): New structure.
12490 (grub_efi_mac_address_device_path_t): New type.
12491 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12492 (struct grub_efi_ipv4_device_path): New structure.
12493 (grub_efi_ipv4_device_path_t): New type.
12494 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12495 (struct grub_efi_ipv6_device_path): New structure.
12496 (grub_efi_ipv6_device_path_t): New type.
12497 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12498 (struct grub_efi_infiniband_device_path): New structure.
12499 (grub_efi_infiniband_device_path_t): New type.
12500 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12501 (struct grub_efi_uart_device_path): New structure.
12502 (grub_efi_uart_device_path_t): New type.
12503 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12504 (struct grub_efi_vendor_messaging_device_path): New structure.
12505 (grub_efi_vendor_messaging_device_path_t): New type.
12506 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12507 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12508 (struct grub_efi_hard_drive_device_path): New structure.
12509 (grub_efi_hard_drive_device_path_t): New type.
12510 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12511 (struct grub_efi_cdrom_device_path): New structure.
12512 (grub_efi_cdrom_device_path_t): New type.
12513 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12514 (struct grub_efi_vendor_media_device_path): New structure.
12515 (grub_efi_vendor_media_device_path_t): New type.
12516 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12517 (struct grub_efi_file_path_device_path): New structure.
12518 (grub_efi_file_path_device_path_t): New type.
12519 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12520 (struct grub_efi_protocol_device_path): New structure.
12521 (grub_efi_protocol_device_path_t): New type.
12522 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12523 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12524 (struct grub_efi_bios_device_path): New structure.
12525 (grub_efi_bios_device_path_t): New type.
12526 (struct grub_efi_disk_io): New structure.
12527 (grub_efi_disk_io_t): New type.
12528 (struct grub_efi_block_io_media): New structure.
12529 (grub_efi_block_io_media_t): New type.
12530 (struct grub_efi_block_io): New structure.
12531 (grub_efi_block_io_t): New type.
12532
12533 * include/grub/misc.h (grub_stop): Removed.
12534 (grub_exit): New prototype.
12535 (grub_abort): Likewise.
12536
12537 * include/grub/disk.h (enum grub_disk_dev_id): Added
12538 GRUB_DISK_DEVICE_EFIDISK_ID.
12539
12540 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12541 disk/efi/efidisk.c.
12542 (kernel_syms.lst): Remove the target if an error occurs.
12543
49986a9f 125442006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12545
12546 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12547 as it was simply too buggy.
12548
970d3b8a 125492006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12550
12551 * kern/misc.c (grub_lltoa): New function.
12552 (grub_vsprintf): Added support for the long long suffix,
12553 i.e. "ll".
12554
ff04ec24 125552006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12556
12557 * Makefile.in (LDFLAGS): Add variable.
12558 (LD): Remove variable.
12559 * configure.ac: Add -m32 to LDFLAGS.
12560 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12561 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12562 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12563 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12564 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12565 variables.
12566 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12567 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12568 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12569
37e5e1a4 125702006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12571
12572 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12573 length for unknown glyph.
12574
c352d8dd 125752006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12576
2eab1c0d 12577 Add support for pre-loaded modules into the EFI port.
f19dbdb7 12578
2eab1c0d 12579 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12580 completely. Accept one more argument DIR. The caller has changed.
12581
12582 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12583
12584 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12585 (grub_efi_loaded_image_guid): New variable.
12586 (grub_efi_get_loaded_image): New function.
12587 (grub_arch_modules_addr): Likewise.
12588
12589 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12590 prototype.
12591
12592 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12593 (struct grub_efi_loaded_image): New structure.
12594 (grub_efi_loaded_image_t): New type.
12595
125962006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12597
c352d8dd 12598 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12599 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12600 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12601
6d01d6b4 126022006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12603
12604 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12605
976a4ea0 126062006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12607
12608 * DISTLIST: Added include/grub/efi/console.h,
12609 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12610 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12611
12612 * include/grub/efi/console.h: New file.
12613 * include/grub/efi/time.h: Likewise.
12614 * include/grub/i386/efi/kernel.h: Likewise.
12615 * kern/efi/init.c: Likewise.
12616 * kern/efi/mm.c: Likewise.
12617 * term/efi/console.c: Likewise.
f19dbdb7 12618
976a4ea0 12619 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12620 (grub_stop): Removed.
12621 (grub_get_rtc): Likewise.
12622 (grub_machine_init): Simply call grub_efi_init.
12623 (grub_machine_fini): Call grub_efi_fini.
12624
12625 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12626 (grub_efi_output_string): Removed.
12627 (grub_efi_stall): New function.
12628 (grub_stop): Likewise.
12629 (grub_get_rtc): Likewise.
12630
12631 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12632 (grub_efi_stall): New prototype.
12633 (grub_efi_allocate_pages): Likewise.
12634 (grub_efi_free_pages): Likewise.
12635 (grub_efi_get_memory_map): Likewise.
12636 (grub_efi_mm_init): Likewise.
12637 (grub_efi_mm_fini): Likewise.
12638 (grub_efi_init): Likewise.
12639 (grub_efi_fini): Likewise.
12640
12641 * include/grub/i386/efi/time.h: Do not include
12642 grub/symbol.h. Include grub/efi/time.h.
12643 (GRUB_TICKS_PER_SECOND): Removed.
12644 (grub_get_rtc): Likewise.
12645
12646 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12647 Added padding. The EFI spec is buggy.
12648 (GRUB_EFI_BLACK): New macro.
12649 (GRUB_EFI_BLUE): Likewise.
12650 (GRUB_EFI_GREEN): Likewise.
12651 (GRUB_EFI_CYAN): Likewise.
12652 (GRUB_EFI_RED): Likewise.
12653 (GRUB_EFI_MAGENTA): Likewise.
12654 (GRUB_EFI_BROWN): Likewise.
12655 (GRUB_EFI_LIGHTGRAY): Likewise.
12656 (GRUB_EFI_BRIGHT): Likewise.
12657 (GRUB_EFI_DARKGRAY): Likewise.
12658 (GRUB_EFI_LIGHTBLUE): Likewise.
12659 (GRUB_EFI_LIGHTGREEN): Likewise.
12660 (GRUB_EFI_LIGHTCYAN): Likewise.
12661 (GRUB_EFI_LIGHTRED): Likewise.
12662 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12663 (GRUB_EFI_YELLOW): Likewise.
12664 (GRUB_EFI_WHITE): Likewise.
12665 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12666 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12667 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12668 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12669 (GRUB_EFI_BACKGROUND_RED): Likewise.
12670 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12671 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12672 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12673 (GRUB_EFI_TEXT_ATTR): Likewise.
12674
12675 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12676 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12677 (kernel_mod_HEADERS): Added efi/time.h.
12678
83709125 126792006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12680
12681 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12682 include/grub/efi/api.h, include/grub/efi/console_control.h,
12683 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12684 include/grub/i386/efi/time.h, kern/efi/efi.c,
12685 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12686 and util/i386/efi/grub-mkimage.c.
12687
12688 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12689
12690 * genmk.rb (PModule#rule): Do not export symbols if
12691 #{prefix}_EXPORTS is set to "no".
12692
12693 * conf/i386-efi.mk: New file.
12694 * conf/i386-efi.rmk: Likewise.
12695 * include/grub/efi/api.h: Likewise.
12696 * include/grub/efi/console_control.h: Likewise.
12697 * include/grub/efi/efi.h: Likewise.
12698 * include/grub/efi/pe32.h: Likewise.
12699 * include/grub/i386/efi/time.h: Likewise.
12700 * kern/efi/efi.c: Likewise.
12701 * kern/i386/efi/init.c: Likewise.
12702 * kern/i386/efi/startup.S: Likewise.
12703 * util/i386/efi/grub-mkimage.c: Likewise.
12704
127052006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 12706
12707 * include/grub/script.h: Include <grub/parser.h> and
12708 "grub_script.tab.h".
12709 (struct grub_lexer_param): New struct.
12710 (struct grub_parser_param): Likewise.
12711 (grub_script_create_arglist): Pass the state in an argument.
12712 (grub_script_add_arglist): Likewise.
12713 (grub_script_create_cmdline): Likewise.
12714 (grub_script_create_cmdblock): Likewise.
12715 (grub_script_create_cmdif): Likewise.
12716 (grub_script_create_cmdmenu): Likewise.
12717 (grub_script_add_cmd): Likewise.
12718 (grub_script_arg_add): Likewise.
12719 (grub_script_lexer_ref): Likewise.
12720 (grub_script_lexer_deref): Likewise.
12721 (grub_script_lexer_record_start): Likewise.
12722 (grub_script_lexer_record_stop): Likewise.
12723 (grub_script_mem_record): Likewise.
12724 (grub_script_mem_record_stop): Likewise.
12725 (grub_script_malloc): Likewise.
12726 (grub_script_yylex): Likewise.
12727 (grub_script_yyparse): Likewise.
12728 (grub_script_yyerror): Likewise.
12729 (grub_script_yylex): Likewise.
12730 (grub_script_lexer_init): Return the state.
12731
12732 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12733 (grub_script_lexer_done): Likewise.
12734 (grub_script_lexer_getline): Likewise.
12735 (grub_script_lexer_refs): Likewise.
12736 (script): Likewise.
12737 (newscript): Likewise.
12738 (record): Likewise.
12739 (recording): Likewise.
12740 (recordpos): Likewise.
12741 (recordlen): Likewise.
12742 (grub_script_lexer_init): Return the state instead of setting
12743 global variables.
12744 (grub_script_lexer_ref): Use the newly added argument for state
12745 instead of globals.
12746 (grub_script_lexer_deref): Likewise.
12747 (grub_script_lexer_record_start): Likewise.
12748 (grub_script_lexer_record_stop): Likewise.
12749 (recordchar): Likewise.
12750 (nextchar): Likewise.
12751 (grub_script_yylex2): Likewise.
12752 (grub_script_yylex): Likewise.
12753 (grub_script_yyerror): Likewise.
12754
12755 * normal/parser.y (func_mem): Removed variable.
12756 (menu_entry): Likewise.
12757 (err): Likewise.
12758 (%lex-param): New parser option.
12759 (%parse-param): Likewise.
12760 (script): Always return the AST.
12761 (argument): Pass the state around.
12762 (arguments): Likewise.
12763 (grubcmd): Likewise.
12764 (commands): Likewise.
12765 (function): Likewise.
12766 (menuentry): Likewise.
12767 (if_statement): Likewise.
12768 (if): Likewise.
12769
12770 * normal/script.c (grub_script_memused): Removed variable.
12771 (grub_script_parsed): Likewise.
12772 (grub_script_malloc): Added a state argument. Use that instead of
12773 global variables.
12774 (grub_script_mem_record): Likewise.
12775 (grub_script_mem_record_stop): Likewise.
12776 (grub_script_arg_add): Likewise.
12777 (grub_script_add_arglist): Likewise.
12778 (grub_script_create_cmdline): Likewise.
12779 (grub_script_create_cmdif): Likewise.
12780 (grub_script_create_cmdmenu): Likewise.
12781 (grub_script_add_cmd): Likewise.
12782 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12783
e2a8c904 127842006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12785
12786 * normal/command.c (grub_command_init): Remove the title command.
12787
12788 * normal/lexer.c (grub_script_yylex): Renamed from this...
12789 (grub_script_yylex2): ... to this.
12790 (grub_script_yylex): New function. Temporary
12791 introduced to filter some tokens.
12792 (grub_script_yyerror): Print a newline.
12793
12794 * normal/main.c (read_config_file): Output information about the
12795 lines that contain errors. Wait for a key after all lines have
12796 been processed. Don't return an empty menu.
12797
12798 * normal/parser.y (func_mem): Don't initialize.
12799 (menu_entry): Likewise.
12800 (err): New variable.
12801 (script): Don't return anything when an error was encountered.
12802 (ws, returns): Removed rules.
12803 (argument): Disabled concatenated variable support.
12804 (arguments): Remove explicit separators.
12805 (grubcmd): Likewise.
12806 (function): Likewise.
12807 (menuentry): Likewise.
12808 (if): Likewise.
12809 (commands): Likewise. Add error handling.
12810
12811 * normal/script.c (grub_script_create_cmdline): If
12812 `grub_script_parsed' is 0, assume the parser encountered an error.
12813
c9a86192 128142006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12815
12816 * configure.ac: Add support for EFI. Fix the typo
12817 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12818
70f3b243 128192006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12820
12821 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12822 foreign multibyte characters should be shown correctly.
12823
65f201ad 128242006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12825
12826 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12827 calculation.
12828 (read_config_file): Made it to close file before returning.
12829
b4b93674 128302006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12831
12832 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12833 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12834 video/i386/pc/vbefill.c.
12835
12836 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12837 video/i386/pc/vbefill.c.
12838
12839 * include/grub/video.h (grub_video_blit_format): New enum.
12840 (grub_video_mode_info): Added new member blit_format.
12841 (grub_video_get_blit_format): New function prototype.
12842
12843 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12844 function prototype.
12845 (grub_video_vbe_map_rgb): Likewise.
12846 (grub_video_vbe_unmap_color): Likewise.
12847
12848 * include/grub/i386/pc/vbeblit.h: New file.
12849
12850 * include/grub/i386/pc/vbefill.h: New file.
12851
12852 * video/video.c (grub_video_get_blit_format): New function.
12853 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12854 (grub_video_vbe_map_rgb): Likewise.
12855 (grub_video_vbe_unmap_color): Likewise.
12856
12857 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12858 optimized fills.
12859 (grub_video_vbe_blit_render_target): Changed to use more optimized
12860 blits.
12861 (grub_video_vbe_setup): Added detection for optimized settings.
12862 (grub_video_vbe_create_render_target): Likewise.
12863
12864 * video/i386/pc/vbeblit.c: New file.
12865
12866 * video/i386/pc/vbefill.c: New file.
12867
c2379b9c 128682006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12869
12870 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12871 here...
12872
12873 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12874 parsing to support both hex and dec ranges. If filename was missing
12875 show usage information.
12876
bd0d7896 128772006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12878
12879 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12880 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12881
12882 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12883 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12884 (video_mod_SOURCES): Added.
12885 (video_mod_CFLAGS): Likewise.
12886 (video_mod_LDFLAGS): Likewise.
12887 (gfxterm_mod_SOURCES): Likewise.
12888 (gfxterm_mod_CFLAGS): Likewise.
12889 (gfxterm_mod_LDFLAGS): Likewise.
12890 (videotest_mod_SOURCES): Likewise.
12891 (videotest_mod_CFLAGS): Likewise.
12892 (videotest_mod_LDFLAGS): Likewise.
12893 (vesafb_mod_SOURCES): Removed.
12894 (vesafb_mod_CFLAGS): Likewise.
12895 (vesafb_mod_LDFLAGS): Likewise.
12896 (vga_mod_SOURCES): Likewise.
12897 (vga_mod_CFLAGS): Likewise.
12898 (vga_mod_LDFLAGS): Likewise.
12899
12900 * commands/videotest.c: New file.
12901
12902 * font/manager.c (fill_with_default_glyph): Modified to use
12903 grub_font_glyph.
12904 (grub_font_get_glyph): Likewise.
12905 (fontmanager): Renamed from this...
12906 (font_manager): ... to this.
12907
12908 * include/grub/font.h (grub_font_glyph): Added new structure.
12909 (grub_font_get_glyph): Modified to use grub_font_glyph.
12910
12911 * include/grub/misc.h (grub_abs): Added as inline function.
12912
12913 * include/grub/video.h: New file.
12914
12915 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12916 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12917 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12918 (grub_vbe_get_controller_info): Renamed from this...
12919 (grub_vbe_bios_get_controller_info): ... to this.
12920 (grub_vbe_get_mode_info): Renamed from this...
12921 (grub_vbe_bios_get_mode_info): ... to this.
12922 (grub_vbe_set_mode): Renamed from this...
12923 (grub_vbe_bios_set_mode): ... to this.
12924 (grub_vbe_get_mode): Renamed from this...
12925 (grub_vbe_bios_get_mode): ... to this.
12926 (grub_vbe_set_memory_window): Renamed from this...
12927 (grub_vbe_bios_set_memory_window): ... to this.
12928 (grub_vbe_get_memory_window): Renamed from this...
12929 (grub_vbe_bios_get_memory_window): ... to this.
12930 (grub_vbe_set_scanline_length): Renamed from this...
12931 (grub_vbe_set_scanline_length): ... to this.
12932 (grub_vbe_get_scanline_length): Renamed from this...
12933 (grub_vbe_bios_get_scanline_length): ... to this.
12934 (grub_vbe_set_display_start): Renamed from this...
12935 (grub_vbe_bios_set_display_start): ... to this.
12936 (grub_vbe_get_display_start): Renamed from this...
12937 (grub_vbe_bios_get_display_start): ... to this.
12938 (grub_vbe_set_palette_data): Renamed from this...
12939 (grub_vbe_bios_set_palette_data): ... to this.
12940 (grub_vbe_set_pixel_rgb): Removed.
12941 (grub_vbe_set_pixel_index): Likewise.
12942
12943 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12944 from this...
12945 (grub_vbe_bios_get_controller_info): ... to this.
12946 (grub_vbe_get_mode_info): Renamed from this...
12947 (grub_vbe_bios_get_mode_info): ... to this.
12948 (grub_vbe_set_mode): Renamed from this...
12949 (grub_vbe_bios_set_mode): ... to this.
12950 (grub_vbe_get_mode): Renamed from this...
12951 (grub_vbe_bios_get_mode): ... to this.
12952 (grub_vbe_set_memory_window): Renamed from this...
12953 (grub_vbe_bios_set_memory_window): ... to this.
12954 (grub_vbe_get_memory_window): Renamed from this...
12955 (grub_vbe_bios_get_memory_window): ... to this.
12956 (grub_vbe_set_scanline_length): Renamed from this...
12957 (grub_vbe_set_scanline_length): ... to this.
12958 (grub_vbe_get_scanline_length): Renamed from this...
12959 (grub_vbe_bios_get_scanline_length): ... to this.
12960 (grub_vbe_set_display_start): Renamed from this...
12961 (grub_vbe_bios_set_display_start): ... to this.
12962 (grub_vbe_get_display_start): Renamed from this...
12963 (grub_vbe_bios_get_display_start): ... to this.
12964 (grub_vbe_set_palette_data): Renamed from this...
12965 (grub_vbe_bios_set_palette_data): ... to this.
12966 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12967 getting corrupted after calling it. Added more pushes and pops.
12968 (grub_vbe_bios_set_mode): Likewise.
12969 (grub_vbe_bios_get_mode): Likewise.
12970 (grub_vbe_bios_get_memory_window): Likewise.
12971 (grub_vbe_bios_set_scanline_length): Likewise.
12972 (grub_vbe_bios_get_scanline_length): Likewise.
12973 (grub_vbe_bios_get_display_start): Likewise.
12974 (grub_vbe_bios_set_palette_data): Likewise.
12975
12976 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12977 (cl_insert): Likewise.
12978 (cl_delete): Likewise.
12979
12980 * term/gfxterm.c: New file.
12981
12982 * term/i386/pc/vesafb.c: Removed file.
12983
12984 * video/video.c: New file.
12985
12986 * video/i386/pc/vbe.c (real2pm): Added new function.
12987 (grub_video_vbe_draw_pixel): Likewise.
12988 (grub_video_vbe_get_video_ptr): Likewise.
12989 (grub_video_vbe_get_pixel): Likewise
12990 (grub_video_vbe_init): Likewise.
12991 (grub_video_vbe_fini): Likewise.
12992 (grub_video_vbe_setup): Likewise.
12993 (grub_video_vbe_get_info): Likewise.
12994 (grub_video_vbe_set_palette): Likewise.
12995 (grub_video_vbe_get_palette): Likewise.
12996 (grub_video_vbe_set_viewport): Likewise.
12997 (grub_video_vbe_get_viewport): Likewise.
12998 (grub_video_vbe_map_color): Likewise.
12999 (grub_video_vbe_map_rgb): Likewise.
13000 (grub_video_vbe_map_rgba): Likewise.
13001 (grub_video_vbe_unmap_color): Likewise.
13002 (grub_video_vbe_fill_rect): Likewise.
13003 (grub_video_vbe_blit_glyph): Likewise.
13004 (grub_video_vbe_blit_bitmap): Likewise.
13005 (grub_video_vbe_blit_render_target): Likewise.
13006 (grub_video_vbe_scroll): Likewise.
13007 (grub_video_vbe_swap_buffers): Likewise.
13008 (grub_video_vbe_create_render_target): Likewise.
13009 (grub_video_vbe_delete_render_target): Likewise.
13010 (grub_video_vbe_set_active_render_target): Likewise.
13011 (grub_vbe_set_pixel_rgb): Remove function.
13012 (grub_vbe_set_pixel_index): Likewise.
13013 (index_color_mode): Remove static variable.
13014 (active_mode): Likewise.
13015 (framebuffer): Likewise.
13016 (bytes_per_scan_line): Likewise.
13017 (grub_video_vbe_adapter): Added new static variable.
13018 (framebuffer): Likewise.
13019 (render_target): Likewise.
13020 (initial_mode): Likewise.
13021 (mode_in_use): Likewise.
13022 (mode_list): Likewise.
13023
5f97350b 130242006-03-10 Marco Gerards <marco@gnu.org>
13025
13026 * configure.ac (AC_INIT): Bumped to 1.93.
13027
13028 * DISTLIST: Added `include/grub/hfs.h'.
13029
a3c5c6f8 130302006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13031
13032 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13033 18H, which might help the BIOS falling back to next boot media.
13034
6de53d26 130352006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13036
13037 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13038 Poe Chen <poe.poechen@gmail.com>.
13039
77c4a393 130402006-01-17 Marco Gerards <marco@gnu.org>
13041
13042 * include/grub/normal.h: Include <grub/script.h>.
13043 (grub_command_list): Removed struct.
13044 (grub_command_list_t): Removed type.
13045 (grub_menu_entry): Remove members `num' and `command_list'. Add
13046 members `commands' and `sourcecode'.
13047 * include/grub/script.h: Add inclusion guards.
13048 (grub_script_cmd_menuentry): New struct.
13049 (grub_script_execute_menuentry): New prototype.
13050 (grub_script_lexer_record_start): Likewise.
13051 (grub_script_lexer_record_stop): Likewise.
13052 * normal/execute.c (grub_script_execute_menuentry): New function.
13053 * normal/lexer.c (record, recording, recordpos, recordlen): New
13054 variables.
13055 (grub_script_lexer_record_start): New function.
13056 (grub_script_lexer_record_stop): Likewise.
13057 (recordchar): Likewise.
13058 (nextchar): Likewise.
13059 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13060 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13061 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13062 (current_menu): New variable.
13063 (free_menu): Mainly rewritten.
13064 (grub_normal_menu_addentry): New function.
13065 (read_config_file): Rewritten.
13066 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 13067 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 13068 the menu entry.
13069 (run): Mainly rewritten.
13070 * normal/parser.y (menu_entry): New variable.
13071 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13072 (menuentry): New rule.
13073 (command): Add `menuentry'.
13074 (if_statement): Allow additional returns before `fi'.
13075 * normal/script.c (grub_script_create_cmdmenu): New function.
13076
144f1f98 130772006-01-03 Marco Gerards <marco@gnu.org>
13078
13079 * INSTALL: GNU Bison is required.
13080 * configure.ac: Rewritten the test to detect Bison.
13081 * Makefile.in (YACC): New variable. Reported by Xun Sun
13082 <xun.sun.cn@gmail.com>.
13083
af4b2d89 130842006-01-03 Marco Gerards <marco@gnu.org>
13085
13086 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13087 the HFS+ filesystem to filesystem blocks.
13088 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13089 GCC warning is silenced.
13090
15643b71 130912006-01-03 Marco Gerards <marco@gnu.org>
13092
13093 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13094 read from disk from big endian to host byte order.
13095
00905879 130962006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13097
13098 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13099 documentation.
13100 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13101 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13102 embedded HFS+ filesystem.
13103 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13104 (grub_hfs_sblock): Move from here...
13105 * include/grub/hfs.h: To here... New file.
13106 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13107 documentation.
13108 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13109 New macros.
13110 (grub_hfsplus_volheader): Change type of member `magic' to
13111 `grub_uint16_t'.
13112 (grub_hfsplus_data): Add new member `embedded_offset'.
13113 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13114 returned block.
13115 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13116 Calculate the offset.
13117
8899bc3e 131182005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13119
13120 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13121 Removed.
13122 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13123
ae8c0277 131242005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13125
13126 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13127 ENV->NAME is NULL after allocating ENV->VALUE.
13128
07084456 131292005-12-25 Marco Gerards <marco@gnu.org>
13130
13131 * kern/env.c (grub_env_set): Rewritten the error handling code.
13132
4750f5f1 131332005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13134
13135 * geninit.sh: Made more robust, and more portable.
13136
50214199 131372005-12-25 Marco Gerards <marco@gnu.org>
13138
13139 Add support for Apple HFS+ filesystems.
f19dbdb7 13140
50214199 13141 * fs/hfsplus.c: New file.
13142
13143 * DISTLIST: Added `fs/hfsplus.c'.
13144
13145 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13146 (hfsplus_mod_SOURCES): New variable.
13147 (hfsplus_mod_CFLAGS): Likewise.
13148 (hfsplus_mod_LDFLAGS): Likewise.
13149 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13150 (grub_setup_SOURCES): Likewise.
13151 (grub_mkdevicemap_SOURCES): Likewise.
13152 (grub_emu_SOURCES): Likewise.
13153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13154
13155 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13156
13157 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13158
befaed6c 131592005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13160
13161 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13162 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13163 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13164 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13165 normal/lexer.c, normal/parser.y, normal/script.c, and
13166 partmap/gpt.c.
13167 Removed kern/sparc64/cache.c.
13168
13169 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13170 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13171 grub_emu_init.c.
13172
13173 * configure.ac (AC_INIT): Bumped to 1.92.
13174
6a124103 131752005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13176
13177 * kern/err.c (grub_error_push): Added new function to support error
13178 stacks.
13179 (grub_error_pop): Likewise.
13180 (grub_error_stack_items): New local variable to support error stacks.
13181 (grub_error_stack_pos): Likewise.
13182 (grub_error_stack_assert): Likewise.
13183 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13184 stack depth.
13185 (grub_print_error): Added support to print errors from error stack.
13186
13187 * include/grub/err.h (grub_error_push): Added function prototype.
13188 (grub_error_pop): Likewise.
13189
be973c1b 131902005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13191
13192 * configure.ac: Accept `powerpc64' as host_cpu.
13193 (amd64): Rename to `biarch32'.
13194
13195 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13196 non-cacheline-aligned addresses.
13197
13198 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13199 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13200 if `size' is non-zero.
13201
b04216ab 132022005-12-03 Marco Gerards <mgerards@xs4all.nl>
13203
13204 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13205 and `cd' to make sure the filename is not prefixed with a
13206 directory name.
13207 (pkgdata_MODULES): Add `gpt.mod'.
13208 (gpt_mod_SOURCES): New variable.
13209 (gpt_mod_CFLAGS): Likewise.
13210 (gpt_mod_LDFLAGS): Likewise.
13211
13212 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13213
13214 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13215 New macro.
13216
13217 * partmap/gpt.c: New file.
13218
13219 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13220 GPT partition map is detected.
13221
41730ed9 132222005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13223
13224 * commands/i386/pc/play.c: New file.
13225 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13226 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13227 macros.
f19dbdb7 13228
95dc3643 132292005-11-27 Marco Gerards <mgerards@xs4all.nl>
13230
13231 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13232 ((unused))' to silence gcc warning.
13233
1569ec51 132342005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13235
13236 * configure.ac: Correct `AC_PROG_YACC' test.
13237
9abde152 132382005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13239
13240 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13241 check before installing files.
13242
44b83271 132432005-11-22 Mike Small <smallm@panix.com>
13244
13245 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13246 number regex so multidigit numbers are recognized correctly.
13247
132482005-11-22 Mike Small <smallm@panix.com>
13249
13250 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13251 debugging message before attempting to claim memory.
13252 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13253 multiple addresses in case of failure.
13254
9c12956b 132552005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13256
13257 * term/tparm.c (get_space): Remove empty `if' statement.
13258
13259 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13260
13261 * kern/parser.c (check_varstate): Rename `state' to 's'.
13262
aeaf81d9 132632005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13264
13265 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13266 variable definitions to the beginning of each function. Sort stack
13267 variables by size.
13268 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13269 `buf' argument to `char *'.
13270
79bbb63f 132712005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13272
13273 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13274 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13275 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 13276 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13277 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13278 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13279 configfile.mod, search.mod, gzio.mod and test.mod.
13280 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13281 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13282 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13283 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13284 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13285 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13286 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13287 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13288 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13289 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13290 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13291 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13292 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13293 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13294 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13295 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13296 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13297 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13298 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13299 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13300 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13301 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13302 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13303
13304 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13305 `grep --include'.
13306 (pkgdata_MODULES): Add test.mod.
13307
233b1628 133082005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13309
13310 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13311 appending to variables with "+=".
13312 (PModule): Use full pathname to generate *.lst filenames.
13313
13314 * Makefile.in: Fixed list rules moved from genmk.rb.
13315 (.DELETE_ON_ERROR): New special target.
13316 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13317
13318 * conf/i386-pc.rmk: Include conf/common.mk.
13319 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13320 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 13321 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13322 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13323 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13324 configfile.mod, search.mod, gzio.mod and test.mod.
13325 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13326 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13327 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13328 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13329 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13330 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13331 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13332 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13333 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13334 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13335 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13336 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13337 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13338 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13339 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13340 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13341 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13342 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13343 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13344 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13345 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13346 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13347 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13348 here...
13349 * conf/common.rmk: ... to here. New file.
13350
13351 * conf/common.mk: New file.
13352
16f820c8 133532005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13354
13355 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13356 (grub_script.tab.c): ... here.
13357
13358 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13359 (grub_script.tab.c): ... here.
13360
13361 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13362 (grub_script.tab.c): ... here.
13363
13364 * normal/command.c (grub_command_find): Fixed a memory leak of
13365 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13366
63ba1554 133672005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13368
13369 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13370 "@" which marks the start of a comment on ARM.
13371 (VARIABLE): Likewise.
13372
7f67dc13 133732005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13374
79bbb63f 13375 Add support for Linux/ADFS partition tables.
7f67dc13 13376
13377 * partmap/acorn.c: New file.
13378
13379 * include/grub/acorn_filecore.h: Likewise.
13380
13381 * DISTLIST: Added `partmap/acorn.c' and
13382 `include/grub/acorn_filecore.h'.
f19dbdb7 13383
7f67dc13 13384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13385 `partmap/acorn.c'.
13386 (pkgdata_MODULES): Add `acorn.mod'.
13387 (acorn_mod_SOURCES): New variable.
13388 (acorn_mod_CFLAGS): Likewise.
13389
13390 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13391 `partmap/acorn.c'.
13392 (pkgdata_MODULES): Add `acorn.mod'.
13393 (acorn_mod_SOURCES): New variable.
13394 (acorn_mod_CFLAGS): Likewise.
13395
13396 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13397 (pkgdata_MODULES): Add `acorn.mod'.
13398 (acorn_mod_SOURCES): New variable.
13399 (acorn_mod_CFLAGS): Likewise.
13400 (acorn_mod_LDFLAGS): Likewise.
13401
13402 * include/types.h (grub_disk_addr_t): New typedef.
13403
6d099807 134042005-11-13 Marco Gerards <mgerards@xs4all.nl>
13405
13406 * geninit.sh: New file.
13407
13408 * geninitheader.sh: Likewise.
13409
13410 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13411 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13412 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13413 * commands/configfile.c (grub_configfile_init)
13414 (grub_configfile_fini): Likewise.
13415 * commands/default.c (grub_default_init, grub_default_fini):
13416 Likewise.
13417 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13418 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13419 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13420 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13421 Likewise.
13422 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13423 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13424 Likewise.
13425 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 13426 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 13427 Likewise.
13428 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13429 Likewise.
fe6b695a 13430 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 13431 Likewise.
13432 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13433 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13434 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13435 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13436 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13437 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13438 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13439 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13440 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13441 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13442 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13443 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13444 * partmap/amiga.c (grub_amiga_partition_map_init)
13445 (grub_amiga_partition_map_fini): Likewise.
13446 * partmap/apple.c (grub_apple_partition_map_init)
13447 (grub_apple_partition_map_fini): Likewise.
13448 * partmap/pc.c (grub_pc_partition_map_init)
13449 (grub_pc_partition_map_fini): Likewise.
13450 * partmap/sun.c (grub_sun_partition_map_init,
13451 grub_sun_partition_map_fini): Likewise.
13452 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13453 Likewise.
13454
13455 * util/grub-emu.c: Include <grub_modules_init.h>.
13456 (main): Don't initialize and de-initialize any modules directly,
13457 use `grub_init_all' and `grub_fini_all' instead.
13458
13459 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13460 `grub_vesafb_mod_init'.
13461 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13462 all users.
13463 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13464 `grub_vga_mod_init'. Updated all users.
13465 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 13466
6d099807 13467 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13468 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13469 rules.
13470
13471 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13472 Generate a function to initialize the module in utilities.
13473 Updated all callers.
13474 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13475 initialize the module in utilities. Updated all callers.
13476
9046bcf0 134772005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13478
13479 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13480 escape sequence and a literal ^L to clear the screen.
13481
13482 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13483 when returning from Open Firmware.
13484
d13ea639 134852005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13486
13487 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13488 (grub_ofconsole_height): Likewise.
13489 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13490 manually insert a '\n'.
13491 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13492 `grub_ofconsole_height'. Return early if these are already set.
13493
a8fcf206 134942005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13495
13496 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13497 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13498 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13499 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13500 and `normal/script.c'.
13501 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13502 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13503 (test_mod_SOURCES): New variable.
13504 (test_mod_CFLAGS): Likewise.
13505 (test_mod_LDFLAGS): Likewise.
13506 (pkgdata_MODULES): Add `test.mod'.
13507 (grub_script.tab.c): New rule.
13508 (grub_script.tab.h): Likewise.
13509
b6b32745 135102005-11-07 Marco Gerards <mgerards@xs4all.nl>
13511
13512 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13513 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13514 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13515 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13516 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13517 (test_mod_SOURCES): New variable.
13518 (test_mod_CFLAGS): Likewise.
13519 (pkgdata_MODULES): Add `test.mod'.
13520 (grub_script.tab.c): New rule.
13521 (grub_script.tab.h): Likewise.
13522
daac212a 135232005-11-06 Marco Gerards <mgerards@xs4all.nl>
13524
13525 Add initial scripting support.
13526
13527 * commands/test.c: New file.
13528 * include/grub/script.h: Likewise.
13529 * normal/execute.c: Likewise.
13530 * normal/function.c: Likewise.
13531 * normal/lexer.c: Likewise.
13532 * normal/parser.y: Likewise.
13533 * normal/script.c: Likewise.
13534
13535 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 13536
daac212a 13537 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13538 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13539 `normal/function.c' and `normal/script.c'.
13540 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13541 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 13542 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13543 variables.
daac212a 13544 (pkgdata_MODULES): Add `test.mod'.
13545 (grub_script.tab.c): New rule.
13546 (grub_script.tab.h): Likewise.
13547
13548 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13549
13550 * include/grub/normal.h (grub_test_init): New prototype.
13551 (grub_test_fini): Likewise.
f19dbdb7 13552
daac212a 13553 * normal/command.c: Include <grub/script.h>.
13554 (grub_command_execute): Rewritten.
f19dbdb7 13555
daac212a 13556 * util/grub-emu.c (main): Call `grub_test_init' and
13557 `grub_test_fini'.
13558
77500b2b 135592005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13560
13561 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13562 to 0.
13563 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13564 there are no pending characters.
13565
e45deb9e 135662005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13567
13568 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13569 `grub_strndup' to drop device arguments. Replace unnecessary
13570 `grub_strndup' with `grub_strdup'.
13571
4ce32619 135722005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13573
13574 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13575 `debug' environment variable has been set.
13576
135772005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13578
4ce32619 13579 * Makefile.in (install-local): Use $(DATA).
13580 (uninstall): Likewise.
13581 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13582 (sbin_UTILITIES): ... to here.
13583 (sbin_SCRIPTS): New variable.
13584 (grub_install_SOURCES): New variable.
13585 * util/powerpc/ieee1275/grub-install.in: New file.
13586 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13587 variable.
13588 (add_segments): Call `grub_util_get_path'.
13589
25fe6f03 135902005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13591
13592 From Timothy Baldwin:
13593 * commands/ls.c (grub_ls_list_files): Close FILE with
13594 grub_file_close.
13595 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13596
04ccf3ec 135972005-10-24 Marco Gerards <mgerards@xs4all.nl>
13598
13599 * include/grub/parser.h: New file.
13600
13601 * kern/parser.c: Likewise.
13602
13603 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13604 (grub_setup_SOURCES): Likewise.
13605 (grub_probefs_SOURCES): Likewise.
13606 (grub_emu_SOURCES): Likewise.
13607 (kernel_img_HEADERS): Add `parser.h'.
13608
13609 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13610 (grub_emu_SOURCES): Add `kern/parser.c'.
13611 (grubof_SOURCES): Likewise.
13612
13613 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13614 (grubof_SOURCES): Add `kern/parser.c'.
13615
13616 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13617
13618 * kern/misc.c (grub_split_cmdline): Removed function.
13619
13620 * kern/rescue.c: Include <grub/parser.h>.
13621 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13622 of `grub_split_cmdline'.
13623
13624 * normal/command.c: Include <grub/parser.h>.
13625 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13626 of `grub_split_cmdline'.
13627
13628 * normal/completion.c: Include <grub/parser.h>.
13629 (cmdline_state): New variable.
13630 (iterate_dir): End the filename with a quote depending on the
13631 command line state.
13632 (get_state): new function.
13633 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13634 split the arguments and determine the current argument. When the
13635 argument string is not quoted, escape all spaces.
13636
6d8f4b0e 136372005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13638
13639 * normal/sparc64/setjmp.S: New file.
13640
15cf03ed 136412005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13642
13643 * include/grub/sparc64/libgcc.h: New file.
13644 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13645 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13646 normal/sparc64/setjmp.c.
13647
03e8661a 136482005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13649
13650 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13651 * kern/sparc64/cache.S: New file.
13652 * kern/sparc64/cache.c: Removed.
13653 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13654 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13655 -mtune=ultrasparc.
13656 (COMMON_LDFLAGS): Add -melf64_sparc.
13657 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13658 (grubof_SOURCES): Use cache.S instead of cache.c.
13659 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13660 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13661 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13662 commented though.
13663 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13664 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13665 (linux_mod_CFLAGS): Commented out.
13666 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13667 out because module isn't built.
13668 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13669 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13670 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13671 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13672 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13673 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13674 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13675 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13676 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13677 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13678 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13679 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13680 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13681 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13682
34eeec8a 136832005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13684
13685 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13686 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13687 longer, because HFS should not be used on PC.
13688
708367a3 136892005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13690
13691 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13692 consistently within the loop.
13693
6fa1251a 136942005-10-15 Marco Gerards <mgerards@xs4all.nl>
13695
13696 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13697 directory can not be read.
13698
4801580b 136992005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13700
13701 * configure.ac (AC_INIT): Increase the version number to 1.91.
13702
13703 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13704 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13705 term/i386/pc/serial.c.
13706
219ad426 137072005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13708
13709 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13710 file size must be permitted.
13711
13712 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13713 between %ah and %al.
13714
688e5699 137152005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13716
13717 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13718 grub_uint64_t.
13719 Call the hook with a NUL-terminated filename.
13720 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13721 grub_cpu_to_be32.
13722
13723 * kern/term.c (cursor_state): New variable.
13724 (grub_term_set_current): Reset the cursor state on a new
13725 terminal.
13726 (grub_setcursor): Rewritten to use CURSOR_STATE.
13727 (grub_getcursor): New function.
13728
13729 * include/grub/term.h (grub_getcursor): New prototype.
13730
13731 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13732 integers on ARM. Reported by Timothy Baldwin
13733 <T.E.Baldwin99@members.leeds.ac.uk>.
13734
bb34586c 137352005-10-11 Marco Gerards <mgerards@xs4all.nl>
13736
13737 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13738 allocated.
13739 (grub_sfs_dir): Likewise.
13740
9a909877 137412005-10-09 Marco Gerards <mgerards@xs4all.nl>
13742
13743 Add support for the SFS filesystem.
13744
13745 * fs/sfs.c: New file.
13746
13747 * DISTLIST: Added `fs/sfs.c'.
13748
13749 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13750 (grub_probefs_SOURCES): Likewise.
13751 (grub_emu_SOURCES): Likewise.
13752 (pkgdata_MODULES): Add `sfs.mod'.
13753 (sfs_mod_SOURCES): New variable.
13754 (sfs_mod_CFLAGS): Likewise.
13755 (sfs_mod_LDFLAGS): Likewise.
13756
13757 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13758 (pkgdata_MODULES): Add `sfs.mod'.
13759 (sfs_mod_SOURCES): New variable.
13760 (sfs_mod_CFLAGS): Likewise.
13761
13762 * util/grub-emu.c (main): Call `grub_sfs_init' and
13763 `grub_sfs_fini'.
13764
13765 * include/grub/fs.h (grub_sfs_init): New prototype.
13766 (grub_sfs_fini): Likewise.
13767
57bdbde3 137682005-10-07 Marco Gerards <mgerards@xs4all.nl>
13769
13770 Add support for the AFFS filesystem.
13771
13772 * fs/affs.c: New file.
13773
13774 * DISTLIST: Added `fs/affs.c'.
13775
13776 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13777 (grub_probefs_SOURCES): Likewise.
13778 (grub_emu_SOURCES): Likewise.
13779 (pkgdata_MODULES): Add `affs.mod'.
13780 (affs_mod_SOURCES): New variable.
13781 (affs_mod_CFLAGS): Likewise.
13782 (affs_mod_LDFLAGS): Likewise.
13783
13784 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13785 (pkgdata_MODULES): Add `affs.mod'.
13786 (affs_mod_SOURCES): New variable.
13787 (affs_mod_CFLAGS): Likewise.
13788
13789 * util/grub-emu.c (main): Call `grub_affs_init' and
13790 `grub_affs_fini'.
13791
13792 * include/grub/fs.h (grub_affs_init): New prototype.
13793 (grub_affs_fini): Likewise.
13794
047b67e0 137952005-10-01 Marco Gerards <mgerards@xs4all.nl>
13796
13797 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13798
59b8208a 137992005-10-01 Marco Gerards <mgerards@xs4all.nl>
13800
13801 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13802 `-m32' to CFLAGS.
13803
13804 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13805 linking.
f19dbdb7 13806
59b8208a 13807 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13808 (COMMON_LDFLAGS): New variable.
13809 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13810 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13811 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13812 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13813 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13814 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13815 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13816 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13817 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13818 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13819 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13820 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13821 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13822 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13823 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13824 variables.
13825 (normal_mod_ASFLAGS): Add `-m32'.
13826
13827 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13828 (grub_host_size_t, grub_host_ssize_t): New types.
13829 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13830 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13831 `GRUB_HOST_SIZEOF_VOID_P'.
13832
13833 * include/grub/kernel.h (struct grub_module_header): Type of
13834 member offset changed to `grub_host_off_t'. Type of member size
13835 changed to `grub_host_size_t'.
13836 (struct grub_module_info): Type of member offset changed to
13837 `grub_host_off_t'. Type of member size changed to
13838 `grub_host_size_t'.
13839
b4093103 138402005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13841
13842 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 13843
b4093103 13844 * kern/i386/pc/startup.S (multiboot_header): New label.
13845 (multiboot_entry): Likewise.
13846 (multiboot_trampoline): Likewise.
13847
13848 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13849 Increased to 0x4A0.
13850
13851 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13852 put parentheses after a question mark.
13853 [!GRUB_UTIL] (my_mod): New variable.
13854
13855 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13856
b2499b29 138572005-09-28 Marco Gerards <mgerards@xs4all.nl>
13858
13859 Adds support for the XFS filesystem. Btrees are not supported
13860 yet.
13861
13862 * fs/xfs.c: New file.
13863
13864 * DISTLIST: Added `fs/xfs.c'.
13865
13866 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13867 (grub_probefs_SOURCES): Likewise.
13868 (grub_emu_SOURCES): Likewise.
13869 (pkgdata_MODULES): Add `xfs.mod'.
13870 (xfs_mod_SOURCES): New variable.
13871 (xfs_mod_CFLAGS): Likewise.
13872
13873 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13874 (pkgdata_MODULES): Add `xfs.mod'.
13875 (xfs_mod_SOURCES): New variable.
13876 (xfs_mod_CFLAGS): Likewise.
13877
13878 * util/grub-emu.c (main): Call `grub_xfs_init' and
13879 `grub_xfs_fini'.
13880
13881 * include/grub/fs.h (grub_xfs_init): New prototype.
13882 (grub_xfs_fini): Likewise.
13883
f19dbdb7 13884
83d37a62 138852005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13886
13887 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13888 color modes, allow greater than 16 colors to be configured as
13889 a default palette.
13890
47d2d65e 138912005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13892
13893 * normal/completion.c (complete_arguments): Add the qualifier
13894 const into OPTIONS.
13895
13896 From Omniflux <omniflux+lists@omniflux.com>:
13897 * include/grub/terminfo.h: New file.
13898 * include/grub/tparm.h: Likewise.
13899 * include/grub/i386/pc/serial.h: Likewise.
13900 * term/terminfo.c: Likewise.
13901 * term/tparm.c: Likewise.
13902 * term/i386/pc/serial.c: Likewise.
13903 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13904 serial.mod.
13905 (terminfo_mod_SOURCES): New variable.
13906 (terminfo_mod_CFLAGS): Likewise.
13907 (serial_mod_SOURCES): Likewise.
13908 (serial_mod_CFLAGS): Likewise.
13909
48b671ff 139102005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13911
13912 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13913 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13914 and kern/powerpc/ieee1275/cmain.c, respectively.
13915
13916 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13917 * kern/powerpc/ieee1275/crt0.S: ... here.
13918
13919 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13920 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 13921
48b671ff 13922 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13923 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13924 instead of boot/powerpc/ieee1275/crt0.S and
13925 boot/powerpc/ieee1275/cmain.c, respectively.
13926
13927 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13928 sectors. It was not used anyway.
13929
09fc77a7 139302005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13931
13932 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13933 `unused parameter' warning.
13934
003789c7 139352005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13936
13937 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13938 function.
13939 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13940 getcharwidth.
13941
67f44c86 139422005-08-28 Marco Gerards <metgerards@student.han.nl>
13943
13944 * include/grub/normal.h (enum grub_completion_type): Added
13945 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13946
13947 * normal/cmdline.c (print_completion): Handle
13948 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13949 * normal/menu_entry.c (store_completion): Likewise.
13950
13951 * normal/completion.c (complete_arguments): New function.
13952 (grub_normal_do_completion): Call `complete_arguments' when the
13953 current words start with a dash.
13954
0b5abe02 139552005-08-27 Marco Gerards <metgerards@student.han.nl>
13956
13957 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13958 `gzio.mod' instead of `io.mod').
13959
d9864ee1 139602005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13961
13962 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13963 (DISTDIRS): Added io and video.
13964 Rewrite the search routine to make an output consistently.
13965
13966 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13967 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13968 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13969 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13970 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13971 util/powerpc/ieee1275/misc.c.
f19dbdb7 13972
d9864ee1 13973 * include/grub/gzio.h: New file.
13974 * io/gzio.c: Likewise.
f19dbdb7 13975
d9864ee1 13976 * kern/file.c (grub_file_close): Call grub_device_close only if
13977 FILE->DEVICE is not NULL.
13978
13979 * include/grub/mm.h [!NULL] (NULL): New macro.
13980
13981 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13982
13983 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13984 (pkgdata_MODULES): Added gzio.mod.
13985 (gzio_mod_SOURCES): New variable.
13986 (gzio_mod_CFLAGS): Likewise.
13987
13988 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13989 (pkgdata_MODULES): Added gzio.mod.
13990 (gzio_mod_SOURCES): New variable.
13991 (gzio_mod_CFLAGS): Likewise.
13992
13993 * commands/cat.c: Include grub/gzio.h.
13994 (grub_cmd_cat): Use grub_gzfile_open instead of
13995 grub_file_open.
f19dbdb7 13996
d9864ee1 13997 * commands/cmp.c: Include grub/gzio.h.
13998 (grub_cmd_cmp): Use grub_gzfile_open instead of
13999 grub_file_open.
14000
14001 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14002 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14003 grub_file_open.
14004 (grub_rescue_cmd_module): Likewise.
14005
fa46f4b5 140062005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14007
14008 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14009 kern/sparc64/ieee1275/init.c because it contains _start.
14010 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14011
e9211b5d 140122005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14013
14014 * configure.ac: Add support for sparc64 host with ieee1275
14015 firmware.
14016 * configure: Generated from configure.ac.
14017 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14018 instead of int.
14019 (grub_ofdisk_read): Likewise.
14020 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14021 pointers as (void *) to remove a warning.
14022 (grub_ofdisk_close): Likewise.
14023 (grub_ofdisk_read): Likewise.
14024 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14025 returns, so make it return void to remove a warning.
14026 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14027 Corresponding prototype change.
14028 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14029 values, and cast the pointers as (void *) to remove a warning.
14030 (grub_mm_dump): Likewise.
14031 * conf/sparc64-ieee1275.mk: New file.
14032 * conf/sparc64-ieee1275.rmk: Likewise.
14033 * include/grub/sparc64/setjmp.h: Likewise.
14034 * include/grub/sparc64/types.h: Likewise.
14035 * include/grub/sparc64/ieee1275/console.h: Likewise.
14036 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14037 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14038 * include/grub/sparc64/ieee1275/time.h: Likewise.
14039 * kern/sparc64/cache.c: Likewise.
14040 * kern/sparc64/dl.c: Likewise.
14041 * kern/sparc64/ieee1275/init.c: Likewise.
14042 * kern/sparc64/ieee1275/openfw.c: Likewise.
14043
385c6a92 140442005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14045
14046 * util/console.c (grub_ncurses_putchar): If C is greater than
14047 0x7f, set C to a question mark.
14048 (grub_ncurses_getcharwidth): New function.
14049 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14050 getcharwidth.
14051
14052 * normal/menu.c (print_entry): Made aware of Unicode. First,
14053 convert TITLE to UCS-4, and predict the cursor position by
14054 grub_getcharwidth.
14055
14056 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14057 const to SRC.
14058 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14059
16ccb8b1 140602005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14061
14062 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14063 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14064 grub_strcat.
14065
14066 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14067 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14068 grub_strcpy and grub_strlen. Take it into account that a space
14069 character is inserted as a delimiter.
14070
6a85ce79 140712005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14072
14073 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 14074 invalid magic in the error.
6a85ce79 14075
14076 * commands/search.c: New file.
f19dbdb7 14077
6a85ce79 14078 * util/grub-emu.c (main): Call grub_search_init and
14079 grub_search_fini.
14080
14081 * kern/rescue.c (grub_rescue_print_disks): Removed.
14082 (grub_rescue_print_devices): New function.
14083 (grub_rescue_cmd_ls): Use grub_device_iterate with
14084 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14085 grub_rescue_print_disks.
14086
14087 * kern/partition.c (grub_partition_iterate): Return the result of
14088 PARTMAP->ITERATE instead of GRUB_ERRNO.
14089
14090 * kern/device.c: Include grub/partition.h.
14091 (grub_device_iterate): New function.
14092
14093 * include/grub/partition.h (grub_partition_iterate): Return int
14094 instead of grub_err_t.
14095
14096 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14097 prototype.
14098 [GRUB_UTIL] (grub_search_fini): Likewise.
14099
14100 * include/grub/device.h (grub_device_iterate): New prototype.
14101
14102 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14103 commands/search.c.
14104 (pkgdata_MODULES): Added search.mod.
14105 (search_mod_SOURCES): New variable.
14106 (search_mod_CFLAGS): Likewise.
14107
14108 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14109 (pkgdata_MODULES): Added search.mod.
14110 (search_mod_SOURCES): New variable.
14111 (search_mod_CFLAGS): Likewise.
14112
14113 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14114 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14115 All callers changed.
14116
14117 * DISTLIST: Added commands/search.c.
14118
ef095434 141192005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14120
14121 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14122 conversion.
14123 (grub_getcharwidth): New function.
14124
14125 * kern/misc.c (grub_utf8_to_ucs4): New function.
14126
14127 * include/grub/term.h (struct grub_term): Added a new member
14128 "getcharwidth".
14129 (grub_getcharwidth): New prototype.
14130
14131 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14132
14133 * term/i386/pc/console.c (map_char): New function. Segregated from
14134 grub_console_putchar.
14135 (grub_console_putchar): Use map_char.
14136 (grub_console_getcharwidth): New function.
14137 (grub_console_term): Specified grub_console_getcharwidth as
14138 getcharwidth.
14139
14140 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14141 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14142
14143 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14144 GRUB_ERRNO.
14145 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14146 on grub_strtoul completely.
14147 (write_char): Declare local variables in the beginning of the
14148 function.
14149 (grub_vesafb_getcharwidth): New function.
14150 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14151 getcharwidth.
14152
1f0a95e4 141532005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14154
14155 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14156 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14157 commands/i386/pc/vbetest.c.
14158
14159 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14160 call grub_vbe_get_controller_info again, because the returned
14161 information is volatile.
14162 (grub_vbe_set_video_mode): Mostly rewritten.
14163 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14164 grub_vbe_status_t correctly.
14165 (grub_vbe_get_video_mode_info): Likewise.
14166 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14167 several if statements.
14168
14169 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14170 * commands/i386/pc/vbeinfo.c: ... this.
14171
14172 * commands/i386/pc/vbe_test.c: Renamed to ...
14173 * commands/i386/pc/vbetest.c: ... this.
14174
14175 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14176 ...
14177 (grub_cmd_vbeinfo): ... this. Save video modes before
14178 iterating. Skip a video mode, if it is not available, not enough
14179 information is given or it is monochrome. Show the memory
14180 model. Leave the interpretation of MODEVAR to grub_strtoul
14181 completely.
14182 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14183 (GRUB_MOD_FINI): Likewise.
14184
14185 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14186 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14187 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14188 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14189 grub_strtoul completely.
14190 (real2pm): Removed.
14191 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14192 (GRUB_MOD_FINI): Likewise.
14193
14194 * normal/misc.c: Include grub/mm.h.
14195
14196 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14197 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14198 (vbe_list_modes_mod_SOURCES): Removed.
14199 (vbe_list_modes_mod_CFLAGS): Likewise.
14200 (vbe_test_mod_SOURCES): Likewise.
14201 (vbe_test_mod_CFLAGS): Likewise.
14202 (vbeinfo_mod_SOURCES): New variable.
14203 (vbeinfo_mod_CFLAGS): Likewise.
14204 (vbetest_mod_SOURCES): Likewise.
14205 (vbetest_mod_CFLAGS): Likewise.
14206
992ffbbe 142072005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14208
14209 * normal/misc.c: New file.
14210
14211 * DISTLIST: Added normal/misc.c.
f19dbdb7 14212
992ffbbe 14213 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14214 DISK to HOOK. Call HOOK with DISK.
14215 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14216 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14217 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14218
14219 * normal/menu_entry.c (struct screen): Added a new member
14220 "completion_shown".
14221 (completion_buffer): New global variable.
14222 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14223 (store_completion): New function.
14224 (complete): Likewise.
14225 (clear_completions): Likewise.
14226 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14227 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14228 a tab, call complete.
14229
14230 * normal/completion.c (disk_dev): Removed.
14231 (print_simple_completion): Likewise.
14232 (print_partition_completion): Likewise.
14233 (print_func): New global variable.
14234 (add_completion): Do not take the arguments WHAT or PRINT any
14235 longer. Added a new argument TYPE. Instead of printing directly,
14236 call PRINT_FUNC if not NULL.
14237 All callers changed.
14238 (complete_device): Use a local variable DEV instead of
14239 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14240 (grub_normal_do_completion): Take a new argument HOOK. Do not
14241 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14242 empty string, return NULL instead.
14243 All callers changed.
14244
14245 * normal/cmdline.c (print_completion): New function.
14246
14247 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14248 to HOOK.
14249 All callers changed.
14250
14251 * kern/disk.c (grub_print_partinfo): Removed.
14252
14253 * include/grub/partition.h (struct grub_partition_map): Add a new
14254 argument DISK into HOOK of ITERATE.
14255 (grub_partition_iterate): Add a new argument DISK to HOOK.
14256
14257 * include/grub/normal.h (enum grub_completion_type): New enum.
14258 (grub_completion_type_t): New type.
14259 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14260 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14261 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14262 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14263 (grub_normal_do_completion): Added a new argument HOOK.
14264 (grub_normal_print_device_info): New prototype.
14265
14266 * include/grub/disk.h (grub_print_partinfo): Removed.
14267
14268 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14269 (normal_mod_SOURCES): Likewise.
14270 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14271 (normal_mod_SOURCES): Likewise.
14272
14273 * commands/ls.c (grub_ls_list_disks): Use
14274 grub_normal_print_device_info instead of grub_print_partinfo. Free
14275 PNAME.
14276 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14277 duplicating the code.
14278
0bd41162 142792005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14280
14281 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 14282 follow GCS more precisely.
14283 * commands/i386/pc/vbe_test.c: Likewise.
14284 * include/grub/i386/pc/vbe.h: Likewise.
14285 * term/i386/pc/vesafb.c: Likewise.
14286 * video/i386/pc/vbe.c: Likewise.
0bd41162 14287
6323696a 142882005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14289
14290 * DISTLIST: Added term/i386/pc/vesafb.c
14291 DISTLIST: Added video/i386/pc/vbe.c
14292 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14293 DISTLIST: Added commands/i386/pc/vbe_test.c.
14294 * commands/i386/pc/vbe_list_modes.c: New file.
14295 * commands/i386/pc/vbe_test.c: Likewise.
14296 * term/i386/pc/vesafb.c: Likewise.
14297 * video/i386/pc/vbe.c: Likewise.
14298 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14299 (grub_vbe_probe) Added prototype.
14300 (grub_vbe_set_video_mode) Likewise.
14301 (grub_vbe_get_video_mode) Likewise.
14302 (grub_vbe_get_video_mode_info) Likewise.
14303 (grub_vbe_set_pixel_rgb) Likewise.
14304 (grub_vbe_set_pixel_index) Likewise.
14305 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14306 (pkgdata_MODULES): Added vesafb.mod.
14307 (pkgdata_MODULES): Added vbe_list_modes.mod.
14308 (pkgdata_MODULES): Added vbe_test.mod.
14309 (vbe_mod_SOURCES): Added.
14310 (vbe_mod_CFLAGS): Likewise.
14311 (vesafb_mod_SOURCES): Likewise.
14312 (vesafb_mod_CFLAGS): Likewise.
14313 (vbe_list_modes_mod_SOURCES): Likewise.
14314 (vbe_list_modes_mod_CFLAGS): Likewise.
14315 (vbe_test_mod_SOURCES): Likewise.
14316 (vbe_test_mod_CFLAGS): Likewise.
14317
0a74e62f 143182005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14319
0a74e62f 14320 * normal/command.c (grub_command_execute): If INTERACTIVE is
14321 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14322 CMDLINE. Disable the pager if INTERACTIVE is true.
14323 All callers are changed.
14324
14325 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14326 before reading a config file.
14327 * normal/main.c (read_config_file): Even if a command is not
14328 found, register it if it is within an entry.
14329
14330 * util/grub-emu.c: Include sys/types.h and unistd.h.
14331 (options): Added --hold.
14332 (struct arguments): Added a new member "hold".
14333 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14334 missing.
14335 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14336 cleared by a debugger, if it is not zero.
14337
14338 * include/grub/normal.h (grub_command_execute): Add an argument
14339 INTERACTIVE.
14340
e51f85ae 143412005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14342
14343 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14344
e9c6f39b 143452005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14346
14347 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14348 program with another one, because the old one didn't detect a bug
14349 in gcc-3.4. Always use regparm 2, because the new test is still
14350 not enough for gcc-4.0. Someone must investigate a simple test
14351 case which detects a bug in gcc-4.0.
14352
8de3495c 143532005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14354
14355 * DISTLIST: Added normal/completion.c.
14356
14357 * normal/completion.c: New file.
f19dbdb7 14358
8de3495c 14359 * term/i386/pc/console.c (grub_console_getwh): New function.
14360 (grub_console_term): Assign grub_console_getwh to getwh.
14361
14362 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14363 function is defined in normal/completion.c as
14364 grub_normal_do_completion.
14365 (grub_cmdline_get): Use grub_normal_do_completion instead of
14366 grub_tab_complete.
14367
14368 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14369 returns non-zero, otherwise return 0.
14370 (grub_partition_iterate): First, probe the partition map. Then,
14371 call ITERATE only for this partition map.
14372
14373 * kern/misc.c (grub_strncmp): Rewritten.
14374
14375 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14376 returns non-zero. Otherwise return 0.
14377
14378 * include/grub/partition.h (grub_partition_map_iterate): Return
14379 int instead of void.
14380
14381 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14382
14383 * include/grub/misc.h (grub_strncmp): Change the type of N to
14384 grub_size_t.
14385
14386 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14387 of void.
14388
14389 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 14390 unsigned explicitly before comparing it with I.
8de3495c 14391
14392 * kern/main.c (grub_env_write_root): Add the attribute unused into
14393 VAR.
14394
14395 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14396 normal/completion.c.
14397 (normal_mod_SOURCES): Likewise.
14398 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14399 (normal_mod_SOURCES): Likewise.
14400
14401 * normal/command.c (grub_iterate_commands): If ITERATE returns
14402 non-zero, return one immediately.
14403
e85e144b 144042005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14405
14406 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14407 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14408 descriptions.
14409 (grub_vbe_get_controller_info): New function.
14410 (grub_vbe_get_mode_info): Likewise.
14411 (grub_vbe_set_mode): Likewise.
14412 (grub_vbe_get_mode): Likewise.
14413 (grub_vbe_set_memory_window): Likewise.
14414 (grub_vbe_get_memory_window): Likewise.
14415 (grub_vbe_set_scanline_length): Likewise.
14416 (grub_vbe_get_scanline_length): Likewise.
14417 (grub_vbe_set_display_start): Likewise.
14418 (grub_vbe_get_display_start): Likewise.
14419 (grub_vbe_set_palette_data): Likewise.
14420 * include/grub/i386/pc/vbe.h: New file.
14421
c46153d2 144222005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14423
14424 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14425 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14426 * DISTLIST: Likewise.
14427 * kern/ieee1275/of.c: Moved to ...
14428 * kern/ieee1275/ieee1275.c: ... here.
14429
0cb90c45 144302005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14431
14432 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14433 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14434 Pass 0 as `end' parameter to grub_strtoul().
14435
a19fb360 144362005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14437
14438 * include/grub/powerpc/ieee1275/console.h: Do not include
14439 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14440 ifdef.
14441 (grub_console_cur_color): Remove i386-specific prototype.
14442 (grub_console_real_putchar): Likewise.
14443 (grub_console_checkkey): Likewise.
14444 (grub_console_getkey): Likewise.
14445 (grub_console_getxy): Likewise.
14446 (grub_console_gotoxy): Likewise.
14447 (grub_console_cls): Likewise.
14448 (grub_console_setcursor): Likewise.
14449 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14450 Include <grub/machine/console.h>.
14451 * term/ieee1275/ofconsole.c: Likewise.
14452
4ac9bd04 144532005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14454
14455 * Makefile.in (LIBLZO): New variable.
14456
14457 * configure.ac: Check for LZO version 2.
14458
14459 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14460 lzo/lzo1x.h instead of lzo1x.h.
14461
14462 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14463 of -llzo.
14464
14465 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14466 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14467
14468 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14469 copying the data from PARTITION to P.
14470
f4917dfd 144712005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14472
14473 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14474 negative, unload the module.
14475
14476 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14477 map is "pc_partition_map" but not "pc".
14478 (usage): Fix the description. The options are --boot-image and
14479 --core-image but not --boot-file or --core-file.
14480 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14481 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14482 DEFAULT_DIRECTORY.
14483
14484 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14485 --core-file. Specify INSTALL_DEVICE as an argument.
14486
14487 * util/console.c: Include config.h.
14488 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14489 [HAVE_NCURSES_H]: Include ncurses.h.
14490 [HAVE_CURSES_H]: Include curses.h.
14491 [!A_NORMAL] (A_NORMAL): Defined as zero.
14492 [!A_STANDOUT] (A_STANDOUT): Likewise.
14493
14494 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14495 -lncurses.
14496 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14497
14498 * configure.ac: Check for curses libraries and headers.
14499
14500 * Makefile.in (LIBCURSES): New variable.
14501
14502 * genmk.rb (Script::rule): Set the executable bits.
14503
14504 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14505 name of the PC partition map is "pc_partition_map" but not "pc".
14506
0e143073 145072005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14508
14509 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14510 (modules): Likewise.
14511 (usage): Added descriptions for --modules and --grub-probefs.
14512 Handle --modules and --grub-probefs. Save the arguments in MODULES
14513 and GRUB_PROBEFS, respectively.
14514 Auto-detect a filesystem module against GRUBDIR. If the result is
14515 empty and modules are not specified explicitly, abort the
14516 installation. Add the result to MODULES.
14517
14518 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14519 disk/powerpc/ieee1275/ofdisk.c,
14520 include/grub/powerpc/ieee1275/init.h and
14521 term/powerpc/ieee1275/ofconsole.c.
14522 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14523 term/ieee1275/ofconsole.c.
14524
14525 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14526
14527 * COPYING: Upgraded to the latest version. Only the address of the
14528 FSF office has changed.
f19dbdb7 14529
efd6e6d5 145302005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14531
14532 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14533 kern/ieee1275.c with kern/ieee1275/of.c.
14534
14535 * kern/ieee1275.c: Moved to ...
14536 * kern/ieee1275/of.c: ... here.
14537
8ceafda2 145382005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14539
14540 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 14541 readability.
8ceafda2 14542
14543 * config.guess: Updated to the latest version from gnulib.
14544 * config.sub: Likewise.
14545 * install.sh: Likewise.
14546 * mkinstalldirs: Likewise.
14547
14548 * include/grub/console.h: Removed. This file is arch-specific. Do
14549 not put this in include/grub.
14550
14551 * include/grub/i386/pc/console.h: Resurrected.
14552
14553 * util/console.c: Include grub/machine/console.h instead of
14554 grub/console.h.
14555 * util/grub-emu.c: Likewise.
14556
267f6cd9 145572005-08-04 Marco Gerards <metgerards@student.han.nl>
14558
14559 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14560 hardcoded value.
f19dbdb7 14561
267f6cd9 14562 From Vincent Pelletier <subdino2004@yahoo.fr>
14563 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14564 Redefined to use grub_getwh.
14565 (grub_term): New member named getwh.
14566 (grub_getwh): New prototype.
14567 * kern/term.c (grub_getwh): New function.
14568 * term/i386/pc/console.c (grub_console_getwh): New function.
14569 (grub_console_term): New member `getwh'.
14570 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14571 (grub_vga_term): New member `getwh'.
0b5abe02 14572 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 14573 grub_ssize_t.
14574 (grub_ofconsole_getw): New function.
14575 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14576 (grub_ofconsole_term): New field named getwh and new initial
14577 value.
14578
3be7266d 145792005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14580
14581 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14582 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14583 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14584 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14585 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14586 of <grub/machine/ieee1275.h>.
14587 * commands/ieee1275/reboot.c: Likewise.
14588 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14589 * kern/ieee1275.c: ... to here. All users updated. Change all
14590 parameter structs to use new type `grub_ieee1275_cell_t'.
14591 * term/powerpc/ieee1275/ofconsole.c: Move ...
14592 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14593 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14594 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14595 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14596 to return int.
14597 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14598 Remove unused prototypes. All users updated.
14599 * include/grub/powerpc/ieee1275/console.h: Removed.
14600 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14601 `grub_ieee1275_cell_t'.
14602 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14603 Cast comparisons with -1 to the correct type.
14604 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14605 type to match `grub_ieee1275_entry_fn'.
14606
8b5f3938 146072005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14608
14609 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14610
14611 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14612 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14613 partmap/sun.c.
14614 (grub_probefs_SOURCES): New variable.
14615
14616 * util/i386/pc/grub-probefs.c: New file.
14617
14618 * util/i386/pc/grub-setup.c (main): Call
14619 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14620 grub_hfs_init and grub_jfs_init to initialize the system. Call
14621 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14622 grub_pc_partition_map_fini to finish the system.
14623
ea409713 146242005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14625
14626 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14627 function.
14628 (grub_multiboot_load_elf32): Likewise.
14629 (grub_multiboot_is_elf64): Likewise.
14630 (grub_multiboot_load_elf64): Likewise.
14631 (grub_multiboot_load_elf): Likewise.
14632 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14633 an ELF32 or ELF64 file.
14634 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14635
14636 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14637 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14638 NULL before calling FS->LABEL.
14639 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14640 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14641 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14642 before calling FS->LABEL.
14643
141a288b 146442005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14645
14646 * util/i386/pc/grub-install.in (datadir): New variable.
14647 (libdir): Removed.
14648 (pkgdatadir): New variable.
14649 (pkglibdir): Removed.
14650
0d5f8a54 146512005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14652
14653 * DISTLIST: Added util/i386/pc/grub-install.in.
14654
14655 * util/i386/pc/grub-install.in: New file.
14656
14657 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14658 (grub_install_SOURCES): Likewise.
14659
14660 * genmk.rb: Added support for scripts.
14661 (Script): New class.
14662 (scripts): New variable.
14663
14664 * Makefile.in (install-local): Install sbin_SCRIPTS by
14665 INSTALL_SCRIPT.
14666 (uninstall): Remove sbin_SCRIPTS.
14667
14668 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14669 device, try to get a GRUB device by
14670 grub_util_biosdisk_get_grub_dev.
14671 Free DEST_DEV.
14672
14673 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14674 description for --device-map.
14675
5f968e1e 146762005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14677
14678 Change the semantics of variable hooks. They now return strings
14679 instead of error values.
f19dbdb7 14680
5f968e1e 14681 * util/i386/pc/grub-setup.c: Include grub/env.h.
14682 (setup): Use grub_device_set_root instead of grub_env_set.
14683
14684 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14685 grub_env_get instead of grub_device_set_root and
14686 grub_device_get_root, respectively.
14687
14688 * kern/main.c (grub_env_write_root): New function.
14689 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14690 grub_env_set instead of grub_device_set_root.
14691
14692 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14693 many variables.
14694 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14695 rather than calling ENV->WRITE_HOOK afterwards.
14696 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14697 passing a pointer of a pointer.
14698 (grub_register_variable_hook): Change the types of "read_hook" and
14699 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14700 respectively.
14701 Allocate the default empty string on the heap, because this string
14702 may be freed later.
14703
14704 * kern/device.c: Include grub/env.h.
14705 (grub_device_set_root): Removed.
14706 (grub_device_get_root): Likewise.
14707 (grub_device_open): Use grub_env_get instead of
14708 grub_device_get_root.
14709
14710 * include/grub/env.h (grub_env_read_hook_t): New type.
14711 (grub_env_write_hook_t): Likewise.
14712 (grub_env_var): Change the types of "read_hook" and "write_hook"
14713 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14714 (grub_register_variable_hook): Likewise.
14715
14716 * include/grub/device.h (grub_device_set_root): Removed.
14717 (grub_device_set_root): Likewise.
14718
14719 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14720 make sure that DIRNAME terminates with '/', so that
14721 grub_fat_find_dir will fail if PATH is not a directory.
14722
14723 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14724 from DIRNAME.
14725 Use the qualifier auto for print_files and print_files_long.
14726 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14727 as a regular file.
14728 Put a newline only if there is no error.
14729 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14730 used.
14731
896f0afd 147322005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14733
14734 * kern/partition.c (grub_partition_probe): Initialize PART to
14735 NULL. Otherwise, when no partition map is registered, this returns
14736 a garbage.
14737
b28b81b2 147382005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14739
14740 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14741 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14742 valid.
14743
5f3607e0 147442005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14745
14746 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14747 information on each device, if it does not have partitions. Print
14748 "Device" instead of "Disk", because this function is not specific
14749 to disk devices.
14750
14751 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14752 static to ensure that it is put on the memory rather than a
14753 register.
14754
502c87e8 147552005-07-17 Yoshinori Okuji <okuji@enbug.org>
14756
14757 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14758 (grub_cat_init): Likewise.
14759 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14760 (options): Likewise.
14761 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14762 (grub_configfile_init): Likewise.
14763 * font/manager.c (GRUB_MOD_INIT): Likewise.
14764 * commands/help.c (GRUB_MOD_INIT): Likewise.
14765 (grub_help_init): Likewise.
14766 * normal/command.c (grub_command_init): Likewise.
14767 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14768 * disk/loopback.c (grub_loop_init): Likewise.
14769 (GRUB_MOD_INIT): Likewise.
14770 * commands/ls.c (grub_ls_init): Likewise.
14771 (GRUB_MOD_INIT): Likewise.
14772 (options): Likewise.
14773 * commands/boot.c (grub_boot_init): Likewise.
14774 (GRUB_MOD_INIT): Likewise.
14775 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14776 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14777 (GRUB_MOD_INIT): Likewise.
14778 * commands/cmp.c (grub_cmp_init): Likewise.
14779 (GRUB_MOD_INIT): Likewise.
14780
14781 * normal/arg.c: Use <> instead of "" to include header files.
14782 (SHORT_ARG_HELP): New macro.
14783 (SHORT_ARG_USAGE): Likewise.
14784 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14785 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14786 descriptions.
14787 (find_short): Check if C is 'h' or 'u' explicitly.
14788 (grub_arg_show_help): Use space characters instead of tabs. Treat
14789 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14790 are shown with --help and --usage only if they are not used for
14791 the command itself.
14792 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14793 'h' and 'u'.
14794
14795 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14796 const into "longarg". Change the type of "shortarg" to int.
14797
f806d18e 147982005-07-17 Yoshinori Okuji <okuji@enbug.org>
14799
14800 * boot/i386/pc/boot.S (boot_drive_check): New label.
14801
14802 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14803 macro.
14804
14805 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14806 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14807
e293232b 148082005-07-17 Yoshinori Okuji <okuji@enbug.org>
14809
14810 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14811 When turning off Gate A20, skip the check and return immediately,
14812 because this is not fatal usually.
14813
ebedfd00 148142005-07-17 Yoshinori Okuji <okuji@enbug.org>
14815
14816 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14817 be 0x7C00 instead of 0x8000.
14818
14819 * boot/i386/pc/pxeboot.S: Rewritten.
14820
14821 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14822 EXT_C.
14823 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14824 result.
14825
654fc59f 148262005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14827
14828 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14829 robustness. This routine now supports a BIOS call and System
14830 Control Port A to modify the gate A20.
14831
14832 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14833 Increased to 0x440.
14834
09f9923f 148352005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14836
14837 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14838 device path and resulting ihandle.
14839 (grub_ofdisk_close): dprintf the ihandle being closed.
14840 (grub_ofdisk_read): dprintf function parameters.
14841 * kern/mm.c (grub_mm_init_region): Likewise.
14842 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14843 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14844 size, and boot arguments.
14845 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14846 before loading into memory.
14847 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14848 before loading into memory.
14849
7ef504d8 148502005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14851
14852 * kern/mm.c: Added much documentation.
14853 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14854 8, set to 5 instead of 8.
14855
e0f050c2 148562005-07-10 Yoshinori Okuji <okuji@enbug.org>
14857
14858 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14859
14860 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14861 (grub_mkdevicemap_SOURCES): New variable.
14862
14863 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14864 lib/device.c of GRUB Legacy.
14865
7224189a 148662005-07-10 Yoshinori Okuji <okuji@enbug.org>
14867
14868 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14869 instead of PATH is NULL.
14870
68c864eb 148712005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14872
14873 * commands/cmp.c (BUFFER_SIZE): New macro.
14874 (grub_cmd_cmp): Close the right file at the right time. Compare
14875 only data just read. Don't report files of different size as
14876 identical. Dynamically allocate buffers. Move variable
14877 declarations at the beginning of function.
14878
e6f3e614 148792005-07-09 Yoshinori Okuji <okuji@enbug.org>
14880
14881 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14882 reverse.
14883
f8f1559a 148842004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14885
14886 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14887 when backspace is pressed at beginning of line.
14888
39c9d41d 148892005-07-03 Yoshinori Okuji <okuji@enbug.org>
14890
14891 * DISTLIST: Added genfslist.sh.
14892
14893 * normal/main.c (fs_module_list): New variable.
14894 (autoload_fs_module): New function.
14895 (read_fs_list): Likewise.
14896 (grub_normal_execute): Call read_fs_list.
14897
14898 * kern/fs.c (grub_fs_autoload_hook): New variable.
14899 (grub_fs_probe): Added support for auto-loading.
14900
14901 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14902 (grub_fs_module_list_t): New type.
14903
14904 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14905 (grub_fs_autoload_hook): New prototype.
14906
14907 * genfslist.sh: New file.
f19dbdb7 14908
39c9d41d 14909 * genmk.rb: Added a rule to generate a filesystem list.
14910
121c1d83 149112005-06-30 Marco Gerards <metgerards@student.han.nl>
14912
14913 * configure.ac: Fix the test for cross-compiling.
14914
14915 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14916 define GRUB_UTIL anymore.
14917
14918 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14919 so this function works on other systems than just big endian.
14920 (load_modules): Likewise.
14921 (add_segments): Likewise.
14922
e75d76e1 149232005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14924
14925 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14926 contains `l' modifier, get a long from va_arg().
14927
50b5a0a7 149282005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14929
14930 * kern/mm.c (grub_free): If the next free block which is being
14931 merged is the first free block, set the first block to the block
14932 being freed.
14933 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14934
89371b20 149352005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14936
14937 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14938 `grub_ieee1275_chosen'.
14939
168d6e58 149402005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14941
14942 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14943 (grub_ieee1275_chosen): New variable.
14944 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14945 `chosen'.
14946 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14947 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14948 Rename first argument to `phandle' for consistency.
14949 (grub_ieee1275_get_property_length): Likewise.
14950 (grub_ieee1275_next_property): Likewise. Change type of first argument
14951 to grub_ieee1275_phandle_t.
14952 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14953 Move export next to declaration.
14954 (grub_ieee1275_chosen): New variable.
14955 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14956 Correct cosmetic typo.
14957 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14958 `grub_ieee1275_chosen'.
14959 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14960 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14961 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14962 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14963 `grub_ieee1275_chosen'.
14964
ca5baa3f 149652005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14966
14967 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14968 /chosen/bootargs.
14969 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14970 /chosen/bootargs as "variable=value" pairs.
14971
708b345f 149722005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14973
14974 * include/grub/misc.h (grub_dprintf): New macro.
14975 (grub_real_dprintf): New prototype.
14976 (grub_strword): Likewise.
14977 (grub_iswordseparator): Likewise.
14978 * kern/misc.c (grub_real_dprintf): New function.
14979 (grub_strword): Likewise.
14980 (grub_iswordseparator): Likewise.
14981
f4c5e67c 149822005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14983
14984 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14985 (roundup): Remove macro.
14986 (grub_ieee1275_flags): Make static.
14987 (grub_ieee1275_realmode): Remove.
14988 (grub_ieee1275_test_flag): New function.
14989 (grub_ieee1275_set_flag): Likewise.
14990 (find_options): Rename to `grub_ieee1275_find_options'; update
14991 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14992 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14993 (cmain): New prototype.
14994 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14995 `grub_ieee1275_flags' directly.
14996 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14997 machine/biosdisk.h.
14998 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14999 Don't include grub/machine/init.h.
15000 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15001 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15002 Remove prototype.
15003 (grub_ieee1275_realmode): Likewise.
15004 (grub_ieee1275_flag): New enum.
15005 (grub_ieee1275_test_flag): New prototype.
15006 (grub_ieee1275_set_flag): New prototype.
15007 * include/grub/powerpc/ieee1275/init.h: Remove file.
15008 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15009 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15010 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15011 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15012 comment.
15013 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15014 `grub_ieee1275_test_flag'.
15015 (grub_ieee1275_encode_devname): Likewise.
15016
ed16607e 150172005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15018
15019 * include/grub/powerpc/ieee1275/ieee1275.h
15020 (grub_ieee1275_encode_devname): New prototype.
15021 (grub_ieee1275_get_filename): Likewise.
15022 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15023 function.
15024 (grub_set_prefix): Likewise.
15025 (grub_machine_init): Call grub_set_prefix.
15026 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15027 (grub_parse_type): New enum.
15028 (grub_ieee1275_get_devargs): New function.
15029 (grub_ieee1275_get_devname): Likewise.
15030 (grub_ieee1275_parse_args): Likewise.
15031 (grub_ieee1275_get_filename): Likewise.
15032 (grub_ieee1275_encode_devname): Likewise.
15033
be369920 150342005-03-30 Marco Gerards <metgerards@student.han.nl>
15035
15036 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15037 `grub_loader_unset'.
15038
a5ce3a4a 150392005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15040
15041 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15042 instead of grub_ieee1275_interpret.
15043 (grub_halt_init): New function.
15044 (grub_halt_fini): Likewise.
15045 (GRUB_MOD_INIT): Correct message grammar.
15046 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15047 instead of grub_ieee1275_interpret.
15048 (grub_reboot_init): New function.
15049 (grub_reboot_fini): Likewise.
15050 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15051 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15052 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15053 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15054 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15055 function.
15056 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15057 Add prototype.
15058 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15059 prototype.
15060 (grub_halt): Likewise.
15061 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15062 (cmain): Remove __attribute__((unused)).
15063 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15064 (grub_heap_len): Likewise.
15065 (grub_machine_fini): New function.
15066 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15067 (grub_halt): Likewise.
15068 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15069 function.
15070 * util/powerpc/ieee1275/misc.c: New file.
15071
0058f771 150722005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15073
15074 * DISTLIST: New file.
15075 * gendistlist.sh: Likewise.
f19dbdb7 15076
0058f771 15077 * Makefile.in (COMMON_DISTFILES): Removed.
15078 (BOOT_DISTFILES): Likewise.
15079 (CONF_DISTFILES): Likewise.
15080 (DISK_DISTFILES): Likewise.
15081 (FS_DISTFILES): Likewise.
15082 (INCLUDE_DISTFILES): Likewise.
15083 (KERN_DISTFILES): Likewise.
15084 (LOADER_DISTFILES): Likewise.
15085 (TERM_DISTFILES): Likewise.
15086 (UTIL_DISTFILES): Likewise.
15087 (DISTFILES): Likewise.
15088 (uninstall): Uninstall files in $(pkgdata_DATA).
15089 (DISTLIST): New target.
15090 (distdir): Use the contents of the file DISTLIST to get a list of
15091 distributed files.
15092
46b3b8a5 150932005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15094
15095 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15096 descriptor. This is ported from GRUB Legacy.
15097
15098 * gencmdlist.sh: Added an extra semicolon to make it work with
15099 old sed versions. Reported by Robert Bihlmeyer
15100 <robbe@orcus.priv.at>.
15101
5822ff87 151022005-03-08 Yoshinori Okuji <okuji@enbug.org>
15103
15104 Automatic loading of commands is supported.
f19dbdb7 15105
5822ff87 15106 * normal/main.c (read_command_list): New function.
15107 (grub_normal_execute): Call read_command_list.
15108
15109 * normal/command.c (grub_register_command): Return zero or CMD.
15110 Allocate CMD->NAME from the heap.
15111 Initialize CMD->MODULE_NAME to zero.
15112 Find the same name as well. If the same command is found and it is
15113 a dummy command, overwrite members. If it is not a dummy command,
15114 return zero.
15115 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15116 (grub_command_find): If a dummy command is found, load a module
15117 and retry to find a command only once.
15118
15119 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15120 make sure that each command is loaded.
15121
15122 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15123 macro.
15124 (struct grub_command): Remove const from the member `name'.
15125 Add a new member `module_name'.
15126 (grub_register_command): Return grub_command_t.
15127
15128 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15129 sure that each command is loaded.
15130
15131 * genmk.rb (PModule::rule): Specify a module name without the
15132 suffix ".mod" to gencmdlist.sh.
15133
7b1f4b57 151342005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15135
15136 * gencmdlist.sh: New file.
f19dbdb7 15137
7b1f4b57 15138 * genmk.rb (PModule::rule): Generate a rule for a command list.
15139 Clean command.lst.
15140 Generate command.lst from $(COMMANDFILES).
15141
15142 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15143 (DATA): Added $(pkgdata_DATA).
15144 (install-local): Install files in $(pkgdata_DATA).
15145
062aaf39 151462005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15147
15148 * term/i386/pc/vga.c (debug_command): Removed.
15149 (GRUB_MOD_INIT): Do not register the command "debug".
15150
15151 From Hollis Blanchard:
15152 * commands/configfile.c: New file.
15153 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15154 commands/configfile.c.
15155 (pkgdata_MODULES): Added configfile.mod.
15156 (configfile_mod_SOURCES): New variable.
15157 (configfile_mod_CFLAGS): Likewise.
15158 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15159 commands/configfile.c.
15160 (pkgdata_MODULES): Added configfile.mod.
15161 (configfile_mod_SOURCES): New variable.
15162 (configfile_mod_CFLAGS): Likewise.
15163 * util/grub-emu.c (main): Call grub_configfile_init and
15164 grub_configfile_fini.
15165 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15166 prototype.
15167 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 15168
cee01aa6 151692005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15170
15171 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15172 address.
15173
15174 * commands/help.c (grub_cmd_help): Do not print newlines after
15175 the last command in print_command_help.
15176
93f3a1d8 151772005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15178
15179 * commands/default.h: New file.
15180 * commands/timeout.h: Likewise.
15181 * normal/context.c: Likewise.
f19dbdb7 15182
93f3a1d8 15183 * util/misc.c: Do not include sys/times.h.
15184 Include sys/time.h and grub/machine/time.h.
15185 (grub_get_rtc): Rewritten with gettimeofday.
15186
15187 * util/grub-emu.c (main): Call grub_default_init and
15188 grub_timeout_init before grub_normal_init, and call
15189 grub_timeout_fini and grub_default_fini after grub_main.
15190
15191 * util/console.c (grub_ncurses_checkkey): Return the read
15192 character or -1.
15193
15194 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15195 timeouts.
15196
15197 * normal/main.c (read_config_file): Push MENU. If this fails,
15198 print an error and wait for a user input.
15199 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15200 If a menu is empty or an error occurs, pop MENU.
15201 (grub_normal_execute): Pop and free MENU after grub_menu_run
15202 returns.
15203
15204 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15205
15206 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15207 include time.h.
15208 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15209 without GRUB_UTIL.
15210 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15211 time.h.
15212 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15213 without GRUB_UTIL.
15214
15215 * include/grub/normal.h (struct grub_menu_list): New struct.
15216 (grub_menu_list_t): New type.
15217 (struct grub_context): New struct.
15218 (grub_context_t): New type.
15219 (grub_register_command): Got rid of EXPORT_FUNC.
15220 (grub_unregister_command): Likewise.
15221 (grub_context_get): New prototype.
15222 (grub_context_get_current_menu): Likewise.
15223 (grub_context_push_menu): Likewise.
15224 (grub_context_pop_menu): Likewise.
15225 [GRUB_UTIL] (grub_default_init): Likewise.
15226 [GRUB_UTIL] (grub_default_fini): Likewise.
15227 [GRUB_UTIL] (grub_timeout_init): Likewise.
15228 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15229
15230 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15231 commands/timeout.c and normal/context.c.
15232 (pkgdata_MODULES): Added default.mod and timeout.mod.
15233 (normal_mod_SOURCES): Added normal/context.c.
15234 (default_mod_SOURCES): New variable.
15235 (default_mod_CFLAGS): Likewise.
15236 (timeout_mod_SOURCES): Likewise.
15237 (timeout_mod_CFLAGS): Likewise.
15238 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15239 conf/i386-pc.rmk.
15240 (pkgdata_MODULES): Added default.mod and timeout.mod.
15241 (normal_mod_SOURCES): Added normal/context.c.
15242 (default_mod_SOURCES): New variable.
15243 (default_mod_CFLAGS): Likewise.
15244 (timeout_mod_SOURCES): Likewise.
15245 (timeout_mod_CFLAGS): Likewise.
15246
15247 * Makefile.in (all-local): Added $(MKFILES).
15248
4ed2e1dd 152492005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15250
15251 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15252 (grub_emu_SOURCES): Likewise.
15253 (pkgdata_MODULES): Add `sun.mod'.
15254 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15255 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15256 `partmap/sun.c'.
15257 (pkgdata_MODULES): Add `sun.mod'.
15258 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15259 * include/grub/partition.h (grub_sun_partition_map_init): New
15260 prototype.
15261 (grub_sun_partition_map_fini): Likewise.
15262 * partmap/sun.c: New file.
15263 * util/grub-emu.c (main): Initialize and de-initialize the sun
15264 partitionmap support.
15265
4d4e372e 152662005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15267
15268 This implements an Emacs-like menu entry editor.
f19dbdb7 15269
4d4e372e 15270 * normal/menu_entry.c: New file.
f19dbdb7 15271
4d4e372e 15272 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15273 characters to ASCII.
15274 (saved_char): New variable.
15275 (grub_ncurses_checkkey): Rewritten completely.
15276 (grub_ncurses_getkey): Likewise.
15277 (grub_ncurses_init): Call raw instead of cbreak.
15278
15279 * normal/menu.c (print_entry): Do not put a space.
15280 (init_page): Renamed to ...
15281 (grub_menu_init_page): ... this. All callers changed.
15282 (edit_menu_entry): Removed.
15283 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15284
15285 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15286
15287 * kern/misc.c (grub_vprintf): Call grub_refresh.
15288
15289 * normal/menu.c (DISP_LEFT): Renamed to ...
15290 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15291 * normal/menu.c (DISP_UP): Renamed to ...
15292 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15293 * normal/menu.c (DISP_RIGHT): Renamed to ...
15294 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15295 * normal/menu.c (DISP_DOWN): Renamed to ...
15296 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15297 * normal/menu.c (DISP_HLINE): Renamed to ...
15298 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15299 * normal/menu.c (DISP_VLINE): Renamed to ...
15300 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15301 * normal/menu.c (DISP_UL): Renamed to ...
15302 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15303 * normal/menu.c (DISP_UR): Renamed to ...
15304 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15305 * normal/menu.c (DISP_LL): Renamed to ...
15306 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15307 * normal/menu.c (DISP_LR): Renamed to ...
15308 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15309 * normal/menu.c (TERM_WIDTH): Renamed to ...
15310 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15311 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15312 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15313 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15314 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15315 * normal/menu.c (TERM_MARGIN): Renamed to ...
15316 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15317 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15318 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15319 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15320 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15321 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15322 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15323 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15324 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15325 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15326 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15327 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15328 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15329 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15330 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15331 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15332 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15333 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15334 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15335 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15336 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15337 All callers changed.
15338
15339 * include/grub/normal.h: New prototype.
15340
15341 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15342 normal/menu_entry.c.
15343 (normal_mod_SOURCES): Likewise.
15344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15345 (normal_mod_SOURCES): Likewise.
15346
e6b92c8a 153472005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15348
15349 * include/grub/normal.h (grub_halt_init): New prototype.
15350 (grub_halt_fini): Likewise.
15351 (grub_reboot_init): Likewise.
15352 (grub_reboot_fini): Likewise.
15353
15354 * util/grub-emu.c: Include signal.h.
15355 (main_env): New global variable.
15356 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15357 catch C-c.
15358 (grub_machine_fini): New function.
15359 (main): Call grub_halt_init and grub_reboot_init before
15360 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15361 Call setjmp with MAIN_ENV to go back afterwards.
15362 Call grub_machine_fini right before return.
15363
15364 * include/grub/util/misc.h: Include setjmp.h.
15365 (main_env): New prototype.
15366
15367 * include/grub/kernel.h (grub_machine_fini): New prototype.
15368 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15369 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15370
15371 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15372 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15373 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 15374
e6b92c8a 15375 * util/i386/pc/misc.c: New file.
f19dbdb7 15376
e6b92c8a 15377 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15378 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15379 commands/i386/pc/reboot.c.
15380
c642636f 153812005-02-14 Guillem Jover <guillem@hadrons.org>
15382
15383 * include/grub/dl.h (grub_dl_check_header): New prototype.
15384 (grub_arch_dl_check_header): Change return type to grub_err_t,
15385 remove size parameter and export function. Update all callers.
15386 * kern/dl.c (grub_dl_check_header): New function.
15387 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15388 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15389 are inside the core.
15390 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15391 independent ELF header checks.
15392 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15393 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15394 `grub_dl_check_header' instead of explicit checks. Check for the
15395 ELF type.
15396 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15397 `grub_dl_check_header' instead of explicit checks. Remove arch
15398 specific ELF header checks.
15399
e6b92c8a 15400 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15401 argument SIZE.
15402
5eabe94b 154032005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15404
15405 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15406 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15407
1b14a681 154082005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15409
15410 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 15411 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 15412 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 15413 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 15414 * partmap/amiga.c (amiga_partition_map_iterate): Return
15415 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15416 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15417
aca108aa 154182005-02-01 Guillem Jover <guillem@hadrons.org>
15419
15420 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15421 help info.
15422
c9f9c556 154232005-01-31 Marco Gerards <metgerards@student.han.nl>
15424
15425 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15426 Removed prototype.
15427 (grub_rescue_cmd_linux): New prototype.
15428 (grub_rescue_cmd_initrd): Likewise.
15429 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15430 `bi_rec'.
15431 (grub_linux_release_mem): Release the memory for the initrd.
15432 (grub_load_linux): Renamed from this...
15433 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15434 Changed `entry' not to be static. Loop over memory regions to
15435 find another one when the default fails.
15436 (grub_rescue_cmd_initrd): New function.
15437 (grub_linux_init): Remove function.
15438 (grub_linux_fini): Likewise.
15439 (GRUB_MOD_INIT): Register `initrd'.
15440 (GRUB_MOD_FINI): Unregister `initrd'.
15441 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15442 Function removed.
15443 (grub_linux_normal_fini): Likewise.
15444 (GRUB_MOD_INIT): Register `initrd'.
15445 (GRUB_MOD_FINI): Unregister `initrd'.
15446
990cf3aa 154472005-01-31 Marco Gerards <metgerards@student.han.nl>
15448
15449 * commands/help.c: New file.
15450 * normal/arg.c (show_help): Renamed to...
15451 (grub_arg_show_help): ... this.
15452 * commands/i386/pc/halt.c: New file.
15453 * commands/i386/pc/reboot.c: Likewise.
15454 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15455 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15456 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15457 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15458 variables.
15459 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15460 `commands/help.c'.
15461 (pkgdata_MODULES): Add `help.mod'.
15462 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15463 * grub/i386/pc/init.h (grub_reboot): New prototype.
15464 (grub_halt): Likewise.
15465 * include/grub/normal.h (grub_arg_show_help): New prototype.
15466 (grub_help_init): Likewise.
15467 (grub_help_fini): Likewise.
15468 * util/grub-emu.c (main): Initialize and deinitialize the help
15469 command.
15470
15471 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15472
15473 * normal/command.c (grub_command_init): Fixed the description of
15474 the `set' and `unset' commands.
15475
154762005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 15477
15478 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15479 function.
15480 * commands/ieee1275/halt.c: New file.
15481 * commands/ieee1275/reboot.c: Likewise.
15482 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15483 `__attribute__ ((unused))'. Some GCS related fixed.
15484 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15485 (grub_suspend_fini): Likewise.
15486 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15487 and `halt.mod'.
15488 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15489 (halt_mod_CFLAGS): New variables.
15490 * include/grub/powerpc/ieee1275/ieee1275.h
15491 (grub_ieee1275_interpret): New prototype.
15492
1ab09cc7 154932005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15494
15495 * include/grub/misc.h (memmove): New prototype.
15496 (memcpy): Likewise.
15497
8b8cbdb2 154982005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15499
15500 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15501 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15502
e3741a27 155032005-01-22 Marco Gerards <metgerards@student.han.nl>
15504
15505 * kern/misc.c (grub_strndup): Function rewritten.
15506
776bd780 155072005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15508
15509 * normal/menu.c (TERM_WIDTH): Macro redefined.
15510 (TERM_TOP_BORDER_Y): Likewise.
15511 (draw_border): Replaced while-loop by a for-loop. Make the number
15512 of lines consistent with the number of lines displayed in
15513 print_entries. Added a margin below the rectangle.
15514 (print_entry): Make the entry fit in the rectangle.
15515 (print_entries): Display the scroll arrows next to the right
15516 border.
15517
78026bce 155182005-01-21 Marco Gerards <metgerards@student.han.nl>
15519
15520 * fs/minix.c (grub_minix_find_file): Reserve more space for
15521 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15522 `grub_strncpy' to copy `path' into it.
15523
67bbaf0f 155242005-01-21 Marco Gerards <metgerards@student.han.nl>
15525
15526 Add the loopback device, a device via which files can be accessed
15527 as devices.
f19dbdb7 15528
67bbaf0f 15529 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15530 (pkgdata_MODULES): Add loopback.mod.
15531 (loopback_mod_SOURCES): New variable.
15532 (loopback_mod_CFLAGS): Likewise.
15533 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15534 `disk/loopback.c'.
15535 (pkgdata_MODULES): Add loopback.mod.
15536 (loopback_mod_SOURCES): New variable.
15537 (loopback_mod_CFLAGS): Likewise.
15538 * disk/loopback.c: new file.
15539 * include/grub/normal.h (grub_loop_init): New prototype.
15540 (grub_loop_fini): New prototype.
15541 * util/grub-emu.c (main): Initialize and de-initialize loopback
15542 support.
15543 * include/grub/disk.h (grub_disk_dev_id): Add
15544 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15545
6f1c18bd 155462005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15547
15548 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15549 function.
15550 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15551 (suspend_mod_SOURCES): New variable.
15552 (suspend_mod_CFLAGS): Likewise.
15553 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15554 New prototype.
15555 * commands/ieee1275/suspend.c: New file.
15556
b38551da 155572005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15558
15559 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 15560 ((unused))' to `__attribute__ ((used))'.
b38551da 15561 (GRUB_MOD_FINI): Likewise.
15562 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15563 * genmk.rb (PModule): Assign space to common symbols when linking
15564 modules.
15565
777aff39 155662005-01-20 Marco Gerards <metgerards@student.han.nl>
15567
15568 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15569 `unsigned' arguments to `grub_size_t'.
15570 (grub_malloc): Likewise.
15571 (grub_realloc): Likewise.
15572 (grub_memalign): Likewise.
15573 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15574 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15575 * util/misc.c (grub_malloc): Likewise.
15576 (grub_realloc): Likewise.
15577 * kern/mm.c (get_header_from_pointer): Change the casts to
15578 `unsigned' into a cast to `grub_size_t'.
15579
15580 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15581 point to `currnode' when `currnode' is changed.
15582
15583 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15584 Schottelius <nico-linux@schottelius.org>.
15585
d0ff18e1 155862005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15587
15588 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15589 (note_path): Remove variable.
15590 (GRUB_IEEE1275_NOTE_NAME): New macro.
15591 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15592 (grub_ieee1275_note_hdr): New structure.
15593 (grub_ieee1275_note_desc): Likewise.
15594 (grub_ieee1275_note): Likewise.
15595 (load_note): Remove `dir' argument. All callers updated. Remove
15596 `note_img' and `path'. Do not load a file from `note_path'.
15597 Initialize a struct grub_ieee1275_note and write that to `out'.
15598 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15599
4ca7004c 156002005-01-05 Marco Gerards <metgerards@student.han.nl>
15601
15602 * util/misc.c (grub_util_read_image): Revert last change. It
15603 called `grub_util_read_at', which seeks from the beginning of the
15604 file.
15605
0b412211 156062005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15607
15608 * TODO: Add note about endianness in grub-mkimage.
15609 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15610 section.
15611 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15612 (grub_mkimage_SOURCES): New target.
15613 * include/grub/kernel.h (grub_start_addr): Remove variable.
15614 (grub_end_addr): Likewise.
15615 (grub_total_module_size): Likewise.
15616 (grub_kernel_image_size): Likewise.
15617 (GRUB_MODULE_MAGIC): New constant.
15618 (grub_module_info): New structure.
15619 (grub_arch_modules_addr): New prototype.
15620 (grub_get_end_addr): Remove prototype.
15621 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15622 * include/grub/powerpc/ieee1275/kernel.h: New file.
15623 * include/grub/util/misc.h (grub_util_get_fp_size): New
15624 prototype.
15625 (grub_util_read_at): Likewise.
15626 (grub_util_write_image_at): Likewise.
15627 * kern/main.c (grub_get_end_addr): Remove function.
15628 (grub_load_modules): Call grub_arch_modules_addr instead of using
15629 grub_end_addr. Look for a grub_module_info struct in memory. Use
15630 the grub_module_info fields instead of calling grub_get_end_addr
15631 as loop conditions. Move grub_add_unused_region code here.
15632 (grub_add_unused_region): Remove function.
15633 * kern/i386/pc/init.c: Include grub/cache.h.
15634 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15635 one call to add_mem_region.
15636 (grub_arch_modules_addr): New function.
15637 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15638 (grub_total_module_size): Likewise.
15639 Include grub/machine/kernel.h.
15640 (grub_arch_modules_addr): New function.
15641 * util/grub-emu.c (grub_end_addr): Remove variable.
15642 (grub_total_module_size): Likewise.
15643 (grub_arch_modules_addr): New function.
15644 * util/misc.c: Include unistd.h.
15645 (grub_util_get_fp_size): New function.
15646 (grub_util_read_at): Likewise.
15647 (grub_util_write_image_at): Likewise.
15648 (grub_util_read_image): Call grub_util_read_at.
15649 (grub_util_write_image): Call grub_util_write_image_at.
15650 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15651 additional memory in kernel_img for a struct grub_module_info.
15652 Fill in that grub_module_info.
15653 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15654
458786f8 156552005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15656
15657 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15658 New function.
15659 * include/grub/powerpc/ieee1275/ieee1275.h
15660 (grub_ieee1275_milliseconds): New prototype.
15661 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15662 Change to 1000.
15663 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15664 grub_ieee1275_milliseconds.
15665
ac507d1b 156662005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15667
15668 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15669 variable.
15670 (find_options): New function.
15671 (cmain): Call find_options.
15672 * include/grub/powerpc/ieee1275/ieee1275.h
15673 (grub_ieee1275_realmode): New extern variable.
15674 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15675 grub_map if grub_ieee1275_realmode is false.
15676
6b8fd1c4 156772004-12-29 Marco Gerards <metgerards@student.han.nl>
15678
15679 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15680 lines are inserted and make it work like readline. Reported by
15681 Vincent Pelletier <subdino2004@yahoo.fr>.
15682
8514a1e0 156832004-12-28 Marco Gerards <metgerards@student.han.nl>
15684
15685 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15686
15687 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15688 `kern/powerpc/cache.S'.
15689
924b6140 156902004-12-27 Marco Gerards <metgerards@student.han.nl>
15691
15692 * genmk.rb: Handle the `Program' class in the main loop. Written
15693 by Johan Rydberg <jrydberg@gnu.org>.
15694 (Program): New class.
15695 (programs): New variable.
15696 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15697 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15698 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15699 (help_arch): Function removed.
15700 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15701 `powerpc/libgcc.h' and `loader.h'.
15702 (pkgdata_PROGRAMS): New variable.
15703 (sbin_UTILITIES): Variable removed.
15704 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15705 (grubof_SOURCES): Variable re-defined so it only includes the
15706 core functionality.
15707 (grubof_CFLAGS): Remove `-DGRUBOF'.
15708 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15709 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15710 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15711 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15712 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15713 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15714 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15715 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15716 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15717 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15718 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15719 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15720 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15721 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15722 (pc_mod_CFLAGS): New variables.
15723 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15724 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15725 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15726 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15727 Moved from here...
15728 * include/grub/i386/pc/init.h (grub_os_area_addr)
15729 (rub_os_area_size): ... to here.
15730 * include/grub/powerpc/ieee1275/ieee1275.h
15731 (grub_ieee1275_entry_fn): Export symbol.
15732 * include/grub/powerpc/ieee1275/init.h: New file.
15733 * include/grub/powerpc/libgcc.h: Likewise.
15734 * include/grub/cache.h: Likewise.
15735 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15736 <hollis@penguinppc.org>.
15737 * kern/dl.c: Include <grub/cache.h>.
15738 (grub_dl_flush_cache): New function.
15739 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15740 for this module.
15741 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15742 (grub_console_init): Removed prototypes.
15743 (grub_machine_init): Don't initialize the modules anymore.
15744 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15745 static.
15746 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15747 Macro undef removed.
15748 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15749 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15750 relocation `R_PPC_REL32'. Return an error when the relocation is
15751 unknown.
15752 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15753 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15754 * util/misc.c (grub_arch_sync_caches): Likewise.
15755
e4b47e0c 157562004-12-19 Marco Gerards <metgerards@student.han.nl>
15757
15758 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15759 `symlist.c', add `grubof_symlist.c'.
15760 (symlist.c): Variable removed.
15761 (grubof_HEADERS): Variable added.
15762 (grubof_symlist.c): New target.
15763 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15764 `kernel_img_HEADERS'.
15765 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15766 * kern/powerpc/dl.c: New file.
15767 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15768 Function removed.
15769 (grub_arch_dl_relocate_symbols): Likewise.
15770 (grub_register_exported_symbols): Likewise.
15771
4ceb3636 157722004-12-13 Marco Gerards <metgerards@student.han.nl>
15773
15774 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15775 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15776 to fail instead. Reported by Vincent Pelletier
15777 <subdino2004@yahoo.fr>.
15778
15779 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15780 it is not allocated. Reported by Vincent Pelletier
15781 <subdino2004@yahoo.fr>.
15782
15783 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15784 output so the output looks better.
f19dbdb7 15785
3f1578fe 157862004-12-04 Marco Gerards <metgerards@student.han.nl>
15787
15788 Modulize the partition map support and add support for the amiga
15789 partition map.
f19dbdb7 15790
3f1578fe 15791 * commands/ls.c: Include <grub/partition.h> instead of
15792 <grub/machine/partition.h>.
15793 * kern/disk.c: Likewise.
15794 * kern/rescue.c: Likewise.
15795 * loader/i386/pc/chainloader.c: Likewise.
15796 * normal/cmdline.c: Likewise.
15797 * kern/powerpc/ieee1275/init.c: Likewise.
15798 (grub_machine_init): Call `grub_pc_partition_map_init',
15799 `grub_amiga_partition_map_init' and
15800 `grub_apple_partition_map_init'.
15801 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15802 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15803 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15804 `partition.h' and `pc_partition.h'.
15805 (grub_setup_SOURCES): Remove
15806 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15807 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15808 (grub_emu_SOURCES): Likewise.
15809 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15810 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15811 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15813 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15814 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15815 (grubof_SOURCES): Likewise.
15816 * disk/i386/pc/partition.c: File removed.
15817 * disk/powerpc/ieee1275/partition.c: Likewise.
15818 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15819 * include/grub/i386/pc/partition.h: Likewise.
15820 * kern/partition.c: New file.
15821 * partmap/amiga.c: Likewise.
15822 * partmap/apple.c: Likewise.
15823 * partmap/pc.c: Likewise.
15824 * include/grub/partition.h: Likewise..
15825 * include/grub/pc_partition.h: Likewise.
15826 * util/grub-emu.c: Include <grub/partition.h> instead of
15827 <grub/machine/partition.h>.
15828 (main): Call `grub_pc_partition_map_init',
15829 `grub_amiga_partition_map_init' and
15830 `grub_apple_partition_map_init' and deinitialize afterwards.
15831 * util/i386/pc/biosdisk.c: Include `#include
15832 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15833 `<grub/machine/partition.h>'.
15834 * util/i386/pc/grub-setup.c: Likewise.
15835 * util/i386/pc/biosdisk.c: Likewise.
15836 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15837 partition information in case of a PC partition.
15838 * util/i386/pc/grub-setup.c: Include `#include
15839 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15840 `<grub/machine/partition.h>'.
15841 (setup): Only access the PC specific partition information in case
15842 of a PC partition.
15843
0ef4ced9 158442004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15845
0ef4ced9 15846 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15847 (grub_longjmp): Likewise.
15848 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15849 20.
15850 * normal/powerpc/setjmp.S: New file.
15851 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15852 `normal/powerpc/setjmp.S'.
15853 (grubof_CFLAGS): Add `-DGRUBOF'.
15854 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15855 [GRUB_UTIL && !GRUBOF].
f19dbdb7 15856
19950e29 158572004-11-16 Marco Gerards <metgerards@student.han.nl>
15858
15859 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15860 property named `name'. Correctly handle the error returned by
15861 `grub_ieee1275_finddevice' if a device can not be opened.
15862
a2fea427 158632004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15864
15865 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15866 `actual' for negativity.
15867 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15868 kern/fshelp.c.
15869
41ea0ea3 158702004-11-01 Marco Gerards <metgerards@student.han.nl>
15871
15872 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15873 (PAGE_OFFSET): New macro.
15874 (CRTC_ADDR_PORT): Likewise.
15875 (CRTC_DATA_PORT): Likewise.
15876 (START_ADDR_HIGH_REGISTER): Likewise.
15877 (START_ADDR_LOW_REGISTER): Likewise.
15878 (GRAPHICS_ADDR_PORT): Likewise.
15879 (GRAPHICS_DATA_PORT): Likewise.
15880 (READ_MAP_REGISTER): Likewise.
15881 (INPUT_STATUS1_REGISTER): Likewise.
15882 (INPUT_STATUS1_VERTR_BIT): Likewise.
15883 (page): New variable.
15884 (wait_vretrace): New function.
15885 (set_read_map): Likewise.
15886 (set_start_address): Likewise.
15887 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15888 the right page.
15889 (check_vga_mem): Take the page into account.
15890 (write_char): Likewise.
15891 (write_cursor): Likewise.
15892 (scroll_up): Likewise. Copy the page to the page that is not
15893 shown and switch between both pages.
15894 (grub_vga_putchar): Fix off by one error.
15895 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15896 account.
15897
ad0bd20b 158982004-11-01 Marco Gerards <metgerards@student.han.nl>
15899
15900 Add support for iso9660 (including rockridge).
f19dbdb7 15901
ad0bd20b 15902 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15903 (iso9660_mod_SOURCES): New variable.
15904 (iso9660_mod_CFLAGS): Likewise.
15905 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15906 * include/grub/fs.h (grub_iso9660_init): New prototype.
15907 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15908 * fs/iso9660.c: New file.
15909
15910 * include/grub/misc.h (grub_strncat): New prototype.
15911 * kern/misc.c (grub_strncat): New function.
f19dbdb7 15912
ad0bd20b 15913 * fs/hfs.c (grub_hfs_mount): Translate the error
15914 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15915 * fs/jfs.c (grub_jfs_mount): Likewise.
15916 * fs/ufs.c (grub_ufs_mount): Likewise.
15917
a5477a59 159182004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15919
15920 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15921 which initialized BAT registers.
15922 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15923 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15924 Move from here...
15925 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15926 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15927 ... to here.
15928 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15929 (grub_mapclaim): Likewise.
15930 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15931 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15932 hand.
15933
9304c1f8 159342004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15935
15936 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15937 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15938 -ffreestanding and -msoft-float.
15939
86f4ae25 159402004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15941
15942 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15943 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15944 set in grub_ieee1275_flags.
15945
38912228 159462004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15947
15948 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15949 prototype.
15950 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15951 grub_console_init first.
15952 Change the memory range used for grub_ieee1275_claim and
15953 grub_mm_init_region.
15954 Print an error message if the claim fails.
15955 Include <grub/misc.h>.
15956
d1923dc8 159572004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15958
15959 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15960 Call grub_children_iterate for device nodes of type `scsi',
15961 `ide', or `ata'.
15962 (grub_ofdisk_open): Remove manual device alias resolution.
15963 Fix memory leak when device cannot be opened.
f19dbdb7 15964 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 15965 (grub_children_iterate): New prototype.
15966 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15967 New function.
15968 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15969 Return -1 if args.size was -1.
15970
4512e4f3 159712004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15972
15973 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15974 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15975 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15976 Open Firmware's memory for it; claim memory from _start to _end.
15977 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15978 (_end): New extern.
15979 (_start): Zero BSS from __bss_start to _end.
15980 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15981 New extern.
15982 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15983
4d61feb0 159842004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15985
ad0bd20b 15986 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15987 -1 if args.base was -1.
4d61feb0 15988
026fa2f9 159892004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15990
15991 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15992 escape sequence instead of a literal ^L. Also call
15993 grub_ofconsole_gotoxy.
15994
9f2220ef 159952004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15996
15997 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15998 void * arguments to grub_addr_t. All callers updated. Also make
15999 the `result' argument optional.
16000 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16001 All callers updated.
16002
8a572cd7 160032004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16004
16005 * commands/ls.c (grub_ls_list_files): Use the string following the
16006 initial ')', if present, as the filesystem path.
16007 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16008
16009 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16010
18aa81f2 160112004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16012
16013 Make the source code of the menu interface more readable.
f19dbdb7 16014
18aa81f2 16015 * normal/menu.c: Include grub/mm.h.
16016 (TERM_WIDTH): New macro.
16017 (TERM_HEIGHT): Likewise.
16018 (TERM_INFO_HEIGHT): Likewise.
16019 (TERM_MARGIN): Likewise.
16020 (TERM_SCROLL_WIDTH): Likewise.
16021 (TERM_TOP_BORDER_Y): Likewise.
16022 (TERM_LEFT_BORDER_X): Likewise.
16023 (TERM_BORDER_WIDTH): Likewise.
16024 (TERM_MESSAGE_HEIGHT): Likewise.
16025 (TERM_BORDER_HEIGHT): Likewise.
16026 (TERM_NUM_ENTRIES): Likewise.
16027 (TERM_FIRST_ENTRY_Y): Likewise.
16028 (TERM_ENTRY_WIDTH): Likewise.
16029 (TERM_CURSOR_X): Likewise.
16030 (draw_border): Use macros instead of magic numbers.
16031 (print_entry): Likewise.
16032 (print_entries): Likewise.
16033 (run_menu): Likewise. Also, handle the key 'e'.
16034 (run_menu_entry): Ignore empty command lines.
16035 (print_message): Added a new argument EDIT. If EDIT is true,
16036 print a different message.
16037 (init_page): Likewise.
16038 (edit_menu_entry): New function. Not implemented yet.
16039
b47efe30 160402004-09-17 Marco Gerards <metgerards@student.han.nl>
16041
16042 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16043 can be loaded from normal mode.
f19dbdb7 16044
b47efe30 16045 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16046 `multiboot.mod'.
16047 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16048 (multiboot_mod_CFLAGS): New variables.
16049 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 16050 * loader/i386/pc/multiboot_normal.c: Likewise.
16051
b47efe30 16052 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16053 attribute `unused'.
f19dbdb7 16054
b47efe30 16055 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16056 `fdiro' to read the mode information from instead of `diro'.
16057
16058 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16059 looking up a symlink.
16060
16061 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16062 macro.
16063 * normal/command.c (grub_command_execute): Don't parse the
16064 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16065 flags of the command.
16066
16067 * normal/menu.c (grub_menu_run): Fix typo.
16068
da75ac71 160692004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16070
16071 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16072
16073 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16074 `y + 1' instead of `y - 1'.
16075
16076 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 16077
062b24c2 160782004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16079
16080 From Hollis Blanchard <hollis@penguinppc.org>:
16081 * kern/misc.c (memmove): New alias for grub_memmove.
16082 (memcmp): New alias for grub_memcmp.
16083 (memset): New alias for grub_memset.
f19dbdb7 16084 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 16085 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 16086 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 16087 (grub_ieee1275_get_property): Likewise.
f19dbdb7 16088
8ddad845 160892004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16090
16091 Added normal mode command `chainloader' as module chain.mod, which
16092 depends on normal.mod and _chain.mod.
f19dbdb7 16093
8ddad845 16094 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16095 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16096 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16097 Deleted prototype.
16098 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16099 but arguments parsing moved to ...
16100 (grub_chainloader_cmd): ... here. New function.
16101 * include/grub/i386/pc/chainloader.h: New file.
16102 * loader/i386/pc/chainloader_normal.c: Likewise.
16103
2c1f4ce3 161042004-09-11 Marco Gerards <metgerards@student.han.nl>
16105
16106 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16107 (grub_mkimage_LDFLAGS): Likewise.
16108 (grub_emu_SOURCES): Likewise.
16109 (kernel_img_HEADERS): Added fshelp.h.
16110 * fs/ext2.c: Include <grub/fshelp.h>.
16111 (FILETYPE_REG): New macro.
16112 (FILETYPE_INO_REG): Likewise.
16113 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16114 Changed all users.
16115 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16116 all users.
16117 (grub_fshelp_node): New struct.
16118 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16119 to a pointer.
16120 (grub_ext2_get_file_block): Removed function.
16121 (grub_ext2_read_block): New function.
16122 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16123 This function was written.
16124 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16125 (grub_ext2_find_file): Removed function.
16126 (grub_ext2_read_symlink): New function.
16127 (grub_ext2_iterate_dir): Likewise.
16128 (grub_ext2_open): Rewritten.
16129 (grub_ext2_dir): Rewritten.
16130 * include/grub/fshelp.h: New file.
16131 * fs/fshelp.c: Likewise.
16132
3c52136a 161332004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16134
16135 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16136 (print_message): Add a missing newline.
16137 (run_menu): Added timeout support.
16138 (run_menu_entry): New local function.
16139 (grub_menu_run): Added support for booting.
16140
16141 * kern/loader.c (grub_loader_is_loaded): New function.
16142
16143 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16144 (grub_get_rtc): Exported.
16145
16146 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16147 (grub_get_rtc): Exported.
16148
16149 * include/grub/normal.h (struct grub_command_list): Remove
16150 constant from the member `command'.
16151
16152 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16153
16154 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16155
16156 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16157
aa033560 161582004-08-28 Marco Gerards <metgerards@student.han.nl>
16159
16160 Add support for the JFS filesystem.
16161
16162 * fs/jfs.c: New file.
16163 * include/grub/fs.h (grub_jfs_init): New prototype.
16164 (grub_jfs_fini): New prototype.
16165 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16166 (grub_emu_SOURCES): Likewise.
16167 (pkgdata_MODULES): Add jfs.mod.
16168 (jfs_mod_SOURCES): New variable.
16169 (jfs_mod_CFLAGS): Likewise.
16170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16171 (grubof_SOURCES): Likewise.
16172 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16173
16174 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16175 endian to the host endian.
16176 (grub_fat_utf16_to_utf8): Move function from there...
16177 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 16178 the endianness of the source string anymore.
aa033560 16179 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16180
94bc45af 161812004-08-24 Marco Gerards <metgerards@student.han.nl>
16182
16183 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16184 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16185 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16186 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 16187
94bc45af 16188 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16189 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16190 for `node_found' and `it_dir'.
16191 (grub_hfs_dir): Add prototype for `dir_hook'.
16192
16193 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16194 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16195 and `indir32' to silence a gcc warning.
16196
16197 * include/grub/fs.h (grub_hfs_init): New prototype.
16198 (grub_hfs_fini): Likewise.
f19dbdb7 16199
16200
97543f08 162012004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16202
16203 Each disk device has its own id now. This is useful to make use
16204 of multiple disk devices.
f19dbdb7 16205
97543f08 16206 * include/grub/disk.h (grub_disk_dev_id): New enum.
16207 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16208 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16209
16210 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16211 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16212
16213 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16214 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16215
16216 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16217 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16218
16219 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16220 "id" which is used by the cache manager.
16221
16222 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16223 of just "GRUB".
16224
64372eb4 162252004-08-18 Marco Gerards <metgerards@student.han.nl>
16226
16227 * fs/hfs.c: New file.
16228 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16229 (grub_emu_SOURCES): Likewise.
16230 (pkgdata_MODULES): Add hfs.mod.
16231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16232 (grubof_SOURCES): Likewise.
16233 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16234
16235 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16236 * kern/misc.c (grub_strncasecmp): Add function.
16237
cc61b58f 162382004-08-14 Marco Gerards <metgerards@student.han.nl>
16239
16240 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16241 with parentheses.
16242
16243 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16244 (grub_ext2_dir): In case the directory entry type is unknown, read
16245 it from the inode.
16246
0ef123f6 162472004-08-02 Peter Bruin <pjbruin@dds.nl>
16248
16249 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16250 grub_load_linux instead of grub_rescue_cmd_linux as second
16251 argument of grub_rescue_register_command.
16252
16253 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16254
a447c5df 162552004-07-27 Marco Gerards <metgerards@student.han.nl>
16256
16257 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16258 function.
16259 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16260 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16261 `loader/powerpc/ieee1275/linux.c',
16262 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16263 * include/grub/powerpc/ieee1275/ieee1275.h
16264 (grub_ieee1275_release): New prototype.
16265 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16266 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16267 normal, boot, linux and linux_normal.
16268 * loader/powerpc/ieee1275/linux.c: New file.
16269 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16270
5a9e3546 162712004-07-12 Marco Gerards <metgerards@student.han.nl>
16272
16273 * normal/arg.c (grub_arg_parse): Correct error handling after
16274 reallocating the argumentlist (check if `argl' is not null instead
16275 of checking if `args' is not null).
16276 * kern/mm.c (grub_realloc): Return the same pointer when using the
16277 same region, instead of returning the header address.
16278
e15199cb 162792004-07-11 Marco Gerards <metgerards@student.han.nl>
16280
16281 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16282 one block instead of two when looking for the initial partition.
16283 (grub_partition_probe): Initialize the local variable `p' with 0.
16284 Use base 10 for the grub_strtoul call.
16285 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16286 need for one local variable.
16287 (grub_strtoul): Don't add the new value to `num', instead of that
16288 just assign it.
16289
020616c2 162902004-07-11 Marco Gerards <metgerards@student.han.nl>
16291
16292 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16293 (pxeboot_img_SOURCES): New variable.
16294 (pxeboot_img_ASFLAGS): Likewise.
16295 (pxeboot_img_LDFLAGS): Likewise.
16296 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16297 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16298 <lode_leroy@hotmail.com>.
16299
6c51eb64 163002004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16301
16302 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16303 there was no input.
16304
cfb12aff 163052004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16306
16307 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16308 the history buffer logic.
16309
6eabba74 163102004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16311
16312 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16313 (FILETYPE_INO_SYMLINK): New macros.
16314 (grub_ext2_find_file): Check if the node is a directory using the
16315 inode stat information instead of using the filetype in the
16316 dirent. Exclude the first character of an absolute symlink.
16317 (grub_ext2_dir): Mask out the filetype part of the mode member of
16318 the inode.
16319
66e19ef8 163202004-05-24 Marco Gerards <metgerards@student.han.nl>
16321
16322 Add support for UFS version 1 and 2. Add support for the minix
16323 filesystem version 1 and 2, both the variants with 14 and 30 long
16324 filenames.
f19dbdb7 16325
66e19ef8 16326 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16327 fs/minix.c.
16328 (grub_emu_SOURCES): Likewise.
16329 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16330 (ufs_mod_SOURCES): New variable.
16331 (ufs_mod_CFLAGS): Likewise.
16332 (minix_mod_SOURCES): Likewise.
16333 (minix_mod_CFLAGS): Likewise.
16334 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16335 fs/minix.c.
16336 (grubof_SOURCES): Likewise.
16337 * fs/ufs.c: New file.
16338 * fs/minix.c: New file.
16339 * include/grub/fs.h (grub_ufs_init): New prototype.
16340 (grub_ufs_fini): Likewise.
16341 (grub_minix_init): Likewise.
16342 (grub_minix_fini): Likewise.
16343 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16344 minix fs.
16345
cc2e748a 163462004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16347
16348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16349 commands/ls.c, commands/terminal.c, commands/boot.c,
16350 commands/cmp.c and commands/cat.c.
16351 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16352
16353 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16354 "env.h"
16355
4b13b216 163562004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16357
16358 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16359 and grub_, respectively. Because the conversion is trivial and
16360 mechanical, I omit the details here. Please refer to the CVS
16361 if you need more information.
16362
6a142551 163632004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16364
16365 * include/pupa: Renamed to ...
16366 * include/grub: ... this.
16367 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16368 * util/i386/pc/grub-mkimage.c: ... this.
16369 * util/i386/pc/pupa-setup.c: Renamed to ...
16370 * util/i386/pc/grub-setup.c: ... this.
16371 * util/pupa-emu.c: Renamed to ...
16372 * util/grub-emu.c: ... this.
16373
e56cdf21 163742004-03-29 Marco Gerards <metgerards@student.han.nl>
16375
16376 Add support for the newworld apple macintosh (PPC). This has been
16377 tested on the powerbook 2000 only. It only adds support for
16378 generic ieee1275 functions, console and disk support. This should
16379 be easy to port to other architectures with support for Open
16380 Firmware.
f19dbdb7 16381
e56cdf21 16382 * configure.ac: Accept the powerpc as host_cpu. In the case of
16383 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16384 specific tests are only executed while building for the i386.
16385 Inverse test for crosscompile.
16386 * genmk.rb (Utility): Allow assembler files.
16387 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16388 * conf/powerpc-ieee1275.rmk: New file.
16389 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16390 * disk/powerpc/ieee1275/partition.c: Likewise.
16391 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16392 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16393 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16394 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16395 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16396 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16397 * include/pupa/powerpc/ieee1275/loader.h
16398 * include/pupa/powerpc/setjmp.h: Likewise.
16399 * include/pupa/powerpc/types.h: Likewise.
16400 * kern/powerpc/ieee1275/init.c: Likewise.
16401 * kern/powerpc/ieee1275/openfw.c: Likewise.
16402 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16403
16404 These files were written by Johan Rydberg
16405 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 16406
e56cdf21 16407 * boot/powerpc/ieee1275/cmain.c: New file.
16408 * boot/powerpc/ieee1275/crt0.S: Likewise.
16409 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16410 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16411
8c8cc205 164122004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16413
16414 * Makefile.in: Update copyright.
16415 * genmodsrc.sh: Likewise.
16416 * gensymlist.sh: Likewise.
16417 * term/i386/pc/vga.c: Indent correctly.
16418
16419 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16420 bugreporting address.
16421 * util/i386/pc/pupa-setup.c (usage): Likewise,
16422 (main): Call pupa_ext2_init and pupa_ext2_fini.
16423
f19dbdb7 16424 * fs/fat.c (log2): Renamed to ...
8c8cc205 16425 (fat_log2): ... this.
16426 All callers changed.
16427 * kern/misc.c (memcpy): Alias to pupa_memmove.
16428 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16429 lvalue cast.
16430 * util/console.c (pupa_ncurses_fini): Return 0.
16431
16432 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16433 Move fail label here.
16434 [__GNU__]: Don't warn when using stat.
16435 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16436 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16437 long int. Use strtol instead of strtoul.
f19dbdb7 16438
db1771cf 164392004-03-14 Marco Gerards <metgerards@student.han.nl>
16440
16441 * commands/boot.c: New file.
16442 * commands/cat.c: Likewise.
16443 * commands/cmp.c: Likewise.
16444 * commands/ls.c: Likewise.
16445 * commands/terminal.c: Likewise.
16446 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16447 (pupa_register_command): Changed interface to match the new
16448 argument parser.
16449 (pupa_command_execute): Changed (almost rewritten) so it uses
16450 pupa_split_command. Added support for setting variables using the
16451 syntax `foo=bar'.
16452 (rescue_command): Changed to work with the new argument parser.
16453 (terminal_command): Moved from here to commands/terminal.c.
16454 (set_command): New function.
16455 (unset_command): New function.
16456 (insmod_command): New function.
16457 (rmmod_command): New function.
16458 (lsmod_command): New function.
16459 (pupa_command_init): Don't initialize the command terminal
16460 anymore. Initialize the commands set, unset, insmod, rmmod and
16461 lsmod.
16462 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16463 (kernel_img_HEADERS): Add arg.h and env.h.
16464 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16465 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16466 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16467 normal/arg.c.
16468 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16469 terminal.mod.
16470 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16471 (boot_mod_SOURCES): New variable.
16472 (terminal_mod_SOURCES): Likewise.
16473 (ls_mod_SOURCES): Likewise.
16474 (cmp_mod_SOURCES): Likewise.
16475 (cat_mod_SOURCES): Likewise.
16476
16477 * normal/arg.c: New file.
16478 * kern/env.c: Likewise.
16479 * include/pupa/arg.h: Likewise.
16480 * include/pupa/env.h: Likewise.
16481 * font/manager.c (font_command): Changed to match argument parsing
16482 interface changes.
16483 (PUPA_MOD_INIT): Likewise.
16484 * hello/hello.c (pupa_cmd_hello): Likewise.
16485 (PUPA_MOD_INIT): Likewise.
16486 * include/pupa/disk.h: Include <pupa/device.h>.
16487 (pupa_print_partinfo): New prototype.
16488 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16489 (pupa_dl_get_prefix): Likewise.
16490 * include/pupa/misc.h: Include <pupa/err.h>.
16491 (pupa_isgraph): New prototype.
16492 (pupa_isdigit): Likewise.
16493 (pupa_split_cmdline): Likewise.
16494 * include/pupa/normal.h: Include <pupa/arg.h>.
16495 (pupa_command): Changed the prototype of the member `func' to
16496 match the argument parsing interface. Added member `options'.
16497 (pupa_register_command): Updated to match function.
16498 (pupa_arg_parse): New prototype.
16499 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16500 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16501 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16502 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16503 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16504 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16505 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16506 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16507 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16508 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16509 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16510 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16511 * kern/disk.c: Include <pupa/file.h>.
16512 (pupa_print_partinfo): New function.
16513 * kern/dl.c: Include <pupa/env.h>.
16514 (pupa_dl_dir): Variable removed.
16515 (pupa_dl_load): Use the environment variable `prefix' instead of
16516 the variable pupa_dl_dir.
16517 (pupa_dl_set_prefix): Function removed.
16518 (pupa_dl_get_prefix): Likewise.
16519 * kern/i386/pc/init.c: Include <pupa/env.h>.
16520 (pupa_machine_init): Use the environment variable `prefix' instead of
16521 using pupa_dl_set_prefix to set the prefix.
16522 * kern/main.c: Include <pupa/env.h>.
16523 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16524 using pupa_dl_get_prefix to get the prefix.
16525 * kern/misc.c: Include <pupa/env.h>.
16526 (pupa_isdigit): New function.
16527 (pupa_isgraph): Likewise.
16528 (pupa_ftoa): Likewise.
16529 (pupa_vsprintf): Added support for printing values of the type
16530 `double'. Make it possible to format variable output when using
16531 formatting like `%1.2%f'.
16532 (pupa_split_cmdline): New function.
16533 * kern/rescue.c: Include <pupa/env.h>.
16534 (next_word): Removed function.
16535 (pupa_rescue_cmd_prefix): Likewise.
16536 (pupa_rescue_cmd_set): New function.
16537 (pupa_rescue_cmd_unset): New function.
16538 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16539 split the command line instead of splitting it here. Added
16540 support for setting variables using the syntax `foo=bar'. Don't
16541 initialize the prefix command anymore. Initialized the set and
16542 unset commands.
16543 * normal/cmdline.c: Include <pupa/env.h>.
16544 (pupa_tab_complete): Added prototypes for print_simple_completion,
16545 print_partition_completion, add_completion, iterate_commands,
16546 iterate_dev, iterate_part and iterate_dir. Moved code to print
16547 partition information from here to kern/disk.c.
fe6b695a 16548 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 16549 * normal/main.c: Include <pupa/env.h>.
16550 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16551 instead of using pupa_dl_get_prefix to get the prefix.
16552 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16553 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16554 warning.
16555 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16556 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16557 ((unused))' to silence a gcc warning.
16558 (pupa_vga_setcolor): Likewise.
16559 (debug_command): Changed to match argument parsing
16560 interface changes.
16561 * util/pupa-emu.c: Include <pupa/env.h>.
16562 (options): Added 0's for unused fields to silence a gcc warning.
16563 (argp): Likewise.
16564 (main): Use the environment variable `prefix' instead of using
16565 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16566 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16567 and terminal.
16568
16569 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16570 * util/misc.c: Include <malloc.h>.
16571 (pupa_malloc): Rewritten so errors are correctly reported.
16572 (pupa_realloc): Likewise.
16573 (pupa_memalign): Likewise.
16574 (pupa_mm_init_region): Declare unused variables with
16575 `__attribute__ ((unused))' to silence a gcc warning.
16576 * normal/i386/setjmp.S: Remove tab at the end of the file to
16577 silence a gcc warning.
16578 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16579 variables with `__attribute__ ((unused))' to silence a gcc
16580 warning.
16581 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16582 local variable i unsigned to silence a gcc warning.
16583
16584 * kern/term.c: Include <pupa/misc.h>.
16585 (pupa_more_lines): New variable.
16586 (pupa_more): Likewise.
16587 (pupa_putcode): When the pager is active pause at the end of every
16588 screen.
16589 (pupa_set_more): New function.
16590 * include/pupa/term.h (pupa_set_more): New prototype.
16591
16592
3b1139cb 165932004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16594
16595 Now this project is GRUB 2 rather than PUPA. The location of
16596 the CVS repository was moved to GRUB's.
f19dbdb7 16597
3b1139cb 16598 * configure.ac: Use bug-grub as the reporting address.
16599 Use GRUB instead of PUPA.
16600 Change the version number to 1.90.
16601
8367695c 166022004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16603
16604 * genkernsyms.sh: Updated copyright information.
16605 * genmk.rb: Likewise.
16606 * genmodsrc.sh: Likewise.
16607 * gensymlist.sh: Likewise.
16608 * boot/i386/pc/boot.S: Likewise.
16609 * boot/i386/pc/diskboot.S: Likewise.
16610 * disk/i386/pc/biosdisk.c: Likewise.
16611 * disk/i386/pc/partition.c: Likewise.
16612 * font/manager.c: Likewise.
16613 * fs/ext2.c: Likewise.
16614 * fs/fat.c: Likewise.
16615 * include/pupa/boot.h: Likewise.
16616 * include/pupa/device.h: Likewise.
16617 * include/pupa/disk.h: Likewise.
16618 * include/pupa/dl.h: Likewise.
16619 * include/pupa/elf.h: Likewise.
16620 * include/pupa/err.h: Likewise.
16621 * include/pupa/file.h: Likewise.
16622 * include/pupa/font.h: Likewise.
16623 * include/pupa/fs.h: Likewise.
16624 * include/pupa/kernel.h: Likewise.
16625 * include/pupa/loader.h: Likewise.
16626 * include/pupa/misc.h: Likewise.
16627 * include/pupa/mm.h: Likewise.
16628 * include/pupa/net.h: Likewise.
16629 * include/pupa/normal.h: Likewise.
16630 * include/pupa/rescue.h: Likewise.
16631 * include/pupa/setjmp.h: Likewise.
16632 * include/pupa/symbol.h: Likewise.
16633 * include/pupa/term.h: Likewise.
16634 * include/pupa/types.h: Likewise.
16635 * include/pupa/i386/setjmp.h: Likewise.
16636 * include/pupa/i386/types.h: Likewise.
16637 * include/pupa/i386/pc/biosdisk.h: Likewise.
16638 * include/pupa/i386/pc/boot.h: Likewise.
16639 * include/pupa/i386/pc/console.h: Likewise.
16640 * include/pupa/i386/pc/init.h: Likewise.
16641 * include/pupa/i386/pc/kernel.h: Likewise.
16642 * include/pupa/i386/pc/linux.h: Likewise.
16643 * include/pupa/i386/pc/loader.h: Likewise.
16644 * include/pupa/i386/pc/memory.h: Likewise.
16645 * include/pupa/i386/pc/multiboot.h: Likewise.
16646 * include/pupa/i386/pc/partition.h: Likewise.
16647 * include/pupa/i386/pc/time.h: Likewise.
16648 * include/pupa/i386/pc/vga.h: Likewise.
16649 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16650 * include/pupa/util/getroot.h: Likewise.
16651 * include/pupa/util/misc.h: Likewise.
16652 * include/pupa/util/resolve.h: Likewise.
16653 * kern/device.c: Likewise.
16654 * kern/disk.c: Likewise.
16655 * kern/dl.c: Likewise.
16656 * kern/err.c: Likewise.
16657 * kern/file.c: Likewise.
16658 * kern/fs.c: Likewise.
16659 * kern/loader.c: Likewise.
16660 * kern/main.c: Likewise.
16661 * kern/misc.c: Likewise.
16662 * kern/mm.c: Likewise.
16663 * kern/rescue.c: Likewise.
16664 * kern/term.c: Likewise.
16665 * kern/i386/dl.c: Likewise.
16666 * kern/i386/pc/init.c: Likewise.
16667 * kern/i386/pc/lzo1x.S: Likewise.
16668 * kern/i386/pc/startup.S: Likewise.
16669 * loader/i386/pc/chainloader.c: Likewise.
16670 * loader/i386/pc/linux.c: Likewise.
16671 * loader/i386/pc/multiboot.c: Likewise.
16672 * normal/cmdline.c: Likewise.
16673 * normal/command.c: Likewise.
16674 * normal/main.c: Likewise.
16675 * normal/menu.c: Likewise.
16676 * normal/i386/setjmp.S: Likewise.
16677 * term/i386/pc/console.c: Likewise.
16678 * term/i386/pc/vga.c: Likewise.
16679 * util/console.c: Likewise.
16680 * util/genmoddep.c: Likewise.
16681 * util/misc.c: Likewise.
16682 * util/pupa-emu.c: Likewise.
16683 * util/resolve.c: Likewise.
16684 * util/unifont2pff.rb: Likewise.
16685 * util/i386/pc/biosdisk.c: Likewise.
16686 * util/i386/pc/getroot.c: Likewise.
16687 * util/i386/pc/pupa-mkimage.c: Likewise.
16688 * util/i386/pc/pupa-setup.c: Likewise.
16689
e6eced71 166902004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16691
16692 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16693 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16694 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16695 reading and reset it after reading.
16696 (pupa_ext2_close): Return PUPA_ERR_NONE.
16697
16698 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16699 Correct value.
16700 (struct linux_kernel_header): Add kernel_version and
16701 initrd_addr_max.
16702 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16703 pupa_file_read succeeds.
16704 (pupa_rescue_cmd_initrd): Implement.
16705
5aded270 167062003-12-03 Marco Gerards <metgerards@student.han.nl>
16707
16708 * fs/ext2.c (pupa_ext2_label): New function.
16709 (pupa_ext2_fs): Added label.
16710 * fs/fat.c (pupa_fat_label): New function.
16711 (pupa_fat_fs): Added label.
16712 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16713
16714 * kern/misc.c (pupa_strndup): New function.
16715 * include/pupa/misc.h (pupa_strndup): New prototype.
16716
16717 * include/pupa/normal.h: Include <pupa/err.h>.
16718 (pupa_set_history): New prototype.
16719 (pupa_iterate_commands): New prototype.
16720 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16721 <pupa/disk.h>, <pupa/file.h>.
16722 (hist_size): New variable.
16723 (hist_lines): Likewise.
16724 (hist_end): Likewise.
16725 (hist_used): Likewise.
16726 (pupa_set_history): New function.
16727 (pupa_history_get): Likewise.
16728 (pupa_history_add): Likewise.
16729 (pupa_history_replace): Likewise.
16730 (pupa_tab_complete): Likewise.
16731 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16732 completion shows partitionnames while completing partitions, this
16733 feature was suggested by Jeff Bailey.
16734 * normal/command.c (pupa_iterate_commands): New function.
16735 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16736 (pupa_normal_init): Initialize history buffer.
16737 (PUPA_MOD_INIT): Likewise.
16738 (pupa_normal_fini): Free the history buffer.
16739 (PUPA_MOD_FINI): Likewise.
16740
16741 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16742 key.
16743
16744 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16745 * configure.ac [i386]: Check for regparam bug.
16746 (NESTED_FUNC_ATTR) [! i386]: Defined.
16747
1f7315a3 167482003-11-17 Marco Gerards <metgerards@student.han.nl>
16749
16750 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16751 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16752 (pupa_emu_SOURCES): New variable.
16753 (pupa_emu_LDFLAGS): Likewise.
16754 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16755 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16756 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16757 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16758 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16759 (pupa_jmp_buf): New typedef.
16760 (pupa_setjmp) [PUPA_UTIL]: New macro.
16761 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16762 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16763 (pupa_refresh): New prototype.
16764 * include/pupa/util/getroot.h: New file.
16765 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16766 it.
16767 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16768 (pupa_rescue_cmd_cat): Likewise.
16769 (pupa_rescue_cmd_ls): Likewise.
16770 (pupa_rescue_cmd_testload): Likewise.
16771 (pupa_rescue_cmd_lsmod): Likewise.
16772 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16773 * normal/menu.c (run_menu): Likewise.
16774 * kern/term.c (pupa_cls): Likewise.
16775 (pupa_refresh): New function.
16776 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16777 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16778 * util/console.c: New file.
f19dbdb7 16779
1f7315a3 16780 * util/i386/pc/getroot.c: New file.
16781 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16782 (pupa_putchar): New function.
16783 (pupa_refresh): Likewise.
16784 (xgetcwd): Function moved to ...
16785 (strip_extra_slashes): Likewise.
16786 (get_prefix): Likewise.
f19dbdb7 16787 * util/i386/pc/getroot.c: ... here.
1f7315a3 16788 (find_root_device): Function moved and renamed to...
16789 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16790 Changed all callers.
16791 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16792 and renamed to...
16793 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16794 Changed all callers.
16795 * util/misc.c (pupa_memalign): New function.
16796 (pupa_mm_init_region): Likewise.
16797 (pupa_register_exported_symbols): Likewise.
16798 (pupa_putchar): Function removed.
16799 * util/pupa-emu.c: New file.
16800
9a5c1ade 168012003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16802
16803 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16804 (_multiboot_mod_SOURCES): New variable.
16805 (_multiboot_mod_CFLAGS): Likewise.
16806 * loader/i386/pc/multiboot.c: New file.
16807 * include/pupa/i386/pc/multiboot.h: Likewise.
16808 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16809 (pupa_multiboot_real_boot): New function.
16810 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16811 (pupa_multiboot_real_boot): New prototype.
16812 (pupa_rescue_cmd_multiboot): Likewise
16813 (pupa_rescue_cmd_module): Likewise.
16814
16815 * kern/loader.c (pupa_loader_set): Continue when
16816 pupa_loader_unload_func() fails.
16817 (pupa_loader_unset): New function.
16818 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16819
16820 * kern/misc.c (pupa_stpcpy): New function.
16821 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16822
8e72a9c0 168232003-11-12 Marco Gerards <metgerards@student.han.nl>
16824
16825 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16826 for available extensions.
16827
16828 * include/pupa/i386/pc/time.h: New file.
16829 * kern/disk.c: Include <pupa/machine/time.h>.
16830 (PUPA_CACHE_TIMEOUT): New macro.
16831 (pupa_last_time): New variable.
16832 (pupa_disk_open): Flush the cache when there was a timeout.
16833 (pupa_disk_close): Reset the timer.
16834 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16835 pupa_currticks.
16836 * util/misc.c: Include <sys/times.h>
16837 (pupa_get_rtc): New function.
16838
c4adbd32 168392003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16840
16841 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16842 as blocks.
16843 (pupa_ext2_get_file_block): Use blocks member.
16844
16845 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16846 first block. Return -1 instead of pupa_errno on error.
16847
bfd30f06 168482003-10-27 Marco Gerards <metgerards@student.han.nl>
16849
16850 * README: In the pupa-mkimage example use _chain instead of chain
16851 and ext2 instead of fat.
16852 * TODO: Replace ext2fs with jfs as an example. Add an item for
16853 adding journal playback for ext2fs.
16854 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16855 (pkgdata_MODULES): Added ext2.mod.
16856 (ext2_mod_SOURCES): New variable.
16857 (ext2_mod_CFLAGS): Likewise.
16858 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16859 * include/pupa/misc.h (pupa_strncpy): New prototype.
16860 (pupa_strcat): Likewise.
16861 (pupa_strncmp): Likewise.
16862 * kern/misc.c (pupa_strcat): Enable function.
16863 (pupa_strncpy): New function.
16864 (pupa_strncmp): Likewise.
16865 * fs/ext2.c: New file.
f19dbdb7 16866
bfd30f06 16867 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16868 when the read failed before retrying.
16869 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16870 (_FILE_OFFSET_BITS): Likewise.
16871 * configure.ac: Added AC_SYS_LARGEFILE.
16872
98d15063 168732003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16874
16875 * genmk.rb (PModule#rule): Make sure to get only symbol names
16876 from the output of nm.
16877 Reported by Robert Millan <zeratul2@wanadoo.es>.
16878
18d9c7cd 168792003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16880
16881 I forgot to check in these changes for a long time. This adds
16882 incomplete support for VGA console, and this is still very
16883 buggy. Also, a lot of consideration is required for I18N,
16884 UNICODE, and VGA font issues. Therefore, assume that this is
16885 such that "better than nothing".
f19dbdb7 16886
18d9c7cd 16887 * font/manager.c: New file.
16888 * include/pupa/font.h: Likewise.
16889 * include/pupa/i386/pc/vga.h: Likewise.
16890 * term/i386/pc/vga.c: Likewise.
16891 * util/unifont2pff.rb: Likewise.
16892
16893 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16894 (pkgdata_MODULES): Added vga.mod and font.mod.
16895 (vga_mod_SOURCES): New variables.
16896 (vga_mod_CFLAGS): Likewise.
16897 (font_mod_SOURCES): Likewise.
16898 (font_mod_CFLAGS): Likewise.
16899
16900 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16901
16902 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 16903 (struct pupa_term): Added init and fini.
18d9c7cd 16904 Changed the argument of putchar to pupa_uint32_t.
16905
16906 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16907 (pupa_console_real_putchar): New prototype.
16908 (pupa_console_putchar): Removed.
16909 (pupa_console_checkkey): Exported.
16910 (pupa_console_getkey): Likewise.
16911
16912 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16913 characters.
16914
16915 * kern/term.c (pupa_term_set_current): Rewritten.
16916 (pupa_putchar): Likewise.
16917 (pupa_putcode): New function.
16918
16919 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16920 (pupa_console_real_putchar): ... this.
16921 (pupa_vga_set_mode): New function.
16922 (pupa_vga_get_font): Likewise.
16923
16924 * normal/command.c: Include pupa/term.h.
16925 (terminal_command): New function.
16926 (pupa_command_init): Register the command "terminal".
16927
16928 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16929 (DISP_UP): Likewise.
16930 (DISP_RIGHT): Likewise.
16931 (DISP_DOWN): Likewise.
16932 (DISP_HLINE): Likewise.
16933 (DISP_VLINE): Likewise.
16934 (DISP_UL): Likewise.
16935 (DISP_UR): Likewise.
16936 (DISP_LL): Likewise.
16937 (DISP_LR): Likewise.
16938
16939 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 16940
977329f5 169412003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16942
16943 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16944 FIX. Reverse the path_list.
16945
16946 * include/pupa/normal.h: Export pupa_register_command and
16947 pupa_unregister_command.
16948
16949 * hello/hello.c (pupa_cmd_hello): New module.
16950 * conf/i386-pc.rmk: Added hello.mod.
16951
1f5ab428 169522003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16953
16954 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 16955
1f5ab428 16956 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16957 (compress_kernel): New variable.
16958 (generate_image): Heavily modified to support compressing a
16959 large part of the core image.
16960
16961 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16962 leak.
16963 (pupa_util_load_image): New function.
16964
16965 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16966 (pupa_compressed_size): New variable.
16967 (codestart): Enable Gate A20 here.
16968 Decompress the compressed part of the core image.
16969 Rearrange the code to put functions and variables which are
16970 required for initialization in the non-compressed part.
16971 Include lzo1x.S.
16972
16973 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16974 here.
16975
16976 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16977
f19dbdb7 16978 * include/pupa/i386/pc/kernel.h
1f5ab428 16979 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16980 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16981 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16982 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16983 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16984
16985 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16986
16987 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16988 (Utility#rule): Likewise.
16989
16990 * configure.ac: Check if LZO is available.
16991
ce5bf700 169922003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16993
16994 * include/pupa/normal.h: New file.
16995 * include/pupa/setjmp.h: Likewise.
16996 * include/pupa/i386/setjmp.h: Likewise.
16997 * normal/cmdline.c: Likewise.
16998 * normal/command.c: Likewise.
16999 * normal/main.c: Likewise.
17000 * normal/menu.c: Likewise.
17001 * normal/i386/setjmp.S: Likewise.
f19dbdb7 17002
ce5bf700 17003 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17004 (pupa_rescue_cmd_initrd): Likewise.
17005
17006 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17007 Likewise.
17008
17009 * kern/i386/pc/startup.S (translation_table): New variable.
17010 (translate_keycode): New function.
17011 (pupa_console_getkey): Call translate_keycode.
17012
17013 * kern/rescue.c (attempt_normal_mode): New function.
17014 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17015 it failed, print a message.
17016
17017 * kern/mm.c (pupa_real_malloc): Print more information when a
17018 free magic is broken.
17019 (pupa_free): If the first free header is not free actually, set
17020 it to P.
17021
17022 * kern/main.c (pupa_load_normal_mode): Just load the module
17023 "normal".
17024 (pupa_main): Don't print the message
17025 "Entering into rescue mode..." here.
17026
17027 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17028 Declared.
17029 (pupa_rescue_cmd_initrd): Likewise.
17030 (pupa_rescue_cmd_initrd): Likewise.
17031
17032 * include/pupa/symbol.h (FUNCTION): Specify the type.
17033 (VARIABLE): Likewise.
17034
17035 * include/pupa/err.h (pupa_err_t): Added
17036 PUPA_ERR_UNKNOWN_COMMAND.
17037
17038 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17039 (pupa_dl_get_prefix): Likewise.
17040
17041 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17042 Added _chain.mod and _linux.mod instead of chain.mod and
17043 linux.mod.
17044 (chain_mod_SOURCES): Renamed to ...
17045 (_chain_mod_SOURCES): ... this.
17046 (chain_mod_CFLAGS): Renamed to ...
17047 (_chain_mod_CFLAGS): ... this.
17048 (linux_mod_SOURCES): Renamed to ...
17049 (_linux_mod_SOURCES): ... this.
17050 (linux_mod_CFLAGS): Renamed to ...
17051 (_linux_mod_CFLAGS): ... this.
17052 (normal_mod_SOURCES): New variable.
17053 (normal_mod_CFLAGS): Likewise.
17054 (normal_mod_ASFLAGS): Likewise.
17055
170562003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17057
17058 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17059 possible.
17060
fe6b695a 17061 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 17062 recursively.
17063 (pupa_dl_unref): Unrefer depending modules recursively.
17064 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17065 a module is unloaded before one depending on that module is
17066 unloaded.
17067 (pupa_dl_unload): Unload depending modules explicitly,
17068 if possible.
17069
c04da074 170702003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17071
17072 * include/pupa/i386/pc/linux.h: New file.
17073 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 17074
c04da074 17075 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17076 Removed.
17077 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17078 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17079 of PUPA_CHAINLOADER_BOOT_SECTOR.
17080
17081 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17082 (pupa_linux_prot_size): New variable.
17083 (pupa_linux_tmp_addr): Likewise.
17084 (pupa_linux_real_addr): Likewise.
17085 (pupa_linux_boot_zimage): New function.
17086 (pupa_linux_boot_bzimage): Likewise.
17087
17088 * kern/i386/pc/init.c (struct mem_region): New structure.
17089 (MAX_REGIONS): New macro.
17090 (mem_regions): New variable.
17091 (num_regions): Likewise.
17092 (pupa_os_area_addr): Likewise.
17093 (pupa_os_area_size): Likewise.
17094 (pupa_lower_mem): Likewise.
17095 (pupa_upper_mem): Likewise.
17096 (add_mem_region): New function.
17097 (compact_mem_regions): Likewise.
17098 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17099 the size of the conventional memory and that of so-called upper
17100 memory (before the first memory hole).
17101 Instead of adding each found region to free memory, use
17102 add_mem_region and add them after removing overlaps.
17103 Also, add only 1/4 of the upper memory to free memory. The rest
17104 is used for loading OS images. Maybe this is ad hoc, but this
17105 makes it much easier to relocate OS images when booting.
17106
17107 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17108 (pupa_enter_rescue_mode): Don't register initrd and module.
17109
17110 * kern/mm.c: Include pupa/dl.h.
17111
17112 * kern/main.c: Include pupa/file.h and pupa/device.h.
17113
17114 * kern/loader.c (pupa_loader_load_module_func): Removed.
17115 (pupa_loader_load_module): Likewise.
17116
17117 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17118 ``.o''.
17119
17120 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17121 (pupa_linux_tmp_addr): Likewise.
17122 (pupa_linux_real_addr): Likewise.
17123 (pupa_linux_boot_zimage): Likewise.
17124 (pupa_linux_boot_bzimage): Likewise.
17125
17126 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17127 (pupa_upper_mem): Likewise.
17128 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17129 module is too dangerous.
17130
17131 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17132 (pupa_os_area_size): Likewise.
17133 (pupa_loader_set): Remove the first argument. Loader doesn't
17134 manage modules or initrd any longer.
17135 (pupa_loader_load_module): Removed.
17136
17137 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17138 (linux_mod_SOURCES): New variable.
17139 (linux_mod_CFLAGS): Likewise.
17140
a13f9237 171412003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17142
17143 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17144 the length of a blocklist correctly.
17145
17146 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17147 Use ioctl only if the OS file is a block device.
17148 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17149 not very useful for normal files.
17150
17151 * kern/main.c (pupa_set_root_dev): New function.
17152 (pupa_load_normal_mode): Likewise.
17153 (pupa_main): Call those above.
17154
17155 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17156 pupa_uint16_t.
17157
17158 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17159
a5ffe966 171602003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17161
17162 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17163 (setup): Configure the installed partition information and the
17164 dl prefix.
17165
17166 * loader/i386/pc/chainloader.c (my_mod): New variable.
17167 (pupa_chainloader_unload): New function.
17168 (pupa_rescue_cmd_chainloader): Refer itself.
17169 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17170
17171 * kern/i386/pc/startup.S (install_partition): Removed.
17172 (version_string): Likewise.
17173 (config_file): Likewise.
17174 (pupa_install_dos_part): New variable.
17175 (pupa_install_bsd_part): Likewise.
17176 (pupa_prefix): Likewise.
17177 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17178
17179 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17180 and pupa/misc.h.
17181 (make_install_device): New function.
17182 (pupa_machine_init): Set the dl prefix.
17183
17184 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17185 (buf): Renamed to ...
17186 (linebuf): ... this.
17187 (pupa_rescue_cmd_prefix): New function.
17188 (pupa_rescue_cmd_insmod): Likewise.
17189 (pupa_rescue_cmd_rmmod): Likewise.
17190 (pupa_rescue_cmd_lsmod): Likewise.
17191 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17192 rmmod and lsmod.
17193
17194 * kern/mm.c (pupa_memalign): If failed even after invalidating
17195 disk caches, unload unneeded modules and retry.
17196
17197 * kern/misc.c (pupa_memmove): New function.
17198 (pupa_memcpy): Removed.
17199 (pupa_strcpy): New function.
17200 (pupa_itoa): Made static.
17201
17202 * kern/dl.c (pupa_dl_iterate): New function.
17203 (pupa_dl_ref): Likewise.
17204 (pupa_dl_unref): Likewise.
17205 (pupa_dl_unload): Return if succeeded or not.
17206 (pupa_dl_unload_unneeded): New function.
17207 (pupa_dl_unload_all): Likewise.
17208 (pupa_dl_init): Renamed to ...
17209 (pupa_dl_set_prefix): ... this.
17210 (pupa_dl_get_prefix): New function.
17211
17212 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17213 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17214 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17215 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17216 (pupa_install_dos_part): Declared.
17217 (pupa_install_bsd_part): Likewise.
17218 (pupa_prefix): Likewise.
17219 (pupa_boot_drive): Likewise.
17220
17221 * include/pupa/types.h: Fix a typo.
17222
17223 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17224 pupa_memmove.
17225 (pupa_memmove): Declared.
17226 (pupa_strcpy): Likewise.
17227
17228 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17229 pupa_mod_init takes one argument, its own module.
17230 (pupa_dl_unload_unneeded): Declared.
17231 (pupa_dl_unload_all): Likewise.
17232 (pupa_dl_ref): Likewise.
17233 (pupa_dl_unref): Likewise.
17234 (pupa_dl_iterate): Likewise.
17235 (pupa_dl_init): Renamed to ...
17236 (pupa_dl_set_prefix): ... this.
17237 (pupa_dl_get_prefix): Declared.
17238
17239 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 17240 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 17241 unloaded.
17242 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17243 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17244
17245 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17246 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17247
012d7999 172482003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17249
17250 * util/i386/pc/pupa-setup.c (setup): Define the internal
17251 function find_first_partition_start at the top level, because GCC
17252 3.0.x cannot compile internal functions in deeper scopes
17253 correctly.
17254 (find_root_device): Use lstat instead of stat.
17255 Don't follow symbolic links.
17256 Fix the path-constructing code.
17257
17258 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17259 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17260 by a BLKGETSIZE ioctl first, because block devices don't fill
17261 the member st_mode of the structure stat on Linux.
17262 [__linux__] (linux_find_partition): Use a temporary buffer
17263 REAL_DEV for the working space. Copy it to DEV before returning.
17264 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17265 buffer cache consistent.
17266 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17267 strncmp. The previous value was merely wrong.
17268 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17269
17270 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17271 FAT size is 12. The previous value was merely wrong.
17272
17273 * kern/main.c (pupa_main): Don't split the starting message from
17274 newlines.
17275
17276 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17277 LF, because BIOS goes crazy about character attributes in this
17278 case.
17279
1cc73a62 172802003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17281
17282 * include/i386/pc/util/biosdisk.h: New file.
17283 * util/i386/pc/biosdisk.c: Likewise.
17284 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 17285
1cc73a62 17286 * Makefile.in (INCLUDE_DISTFILES): Added
17287 include/pupa/i386/pc/util/biosdisk.h.
17288 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17289 directory util/i386/pc.
17290 (install-local): Added a rule for sbin_UTILITIES.
17291 (uninstall): Likewise.
17292
17293 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17294
17295 * util/misc.c (xrealloc): New function.
17296 (pupa_malloc): Likewise.
17297 (pupa_free): Likewise.
17298 (pupa_realloc): Likewise.
17299 (pupa_stop): Likewise.
17300 (pupa_putchar): Likewise.
17301
17302 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17303
17304 * include/pupa/util/misc.h (xrealloc): Declared.
17305
17306 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17307 macro.
17308 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17309 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17310
17311 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17312 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17313
17314 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17315 way should be implemented.
17316 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17317
17318 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17319 the size of NAME for safety.
17320 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17321 0x88.
17322
17323 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17324 (pupa_setup_SOURCES): Likewise.
17325
17326 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17327
08b70fe8 173282002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17329
17330 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17331 bunch of pushl's from pusha, because this destroys the return
17332 value.
17333
62ddcc8f 173342002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17335
17336 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17337 This means that any missing prototypes could be fatal. Also, you
17338 must take care when writing assembly code. See the comments at
17339 the beginning of startup.S, for more details.
f19dbdb7 17340
62ddcc8f 17341 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17342 compilation mechanism.
17343 (pupa_chainloader_real_boot): Likewise.
17344 (pupa_biosdisk_rw_int13_extensions): Likewise.
17345 (pupa_biosdisk_rw_standard): Likewise.
17346 (pupa_biosdisk_check_int13_extensions): Likewise.
17347 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17348 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17349 (pupa_get_memsize): Likewise.
17350 (pupa_get_mmap_entry): Likewise.
17351 (pupa_console_putchar): Likewise.
17352 (pupa_console_setcursor): Likewise.
17353 (pupa_getrtsecs): Use pushl instead of push.
17354
17355 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17356 memory instead of the stack for a mmap entry, because some
17357 BIOSes may ignore the maximum size and overflow.
17358
17359 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17360
17361 * genmk.rb (PModule#rule): Compile automatically generated
17362 sources with module-specific CFLAGS as well as other sources.
17363
9962ed99 173642002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17365
17366 * configure.ac: Check ld.
17367 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17368 respectively, before checking endianness and sizes.
17369
17370 * Makefile.in (LD): New variable.
f19dbdb7 17371
abdfc3c5 173722002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17373
17374 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17375
6a161fa9 173762002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17377
17378 * Changelog: New file.
17379