]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-06-05 Michael Scherer <misc@mandriva.org>
[grub2.git] / ChangeLog
CommitLineData
408305be 12009-06-05 Michael Scherer <misc@mandriva.org>
2
3 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
4 uses case sensitive btree.
5 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
6 only for case insensitive filesystems.
7
8ee1e0d9 82009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
9
10 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
11 * conf/common.rmk (search_mod_CFLAGS): likewise
12
a9966eb1 132009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
14
15 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
16 compensate a compiler bug
17
9e7100fb 182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
19
20 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitely define as 8
21 instead of '\b'
22
ede21d71 232009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
24
25 Definitions for creating asm symbols with Apple's CC
26
27 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
28 [APPLE_CC] (VARIABLE): likewise
29
9dbf7653 302009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
31
32 Disable lnxboot.img when compiled
33 with Apple's CC
34
35 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
36 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
37 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
38 [! APPLE_CC] (CODE_LENG): skip
39 [! APPLE_CC] (setup_sects): likewise
40 [! APPLE_CC]: skip filling
41
e93cdc3d 422009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
43
44 Address in trampolines based on 32-bit registers when compiled
45 with Apple's CC
46
47 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
48 for addresses
49 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
50
6c688477 512009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
52
53 Avoid aliases when compiling with Apple's CC for PCBIOS machine
54
55 * kern/misc.c [APPLE_CC] (memcpy): new function
56 [APPLE_CC] (memmove): likewise
57 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
58 (memcpy): define alias conditionaly on !APPLE_CC
59 (memset): likewise
60 (abort): likewise
61 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
62 APPLE_CC are defined
63 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
64 (grub_assert_fail): make prototype conditional
65
e37ffc5c 662009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
67
68 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
69
70 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
71 grub-macho2img
72 (CLEANFILES): add grub-macho2img
73 (grub_macho2img_SOURCES): new variable
74 * kern/i386/pc/startup.S (bss_start): new variable
75 (bss_end): likewise
76 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
77 * util/grub-macho2img.c: new file
78
cf00df31 792009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
80
81 Use objconv when compiling with Apple's CC
82
83 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
84 (efiemu64.o): likewise
85 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
86 when compiling with Apple's CC
87 (efiemu64_s.o): likewise
88 * configure.ac: check for objconv when compiling with Apple's CC
89 * genmk.rb: use objconv for modules when compiled with Apple's CC
90
d119a20c 912009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
92
93 Define segment as well as section when compiling with
94 Apple's CC
95
96 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
97 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
98 (efiemu_convert_pointer): likewise
99 (efiemu_set_virtual_address_map): likewise
100 (efiemu_convert_pointer): likewise
101 (efiemu_getcrc32): likewise
102 (init_crc32_table): likewise
103 (reflect): likewise
104 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
105 (GRUB_MOD_DEP): likewise
106
c8600122 1072009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
108
109 Allow a compilation without -mcmodel=large
110
111 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
112 when compiled without -mcmodel=large
113 (filter_memory_map): remove memory post 4 GiB when compiled
114 without -mcmodel=large
115 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
116 TARGET_CFLAGS when -mcmodel=large isn't supported
117
e8df1d4e 1182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
119
120 Remove nested functions in efiemu core
121
122 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
123
cc6c3ac1 1242009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
125
126 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
127
128 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
129 temporary storage
130 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
131 using Apple's CC
132 (grub_cpu_is_tsc_supported): likewise
133 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
134
3e325901 1352009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
136
137 Absolute addressing through constant with Apple's cc
138
139 * kern/i386/pc/startup.S: Define necessary constants
140 and address through it when using ABS with Apple's CC
141 * boot/i386/pc/diskboot.S: likewise
142 * boot/i386/pc/boot.S: likewise
143 * boot/i386/pc/lnxboot.S: likewise
144 * boot/i386/pc/cdboot.S: likewise
145 * mmap/i386/pc/mmap_helper.S: likewise
146 * commands/i386/pc/drivemap_int13h.S: likewise
147
2b167a72 1482009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
149
150 Check if compiler is apple cc
151
152 * Makefile.in (ASFLAGS): new variable
153 (TARGET_ASFLAGS): likewise
154 (TARGET_MODULE_FORMAT): likewise
155 (TARGET_APPLE_CC): likewise
156 (OBJCONV): likewise
157 (TARGET_IMG_CFLAGS): likewise
158 (TARGET_CPPFLAGS): add includedir
159 * configure.ac: call grub_apple_cc and grub_apple_target_cc
160 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
161 Check for linker script only if compiler isn't Apple's CC
162 (TARGET_MODULE_FORMAT): set
163 (TARGET_APPLE_CC): likewise
164 (TARGET_ASFLAGS): likewise
165 (ASFLAGS): likewise
166 Check for objcopy only if compiler isn't Apple's CC
167 Check for BSS symbol only if compiler isn't Apple's CC
168 * genmk.rb: adapt nm options if we use Apple's utils
169 * aclocal.m4 (grub_apple_cc): new test
170 (grub_apple_target_cc): likewise
171
fb14123e 1722009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
173
174 Simplify sed expressions and improve awk
175
176 * Makefile.in (install-local): simplify sed expression
177 * gencmdlist.sh: likewise
178 * genmoddep.awk: avoid adding module as a dependency of itself
179
5b889789 1802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
181
182 Add missing start symbols
183
184 * boot/i386/pc/boot.S: add start
fb14123e 185 * boot/i386/pc/pxeboot.S: likewise
5b889789 186
fd2bf2e3 1872009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
188
189 Fix wrong assumptions with grub-mkimage on EFI
190
191 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
192 (relocate_addresses): consider both r_addend and value at offset
193 (make_mods_section): zerofill modinfo and header
194 (convert_elf): write prefix here
195
5389763d 1962009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
197
198 Use .asciz instead of .string
199
200 * i386/pc/diskboot.S: use .asciz instead of .string
201 * i386/pc/boot.S: likewise
202 * include/grub/dl.h (GRUB_MOD_DEP): likewise
203 (GRUB_MOD_NAME): likewise
204
3eb5ed4e 2052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
206
207 gfxpayload support
208
209 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
210 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
211 (grub_video_setup): remove
212 (grub_video_set_mode): new prototype
213 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
214 (vid_mode): remove
215 (linux_vesafb_res): compile only on PCBIOS
216 (grub_linux_boot): support gfxpayload
217 * loader/i386/pc/xnu.c (video_hook): new function
218 (grub_xnu_set_video): support gfxpayload
219 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
220 (DEFAULT_VIDEO_HEIGHT): likewise
221 (DEFAULT_VIDEO_FLAGS): likewise
222 (DEFAULT_VIDEO_MODE): new definition
223 (video_hook): new function
224 (grub_gfxterm_init): use grub_video_set_mode
225 * util/grub.d/30_os-prober.in: remove explicit modesetting before
226 loading xnu
227 * video/video.c (grub_video_setup): removed
228 (grub_video_set_mode): new function based on grub_gfxterm_init and
229 grub_video_setup
230
4b0e1143 2312009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
232
233 Avoid calling biosdisk in drivemap
234
235 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
236 (revparse_biosdisk): likewise
237 (list_mappings): derive name from id directly
238 (grub_cmd_drivemap): use tryparse_diskstring
239
fda6cb98 2402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
241
242 Script fixes
243
244 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
245 (grub_lexer_param): add tokenonhold
246 (grub_script_create_cmdline): remove cmdline. All callers updated
247 (grub_script_function_create): make functionname
248 grub_script_arg. All callers updated
249 (grub_script_execute_argument_to_string): new prototype
250 * kern/parser.c (state_transitions): reorder
251 (grub_parser_cmdline_state): fix a bug and make more compact
252 * script/sh/execute.c (grub_script_execute_argument_to_string):
253 make global
254 (grub_script_execute_cmdline): use new format
255 * script/sh/function.c (grub_script_function_create): make functionname
256 grub_script_arg. All callers updated
257 * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
258 (grub_script_yylex): remove
259 (grub_script_yylex2): renamed to ...
260 (grub_script_yylex): ...renamed
261 parse the expressions like a${b}c
262 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
263 (GRUB_PARSER_TOKEN_VAR): remove
264 (GRUB_PARSER_TOKEN_NAME): likewise
265 ("if"): declare as typeless
266 ("while"): likewise
267 ("function"): likewise
268 ("else"): likewise
269 ("then"): likewise
270 ("fi"): likewise
271 (text): remove
272 (argument): likewise
273 (script): accept empty scripts and make exit on error
274 (arguments): use GRUB_PARSER_TOKEN_ARG
275 (function): likewise
276 (command): move error handling to script
277 (menuentry): move grub_script_lexer_ref before
278 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
279 argument. All callers updated
280
f4448a07 2812009-06-04 Robert Millan <rmh.grub@aybabtu.com>
282
283 Prevent GRUB from probing floppies during boot.
284
285 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
286 * commands/search.c (options): Add --no-floppy.
287 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
288 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
289 --no-floppy when searching for UUIDs.
290
2bf5885a 2912009-06-04 Robert Millan <rmh.grub@aybabtu.com>
292
293 Simplify the code duplication in commands/search.c.
294
295 * commands/search.c (search_label, search_fs_uuid): Merge into ...
296 (search_fs): ... this. Update all users.
297
f6fd460a 2982009-06-03 Felix Zielcke <fzielcke@z-51.de>
299
300 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
301
cbb3c83e 3022009-05-28 Pavel Roskin <proski@gnu.org>
303
57788cfd 304 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
305 Remove the original symlink explicitly.
306
cbb3c83e 307 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
308 just one slash. That's how grub_fshelp_find_file() does it.
309
cd0d5e30 3102009-05-26 Pavel Roskin <proski@gnu.org>
311
f0f8bbe2 312 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
313 to `str'.
314
cd0d5e30 315 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
316 possibly unused.
317
8c2cab51 3182009-05-25 Christian Franke <franke@computer.org>
319
320 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
321 register.
322 (grub_atapi_identify): Add wait after drive select.
323 (grub_ata_identify): Do more strict status register check before
324 calling grub_atapi_identify (). Suppress error message if status
325 register is 0x00 after command failure. Add status register
326 check after PIO read to avoid bogus identify due to stuck DRQ.
327 Thanks to Pavel Roskin for testing.
328 (grub_device_initialize): Remove unsafe status register check.
329 Thanks to 'phcoder' for problem report and patch.
330 Prevent sign extension in debug message.
331
230c0ad6 3322009-05-23 Colin D Bennett <colin@gibibit.com>
333
334 Cleaned up `include/grub/normal.h'. Grouped prototypes by
335 definition file, and functions defined in `normal/menu.c' have had
336 their prototypes moved to `include/grub/menu.h' for consistency.
337
338 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
339 from normal.h.
340 (grub_menu_get_entry): Likewise.
341 (grub_menu_get_timeout): Likewise.
342 (grub_menu_set_timeout): Likewise.
343 (grub_menu_execute_entry): Likewise.
344 (grub_menu_execute_with_fallback): Likewise.
345 (grub_menu_entry_run): Likewise.
346
347 * include/grub/normal.h: Re-ordered and grouped function
348 prototypes by file that the function is defined in.
349 (grub_menu_execute_callback): Removed; moved to menu.h.
350 (grub_menu_get_entry): Likewise.
351 (grub_menu_get_timeout): Likewise.
352 (grub_menu_set_timeout): Likewise.
353 (grub_menu_execute_entry): Likewise.
354 (grub_menu_execute_with_fallback): Likewise.
355 (grub_menu_entry_run): Likewise.
356 (grub_menu_addentry): Renamed from this ...
357 (grub_normal_add_menu_entry): ... to this.
358
359 * normal/main.c (grub_menu_addentry): Renamed from this ...
360 (grub_normal_add_menu_entry): ... to this.
361
362 * script/sh/execute.c (grub_script_execute_menuentry): Update
363 reference to renamed grub_menu_addentry function.
364
861f03a5 3652009-05-23 Felix Zielcke <fzielcke@z-51.de>
366
367 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
368
96b1619a 3692009-05-22 Pavel Roskin <proski@gnu.org>
370
bf6a5fb2 371 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
372 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
373 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
374 compiling for the i386 targets, but not for the utilities.
375
96b1619a 376 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
377 to grub_uint8_t.
378 (grub_root_drive): Likewise.
379 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
380 remove alignment.
381 (grub_root_drive): Change size to byte.
382 (grub_start_addr): Remove.
383 (grub_end_addr): Likewise.
384 (grub_apm_bios_info): Likewise.
385
b729776b 3862009-05-21 Felix Zielcke <fzielcke@z-51.de>
387
388 * normal/i386: Remove.
389 * normal/powerpc: Likewise.
390 * normal/sparc64: Likewise.
391 * normal/x86_64: Likewise.
392
0a15ce80 3932009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
394
395 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
396 * loader/i386/linux_trampoline.S: Fix identation
397 * loader/i386/xnu_helper.S: Likewise
d6da58e6 398
33db9015 3992009-05-18 Colin D Bennett <colin@gibibit.com>
400
d6da58e6 401 Display error messages when parsing a Lua statement fails.
402 Previously, executing a syntactically invalid statement like
403 ")foo" or "bar;" would silently fail.
33db9015 404
405 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 406 (grub_lua_parse_line): Improved reporting of Lua parser and
407 execution errors.
33db9015 408
46422c89 4092009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
410
411 Remove -Werror which causes build to fail on some systems
412
413 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
414 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
415 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 416
22f53a96 4172009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
418
419 trampoline for linux on 64-bit platform
420
18f547ad 421 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
422 loader/i386/efi/linux_trampoline.S
423 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
22f53a96 424 declration
d6da58e6 425 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
426 here
22f53a96 427 * loader/i386/linux_trampoline.S: moved here
d6da58e6 428 * loader/i386/efi/linux.c (allocate_pages): reserve space for
429 trampoline
22f53a96 430 (jumpvector): removed
431 (grub_linux_trampoline_start): new declaration
432 (grub_linux_trampoline_end): likewise
433 (grub_linux_boot): use trampoline when on 64-bit platform
434 * loader/i386/linux.c: likewise
435
cb5a0f40 4362009-05-16 Pavel Roskin <proski@gnu.org>
437
438 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
439 const to avoid a warning.
440 (grub_lua_setenv): Likewise.
441 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
442 lmsg to fix a warning.
443
334f2c28 4442009-05-16 Felix Zielcke <fzielcke@z-51.de>
445
446 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 447 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
448 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
449 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
450 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
451 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
452 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
453 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 454
59e5d3ec 4552009-05-16 Felix Zielcke <fzielcke@z-51.de>
456
457 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
458
9d87a1ba 4592009-05-16 Bean <bean123ch@gmail.com>
460
461 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
462 (lua_mod_SOURCES): New variable.
463 (lua_mod_CFLAGS): Likewise.
464 (lua_mod_LDFLAGS): Likewise.
465
466 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
467 (setjmp_mod_SOURCES): New variable.
468 (setjmp_mod_CFLAGS): Likewise.
469 (setjmp_LDFLAGS): Likewise.
470
471 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
472 (setjmp_mod_SOURCES): New variable.
473 (setjmp_mod_CFLAGS): Likewise.
474 (setjmp_LDFLAGS): Likewise.
475
476 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
477 (setjmp_mod_SOURCES): New variable.
478 (setjmp_mod_CFLAGS): Likewise.
479 (setjmp_LDFLAGS): Likewise.
480
481 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
482 (setjmp_mod_SOURCES): New variable.
483 (setjmp_mod_CFLAGS): Likewise.
484 (setjmp_LDFLAGS): Likewise.
485
486 * normal/i386/setjmp.S: Moved from here ...
487 * lib/i386/setjmp.S: ... Moved here
488 * normal/x86_64/setjmp.S: Moved from here ...
489 * lib/x86_64/setjmp.S: ... Moved here
490 * normal/powerpc/setjmp.S: Moved from here ...
491 * lib/powerpc/setjmp.S: ... Moved here
492 * normal/sparc64/setjmp.S: Moved from here ...
493 * lib/sparc64/setjmp.S: ... Moved here
494
495 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
496 returns_twice in mingw.
497
498 * script/lua/grub_lib.c: New file.
499 * script/lua/grub_lib.h: Likewise.
500 * script/lua/grub_lua.h: Likewise.
501 * script/lua/grub_main.c: Likewise.
502 * script/lua/lapi.c: Likewise.
503 * script/lua/lapi.h: Likewise.
504 * script/lua/lauxlib.c: Likewise.
505 * script/lua/lauxlib.h: Likewise.
506 * script/lua/lbaselib.c: Likewise.
507 * script/lua/lcode.c: Likewise.
508 * script/lua/lcode.h: Likewise.
509 * script/lua/ldblib.c: Likewise.
510 * script/lua/ldebug.c: Likewise.
511 * script/lua/ldebug.h: Likewise.
512 * script/lua/ldo.c: Likewise.
513 * script/lua/ldo.h: Likewise.
514 * script/lua/ldump.c: Likewise.
515 * script/lua/lfunc.c: Likewise.
516 * script/lua/lfunc.h: Likewise.
517 * script/lua/lgc.c: Likewise.
518 * script/lua/lgc.h: Likewise.
519 * script/lua/linit.c: Likewise.
520 * script/lua/liolib.c: Likewise.
521 * script/lua/llex.c: Likewise.
522 * script/lua/llex.h: Likewise.
523 * script/lua/llimits.h: Likewise.
524 * script/lua/lmathlib.c: Likewise.
525 * script/lua/lmem.c: Likewise.
526 * script/lua/lmem.h: Likewise.
527 * script/lua/loadlib.c: Likewise.
528 * script/lua/lobject.c: Likewise.
529 * script/lua/lobject.h: Likewise.
530 * script/lua/lopcodes.c: Likewise.
531 * script/lua/lopcodes.h: Likewise.
532 * script/lua/loslib.c: Likewise.
533 * script/lua/lparser.c: Likewise.
534 * script/lua/lparser.h: Likewise.
535 * script/lua/lstate.c: Likewise.
536 * script/lua/lstate.h: Likewise.
537 * script/lua/lstring.c: Likewise.
538 * script/lua/lstring.h: Likewise.
539 * script/lua/lstrlib.c: Likewise.
540 * script/lua/ltable.c: Likewise.
541 * script/lua/ltable.h: Likewise.
542 * script/lua/ltablib.c: Likewise.
543 * script/lua/ltm.c: Likewise.
544 * script/lua/ltm.h: Likewise.
545 * script/lua/lua.h: Likewise.
546 * script/lua/luaconf.h: Likewise.
547 * script/lua/lualib.h: Likewise.
548 * script/lua/lundump.c: Likewise.
549 * script/lua/lundump.h: Likewise.
550 * script/lua/lvm.c: Likewise.
551 * script/lua/lvm.h: Likewise.
552 * script/lua/lzio.c: Likewise.
553 * script/lua/lzio.h: Likewise.
554
5e898c9d 5552009-05-16 Bean <bean123ch@gmail.com>
556
557 * include/grub/kernel.h (grub_module_header_types): Add type
558 OBJ_TYPE_CONFIG.
559
560 * kern/main.c (grub_load_config): New function.
561 (grub_main): Call grub_load_config to read boot config.
562
563 * grub-mkimage (generate_image): New parameter config_path.
564 (options): New option --config.
565 (main): Parse --config option, and pass it to generate_image.
566
cf353a47 5672009-05-14 Christian Franke <franke@computer.org>
568
569 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
570 This fixes build on Cygwin.
571
3834887f 5722009-05-14 Pavel Roskin <proski@gnu.org>
573
574 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
575 jump. This saves two bytes, so the typical case of 2 swapped
576 drives would fit 32 bytes.
577
8090fc01 5782009-05-13 Pavel Roskin <proski@gnu.org>
579
ac963883 580 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
581 grub_uint32_t to avoid a warning.
582
8090fc01 583 * loader/i386/linux.c (allocate_pages): When assigning
584 real_mode_mem, cast through grub_size_t to fix a warning. The
585 code already makes sure that the value would fit a pointer.
586 (grub_linux_setup_video): Cast render_target->data to
587 grub_size_t to fix a warning.
588
18f547ad 5892009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 590
591 * commands/i386/pc/drivemap.c: New file - implement drivemap
592 command.
593 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
594 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
595
6f6a8b28 5962009-05-13 Pavel Roskin <proski@gnu.org>
597
598 * util/i386/pc/grub-setup.c (setup): Remove unused variable
599 embedding_area_exists.
600
15fbf4c4 6012009-05-13 Robert Millan <rmh.grub@aybabtu.com>
602
603 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
604 it easier to understand / work with.
59978c8a 605 Improve warning messages for cases where there's no embedding area,
606 or when it is too small (or core.img too large).
15fbf4c4 607
238e871f 6082009-05-13 Pavel Roskin <proski@gnu.org>
609
0ab3a9a4 610 * loader/i386/pc/multiboot2.c: Add necessary includes for
611 grub_multiboot2_real_boot().
612
a2c8c5f8 613 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
614 PX record is always little-endian. We only need the lower 2
615 bytes of the mode.
616
faec96af 617 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
618 facilitate code reuse.
619 (grub_cpio_mount): Use "struct head", not a char buffer. This
620 fixes a warning reported by gcc 4.4.
621
238e871f 622 * kernel/disk.c (grub_disk_read): Use void pointer for the
623 buffer.
624 (grub_disk_write): Use const void pointer for the buffer.
625 Adjust all callers. Remove unnecessary casts.
626
901d2f0c 6272009-05-10 Robert Millan <rmh.grub@aybabtu.com>
628
629 * util/i386/pc/grub-install.in: Update copyright year.
630
18f547ad 6312009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 632
633 gptsync
634
635 * commands/gptsync.c: new file
636 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
637 (gptsync_mod_SOURCES): new variable
638 (gptsync_mod_CFLAGS): likewise
639 (gptsync_mod_LDFLAGS): likewise
18f547ad 640 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 641 new definition
642 (GRUB_PC_PARTITION_TYPE_HFS): likewise
643 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
644 * conf/i386-ieee1275.rmk: likewise
645 * conf/i386-pc.rmk: likewise
646 * conf/powerpc-ieee1275.rmk: likewise
647
b4ba690a 6482009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
649
650 Fixed grub-emu
651
652 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
653 (grub_dl_ref): likewise
654
317e1a44 6552009-05-08 Robert Millan <rmh.grub@aybabtu.com>
656
657 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
658 split in two functions (one for msdos and one for gpt).
659
041b8094 6602009-05-08 Pavel Roskin <proski@gnu.org>
661
752473c2 662 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
663 not modified.
664
041b8094 665 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
666 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
667 Initialize them with -1. Add sanity check for bad1. Eliminate
668 nerr variable.
669
172800ce 6702009-05-08 David S. Miller <davem@davemloft.net>
671
672 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
673
29aa5e81 6742009-05-06 Robert Millan <rmh.grub@aybabtu.com>
675
676 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
677 existance.
678
96613b62 6792009-05-05 Felix Zielcke <fzielcke@z-51.de>
680
681 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 682 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 683
eef73c8a 6842009-05-05 David S. Miller <davem@davemloft.net>
685
686 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
687
119494b5 6882009-05-05 Pavel Roskin <proski@gnu.org>
689
690 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
691 of grub_dl_ref() and grub_dl_unref().
692 * commands/parttool.c: Remove preprocessor conditionals around
693 grub_dl_ref() and grub_dl_unref().
694 * fs/affs.c: Likewise.
695 * fs/afs.c: Likewise.
696 * fs/cpio.c: Likewise.
697 * fs/ext2.c: Likewise.
698 * fs/fat.c: Likewise.
699 * fs/hfs.c: Likewise.
700 * fs/hfsplus.c: Likewise.
701 * fs/iso9660.c: Likewise.
702 * fs/jfs.c: Likewise.
703 * fs/minix.c: Likewise.
704 * fs/ntfs.c: Likewise.
705 * fs/reiserfs.c: Likewise.
706 * fs/sfs.c: Likewise.
707 * fs/udf.c: Likewise.
708 * fs/ufs.c: Likewise.
709 * fs/xfs.c: Likewise.
710 * include/grub/dl.h: Likewise.
711 * loader/xnu.c: Likewise.
712
de5fd76e 7132009-05-04 Pavel Roskin <proski@gnu.org>
714
715 * commands/acpi.c: Remove unused variable my_mod.
716 * partmap/amiga.c: Likewise.
717 * partmap/apple.c: Likewise.
718 * partmap/gpt.c: Likewise.
719 * partmap/pc.c: Likewise.
720 * partmap/sun.c: Likewise.
721 * term/gfxterm.c: Likewise.
722 * term/i386/pc/vesafb.c: Likewise.
723 * term/i386/pc/vga.c: Likewise.
724
983598ad 7252009-05-04 David S. Miller <davem@davemloft.net>
726
727 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
728 pointer args to grub_ieee1275_get_property().
729
8aadec43 730 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
731
9554b15e 732 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
733 devices, and do not traverse down under controller nodes.
734
67e23c90 735 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
736 (grub_ofdisk_open): Use it to un-escape "," characters.
737 * kern/disk.c (find_part_sep): New.
738 (grub_disk_open): Use it to find the first non-escaped ','
739 character in the disk name.
740 * util/ieee1275/devicemap.c (escape_of_path): New.
741 (grub_util_emit_devicemap_entry): Use it.
742 * util/sparc64/ieee1275/grub-install.in: Update script to
743 strip partition specifiers properly by not triggering on
744 '\' escaped ',' characters.
745
74bfdd2f 7462009-05-04 Robert Millan <rmh.grub@aybabtu.com>
747
748 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
749 to 0x300.
750 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
751 resolutions.
752 (linux_vesafb_modes): Add a lot of additional modes to the list (based
753 on documentation from Wikipedia).
754
4241d2b1 7552009-05-04 Pavel Roskin <proski@gnu.org>
756
757 * disk/ata.c: Spelling fixes.
758 * disk/raid.c: Likewise.
759 * disk/usbms.c: Likewise.
760 * disk/dmraid_nvidia.c: Likewise.
761 * kern/ieee1275/openfw.c: Likewise.
762 * kern/ieee1275/init.c: Likewise.
763 * kern/ieee1275/cmain.c: Likewise.
764 * boot/i386/pc/cdboot.S: Likewise.
765 * video/readers/png.c: Likewise.
766 * video/i386/pc/vbe.c: Likewise.
767 * fs/udf.c: Likewise.
768 * fs/hfs.c: Likewise.
769 * fs/reiserfs.c: Likewise.
770 * efiemu/runtime/efiemu.c: Likewise.
771 * efiemu/main.c: Likewise.
772 * efiemu/mm.c: Likewise.
773 * include/grub/elf.h: Likewise.
774 * include/grub/xnu.h: Likewise.
775 * include/grub/usbdesc.h: Likewise.
776 * include/grub/usb.h: Likewise.
777 * include/grub/script_sh.h: Likewise.
778 * include/grub/lib/LzmaEnc.h: Likewise.
779 * include/grub/efiemu/efiemu.h: Likewise.
780 * include/grub/command.h: Likewise.
781 * normal/menu.c: Likewise.
782 * normal/main.c: Likewise.
783 * normal/datetime.c: Likewise.
784 * bus/usb/uhci.c: Likewise.
785 * mmap/i386/uppermem.c: Likewise.
786 * mmap/mmap.c: Likewise.
787 * commands/acpi.c: Likewise.
788 * commands/test.c: Likewise.
789 * partmap/apple.c: Likewise.
790 * font/font.c: Likewise.
791 * loader/sparc64/ieee1275/linux.c: Likewise.
792 * loader/macho.c: Likewise.
793 * loader/i386/bsd_trampoline.S: Likewise.
794 * loader/i386/bsd.c: Likewise.
795 * loader/xnu.c: Likewise.
796 * term/i386/pc/vesafb.c: Likewise.
797 * term/usb_keyboard.c: Likewise.
798 * util/resolve.c: Likewise.
799 * util/getroot.c: Likewise.
800
0cfc0083 8012009-05-04 Felix Zielcke <fzielcke@z-51.de>
802
803 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
804
7c1d00cd 8052009-05-04 Robert Millan <rmh.grub@aybabtu.com>
806
807 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
808 build error.
809
b01f0548 8102009-05-04 Robert Millan <rmh.grub@aybabtu.com>
811
812 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
813 parameter only available on BIOS.
814
ecc3eb22 8152009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
816
817 Removed wrong semicolon in declaration
818
819 * grub/misc.h (grub_dprintf): remove semicolon
820
112972a9 8212009-05-04 Robert Millan <rmh.grub@aybabtu.com>
822
823 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
824 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
825 is done by grub_cmd_linux() now).
826 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
827 restore video to text mode.
828 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
829 indicates lack of "vga=" parameter. "vga=0" is mapped to
830 `GRUB_LINUX_VID_MODE_NORMAL'.
831
afd5c115 8322009-05-04 Felix Zielcke <fzielcke@z-51.de>
833
834 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
835 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
836 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 837 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 838 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
839 `grub_script.tab.c'.
840
841 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
842 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
843 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
844 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
845 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
846
faa517ce 847 * Makefile.in: Remove duplicated 2008 in Copyright line.
848
ae0c0bdc 8492009-05-04 Robert Millan <rmh.grub@aybabtu.com>
850
851 * util/misc.c (grub_util_warn): New function. Emmits a warning
852 unconditionally.
853 * include/grub/util/misc.h (grub_util_warn): New declaration.
854
855 * util/i386/pc/grub-install.in: Understand --force and pass it down
856 to grub-setup.
857
858 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
859 down to setup().
860 (setup): Improve error messages and add warnings when requested to
861 install in odd layouts. Refuse to install using blocklists unless
862 --force was set.
863
18f547ad 8642009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 865
866 * disk/raid.c (grub_raid_scan_device): Improve debug message.
867
6d260daa 8682009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
869
870 Updated copyright year
871
872 * fs/hfsplus.c: updated copyright year
18f547ad 873
69f853f8 8742009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
875
876 HFS+ UUID
877
18f547ad 878 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 879 in the space previously used by unused3
880 (grub_hfsplus_uuid): new function
881 (grub_hfsplus_fs): added uuid field
882
4c402e73 8832009-05-03 Pavel Roskin <proski@gnu.org>
884
885 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
886 suppress warnings. It's no longer needed.
887 * disk/host.c: Likewise.
888 * disk/ata_pthru.c: Likewise.
889 * disk/loopback.c: Likewise.
890 * hook/datehook.c: Likewise.
891 * parttool/pcpart.c: Likewise.
892 * fs/i386/pc/pxe.c: Likewise.
893 * fs/ntfscomp.c: Likewise.
894 * efiemu/main.c: Likewise.
895 * mmap/mmap.c: Likewise.
896 * commands/crc.c: Likewise.
897 * commands/hexdump.c: Likewise.
898 * commands/hdparm.c: Likewise.
899 * commands/acpi.c: Likewise.
900 * commands/echo.c: Likewise.
901 * commands/minicmd.c: Likewise.
902 * commands/blocklist.c: Likewise.
903 * commands/memrw.c: Likewise.
904 * commands/loadenv.c: Likewise.
905 * commands/usbtest.c: Likewise.
906 * commands/lsmmap.c: Likewise.
907 * commands/boot.c: Likewise.
908 * commands/parttool.c: Likewise.
909 * commands/configfile.c: Likewise.
910 * commands/search.c: Likewise.
911 * commands/ieee1275/suspend.c: Likewise.
912 * commands/cat.c: Likewise.
913 * commands/i386/pc/pxecmd.c: Likewise.
914 * commands/i386/pc/play.c: Likewise.
915 * commands/i386/pc/halt.c: Likewise.
916 * commands/i386/pc/vbeinfo.c: Likewise.
917 * commands/i386/pc/vbetest.c: Likewise.
918 * commands/lspci.c: Likewise.
919 * commands/date.c: Likewise.
920 * commands/handler.c: Likewise.
921 * commands/ls.c: Likewise.
922 * commands/test.c: Likewise.
923 * commands/cmp.c: Likewise.
924 * commands/efi/loadbios.c: Likewise.
925 * commands/efi/fixvideo.c: Likewise.
926 * commands/halt.c: Likewise.
927 * commands/help.c: Likewise.
928 * commands/reboot.c: Likewise.
929 * hello/hello.c: Likewise.
930 * script/sh/main.c: Likewise.
931 * loader/xnu.c: Likewise.
932 * term/terminfo.c: Likewise.
933 * term/i386/pc/serial.c: Likewise.
934 * term/usb_keyboard.c: Likewise.
935
515b5079 9362009-05-03 David S. Miller <davem@davemloft.net>
937
938 * normal/menu.c: Include grub/parser.h
939
dfc31a22 9402009-05-03 Pavel Roskin <proski@gnu.org>
941
2fee74f1 942 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
943 not char*.
944 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
945 Suggested by Javier Martín <lordhabbit@gmail.com>
946
dfc31a22 947 * util/i386/pc/grub-mkrescue.in: Allow for the case when
948 efiemu??.o doesn't exist.
949 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
950 copying.
951
18f547ad 9522009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 953
954 FreeBSD 64-bit support
955
18f547ad 956 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 957 and loader/i386/bsd_trampoline.S
958 (bsd_mod_ASFLAGS): new variable
959 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
960 (FREEBSD_MODTYPE_KERNEL64): likewise
961 (grub_bsd64_trampoline_start): likewise
962 (grub_bsd64_trampoline_end): likewise
963 (grub_bsd64_trampoline_selfjump): likewise
964 (grub_bsd64_trampoline_gdt): likewise
965 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
966 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
967 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
968 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 969 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 970 of "attrib" member
971 * loader/i386/bsd_pagetable.c: new file
972 * loader/i386/bsd_trampoline.S: likewise
973 * loader/i386/bsd.c (ALIGN_QWORD): new macro
974 (ALIGN_VAR): likewise
975 (entry_hi): new variable
976 (kern_end_mdofs): likewise
977 (is_64bit): likewise
978 (grub_freebsd_add_meta): use ALIGN_VAR
979 (grub_e820_mmap): new declaration
980 (grub_freebsd_add_mmap): new function
981 (grub_freebsd_add_meta_module): support 64 bit kernels
982 (grub_freebsd_list_modules): use ALIGN_VAR
983 (gdt_descriptor): new declaration
984 (grub_freebsd_boot): support 64 bit kernels
985 (grub_bsd_elf64_hook): new function
986 (grub_bsd_load_elf): support elf64
987
038c5720 9882009-05-03 Bean <bean123ch@gmail.com>
989
990 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
991 after we get the result of if statement.
992
fc45fb58 9932009-05-03 Bean <bean123ch@gmail.com>
994
995 * Makefile.in (enable_efiemu): New variable.
996
997 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
998 set.
999 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1000 path.
1001 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1002 path, add -mno-red-zone option.
1003 (efiemu64_s.o): Likewise.
1004 (efiemu64.o): Use macro $^ for source file.
1005
1006 * configure.ac (--enable-efiemu): New option.
1007
bbee0f2b 10082009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1009
1010 xnu support
1011
1012 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1013 (pkglib_MODULES): add xnu.mod
1014 (xnu_mod_SOURCES): new variable
1015 (xnu_mod_CFLAGS): likewise
1016 (xnu_mod_LDFLAGS): likewise
1017 (xnu_mod_ASFLAGS): likewise
1018 * conf/i386-pc.rmk: likewise
1019 * conf/x86_64-efi.rmk: likewise
7dd4a573 1020 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1021 new declaration
1022 * include/grub/i386/macho.h: new file
1023 * include/grub/i386/xnu.h: likewise
1024 * include/grub/macho.h: likewise
1025 * include/grub/machoload.h: likewise
1026 * include/grub/x86_64/macho.h: likewise
1027 * include/grub/x86_64/xnu.h: likewise
1028 * include/grub/xnu.h: likewise
1029 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1030 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1031 * loader/i386/efi/xnu.c: new file
1032 * loader/i386/pc/xnu.c: likewise
1033 * loader/i386/xnu.c: likewise
1034 * loader/i386/xnu_helper.S: likewise
1035 * loader/macho.c: likewise
1036 * loader/xnu.c: likewise
1037 * loader/xnu_resume.c: likewise
1038 * util/grub-dumpdevtree: likewise
1039 * include/grub/i386/pit.h: include grub/err.h
1040 (grub_pit_wait): export
1041 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1042
5caf964d 10432009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1044
1045 Efiemu
7dd4a573 1046
5caf964d 1047 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1048 _linux_efi, linux_efi.
1049 new files in grub-emu
5caf964d 1050 new targets efiemu32.o and efiemu64.o
1051 * loader/linux_normal_efiemu.c: likewise
1052 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1053 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1054 files to copy
1055 * include/grub/autoefi.h: new file
7dd4a573 1056 * include/grub/i386/efiemu.h: likewise
5caf964d 1057 * include/grub/i386/pc/efiemu.h: likewise
1058 * include/grub/efi/api.h: add LL suffix when necessary
1059 new definitions relating to tables
1060 * include/grub/efiemu/efiemu.h: new file
1061 * include/grub/efiemu/runtime.h: likewise
1062 * efiemu/prepare.c: likewise
1063 * efiemu/loadcore_common.c: likewise
1064 * efiemu/loadcore64.c: likewise
1065 * efiemu/runtime/efiemu.sh: likewise
1066 * efiemu/runtime/efiemu.S: likewise
1067 * efiemu/runtime/efiemu.c: likewise
1068 * efiemu/runtime/config.h: likewise
1069 * efiemu/prepare32.c: likewise
1070 * efiemu/main.c: likewise
1071 * efiemu/modules/pnvram.c: likewise
1072 * efiemu/modules/i386: likewise
1073 * efiemu/modules/i386/pc: likewise
1074 * efiemu/modules/acpi.c: likewise
1075 * efiemu/i386/pc/cfgtables.c: likewise
1076 * efiemu/i386/loadcore64.c: likewise
1077 * efiemu/i386/loadcore32.c: likewise
1078 * efiemu/prepare64.c: likewise
1079 * efiemu/loadcore.c: likewise
1080 * efiemu/symbols.c: likewise
1081 * efiemu/mm.c: likewise
1082 * efiemu/loadcore32.c: likewise
7dd4a573 1083
10842009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 1085
1086 ACPI spoofing
1087
1088 * commands/acpi.c: new file
1089 * commands/i386/pc/acpi.c: likewise
1090 * commands/efi/acpi.c: likewise
1091 * include/grub/acpi.h: likewise
1092 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1093 (acpi_mod_SOURCES): new variable
1094 (acpi_mod_CFLAGS): likewise
1095 (acpi_mod_LDFLAGS): likewise
1096 * conf/i386-efi.rmk: likewise
1097 * conf/x86_64-efi.rmk: likewise
1098
7dd4a573 10992009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 1100
1101 Missing part from mmap patch
1102
1103 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1104 (grub_mmap_unregister)
1105 (grub_mmap_free_and_unregister): use grub_mmap_register
1106
7dd4a573 11072009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 1108
1109 Mmap services
1110
1111 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1112 * loader/i386/linux.c (find_mmap_size): likewise
1113 (allocate_pages): likewise
1114 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1115 (grub_fill_multiboot_mmap): likewise
1116 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1117 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1118 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1119 (OPENBSD_MMAP_RESERVED): likewise
1120 * include/grub/i386/pc/memory.h: include grub/memory.h
1121 (grub_lower_mem): removed
1122 (grub_upper_mem): likewise
1123 (GRUB_MACHINE_MEMORY_ACPI): new definition
1124 (GRUB_MACHINE_MEMORY_NVS): likewise
1125 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1126 (GRUB_MACHINE_MEMORY_HOLE): likewise
1127 (grub_machine_mmap_register): likewise
1128 (grub_machine_mmap_unregister): likewise
1129 (grub_machine_get_upper): likewise
1130 (grub_machine_get_lower): likewise
1131 (grub_machine_get_post64): likewise
1132 * include/grub/i386/efi/memory.h: new file
1133 * include/grub/x86_64/efi/memory.h: likewise
1134 * include/grub/efi/memory.h: likewise
1135 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1136 (mmap_mod_SOURCES): new variable
1137 (mmap_mod_LDFLAGS): likewise
1138 (mmap_mod_ASFLAGS): likewise
1139 * conf/i386-coreboot.rmk: likewise
1140 * conf/i386-ieee1275.rmk: likewise
1141 * conf/i386-efi.rmk: likewise
1142 * conf/x86_64-efi.rmk: likewise
1143 * include/grub/types.h (UINT_TO_PTR): new macro
1144 (PTR_TO_UINT32): likewise
1145 (PTR_TO_UINT64): likewise
1146 * include/grub/memory.h: new file
1147 * mmap/i386/pc/mmap.c: likewise
1148 * mmap/i386/pc/mmap_helper.S: likewise
1149 * mmap/i386/uppermem.c: likewise
1150 * mmap/mmap.c: likewise
1151 * mmap/efi/mmap.c: likewise
7dd4a573 1152 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 1153 grub_upper_mem
1154 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1155 (grub_upper_mem): likewise
1156 (grub_machine_init): don't use grub_upper_mem,
1157 make grub_lower_mem local
1158 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1159 grub_mmap_iterate and grub_mmap_get_upper
1160 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1161
d558e6b5 11622009-05-02 Bean <bean123ch@gmail.com>
1163
1164 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1165 script/sh/parser.y.
1166 (pkglib_MODULES): Add normal.mod and sh.mod.
1167 (normal_SOURCES): New variable.
1168 (normal_mod_CFLAGS): Likewise.
1169 (normal_mod_LDFLAGS): Likewise.
1170 (sh_mod_SOURCES): Likewise.
1171 (sh_mod_CFLAGS): Likewise.
1172 (sh_mod_LDFLAGS): Likewise.
1173
1174 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1175 script/sh/lexer.c_DEPENDENCIES.
1176 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1177 kern/rescue_reader.c and kern/rescue_parser.c.
1178 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1179 (grub_emu_SOURCES): Change source files.
1180 (pkglib_MODULES): Remove normal.mod.
1181 (normal_SOURCES): Removed.
1182 (normal_mod_CFLAGS): Likewise.
1183 (normal_mod_LDFLAGS): Likewise.
1184 * conf/i386-coreboot.rmk: Likewise.
1185 * conf/i386-efi.rmk: Likewise.
1186 * conf/i386-ieee1276.rmk: Likewise.
1187 * conf/powerpc-ieee1275.rmk: Likewise.
1188 * conf/sparc64-ieee1275.rmk: Likewise.
1189 * conf/x86_64-efi.rmk: Likewise.
1190
1191 * include/grub/command.h (grub_command_execute): New inline function.
1192
1193 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1194
1195 * include/grub/normal.h: Remove <grub/setjmp.h>.
1196 (grub_fs_module_list): Moved to normal/autofs.c.
1197 (grub_exit_env): Removed.
1198 (grub_command_execute): Likewise.
1199 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1200 parameter script.
1201 (read_command_list): New function declaration.
1202 (read_fs_list): Likewise.
1203
1204 * include/parser.h: Include <grub/reader.h>.
1205 (grub_parser_split_cmdline): Change type of getline parameter.
1206 (grub_parser): New structure.
1207 (grub_parser_class): New variable.
1208 (grub_parser_execute): New function declaration.
1209 (grub_register_rescue_parser): Likewise.
1210 (grub_parser_register): New inline function.
1211 (grub_parser_unregister): Likewise.
1212 (grub_parser_get_current): Likewise.
1213 (grub_parser_set_current): Likewise.
1214
1215 * include/grub/reader.h: New file.
1216 * kern/reader.c: Likewise.
1217 * kern/rescue_parser.c: Likewise.
1218 * kern/rescue_reader.c: Likewise.
1219 * normal/autofs.c: Likewise.
1220 * normal/dyncmd.c: Likewise.
1221
1222 * include/grub/rescue.h: Removed.
1223 * normal/command.h: Likewise.
1224
1225 * include/grub/script.h: Moved to ...
1226 * include/grub/script_sh.h: ... Moved here.
1227 * normal/execute.c: Moved to ...
1228 * script/sh/execute.c: ... Moved here.
1229 * normal/function.c: Moved to ...
1230 * script/sh/function.c: ... Moved here.
1231 * normal/lexer.c: Moved to ...
1232 * script/sh/lexer.c: ... Moved here.
1233 * normal/parser.y: Moved to ...
1234 * script/sh/parser.y: ... Moved here.
1235 * normal/script.c: Moved to ...
1236 * script/sh/script.c: ... Moved here.
1237
1238 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1239 <grub/reader.h>.
1240 (grub_exit_env): Removed.
1241 (fs_module_list): Moved to normal/autofs.c.
1242 (grub_file_getline): Don't handle comment here.
1243 (free_menu): Skip removed field entry->commands.
1244 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1245 script parameter.
1246 (read_config_file): Removed nested parameter, change getline function.
1247 (grub_enter_normal_mode): Removed.
1248 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1249 (read_command_list): Likewise.
1250 (autoload_fs_module): Moved to normal/autofs.c.
1251 (read_fs_list): Likewise.
1252 (reader_nested): New variable.
1253 (grub_normal_execute): Run parser.sh to switch to sh parser.
1254 (grub_cmd_rescue): Removed.
1255 (cmd_normal): Removed.
1256 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1257 rescue command.
1258 (grub_cmdline_run): New function.
1259 (grub_normal_reader_init): Likewise.
1260 (grub_normal_read_line): Likewise.
1261 (grub_env_write_pager): Likewise.
1262 (cmdline): New variable.
1263 (grub_normal_reader): Likewise.
1264 (GRUB_MOD_INIT): Register normal reader and set as current, register
1265 pager hook, register normal command with grub_register_command_prio,
1266 so that it won't show up in command.lst.
1267 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1268 grub_fs_autoload_hook.
1269
1270 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1271 (grub_menu_execute_entry): Replace grub_script_execute with
1272 grub_parser_execute, change parameter to grub_command_execute.
1273
1274 * normal/menu_text.c: Remove <grub/script.h>.
1275
1276 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1277 and <grub/parser.h>.
1278 (run): Change editor_getline to use new parser interface. Change
1279 parameter to grub_command_execute.
1280
1281 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1282 <grub/reader.h> and <grub/parser.h>.
1283 (grub_load_normal_mode): Execute normal command.
1284 (grub_main): Call grub_register_core_commands,
1285 grub_register_rescue_parser and grub_register_rescue_reader, use
1286 grub_reader_loop to enter input loop.
1287
7dd4a573 1288 * kern/parser.c (grub_parser_split_cmdline): Change type of
1289 getline parameter.
d558e6b5 1290 (grub_parser_class): New variable.
1291 (grub_parser_execute): New function.
1292
1293 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1294 * loader/multiboot2.c: Likewise.
1295 * loader/sparc64/ieee1275/linux.c: Likewise.
1296
1297 * util/grub-emu.c (read_command_list): New dummy function.
1298
18db813d 12992009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1300
1301 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1302 count to 16 for CCISS and IDA.
1303
6c67de15 13042009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1305
1306 * normal/menu_text.c (grub_wait_after_message): Print a newline
1307 after waiting for user input.
1308
1309 * loader/i386/linux.c: Include `<grub/normal.h>'.
1310 (grub_cmd_linux): Improve the error message about `ask' mode, by
1311 waiting for user input so it's not missed (we can do this, since
1312 user requested interaction).
1313
d9dc87b0 13142009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1315
1316 Added missing lst to grub-mkrescue
1317
1318 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1319 and ${input_dir}/parttool.lst
1320
ac8a2baa 13212009-04-30 David S. Miller <davem@davemloft.net>
1322
ad22a610 1323 * util/hostdisk.c (device_is_wholedisk): New function.
1324 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1325 zero only if device_is_wholedisk() returns true.
1326
6966215d 1327 * util/hostdisk.c (convert_system_partition_to_system_disk):
1328 Handle virtual disk devices named /dev/vdiskX as found on sparc
1329 and powerpc.
1330
ac8a2baa 1331 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1332 lettered partition specifier is found, convert to numbered.
1333
979b4fb4 13342009-04-29 David S. Miller <davem@davemloft.net>
1335
e2bf39b2 1336 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1337 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1338
3c64e104 1339 * normal/command.c: Add missing newline at end of file.
1340
979b4fb4 1341 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1342 warnings.
1343 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1344 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1345 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1346 ihandles have a 32-bit type but need to be stored in a "void *".
1347
136d9f82 13482009-04-28 Pavel Roskin <proski@gnu.org>
1349
9459c306 1350 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1351 not disk. Adjust all dependencies.
2e08a26a 1352 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 1353 grub_disk_close().
1354
136d9f82 1355 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1356 parent's partition, don't copy it by reference, as it gets freed
1357 on close.
1358
7dd4a573 13592009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 1360
1361 Preboot hooks support
1362
1363 * commands/boot.c (struct grub_preboot_t): new declaration
1364 (preboots_head): new variable
1365 (preboots_tail): likewise
1366 (grub_loader_register_preboot_hook): new function
1367 (grub_loader_unregister_preboot_hook): likewise
1368 (grub_loader_set): launch preboot hooks
1369 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1370 (grub_loader_register_preboot_hook): new declaration
1371 (grub_loader_unregister_preboot_hook): likewise
1372
5af922b5 13732009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1374
1375 Warning fix
1376
7dd4a573 1377 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 1378 calling grub_dprintf
1379
a5562c30 13802009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1381
1382 Bug and warning fixes
1383
7dd4a573 1384 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 1385 declaration
1386 * commands/test.c (test_parse): fixed bug with file tests and corrected
1387 declaration of find_file
1388
4006f85c 13892009-04-26 Pavel Roskin <proski@gnu.org>
1390
1391 * Makefile.in: Don't install empty manual pages if help2man is
1392 missing. Use help2man option for output, not shell redirection.
1393
5c77c3de 13942009-04-26 David S. Miller <davem@davemloft.net>
1395
1396 * util/grub-mkdevicemap.c (make_device_map): Add missing
1397 NESTED_FUNC_ATTR to process_device().
1398
033b10a8 13992009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1400
1401 Test command
1402
1403 * commands/test.c: rewritten to use bash-like test
1404
e4343593 14052009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1406
1407 Parttool autoloading and improvements
1408
7dd4a573 1409 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 1410 (parttool.lst): new target
1411 * genmk.rb: generate parttool-*
1412 (CLEANFILES): add #{parttool}
1413 (PARTTOOLFILES): new variable
1414 * genparttoollist.sh: new file
7dd4a573 1415 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 1416 (grub_pcpart_type): likewise
1417 * commands/parttool.c (helpmsg): new variable
1418 (grub_cmd_parttool): output help if not enough arguments are supplied
1419 autoload modules
1420 (GRUB_MOD_INIT(parttool)): use helpmsg
1421
0d312500 14222009-04-24 David S. Miller <davem@davemloft.net>
1423
7dd4a573 1424 Avoiding opening same device multiple times in device iterator.
0d312500 1425
1426 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 1427 and use it to build a list of partitions in iterate_disk() and
0d312500 1428 iterate_partition().
1429
ac20caff 1430 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1431 on disk->data.
1432
0dcf7495 1433 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1434 grub_devalias_iterate() result instead of unconditional 0.
1435 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1436 Also, capture hook return value, either directly or via
1437 grub_children_iterate(), and propagate to caller.
1438 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1439 grub_children_iterate): Return value is now 'int' instead of
1440 'grub_err_t'.
1441 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1442 like a proper iterator, stopping when hooks return non-zero.
1443 (grub_devalias_iterate): Likewise.
1444
c8c08833 14452009-04-23 David S. Miller <davem@davemloft.net>
1446
1447 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1448
f01005a8 14492009-04-22 David S. Miller <davem@davemloft.net>
1450
1451 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1452 is larger than address_cells, use that value for address_cells too.
1453
4e8269da 1454 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1455 IEEE1275_MAX_PATH_LEN): Define.
1456 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1457 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1458 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1459 'devtype'. Explicitly NULL terminate devalias expansion.
1460
a1447506 1461 * util/sparc64/ieee1275/misc.c: New file.
1462 * util/sparc64/ieee1275/grub-setup.c: New file.
1463 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1464 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1465 * util/sparc64/ieee1275/grub-install.in: New file.
1466 * util/ieee1275/ofpath.c: New file.
1467 * util/ieee1275/devicemap.c: New file.
1468 * util/devicemap.c: New file.
1469 * util/deviceiter.c: New file.
1470 * kern/sparc64/ieee1275/init.c: New file.
1471 * include/grub/util/ofpath.h: New file.
1472 * include/grub/util/deviceiter.h: New file.
1473 * util/grub-mkdevicemap.c: Include deviceiter.h.
1474 Implement using grub_util_emit_devicemap_entry and
1475 grub_util_iterate_devices.
1476 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1477 util/devicemap.c into grub-mkdevicemap
1478 * conf/i386-efi.rmk: Likewise.
1479 * conf/i386-ieee1275.rmk: Likewise.
1480 * conf/i386-pc.rmk: Likewise.
1481 * conf/powerpc-ieee1275.rmk: Likewise.
1482 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1483 images and installation utilities. Build kernel as image
1484 instead of as elf binary. Use common rules as much as possible.
1485
7dd4a573 14862009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 1487
1488 Correct GPT definition
1489
7dd4a573 1490 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 1491 of "attrib" member
1492
c6c5219f 14932009-04-19 Felix Zielcke <fzielcke@z-51.de>
1494
1495 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1496
0552ff9f 14972009-04-19 David S. Miller <davem@davemloft.net>
1498
1499 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1500 (grub_rescue_cmd_linux): Rename to...
1501 (grub_cmd_linux): and fix prototype.
1502 (grub_rescue_cmd_initrd): Rename to...
1503 (grub_cmd_initrd): and fix prototype.
1504 (cmd_linux, cmd_initrd): New.
1505 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1506 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1507
d1a282fc 15082009-04-17 Pavel Roskin <proski@gnu.org>
1509
07c5039f 1510 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1511 format.
1512 (grub_ohci_transfer): Likewise.
1513
b012002d 1514 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1515
1bc09c35 1516 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1517 return without a value. Fix inconsistent indentation.
1518
e0ff9126 1519 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1520 match struct grub_fs.
1521
d1a282fc 1522 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1523 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1524 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1525 * commands/lspci.c (grub_lspci_iter): Likewise.
1526
a96df3f2 15272009-04-16 Bean <bean123ch@gmail.com>
1528
1529 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1530 value.
1531
41bb0fe9 15322009-04-15 Pavel Roskin <proski@gnu.org>
1533
1534 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1535 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1536 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1537 definitions.
1538
596c6970 15392009-04-15 Felix Zielcke <fzielcke@z-51.de>
1540
1541 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 1542 that no multiple data or metadata areas are supported and `Unknown
596c6970 1543 metadata header'.
1544
7dd4a573 15452009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 1546
1547 Move loader out of the kernel
1548
1549 * kern/loader.c: moved to ...
1550 * commands/boot.c: ... moved here
1551 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1552 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1553 * include/grub/kernel.h (grub_machine_fini): export
1554 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1555 (grub_loader_set): likewise
1556 (grub_loader_unset): likewise
1557 (grub_loader_boot): likewise
1558 * conf/common.rmk: new module boot.mod
1559 (pkglib_MODULES): add boot.mod
1560 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1561 (grub_emu_SOURCES): likewise
1562 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1563 (grub_emu_SOURCES): likewise
1564 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1565 (grub_emu_SOURCES): likewise
1566 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1567 (grub_emu_SOURCES): likewise
1568 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1569 (grub_emu_SOURCES): likewise
7dd4a573 1570 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1571 (grub_emu_SOURCES): likewise
0d5d5653 1572 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 1573 (grub_emu_SOURCES): likewise
0d5d5653 1574
7dd4a573 15752009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 1576
1577 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 1578
5999d619 1579 * kern/misc.c (grub_itoa): Removed function
1580 (grub_ltoa): likewise
1581 (grub_vsprintf): use grub_lltoa
1582
7dd4a573 15832009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 1584
1585 Restore grub-emu
1586
1587 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1588 * conf/i386-coreboot.rmk: likewise
1589 * conf/i386-ieee1275.rmk: likewise
1590 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1591
20318222 15922009-04-15 Felix Zielcke <fzielcke@z-51.de>
1593
1594 * INSTALL: Add that `./autogen.sh' needs to be run before
1595 `./configure.'.
1596
d05f0df3 15972009-04-14 Bean <bean123ch@gmail.com>
1598
1599 * Makefile.in (pkglib_DATA): Add handler.lst.
1600 (handler.lst): New rule.
1601
1602 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1603 * conf/i386-coreboot.rmk: Likewise.
1604 * conf/i386-ieee1275.rmk: Likewise.
1605 * conf/i386-efi.rmk: Likewise.
1606 * conf/x86_64-efi.rmk: Likewise.
1607 * conf/powerpc-ieee1275.rmk: Likewise.
1608 * conf/sparc64-ieee1275.rmk: Likewise.
1609
1610 * genhandlerlist.sh: New file.
1611
1612 * genmk.rb: Add rules to generate handler.lst.
1613
1614 * include/grub/normal.h (grub_file_getline): New function definition.
1615 (read_handler_list): Likewise.
1616 (free_handler_list): Likewise.
1617
1618 * include/grub/term.h (grub_term_register_input): Add name parameter
1619 for auto generation of handler.lst.
1620 (grub_term_register_output): Likewise.
1621
1622 * normal/handler.c: New file.
1623
1624 * normal/main.c (get_line): Renamed to grub_file_getline.
1625 (read_config_file): Use the newly renamed grub_file_getline.
1626 (read_command_list): Likewise.
1627 (read_fs_list): Likewise.
1628 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1629 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1630
1631 * term/efi/console.c (grub_console_init): Add name parameter for auto
1632 generation of handler.lst.
1633 * term/gfxterm.c: Likewise.
1634 * term/i386/pc/at_keyboard.c: Likewise.
1635 * term/i386/pc/console.c: Likewise.
1636 * term/i386/pc/serial.c: Likewise.
1637 * term/i386/pc/vesafb.c: Likewise.
1638 * term/i386/pc/vga.c: Likewise.
1639 * term/i386/pc/vga_text.c: Likewise.
1640 * term/ieee1275/ofconsole.c: Likewise.
1641 * term/usb_keyboard.c: Likewise.
1642
33c846be 16432009-04-14 Bean <bean123ch@gmail.com>
1644
1645 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1646 properly with null character.
1647
4484e01e 16482009-04-14 Felix Zielcke <fzielcke@z-51.de>
1649
1650 * configure: Remove.
1651 * config.h.in: Likewise.
f93d668e 1652 * stamp-h.in: Likewise.
4484e01e 1653 * DISTLIST: Likewise.
1654 * conf/common.mk: Likewise.
1655 * conf/i386-coreboot.mk: Likewise.
1656 * conf/i386-efi.mk: Likewise.
1657 * conf/i386-ieee1275.mk: Likewise.
1658 * conf/i386.mk: Likewise.
1659 * conf/i386-pc.mk: Likewise.
1660 * conf/powerpc-ieee1275.mk: Likewise.
1661 * conf/sparc64-ieee1275.mk: Likewise.
1662 * conf/x86_64-efi.mk: Likewise.
1663
1664 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1665 develop on GRUB.
1666
7dd4a573 16672009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1668 David S. Miller <davem@davemloft.net>
1669
1670 * util/hostdisk.c (make_device_name): Fix buffer length
1671 calculations.
1672
e25b5a8c 16732009-04-14 Felix Zielcke <fzielcke@z-51.de>
1674
1675 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1676 <sys/param.h> and <sys/sysctl.h>.
1677 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1678 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1679 opening the device and reset them afterwards.
1680
1f1f580c 16812009-04-13 Pavel Roskin <proski@gnu.org>
1682
1683 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1684 Reported by John Stanley <jpsinthemix@verizon.net>
1685
7ebc2d6b 16862009-04-13 Robert Millan <rmh@aybabtu.com>
1687
1688 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1689 that name for menuentries when appropriate.
7ebc2d6b 1690
d8ba3667 16912009-04-13 Felix Zielcke <fzielcke@z-51.de>
1692
1693 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1694
cba416eb 16952009-04-13 Robert Millan <rmh@aybabtu.com>
1696
1697 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1698 to Linux, simply abort telling the user it's no longer supported.
1699
a547a745 17002009-04-13 Felix Zielcke <fzielcke@z-51.de>
1701
1702 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1703 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1704 `freebsd_loadenv' only when devices.hints exist.
1705
232a769c 17062009-04-13 Pavel Roskin <proski@gnu.org>
1707
1708 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1709
c3012039 17102009-04-13 Felix Zielcke <fzielcke@z-51.de>
1711
1712 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1713 partition number.
1714 (grub_drive): Likewise.
1715
234022fe 17162009-04-13 David S. Miller <davem@davemloft.net>
1717
1718 * kern/sparc64/ieee1275/ieee1275.c: New file.
1719 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1720 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1721 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1722 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1723 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1724 grub_ieee1275_alloc_physmem): Declare new exported functions.
1725
d8e1836c 1726 * include/grub/sparc64/ieee1275/loader.h: New file.
1727 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1728 * include/grub/sparc64/kernel.h: Likewise.
1729 * loader/sparc64/ieee1275/linux.c: Likewise.
1730
96bd81ec 1731 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1732 (grub_fstest_SOURCES): Likewise.
1733
6a4737e5 1734 * util/hostdisk.c (make_device_name): Do not make any assumptions
1735 about the length of drive names.
1736
1d7a72fd 1737 * kern/dl.c (grub_dl_load_file): Close file immediately when
1738 we are done using it.
1739
56bc2471 17402009-04-12 David S. Miller <davem@davemloft.net>
1741
1742 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1743 values. Noticed by Pavel Roskin.
1744
df38d0bb 1745 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1746 target compiler.
7dd4a573 1747
e382e93a 1748 * genmk.rb: Add more flexible image type specification, also
1749 pass --strip-unneeded to objcopy.
1750 * conf/i386-pc.rmk: Use *_FORMAT.
1751 * conf/i386-pc.mk: Rebuilt.
1752
f5dbbca9 1753 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1754 (OFDISK_HASH_SZ): Define.
1755 (ofdisk_hash): New hash table.
1756 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1757 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1758 instead of device phandle which is not unique.
1759
91c88b12 1760 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1761 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1762 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1763 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1764 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1765 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1766 GRUB_KERNEL_MACHINE_DATA_END): Define.
1767 (grub_kernel_image_size, grub_total_module_size): Declare.
1768
5b5d4aa5 17692009-04-12 Pavel Roskin <proski@gnu.org>
1770
7dd4a573 1771 * configure.ac: Change the logic when we check for target tools.
1772 Do it when the target is specified and it's different from the
1773 specified value of the host.
5b5d4aa5 1774
c91e1793 17752009-04-11 Felix Zielcke <fzielcke@z-51.de>
1776
1777 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1778 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1779 GNU/kFreeBSD. Check if a device is a character device. Use
1780 DIOCGMEDIASIZE to get the size.
1781 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1782 support for GNU/kFreeBSD.
1783 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1784 is a character device instead of a block device. Add support for
1785 FreeBSD device names.
1786
1787 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1788 is a character device instead of a block device.
1789
1790 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1791 is a character device instead of a block device.
1792
b1ac8644 17932009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1794
1795 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1796 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1797 FreeBSD. Check if a device is a character device. Use
1798 DIOCGMEDIASIZE to get the size.
1799 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1800 support for FreeBSD.
1801 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1802 is a character device instead of a block device. Add support for
1803 FreeBSD device names.
1804
1805 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1806 a character device instead of a block device.
1807 (grub_util_check_char_device): New function.
1808
1809 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1810 a character device instead of a block device.
1811
1812 * include/grub/util/getroot.h (grub_util_check_char_device): New
1813 prototype.
1814
a3f7515a 18152009-04-11 David S. Miller <davem@davemloft.net>
1816
1817 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1818 static libgcc.
1819 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1820 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1821 function, if present.
1822 (__bswapdi2): Likewise.
1823
0d44993d 1824 * include/grub/sparc64/ieee1275/boot.h: New file.
1825 * boot/sparc64/ieee1275/boot.S: Likewise.
1826 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1827
ed3d2bc2 1828 * kern/misc.c (grub_ltoa): New function.
1829 (grub_vsprintf): Use it to format 'long' integers.
1830
d3bfb59c 18312009-04-10 David S. Miller <davem@davemloft.net>
1832
1833 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1834 slots are of type grub_ieee1275_cell_t.
1835 (grub_nand_read): Likewise.
1836 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1837 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1838 macros are used to compare values in arg/ret block of the call.
1839 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1840 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1841 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1842 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1843 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1844 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1845 grub_ieee1275_close, grub_ieee1275_set_property,
1846 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1847 grub_ieee1275_cell_t.
1848 * kern/ieee1275/openfw.c (grub_map): Likewise.
1849 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1850 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1851
450e2238 1852 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1853 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1854 (grub_devalias_iterate): Likewise.
1855
7dd4a573 18562009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 1857
1858 UFS improvements
1859
1860 * fs/ufs.c (INODE_NBLOCKS): new definition
1861 (struct grub_ufs_dirent): added fields for non-BSD dirents
1862 (grub_ufs_get_file_block): fixed double indirect handling
1863 (grub_ufs_lookup_symlink): use more robust way to determine whether
1864 symlink is inline
1865 (grub_ufs_find_file): support for non-BSD dirents
1866 (grub_ufs_dir): support for non-BSD dirents
1867
e7e6862a 18682009-04-10 Bean <bean123ch@gnail.com>
1869
1870 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1871 attribute, otherwise the size would be wrong for i386 platform.
1872
1873 * include/grub/pci.h (grub_pci_read_word): New inline function.
1874 (grub_pci_read_byte): Likewise.
1875 (grub_pci_write): Likewise.
1876 (grub_pci_write_word): Likewise.
1877 (grub_pci_write_byte): Likewise.
1878
1879 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1880
1881 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1882 (find_framebuf): Scan pci to locate the frame buffer address.
1883
1884 * commands/efi/fixvideo.c: New file.
1885
1886 * commands/efi/loadbios.c: Likewise.
1887
1888 * commands/memrw.c: Likewise.
1889
1890 * util/grub-dumpbios.in: Likewise.
1891
1892 * conf/common.rmk (grub-dumpbios): New utility.
1893 (pkglib_MODULES): New module memrw.mod.
1894 (memrw_mod_SOURCE): New macro.
1895 (memrw_mod_CFLAGS): Likewise.
1896 (memrw_mod_LDFLAGS): Likewise.
1897
7dd4a573 1898 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1899 fixvideo.mod.
1900 (loadbios_mod_SOURCE): New macro.
1901 (loadbios_mod_CFLAGS): Likewise.
1902 (loadbios_mod_LDFLAGS): Likewise.
1903 (fixvideo_mod_SOURCE): Likewise.
1904 (fixvideo_mod_CFLAGS): Likewise.
1905 (fixvideo_mod_LDFLAGS): Likewise.
1906
7dd4a573 1907 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1908 fixvideo.mod.
1909 (loadbios_mod_SOURCE): New macro.
1910 (loadbios_mod_CFLAGS): Likewise.
1911 (loadbios_mod_LDFLAGS): Likewise.
1912 (fixvideo_mod_SOURCE): Likewise.
1913 (fixvideo_mod_CFLAGS): Likewise.
1914 (fixvideo_mod_LDFLAGS): Likewise.
1915
af63ada2 19162009-04-08 Felix Zielcke <fzielcke@z-51.de>
1917
1918 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1919
c2cdde70 19202009-04-07 David S. Miller <davem@davemloft.net>
1921
1922 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1923 support for R_SPARC_OLO10 relocations. Fix compile warning for
1924 R_SPARC_WDISP30 case.
ea3f72cf 1925 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 1926
761319cf 19272009-04-06 Pavel Roskin <proski@gnu.org>
1928
1007d1f5 1929 * include/grub/misc.h (ARRAY_SIZE): New macro.
1930 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1931 New macro.
1932 * loader/i386/linux.c (allocate_pages): Use free_pages().
1933 (grub_linux_unload): Don't use free_pages().
1934 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1935 wrong index. Treat all other modes as text modes.
1936 (grub_cmd_linux): Initialize vid_mode unconditionally to
1937 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1938
761319cf 1939 * commands/help.c (print_command_help): Use cmd->prio, not
1940 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1941
ea761d40 19422009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 1943
ea761d40 1944 Parttool
1945
1946 * parttool/pcpart.c: new file
1947 * commands/parttool.c: likewise
1948 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1949 (parttool_mod_SOURCES): new variable
1950 (parttool_mod_CFLAGS): likewise
1951 (parttool_mod_LDFLAGS): likewise
1952 (pcpart_mod_SOURCES): likewise
1953 (pcpart_mod_CFLAGS): likewise
1954 (pcpart_mod_LDFLAGS): likewise
7dd4a573 1955 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 1956 and parttool/pcpart.c
1957 * conf/i386-efi.rmk: likewise
1958 * conf/i386-ieee1275.rmk: likewise
1959 * conf/i386-pc.rmk: likewise
1960 * conf/powerpc-ieee1275.rmk: likewise
1961 * conf/sparc64-ieee1275.rmk: likewise
1962 * conf/x86_64-ieee1275.rmk: likewise
1963
05aaebfb 19642009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1965
1966 Support for mtime and further expandability of dir command
1967
1968 * include/grub/lib/datetime.h: moved to ...
7dd4a573 1969 * include/grub/datetime.h: ... moved here and added
05aaebfb 1970 declaration of grub_unixtime2datetime. All users updated
7dd4a573 1971 * include/grub/fs.h: new syntax for dir and mtime functions in
1972 struct grub_fs
05aaebfb 1973 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1974 and GRUB_FSHELP_FLAGS_MASK
1975 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1976 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1977 (grub_ext2_mtime): new function
1978 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1979 (grub_hfsplus_mtime): new function
1980 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1981 (GRUB_UFS_ATTR_FILE): likewise
1982 (GRUB_UFS_ATTR_LNK): likewise
1983 (struct grub_ufs_sblock): new fields mtime
1984 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1985 all users updated
1986 (grub_ufs_dir): mtime support
1987 (grub_ufs_mtime): new function
1988 * fs/affs.c (grub_affs_dir): use new dir syntax
1989 * fs/afs.c (grub_afs_dir): likewise
1990 * fs/cpio.c (grub_cpio_dir): likewise
1991 * fs/fat.c (grub_fat_find_dir): likewise
1992 * fs/hfs.c (grub_hfs_dir): likewise
1993 * fs/iso9660.c (grub_iso9660_dir): likewise
1994 * fs/jfs.c (grub_jfs_dir): likewise
1995 * fs/minix.c (grub_minix_dir): likewise
1996 * fs/ntfs.c (grub_ntfs_dir): likewise
1997 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1998 * fs/sfs.c (grub_sfs_dir): likewise
1999 * fs/xfs.c (grub_xfs_dir): likewise
2000 * util/hostfs.c (grub_hostfs_dir): likewise
2001 * lib/datetime.c: moved to ...
2002 * normal/datetime.c: ... moved here
2003 (grub_unixtime2datetime): new function
2004 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2005 * normal/completion.c (iterate_dir): use new dir syntax
2006 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2007 last modification time of a volume
7dd4a573 2008 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2009 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2010 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2011 (normal_mod_SOURCES): likewise
2012 (datetime_mod_SOURCES): Removed lib/datetime.c
2013 * conf/i386-efi.rmk: likewise
7dd4a573 2014 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2015 * conf/i386-pc.rmk: likewise
2016 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2017 * conf/sparc64-ieee1275.rmk: likewise
2018 * conf/x86_64-efi.rmk: likewise
05aaebfb 2019
8a7e1a14 20202009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2021
2022 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2023
2024 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2025 on grub_fat_find_dir
2026 (grub_fat_find_dir): use grub_fat_iterate_dir
2027 (grub_fat_label): likewise
2028
04186a9c 20292009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2030
7dd4a573 2031 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2032 and command.h
2033 remove extraneous kernel_elf_HEADERS
2034
da4c0bb6 20352009-04-04 Bean <bean123ch@gnail.com>
2036
2037 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2038
2039 * util/misc.c: Likewise.
2040
54ad9555 20412009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2042
2043 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2044 instead of grub_printf.
2045
7a6bf9f2 20462009-04-03 Robert Millan <rmh@aybabtu.com>
2047
2048 * loader/i386/linux.c (grub_linux_setup_video): Fill
2049 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2050 values from `mode info' structure instead of hardcoded
2051 values.
2052
3fcc2083 20532009-04-01 Pavel Roskin <proski@gnu.org>
2054
2055 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2056 unused now.
2057 * genmk.rb: Likewise.
2058 * configure.ac: Likewise.
2059
5ec9740b 20602009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2061
2062 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2063 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2064
5270cec8 20652009-04-01 David S. Miller <davem@davemloft.net>
2066
2067 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2068 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2069 (grub_setjmp): Mark with 'returns_twice' attribute.
2070 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2071 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2072 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2073
9c3dd854 20742009-04-01 Robert Millan <rmh@aybabtu.com>
2075
2076 Reapply fix from 2008-07-28 which was accidentally reverted; also
2077 perform the same fix to a similar check in same function.
2078
2079 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2080 with the same number are found, just use issue a warning with
2081 grub_dprintf(), as this error has been reported to be non-fatal.
2082
0d818b7e 20832009-03-31 Pavel Roskin <proski@gnu.org>
2084
2085 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2086 for cross-compilation.
2087
95646d92 20882009-03-30 Robert Millan <rmh@aybabtu.com>
2089
2090 Fix i386-ieee1275 build.
2091
2092 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2093 Remove declaration.
2094
6a003ed1 20952009-03-30 Pavel Roskin <proski@gnu.org>
2096
2097 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2098 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2099 zero-terminated, rely only on the strlen value. Fix comparison
2100 of strings differing in length.
2101
92f33540 21022009-03-30 Robert Millan <rmh@aybabtu.com>
2103
2104 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2105 checking for abi version. Improve error messages on BIOS to notify
2106 user about `linux16' command.
2107
a8c48fd5 21082009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2109
f968172e 2110 Leak fixes
a8c48fd5 2111
f968172e 2112 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2113 in case of collision
2114 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 2115
9c323f09 21162009-03-29 Robert Millan <rmh@aybabtu.com>
2117
2118 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2119 set `vid_mode' accordingly.
2120 (grub_linux_boot): Process `vid_mode' and set video mode.
2121
ae68f423 21222009-03-29 Robert Millan <rmh@aybabtu.com>
2123
2124 * util/grub.d/10_linux.in (linux_entry): New function.
2125 Factorize generation of Linux boot entries.
2126
5709cfc4 21272009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2128
2129 Make the format of Environment Block plain text. The boot loader
2130 part is not tested well yet.
7dd4a573 2131
5709cfc4 2132 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2133 (buffer): Removed.
2134 (envblk): Likewise.
2135 (usage): Remove "info" and "clear". Add "unset". Update the
2136 description of "set", as this does not delete variables any
2137 longer.
2138 (create_envblk_file): Complete rewrite.
2139 (open_envblk_file): Likewise.
2140 (cmd_info): Removed.
2141 (cmd_list): Likewise.
2142 (cmd_set): Likewise.
2143 (cmd_clear): Likewise.
2144 (list_variables): New function.
2145 (write_envblk): Likewise.
2146 (set_variables): Likewise.
2147 (unset_variables): Likewise.
2148 (main): Complete rewrite.
2149
2150 * commands/loadenv.c (buffer): Removed.
2151 (envblk): Likewise.
2152 (open_envblk_file): New function.
2153 (read_envblk_file): Complete rewrite.
2154 (grub_cmd_load_env): Likewise.
2155 (grub_cmd_list_env): Likewise.
2156 (struct blocklist): New struct.
2157 (free_blocklists): New function.
2158 (check_blocklists): Likewise.
2159 (write_blocklists): Likewise.
2160 (grub_cmd_save_env): Complete rewrite.
2161
2162 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2163 a plain text signature.
2164 (GRUB_ENVBLK_MAXLEN): Removed.
2165 (struct grub_envblk): Complete rewrite.
2166 (grub_envblk_find): Removed.
2167 (grub_envblk_insert): Likewise.
2168 (grub_envblk_open): New prototype.
2169 (grub_envblk_set): Likewise.
2170 (grub_envblk_delete): Put const to VALUE.
2171 (grub_envblk_iterate): Put const to NAME and VALUE.
2172 (grub_envblk_close): New prototype.
2173 (grub_envblk_buffer): New inline function.
2174 (grub_envblk_size): Likewise.
2175
2176 * lib/envblk.c: Include grub/mm.h.
2177 (grub_env_find): Removed.
2178 (grub_envblk_open): New function.
2179 (grub_envblk_close): Likewise.
2180 (escaped_value_len): Likewise.
2181 (find_next_line): Likewise.
2182 (grub_envblk_insert): Removed.
2183 (grub_envblk_set): New function.
2184 (grub_envblk_delete): Complete rewrite.
2185 (grub_envblk_iterate): Likewise.
2186
a9368fd3 21872009-03-28 Robert Millan <rmh@aybabtu.com>
2188
2189 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2190 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2191 variables. Use 16-bit loader.
2192 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2193 loader.
2194 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2195 (grub_linux16_boot): ... this. Update all users.
2196 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2197 (grub_linux_boot): ... this. Update all users.
2198
2199 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2200 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2201 commands to `linux16' and `initrd16'.
2202 (GRUB_MOD_FINI(linux)): Rename to ...
2203 (GRUB_MOD_FINI(linux16)): ... this.
2204
e4dd5a7e 22052009-03-24 Pavel Roskin <proski@gnu.org>
2206
2207 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2208 not just for compilation.
2209
c04d6e05 22102009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2211
2212 Move multiboot helper out of kernel
2213
2214 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2215 `loader/i386/multiboot_helper.S'.
2216 * conf/i386-coreboot.rmk: Likewise
2217 * conf/i386-ieee1275.rmk: Likewise
2218
2219 * kern/i386/loader.S: Move multiboot helpers from here...
2220 * loader/i386/multiboot_helper.S: ...moved here
2221 * include/grub/i386/loader.h: Move declarations of multiboot
2222 helpers from here...
2223 * include/grub/i386/multiboot.h: ...moved here
2224 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2225
42a5b3fc 22262009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2227
2228 * kern/env.c (grub_env_context_open): Added an argument to specify
2229 whether a new context inherits exported variables from current
2230 one. This is useful when making a sandbox to interpret a config
2231 file.
2232 All callers updated.
2233
2234 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2235
b28bbc4e 22362009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2237
2238 * kern/env.c (grub_env_context_close): Fix memory leaks.
2239
f04f02e4 22402009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2241
2242 * normal/main.c (grub_normal_execute): Added an argument
2243 BATCH to specify if an interactive interface should be provided
2244 after reading a config file.
2245 All callers updated.
2246 (read_command_list): Prevent being executed twice.
2247 (read_fs_list): Likewise.
2248
42a5b3fc 2249 * include/grub/normal.h (grub_normal_execute): Updated the
2250 prototype.
f04f02e4 2251
41473ac2 22522009-03-22 Pavel Roskin <proski@gno.org>
2253
fbc00b0c 2254 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2255 _start.
2256 * kern/i386/pc/startup.S: Likewise.
2257 * kern/i386/efi/startup.S: Likewise.
2258 * kern/i386/ieee1275/startup.S: Likewise.
2259 * kern/i386/coreboot/startup.S: Likewise.
2260 * kern/x86_64/efi/startup.S: Likewise.
2261
41473ac2 2262 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2263 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2264 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2265
2274cc8f 22662009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2267
2268 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2269
2270 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2271 limit detection.
2272 Use vaddr of correct segment for entry_point.
2273
b1b797cb 22742009-03-21 Bean <bean123ch@gmail.com>
2275
2276 * commands/blocklist.c: Add include file <grub/command.h>, remove
2277 <grub/normal.h> and <grub/arg.h>.
2278 (grub_cmd_blocklist): Use the new command interface.
2279 (GRUB_MOD_INIT): Likewise.
2280 (GRUB_MOD_FINI): Likewise.
2281 * commands/boot.c: Likewise.
2282 * commands/cat.c: Likewise.
2283 * commands/cmp.c: Likewise.
2284 * commands/configfile.c: Likewise.
2285 * commands/crc.c: Likewise.
2286 * commands/echo.c: Likewise.
2287 * commands/halt.c: Likewise.
2288 * commands/handler.c: Likewise.
2289 * commands/hdparm.c: Likewise.
2290 * commands/help.c: Likewise.
2291 * commands/hexdump.c: Likewise.
2292 * commands/loadenv.c: Likewise.
2293 * commands/ls.c: Likewise.
2294 * commands/lsmmap.c: Likewise.
2295 * commands/lspci.c: Likewise.
2296 * commands/loadenv.c: Likewise.
2297 * commands/read.c: Likewise.
2298 * commands/reboot.c: Likewise.
2299 * commands/search.c: Likewise.
2300 * commands/sleep.c: Likewise.
2301 * commands/test.c: Likewise.
2302 * commands/usbtest.c: Likewise.
2303 * commands/videotest.c: Likewise.
2304 * commands/i386/cpuid.c: Likewise.
2305 * commands/i386/pc/halt.c: Likewise.
2306 * commands/i386/pc/play.c: Likewise.
2307 * commands/i386/pc/pxecmd.c: Likewise.
2308 * commands/i386/pc/vbeinfo.c: Likewise.
2309 * commands/i386/pc/vbetest.c: Likewise.
2310 * commands/ieee1275/suspend.c: Likewise.
2311 * disk/loopback.c: Likewise.
2312 * font/font_cmd.c: Likewise.
2313 * hello/hello.c: Likewise.
2314 * loader/efi/appleloader.c: Likewise.
2315 * loader/efi/chainloader.c: Likewise.
2316 * loader/i386/bsd.c: Likewise.
2317 * loader/i386/efi/linux.c: Likewise.
2318 * loader/i386/ieee1275/linux.c: Likewise.
2319 * loader/i386/linux.c: Likewise.
2320 * loader/i386/pc/chainloader.c: Likewise.
2321 * loader/i386/pc/linux.c: Likewise.
2322 * loader/powerpc/ieee1275/linux.c: Likewise.
2323 * loader/multiboot_loader.c: Likewise.
2324 * term/gfxterm.c: Likewise.
2325 * term/i386/pc/serial.c: Likewise.
2326 * term/terminfo.c: Likewise.
2327
2328 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2329 * term/i386/pc/vga.c: Likewise.
2330 * video/readers/jpeg.c: Likewise.
2331 * video/readers/png.c: Likewise.
2332 * video/readers/tga.c: Likewise.
2333
2334 * util/grub-fstest (cmd_loopback): Removed.
2335 (cmd_blocklist): Likewise.
2336 (cmd_ls): Likewise.
2337 (grub_register_command): Likewise.
2338 (grub_unregister_command): Likewise.
2339 (execute_command): Use grub_command_find to locate command and execute
2340 it.
2341
2342 * include/grub/efi/chainloader.h: Removed.
2343 * loader/efi/chainloader_normal.c: Likewise.
2344 * loader/i386/bsd_normal.c: Likewise.
2345 * loader/i386/pc/chainloader_normal.c: Likewise.
2346 * loader/i386/pc/multiboot_normal.c: Likewise.
2347 * loader/linux_normal.c: Likewise.
2348 * loader/multiboot_loader_normal.c: Likewise.
2349 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2350
2351 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2352 and grub_register_command_p1.
2353
2354 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2355 kern/command.c, lib/arg.c and commands/extcmd.c.
2356 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2357 (minicmd_mod_SOURCES): New variable.
2358 (minicmd_mod_CFLAGS): Likewise.
2359 (minicmd_mod_LDFLAGS): Likewise.
2360 (extcmd_mod_SOURCES): Likewise.
2361 (extcmd_mod_CFLAGS): Likewise.
2362 (extcmd_mod_LDFLAGS): Likewise.
2363 (boot_mod_SOURCES): Removed.
2364 (boot_mod_CFLAGS): Likewise.
2365 (boot_mod_LDFLAGS): Likewise.
2366
2367 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2368 kern/corecmd.c.
2369 (kernel_img_HEADERS): Add command.h.
2370 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2371 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2372 and lib/arg.c.
2373 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2374 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2375 remove the corresponding normal mode command.
2376 (normal_mod_SOURCES): Remove normal/arg.c.
2377 * conf/i386-coreboot.rmk: Likewise.
2378 * conf/i386-efi.rmk: Likewise.
2379 * conf/i386-ieee1275.rmk: Likewise.
2380 * conf/powerpc-ieee1275.rmk: Likewise.
2381 * conf/x86_64-efi.rmk: Likewise.
2382
2383 * include/grub/arg.h: Move from here ...
2384 * include/grub/lib/arg.h: ... to here.
2385
2386 * normal/arg.c: Move from here ...
2387 * lib/arg.c: ... to here.
2388
2389 * commands/extcmd.c: New file.
2390 * commands/minicmd.c: Likewise.
2391 * include/grub/command.h: Likewise.
2392 * include/grub/extcmd.h: Likewise.
2393 * kern/command.c: Likewise.
2394 * kern/corecmd.c: Likewise.
2395
2396 * kern/list.c (grub_list_iterate): Return int instead of void.
2397 (grub_list_insert): New function.
2398 (grub_prio_list_insert): Likewise.
2399
2400 * kern/rescue.c (grub_rescue_command): Removed.
2401 (grub_rescue_command_list): Likewise.
2402 (grub_rescue_register_command): Likewise.
2403 (grub_rescue_unregister_command): Likewise.
2404 (grub_rescue_cmd_boot): Move to minicmd.c
2405 (grub_rescue_cmd_help): Likewise.
2406 (grub_rescue_cmd_info): Likewise.
2407 (grub_rescue_cmd_boot): Likewise.
2408 (grub_rescue_cmd_testload): Likewise.
2409 (grub_rescue_cmd_dump): Likewise.
2410 (grub_rescue_cmd_rmmod): Likewise.
2411 (grub_rescue_cmd_lsmod): Likewise.
2412 (grub_rescue_cmd_exit): Likewise.
2413 (grub_rescue_print_devices): Moved to corecmd.c.
2414 (grub_rescue_print_files): Likewise.
2415 (grub_rescue_cmd_ls): Likewise.
2416 (grub_rescue_cmd_insmod): Likewise.
2417 (grub_rescue_cmd_set): Likewise.
2418 (grub_rescue_cmd_unset): Likewise.
7d074e3c 2419 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 2420 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 2421 commands, remove grub_rescue_register_command calls.
b1b797cb 2422
7d074e3c 2423 * normal/command.c (grub_register_command): Removed.
b1b797cb 2424 (grub_unregister_command): Likewise.
2425 (grub_command_find): Likewise.
2426 (grub_iterate_commands): Likewise.
2427 (rescue_command): Likewise.
2428 (export_command): Moved to corecmd.c.
2429 (set_command): Removed.
2430 (unset_command): Likewise.
2431 (insmod_command): Likewise.
2432 (rmmod_command): Likewise.
2433 (lsmod_command): Likewise.
2434 (grub_command_init): Likewise.
2435
2436 * normal/completion.c (iterate_command): Use cmd->prio to check for
2437 active command.
2438 (complete_arguments): Use grub_extcmd_t structure to find options.
2439 (grub_normal_do_completion): Change function grub_iterate_commands to
2440 grub_command_iterate.
2441
2442 * normal/execute.c (grub_script_execute_cmd): No need to parse
2443 argument here.
2444
2445 * normal/main.c (grub_dyncmd_dispatcher): New function.
2446 (read_command_list): Register unload commands as dyncmd.
2447 (grub_cmd_normal): Use new command interface, register rescue,
2448 unregister normal at entry, register normal, unregister rescue at exit.
2449
2450 * include/grub/list.h (grub_list_test_t): New type.
2451 (grub_list_iterate): Return int instead of void.
2452 (grub_list_insert): New function.
2453 (GRUB_AS_NAMED_LIST_P): New macro.
2454 (GRUB_AS_PRIO_LIST): Likewise.
2455 (GRUB_AS_PRIO_LIST_P): Likewise.
2456 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2457 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2458 (grub_prio_list): New structure.
2459 (grub_prio_list_insert): New function.
2460 (grub_prio_list_remove): New inline function.
2461
2462 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2463 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2464 (GRUB_COMMAND_FLAG_MENU): Likewise.
2465 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2466 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2467 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2468 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2469 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2470 (grub_command): Likewise.
2471 (grub_register_command): Likewise.
2472 (grub_command_find): Likewise.
2473 (grub_iterate_commands): Likewise.
2474 (grub_command_init): Likewise.
2475 (grub_arg_parse): Likewise.
2476 (grub_arg_show_help): Likewise.
2477
2478 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2479 (grub_rescue_unregister_command): Likewise.
2480
2481 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2482 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2483 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2484
2485 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2486 grub_rescue_cmd_initrd.
2487 * include/grub/i386/loader.h: Likewise.
2488 * include/grub/x86_64/loader.h: Likewise.
2489
2490 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2491
1f4147aa 24922009-03-21 Bean <bean123ch@gmail.com>
2493
2494 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2495 instead of stat in mingw environment.
2496
2497 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2498
2499 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2500
2501 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2502 AC_CONFIG_LINKS.
2503
2156d5ba 25042009-03-21 Bean <bean123ch@gmail.com>
2505
2506 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2507 out of range error.
2508
177b82ca 25092009-03-18 Michel Dänzer <michel@daenzer.net>
2510
2511 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2512 checking inode flags for EXT4_EXTENTS_FLAG.
2513
14aad807 25142009-03-18 Robert Millan <rmh@aybabtu.com>
2515
2516 * loader/i386/linux.c: Include `<grub/video.h>' and
2517 `<grub/i386/pc/vbe.h>'..
2518 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2519 (grub_linux32_boot): Attempt to configure video settings with
2520 grub_linux_setup_video().
2521 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2522 to avoid grub_console_fini() which would step out of graphical mode
2523 unconditionally.
2524
8cf83a27 25252009-03-14 Robert Millan <rmh@aybabtu.com>
2526
2527 Fix build on powerpc.
2528 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2529
40164e75 25302009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2531
2532 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2533 background image command.
2534
c58bc32a 25352009-03-12 Colin D Bennett <colin@gibibit.com>
2536
2537 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2538 (grub_gfxterm_putchar): Extract pairs of identical calls to
2539 draw_cursor out of conditional blocks.
2540
5415144a 25412009-03-11 Pavel Roskin <proski@gnu.org>
2542
2543 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2544 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2545
6394042e 25462009-03-11 Robert Millan <rmh@aybabtu.com>
2547
2548 * loader/i386/multiboot_elfxx.c
2549 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2550
b7b50e5f 25512009-03-11 Felix Zielcke <fzielcke@z-51.de>
2552
2553 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2554 `kern/handler.c'.
2555
1ca7fc96 25562009-03-11 Robert Millan <rmh@aybabtu.com>
2557
2558 * loader/i386/multiboot.c (code_size): New variable.
2559 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 2560 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 2561 4-byte alignment to MBI and others by increasing
7d074e3c 2562 `boot_loader_name_length' appropriately.
1ca7fc96 2563
2564 * loader/i386/multiboot_elfxx.c
2565 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2566
a83ea1d2 25672009-03-09 Felix Zielcke <fzielcke@z-51.de>
2568
2569 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2570 `fs/ext2.c'.
2571
aa9f3bff 25722009-03-08 Robert Millan <rmh@aybabtu.com>
2573
2574 Make loader/i386/linux.c usable on i386-pc again.
2575
2576 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2577 memory to heap.
2578 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2579 `#error' stanza.
2580
d8b3b60e 25812009-03-07 Bean <bean123ch@gmail.com>
2582
2583 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2584 allocation.
2585
b362c9e9 25862009-03-06 Robert Millan <rmh@aybabtu.com>
2587
2588 Fix display issue on terminals with screen size other than 80x25
2589 (e.g. gfxterm with resolution higher than 640x480).
2590
2591 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 2592 position relative to the center of the terminal instead of relying
b362c9e9 2593 on a hardcoded offset.
2594
9304eef1 25952009-03-04 Robert Millan <rmh@aybabtu.com>
2596
2597 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2598 installed.
2599
2600 * Makefile.in (host_kernel): New variable.
2601 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2602 scripts instead of just the windows one.
2603 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2604
eabc95fb 26052009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 2606
2607 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2608 `kern/handler.c'.
2609 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2610 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2611 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2612 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2613 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2614 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2615
ceb1223c 26162009-03-04 Felix Zielcke <fzielcke@z-51.de>
2617
2618 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2619 or if there's no space for the disk label and print the partition number on a
2620 invalid magic.
2621
4910684a 26222009-03-04 Felix Zielcke <fzielcke@z-51.de>
2623
2624 * util/misc.c: Include <time.h>.
2625 (grub_millisleep): New function.
2626
7e9ca17a 26272009-03-04 Bean <bean123ch@gmail.com>
2628
2629 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2630 another option -mno-red-zone.
2631
2632 * commands/handler.c: Change module description.
2633
2634 * kern/handler.c: Add missing space at the end of description line.
2635
2636 * kern/list.c: Likewise.
2637
f501677c 26382009-03-03 Robert Millan <rmh@aybabtu.com>
2639
2640 Move more components to the relocation area, and fix mbi pointer
2641 handling to use the destination rather than the origin (thanks to
2642 Vladimir Serbinenko for spotting).
2643
2644 * loader/i386/multiboot.c (mbi_dest): New variable.
2645 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2646 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2647 relocation area.
2648
9902d047 26492009-03-01 Bean <bean123ch@gmail.com>
2650
50fb7002 2651 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 2652 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2653 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2654 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2655
2656 * loader/i386/efi/linux.c (acpi_guid): New variable.
2657 (acpi_guid): Likewise.
2658 (EBDA_SEG_ADDR): New constant.
2659 (LOW_MEM_ADDR): Likewise.
2660 (FAKE_EBDA_SEG): Likewise.
2661 (fake_bios_data): New function.
2662 (grub_linux_boot): Call fake_bios_data.
2663
71b9f361 26642009-03-01 Bean <bean123ch@gmail.com>
2665
2666 * commands/terminal.c: Removed.
2667
2668 * commands/handler.c: New file.
2669
2670 * include/grub/list.h: Likewise.
2671
2672 * include/grub/handler.h: Likewise.
2673
2674 * kern/list.c: Likewise.
2675
2676 * kern/handler.c: Likewise.
2677
2678 * kern/term.h: Include header file <grub/handler.h>.
2679 (grub_term_input): Move next field to the beginning.
2680 (grub_term_output): Likewise.
2681 (grub_term_input_class): New variable.
2682 (grub_term_output_class): Likewise.
2683 (grub_term_register_input): Changed to inline function.
2684 (grub_term_register_output): Likewise.
2685 (grub_term_unregister_input): Likewise.
2686 (grub_term_unregister_output): Likewise.
2687 (grub_term_set_current_input): Likewise.
2688 (grub_term_set_current_output): Likewise.
2689 (grub_term_get_current_input): Likewise.
2690 (grub_term_get_current_output): Likewise.
2691 (grub_term_iterate_input): Removed.
2692 (grub_term_iterate_output): Likewise.
2693
2694 * kern/term.c (grub_term_list_input): Removed.
2695 (grub_term_list_output): Likewise.
2696 (grub_term_input_class): New variable.
2697 (grub_term_output_class): Likewise.
50fb7002 2698 (grub_cur_term_input): Change variable as macro.
71b9f361 2699 (grub_cur_term_output): Likewise.
2700 (grub_term_register_input): Removed.
2701 (grub_term_register_output): Likewise.
2702 (grub_term_unregister_input): Likewise.
2703 (grub_term_unregister_output): Likewise.
2704 (grub_term_set_current_input): Likewise.
2705 (grub_term_set_current_output): Likewise.
2706 (grub_term_iterate_input): Likewise.
2707 (grub_term_iterate_output): Likewise.
2708 (grub_term_get_current_input): Likewise.
2709 (grub_term_get_current_output): Likewise.
2710
2711 * util/grub-editenv.c: Include header file <grub/handler.h>.
2712 (grub_term_get_current_input): Removed.
2713 (grub_term_get_current_output): Likewise.
2714 (grub_term_input_class): New variable.
50fb7002 2715 (grub_term_output_class): Likewise.
71b9f361 2716
2717 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2718 (grub_term_get_current_output): Likewise.
2719 (grub_term_input_class): New variable.
50fb7002 2720 (grub_term_output_class): Likewise.
71b9f361 2721
2722 * util/grub-probe.c (grub_term_get_current_input): Removed.
2723 (grub_term_get_current_output): Likewise.
2724 (grub_term_input_class): New variable.
50fb7002 2725 (grub_term_output_class): Likewise.
71b9f361 2726
2727 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2728 (grub_term_get_current_output): Likewise.
2729 (grub_term_input_class): New variable.
50fb7002 2730 (grub_term_output_class): Likewise.
71b9f361 2731
2732 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2733 (terminal_mod_SOURCES): Likewise.
2734 (terminal_mod_CFLAGS): Likewise.
2735 (terminal_mod_LDFLAGS): Likewise.
2736
2737 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2738 handler.c.
2739 (kernel_img_SOURCES): Add list.c and handler.c.
2740 (kernel_img_HEADERS): Add list.h and handler.h.
2741
2742 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2743 handler.c.
2744 (kernel_mod_SOURCES): Add list.c and handler.c.
2745 (kernel_mod_HEADERS): Add list.h and handler.h.
2746
2747 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2748 handler.c.
2749 (kernel_elf_SOURCES): Add list.c and handler.c.
2750 (kernel_elf_HEADERS): Add list.h and handler.h.
2751
2752 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2753 handler.c.
2754 (kernel_elf_SOURCES): Add list.c and handler.c.
2755 (kernel_elf_HEADERS): Add list.h and handler.h.
2756
2757 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2758 handler.c.
2759 (kernel_mod_SOURCES): Add list.c and handler.c.
2760 (kernel_mod_HEADERS): Add list.h and handler.h.
2761
2762 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2763 handler.c.
2764 (kernel_elf_SOURCES): Add list.c and handler.c.
2765 (kernel_elf_HEADERS): Add list.h and handler.h.
2766
8a31787f 27672009-02-27 Robert Millan <rmh@aybabtu.com>
2768
2769 Factorize elf32 / elf64 code in Multiboot loader. This will
2770 prevent it from getting out of sync again.
2771
2772 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2773 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2774 grub_multiboot_load_elf64): Move from here ...
2775 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2776 grub_multiboot_load_elf): ... to here (new file).
2777
51cd3dfc 27782009-02-27 Robert Millan <rmh@aybabtu.com>
2779
2780 * util/grub.d/10_linux.in: Rename "single-user mode" to
2781 "recovery mode".
2782
6e8c9c3a 27832009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2784
2785 Don't leak in SCSI code.
2786 * disk/scsi.c (grub_scsi_close): free `scsi'.
2787
4b6bf4f9 27882009-02-27 Robert Millan <rmh@aybabtu.com>
2789
2790 * loader/i386/pc/multiboot.c: Move from here ...
2791 * loader/i386/multiboot.c: ... to here. Update all users.
2792
b9413424 27932009-02-27 Robert Millan <rmh@aybabtu.com>
2794
2795 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2796 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2797
50fb7002 27982009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 2799
2800 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2801 b-tree.
2802
8cc50345 28032009-02-27 Robert Millan <rmh@aybabtu.com>
2804
2805 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2806 `0x' qualifier as 0 when base is specified as parameter).
2807
6e09b8b7 28082009-02-24 Bean <bean123ch@gmail.com>
2809
2810 * configure.ac: Check for -mcmodel=large in x86_64 target.
2811
2812 * include/grub/efi/api.h (efi_call_10): New macro.
2813 (efi_wrap_10): New function.
2814
2815 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2816 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2817 (GRUB_PE32_REL_BASED_LOW): Likewise.
2818 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2819 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2820 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2821 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2822 (GRUB_PE32_REL_BASED_REL): Likewise.
2823 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2824 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2825 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2826
2827 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2828 issue.
2829
2830 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2831 (efi_wrap_10): New function.
2832
2833 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2834
2835 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2836 MB/MBP model (NV chipset).
2837 (devdata_devs): Add devpath_5 to the list.
2838
2839 * load/i386/efi/linux.c (video_base): Remove variable.
2840 (RGB_MASK): New macro.
2841 (RGB_MAGIC): Likewise.
2842 (LINE_MIN): Likewise.
2843 (LINE_MAX): Likewise.
2844 (FBTEST_STEP): Likewise.
2845 (FBTEST_COUNT): Likewise.
2846 (fb_list): New variable.
2847 (grub_find_video_card): Remove function.
2848 (find_framebuf): New function.
2849 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2850 line length.
2851
2852 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2853 problem for x86_64.
2854
74b21bee 28552009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2856
2857 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2858
2859 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2860 coding tool name.
2861
a455f472 28622009-02-22 Robert Millan <rmh@aybabtu.com>
2863
2864 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2865 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2866 in our relocation, instead of using it directly from heap. Also
2867 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2868
6374daf3 28692009-02-21 Robert Millan <rmh@aybabtu.com>
2870
2871 Implement USB keyboard support (based on patch by Marco Gerards)
2872
2873 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2874 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2875 (usb_keyboard_mod_LDFLAGS): New variables.
2876
2877 * term/usb_keyboard.c: New file.
2878
8fa4ea70 28792009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2880
2881 Corrected wrong declaration
2882
2883 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2884
353976ac 28852009-02-14 Christian Franke <franke@computer.org>
2886
2887 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2888 (grub_lspci_iter): Print class code and programming interface byte.
2889
6aa1169b 28902009-02-14 Christian Franke <franke@computer.org>
2891
2892 * gendistlist.sh: Ignore `.svn' directories.
2893
265372ca 28942009-02-14 Felix Zielcke <fzielcke@z-51.de>
2895
2896 * fs/fat.c: Add 2009 to Copyright line.
2897
9ff516f3 28982009-02-14 Christian Franke <franke@computer.org>
2899
2900 * commands/hdparm.c: New file. Provides `hdparm' command
2901 which sends ATA commands via grub_disk_ata_pass_through ().
2902
2903 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2904
2905 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2906 and <grub/cpu/io.h> to include/grub/ata.h.
2907 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2908 (GRUB_CDROM_SECTOR_SIZE): Remove.
2909 (GRUB_ATA_*): Move to include/grub/ata.h.
2910 (GRUB_ATAPI_*): Likewise.
2911 (enum grub_ata_commands): Likewise.
2912 (enum grub_ata_timeout_milliseconds): Likewise.
2913 (struct grub_ata_device): Likewise.
2914 (grub_ata_regset): Likewise.
2915 (grub_ata_regget): Likewise.
2916 (grub_ata_regset2): Likewise.
2917 (grub_ata_regget2): Likewise.
2918 (grub_ata_check_ready): Likewise.
2919 (grub_ata_wait_not_busy): Remove static, exported in
2920 include/grub/ata.h.
2921 (grub_ata_wait_drq): Likewise.
2922 (grub_ata_pio_read): Likewise.
2923
2924 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2925 function for hdparm.mod.
2926
2927 * include/grub/ata.h: New file, contains declarations from
2928 disk/ata.c.
2929 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2930
2931 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2932 (grub_disk_ata_pass_through): New exported variable.
2933
2934 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2935
772e23da 29362009-02-13 Colin D Bennett <colin@gibibit.com>
2937
2938 Support multiple fallback entries, and provide an API to support
2939 executing default+fallback menu entries. Renamed the `terminal' menu
2940 viewer to `text'.
2941
2942 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2943 variable declaration.
2944 (grub_menu_execute_callback): New structure declaration.
2945 (grub_menu_execute_callback_t): New typedef.
2946 (grub_menu_execute_with_fallback): New function declaration.
2947 (grub_menu_get_entry): Likewise.
2948 (grub_menu_get_timeout): Likewise.
2949 (grub_menu_set_timeout): Likewise.
2950
2951 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2952
2953 * normal/menu.c (grub_wait_after_message): Moved to
2954 `normal/menu_text.c'.
2955 (draw_border): Likewise.
2956 (print_message): Likewise.
2957 (print_entry): Likewise.
2958 (print_entries): Likewise.
2959 (grub_menu_init_page): Likewise.
2960 (get_entry_number): Likewise.
2961 (print_timeout): Likewise.
2962 (run_menu): Likewise.
2963 (grub_menu_execute_entry): Likewise.
2964 (show_text_menu): Likewise.
2965 (get_and_remove_first_entry_number): New function.
2966 (grub_menu_execute_with_fallback): Likewise.
2967 (get_entry): Renamed to ...
2968 (grub_menu_get_entry): .. this and made it global.
2969 (get_timeout): Renamed to ...
2970 (grub_menu_get_timeout): ... this and made it global.
2971 (set_timeout): Renamed to ...
2972 (grub_menu_set_timeout): ... this and made it global.
2973 (grub_normal_terminal_menu_viewer): Renamed to ...
2974 (grub_normal_text_menu_viewer): ... this.
2975
2976 * normal/menu_text.c: New file. Extracted text-menu-specific code
2977 from normal/menu.c.
2978
2979 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2980 (normal_mod_SOURCES): Likewise.
2981
2982 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2983 (normal_mod_SOURCES): Likewise.
2984
2985 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2986 (normal_mod_SOURCES): Likewise.
2987
2988 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2989 (normal_mod_SOURCES): Likewise.
2990
2991 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2992 (normal_mod_SOURCES): Likewise.
2993
2994 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2995 (normal_mod_SOURCES): Likewise.
2996
2997 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2998 (normal_mod_SOURCES): Likewise.
2999
16ac430e 30002009-02-11 Robert Millan <rmh@aybabtu.com>
3001
3002 * util/grub.d/00_header.in: Update old reference to `font' command.
3003
06ff20fc 30042009-02-10 Felix Zielcke <fzielcke@z-51.de>
3005
3006 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3007
3008 Based on patch from Javier Martín.
3009
96da9407 30102009-02-09 Felix Zielcke <fzielcke@z-51.de>
3011
3012 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3013 to avoid false positives with FAT.
96da9407 3014 (grub_fstest_SOURCES): Likewise.
3015 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3016 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3017 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3018 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3019 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3020 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3021
6dca6fe4 30222009-02-09 Felix Zielcke <fzielcke@z-51.de>
3023
06ff20fc 3024 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3025 bpb.version_specific.fat12_or_fat16.fstype and
3026 bpb.version_specific.fat32.fstype.
3027
2550c62f 30282009-02-08 Robert Millan <rmh@aybabtu.com>
3029
be110b30 3030 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3031
56978920 30322009-02-08 Robert Millan <rmh@aybabtu.com>
3033
3034 * Makefile.in (host_os, host_cpu): New variables.
3035 (target_os): Remove. Update all users.
3036
d64399b5 30372009-02-08 Marco Gerards <marco@gnu.org>
3038
3039 * Makefile.in (enable_grub_emu_usb): New variable.
3040 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3041 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3042 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3043 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3044 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3045 `usbtest.mod' and `usbms.mod'.
3046 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3047 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3048 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3049 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3050 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3051 variables.
3052
3053 * disk/usbms.c: New file.
3054
3055 * include/grub/usb.h: Likewise.
3056
3057 * include/grub/usbtrans.h: Likewise.
3058
3059 * include/grub/usbdesc.h: Likewise.
3060
3061 * bus/usb/usbtrans.c: Likewise.
3062
3063 * bus/usb/ohci.c: Likewise.
3064
3065 * bus/usb/uhci.c: Likewise.
3066
3067 * bus/usb/usbhub.c: Likewise.
3068
3069 * bus/usb/usb.c: Likewise.
3070
3071 * commands/usbtest.c: Likewise.
3072
3073 * util/usb.c: Likewise.
50fb7002 3074
d64399b5 3075 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3076
3077 * configure.ac: Test for libusb presence.
50fb7002 3078
d64399b5 3079 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3080
2b40d6bb 30812009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3082
3083 * kern/mm.c: Add more comments.
3084
73a4ce81 30852009-02-08 Robert Millan <rmh@aybabtu.com>
3086
3087 Patch from Javier Martín.
3088 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3089 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3090
f821ce59 30912009-02-08 Robert Millan <rmh@aybabtu.com>
3092
3093 * fs/cpio.c: Split tar functionality to ...
3094 * fs/tar.c: ... here (new file). Update all users.
3095
aebfc4b0 30962009-02-07 Robert Millan <rmh@aybabtu.com>
3097
3098 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3099 backward-incompatible features.
3100
3101 Based on patch from Javier Martín, with some adjustments.
3102
50fb7002 31032009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 3104
3105 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3106
0bb5115e 31072009-02-07 Robert Millan <rmh@aybabtu.com>
3108
3109 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3110 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3111 after the RAID stuff.
3112
38a0f8e7 31132009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3114
50fb7002 3115 Fixes problem when running vbetest command as reported by
38a0f8e7 3116 Vladimir Serbinenko <phcoder@gmail.com>.
3117
3118 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3119
3143cc1c 31202009-02-04 Felix Zielcke <fzielcke@z-51.de>
3121
3122 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3123 /dev/md/NpN style mdraid devices.
3124
9cba6fce 31252009-02-03 Felix Zielcke <fzielcke@z-51.de>
3126
3127 * util/unifont2pff.rb: Remove.
3128
e507a2c1 31292009-02-03 Felix Zielcke <fzielcke@z-51.de>
3130
3131 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3132 `#'.
3133
d2c2b4cd 31342009-02-03 Felix Zielcke <fzielcke@z-51.de>
3135
3136 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3137 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3138 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3139 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3140 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3141 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3142 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3143
b4315fb0 31442009-02-02 Christian Franke <franke@computer.org>
3145
3146 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3147
de3aa260 31482009-02-01 Felix Zielcke <fzielcke@z-51.de>
3149
7c3ff286 3150 * INSTALL: Note that we now require at least autoconf 2.59 and
3151 that LZO is optional.
de3aa260 3152
825a182b 31532009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3154
3155 Base on patch on bug #24154 created by Tomas Tintera
3156 <trosos@seznam.cz>.
3157
3158 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3159
a69ef770 31602009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3161
7c3ff286 3162 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 3163 <bero@arklinux.org>.
3164
3165 * normal/parser.y (script_init): Add missing semicolon.
3166
6fa42fa6 31672009-01-31 Colin D Bennett <colin@gibibit.com>
3168
7c3ff286 3169 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 3170 (free_menu_entry_classes): Added.
3171 (grub_normal_menu_addentry): Added class property handling.
3172 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3173 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3174
3175 * normal/menu_viewer.c: New file.
3176
3177 * normal/menu.c (run_menu_entry): Renamed to ...
3178 (grub_menu_execute_entry): ... this and made it as global.
3179 (grub_menu_run): Renamed to ...
3180 (show_text_menu): ... this and made it local.
3181 (show_text_menu): Adapt to new function names.
3182 (grub_normal_terminal_menu_viewer): New global variable.
3183
3184 * include/grub/menu.h: New file.
3185
3186 * include/grub/menu_viewer.h: New file.
3187
3188 * include/grub/normal.h: Added include to grub/menu.h.
3189 (grub_menu_entry): Moved to include/grub/menu.h.
3190 (grub_menu_entry_t): Likewise.
3191 (grub_menu): Likewise.
3192 (grub_menu_t): Likewise.
3193 (grub_normal_terminal_menu_viewer): Added.
3194 (grub_menu_execute_entry): Likewise.
3195 (grub_menu_run): Removed.
3196
3197 * DISTLIST: Added include/grub/menu.h.
3198 Added include/grub/menu_viewer.h.
3199 Added normal/menu_viewer.c.
3200
32012009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3202
3203 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3204 arglist for menutitle arguments.
3205
3206 * normal/main.c (grub_normal_menu_addentry): Likewise.
3207
3208 * normal/parser.y (menuentry): Likewise.
3209
3210 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3211
3212 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3213 (grub_script_create_cmdmenu): Likewise.
3214
3215 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3216
3217 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3218 changes.
3219
3220 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3221
3222 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3223
3224 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3225
3226 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3227
3228 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3229
3230 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3231
56192c23 32322009-01-30 Christian Franke <franke@computer.org>
3233
3234 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3235 in option help text.
3236
d72521b3 32372009-01-27 Pavel Roskin <proski@gnu.org>
3238
3239 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3240
994b5e84 32412009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3242
3243 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3244
3245 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3246
3247 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3248 unregister function.
3249
6a7eab2c 32502009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3251
3252 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3253
3254 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3255
3256 * util/grub-mkfont.c (usage): Fix typo.
3257
3258 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3259
1806b56e 32602009-01-26 Daniel Mierswa <impulze@impulze.org>
3261
3fb18f09 3262 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3263
336e1fb9 3264 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3265
1806b56e 3266 * kern/misc.c (grub_strcasecmp): New function.
3267 (grub_strcasecmp): Use grub_size_t instead of int for length.
3268 Fix return value.
3269 * include/grub/misc.h: Update function prototypes.
3270
580b2a0f 32712009-01-26 Robert Millan <rmh@aybabtu.com>
3272
3273 * configure.ac: Fix cross-compilation check.
ef257b36 3274
d31c24f1 32752009-01-22 Christian Franke <franke@computer.org>
3276
3277 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3278 (precision) digit string. Allow `.format2' without `format1' (width).
3279 Limit input chars for `%s' output to `format2' if specified. This is
3280 compatible with standard printf ().
3281
3138b44c 32822009-01-22 Christian Franke <franke@computer.org>
3283
3284 * disk/ata.c (grub_ata_wait_status): Replace by ...
3285 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3286 other status bits may be invalid while BSY is asserted.
3287 (grub_ata_check_ready): New function.
3288 (grub_ata_cmd): Removed.
3289 (grub_ata_wait_drq): New function.
3290 (grub_ata_strncpy): Remove inline.
3291 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3292 and error check now done by grub_ata_wait_drq ().
3293 (grub_ata_pio_write): Likewise.
3294 (grub_atapi_identify): Set DEV before check for !BSY. Use
3295 grub_ata_wait_drq () to wait for data.
3296 (grub_ata_device_initialize): Add status register check to
3297 detect missing SATA slave devices. Add debug messages.
3298 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3299 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3300 transfer loop by grub_ata_pio_write ().
3301 (grub_ata_identify): Set DEV before check for !BSY. Use
3302 grub_ata_wait_drq () to wait for data.
ef257b36 3303 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 3304 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3305 read/write in one loop. Fix invalid command on write. Fix incomplete
3306 command on (size % batch) == 0. Add missing error check after write of
3307 last block. Add debug messages.
3308 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3309
59a64ef6 33102009-01-19 Christian Franke <franke@computer.org>
3311
3312 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3313 (GRUB_ATAPI_IREASON_*): Likewise.
3314 (grub_ata_pio_write): Fix timeout error return.
3315 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3316 (grub_atapi_wait_drq): New function.
3317 (grub_atapi_packet): New parameter `size'.
3318 Use grub_atapi_wait_drq () and direct write instead of
3319 grub_ata_pio_write ().
3320 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3321 reads the number of bytes requested by the device for each DRQ
3322 assertion.
3323 (grub_atapi_write): Remove old implementation, return not
3324 implemented instead.
3325
1cfe20b3 33262009-01-19 Christian Franke <franke@computer.org>
3327
3328 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3329 of 512 to calculate data size.
3330 (grub_scsi_read12): Likewise.
3331 (grub_scsi_write10): Likewise.
3332 (grub_scsi_write12): Likewise.
3333 (grub_scsi_read): Adjust size according to blocksize.
3334 Add checks for invalid blocksize and unaligned transfer.
3335
bee5fe5d 33362009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3337
3338 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3339
ef257b36 3340 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 3341 width glyphs.
3342
3e643f8c 33432009-01-19 Robert Millan <rmh@aybabtu.com>
3344
3345 * config.guess: Update to latest version from config git.
3346 * config.sub: Likewise.
3347
4fa80998 33482009-01-17 Felix Zielcke <fzielcke@z-51.de>
3349
3350 * Makefile.in: Change font compilation to use new grub-mkfont instead
3351 of java version.
3352
3353 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3354 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3355 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3356 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3357 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3358 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3359 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3360 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3361 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3362
7086085b 33632009-01-16 Christian Franke <franke@computer.org>
3364
3365 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3366 (enum grub_ata_timeout_milliseconds): New enum.
3367 (grub_ata_wait_status): Add parameter milliseconds.
3368 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3369 recovery from timed-out commands.
3370 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3371 return grub_errno instead of REG_ERROR.
3372 (grub_ata_pio_write): Add parameter milliseconds.
3373 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3374 Pass milliseconds to grub_ata_wait_status () and
3375 grub_ata_pio_read ().
3376 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3377 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3378 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3379 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3380 It is not suitable for device detection, because DEV bit is ignored,
3381 the command may run too long, and not all devices set the signature
3382 properly.
3383 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3384 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3385 Fix device selection, DEV bit must be set first to address the registers
3386 of the correct device.
3387 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3388 grub_ata_pio_read/write ().
3389 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3390 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3391
4a412913 33922009-01-13 Carles Pina i Estany <carles@pina.cat>
3393
3394 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3395
7795c55e 33962009-01-13 Bean <bean123ch@gmail.com>
d913988c 3397
3398 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3399
7795c55e 34002009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 3401
3402 * Makefile.in: (enable_grub_mkfont): New variable.
3403 (freetype_cflags): Likewise.
3404 (freetype_libs): Likewise.
3405
3406 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3407 (grub_mkfont_SOURCES): New variable.
3408 (grub_mkfont_CFLAGS): Likewise.
3409 (grub_mkfont_LDFLAGS): Likewise.
3410
3411 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3412 library if `--enable-grub-mkfont' is requested.
3413 (enable_grub_mkfont): New variable.
3414 (freetype_cflags): Likewise.
3415 (freetype_libs): Likewise.
3416
3417 * util/grub-mkfont.c: New file.
3418
093af1fe 34192009-01-12 Christian Franke <franke@computer.org>
3420
3421 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3422 mode check. Fix setting of compat_use[].
3423
f36cc108 34242009-01-10 Robert Millan <rmh@aybabtu.com>
3425
3426 Update a few copyright years which we forgot to do in 2008 (only for
3427 files whose changes made in 2008 were copyright-significant)
3428
3429 * Makefile.in: Add 2008 to Copyright line.
3430 * disk/ieee1275/ofdisk.c: Likewise.
3431 * disk/efi/efidisk.c: Likewise.
3432 * kern/dl.c: Likewise.
3433 * kern/sparc64/ieee1275/init.c: Likewise.
3434 * kern/mm.c: Likewise.
3435 * kern/efi/mm.c: Likewise.
3436 * boot/i386/pc/boot.S: Likewise.
3437 * genfslist.sh: Likewise.
3438 * fs/iso9660.c: Likewise.
3439 * fs/hfs.c: Likewise.
3440 * fs/jfs.c: Likewise.
3441 * fs/minix.c: Likewise.
3442 * fs/ufs.c: Likewise.
3443 * gensymlist.sh.in: Likewise.
3444 * genkernsyms.sh.in: Likewise.
3445 * include/grub/misc.h: Likewise.
3446 * include/grub/types.h: Likewise.
3447 * include/grub/symbol.h: Likewise.
3448 * include/grub/elf.h: Likewise.
3449 * include/grub/kernel.h: Likewise.
3450 * include/grub/disk.h: Likewise.
3451 * include/grub/dl.h: Likewise.
3452 * include/grub/i386/linux.h: Likewise.
3453 * include/grub/i386/pc/biosdisk.h: Likewise.
3454 * include/grub/efi/api.h: Likewise.
3455 * include/grub/efi/pe32.h: Likewise.
3456 * include/grub/util/misc.h: Likewise.
3457 * normal/execute.c: Likewise.
3458 * normal/arg.c: Likewise.
3459 * normal/completion.c: Likewise.
3460 * normal/lexer.c: Likewise.
3461 * normal/parser.y: Likewise.
3462 * normal/misc.c: Likewise.
3463 * commands/i386/pc/vbeinfo.c: Likewise.
3464 * commands/hexdump.c: Likewise.
3465 * commands/terminal.c: Likewise.
3466 * commands/ls.c: Likewise.
3467 * commands/help.c: Likewise.
3468 * partmap/pc.c: Likewise.
3469 * loader/efi/chainloader.c: Likewise.
3470 * loader/multiboot_loader.c: Likewise.
3471 * loader/i386/pc/multiboot2.c: Likewise.
3472 * term/efi/console.c: Likewise.
3473 * term/i386/pc/serial.c: Likewise.
3474 * util/lvm.c: Likewise.
3475 * util/console.c: Likewise.
3476 * util/i386/efi/grub-mkimage.c: Likewise.
3477 * util/raid.c: Likewise.
3478
7f02114b 34792009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3480
3481 * commands/videotest.c: Removed include to grub/machine/memory.h.
3482
3483 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3484 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3485 (video_mod_SOURCES): Removed.
3486 (video_mod_CFLAGS): Likewise.
3487 (video_mod_LDFLAGS): Likewise.
3488 (gfxterm_mod_SOURCES): Likewise.
3489 (gfxterm_mod_CFLAGS): Likewise.
3490 (gfxterm_mod_LDFLAGS): Likewise.
3491 (videotest_mod_SOURCES): Likewise.
3492 (videotest_mod_CFLAGS): Likewise.
3493 (videotest_mod_LDFLAGS): Likewise.
3494 (bitmap_mod_SOURCES): Likewise.
3495 (bitmap_mod_CFLAGS): Likewise.
3496 (bitmap_mod_LDFLAGS): Likewise.
3497 (tga_mod_SOURCES): Likewise.
3498 (tga_mod_CFLAGS): Likewise.
3499 (tga_mod_LDFLAGS): Likewise.
3500 (jpeg_mod_SOURCES): Likewise.
3501 (jpeg_mod_CFLAGS): Likewise.
3502 (jpeg_mod_LDFLAGS): Likewise.
3503 (png_mod_SOURCES): Likewise.
3504 (png_mod_CFLAGS): Likewise.
3505 (png_mod_LDFLAGS): Likewise.
3506
3507 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3508 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3509 (video_mod_SOURCES): Added.
3510 (video_mod_CFLAGS): Likewise.
3511 (video_mod_LDFLAGS): Likewise.
3512 (videotest_mod_SOURCES): Likewise.
3513 (videotest_mod_CFLAGS): Likewise.
3514 (videotest_mod_LDFLAGS): Likewise.
3515 (bitmap_mod_SOURCES): Likewise.
3516 (bitmap_mod_CFLAGS): Likewise.
3517 (bitmap_mod_LDFLAGS): Likewise.
3518 (tga_mod_SOURCES): Likewise.
3519 (tga_mod_CFLAGS): Likewise.
3520 (tga_mod_LDFLAGS): Likewise.
3521 (jpeg_mod_SOURCES): Likewise.
3522 (jpeg_mod_CFLAGS): Likewise.
3523 (jpeg_mod_LDFLAGS): Likewise.
3524 (png_mod_SOURCES): Likewise.
3525 (png_mod_CFLAGS): Likewise.
3526 (png_mod_LDFLAGS): Likewise.
3527 (gfxterm_mod_SOURCES): Likewise.
3528 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 3529 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 3530
3531 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3532 grub/machine/console.h.
3533
644fff97 35342009-01-04 Jerone Young <jerone@gmail.com>
3535
3536 Make on screen instructions clearer
3537
3538 Based on patch created by Jidanni <jidanni@jidanni.org>
3539
3540 * normal/menu.c: print clearer instructions on the screen
3541
1e901a75 35422009-01-02 Colin D Bennett <colin@gibibit.com>
3543
3544 New font engine.
34c44600 3545
1e901a75 3546 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3547 build system and fixed gfxterm.c to work with different sized fonts.
3548
3549 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 3550
1e901a75 3551 * configure: Re-generated.
34c44600 3552
1e901a75 3553 * DISTLIST: Removed font/manager.c.
3554 Added font/font.c.
3555 Added font/font_cmd.c.
34c44600 3556
1e901a75 3557 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3558 compilation.
34c44600 3559
1e901a75 3560 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 3561
3562 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 3563
3564 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 3565
1e901a75 3566 * normal/menu.c: Likewise.
34c44600 3567
1e901a75 3568 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3569 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 3570
1e901a75 3571 * include/grub/font.h: Replaced with new file.
34c44600 3572
1e901a75 3573 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3574 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3575 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3576 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3577 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 3578 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 3579 fg_red, fg_green, fg_blue, fg_alpha.
3580 (grub_video_adapter): Removed blit_glyph.
34c44600 3581 (grub_video_blit_glyph): Removed.
3582
1e901a75 3583 * font/manager.c: Removed file.
34c44600 3584
3585 * font/font.c: New file.
3586
1e901a75 3587 * font/font_cmd.c: Likewise.
34c44600 3588
1e901a75 3589 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 3590
1e901a75 3591 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3592 (grub_video_vbe_map_rgba): Likewise.
3593 (grub_video_vbe_unmap_color_int): Likewise.
3594 (grub_video_vbe_blit_glyph): Removed.
3595 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 3596
1e901a75 3597 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3598 (get_pixel): Likewise.
34c44600 3599 (set_pixel): Likewise.
3600
1e901a75 3601 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 3602
1e901a75 3603 * term/gfxterm.c: Adapted to new font engine.
34c44600 3604
1e901a75 3605 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 3606
1e901a75 3607 * term/i386/pc/vga.c: Likewise.
34c44600 3608
1e901a75 3609 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 3610
1e901a75 3611 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 3612
1e901a75 3613 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3614
1e901a75 3615 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3616
1e901a75 3617 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 3618
1e901a75 3619 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 3620
1e901a75 3621 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 3622
1e901a75 3623 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 3624
1e901a75 3625 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3626
3627 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 3628
1e901a75 3629 * util/grub-mkconfig_lib.in: Changed font extension.
3630
278922e8 36312008-12-28 Felix Zielcke <fzielcke@z-51.de>
3632
3633 * util/getroot.c (grub_util_get_grub_dev): Add support for
3634 /dev/md/dNNpNN style partitionable mdraid devices.
3635
3ced05cf 36362008-12-12 Alex Smith <alex@alex-smith.me.uk>
3637
3638 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3639 at a time limit of the PXE TFTP API correctly.
3640 (grub_pxefs_close): Likewise.
3641
7fd0ee30 36422008-11-29 Robert Millan <rmh@aybabtu.com>
3643
34c44600 3644 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 3645 grub_ata_device_initialize() calls.
3646
34c44600 36472008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 3648
3649 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3650 iteration failed.
3651 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3652
89313780 36532008-11-28 Robert Millan <rmh@aybabtu.com>
3654
3655 Fix build on powerpc-ieee1275. Based on patch created by
3656 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3657 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3658 `kern/ieee1275/mmap.c'.
3659 * include/grub/powerpc/ieee1275/memory.h: New file.
3660
15257703 3661 Provide grub-install on coreboot.
3662 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3663 (grub_install_SOURCES): New variable.
3664 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3665 usable on coreboot.
3666
9fc5388a 36672008-11-25 Felix Zielcke <fzielcke@z-51.de>
3668
3669 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3670 to `grub_term_input_t'.
3671 (grub_term_get_current_output): Change return type to
3672 `grub_term_output_t'.
3673
bc3a2f31 36742008-11-22 Robert Millan <rmh@aybabtu.com>
3675
34c44600 3676 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3677 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3678 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3679 grub_vga_text_cls().
3680
80fc88f2 3681 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3682 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3683
cbf36fd3 3684 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3685 to 0x200000 (avoids trouble with some OFW implementations, and matches
3686 with the one in Yaboot).
3687 Reported by Manoel Abranches
3688
73e8e268 36892008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3690
3691 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3692 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3693
73e8e268 3694 * util/grub-mkconfig_lib.in (grub_warn): New function.
3695 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3696 warnings, to obtain consistent formatting.
3697 * util/grub.d/00_header.in: Likewise.
3698 * util/update-grub_lib.in: Likewise.
3699
e94045a1 3700 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3701 Move comment text to `#error' stanza.
e94045a1 3702
79d29fd7 3703 Harmonize ieee1275's grub_available_iterate() with the generic
3704 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3705 build problem on i386-ieee1275):
3706 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3707 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3708 parameter `type'. Update all users of this function.
3709 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3710 `kern/ieee1275/mmap.c'.
3711 * kern/ieee1275/init.c
3712 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3713 with ...
3714 (grub_machine_mmap_iterate): ... this.
3715 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3716 return type to `grub_err_t'. Update all implementations of this
3717 function prototype.
3718 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3719 Likewise.
3720
60d6b16e 3721 Add `lsmmap' command (lists firmware-provided memory map):
3722 * commands/lsmmap.c: New file.
3723 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3724 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3725 variables.
3726 * conf/powerpc-ieee1275.rmk: Likewise.
3727 * conf/i386-coreboot.rmk: Likewise.
3728 * conf/i386-ieee1275.rmk: Likewise.
3729
ebaaf49b 37302008-11-19 Robert Millan <rmh@aybabtu.com>
3731
3732 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3733 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3734 constraints to initrd allocation (based on code from
3735 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3736 for Linux to find it.
ebaaf49b 3737
dfab719f 37382008-11-14 Robert Millan <rmh@aybabtu.com>
3739
3740 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3741 order to cope with duplicate slashes.
3742
10fc3eb9 37432008-11-14 Robert Millan <rmh@aybabtu.com>
3744
3745 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3746 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3747 don't want to mess with lower memory, because it is used in the Linux
3748 loader.
3749
3750 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 3751 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 3752 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3753 is in our heap (probably as a result of it being corrupted during
2f2a3442 3754 decompression). Add #error instance with comment to explain why this
3755 loader isn't currently usable on PC/BIOS.
10fc3eb9 3756
e2e07847 37572008-11-14 Robert Millan <rmh@aybabtu.com>
3758
3759 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 3760 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 3761
fe8e8d69 37622008-11-12 Robert Millan <rmh@aybabtu.com>
3763
3764 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3765
3766 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3767 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3768 from here ...
3769 * include/grub/i386/pc/memory.h: ... to here.
3770
976b07d0 37712008-11-12 Robert Millan <rmh@aybabtu.com>
3772
3773 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3774 split).
3775
3776 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3777 (grub_console_cur_color, grub_console_real_putchar)
3778 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3779 (grub_console_setcolorstate, grub_console_setcolor)
3780 (grub_console_getcolor): Move from here ...
3781 * include/grub/i386/vga_common.h: ... to here (new file).
3782
3783 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3784 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3785 `<grub/i386/io.h>'.
3786 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3787 `<grub/i386/vga_common.h>'.
3788
76679cd3 37892008-11-12 Robert Millan <rmh@aybabtu.com>
3790
3791 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3792 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3793 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3794 variables.
3795 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3796 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3797
3798 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3799 grub_console_init() with call to grub_vga_text_init().
3800 (grub_machine_fini): Replace call to
3801 grub_console_fini() with call to grub_vga_text_fini() and
3802 grub_at_keyboard_fini().
3803
3804 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3805 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3806 (grub_console_setcolorstate, grub_console_setcolor)
3807 (grub_console_getcolor): New function prototypes.
3808
3809 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3810 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3811 (grub_vga_text_setcursor): Static-ize.
3812 (grub_vga_text_term): New structure.
3813 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3814
3815 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3816 (grub_console_cur_color, grub_console_standard_color)
3817 (grub_console_normal_color, grub_console_highlight_color)
3818 (map_char, grub_console_putchar, grub_console_getcharwidth)
3819 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3820 (grub_console_getcolor): Move from here ...
3821 * term/i386/vga_common.c: ... to here (same function names).
3822
95b841d3 38232008-11-12 Robert Millan <rmh@aybabtu.com>
3824
3825 Use newly-added Multiboot support in coreboot.
3826
3827 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3828 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3829
3830 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3831 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3832 (codestart): Store the MBI in `startup_multiboot_info' when we're
3833 being loaded using Multiboot.
3834
3835 * kern/i386/coreboot/init.c (grub_machine_init): Move
3836 grub_at_keyboard_init() call to beginning of function (useful for
3837 debugging). Call grub_machine_mmap_init() before attempting to use
3838 grub_machine_mmap_iterate().
3839 (grub_lower_mem, grub_upper_mem): Move from here ...
3840 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3841 here (new file).
3842
3843 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3844 function prototype.
3845
761ca975 38462008-11-12 Robert Millan <rmh@aybabtu.com>
3847
3848 Fix a regression introduced by the at_keyboard.mod split. Because
3849 some terminals are default on some platforms and non-default on
3850 others, the first terminal being registered determines which is
3851 going to be default.
3852
3853 * kern/term.c (grub_term_register_input): If this is the first
3854 terminal being registered, set it as the current one.
3855 (grub_term_register_output): Likewise.
3856
3857 * term/efi/console.c (grub_console_init): Do not call
3858 grub_term_set_current_output() or grub_term_set_current_input().
3859 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3860 * term/i386/pc/console.c (grub_console_init): Likewise.
3861 (grub_console_fini): Do not call grub_term_set_current_input()
3862 (but leave grub_term_set_current_output() to restore text mode).
3863
6c529df7 38642008-11-10 Robert Millan <rmh@aybabtu.com>
3865
3866 * util/grub.d/00_header.in: Add backward compatibility check for
3867 versions of terminal.mod that don't understand `terminal_input' or
3868 `terminal_output'.
3869
132e4113 38702008-11-09 Robert Millan <rmh@aybabtu.com>
3871
3872 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3873 `terminal_input' / `terminal_output', not `terminal'.
3874
ac293d50 38752008-11-08 Robert Millan <rmh@aybabtu.com>
3876
3877 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 3878 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 3879
0025933a 38802008-11-08 Robert Millan <rmh@aybabtu.com>
3881
3882 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 3883 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 3884 members. Update all users.
3885 * util/console.c (grub_ncurses_term): Split in ...
3886 (grub_ncurses_term_input): ... this, and ...
3887 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 3888 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 3889
37c86336 38902008-11-08 Robert Millan <rmh@aybabtu.com>
3891
3892 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3893 (PKGDATA): Add $(pkgdata_SRCDIR).
3894 (pkglib_BUILDDIR): New variable.
3895 (pkgdata_SRCDIR): New variable.
3896 (build_env.mk): New target.
3897 (include_DATA): New variable.
3898 (install-local): Install $(include_DATA) files in $(includedir).
3899
b6c15a2d 39002008-11-07 Pavel Roskin <proski@gnu.org>
3901
d99d46f1 3902 * gendistlist.sh: Use C locale for sorting to ensure consistent
3903 output on all systems.
3904
b6c15a2d 3905 * util/grub.d/00_header.in: Remove incorrect space before
3906 "serial".
3907
c32ee8c9 39082008-11-07 Robert Millan <rmh@aybabtu.com>
3909
3910 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3911 per specification.
3912 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3913 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3914 (based on find_multi_boot1_header).
3915 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3916 using find_multi_boot2_header(), and abort if neither Multiboot or
3917 Multiboot headers were found.
3918
651c29b7 39192008-11-07 Robert Millan <rmh@aybabtu.com>
3920
3921 Modularize at_keyboard.mod:
3922
3923 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3924 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3925 (at_keyboard_mod_LDFLAGS): New variables.
3926
3927 Actual terminal split:
3928
3929 * include/grub/term.h (struct grub_term): Split in ...
3930 (struct grub_term_input): ... this, and ...
3931 (struct grub_term_output): ... this. Update all users.
3932 (grub_term_set_current): Split in ...
3933 (grub_term_set_current_input): ... this, and ...
3934 (grub_term_set_current_output): ... this.
3935 (grub_term_get_current): Split in ...
3936 (grub_term_get_current_input): ... this, and ...
3937 (grub_term_get_current_output): ... this.
3938 (grub_term_register): Split in ...
3939 (grub_term_register_input): ... this, and ...
3940 (grub_term_register_output): ... this.
3941 (grub_term_unregister): Split in ...
3942 (grub_term_unregister_input): ... this, and ...
3943 (grub_term_unregister_output): ... this.
3944 (grub_term_iterate): Split in ...
3945 (grub_term_iterate_input): ... this, and ...
3946 (grub_term_iterate_output): ... this.
3947
3948 * kern/term.c (grub_term_list): Split in ...
3949 (grub_term_list_input): ... this, and ...
3950 (grub_term_list_output): ... this. Update all users.
3951 (grub_cur_term): Split in ...
3952 (grub_cur_term_input): ... this, and ...
3953 (grub_cur_term_output): ... this. Update all users.
3954 (grub_term_set_current): Split in ...
3955 (grub_term_set_current_input): ... this, and ...
3956 (grub_term_set_current_output): ... this.
3957 (grub_term_get_current): Split in ...
3958 (grub_term_get_current_input): ... this, and ...
3959 (grub_term_get_current_output): ... this.
3960 (grub_term_register): Split in ...
3961 (grub_term_register_input): ... this, and ...
3962 (grub_term_register_output): ... this.
3963 (grub_term_unregister): Split in ...
3964 (grub_term_unregister_input): ... this, and ...
3965 (grub_term_unregister_output): ... this.
3966 (grub_term_iterate): Split in ...
3967 (grub_term_iterate_input): ... this, and ...
3968 (grub_term_iterate_output): ... this.
3969
3970 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3971 a check for input and one for output (and only attempt to get keys
3972 from user when input works).
3973
3974 * util/grub-probe.c (grub_term_get_current): Split in ...
3975 (grub_term_get_current_input): ... this, and ...
3976 (grub_term_get_current_output): ... this.
3977 * util/grub-fstest.c: Likewise.
3978 * util/i386/pc/grub-setup.c: Likewise.
3979 * util/grub-editenv.c: Likewise.
3980
3981 Portability adjustments:
3982
3983 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3984 `term/i386/pc/at_keyboard.c'.
3985 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3986 grub_keyboard_controller_init() (now handled by terminal .init).
3987 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3988 grub_at_keyboard_init().
3989 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3990 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3991 at_keyboard.mod via input terminal interface).
3992 * include/grub/i386/coreboot/console.h: Convert into a stub for
3993 `<grub/i386/pc/console.h>'.
3994
3995 Migrate full terminals to new API:
3996
3997 * term/efi/console.c (grub_console_term): Split into ...
3998 (grub_console_term_input): ... this, and ...
3999 (grub_console_term_output): ... this. Update all users.
4000 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4001 (grub_ofconsole_init): Split into ...
4002 (grub_ofconsole_init_input): ... this, and ...
4003 (grub_ofconsole_init_output): ... this.
4004 (grub_ofconsole_term): Split into ...
4005 (grub_ofconsole_term_input): ... this, and ...
4006 (grub_ofconsole_term_output): ... this. Update all users.
4007 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4008 (grub_serial_term_input): ... this, and ...
4009 (grub_serial_term_output): ... this. Update all users.
4010 * term/i386/pc/console.c (grub_console_term): Split into ...
4011 (grub_console_term_input): ... this, and ...
4012 (grub_console_term_output): ... this. Update all users.
4013 (grub_console_term_input): Only enable it on PC/BIOS platform.
4014 (grub_console_init): Remove grub_keyboard_controller_init() call.
4015
4016 Migrate input terminals to new API:
4017
4018 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4019 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4020 i386-specific anyway).
4021 (grub_console_checkkey): Rename to ...
4022 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4023 users.
4024 (grub_keyboard_controller_orig): New variable.
4025 (grub_console_getkey): Rename to ...
4026 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4027 users.
4028 (grub_keyboard_controller_init): Static-ize. Save original
4029 controller value so that it can be restored ...
4030 (grub_keyboard_controller_fini): ... here (new function).
4031 (grub_at_keyboard_term): New structure.
4032 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4033 functions.
4034
4035 Migrate output terminals to new API:
4036
4037 * term/i386/pc/vga.c (grub_vga_term): Change type to
4038 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4039 members. Update all users.
4040 * term/gfxterm.c (grub_video_term): Change type to
4041 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4042 members. Update all users.
4043 * include/grub/i386/pc/console.h (grub_console_checkkey)
4044 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4045 etc).
4046
4047 Migrate `terminal' command and userland tools to new API:
4048
4049 * commands/terminal.c (grub_cmd_terminal): Split into ...
4050 (grub_cmd_terminal_input): ... this, and ...
4051 (grub_cmd_terminal_output): ... this.
4052 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4053 `terminal_input' and `terminal_output'.
4054 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4055 `terminal_input' / `terminal_output' API.
4056 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4057 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4058 provided ${GRUB_TERMINAL}, convert it).
4059
96e5d876 40602008-11-04 Robert Millan <rmh@aybabtu.com>
4061
4062 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4063 for FreeBSD.
4064 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4065
556f3775 40662008-11-03 Bean <bean123ch@gmail.com>
4067
4068 * kern/elf.c (grub_elf32_load): Revert to previous code.
4069 (grub_elf64_load): Likewise.
4070
4071 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4072
926b9823 40732008-11-01 Robert Millan <rmh@aybabtu.com>
4074
4075 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4076 (TARGET_CPPFLAGS): Likewise.
4077 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4078
1432e958 40792008-11-01 Carles Pina i Estany <carles@pina.cat>
4080
4081 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4082
dba3f844 40832008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 4084
4085 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4086 addition of objects until the code is not going to be able to fail.
4087
dba3f844 40882008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 4089
4090 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4091 (add a missing NULL check, and correct them by moving the pointer
4092 operations after the actual check).
4093
7ab28c21 40942008-10-29 Robert Millan <rmh@aybabtu.com>
4095
4096 * util/i386/pc/grub-install.in: Handle empty string as output from
4097 make_system_path_relative_to_its_root().
4098
1b7748eb 40992008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4100
4101 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4102 circular metadata worst case scenario. If the metadata is circular
4103 then copy the wrap in place.
4104 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4105 project lib/format_text/layout.h
4106 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4107
c9618ab2 41082008-10-03 Felix Zielcke <fzielcke@z-51.de>
4109
7a36edca 4110 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 4111
bf981c62 41122008-10-03 Felix Zielcke <fzielcke@z-51.de>
4113
4114 * util/update-grub_lib.in: Mention filename in warning message.
4115
6d994591 41162008-09-29 Felix Zielcke <fzielcke@z-51.de>
4117
4118 * NEWS: Update for rename of update-grub to grub-mkconfig.
4119
18ade780 41202008-09-29 Felix Zielcke <fzielcke@z-51.de>
4121
4122 * util/update-grub_lib.in: Copy to ...
4123 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 4124 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 4125 * util/update-grub.in: Rename to ...
4126 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4127 option. Add `--output' option to allow users to specify the generated
4128 configuration file. Default to stdout.
4129 (update_grub_dir): Rename to ...
4130 (grub_mkconfig_dir): ... this.
4131 (grub_cfg): Default to an empty string.
4132 * conf/common.rmk (update-grub): Rename to ...
4133 (grub-mkconfig): ... this.
4134 (update-grub_lib): Copy to ...
4135 (grub-mkconfig_lib): ... this.
4136 (update-grub_SCRIPTS): Copy to ...
4137 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4138 (update-grub_DATA): Rename to ...
4139 (grub-mkconfig_DATA): ... this.
4140
556ce6ac 41412008-09-28 Robert Millan <rmh@aybabtu.com>
4142
4143 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4144 to `modified'. Add the real `created' field.
4145 (grub_iso9660_uuid): Use `modified' rather than `created' for
4146 constructing the UUID.
4147
41482008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 4149
4150 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4151 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4152
92274e85 41532008-09-28 Bean <bean123ch@gmail.com>
4154
4155 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4156 Thanks to Christian Franke for finding this bug.
4157
add6f17a 41582008-09-25 Robert Millan <rmh@aybabtu.com>
4159
4160 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4161 instances of grub_util_get_disk_name() (see previous commit).
4162
d2a367b8 41632008-09-25 Robert Millan <rmh@aybabtu.com>
4164
4165 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4166 `util/i386/get_disk_name.c'.
4167 * conf/i386-efi.rmk: Likewise.
4168 * conf/x86_64-efi.rmk: Likewise.
4169 * conf/i386-coreboot.rmk: Likewise.
4170 * conf/i386-ieee1275.rmk: Likewise.
4171 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4172 `util/ieee1275/get_disk_name.c'.
4173 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4174 * util/ieee1275/get_disk_name.c: Remove file.
4175 * util/i386/get_disk_name.c: Remove file.
4176 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4177 "hd%d" for device.map entries, rather than using
4178 grub_util_get_disk_name().
4179
81a06771 41802008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 4181
4182 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4183 warning.
4184 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4185
5a004279 41862008-09-24 Carles Pina i Estany <carles@pina.cat>
4187
4188 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4189 Changed to 0x5100.
4190 (GRUB_TERM_PPAGE): Changed to 0x4900.
4191
397093d3 41922008-09-24 Robert Millan <rmh@aybabtu.com>
4193
4194 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4195 macros (they were i386-pc specific).
4196 * include/grub/sparc64/ieee1275/console.h: Likewise.
4197 * include/grub/efi/console.h: Likewise.
4198
a91b6c7c 41992008-09-22 Bean <bean123ch@gmail.com>
4200
4201 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4202 resident and in attribute list.
4203
4204 * include/grub/ntfs.h (BMP_LEN): Removed.
4205
c40fd116 42062008-09-22 Bean <bean123ch@gmail.com>
4207
81a06771 4208 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 4209 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4210
4211 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4212 error occurs, as grub_disk_open will call grub_disk_close, which will
4213 call p->close (scsi).
4214
81a06771 42152008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 4216
4217 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4218 (AC_PREREQ): Bumped to 2.59.
4219 (AC_TRY_COMPILE): Replace obsolete macro with ...
4220 (AC_COMPILE_IFELSE): ... this.
4221 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4222 (AC_LINK_IFELSE): ... this.
4223
5dc43410 42242008-09-21 Felix Zielcke <fzielcke@z-51.de>
4225
4226 * autogen.sh: Add a call to `gendistlist.sh'.
4227
9035dce4 42282008-09-19 Christian Franke <franke@computer.org>
4229
4230 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4231 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4232 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4233 Export __enable_execute_stack() to modules.
4234 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4235 New function.
4236
7fd75377 42372008-09-09 Felix Zielcke <fzielcke@z-51.de>
4238
040030b3 4239 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4240 Sort the list.
4241
42422008-09-09 Felix Zielcke <fzielcke@z-51.de>
4243
4244 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 4245 #include <grub/util/hostdisk.h>.
4246
89d5ffcf 42472008-09-08 Robert Millan <rmh@aybabtu.com>
4248
4249 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4250 segments when their filesz is zero (grub_file_read() interprets
81a06771 4251 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 4252 Use `lowest_segment' rather than 0 for calculating the current
4253 segment load address.
4254
40da438f 42552008-09-08 Robert Millan <rmh@aybabtu.com>
4256
4257 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4258 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4259 clobbered useful information.
4260
ddbf5556 42612008-09-08 Robert Millan <rmh@aybabtu.com>
4262
4263 * include/grub/util/biosdisk.h: Move to ...
4264 * include/grub/util/hostdisk.h: ... here. Update all users.
4265 * util/biosdisk.c: Move to ...
4266 * util/hostdisk.c: ... here. Update all users.
4267
783d0f48 42682008-09-07 Robert Millan <rmh@aybabtu.com>
4269
4270 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4271 variables.
4272 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4273 and length can be stored directly in the `mbi->mmap_addr' and
4274 `mbi->mmap_length' struct fields.
4275
548e2ea5 42762008-09-07 Robert Millan <rmh@aybabtu.com>
4277
4278 * conf/i386.rmk: New file. Provides declaration for building
4279 `cpuid.mod'.
4280 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4281 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4282 variables.
4283 Include `conf/i386.mk'.
4284 * conf/i386-efi.rmk: Likewise.
4285 * conf/x86_64-efi.rmk: Likewise.
4286 * conf/i386-coreboot.rmk: Likewise.
4287 * conf/i386-ieee1275.rmk: Likewise.
4288
0ea85a37 42892008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4290
4291 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4292 Adds optimization support for BGR based modes.
4293
4294 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4295 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4296 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4297 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4298 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4299 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4300 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4301 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4302 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4303 (grub_video_i386_vbeblit_index_index): Likewise.
4304 (grub_video_i386_vbeblit_replace_directN): Added.
4305 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4306 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4307 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4308 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4309 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4310 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 4311 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 4312 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4313 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4314 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4315 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4316 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4317 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4318
4319 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4320 (grub_video_i386_vbefill_R8G8B8): Likewise.
4321 (grub_video_i386_vbefill_index): Likewise.
4322 (grub_video_i386_vbefill_direct32): Added.
4323 (grub_video_i386_vbefill_direct24): Likewise.
4324 (grub_video_i386_vbefill_direct16): Likewise.
4325 (grub_video_i386_vbefill_direct8): Likewise.
4326
81a06771 4327 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 4328 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4329 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4330 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4331 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4332 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 4333
0ea85a37 4334 * video/video.c (grub_video_get_blit_format): Updated to use new
4335 blit formats. Added handling for 16 bit color modes.
81a06771 4336
4337 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 4338 fillers.
4339 (common_blitter): Updated to use new blitters.
4340
4341 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4342 Removed.
4343 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4344 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4345 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4346 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4347 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4348 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4349 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4350 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4351 (grub_video_i386_vbeblit_index_index): Likewise.
4352 (grub_video_i386_vbeblit_replace_directN): Added.
4353 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4354 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4355 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4356 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4357 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4358 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4359 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4360 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4361 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4362 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4363 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4364 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4365 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 4366
0ea85a37 4367 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4368 (grub_video_i386_vbefill_R8G8B8): Likewise.
4369 (grub_video_i386_vbefill_index): Likewise.
4370 (grub_video_i386_vbefill_direct32): Added.
4371 (grub_video_i386_vbefill_direct24): Likewise.
4372 (grub_video_i386_vbefill_direct16): Likewise.
4373 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 4374
0ea85a37 4375 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4376 types.
81a06771 4377
0ea85a37 4378 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4379 types.
81a06771 4380
0ea85a37 4381 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4382 blitter types.
81a06771 4383
0ea85a37 4384 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4385 types.
4386
e8a83df6 43872008-09-06 Felix Zielcke <fzielcke@z-51.de>
4388
4389 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4390 RAID level 1.
4391
6bcd8ee5 43922008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 4393
6bcd8ee5 4394 * fs/iso9660.c (grub_iso9660_date): New structure.
4395 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4396 (grub_iso9660_uuid): New function.
c375ae58 4397
59261157 43982008-09-05 Bean <bean123ch@gmail.com>
4399
4400 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4401
4402 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4403 insensitive bit for names in Win32 and Win32 & DOS namespace.
4404
4405 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4406
4407 * include/grub/types.h (LONG_MAX): Likewise.
4408
58b6645a 44092008-09-04 Felix Zielcke <fzielcke@z-51.de>
4410
4ee55921 4411 * util/getroot.c: Include <config.h>.
4412 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4413 add support for /dev/md/N devices and handle LVM double dash escaping.
4414
44152008-09-04 Felix Zielcke <fzielcke@z-51.de>
4416
4417 * config.guess: Update to latest version from config git.
4418 * config.sub: Likewise.
58b6645a 4419
9124f65d 44202008-09-03 Robert Millan <rmh@aybabtu.com>
4421
4422 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4423 `disk->total_sectors'.
4424
81a06771 44252008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 4426
4427 * include/grub/normal.h: Fixed incorrect comment for
4428 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4429
81a06771 44302008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 4431
4432 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4433 values with defines.
4434
4435 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4436 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4437 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4438 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4439 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4440 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4441 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4442 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4443 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4444 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4445 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4446 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4447 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4448 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4449 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4450 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4451 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4452 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4453 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4454
93d5cbf8 44552008-08-31 Robert Millan <rmh@aybabtu.com>
4456
4457 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4458 declaration.
4459 (grub_multiboot): Fix a few warnings.
4460
21751d50 44612008-08-31 Robert Millan <rmh@aybabtu.com>
4462
4463 * loader/i386/pc/multiboot.c: Update comment not to say that
4464 boot_device support is unimplemented.
4465
e27a75c5 44662008-08-31 Robert Millan <rmh@aybabtu.com>
4467
4468 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4469 or memory map support are unimplemented.
4470
81a06771 44712008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 4472
4473 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4474
81a06771 44752008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 4476
4477 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4478 total video memory in 'vbeinfo' output; show color format details for
4479 each video mode.
4480
7c5d8d95 44812008-08-30 Pavel Roskin <proski@gnu.org>
4482
4483 * util/genmoddep.c: Remove for real this time.
4484 * DISTLIST: Remove util/genmoddep.c.
4485
4cebd25a 44862008-08-30 Robert Millan <rmh@aybabtu.com>
4487
4488 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4489 as required by Multiboot spec (it was already 4-byte aligned, but
4490 only by chance).
4491
b497a269 44922008-08-29 Pavel Roskin <proski@gnu.org>
4493
e3925185 4494 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4495 * kern/powerpc/ieee1275/startup.S: ... this.
4496 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4497 * DISTLIST: Likewise.
4498
b497a269 4499 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4500 grub/cpu/kernel.h. Add start label for consistency with other
4501 platforms. Add grub_prefix immediately after start. Add jump
4502 to the code after grub_prefix.
4503 * include/grub/powerpc/kernel.h: Provide valid values for
4504 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4505
6e5a42fe 45062008-08-29 Bean <bean123ch@gmail.com>
4507
4508 * configure.ac: Change host_os to cygwin for mingw.
4509 (asprintf): New check for function.
4510
4511 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4512 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4513
4514 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 4515 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 4516 sync, sleep and grub_util_get_disk_size for mingw.
4517
4518 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4519 to get size in mingw.
4520 (open_device): Use flag O_BINARY if it's defined.
4521 (find_root_device): Add dummy code for mingw.
4522
4523 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4524 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4525 (get_scsi_disk_name): Return 0 for mingw.
4526
4527 * util/hostfs.c: #include <grub/util/misc.h>.
4528 (grub_hostfs_open): Use "rb" flag to open file, use
4529 grub_util_get_disk_size to get disk size for mingw.
4530
4531 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4532 (asprintf): New function if HAVE_ASPRINTF is not set.
4533 (sync): New function for mingw.
4534 (sleep): Likewise.
4535 (grub_util_get_disk_size): Likewise.
4536
ab3f2673 45372008-08-28 Pavel Roskin <proski@gnu.org>
4538
4539 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4540 kern/time.c.
4541
1c282483 45422008-08-28 Robert Millan <rmh@aybabtu.com>
4543
4544 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4545
678e849c 45462008-08-28 Robert Millan <rmh@aybabtu.com>
4547
4548 Change find_grub_drive() syntax so it doesn't prevent it from
4549 detecting NULL names as errors.
4550
4551 * util/biosdisk.c (find_grub_drive): Move free slot search code
4552 from here ...
4553 (find_free_slot): ... to here.
4554 (read_device_map): Use find_free_slot() to search for free slots.
4555
965c75ca 45562008-08-27 Marco Gerards <marco@gnu.org>
4557
4558 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4559 (scsi_mod_SOURCES): New variable.
4560 (scsi_mod_CFLAGS): Likewise
4561 (scsi_mod_LDFLAGS): Likewise.
4562
4563 * disk/scsi.c: New file.
4564
4565 * include/grub/scsi.h: Likewise.
4566
4567 * include/grub/scsicmd.h: Likewise.
4568
4569 * disk/ata.c: Include <grub/scsi.h>.
4570 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4571 instead.
4572 (grub_ata_iterate): Skip ATAPI devices.
4573 (grub_ata_open): Only handle ATAPI devices.
4574 (struct grub_atapi_read): Removed.
4575 (grub_atapi_readsector): Likewise.
4576 (grub_ata_read): No longer handle ATAPI devices.
4577 (grub_ata_write): Likewise.
4578 (grub_atapi_iterate): New function.
4579 (grub_atapi_read): Likewise.
4580 (grub_atapi_write): Likewise.
4581 (grub_atapi_open): Likewise.
4582 (grub_atapi_close): Likewise.
4583 (grub_atapi_dev): New variable.
4584 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4585 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4586
4587 * include/grub/disk.h (enum grub_disk_dev_id): Add
4588 `GRUB_DISK_DEVICE_SCSI_ID'.
4589
c07ae501 45902008-08-26 Robert Millan <rmh@aybabtu.com>
4591
4592 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4593 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4594 descriptive.
4595
5ed20adc 45962008-08-23 Bean <bean123ch@gmail.com>
4597
4598 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4599 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4600 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4601 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4602 dm_nv.mod.
4603 (raid5rec_mod_SOURCES): New macro.
4604 (raid5rec_mod_CFLAGS): Likewise.
4605 (raid5rec_mod_LDFLAGS): Likewise.
4606 (raid6rec_mod_SOURCES): Likewise.
4607 (raid6rec_mod_CFLAGS): Likewise.
4608 (raid6rec_mod_LDFLAGS): Likewise.
4609 (mdraid_mod_SOURCES): Likewise.
4610 (mdraid_mod_CFLAGS): Likewise.
4611 (mdraid_mod_LDFLAGS): Likewise.
4612 (dm_nv_mod_SOURCES): Likewise.
4613 (dm_nv_mod_CFLAGS): Likewise.
4614 (dm_nv_mod_LDFLAGS): Likewise.
4615
4616 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4617 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4618 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4619
4620 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4621 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4622
4623 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4624
4625 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4626
4627 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4628
4629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4630
4631 * disk/raid5_recover.c: New file.
4632
4633 * disk/raid6_recover.c: Likewise.
4634
4635 * disk/mdraid_linux.c: Likewise.
4636
4637 * disk/dmraid_nvidia.c: Likewise.
4638
4639 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4640 ULONG_MAX.
4641
4642 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4643 calculate the size of raid device.
4644 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4645 different layout of raid5.
4646 (grub_raid_scan_device): Remove code specific to mdraid.
4647 (grub_raid_list): New variable.
4648 (free_array): New function.
4649 (grub_raid_register): Likewise.
4650 (grub_raid_unregister): Likewise.
4651 (grub_raid_rescan): Likewise.
4652 (GRUB_MOD_INIT): Don't iterate device here.
4653 (GRUB_MOD_FINI): Use free_array to release resource.
4654
4655 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4656 (grub_raid5_recover_func_t): New function variable type.
4657 (grub_raid6_recover_func_t): Likewise.
4658 (grub_raid5_recover_func): New variable.
4659 (grub_raid6_recover_func): Likewise.
4660 (grub_raid_register): New function.
4661 (grub_raid_unregister): Likewise.
4662 (grub_raid_rescan): Likewise.
4663 (grub_raid_block_xor): Likewise.
4664
4665 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4666 (CMD_CRC): New macro.
4667 (part): Removed.
4668 (read_file): Handle device as well as file.
4669 (cmd_crc): New function.
4670 (fstest): Handle multiple disks.
4671 (options): Remove part, raw and long, add root and diskcount.
4672 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4673 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4674 add handling for the new options, support multiple disks.
4675
4676 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4677
29c18915 46782008-08-23 Bean <bean123ch@gmail.com>
4679
4680 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4681
4682 * genfslist.sh: Ignore kernel.mod.
4683
4684 * genpartmaplist.sh: Likewise.
4685
8415f261 46862008-08-23 Robert Millan <rmh@aybabtu.com>
4687
4688 * util/getroot.c (find_root_device): Skip anything that starts with
4689 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4690
d5a7dc5b 46912008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4692
d5a7dc5b 4693 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4694 * util/grub.d/00_header.in: Allow the administrator to change default
4695 gfxmode via ${GRUB_GFXMODE}.
4696
380cfbb4 46972008-08-21 Felix Zielcke <fzielcke@z-51.de>
4698
4699 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4700
c9baafe7 47012008-08-21 Robert Millan <rmh@aybabtu.com>
4702
4703 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4704 loader.
4705 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4706 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4707
e290bef2 47082008-08-20 Carles Pina i Estany <carles@pina.cat>
4709
4710 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4711 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4712
f9dbfc96 47132008-08-19 Robert Millan <rmh@aybabtu.com>
4714
4715 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4716 (struct grub_virtual_screen): Remove `cursor_color'.
4717 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4718 initialization.
4719 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4720
dd6bd6ab 47212008-08-18 Robert Millan <rmh@aybabtu.com>
4722
4723 Unify (identical) linux_normal.c files.
4724 * loader/i386/efi/linux_normal.c: Move from here ...
4725 * loader/linux_normal.c: ... to here. Update all users.
4726 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4727 * loader/i386/ieee1275/linux_normal.c: Likewise.
4728
7f42f83e 47292008-08-18 Robert Millan <rmh@aybabtu.com>
4730
4731 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4732 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4733 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4734 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4735 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4736 New macros.
4737 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4738 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4739 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4740 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4741 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4742 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4743 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4744 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4745 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4746 portably using grub_getxy().
4747 Replace `-EFI' with `-bzImage' in boot message.
4748
38487ddb 47492008-08-17 Robert Millan <rmh@aybabtu.com>
4750
4751 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4752
deceb3ec 47532008-08-17 Robert Millan <rmh@aybabtu.com>
4754
4755 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4756
4757 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4758 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4759 (grub_machine_mmap_iterate): New function declaration.
4760 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4761 structure.
4762 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4763 macros.
4764
4765 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4766 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4767 Move e820 parsing from here ...
4768 * kern/i386/pc/mmap.c: New file.
4769 (grub_machine_mmap_iterate): ... to here.
4770
4771 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4772 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4773 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4774 (grub_available_iterate): Redeclare to return `void', and redeclare
4775 its hook to use grub_uint64_t as addr and size parameters, and rename
4776 to ...
4777 (grub_machine_mmap_iterate): ... this. Update all users.
4778
4779 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4780 to make it more readable. Rename to ...
4781 (grub_machine_mmap_iterate): ... this.
4782
4783 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4784 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4785 (grub_multiboot): Allocate an extra region after the payload, and fill
4786 it with a Multiboot memory map. Adjust a.out loader to calculate size
4787 with the extra space.
4788 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4789 with the extra space.
4790
f8aa0f43 47912008-08-17 Carles Pina i Estany <carles@pina.cat>
4792
9807deb9 4793 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 4794
605f5bb6 47952008-08-17 Felix Zielcke <fzielcke@z-51.de>
4796
4797 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4798 mdate-sh to the list `find' searches for.
4799 * DISTLIST: Regenerated.
4800
210db6c6 48012008-08-16 Felix Zielcke <fzielcke@z-51.de>
4802
4803 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4804 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 4805 genmoddep.awk, gensymlist.sh.in.
4806 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 4807 * DISTLIST: Regenerated.
48cdbfd4 4808 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 4809
1082b929 48102008-08-16 Robert Millan <rmh@aybabtu.com>
4811
4812 * disk/raid.c (grub_raid_init): Handle/report errors set by
4813 grub_device_iterate().
4814 * disk/lvm.c (grub_lvm_init): Likewise.
4815
42ce5170 48162008-08-15 Bean <bean123ch@gmail.com>
4817
4818 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4819 and datehook.mod.
4820 (datetime_mod_SOURCES): New macro.
4821 (datetime_mod_CFLAGS): Likewise.
4822 (datetime_mod_LDFLAGS): Likewise.
4823 (date_mod_SOURCES): Likewise.
4824 (date_mod_CFLAGS): Likewise.
4825 (date_mod_LDFLAGS): Likewise.
4826 (datehook_mod_SOURCES): Likewise.
4827 (datehook_mod_CFLAGS): Likewise.
4828 (datehook_mod_LDFLAGS): Likewise.
4829
4830 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4831 and datehook.mod.
4832 (datetime_mod_SOURCES): New macro.
4833 (datetime_mod_CFLAGS): Likewise.
4834 (datetime_mod_LDFLAGS): Likewise.
4835 (date_mod_SOURCES): Likewise.
4836 (date_mod_CFLAGS): Likewise.
4837 (date_mod_LDFLAGS): Likewise.
4838 (datehook_mod_SOURCES): Likewise.
4839 (datehook_mod_CFLAGS): Likewise.
4840 (datehook_mod_LDFLAGS): Likewise.
4841
4842 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4843 and datehook.mod.
4844 (datetime_mod_SOURCES): New macro.
4845 (datetime_mod_CFLAGS): Likewise.
4846 (datetime_mod_LDFLAGS): Likewise.
4847 (date_mod_SOURCES): Likewise.
4848 (date_mod_CFLAGS): Likewise.
4849 (date_mod_LDFLAGS): Likewise.
4850 (datehook_mod_SOURCES): Likewise.
4851 (datehook_mod_CFLAGS): Likewise.
4852 (datehook_mod_LDFLAGS): Likewise.
4853
4854 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4855 and datehook.mod.
4856 (datetime_mod_SOURCES): New macro.
4857 (datetime_mod_CFLAGS): Likewise.
4858 (datetime_mod_LDFLAGS): Likewise.
4859 (date_mod_SOURCES): Likewise.
4860 (date_mod_CFLAGS): Likewise.
4861 (date_mod_LDFLAGS): Likewise.
4862 (datehook_mod_SOURCES): Likewise.
4863 (datehook_mod_CFLAGS): Likewise.
4864 (datehook_mod_LDFLAGS): Likewise.
4865
4866 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4867 and datehook.mod.
4868 (datetime_mod_SOURCES): New macro.
4869 (datetime_mod_CFLAGS): Likewise.
4870 (datetime_mod_LDFLAGS): Likewise.
4871 (date_mod_SOURCES): Likewise.
4872 (date_mod_CFLAGS): Likewise.
4873 (date_mod_LDFLAGS): Likewise.
4874 (datehook_mod_SOURCES): Likewise.
4875 (datehook_mod_CFLAGS): Likewise.
4876 (datehook_mod_LDFLAGS): Likewise.
4877
4878 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4879
4880 * commands/date.c: New file.
4881
4882 * hook/datehook.c: Likewise.
4883
4884 * include/grub/lib/datetime.h: Likewise.
4885
4886 * include/grub/i386/cmos.h: Likewise.
4887
4888 * lib/datetime.c: Likewise.
4889
4890 * lib/i386/datetime.c: Likewise.
4891
4892 * lib/efi/datetime.c: Likewise.
4893
0e9242da 48942008-08-14 Robert Millan <rmh@aybabtu.com>
4895
4896 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4897 (grub_mkelfimage_SOURCES): New variable.
4898 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4899
4900 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4901 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4902 * conf/powerpc-ieee1275.rmk: Likewise.
4903 * conf/i386-ieee1275.rmk: Likewise.
4904
4905 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4906 * kern/i386/coreboot/init.c: Likewise.
4907
4908 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4909 with `<grub/cpu/kernel.h>'.
4910 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4911 to ...
4912 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4913 * kern/i386/coreboot/startup.S: Likewise.
4914
4915 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4916 (GRUB_MOD_GAP): Remove.
4917 * include/grub/powerpc/kernel.h: New file.
4918 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4919 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4920 * include/grub/i386/kernel.h: New file.
4921 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4922 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4923 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4924
4925 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4926 `grub-mkelfimage'.
4927 Use --directory when invoking grub_mkimage.
4928
4929 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4930 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4931 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4932 and GRUB_KERNEL_CPU_PREFIX.
4933
b86408f8 49342008-08-14 Felix Zielcke <fzielcke@z-51.de>
4935
d5e619ca 4936 * include/grub/err.h (grub_err_printf): New function prototype.
4937 * util/misc.c (grub_err_printf): New function.
4938 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4939 grub_printf.
4940 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 4941
7161f0e0 49422008-08-13 Robert Millan <rmh@aybabtu.com>
4943
4944 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4945
a1967522 49462008-08-13 Robert Millan <rmh@aybabtu.com>
4947
4948 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4949 boot entry.
4950
371458b5 49512008-08-12 Robert Millan <rmh@aybabtu.com>
4952
4953 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4954 of the relocation code from here ...
4955 (grub_multiboot): ... to here.
4956 (forward_relocator, backward_relocator): Move from here ...
4957 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4958 (grub_multiboot_backward_relocator): ... to here.
4959 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4960 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4961 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4962 (grub_multiboot_forward_relocator_end)
4963 (grub_multiboot_backward_relocator)
4964 (grub_multiboot_backward_relocator_end): New variables.
4965
05f9452b 49662008-08-12 Bean <bean123ch@gmail.com>
4967
4968 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4969
20024ab0 49702008-08-11 Robert Millan <rmh@aybabtu.com>
4971
4972 * kern/i386/linuxbios/startup.S: Move from here ...
4973 * kern/i386/coreboot/startup.S: ... to here.
4974
4975 * kern/i386/linuxbios/init.c: Move from here ...
4976 * kern/i386/coreboot/init.c: ... to here.
4977
4978 * kern/i386/linuxbios/table.c: Move from here ...
4979 * kern/i386/coreboot/mmap.c: ... to here.
4980
4981 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4982
e352e9cd 49832008-08-11 Robert Millan <rmh@aybabtu.com>
4984
4985 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4986 errors. Leave it to the upper layer to handle them.
4987
2d05bc6a 49882008-08-09 Christian Franke <franke@computer.org>
4989
4990 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4991 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4992 Install `grub.d/10_windows' only on Cygwin.
4993 * configure.ac: Add subst of `target_os'.
4994 Check `target_os' also before setting TARGET_OBJ2ELF.
4995 Add `--enable-grub-pe2elf'.
4996
042bd419 49972008-08-08 Robert Millan <rmh@aybabtu.com>
4998
4999 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5000 (grub_last_time): Change type to grub_uint64_t.
5001 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5002 (grub_disk_close): Likewise.
5003
5004 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5005 (run_menu): Migrate code from to using grub_get_time_ms().
5006
5007 * util/misc.c (grub_get_time_ms): New function.
5008
7f280db5 50092008-08-08 Marco Gerards <marco@gnu.org>
5010
5011 * disk/ata.c (grub_ata_regget): Change return type to
5012 `grub_uint8_t'.
5013 (grub_ata_regget2): Likewise.
5014 (grub_ata_wait_status): New function.
5015 (grub_ata_wait_busy): Removed function, updated all users to use
5016 `grub_ata_wait_status'.
5017 (grub_ata_wait_drq): Likewise.
5018 (grub_ata_cmd): New function.
5019 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5020 error handling.
5021 (grub_ata_pio_write): Add error handling.
5022 (grub_atapi_identify): Likewise.
5023 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5024 handling.
5025 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5026 handling. Actually use the detected registers. Reorder the
5027 detection logic such that it is easier to read.
5028 (grub_ata_pciinit): Do not assign the same ID to each controller.
5029 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5030 handling.
5031 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5032
5033 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5034
1fbc5e66 50352008-08-08 Marco Gerards <marco@gnu.org>
5036
5037 * NEWS: Update.
5038
819ce6c0 50392008-08-07 Bean <bean123ch@gmail.com>
5040
5041 * include/grub/x86_64/pci.h: New file.
5042
5c41d44d 50432008-08-07 Christian Franke <franke@computer.org>
5044
5045 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5046 (TIMER2_GATE): Likewise.
5047 (grub_pit_wait): Add enable/disable of the timer2 gate
5048 bit of port 0x61. This fixes a possible infinite loop.
5049
5ebc275d 50502008-08-07 Bean <bean123ch@gmail.com>
5051
5052 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5053 kern/i386/tsc.c and kern/i386/pit.c.
5054
5055 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5056 x86_64 platform.
5057
5058 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5059 <grub/i386/tsc.h>.
5060
5061 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5062
e383b3d0 50632008-08-07 Bean <bean123ch@gmail.com>
5064
5065 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5066
5067 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5068
5069 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5070 multiple inclusion. Add #include <grub/types.h>.
5071
1cbb58ac 50722008-08-06 Christian Franke <franke@computer.org>
5073
5074 * conf/common.rmk: Build and install `10_windows'.
5075 * util/grub.d/10_windows.in: New script.
5076
337f5a1e 50772008-08-06 Pavel Roskin <proski@gnu.org>
5078
5079 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5080
057bc4ac 50812008-08-06 Robert Millan <rmh@aybabtu.com>
5082
5083 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5084 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5085
2b99f123 50862008-08-06 Bean <bean123ch@gmail.com>
5087
5088 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5089 (grub_pxefs_fs_int): Remove dummy definition.
5090 (grub_pxefs_open): Use data->block_size to store the current block
5091 size setting.
5092 (grub_pxefs_read): Use block size stored in data->block_size. As the
5093 value of grub_pxe_blksize can be changed after the file is opened.
5094
9f0234cb 50952008-08-06 Bean <bean123ch@gmail.com>
5096
5097 * fs/i386/pc/pxe.c (curr_file): new variable.
5098 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5099 require the dummy internal file system anymore.
5100 (grub_pxefs_read): Removed.
5101 (grub_pxefs_close): Likewise.
5102 (grub_pxefs_fs_int): Likewise.
5103 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5104 connection when we switch file.
5105 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5106
a55d42e0 51072008-08-06 Robert Millan <rmh@aybabtu.com>
5108
5109 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5110 `halt.mod'.
5111 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5112 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5113
5114 * kern/i386/halt.c: New file.
5115 * kern/i386/reboot.c: Likewise.
5116 * include/grub/i386/reboot.h: Likewise.
5117 * include/grub/i386/halt.h: Likewise.
5118
5119 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5120 Include `<grub/cpu/halt.h>'.
5121 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5122 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5123
5124 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5125 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5126 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5127 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5128 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5129 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5130 from here ...
5131 * include/grub/i386/at_keyboard.h: ... to here.
5132
24371d26 51332008-08-05 Robert Millan <rmh@aybabtu.com>
5134
5135 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5136 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5137 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5138 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5139 `kern/generic/millisleep.c'.
5140
5141 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5142 instead of grub_get_rtc().
5143 (grub_tsc_init): Initialize `tsc_boot_time'.
5144
5145 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5146 (grub_machine_init): Use grub_tsc_init() rather than
5147 installing an RTC-based handler via grub_install_get_time_ms().
5148
5149 * kern/i386/pit.c: New file.
5150 * include/grub/i386/pit.h: Likewise.
5151
9e7007b3 51522008-08-05 Bean <bean123ch@gmail.com>
5153
5154 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5155
5156 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5157 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5158 (pxe_mod_SOURCES): New macro.
5159 (pxe_mod_CFLAGS): Likewise.
5160 (pxe_mod_LDFLAGS): Likewise.
5161 (pxecmd_mod_SOURCES): Likewise.
5162 (pxecmd_mod_CFLAGS): Likewise.
5163 (pxecmd_mod_LDFLAGS): Likewise.
5164
5165 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5166 (grub_pxe_call): Likewise.
5167
5168 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5169
5170 * commands/i386/pc/pxecmd.c: New file.
5171
9f0234cb 5172 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 5173
5174 * include/grub/i386/pc/pxe.h: Likewise.
5175
6977d49f 51762008-08-05 Bean <bean123ch@gmail.com>
5177
5178 * util/console.c (grub_console_cur_color): New variable.
5179 (grub_console_standard_color): Likewise.
5180 (grub_console_normal_color): Likewise.
5181 (grub_console_highlight_color): Likewise.
5182 (color_map): Likewise.
5183 (use_color): Likewise.
5184 (NUM_COLORS): New macro.
5185 (grub_ncurses_setcolorstate): Handle color properly.
5186 (grub_ncurses_setcolor): Don't change color here, just remember the
5187 settings, color will be set in grub_ncurses_setcolorstate.
5188 (grub_ncurses_getcolor): New function.
5189 (grub_ncurses_init): Initialize color pairs.
5190 (grub_ncurses_term): New member grub_ncurses_getcolor.
5191
9c2ff3ee 51922008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 5193
9c2ff3ee 5194 High resolution timer support. Implemented for x86 CPUs using TSC.
5195 Extracted generic grub_millisleep() so it's linked in only as needed.
5196 This requires a Pentium compatible CPU; if the RDTSC instruction is
5197 not supported, then it falls back on the generic grub_get_time_ms()
5198 implementation that uses the machine's RTC.
5199
5200 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5201 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5202 `kern/generic/millisleep.c'.
5203
5204 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5205 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5206
5207 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5208 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5209
5210 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5211
5212 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5213 `kern/generic/millisleep.c'.
5214
5215 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5216
5217 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5218
5219 * kern/generic/rtc_get_time_ms.c: New file.
5220
5221 * kern/generic/millisleep.c: New file.
337f5a1e 5222
9c2ff3ee 5223 * kern/misc.c: Don't include
5224 <kern/time.h> anymore.
5225 (grub_millisleep_generic): Removed.
5226
5227 * commands/sleep.c (grub_interruptible_millisleep): Uses
5228 grub_get_time_ms() instead of grub_get_rtc().
5229
5230 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5231 function.
5232 (grub_cpu_is_cpuid_supported): New inline function.
5233 (grub_cpu_is_tsc_supported): New inline function.
5234 (grub_tsc_init): New function prototype.
5235 (grub_tsc_get_time_ms): New function prototype.
5236
5237 * kern/i386/tsc.c (grub_get_time_ms): New file.
5238
5239 * include/grub/time.h: Include <grub/types.h.
5240 (grub_millisleep_generic): Removed.
5241 (grub_get_time_ms): New prototype.
5242 (grub_install_get_time_ms): New prototype.
5243 (grub_rtc_get_time_ms): New prototype.
5244
5245 * kern/time.c (grub_get_time_ms): New function.
5246 (grub_install_get_time_ms): New function.
5247
5248 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5249 <grub/time.h> anymore.
5250 (grub_millisleep): Removed.
5251 (grub_machine_init): Call grub_tsc_init.
5252
5253 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5254 get_time_ms() implementation.
5255
5256 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5257 (ieee1275_get_time_ms): New function.
5258 (grub_machine_init): Install get_time_ms() implementation.
5259
5260 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5261 (grub_machine_init): Call grub_tsc_init().
5262 (grub_millisleep): Removed.
bf06a93f 5263
9c2ff3ee 5264 * kern/ieee1275/init.c (grub_millisleep): Removed.
5265 (grub_machine_init): Install ieee1275_get_time_ms()
5266 implementation.
5267 (ieee1275_get_time_ms): New function.
5268 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5269 real work.
5270
9ec92aaf 52712008-08-05 Marco Gerards <marco@gnu.org>
5272
5273 * disk/ata.c: Include <grub/pci.h>.
5274 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5275 (grub_ata_initialize): Rewritten.
5276 (grub_ata_device_initialize): New function.
5277
8d23f507 52782008-08-04 Pavel Roskin <proski@gnu.org>
5279
5280 * kern/main.c: Include grub/mm.h.
5281
5e15ee3d 52822008-08-04 Robert Millan <rmh@aybabtu.com>
5283
5284 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5285 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5286 corruption problem).
5287
a9053f8f 52882008-08-04 Robert Millan <rmh@aybabtu.com>
5289
5290 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5291 warnings introduced in my last commit.
5292
dd19c7d7 52932008-08-03 Robert Millan <rmh@aybabtu.com>
5294
5295 Make PCI available on all i386 architectures.
5296
5297 * include/grub/i386/pc/pci.h: Move from here ...
5298 * include/grub/i386/pci.h: ... to here.
5299
5300 * include/grub/i386/pc/pci.h: Remove.
5301 * include/grub/i386/efi/pci.h: Remove.
5302 * include/grub/x86_64/efi/pci.h: Remove.
5303
5304 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5305 `<grub/cpu/pci.h>'.
5306
5307 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5308 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5309 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5310
5311 * conf/i386-ieee1275.rmk: Likewise.
5312
e14a6184 53132008-08-03 Robert Millan <rmh@aybabtu.com>
5314
5315 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5316 (grub_console_setcursor): Make it possible to set cursor off.
5317
52768e37 53182008-08-03 Robert Millan <rmh@aybabtu.com>
5319
5320 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5321 of modules instead of assuming which platform provides what.
5322 * util/update-grub.in: Likewise.
5323
2d52f57f 53242008-08-03 Robert Millan <rmh@aybabtu.com>
5325
5326 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5327 instead of `grub_install_dos_part' to determine whether a drive needs
5328 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 5329 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 5330
2a5cd121 53312008-08-02 Robert Millan <rmh@aybabtu.com>
5332
5333 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5334
93808428 53352008-08-02 Robert Millan <rmh@aybabtu.com>
5336
5337 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5338 of informational grub_dprintf() calls.
5339
3bd0a12a 53402008-08-02 Robert Millan <rmh@aybabtu.com>
5341
5342 * disk/memdisk.c (memdisk_size): Don't initialize.
5343 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5344
5345 * include/grub/i386/pc/kernel.h
5346 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5347 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5348 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5349 (grub_arch_memdisk_size): Remove.
5350
5351 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5352 field (was only used to transfer a constant). Add `type' field to
5353 support multiple module types.
5354 (grub_module_iterate): New function.
5355
5356 * kern/device.c (grub_device_open): Do not hide error messages
5357 when grub_disk_open() fails. Use grub_print_error() instead.
5358
5359 * kern/i386/pc/init.c (grub_arch_modules_addr)
5360 (grub_arch_memdisk_size): Remove functions.
5361 (grub_arch_modules_addr): Return the module address in high memory
5362 (now that it isn't copied anymore).
5363
5364 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5365 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5366 decompression routine (grub_total_module_size already includes that
5367 now). Don't copy modules back to low memory.
5368
5369 * kern/main.c: Include `<grub/mm.h>'.
5370 (grub_load_modules): Split out (and use) ...
5371 (grub_module_iterate): ... this function, which iterates through
5372 module objects and runs a hook.
5373 Comment out grub_mm_init_region() call, as it would cause non-ELF
5374 modules to be overwritten.
5375
5376 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5377 the memdisk image in its own region, make it part of the module list.
5378 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5379 (main): Parse --memdisk|-m option, and pass user-provided path as
5380 parameter to generate_image().
5381 (add_segments): Pass `memdisk_path' down to load_modules().
5382 (load_modules): Embed memdisk image in module section when requested.
5383 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5384 `header.type' instead of `header.offset'.
5385
5386 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5387 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5388 (memdisk_mod_LDFLAGS): New variables.
5389 * conf/i386-coreboot.rmk: Likewise.
5390 * conf/i386-ieee1275.rmk: Likewise.
5391
a927cc73 53922008-08-02 Robert Millan <rmh@aybabtu.com>
5393
5394 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5395 (backward_relocator): New variables. Used to allocate and relocate
5396 the payload, respectively.
5397 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 5398 address, install the appropriate relocator code in each bound of
a927cc73 5399 the payload, and set the entry point such that
5400 grub_multiboot_real_boot() will jump to one of them.
5401
5402 * kern/i386/loader.S (grub_multiboot_payload_size)
5403 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5404 (grub_multiboot_payload_entry_offset): New variables.
5405 (grub_multiboot_real_boot): Set cpu context to what the relocator
5406 expects, and jump to the relocator instead of the payload.
5407
5408 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5409 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5410 (grub_multiboot_payload_entry_offset): Export.
5411
b15d8a0c 54122008-08-01 Bean <bean123ch@gmail.com>
5413
5414 * normal/menu_entry.c (editor_getline): Don't return the original
5415 string as result, as it will be released by lexer once it has done
5416 using it.
5417
cdfb3d22 54182008-08-01 Robert Millan <rmh@aybabtu.com>
5419
5420 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5421 within menuentries, not before them.
5422 util/grub.d/10_hurd.in: Likewise.
5423
9175e93d 54242008-08-01 Bean <bean123ch@gmail.com>
5425
5426 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5427 (bufio_mod_SOURCES): New macro.
5428 (bufio_mod_CFLAGS): Likewise.
5429 (bufio_mod_LDFLAGS): Likewise.
5430
5431 * include/grub/bufio.h: New file.
5432
5433 * io/bufio.c: Likewise.
5434
5435 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5436 (grub_video_reader_png): Use grub_buffile_open to open file.
5437
5438 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5439 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5440
5441 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5442 (grub_video_reader_tga): Use grub_buffile_open to open file.
5443
5444 * font/manager.c: Include <grub/bufio.h>.
5445 (add_font): Use grub_buffile_open to open file.
5446
3d8383e7 54472008-07-31 Robert Millan <rmh@aybabtu.com>
5448
5449 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5450 ELF segments, use a macro for arbitrarily accessing any of them instead
5451 of preparing a pointer that allows access to one at a time.
5452 (grub_multiboot_load_elf64): Likewise.
5453
16e641b6 54542008-07-31 Bean <bean123ch@gmail.com>
5455
5456 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5457 GRUB_KERNEL_MACHINE_DATA_END.
5458
59198b72 54592008-07-30 Robert Millan <rmh@aybabtu.com>
5460
5461 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5462 Increase from 0x50 to 0x60.
5463 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5464 use UUIDs to identify the root drive for them. If that's not
5465 possible, abort.
5466 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5467 check, for cross-disk installs.
5468
ae88bca3 54692008-07-30 Robert Millan <rmh@aybabtu.com>
5470
5471 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5472 is non-empty, use it to set the `prefix' environment variable instead
5473 of the usual approach.
5474 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5475 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5476 environment variable instead of dummy make_install_device().
5477
5478 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5479 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 5480 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 5481
5482 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5483 New variable reference.
5484 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5485 New macro. Defines offset of `grub_prefix' within startup.S (relative
5486 to `start').
5487 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5488 section within startup.S (relative to `start').
5489 * include/grub/i386/coreboot/kernel.h: Likewise.
5490
5491 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5492 Overwrite grub_prefix with its contents, at the beginning of the
5493 first segment.
5494 (main): Understand -p|--prefix.
5495
14f41dd1 54962008-07-30 Robert Millan <rmh@aybabtu.com>
5497
5498 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5499
4ca049a3 55002008-07-30 Robert Millan <rmh@aybabtu.com>
5501
5502 * term/i386/pc/vga_text.c (grub_console_cls): Use
5503 grub_console_gotoxy() to go back to beginning of the screen.
5504 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5505
2921d337 55062008-07-29 Christian Franke <franke@computer.org>
5507
5508 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5509 Add conversion of emulated mount points on Cygwin.
5510
b609876d 55112008-07-29 Christian Franke <franke@computer.org>
5512
5513 * util/update-grub.in: Add a check for admin
5514 group on Cygwin.
5515 Remove old `grub.cfg.new' before creation.
5516 Add `-f' to `mv' to handle the different filesystem
5517 semantics of Windows.
5518
e93e4679 55192008-07-29 Bean <bean123ch@gmail.com>
5520
5521 * normal/main.c (get_line): Fix buffer overflow bug.
5522
41694fd0 55232008-07-28 Robert Millan <rmh@aybabtu.com>
5524
5525 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5526 (struct grub_apple_header): New struct. Describes the layout of
5527 the partmap header.
5528 (apple_partition_map_iterate): Check the header magic as well as the
5529 partition magic (which was already being checked).
5530
cfd0b4e6 55312008-07-28 Pavel Roskin <proski@gnu.org>
5532
5533 * genmk.rb: Add a warning to the beginning of the output that
5534 it's a generated file and should not be edited.
5535
93cce016 55362008-07-28 Robert Millan <rmh@aybabtu.com>
5537
5538 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5539 with the same number are found, just use issue a warning with
5540 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 5541
cd1df915 55422008-07-27 Robert Millan <rmh@aybabtu.com>
5543
5544 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5545 information.
5546
b70a8427 55472008-07-27 Bean <bean123ch@gmail.com>
5548
5549 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5550 (grub_fat_find_dir): Ignore case when comparing filename.
5551
8f5e379f 55522008-07-27 Bean <bean123ch@gmail.com>
5553
5554 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5555 smallino, as it's more descriptive, and i8count can be confused with
5556 the other field count.
5557 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5558 inode type.
5559
a85cd5a0 55602008-07-27 Bean <bean123ch@gmail.com>
5561
5562 * commands/crc.c: New file.
5563
5564 * lib/crc.c: Likewise.
5565
5566 * include/grub/lib/crc.h: Likewise.
5567
5568 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5569
5570 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5571 (hexdump): Move this function to ...
5572
5573 * lib/hexdump.c: ... here.
5574
5575 * include/grub/hexdump.h: Renamed to ...
5576
5577 * include/grub/lib/hexdump.h: ... this.
5578
5579 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5580
5581 * util/grub-editenv.c: Likewise.
5582
5583 * include/envblk.h: Renamed to ...
5584
5585 * include/lib/envblk.h: ... this.
5586
5587 * util/envblk.c: Renamed to ...
5588
5589 * lib/envblk.c: ... this.
5590
5591 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5592 lib/hexdump.c.
5593 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5594 (pkglib_MODULES): Add crc.mod.
5595 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5596 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5597 (crc_mod_SOURCES): New macro.
5598 (crc_mod_CFLAGS): Likewise.
5599 (crc_mod_LDFLAGS): Likewise.
5600
5601 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5602
5603 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5604
5605 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5606
5607 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5608
5609 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5610
c298def0 56112008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 5612
5613 * commands/help.c: Include <grub/term.h>.
5614 (TERM_WIDTH): Removed. Updated all users.
5615
cc349fb3 56162008-07-27 Pavel Roskin <proski@gnu.org>
5617
5618 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5619 spurious warnings about a comment within a comment.
5620
9051607e 56212008-07-25 Robert Millan <rmh@aybabtu.com>
5622
5623 * util/getroot.c (find_root_device): Skip devices that match
5624 /dev/dm-[0-9]. This lets the real device be found for any type of
5625 abstraction (LVM, EVMS, RAID..).
5626 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5627 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5628 device is found first, find_root_device() will now skip it.
5629
01453bfc 56302008-07-24 Pavel Roskin <proski@gnu.org>
5631
5632 * include/grub/types.h: Use __builtin_bswap32() and
5633 __builtin_bswap64() with gcc 4.3 and newer.
5634
6af9849f 56352008-07-24 Christian Franke <franke@computer.org>
5636
3a0fa256 5637 * util/i386/pc/grub-install.in: If `--debug' is specified,
5638 pass `--verbose' to grub-setup.
5639 Abort script if make_system_path_relative_to_its_root() fails.
5640
7810e747 56412008-07-24 Bean <bean123ch@gmail.com>
5642
5643 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5644 variable `target_platform' should be `platform'.
5645
42290e17 56462008-07-24 Bean <bean123ch@gmail.com>
5647
51cc5193 5648 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 5649 (grub_png_init_fixed_block): New function.
5650 (grub_png_decode_image_data): Handle fixed huffman code compression.
5651
2a8a80e4 56522008-07-24 Bean <bean123ch@gmail.com>
5653
5654 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5655 (grub_pe2elf_SOURCES): New macro.
5656 (CLEANFILES): Add grub-pe2elf.
5657
5658 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5659 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5660 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5661 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5662 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5663 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5664 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5665 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5666 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5667 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5668 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5669 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5670 (GRUB_PE32_DT_FUNCTION): Likewise.
5671 (GRUB_PE32_REL_I386_DIR32): Likewise.
5672 (GRUB_PE32_REL_I386_REL32): Likewise.
5673 (grub_pe32_symbol): New structure.
5674 (grub_pe32_reloc): Likewise.
5675
5676 * util/grub-pe2elf.c: New file.
5677
5678 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5679 start symbol in non pc platform.
5680
5681 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5682
5683 The following patches are from Christian Franke.
5684
5685 * include/grub/dl.h: Remove .previous, gas supports this only
5686 for ELF format.
5687
5688 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5689 Remove .type, gas supports this only for ELF format.
5690
5691 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5692 nullbytes in symbol table. This fixes an infinite loop if table is
5693 zero filled.
5694
5695 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5696 TARGET_IMG_LDFLAGS and EXEEXT.
5697
5698 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5699 TARGET_IMG_LDFLAGS_AC.
5700 (grub_CHECK_STACK_ARG_PROBE): New function.
5701
5702 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5703
5704 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5705
5706 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5707 to set TARGET_IMG_LD* accordingly.
5708 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5709 Add call to grub_CHECK_STACK_ARG_PROBE.
5710 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5711
5712 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5713
5714 * genmk.rb: Add EXEEXT to CLEANFILES.
5715
12ccdb75 57162008-07-23 Robert Millan <rmh@aybabtu.com>
5717
5718 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5719 define the codes for arrows and lines used for the menu).
5720 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5721 as well.
5722
5723 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5724 fonts, because the latter are too slow.
5725
18eeaf04 57262008-07-21 Bean <bean123ch@gmail.com>
5727
5728 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5729 a20. Run keyboard test last, as it will cause macbook to halt.
5730
b095e2ad 57312008-07-18 Pavel Roskin <proski@gnu.org>
5732
5733 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5734 load foreign architecture modules correctly anyway. Keep
5735 support for loading host architecture modules, whether we
5736 compile them or not.
5737
737feb35 57382008-07-17 Pavel Roskin <proski@gnu.org>
5739
3f4ce737 5740 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5741 change target_cpu. The compiler default can mismatch target_cpu
5742 in any case.
5743
4ad2d049 5744 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5745 * kern/efi/efi.c: Likewise.
5746
f6130a12 5747 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5748 target compiler is functional.
5749 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5750 are set up.
5751
58393a2d 5752 * configure.ac: Default to efi platform for x86_64-apple. Allow
5753 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5754 adjustments from the rest, only do them if target is not
5755 explicitly given. Merge other adjustments with the final sanity
5756 check. Remove an extraneous check for supported CPU. Be
5757 specific which CPU and which platform is not supported.
5758
737feb35 5759 * configure.ac: Default to pc platform for x86_64.
5760
546f966a 57612008-07-17 Robert Millan <rmh@aybabtu.com>
5762
5763 Partial LinuxBIOS -> Coreboot rename.
5764
5765 * conf/i386-linuxbios.rmk: Renamed to ...
5766 * conf/i386-coreboot.rmk: ... this.
5767 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5768 * configure.ac: Accept "coreboot" as input platform (but maintain
5769 compatibility with "linuxbios").
5770 * include/grub/i386/linuxbios: Renamed to ...
5771 * include/grub/i386/coreboot: ... this.
5772
20011694 57732008-07-17 Bean <bean123ch@gmail.com>
5774
5775 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 5776 (appleldr_mod_SOURCE): New variable.
20011694 5777 (appleldr_mod_CFLAGS): Likewise.
5778 (appleldr_mod_LDFLAGS): Likewise.
5779 (pci_mod_SOURCES): Likewise.
5780 (pci_mod_CFLAGS): Likewise.
5781 (pci_mod_LDFLAGS): Likewise.
5782 (lspci_mod_SOURCES): Likewise.
5783 (lspci_mod_CFLAGS): Likewise.
5784 (lspci_mod_LDFLAGS): Likewise.
5785
5786 * conf/x86_64-efi.rmk: New file.
5787
5788 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5789 macro.
5790 (grub_efidisk_write): Likewise.
5791
5792 * include/efi/api.h (efi_call_0): New macro.
5793 (efi_call_1): Likewise.
5794 (efi_call_2): Likewise.
5795 (efi_call_3): Likewise.
5796 (efi_call_4): Likewise.
5797 (efi_call_5): Likewise.
5798 (efi_call_6): Likewise.
5799
5800 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5801 grub_rescue_cmd_chainloader.
5802
5803 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5804 (grub_pe32_optional_header): Change some fields based on i386 or
5805 x86_64 platform.
5806 (GRUB_PE32_PE32_MAGIC): Likewise.
5807
5808 * include/grub/efi/uga_draw.h: New file.
5809
5810 * include/grub/elf.h (STN_ABS): New constant.
5811 (R_X86_64_NONE): Relocation constant for x86_64.
5812 (R_X86_64_64): Likewise.
5813 (R_X86_64_PC32): Likewise.
5814 (R_X86_64_GOT32): Likewise.
5815 (R_X86_64_PLT32): Likewise.
5816 (R_X86_64_COPY): Likewise.
5817 (R_X86_64_GLOB_DAT): Likewise.
5818 (R_X86_64_JUMP_SLOT): Likewise.
5819 (R_X86_64_RELATIVE): Likewise.
5820 (R_X86_64_GOTPCREL): Likewise.
5821 (R_X86_64_32): Likewise.
5822 (R_X86_64_32S): Likewise.
5823 (R_X86_64_16): Likewise.
5824 (R_X86_64_PC16): Likewise.
5825 (R_X86_64_8): Likewise.
5826 (R_X86_64_PC8): Likewise.
5827
5828 * include/grub/i386/efi/pci.h: New file.
5829
5830 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5831 Change it value based on platform.
5832 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5833 (GRUB_E820_RAM): Likewise.
5834 (GRUB_E820_RESERVED): Likewise.
5835 (GRUB_E820_ACPI): Likewise.
5836 (GRUB_E820_NVS): Likewise.
5837 (GRUB_E820_EXEC_CODE): Likewise.
5838 (GRUB_E820_MAX_ENTRY): Likewise.
5839 (grub_e820_mmap): New structure.
5840 (linux_kernel_header): Change the efi field according to different
5841 kernel version, also field from linux_kernel_header.
5842
5843 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5844
5845 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5846 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5847 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5848 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5849 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5850 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5851 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5852 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5853 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5854 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5855
5856 * include/grub/x86_64/efi/kernel.h: New file.
5857
5858 * include/grub/x86_64/efi/loader.h: Likewise.
5859
5860 * include/grub/x86_64/efi/machine.h: Likewise.
5861
5862 * include/grub/x86_64/efi/pci.h: Likewise.
5863
5864 * include/grub/x86_64/efi/time.h: Likewise.
5865
5866 * include/grub/x86_64/linux.h: Likewise.
5867
5868 * include/grub/x86_64/setjmp.h: Likewise.
5869
5870 * include/grub/x86_64/time.h: Likewise.
5871
5872 * include/grub/x86_64/types.h: Likewise.
5873
5874 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5875 GRUB_TARGET_SIZEOF_VOID_P.
5876
5877 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5878 (grub_efi_locate_handle): Likewise.
5879 (grub_efi_open_protocol): Likewise.
5880 (grub_efi_set_text_mode): Likewise.
5881 (grub_efi_stall): Likewise.
5882 (grub_exit): Likewise.
5883 (grub_reboot): Likewise.
5884 (grub_halt): Likewise.
5885 (grub_efi_exit_boot_services): Likewise.
5886 (grub_get_rtc): Likewise.
5887
5888 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5889 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5890 (grub_efi_allocate_pages): Wrap efi calls.
5891 (grub_efi_free_pages): Wrap efi calls.
5892 (grub_efi_get_memory_map): Wrap efi calls.
5893
5894 * kern/x86_64/dl.c: New file.
5895
5896 * kern/x86_64/efi/callwrap.S: Likewise.
5897
5898 * kern/x86_64/efi/startup.S: Likewise.
5899
5900 * loader/efi/appleloader.c: Likewise.
5901
5902 * loader/efi/chainloader.c (cmdline): New variable.
5903 (grub_chainloader_unload): Wrap efi calls.
5904 (grub_chainloader_boot): Likewise.
5905 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5906 command line.
5907
5908 * loader/efi/chainloader_normal.c (chainloader_command):
5909 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5910 command line.
5911
5912 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5913 method.
5914 (grub_e820_add_region): New function.
5915 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5916 booting.
5917 (grub_find_video_card): New function.
5918 (grub_linux_setup_video): New function.
5919 (grub_rescue_cmd_linux): Probe for video information.
5920
5921 * normal/x86_64/setjmp.S: New file.
5922
5923 * term/efi/console.c (map_char): New function.
5924 (grub_console_putchar): Map unicode char.
5925 (grub_console_checkkey): Wrap efi calls.
5926 (grub_console_getkey): Likewise.
5927 (grub_console_getwh): Likewise.
5928 (grub_console_gotoxy): Likewise.
5929 (grub_console_cls): Likewise.
5930 (grub_console_setcolorstate): Likewise.
5931 (grub_console_setcursor): Likewise.
5932
5933 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5934
59652a20 59352008-07-16 Pavel Roskin <proski@gnu.org>
5936
ef294055 5937 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5938 format strings.
5939
59652a20 5940 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5941 pointer, not an integer. This fixes a warning and prevents
5942 precision loss on 64-bit systems.
5943 (relocate_addresses): Remove unneeded cast.
5944
afc3b5d7 59452008-07-15 Pavel Roskin <proski@gnu.org>
5946
506b2b3e 5947 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5948
62ead89c 5949 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5950
c4cd51d7 5951 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5952 Fix comparison between signed and unsigned.
5953
0d3d8f28 5954 * include/grub/i386/ieee1275/console.h: Declare
5955 grub_console_init() and grub_console_fini().
5956
8804b286 5957 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5958 It's empty and unused.
5959
ee01cf35 5960 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5961 beginning to avoid warnings with some compilers.
5962
afc3b5d7 5963 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5964 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5965
e4e8eaa5 59662008-07-14 Pavel Roskin <proski@gnu.org>
5967
407aceb4 5968 * kern/env.c (grub_register_variable_hook): Don't copy empty
5969 string, it leaks memory. Pass "" to grub_env_set(), it should
5970 handle constant strings.
5971
e4e8eaa5 5972 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5973 * commands/cmp.c (grub_cmd_cmp): Likewise.
5974 * kern/dl.c (grub_dl_flush_cache): Likewise.
5975 (grub_dl_load_core): Likewise.
5976 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5977 (grub_elf64_load_phdrs): Likewise.
5978
d4e2dad3 59792008-07-13 Pavel Roskin <proski@gnu.org>
5980
5981 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5982 between signed and unsigned.
5983 (LzmaEnc_Finish): Fix warning about an unused parameter.
5984
aa24b516 59852008-07-13 Bean <bean123ch@gmail.com>
5986
5987 * Makefile.in (enable_lzo): New rule.
5988
5989 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5990
5991 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5992
5993 * boot/i386/pc/lnxboot.S: #include <config.h>.
5994
5995 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 5996 its value according to the compression algorithm used, lzo or lzma.
aa24b516 5997
5998 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5999 compression algorithm according to configure macro.
6000
6001 * kern/i386/pc/startup.S (codestart): Likewise.
6002
6003 * kern/i386/pc/lzma_decode.S: New file.
6004
6005 * include/grub/lib/LzFind.h: Likewise.
6006
6007 * include/grub/lib/LzHash.h: Likewise.
6008
6009 * include/grub/lib/LzmaDec.h: Likewise.
6010
6011 * include/grub/lib/LzmaEnc.h: Likewise.
6012
6013 * include/grub/lib/LzmaTypes.h: Likewise.
6014
6015 * lib/LzFind.c: Likewise.
6016
6017 * lib/LzmaDec.c: Likewise.
6018
6019 * lib/LzmaEnc.c: Likewise.
6020
4ae821ac 60212008-07-13 Bean <bean123ch@gmail.com>
6022
6023 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6024 (grub_ext4_extent_header): New structure.
6025 (grub_ext4_extent): Likewise.
6026 (grub_ext4_extent_idx): Likewise.
6027 (grub_ext4_find_leaf): New function.
6028 (grub_ext2_read_block): Handle extents.
6029
9a745147 60302008-07-12 Robert Millan <rmh@aybabtu.com>
6031
6032 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6033
d49a4cf6 60342008-07-11 Robert Millan <rmh@aybabtu.com>
6035
6036 * util/grub.d/40_custom.in: New file. Example on how to add custom
6037 entries to /etc/grub.d.
6038 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6039 40_custom (implicitly, by merging all the grub.d rules).
6040
947414b4 60412008-07-11 Pavel Roskin <proski@gnu.org>
6042
0059cf6f 6043 * commands/read.c (grub_getline): Fix invalid memory access.
6044 Don't add newline to the variable value.
6045
947414b4 6046 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6047 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6048 (serial_hw_get_port): Check validity of the port number.
6049 (grub_cmd_serial): Check return value of serial_hw_get_port().
6050
62a02d00 60512008-07-07 Pavel Roskin <proski@gnu.org>
6052
6053 * boot/i386/pc/diskboot.S (notification_string): Replace
6054 "Loading kernel" with just "loading". This is shorter, less
6055 confusing and saves a few bytes for possible future changes.
6056
3e5581b0 60572008-07-05 Pavel Roskin <proski@gnu.org>
6058
ea387a48 6059 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6060 size for ATAPI devices, they are undefined. Output sector
6061 number in decimal form.
6062
3e5581b0 6063 * disk/ata.c: Use named constants for status bits.
6064
fdecb8fd 60652008-07-04 Pavel Roskin <proski@gnu.org>
6066
bcd35b90 6067 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6068 grub_addr_t before casting it to the void pointer to fix a
6069 warning. Non-addressable regions are discarded earlier.
6070 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6071 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6072 (check_signature): Don't shadow table_header.
6073 (grub_linuxbios_table_iterate): Cast numeric constants to
6074 grub_linuxbios_table_header_t.
6075 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6076 grub_stop().
6077
af58ab3d 6078 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6079 prevent warnings.
6080
1759aa57 6081 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6082 pointer, which can cause warnings. Support 64-bit addresses.
6083
fdecb8fd 6084 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6085 of sizeof(long). This fixes PowerPC image generation on x86_64.
6086
8516d2a8 60872008-07-04 Robert Millan <rmh@aybabtu.com>
6088
6089 This fixes a performance issue when pc & gpt partmap iterators
6090 didn't abort iteration even after our hook found what it was
fe987087 6091 looking for (often causing expensive probes of non-existent drives).
8516d2a8 6092
6093 Some callers relied on previous buggy behaviour, since they would
34c44600 6094 raise an error when their own hooks caused early abortion of its
8516d2a8 6095 iteration.
6096
6097 * kern/device.c (grub_device_open): Improve error message.
6098 * disk/lvm.c (grub_lvm_open): Likewise.
6099 * disk/raid.c (grub_raid_open): Likewise.
6100
6101 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6102 when hook requests it, independently of grub_errno.
6103 (pc_partition_map_probe): Do not fail when find_func() caused
6104 early abortion of pc_partition_map_iterate().
6105
6106 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6107 when hook requests it, independently of grub_errno.
6108 (gpt_partition_map_probe): Do not fail when find_func() caused
6109 early abortion of gpt_partition_map_iterate().
6110
6111 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6112 when hook requests it, independently of grub_errno. Do not fail when
6113 part_map_iterate_hook() caused early abortion of p->iterate().
6114
6115 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6116 when grub_partition_iterate() returned with non-zero.
6117
277d0de9 61182008-07-03 Pavel Roskin <proski@gnu.org>
6119
6120 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6121 like we do in grub_ata_pio_read().
6122 (grub_ata_readwrite): Always write individual sectors. Fix the
6123 sector count for the remainder.
6124 (grub_ata_write): Enable writing to ATA devices. Correctly
6125 report error for ATAPI devices.
6126
d4c9b428 61272008-07-02 Pavel Roskin <proski@gnu.org>
6128
e43fc690 6129 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6130 warning.
6131
f707af42 6132 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6133 for every read sector, we already increment it for the whole
6134 batch. This fixes reading more than 256 sectors at once.
6135
11e16b15 6136 * util/grub-editenv.c (cmd_info): Cast argument to long
6137 explicitly. ptrdiff_t reduces to int on i386.
6138
cbabfdd4 6139 * util/grub-editenv.c (main): Be specific which parameter is
6140 missing.
6141
b8fbce0a 6142 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6143 (memdisk): Make memdisk_orig_addr a pointer.
6144
c9c8e606 6145 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6146 for file offsets, use grub_off_t instead. Fix printf format
6147 warnings.
6148
ca62e598 6149 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6150 there. Real unexpected warnings should not drown in the noise
6151 about known problems.
6152
ce8d1766 6153 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6154 grub_disk_addr_t for memory addresses.
6155
00c7a56a 6156 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6157 explicitly to fix a warning.
6158
08d3ef09 6159 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6160
cb71ba20 6161 * Makefile.in (MODULE_LDFLAGS): New variable.
6162 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6163 the linker accepts --build-id=none.
6164 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6165 MODULE_LDFLAGS.
6166 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6167
d4c9b428 6168 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6169 those in Linux XFS code. Provide a way to access 64-bit parent
6170 inode.
6171 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6172 the end of struct grub_xfs_dir_header.
6173
d4156eee 61742008-07-02 Bean <bean123ch@gmail.com>
6175
6176 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6177 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6178 and GRUB_IEEE1275_FLAG_NO_ANSI.
6179
6180 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6181 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6182 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6183
6184 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6185 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6186
6187 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6188 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6189
6190 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6191 esc sequence on non ANSI terminal.
6192 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6193
6194 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6195 beginning of file.
6196
2270f77b 61972008-07-02 Bean <bean123ch@gmail.com>
6198
6199 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6200 (grub_editenv_SOURCES): New variable.
6201 (pkglib_MODULES): Add loadenv.mod.
6202 (loadenv_mod_SOURCES): New variable.
6203 (loadenv_mod_CFLAGS): Likewise.
6204 (loadenv_mod_LDFLAGS): Likewise.
6205
6206 * include/grub/envblk.h: New file.
6207
6208 * util/envblk.c: New file.
6209
6210 * util/grub-editenv.c: New file.
6211
6212 * commands/loadenv.c: New file.
6213
0e9e51ec 62142008-07-01 Pavel Roskin <proski@gnu.org>
6215
d89b7634 6216 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6217 not unsigned char. This fixes warnings and is consistent with
6218 other tags.
6219
bf1835b1 6220 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6221
8222a04b 6222 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6223
6a42d99d 6224 * term/tparm.c (analyze): Always set *popcount.
6225
10b159d1 6226 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6227 cast to fix a warning.
6228
b8789f6c 6229 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6230 cast to suppress a warning.
6231
29d7e38a 6232 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6233 grub_fshelp_read_file() expects.
6234
f341f669 6235 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6236 write uuid as a 32-bit value in CPU byte order, so declare and
6237 use it as such.
6238
0e9e51ec 6239 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6240 long if the format specifier expects it.
6241 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6242 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6243 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6244 long to fix a warning.
6245 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6246 grub_dprintf() arguments to fix warnings.
6247
3aefa857 62482008-06-30 Pavel Roskin <proski@gnu.org>
6249
56c7668b 6250 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6251 install_bsd_part immediately before core.img is embedded or
6252 modified on disk. This fixes core.img verification if core.img
6253 cannot be embedded.
6254
3aefa857 6255 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6256 core_path to calculate the blocklist.
6257 Patch from Javier Martín <lordhabbit@gmail.com>
6258
5444088d 62592008-06-29 Robert Millan <rmh@aybabtu.com>
6260
6261 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6262 block to disk block.
6263 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6264 Patch from Niels Böhm <bitbucket@arcor.de>
6265
674835c8 62662008-06-29 Robert Millan <rmh@aybabtu.com>
6267
6268 * util/update-grub_lib.in (font_path): Search for fonts in
6269 /boot/grub first, which is more likely to be readable (we aren't
6270 deciding where fonts live, just looking for them).
6271
f527dbc8 62722008-06-26 Pavel Roskin <proski@gnu.org>
6273
6c2d8df6 6274 * util/biosdisk.c (read_device_map): Don't leave dead map
6275 entries for devices failing stat() check.
6276
f527dbc8 6277 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6278 core_path_dev for the core.img path on the target device.
6279
aebe3d13 62802008-06-26 Robert Millan <rmh@aybabtu.com>
6281
6282 * disk/fs_uuid.c: New file.
6283 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6284 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6285 (fs_uuid_mod_LDFLAGS): New variables.
6286 * include/grub/disk.h (grub_disk_dev_id): Add
6287 `GRUB_DISK_DEVICE_UUID_ID'.
6288 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6289 implement iterate().
6290
37aaf354 62912008-06-26 Robert Millan <rmh@aybabtu.com>
6292
6293 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6294 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6295 Linux image includes no initrd.
6296
25ff262a 62972008-06-21 Javier Martín <lordhabbit@gmail.com>
6298
6299 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6300 call to resolve the core image location that effectively appended the
6301 name twice.
6302
76a2bd44 63032008-06-21 Robert Millan <rmh@aybabtu.com>
6304
6305 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6306 call from here ...
6307
6308 * util/grub.d/10_hurd.in: ... to here ...
6309 * util/grub.d/10_linux.in: ... and here.
6310
650e1c79 63112008-06-19 Robert Millan <rmh@aybabtu.com>
6312
fe987087 6313 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 6314 after it has been set by grub_machine_set_prefix().
6315
6ce63911 63162008-06-19 Robert Millan <rmh@aybabtu.com>
6317
6318 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6319 search result when not saving to variable, not the other way around.
6320 When saving to variable, abort iteration as soon as a match is found.
6321
73940cec 63222008-06-19 Robert Millan <rmh@aybabtu.com>
6323
6324 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6325 check for partition that provides /boot/grub. Its logic is flawed,
6326 as it prevents prepare_grub_to_access_device() from being called
6327 multiple times.
6328
3c62a39d 63292008-06-19 Robert Millan <rmh@aybabtu.com>
6330
6331 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6332 "insmod" command directly when abstraction modules are needed,
fe987087 6333 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 6334 since it had already been processed).
6335
47395a42 63362008-06-19 Pavel Roskin <proski@gnu.org>
6337
6338 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6339 changed. This is needed in case GRUB_LIBDIR changes.
6340 * conf/i386-ieee1275.rmk: Likewise.
6341 * conf/i386-linuxbios.rmk: Likewise.
6342 * conf/i386-pc.rmk: Likewise.
6343 * conf/powerpc-ieee1275.rmk: Likewise.
6344
a145ac2d 63452008-06-18 Pavel Roskin <proski@gnu.org>
6346
6347 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6348 kernel_elf_symlist.c to symlist.c for consistency with other
6349 architectures. Update all users.
6350 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6351
7847c51e 63522008-06-18 Robert Millan <rmh@aybabtu.com>
6353
6354 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6355 it in prefix.
6356
6357 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6358 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6359 a RAID device, run setup() for all members independently on whether
6360 LVM abstraction is being used.
6361 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6362 If grub-mkimage has set `*install_dos_part == -2', don't override this
6363 value.
6364 Perform *install_dos_part adjustments independently on whether
6365 we're embedding or not.
6366 Clarify error message when image is too big for embedding.
6367 Remove duplicate *install_dos_part stanza.
6368
b23e5644 63692008-06-17 Robert Millan <rmh@aybabtu.com>
6370
6371 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6372 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6373 variables.
6374 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6375 values in grub_ofconsole_normal_color and
6376 grub_ofconsole_highlight_color (they're not directly related to
6377 background and foreground).
6378 (grub_ofconsole_setcolorstate): Extract background and foreground
6379 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6380
0aac2f79 63812008-06-17 Robert Millan <rmh@aybabtu.com>
6382
6383 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6384 /boot/grub for the check in last commit, not /boot (they could be
6385 different partitions).
6386
3cca7ef3 63872008-06-16 Robert Millan <rmh@aybabtu.com>
6388
6389 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6390 asked to setup access for the same partition that provides /boot,
6391 don't bother using UUIDs since our root already has the value we
6392 want.
6393
347396d8 63942008-06-16 Robert Millan <rmh@aybabtu.com>
6395
6396 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6397 I2O devices.
6398 Patch from Sven Mueller <sven@debian.org>.
6399
991477f8 64002008-06-16 Robert Millan <rmh@aybabtu.com>
6401
6402 * util/update-grub.in: Check for $EUID instead of $UID.
6403 Reported by Vincent Zweije.
6404
d31a32a1 64052008-06-16 Bean <bean123ch@gmail.com>
6406
fe987087 6407 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 6408 (grub_ext2_read_block): Likewise.
6409 (grub_ext2_read_inode): Likewise.
6410 (grub_ext2_mount): Likewise.
6411 (grub_ext2_close): Likewise.
6412 (grub_ext3_get_journal): Removed.
6413
fe987087 6414 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 6415 (grub_reiserfs_read_symlink): Likewise.
6416 (grub_reiserfs_mount): Likewise.
6417 (grub_reiserfs_open): Likewise.
6418 (grub_reiserfs_read): Likewise.
6419 (grub_reiserfs_close): Likewise.
6420 (grub_reiserfs_get_journal): Removed.
6421
6422 * fs/fshelp.c (grub_fshelp_read): Removed.
6423 (grub_fshelp_map_block): Likewise.
6424
6425 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6426 (grub_fshelp_journal): Likewise.
6427 (grub_fshelp_read): Likewise.
6428 (grub_fshelp_map_block): Likewise.
6429
3540a760 64302008-06-16 Pavel Roskin <proski@gnu.org>
6431
6432 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6433 floating point anymore.
6434 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6435
95614c84 64362008-06-15 Pavel Roskin <proski@gnu.org>
6437
6438 * commands/ls.c (grub_ls_list_files): Use integer calculations
6439 for human readable format, avoid floating point use.
6440 * kern/misc.c (grub_ftoa): Remove.
6441 (grub_vsprintf): Remove floating point support.
6442
50465dd6 64432008-06-15 Robert Millan <rmh@aybabtu.com>
6444
fe6b695a 6445 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 6446 devices.
6447 Reported by Max Vozeler.
6448
a9207284 64492008-06-15 Robert Millan <rmh@aybabtu.com>
6450
6451 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6452 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6453 skipped later.
6454 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6455 the beginning of the prefix.
6456
6457 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6458 It is assumed that if we have a memdisk, grub-mkimage has set
6459 grub_prefix to include the "(memdisk)" drive in it.
6460
a7cbd45a 64612008-06-15 Robert Millan <rmh@aybabtu.com>
6462
6463 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6464 Initialize keyboard controller after registering the terminal, so that
6465 grub_printf() can be called from grub_keyboard_controller_init().
6466
21cf716a 64672008-06-15 Robert Millan <rmh@aybabtu.com>
6468
6469 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6470 extent-btree which is written as big endian on disk.
6471 Reported by Alain Greppin <al@chilibi.org>.
6472
23a64d8e 64732008-06-14 Robert Millan <rmh@aybabtu.com>
6474
6475 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6476 * util/i386/pc/grub-install.in (modules): Likewise.
6477
d687651c 64782008-06-13 Pavel Roskin <proski@gnu.org>
6479
6480 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6481
dfe9ddd4 64822008-06-13 Bean <bean123ch@gmail.com>
6483
6484 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6485
6486 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6487
6488 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6489 to indicate sparse block.
6490
16ae7781 64912008-06-12 Pavel Roskin <proski@gnu.org>
6492
e6d1a308 6493 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6494 number, grub_fshelp_read() does it for us.
6495
16ae7781 6496 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6497 linear disk read with journal translation.
6498 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6499 * include/grub/fshelp.h: Declare grub_fshelp_read().
6500
40fd3a2b 65012008-06-09 Pavel Roskin <proski@gnu.org>
6502
6503 * fs/minix.c (grub_minix_mount): Handle error reading
6504 superblock.
6505
f5679726 65062008-06-08 Robert Millan <rmh@aybabtu.com>
6507
6508 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6509 don't append the RAID prefix afterwards.
6510 Reported by Clint Adams.
6511
ce525529 65122008-06-08 Robert Millan <rmh@aybabtu.com>
6513
6514 Based on description from Pavel:
6515 * kern/disk.c (grub_disk_check_range): Rename to ...
6516 (grub_disk_adjust_range): ... this. Add a comment explaining the
6517 tasks performed by this function.
6518
ad4936a0 65192008-06-08 Robert Millan <rmh@aybabtu.com>
6520
6521 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6522 `num_serial' (for consistency with other variables).
6523 (struct grub_ntfs_data): Add `uuid' member.
6524 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6525 (grub_ntfs_uuid): New function.
6526 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6527
dc20b0f9 65282008-06-07 Pavel Roskin <proski@gnu.org>
6529
6530 * util/biosdisk.c (open_device): Revert last change to the
6531 function, it broke installation. The sector needs to be
6532 different dependent on which device is opened.
6533
c5e3cfba 65342008-06-06 Robert Millan <rmh@aybabtu.com>
6535
6536 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6537 rest of GRUB, and breakage doesn't happen if its value were modified.
6538
6539 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6540 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6541 a constant (same value).
6542 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6543 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6544
26a1f8c4 65452008-06-06 Robert Millan <rmh@aybabtu.com>
6546
6547 * util/biosdisk.c (open_device): Do not modify sector offset when
6548 accessing a partition. kern/disk.c already handles this for us.
6549
25d6b327 65502008-06-06 Robert Millan <rmh@aybabtu.com>
6551
6552 * util/grub-emu.c (grub_machine_init): Move code in this function from
6553 here ...
6554 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6555 segfault in case grub_printf() is called).
6556
6557 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6558 grub_probe. Update all users not to explicitly add it again.
6559 (grub_device): New variable; contains corresponding device for grubdir.
6560 (fs_module, partmap_module, devabstraction_module): Pass
6561 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6562 every time.
6563
9ece62fb 65642008-06-05 Robert Millan <rmh@aybabtu.com>
6565
6566 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6567 is found, print it (same layout as with labels).
6568
1ad36d37 65692008-06-04 Robert Millan <rmh@aybabtu.com>
6570
6571 * util/biosdisk.c (get_drive): Rename to ...
6572 (find_grub_drive): ... this. Update all users.
6573
6574 (get_os_disk): Rename to ...
6575 (convert_system_partition_to_system_disk): ... this. Update all users.
6576
6577 (find_drive): Rename to ...
6578 (find_system_device): ... this. Update all users.
6579
e6a30859 65802008-06-04 Robert Millan <rmh@aybabtu.com>
6581
6582 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6583 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6584 (make_device_map): Likewise.
6585
00c108a4 65862008-06-01 Robert Millan <rmh@aybabtu.com>
6587
6588 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6589 before dereferencing it.
6590
6591 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6592 union with fat12/fat16-specific ones. Add some new fields, including
6593 `num_serial' for both versions.
6594 (struct grub_fat_data): Add `uuid' member.
6595 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6596 names. Initialize `data->uuid' using `num_serial'.
6597 (grub_fat_uuid): New function.
6598 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6599
6600 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6601 (grub_reiserfs_uuid): New function.
6602 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6603 member.
6604
6605 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6606 (grub_xfs_uuid): New function.
6607 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6608
1385c5bb 66092008-06-01 Robert Millan <rmh@aybabtu.com>
6610
6611 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6612 code that is backward compatible with pre-uuid search command.
6613
c682dfd7 66142008-05-31 Robert Millan <rmh@aybabtu.com>
6615
6616 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6617 floppies after everything else, to ensure floppy drive isn't accessed
6618 unnecessarily (patch from Bean).
6619
b7db5d47 66202008-05-31 Robert Millan <rmh@aybabtu.com>
6621
6622 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6623 not print device names when we were asked to set a variable.
6624
6e037aa9 66252008-05-31 Robert Millan <rmh@aybabtu.com>
6626
6627 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6628 using "cursor-on" and "cursor-off" commands (understood at least by
6629 the Open Firmware flavour on OLPC).
6630
41305bc8 66312008-05-31 Michael Gorven <michael@gorven.za.net>
6632
6633 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6634 on and off sequences.
6635
69ba137e 66362008-05-31 Robert Millan <rmh@aybabtu.com>
6637
6638 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6639 * util/update-grub.in: Likewise.
6640
520ae21b 66412008-05-30 Pavel Roskin <proski@gnu.org>
6642
6643 * util/biosdisk.c (linux_find_partition): Simplify logic and
6644 make the code more universal. Keep special processing for
6645 devfs, but use a simple rule for all other devices. If the
6646 device ends with a number, append 'p' and the partition number.
6647 Otherwise, append only the partition number.
6648
5786569b 66492008-05-30 Robert Millan <rmh@aybabtu.com>
6650
6651 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6652 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6653 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6654 the `root' parameter to Linux.
6655
51500452 66562008-05-30 Robert Millan <rmh@aybabtu.com>
6657
6658 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6659 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6660 --fs_uuid with --fs-uuid.
6661 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6662 all filesystems support them).
6663
811d3878 66642008-05-30 Robert Millan <rmh@aybabtu.com>
6665
6666 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6667 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6668
cab63c95 66692008-05-30 Robert Millan <rmh@aybabtu.com>
6670
6671 * util/grub.d/00_header.in: Remove obsolete comment referencing
6672 convert_system_path_to_grub_path().
6673 * util/update-grub.in: Likewise.
6674 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6675 (convert_system_path_to_grub_path): Add a warning message explaining
6676 that this function is deprecated. Rely on is_path_readable_by_grub()
6677 for the readability checks.
6678 (font_path): Use is_path_readable_by_grub() for the readability
6679 check rather than convert_system_path_to_grub_path().
6680
972e2f7a 66812008-05-30 Robert Millan <rmh@aybabtu.com>
6682
6683 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6684 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6685 converting it first.
6686 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6687 grub.cfg for access to font file, and afterwards call it again to set
6688 the root device.
6689
62191274 66902008-05-30 Robert Millan <rmh@aybabtu.com>
6691
6692 * commands/search.c (options): Add --fs_uuid option.
6693 (search_fs_uuid): New function.
6694 (grub_cmd_search): Fix --set argument passing.
6695 Use search_fs_uuid() when requested via --fs_uuid.
6696 (grub_search_init): Update help message.
6697 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6698 and redeclare it as an array of 16-bit words.
6699 (grub_ext2_uuid): New function.
6700 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6701 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6702 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6703 (GRUB_DEVICE_BOOT_UUID): New variables.
6704 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6705 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6706 whenever possible.
6707 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6708 just assume `root' variable has the right value.
6709 * util/grub.d/10_linux.in: Likewise.
6710 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6711 via PRINT_FS_UUID.
6712 (main): Recognise `-t fs_uuid' argument.
6713
01b73ec8 67142008-05-30 Robert Millan <rmh@aybabtu.com>
6715
6716 * util/biosdisk.c (map): Redefine structure to hold information
6717 about GRUB drive name.
fe6b695a 6718 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6719 drive names.
6720 (call_hook): Remove.
6721 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6722 member. Assume drive has partitions.
6723 (grub_util_biosdisk_open): Access device names via `.device' struct
6724 member.
6725 (open_device): Likewise.
6726 (find_drive): Likewise.
6727 (read_device_map): Adjust map[] usage to match the new struct
6728 definition. Don't check for duplicates (still possible, but not cheap
6729 anymore).
6730 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6731 (make_device_name): Remove assumption of BIOS-like drive names.
6732
22f16596 67332008-05-30 Pavel Roskin <proski@gnu.org>
6734
6735 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6736 compiling execute.c doesn't need grub_script.tab.h anymore.
6737 (normal/command.c_DEPENDENCIES): Likewise.
6738 (normal/function.c_DEPENDENCIES): Likewise.
6739 * conf/i386-ieee1275.rmk: Likewise.
6740 * conf/i386-linuxbios.rmk: Likewise.
6741 * conf/i386-pc.rmk: Likewise.
6742 * conf/powerpc-ieee1275.rmk: Likewise.
6743 * conf/sparc64-ieee1275.rmk: Likewise.
6744
528ad8f2 67452008-05-29 Pavel Roskin <proski@gnu.org>
6746
d1dff95d 6747 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6748 when scanning metadata for volume group name.
6749
528ad8f2 6750 * include/grub/script.h: Don't include grub_script.tab.h. It's
6751 a generated file, which may only be included from the files with
6752 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6753 use union YYSTYPE, as the later allows forward declaration.
6754 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6755
47248e08 67562008-05-29 Robert Millan <rmh@aybabtu.com>
6757
6758 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6759 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6760 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6761 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6762 scan codes.
6763
ee632529 67642008-05-29 Robert Millan <rmh@aybabtu.com>
6765
6766 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6767 control key combinations.
6768
eee96e08 67692008-05-29 Robert Millan <rmh@aybabtu.com>
6770
6771 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6772 * util/ieee1275/grub-install.in: ... to here.
6773 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6774 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6775 (grub_install_SOURCES): Likewise.
6776
da9a6a94 67772008-05-29 Robert Millan <rmh@aybabtu.com>
6778
6779 * fs/affs.c: Update copyright year.
6780 * fs/ext2.c: Likewise.
6781 * fs/fshelp.c: Likewise.
6782 * fs/hfsplus.c: Likewise.
6783 * fs/ntfs.c: Likewise.
6784 * fs/xfs.c: Likewise.
6785 * include/grub/fshelp.h: Likewise.
6786 * util/grub-mkdevicemap.c: Likewise.
6787
12e65f3a 67882008-05-28 Robert Millan <rmh@aybabtu.com>
6789
6790 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6791 might need to be fatfs to support some firmware implementations
6792 (e.g. OFW or EFI).
6793
23023641 67942008-05-28 Robert Millan <rmh@aybabtu.com>
6795
6796 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6797 devices.
6798 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6799 (make_device_map): Likewise.
6800
887d2619 68012008-05-20 Bean <bean123ch@gmail.com>
6802
6803 * fs/fshelp.c (grub_fshelp_map_block): New function.
6804 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6805 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6806
6807 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6808 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6809 (grub_fshelp_journal): New structure.
6810 (grub_fshelp_map_block): New function prototype.
6811 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6812 (grub_fshelp_map_block): Likewise.
6813
6814 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6815 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6816 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6817 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6818 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6819 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6820 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6821 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6822 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6823 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6824 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6825 (grub_ext2_sblock): New members for journal support.
6826 (grub_ext3_journal_header): New structure.
6827 (grub_ext3_journal_revoke_header): Likewise.
6828 (grub_ext3_journal_block_tag): Likewise.
6829 (grub_ext3_journal_sblock): Likewise.
6830 (grub_fshelp_node): New members logfile and journal.
6831 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6832 grub_fshelp_map_block to get real block number.
6833 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6834 number.
6835 (grub_ext2_read_inode): Likewise.
6836 (grub_ext3_get_journal): New function.
6837 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6838 (grub_ext2_close): Release memory used by journal.
6839
6840 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6841 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6842 (grub_reiserfs_transaction_header): Renamed to
6843 grub_reiserfs_description_block, replace field data with real_blocks.
6844 (grub_reiserfs_commit_block): New structure.
6845 (grub_reiserfs_data): New member journal.
6846 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6847 number.
6848 (grub_reiserfs_read_symlink): Likewise.
6849 (grub_reiserfs_iterate_dir): Likewise.
6850 (grub_reiserfs_open): Likewise.
6851 (grub_reiserfs_read): Likewise.
6852 (grub_reiserfs_get_journal): New function.
6853 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6854 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6855 using grub_reiserfs_get_journal.
6856 (grub_reiserfs_close): Release memory used by journal.
6857
6858 * fs/affs.c (grub_affs_read_block): Change block type to
6859 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6860
6861 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6862
6863 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6864
6865 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6866
6867 * fs/udf.c (grub_udf_read_block): Change block type to
6868 grub_disk_addr_t. Use type cast to avoid warning.
6869
6870 * fs/xfs.c (grub_xfs_read_block): Likewise.
6871
b7c6bed5 68722008-05-16 Christian Franke <franke@computer.org>
6873
6874 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6875 to ensure that break with ESC will always work.
6876 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6877 Remove ESC from keyboard queue.
6878
eedf167f 68792008-05-16 Christian Franke <franke@computer.org>
6880
6881 * util/biosdisk.c: [__CYGWIN__] Add includes.
6882 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6883 (get_os_disk): Move variable declarations to OS specific
6884 parts to avoid warning.
6885 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6886 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6887 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6888 Cygwin.
6889 * util/getroot.c: [__CYGWIN__] Add includes.
6890 (strip_extra_slashes): Fix "/" case.
6891 [__CYGWIN__] (get_win32_path): New function.
6892 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6893 [__CYGWIN__] (find_root_device): Disable.
6894 [__CYGWIN__] (get_bootsec_serial): New function.
6895 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6896 [__linux__] (grub_guess_root_device): Add early returns to simplify
6897 structure.
6898 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6899 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6900 check for Linux only.
6901
a079699e 69022008-05-15 Bean <bean123ch@gmail.com>
6903
6904 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6905 keyboard hang problem in apple's intel mac.
6906
1cf4059a 69072008-05-09 Robert Millan <rmh@aybabtu.com>
6908
6909 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6910 devices.
6911 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6912 (make_device_map): Likewise.
6913 Reported by Aurelien Jarno <aurel32@debian.org>
6914
ed759390 69152008-05-07 Ian Campbell <ijc@hellion.org.uk>
6916
6917 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6918 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6919 (make_device_map): Output entries for xvd type disks.
6920
b56c4eaa 69212008-05-07 Robert Millan <rmh@aybabtu.com>
6922
6923 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6924 devices.
6925 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6926 (make_device_map): Likewise.
6927 Reported by Roland Dreier <rdreier@cisco.com>
6928
7f8866ed 69292008-05-07 Robert Millan <rmh@aybabtu.com>
6930
6931 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6932 grub_strstr() call. Correct a few mistakes in failure path handling.
6933
b0346e0f 69342008-05-06 Robert Millan <rmh@aybabtu.com>
6935
6936 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6937 Do not print a trailing slash (therefore, the root directory is an
6938 empty string).
6939 (convert_system_path_to_grub_path): Do not remove trailing slash
6940 from make_system_path_relative_to_its_root() output.
6941
6942 * util/i386/pc/grub-install.in: Add trailing slash to output from
6943 make_system_path_relative_to_its_root().
6944
6cf12cbd 69452008-05-06 Robert Millan <rmh@aybabtu.com>
6946
6947 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6948 ensures that output lines aren't intermangled with those sent to
6949 stderr (via grub_util_info()).
6950 * util/grub-probe.c (grub_refresh): Likewise.
6951 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6952
0fbb3117 69532008-05-05 Christian Franke <franke@computer.org>
6954
6955 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6956 Add Cygwin device names.
6957 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6958 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6959 (check_device): Return error instead of success on empty name.
6960 (make_device_map): Move label inside linux specific code to
6961 prevent compiler warning.
6962
8124cdb7 69632008-04-30 Robert Millan <rmh@aybabtu.com>
6964
6965 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6966 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6967 first boot option.
6968 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6969
094c01d0 69702008-04-29 Robert Millan <rmh@aybabtu.com>
6971
6972 * docs/grub.cfg: New file (example GRUB configuration).
6973
f4b1fc02 69742008-04-26 Robert Millan <rmh@aybabtu.com>
6975
329ce2a5 6976 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6977 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6978 and `disk/ieee1275/nand.c'.
f4b1fc02 6979
25f16ec1 69802008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 6981
25f16ec1 6982 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6983 i386-linuxbios.
6984
6985 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6986 change the buffer size to 4096 for cdrom device.
6987
6988 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6989 and nand.mod.
6990 (_linux_mod_SOURCES): New variable.
6991 (_linux_mod_CFLAGS): Likewise.
6992 (_linux_mod_LDFLAGS): Likewise.
6993 (linux_mod_SOURCES): Likewise.
6994 (linux_mod_CFLAGS): Likewise.
6995 (linux_mod_LDFLAGS): Likewise.
6996 (nand_mod_SOURCES): Likewise.
6997 (nand_mod_CFLAGS): Likewise.
6998 (nand_mod_LDFLAGS): Likewise.
6999
7000 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7001 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7002 type property. (nand device in olpc don't have this property)
7003
7004 * include/grub/disk.h (grub_disk_dev_id): New macro
7005 GRUB_DISK_DEVICE_NAND_ID.
7006
7007 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7008 function prototype.
7009 (grub_rescue_cmd_initrd): Likewise.
7010
7011 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7012 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7013 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7014
25f16ec1 7015 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7016 GRUB_MACHINE_IEEE1275 is defined.
7017
7018 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7019 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7020
7021 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7022 on nested function heap_init.
7023 (grub_upper_mem): New variable for i386-ieee1275.
7024 (grub_get_extended_memory): New function for i386-ieee1275.
7025 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7026
7027 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7028 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7029 property.
f19dbdb7 7030
25f16ec1 7031 * loader/i386/ieee1275/linux.c: New file.
7032
7033 * loader/i386/ieee1275/linux_normal.c: New file.
7034
7035 * disk/ieee1275/nand.c: New file.
7036
e89d61e9 70372008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7038
7039 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7040 value.
7041 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7042
602566f6 70432008-04-18 Robert Millan <rmh@aybabtu.com>
7044
7045 Restructures early code path on ieee1275 to unify grub_main() as
7046 the first C function that is executed in every platform.
7047
7048 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7049 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7050 cmain().
7051 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7052 * kern/ieee1275/cmain.c (cmain): Rename to ...
7053 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7054 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7055 at the beginning.
7056
57490c2b 70572008-04-18 Robert Millan <rmh@aybabtu.com>
7058
7059 * util/update-grub.in: Fix syntax error when setting
7060 `GRUB_PRELOAD_MODULES'.
7061 Reported by Stephane Chazelas <stephane@artesyncp.com>
7062
1977517d 70632008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7064
7065 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7066 section into account, newer toolchains generate unique build ids
7067 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7068 we want build ids to be preserved
1977517d 7069 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7070 far from other sections don't cause the raw binary images grow
7071 size
7072
bfb1f1a2 70732008-04-15 Robert Millan <rmh@aybabtu.com>
7074
7075 * disk/lvm.c: Update copyright year.
7076 * kern/misc.c: Likewise.
7077
01979850 70782008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7079
7080 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 7081 there is no memory left for physical volume name.
01979850 7082
0a1150e2 70832008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7084
7085 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7086 volume name mapping to support bigger than 9 character names properly.
7087
82ead3fe 70882008-04-13 Robert Millan <rmh@aybabtu.com>
7089
7090 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7091 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7092
e54a72f5 70932008-04-13 Christian Franke <franke@computer.org>
7094
7095 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7096 to create a floppy emulation boot CD when non emulation mode
7097 does not work.
7098 Enable Joliet CD filesystem extension.
7099
9fe86034 71002008-04-13 Robert Millan <rmh@aybabtu.com>
7101
7102 * kern/misc.c (grub_strncat): Fix off-by-one error.
7103 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7104
7105 * kern/env.c (grub_env_context_close): Clear current context, not
7106 previous one.
7107 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7108
7109 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7110
7ceeee39 71112008-04-13 Robert Millan <rmh@aybabtu.com>
7112
7113 Improve robustness when handling LVM.
7114
7115 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 7116 (and leave `*p' unmodified).
7ceeee39 7117 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7118 through it.
7119 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7120 iterating through it.
7121 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7122 through it.
fe6b695a 7123 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 7124 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7125 Don't assume `vg->pvs != NULL' when iterating through it.
7126
58cd3d85 71272008-04-13 Robert Millan <rmh@aybabtu.com>
7128
7129 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7130 * genmk.rb (partmap): New variable.
7131 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7132 (#{partmap}): New target rule.
7133 * genpartmaplist.sh: New file.
7134 * Makefile.in (pkglib_DATA): Add partmap.lst.
7135 (partmap.lst): New target rule.
7136 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7137 modules (including all partition maps), instead of preloading them.
7138
78b51059 71392007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7140
7141 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7142 `linux-boot-prober' (if installed) to detect other operating
7143 systems which are installed on the computer and add them to
7144 the boot menu.
7145 * conf/common.rmk: Build and install 30_os-prober.
7146
a91627b4 71472008-04-12 Robert Millan <rmh@aybabtu.com>
7148
7149 * kern/powerpc/ieee1275/init.c: Move from here ...
7150 * kern/ieee1275/init.c: ... to here. Update all users.
7151
7152 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7153 * kern/ieee1275/cmain.c: ... to here. Update all users.
7154
7155 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7156 * kern/ieee1275/openfw.c: ... to here. Update all users.
7157
7158 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7159 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7160
322562ea 71612008-04-10 Pavel Roskin <proski@gnu.org>
7162
7163 * configure.ac: Always use "_cv_" in cache variables for
7164 compatibility with Autoconf 2.62.
7165
a02a73c5 71662008-04-07 Robert Millan <rmh@aybabtu.com>
7167
7168 Revert grub/machine/init.h addition by Pavel (since it breaks on
7169 i386-ieee1275 and others):
7170 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7171 * util/powerpc/ieee1275/misc.c: Likewise.
7172
25c024b1 71732008-04-07 Robert Millan <rmh@aybabtu.com>
7174
7175 * util/grub-probe.c (probe): Improve error message.
7176
3cbd2f98 71772008-04-07 Robert Millan <rmh@aybabtu.com>
7178
7179 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7180 (this prevents the presence of a bogus entry from ruining the whole
7181 thing).
7182
87a297bf 71832008-04-06 Pavel Roskin <proski@gnu.org>
7184
36747a62 7185 * util/biosdisk.c: Include grub/util/biosdisk.h.
7186 * util/grub-fstest.c (execute_command): Make static.
7187 * util/grub-mkdevicemap.c (check_device): Likewise.
7188 * util/i386/pc/misc.c: Include grub/machine/init.h.
7189 * util/powerpc/ieee1275/misc.c: Likewise.
7190 * util/lvm.c: Include grub/util/lvm.h.
7191 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7192 grub/cache.h.
7193 * util/raid.c: Include grub/util/raid.h.
7194 (grub_util_getdiskname): Make static.
7195
87a297bf 7196 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7197 grub_hostfs_fini(), as they are called from grub_init_all() and
7198 grub_fini_all() respectively. This fixes an infinite loop in
7199 grub-fstest due to double registration of hostfs.
7200 Reported by Christian Franke <Christian.Franke@t-online.de>
7201
f6ce7629 72022008-04-05 Pavel Roskin <proski@gnu.org>
7203
7204 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7205 all 8 functions. Otherwise, probe function 0 only.
7206
070e49e4 72072008-04-04 Pavel Roskin <proski@gnu.org>
7208
8b088a4c 7209 * commands/lspci.c (grub_lspci_iter): Print the bus number
7210 correctly.
7211
4f657021 7212 * commands/lspci.c (grub_pci_classes): Fix typos.
7213 (grub_lspci_iter): Don't print func twice. Print vendor ID
7214 before device ID, as it's normally done.
7215
070e49e4 7216 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7217 Fix signedness warnings.
7218 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7219 Likewise.
7220 * util/ieee1275/get_disk_name.c: Include config.h so that
7221 _GNU_SOURCE is defined and getline() is declared. Mark an
7222 unused argument as such. Fix a signedness warning.
7223
ba7328dc 72242008-04-02 Pavel Roskin <proski@gnu.org>
7225
26887f22 7226 * genkernsyms.sh.in: Use more robust assignments for CC and
7227 srcdir. Quote srcdir.
7228 * gensymlist.sh.in: Likewise. Assert at the compile time that
7229 the symbol table is not empty.
7230
ba7328dc 7231 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7232 * fs/cpio.c (grub_cpio_read): Likewise.
7233
0f582c6b 72342008-04-01 Pavel Roskin <proski@gnu.org>
7235
4b6e1995 7236 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7237 * disk/host.c (grub_host_open): Likewise.
7238 * disk/loopback.c (grub_loopback_open): Likewise.
7239 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7240 disk->id as in disk/host.c, not a multi-character constant.
7241
828a2768 7242 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7243 later is obsolete, potentially dangerous and sets a bad example.
7244 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7245 * util/misc.c (grub_util_get_image_size): Likewise.
7246
2bb4fb47 7247 * disk/loopback.c (options): Improve help for "--partitions".
7248
0f582c6b 7249 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7250 options to align them with the short options, e.g. "echo -e".
7251
a33224e0 72522008-03-31 Bean <bean123ch@gmail.com>
7253
7254 * video/reader/png.c (grub_png_data): New member is_16bit and
7255 image_data.
7256 (grub_png_decode_image_header): Detect 16 bit png image.
7257 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7258 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7259 (grub_video_reader_png): Release memory occupied by image_data.
7260
7261 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7262 4096 bytes.
7263 (grub_nfs_mount): Skip the test for sector per cluster.
7264
7265 * include/grub/ntfs.h (MAX_SPC): Removed.
7266
86cb4f54 72672008-03-31 Bean <bean123ch@gmail.com>
7268
7269 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7270 (grub_probe_SOURCES): Add fs/afs.c.
7271 (grub_fstest_SOURCES): Likewise.
7272 (afs_mod_SOURCES): New variable.
7273 (afs_mod_CFLAGS): Likewise.
7274 (afs_mod_LDFLAGS): Likewise.
7275
7276 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7277 (grub_emu_SOURCES): Likewise.
7278
7279 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7280
7281 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7282
7283 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7284
7285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7286
7287 * fs/afs.c: New file.
7288
17c74c21 72892008-03-30 Pavel Roskin <proski@gnu.org>
7290
4cb68e89 7291 * disk/host.c: Include grub/misc.h to fix a warning.
7292 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7293 warnings about implicit declarations.
7294
8790bb04 7295 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7296 variable.
7297 * include/grub/i386/loader.h: Change declaration of
7298 grub_linux_boot() to match what grub_loader_set() expects.
7299 * util/getroot.c (grub_guess_root_device): Return const char* to
7300 fix a warning.
7301 * util/grub-probe.c (probe): Fix a warning about uninitialized
7302 abstraction_name variable.
7303 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7304 second argument as unused to fix a warning.
7305
9a3f3296 7306 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7307 missing grub_error() call.
7308
0ecef90d 7309 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7310 2.60 and newer uses it to define datadir.
7311
0bf6d401 7312 * commands/sleep.c: Fix warning about implicit declaration.
7313 * disk/memdisk.c: Likewise.
7314 * loader/aout.c: Likewise.
7315 * loader/i386/bsd_normal.c: Likewise.
7316 * util/grub-probe.c: Likewise.
7317
7cdacf97 7318 * commands/i386/cpuid.c (has_longmode): Make static.
7319 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7320 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7321
17c74c21 7322 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7323 GDT. This is more robust, as %ds can change.
7324 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7325 calling real_to_prot().
7326 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7327
80a3e68b 73282008-03-28 Pavel Roskin <proski@gnu.org>
7329
7330 * kern/i386/pc/startup.S: Assert that uncompressed functions
7331 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7332 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7333 code, as they push parts of the code (error handlers) beyond
7334 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7335 code as correctness and size.
7336
77bcd272 73372008-03-28 Pavel Roskin <proski@gnu.org>
7338
7339 * kern/i386/pc/startup.S
7340 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7341 data block address to the real mode, keep offset minimal. This
7342 works around a bug in AWARD BIOS on old Athlon systems, which
7343 makes CD detection hang.
7344
c5dfd43b 73452008-03-26 Pavel Roskin <proski@gnu.org>
7346
7347 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7348 const.
7349 * include/grub/normal.h: Add grub_parse_color_name_pair()
7350 declaration.
7351
bf962df2 73522008-03-24 Bean <bean123ch@gmail.com>
7353
7354 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7355 (cd_count): Removed.
7356 (cd_drive): New variable.
7357 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7358 (grub_biosdisk_call_hook): Likewise.
7359 (grub_biosdisk_iterate): Change cdrom detection method.
7360 (grub_biosdisk_open): Replace cd_start with cd_drive.
7361 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7362 detect cdrom device.
7363
7364 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7365 Removed.
7366 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7367 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7368 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7369 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7370 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7371 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7372 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7373 (grub_biosdisk_cdrp): New structure.
7374 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7375
7376 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7377
7378 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7379 device.
7380
7381 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7382 New function.
7383
68e7fc7a 73842008-03-20 Robert Millan <rmh@aybabtu.com>
7385
7386 Remove 2 TiB limit in ata.mod.
7387 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7388 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7389 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7390 grub_uint64_t instead of grub_uint32_t.
7391
38ad2cf5 73922008-03-05 Bean <bean123ch@gmail.com>
7393
7394 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7395 (grub_multiboot): Set boot device.
7396
7397 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7398
2b89344e 73992008-03-02 Bean <bean123ch@gmail.com>
7400
7401 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7402 symlink_buffer.
7403
87a95d1f 74042008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7405
7406 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7407 texinfo.tex.
7408
7409 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7410 modified.
7411
7412 * docs/fdl.texi: New file.
f19dbdb7 7413
87a95d1f 7414 * docs/mdate-sh: New file. Copied from gnulib.
7415 * docs/texinfo.tex: Likewise.
7416
7417 * config.guess: Updated from gnulib.
7418 * install-sh: Likewise.
7419
7dc15d8e 74202008-02-28 Robert Millan <rmh@aybabtu.com>
7421
7422 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7423 (aout_mod_SOURCES): New variable.
7424 (aout_mod_CFLAGS): Likewise.
7425 (aout_mod_LDFLAGS): Likewise.
7426
7427 * conf/i386-ieee1275.rmk: Likewise.
7428
b00ab696 74292008-02-28 Robert Millan <rmh@aybabtu.com>
7430
7431 * util/update-grub.in: Reorganise terminal validity check. Accept
7432 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7433 Based on suggestion by Franklin PIAT.
7434
79ca2d78 74352008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7436
7437 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7438 function.
7439 * util/getroot.c (grub_util_check_block_device): New function that
7440 returns the given argument if it is a block device and returns NULL else.
7441 * util/grub-probe.c (argument_is_device): New variable.
7442 (probe): Promote device_name from a variable to an argument. Receive
7443 device_name from grub_util_check_block_device() if path is NULL and from
7444 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 7445 (options): Introduce new parameter '-d, --device'.
79ca2d78 7446 (main): Add description of the new parameter to the help screen.
7447 Rename path variable to argument. Set argument_is_device if the '-d'
7448 option is given. Pass argument to probe() depending on
7449 argument_is_device.
7450
0d16e571 74512008-02-24 Bean <bean123ch@gmail.com>
7452
7453 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7454 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7455 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7456 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7457 (GRUB_ISO9660_VOLDESC_END): Likewise.
7458 (grub_iso9660_primary_voldesc): New member escape.
7459 (grub_iso9660_data): New member joliet.
7460 (grub_iso9660_convert_string): New function.
7461 (grub_iso9660_mount): Detect joliet extension.
7462 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7463 (grub_iso9660_iso9660_label): Likewise.
7464
7465 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7466 (grub_setup_SOURCES): Add fs/udf.c.
7467 (grub_fstest_SOURCES): Likewise.
7468 (udf_mod_SOURCES): New variable.
7469 (udf_mod_CFLAGS): Likewise.
7470 (udf_mod_LDFLAGS): Likewise.
7471
7472 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7473 (grub_emu_SOURCES): Likewise.
7474
7475 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7476
7477 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7478
7479 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7480
7481 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7482
7483 * fs/udf.c: New file.
7484
8a594a17 74852008-02-24 Robert Millan <rmh@aybabtu.com>
7486
7487 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7488 (normal/lexer.c_DEPENDENCIES): New variables.
7489 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7490 (normal/lexer.c_DEPENDENCIES): Likewise.
7491 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7492 (normal/lexer.c_DEPENDENCIES): Likewise.
7493 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7494 (normal/lexer.c_DEPENDENCIES): Likewise.
7495 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7496 (normal/lexer.c_DEPENDENCIES): Likewise.
7497 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7498 (normal/lexer.c_DEPENDENCIES): Likewise.
7499
2dc33c03 75002008-02-23 Robert Millan <rmh@aybabtu.com>
7501
7502 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7503 since they were intended to be in hex. This didn't break previously
7504 because of a bug in gpt_partition_map_iterate() (see below).
7505
7506 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7507 when checking the validity of GPT header.
7508 Remove `partno', since it always provides the same information as `i'.
7509
f6f4cfb0 75102008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7511
7512 * include/grub/efi/time.h: Fix a wrong comment.
7513
79ff665f 75142008-02-19 Pavel Roskin <proski@gnu.org>
7515
7516 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7517 message.
7518
d38e24c2 75192008-02-19 Bean <bean123ch@gmail.com>
7520
7521 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7522 (aout_mod_SOURCES): New variable.
7523 (aout_mod_CFLAGS): Likewise.
7524 (aout_mod_LDFLAGS): Likewise.
7525 (_bsd_mod_SOURCES): New variable.
7526 (_bsd_mod_CFLAGS): Likewise.
7527 (_bsd_mod_LDFLAGS): Likewise.
7528 (bsd_mod_SOURCES): New variable.
7529 (bsd_mod_CFLAGS): Likewise.
7530 (bsd_mod_LDFLAGS): Likewise.
7531
7532 * include/grub/aout.h: New file.
7533
7534 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7535
7536 * include/grub/i386/bsd.h: New file.
7537
7538 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7539 to make it public.
7540
7541 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7542 function is called, so that it's possible to change it inside the hook.
7543 (grub_elf64_load): Likewise.
7544 (grub_elf_file): Don't close the file if elf header is not found.
7545 (grub_elf_close): Close the file if grub_elf_file fails (The new
7546 grub_elf_file won't close it).
7547 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7548 (grub_elf64_size): Likewise.
7549
7550 * kern/i386/loader.S (grub_unix_real_boot): New function.
7551
7552 * loader/aout.c: New file.
7553
7554 * loader/i386/bsd.c: New file.
7555
7556 * loader/i386/bsd_normal.c: New file.
7557
7558 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7559
7560 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 7561 can test other formats.
d38e24c2 7562
b93bdb0f 75632008-02-19 Robert Millan <rmh@aybabtu.com>
7564
7565 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7566 (grub_gpt_partition_type_empty): Redefine with macro from
7567 `<grub/gpt_partition.h>'.
7568 (gpt_partition_map_iterate): Adjust partition type comparison.
7569
7570 Export `entry' as partmap-specific `part.data' struct.
7571 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7572
7573 * include/grub/gpt_partition.h (grub_gpt_header)
7574 (grub_gpt_partentry): ... to here (new file).
7575
7576 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7577
7578 (grub_gpt_partition_type_bios_boot): New const variable, defined
7579 with macro from `<grub/gpt_partition.h>'.
7580
7581 (setup): Replace `first_start' with `embed_region', which keeps
7582 track of the embed region (and is partmap-agnostic).
7583
7584 Replace find_first_partition_start() with find_usable_region(),
7585 which finds a usable region for embedding using partmap-specific
7586 knowledge (supports PC/MSDOS and GPT).
7587
7588 Fix all assumptions that the embed region start at sector 1, using
7589 `embed_region.start' from now on. Similarly, use `embed_region.end'
7590 rather than `first_start' to calculate available size.
7591
7592 In grub_util_info() message, replace "into after the MBR" with an
7593 indication of the specific sector our embed region starts at.
7594
66cb40f6 75952008-02-19 Robert Millan <rmh@aybabtu.com>
7596
7597 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7598 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7599 `commands/reboot.c'.
7600 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7601 (halt_mod_SOURCES): Likewise.
7602 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7603 (halt_mod_SOURCES): Likewise.
7604
b7202015 76052008-02-17 Christian Franke <franke@computer.org>
7606
7607 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7608
32b0fc49 76092008-02-17 Robert Millan <rmh@aybabtu.com>
7610
7611 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7612 set `first_start' to 0 for non-PC/MSDOS partition maps.
7613
aca63502 76142008-02-16 Robert Millan <rmh@aybabtu.com>
7615
7616 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7617 do not assume partition map is PC/MSDOS before performing checks that
7618 are specific to that layout.
7619
0de8be86 76202008-02-13 Robert Millan <rmh@aybabtu.com>
7621
7622 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7623 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7624 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7625
c3db8364 76262008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7627
7628 * configure.ac: Only a cosmetic change on the handling of
7629 -fno-stack-protector.
7630
f714229e 76312008-02-12 Alexandre Boeglin <alex@boeglin.org>
7632
c3db8364 7633 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7634 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7635 reboot.c.
f714229e 7636 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7637 (halt_mod_SOURCES): New variable.
7638 (halt_mod_CFLAGS): Likewise.
7639 (halt_mod_LDFLAGS): Likewise.
7640 (reboot_mod_SOURCES): Likewise.
7641 (reboot_mod_CFLAGS): Likewise.
7642 (reboot_mod_LDFLAGS): Likewise.
7643
c3db8364 7644 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7645 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7646 reboot.c.
f714229e 7647 (halt_mod_SOURCES): Likewise.
7648 (reboot_mod_SOURCES): Likewise.
7649
c3db8364 7650 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7651 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 7652 (reboot_mod_SOURCES): Likewise.
7653
7654 * commands/i386/pc/reboot.c: merge this file ...
7655
7656 * commands/ieee1275/reboot.c: ... and this file ...
7657
7658 * commands/reboot.c: ... to this file.
c3db8364 7659 Add some precompiler directive to include the correct header for
7660 each machine.
f714229e 7661
7662 * commands/ieee1275/halt.c: move this file ...
7663
7664 * commands/halt.c: ... to here.
c3db8364 7665 Add some precompiler directive to include the correct header for
7666 each machine.
f714229e 7667
7668 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7669 (grub_halt): Likewise.
7670
7671 * kern/efi/efi.c (grub_reboot): New function.
7672 (grub_halt): Likewise.
7673
c74493e0 76742008-02-12 Robert Millan <rmh@aybabtu.com>
7675
7676 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7677 /dev (like it is done for /dev/mapper). This doesn't provide support
7678 for EVMS, but at least it is now easy to identify the problem when it
7679 arises.
7680
d0db4b04 76812008-02-11 Robert Millan <rmh@aybabtu.com>
7682
7683 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7684 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7685 comparing it with -1, not 0.
7686
bf748642 76872008-02-10 Robert Millan <rmh@aybabtu.com>
7688
7689 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7690 `disk/lvm.c'.
7691 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7692 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7693
7694 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7695 `disk/lvm.c' to the end of the list.
7696 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7697 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7698
b5db202a 76992008-02-10 Robert Millan <rmh@aybabtu.com>
7700
7701 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7702 grub_print_error() instead. This will let user know why we're entering
7703 rescue mode.
7704 Based on suggestions from Sam Morris.
7705
83abee31 77062008-02-10 Alexandre Boeglin <alex@boeglin.org>
7707
7708 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7709 on remaining N args, instead of "--" arg N times.
7710
78d5a08b 77112008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7712
7713 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7714 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7715 pattern for unknown glyphs.
7716
68807e5f 77172008-02-09 Robert Millan <rmh@aybabtu.com>
7718
7719 * configure.ac: Probe for `help2man'.
7720 * Makefile.in (builddir): New variable.
7721 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7722 or otherwise add a few flags/options to it.
7723 (install-local): For every executable utility or script that is
7724 installed, invoke $(HELP2MAN) to install a manpage based on --help
7725 output.
7726
7727 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7728 that it doesn't prevent --help from working in build tree.
7729
7730 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7731 with `bug-grub@gnu.org'.
7732 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7733 * util/update-grub.in (usage): New function.
7734 Implement proper argument check, with support for --help and --version
7735 (as well as existing -y).
7736
77372008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7738
7739 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7740 avoid overwriting previous output.
7741 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7742
c1962162 77432008-02-09 Robert Millan <rmh@aybabtu.com>
7744
7745 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7746 drawing the menu.
7747
3dac2e3f 77482008-02-09 Robert Millan <rmh@aybabtu.com>
7749
7750 * commands/sleep.c: New file.
7751 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7752 (sleep_mod_SOURCES): New variable.
7753 (sleep_mod_CFLAGS): Likewise.
7754 (sleep_mod_LDFLAGS): Likewise.
7755
7a634e08 77562008-02-09 Robert Millan <rmh@aybabtu.com>
7757
7758 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7759 situations in which we can deduce the RAID size and the superblock
7760 doesn't match it.
7761
b92f0c18 77622008-02-09 Robert Millan <rmh@aybabtu.com>
7763
7764 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7765 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7766 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7767
7768 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7769 and return a grub_diskmemberlist_t composed of physical array members.
7770 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7771
7772 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7773 prototype.
7774 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7775 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7776 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7777
7778 * util/grub-probe.c (probe): Move partmap probing code from here ...
7779 (probe_partmap): ... to here.
7780 (probe): Use probe_partmap() once for the disk we're probing, and
7781 additionally, when such disk contains a memberlist() struct member,
7782 once for each disk that is contained in the structure returned by
7783 memberlist().
7784
91a4bf68 77852008-02-09 Robert Millan <rmh@aybabtu.com>
7786
7787 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7788 environment variable to 'all' in order to obtain debug output from
7789 non-util/ code.
7790 * util/i386/pc/grub-setup.c (main): Likewise.
7791
a96f9caa 77922008-02-08 Robert Millan <rmh@aybabtu.com>
7793
7794 * disk/raid.c (grub_raid_scan_device): Check for
7795 `array->device[sb.this_disk.number]' rather than for
7796 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 7797 guaranteed to be accessible.
a96f9caa 7798
b37a9222 77992008-02-08 Robert Millan <rmh@aybabtu.com>
7800
7801 * disk/raid.c: Update copyright.
7802 * fs/cpio.c: Likewise.
7803 * include/grub/raid.h: Likewise.
7804 * loader/i386/pc/multiboot.c: Likewise.
7805 * util/hostfs.c: Likewise.
7806
5626aee1 78072008-02-08 Robert Millan <rmh@aybabtu.com>
7808
7809 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7810 to a grub_disk_t array.
7811 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7812 `device[x]'.
7813 (grub_raid_scan_device): Replace `device[x].name' accesses with
7814 `device[x]->name'. Simplify initialization of `array->device[x]'.
7815
554f0187 78162008-02-08 Robert Millan <rmh@aybabtu.com>
7817
7818 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7819 grub_dprintf() calls.
7820 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7821 error message.
7822
1ec8425d 78232008-02-07 Christian Franke <franke@computer.org>
7824
7825 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7826 instead of fseek and ftell to support large files.
7827 (grub_hostfs_read): Likewise.
7828
f2156fda 78292008-02-07 Robert Millan <rmh@aybabtu.com>
7830
7831 Patch from Jeroen Dekkers.
7832 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 7833 failure, since successfully reading all array members might not be
f2156fda 7834 required.
7835
9216e0e7 78362008-02-06 Robert Millan <rmh@aybabtu.com>
7837
7838 * util/grub-probe.c (probe): Simplify partmap probing (with the
7839 assumption that the first word up to the underscore equals to
7840 the module name).
7841
b0dfd29a 78422008-02-06 Christian Franke <franke@computer.org>
7843
7844 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7845 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7846 last block of a cpio or tar stream.
7847 Check for "TRAILER!!!" instead of any empty data
7848 block to detect last block of a cpio stream.
7849 (grub_cpio_dir): Fix constness of variable np.
7850 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7851 cpio or tar trailer is detected. This fixes a crash
7852 on open of a non existing file.
7853
c32865bf 78542008-02-05 Bean <bean123ch@gmail.com>
7855
7856 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7857 address of entry.
7858 (grub_multiboot_load_elf64): Likewise.
7859 (grub_multiboot): Initialize mbi structure.
7860
7861 * util/grub-fstest.c: Don't include unused header file script.h.
7862
fe6b695a 7863 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 7864 of file.
7865 (grub_fstest_SOURCES): Likewise.
7866
409480b7 78672008-02-05 Robert Millan <rmh@aybabtu.com>
7868
7869 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7870 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7871 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7872 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7873
7874 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7875 (translation_table): Replace hardcoded values with macros
7876 provided by `<grub/term.h>'.
7877
7878 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7879 (keyboard_map): Correct/add a few values, with macros provided
7880 by `<grub/term.h>'.
7881 (keyboard_map_shift): Zero values that don't differ from their
7882 `keyboard_map' equivalents.
7883 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7884 Discard the second scan code that is always sent by Caps lock.
7885 Only use `keyboard_map_shift' when it provides a non-zero value,
7886 otherwise fallback to `keyboard_map'.
7887
99fadbaa 78882008-02-04 Bean <bean123ch@gmail.com>
7889
7890 * Makefile.in (enable_grub_fstest): New variable.
7891
7892 * conf/common.rmk (grub_fstest_init.lst): New rule.
7893 (grub_fstest_init.h): Likewise.
7894 (grub_fstest_init.c): Likewise.
7895 (util/grub-fstest.c_DEPENDENCIES): New variable.
7896 (grub_fstest_SOURCES): Likewise.
7897
7898 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7899
7900 * util/grub-fstest.c: New file.
7901
bf567c50 79022008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7903
7904 Make grub-setup handle a separate root device.
f19dbdb7 7905
bf567c50 7906 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7907 so that the root device can be compared with the destination
7908 device.
7909 When embedding the core image, if the root and destination devices
7910 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7911 0xFF.
7912 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 7913
9be6b98b 79142008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7915
7916 Add support for having a grub directory in a different drive. This
7917 is still only the data handling part.
f19dbdb7 7918
9be6b98b 7919 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7920 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7921 (grub_root_drive): New variable.
7922
7923 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7924 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7925 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7926 as it was.
7927
7928 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7929
7930 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7931 macro.
7932 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7933
7934 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7935 is bogus, because PXE booting does not specify any drive
7936 correctly.
7937
7938 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7939 am not sure if this is really correct.
7940
7941 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7942 is always identical to the boot drive when booting from a CD.
7943
7944 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7945 longer.
7946 (root_drive): New variable.
7947 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7948 (setup_sectors): Push %dx right after popping it, because %dh will
7949 be modified later.
7950 (copy_buffer): Restore %dx.
7951
e0ca0677 79522008-02-03 Robert Millan <rmh@aybabtu.com>
7953
7954 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7955 use `cdboot.img' for cdrom images.
7956
3b3f6629 79572008-02-03 Robert Millan <rmh@aybabtu.com>
7958
7959 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7960 only setup gfxterm when `font' command has succeeded.
7961
d42b3672 79622008-02-03 Robert Millan <rmh@aybabtu.com>
7963
7964 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7965 (grub_rescue_cmd_multiboot_loader)
7966 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7967
fa370ea6 79682008-02-03 Pavel Roskin <proski@gnu.org>
7969
e0c5dacb 7970 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 7971 %edx and %esi from stack only after grub_gate_a20() is called.
7972 grub_gate_a20() clobbers %edx.
7973
f2a76e1d 79742008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7975
7976 * configure.ac (AC_INIT): Bumped to 1.96.
7977
7978 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7979 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7980 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7981 video/readers/png.c.
7982
90fd32d1 79832008-02-03 Bean <bean123ch@gmail.com>
9be665dd 7984
7985 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7986 (cdboot_img_SOURCES): New variable.
7987 (cdboot_img_ASFLAGS): New variable.
7988 (cdboot_img_LDFLAGS): New variable.
7989
7990 * boot/i386/pc/cdboot.S: New file.
7991
7992 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7993 (cd_count): Likewise.
7994 (grub_biosdisk_get_drive): Add support for cd device.
7995 (grub_biosdisk_call_hook): Likewise.
7996 (grub_biosdisk_iterate): Likewise.
7997 (grub_biosdisk_open): Likewise.
7998 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7999 (grub_biosdisk_rw): Support reading from cd device.
8000 (GRUB_MOD_INIT): Iterate cd devices.
8001
8002 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8003 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8004 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8005
8006 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8007
4020aa53 80082008-02-02 Robert Millan <rmh@aybabtu.com>
8009
8010 * commands/read.c: New file.
8011 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8012 (read_mod_SOURCES): New variable.
8013 (read_mod_CFLAGS): Likewise.
8014 (read_mod_LDFLAGS): Likewise.
8015
e03a1132 80162008-02-02 Robert Millan <rmh@aybabtu.com>
8017
8018 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8019 determining whether menu has to be displayed.
8020
58c69220 80212008-02-02 Marco Gerards <marco@gnu.org>
8022
8023 * bus/pci.c: New file.
8024
8025 * include/grub/pci.h: Likewise.
8026
8027 * include/grub/i386/pc/pci.h: Likewise.
8028
8029 * commands/lspci.c: Likewise.
8030
8031 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8032 `lspci.mod'.
8033 (pci_mod_SOURCES): New variable.
8034 (pci_mod_CFLAGS): Likewise.
8035 (pci_mod_LDFLAGS): Likewise.
8036 (lspci_mod_SOURCES): Likewise.
8037 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8038 (lspci_mod_LDFLAGS): Likewise.
58c69220 8039
c004e1b4 80402008-02-02 Bean <bean123ch@gmail.com>
8041
8042 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8043 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8044
8045 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8046 (grub_xfs_btree_node): New structure.
8047 (grub_xfs_btree_root): New structure.
8048 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8049 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8050 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8051 (GRUB_XFS_EXTENT_SIZE): Likewise.
8052 (grub_xfs_read_block): Support btree format type.
8053 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8054 Use directory block as basic unit.
8055
8056 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8057
8058 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8059 __attribute__ ((__regparm__ (1))).
8060
f95562bf 80612008-02-01 Robert Millan <rmh@aybabtu.com>
8062
8063 Correct a mistake in previous commit.
8064
8065 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8066 top.
8067 (normal/command.c_DEPENDENCIES): New variable.
8068
7d31f41f 80692008-02-01 Robert Millan <rmh@aybabtu.com>
8070
8071 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8072 top.
8073 (normal/command.c_DEPENDENCIES): New variable.
8074 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8075 * conf/i386-ieee1275.rmk: Likewise.
8076 * conf/i386-linuxbios.rmk: Likewise.
8077 * conf/i386-pc.rmk: Likewise.
8078 * conf/sparc64-ieee1275.rmk: Likewise.
8079 * conf/powerpc-ieee1275.rmk: Likewise.
8080 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8081
8082 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8083
60b6be74 80842008-02-01 Robert Millan <rmh@aybabtu.com>
8085
8086 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8087 call at beginning of function.
8088
078522ab 80892008-01-31 Pavel Roskin <proski@gnu.org>
8090
8091 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 8092 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8093 (grub_mkrescue_SOURCES): Likewise.
078522ab 8094 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8095
ccaa8a5f 80962008-01-30 Robert Millan <rmh@aybabtu.com>
8097
8098 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8099 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8100 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8101 (grub_probe_SOURCES): ... to here.
8102
8103 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8104 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8105 * conf/i386-ieee1275.rmk: Likewise.
8106 * conf/i386-linuxbios.rmk: Likewise.
8107 * conf/powerpc-ieee1275.rmk: Likewise.
8108
ae5a9cd7 81092008-01-30 Tristan Gingold <gingold@free.fr>
8110
8111 * kern/rescue.c: Silently accept empty lines.
8112
70bc2ef2 81132008-01-29 Bean <bean123ch@gmail.com>
8114
8115 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8116 (real_code_2): Code cleanup and change comment style.
8117 (move_memory): Avoid using 32-bit address mode.
8118
6a4d50ea 81192008-01-29 Bean <bean123ch@gmail.com>
8120
8121 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8122 (png_mod_SOURCES): New variable.
8123 (png_mod_CFLAGS): Likewise.
8124 (png_mod_LDFLAGS): Likewise.
8125
8126 * video/readers/png.c: New file.
8127
11cc30ac 81282008-01-28 Robert Millan <rmh@aybabtu.com>
8129
8130 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8131 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8132 `ifndef GRUB_MOD_GAP' hack.
8133 * util/elf/grub-mkimage.c (add_segments): Likewise.
8134
3abc589f 81352008-01-27 Robert Millan <rmh@aybabtu.com>
8136
8137 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8138 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 8139 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 8140
e1907778 81412008-01-27 Robert Millan <rmh@aybabtu.com>
8142
8143 Get grub-emu to build again (including parallel builds).
8144
8145 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8146 Split into ...
8147 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8148 (normal/execute.c_DEPENDENCIES): ... this, ...
8149 (grub-emu_DEPENDENCIES): ... and this.
8150
8151 * conf/i386-efi.rmk: Likewise.
8152 * conf/i386-linuxbios.rmk: Likewise.
8153 * conf/i386-ieee1275.rmk: Likewise.
8154 * conf/powerpc-ieee1275.rmk: Likewise.
8155 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8156
2216b101 81572008-01-27 Robert Millan <rmh@aybabtu.com>
8158
8159 * NEWS: Add a few items.
8160
f75172d9 81612008-01-27 Robert Millan <rmh@aybabtu.com>
8162
8163 Fix parallel builds with grub-emu. Based on earlier commit for
8164 grub-probe and grub-setup.
8165
8166 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8167 (util/grub-emu.c_DEPENDENCIES): ... this.
8168 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8169 (util/grub-emu.c_DEPENDENCIES): ... this.
8170 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8171 (util/grub-emu.c_DEPENDENCIES): ... this.
8172 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8173 (util/grub-emu.c_DEPENDENCIES): ... this.
8174 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8175 (util/grub-emu.c_DEPENDENCIES): ... this.
8176
3f51de77 81772008-01-27 Pavel Roskin <proski@gnu.org>
8178
8179 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8180 to create a gap between _end and the modules added to the image
8181 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8182 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8183 * util/elf/grub-mkimage.c (add_segments): Likewise.
8184
2033f53e 81852008-01-26 Pavel Roskin <proski@gnu.org>
8186
8187 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8188 just return an error.
8189
22da1f6f 81902008-01-26 Bean <bean123ch@gmail.com>
8191
8192 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8193 (grub_reiserfs_get_item): Save offset of the next item.
8194 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8195
2a9525e6 81962008-01-25 Robert Millan <rmh@aybabtu.com>
8197
8198 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8199 make all filesystem sources appear together (possibly fixing omissions
8200 while at it).
8201 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8202 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8203 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8204 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8205
8206 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8207 add `kern/file.c'.
8208 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8209 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8210 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8211 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8212
8213 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8214 (probe): Add a sanity check to make sure of our ability to read
8215 requested files when probing for filesystem type.
8216
8217 * genmk.rb: Update copyright year (2007).
8218
8219 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8220 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8221 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8222 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8223 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8224 : Remove function prototypes.
8225
b95f71b5 82262008-01-25 Robert Millan <rmh@aybabtu.com>
8227
8228 Revert my previous commits (based on wrong assumption of how grub_errno
8229 works).
8230
fe6b695a 8231 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 8232 * kern/file.c (grub_file_open): Likewise.
8233
d08bbb49 82342008-01-24 Pavel Roskin <proski@gnu.org>
8235
8236 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8237 that hang if GRUB tries to setup colors.
8238 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8239 colors for firmwares that don't support it.
8240 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8241 Recognize Open Hack'Ware, set flags to work around its
8242 limitations.
8243
605e36ed 82442008-01-24 Robert Millan <rmh@aybabtu.com>
8245
8246 * kern/file.c (grub_file_open): Do not account previous failures of
8247 unrelated functions when grub_errno is checked for.
8248 Reported by Oleg Strikov.
8249
bac332a1 82502008-01-24 Bean <bean123ch@gmail.com>
8251
8252 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8253 (grub_ufs_sblock): New member volume name.
8254 (grub_ufs_find_file): Fix string copy bug.
8255 (grub_ufs_label): Implement this function properly.
8256
8257 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8258 (grub_hfs_iterate_records): Use the correct file number for extents
8259 and catalog file. Fix problem in next index calculation.
8260 (grub_hfs_find_node): Replace recursive function call with loop.
8261 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8262
15c80c09 82632008-01-23 Robert Millan <rmh@aybabtu.com>
8264
8265 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8266 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8267 (grub_multiboot2_real_boot): New function prototype.
8268
8269 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8270 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8271
8272 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8273 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8274
305338fd 82752008-01-23 Robert Millan <rmh@aybabtu.com>
8276
8277 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8278 #ifdef'ed out grub_printf().
8279
3ea52685 82802008-01-23 Robert Millan <rmh@aybabtu.com>
8281
8282 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8283 grub_dprintf calls, since they make "debug=all" mode unusable.
8284 (grub_console_checkkey): Likewise.
8285
5882ae4b 82862008-01-23 Robert Millan <rmh@aybabtu.com>
8287
8288 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8289 `term/i386/pc/at_keyboard.c'.
8290 (pkglib_MODULES): Add `serial.mod'.
8291 (serial_mod_SOURCES): New variable.
8292 (serial_mod_CFLAGS): Likewise.
8293 (serial_mod_LDFLAGS): Likewise.
8294
8295 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8296 `<grub/powerpc/ieee1275/console.h>'.
8297 (grub_keyboard_controller_init): New function prototype.
8298 (grub_console_checkkey): Likewise.
8299 (grub_console_getkey): Likewise.
8300
8301 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8302 keyboard on i386.
8303
8304 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8305 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8306
06ab5303 83072008-01-23 Robert Millan <rmh@aybabtu.com>
8308
8309 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8310 present, "(memdisk)/boot/grub" becomes the default prefix.
8311
8312 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8313 a memdisk tarball with all the modules. Add --overlay=DIR option that
8314 allows users to overlay additional files into the image.
8315
dbb475a4 83162008-01-23 Robert Millan <rmh@aybabtu.com>
8317
8318 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8319 and `machine/memory.h'.
8320 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8321 (_multiboot_mod_SOURCES): New variable.
8322 (_multiboot_mod_CFLAGS): Likewise.
8323 (_multiboot_mod_LDFLAGS): Likewise.
8324 (multiboot_mod_SOURCES): Likewise.
8325 (multiboot_mod_CFLAGS): Likewise.
8326 (multiboot_mod_LDFLAGS): Likewise.
8327
8328 * include/grub/i386/ieee1275/loader.h: New file.
8329
8330 * include/grub/i386/ieee1275/machine.h: Likewise.
8331
8332 * include/grub/i386/ieee1275/memory.h: Likewise.
8333
8334 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8335 variable declaration.
8336 (grub_os_area_size): Likewise.
8337
8338 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8339 (grub_lower_mem, grub_upper_mem): New variables.
8340 (grub_stop_floppy): New function (just to make
8341 grub_multiboot2_real_boot() happy).
8342
8343 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8344 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8345 (grub_stop): New function.
8346 Include `"../realmode.S"' and `"../loader.S"'.
8347
8348 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8349 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8350
8351 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8352 rely on grub_multiboot2_real_boot() for final boot.
8353
25638629 83542008-01-22 Robert Millan <rmh@aybabtu.com>
8355
8356 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8357 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8358 device that doesn't look like an SD card.
8359 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8360 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8361 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8362 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8363 found.
8364
9dad816d 83652008-01-22 Robert Millan <rmh@aybabtu.com>
8366
8367 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8368 avoid claiming over our own code.
8369
34842f2d 83702008-01-22 Bean <bean123ch@gmail.com>
8371
8372 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8373 (jpeg_mod_SOURCES): New variable.
8374 (jpeg_mod_CFLAGS): Likewise.
8375 (jpeg_mod_LDFLAGS): Likewise.
8376
8377 * video/readers/jpeg.c : New file.
8378
44023a28 83792008-01-22 Bean <bean123ch@gmail.com>
8380
8381 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8382 there are no more items.
8383
bc2d8ac6 83842008-01-21 Robert Millan <rmh@aybabtu.com>
8385
8386 * kern/mm.c (grub_mm_init_region): Improve debug message.
8387
261bd4bc 83882008-01-21 Robert Millan <rmh@aybabtu.com>
8389
8390 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8391 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8392 address.
8393 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8394 a C macro.
8395 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8396 Indicates start of upper memory.
8397 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8398 (generate_image): Abort when image size is big enough to corrupt
8399 upper memory.
8400
8401 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8402 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8403 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8404 instead of hardcoding 0xA0000.
8405 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8406 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8407 instead of hardcoding 0xA0000.
8408
f970b55e 84092008-01-21 Robert Millan <rmh@aybabtu.com>
8410
8411 * disk/memdisk.c (memdisk_size): New variable.
8412 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8413 `memdisk_size'.
8414 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8415 image to dynamic memory.
8416 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8417 `memdisk_size'. Free memdisk block.
8418
1a8b0526 84192008-01-21 Robert Millan <rmh@aybabtu.com>
8420
8421 Fix detection of very small filesystems (like tar).
8422
8423 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8424 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8425 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8426 a problem with this disk).
8427
6e9b4aab 84282008-01-21 Robert Millan <rmh@aybabtu.com>
8429
8430 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8431 on grub_biosdisk_rw_standard() error.
8432
0d8837b2 84332008-01-21 Robert Millan <rmh@aybabtu.com>
8434
8435 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8436 recent changes.
8437 * kern/elf.c: Likewise.
8438 * kern/ieee1275/ieee1275.c: Likewise.
8439 * kern/powerpc/ieee1275/openfw.c: Likewise.
8440 * term/ieee1275/ofconsole.c: Likewise.
8441
ffd36e34 84422008-01-21 Robert Millan <rmh@aybabtu.com>
8443
8444 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8445
3f0093d0 8446 * include/grub/kernel.h (grub_arch_memdisk_addr)
8447 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 8448
3f0093d0 8449 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8450 (grub_arch_memdisk_size): ... to here.
ffd36e34 8451
6c391b21 84522008-01-21 Robert Millan <rmh@aybabtu.com>
8453
8454 Mostly based on bugfix from Bean.
8455
8456 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8457 attribute with hook() parameter.
8458 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8459 declaration.
8460 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8461 attribute with hook() parameter.
8462 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8463 declaration.
8464
55a581dc 84652008-01-21 Robert Millan <rmh@aybabtu.com>
8466
8467 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8468 (pkglib_MODULES): Add `memdisk.mod'.
8469 (memdisk_mod_SOURCES): New variable.
8470 (memdisk_mod_CFLAGS): Likewise.
8471 (memdisk_mod_LDFLAGS): Likewise.
8472
8473 * disk/memdisk.c: New file.
8474
8475 * include/grub/disk.h (grub_disk_dev_id): Add
8476 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8477
8478 * include/grub/i386/pc/kernel.h
8479 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8480 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8481 (grub_kernel_image_size): New variable declaration.
8482 (grub_total_module_size): Likewise.
8483 (grub_memdisk_image_size): Likewise.
8484
8485 * include/grub/i386/pc/memory.h
8486 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8487
8488 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8489 (grub_arch_memdisk_addr): New variable declaration.
8490 (grub_arch_memdisk_size): Likewise.
8491
8492 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8493 (grub_arch_memdisk_size): Likewise.
8494
8495 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8496 (codestart): Replace hardcoded `0x100000' with
8497 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8498
8499 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8500 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8501 not NULL, append the contents of the file it refers to, at the end of
8502 the compressed kernel image. Initialize `grub_memdisk_image_size'
8503 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8504 (options): Add "memdisk"|'m' option.
8505 (main): Parse --memdisk|-m option, and pass user-provided path as
8506 parameter to generate_image().
8507
3d7f54c9 85082008-01-20 Robert Millan <rmh@aybabtu.com>
8509
8510 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8511 grub_dprintf() calls from here ...
8512 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8513
0bf74728 85142008-01-20 Robert Millan <rmh@aybabtu.com>
8515
8516 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8517
8518 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8519 declaration.
8520 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8521 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8522 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 8523 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 8524 property).
8525 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8526 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8527
33bf70a7 85282008-01-19 Robert Millan <rmh@aybabtu.com>
8529
fe6b695a 8530 Get rid of confusing function (superseded by
33bf70a7 8531 `grub_ieee1275_get_integer_property')
8532 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8533 prototype.
8534 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8535 function.
8536 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8537 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 8538 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 8539
e2da7d26 85402008-01-19 Robert Millan <rmh@aybabtu.com>
8541
8542 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8543 command after "shut-down", since implementations differ on which
8544 the command for halt is.
8545
59f1fd8d 85462008-01-19 Robert Millan <rmh@aybabtu.com>
8547
8548 * include/grub/i386/linuxbios/console.h: Add header protection.
8549 (grub_keyboard_controller_init): New function prototype.
8550 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8551 (KEYBOARD_COMMAND_READ): Likewise.
8552 (KEYBOARD_COMMAND_WRITE): Likewise.
8553 (KEYBOARD_SCANCODE_SET1): Likewise.
8554 (grub_keyboard_controller_write): New function.
8555 (grub_keyboard_controller_read): Likewise.
8556 (grub_keyboard_controller_init): Likewise.
8557
8558 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8559 (grub_console_init): On coreboot/LinuxBIOS, call
8560 grub_keyboard_controller_init().
8561
5f5a7c15 85622008-01-19 Robert Millan <rmh@aybabtu.com>
8563
8564 PowerPC changes provided by Pavel Roskin.
8565
8566 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8567 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8568 don't rely on cmain() doing it.
8569 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8570 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8571
1210e168 85722008-01-16 Robert Millan <rmh@aybabtu.com>
8573
8574 * include/grub/i386/linuxbios/memory.h
8575 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8576 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8577 receive `table_header' as argument. Instead, probe for it in the
8578 known memory ranges where it can be present.
8579 (grub_available_iterate): Do not pass a fixed `table_header' address
8580 to grub_linuxbios_table_iterate().
8581
3d04eab8 85822008-01-15 Robert Millan <rmh@aybabtu.com>
8583
8584 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8585 * conf/i386-ieee1275.rmk: New file.
8586 * include/grub/i386/ieee1275/console.h: Likewise.
8587 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8588 * include/grub/i386/ieee1275/kernel.h: Likewise.
8589 * include/grub/i386/ieee1275/time.h: Likewise.
8590 * kern/i386/ieee1275/init.c: Likewise.
8591 * kern/i386/ieee1275/startup.S: Likewise.
8592
d1bc1b73 85932008-01-15 Robert Millan <rmh@aybabtu.com>
8594
8595 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8596 when pointers are 32-bit (but still do set it to one when they are
8597 64-bit).
8598
66a65807 85992008-01-15 Robert Millan <rmh@aybabtu.com>
8600
8601 * include/grub/ieee1275/ieee1275.h
8602 (grub_ieee1275_get_integer_property): New function prototype.
8603
8604 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8605 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 8606 grub_ieee1275_get_property() to handle endianness.
66a65807 8607
8608 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8609 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 8610 where appropriate.
66a65807 8611 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8612 (grub_map): Likewise.
8613 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8614
a83ccafd 86152008-01-15 Bean <bean123ch@gmail.com>
8616
8617 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8618 (grub_script_execute_cmdline): Reset grub_errno.
8619
8620 * normal/main.c (read_config_file): Reset grub_errno.
8621
8622 * normal/parse.y (script_init): New.
8623 (script): Move function and menuentry here.
8624 (delimiter): New.
8625 (command): Add delimiter at the end of command.
8626 (commands): Adjust to match the new command.
8627 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 8628 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 8629 (if): Use the new commands.
8630
8631 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8632
df6ecfc6 86332008-01-15 Robert Millan <rmh@aybabtu.com>
8634
8635 * normal/menu.c (run_menu): Move timeout message from here ...
8636 (print_timeout): ... to here.
8637 (run_menu): Use print_timeout() once during initial draw to print
8638 the whole message, and again in every clock tick to update only
8639 the number of seconds.
8640
87ae25eb 86412008-01-15 Robert Millan <rmh@aybabtu.com>
8642
8643 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8644 actual size of `available' from grub_ieee1275_get_property(), and
8645 restrict parsing to that bound.
8646
47bf09a4 86472008-01-15 Christian Franke <franke@computer.org>
8648
8649 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8650 (argp_program_version): Remove variable.
8651 (argp_program_bug_address): Likewise.
8652 (options): Convert from struct argp_option to struct option.
8653 (struct arguments): Remove.
8654 (parse_opt): Remove.
8655 (usage): New function.
8656 (main): Replace struct args members by simple variables.
8657 Replace argp_parse() by getopt_long().
8658 Add switch to evaluate options.
8659 Add missing "(...)" around root_dev in prefix string.
8660
c86f1469 86612008-01-14 Robert Millan <rmh@aybabtu.com>
8662
8663 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8664 for grub_ieee1275_exit(), in order to improve portability.
8665
e622c559 86662008-01-14 Robert Millan <rmh@aybabtu.com>
8667
8668 * util/grub.d/10_linux.in (prefix): Define.
8669 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8670
44cb1ec8 86712008-01-13 Pavel Roskin <proski@gnu.org>
8672
8673 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8674 grub_errno if no errors have been detected.
8675
1eb8c802 86762008-01-12 Robert Millan <rmh@aybabtu.com>
8677
8678 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8679 (grub_util_get_dev_abstraction): New function prototype.
8680
8681 * util/getroot.c: Include `<grub/util/getroot.h>'
8682 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8683 (grub_util_get_dev_abstraction): ... here (new function).
8684
8685 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8686 `PRINT_ABSTRACTION'.
8687 (probe): Probe for abstraction type when requested.
8688 (main): Understand `--target=abstraction'.
8689
8690 * util/i386/efi/grub-install.in: Add abstraction module to core
8691 image when it is found to be necessary.
8692 * util/i386/pc/grub-install.in: Likewise.
8693 * util/powerpc/ieee1275/grub-install.in: Likewise.
8694
8695 * util/update-grub_lib.in (font_path): Return system path without
8696 converting to GRUB path.
8697 * util/update-grub.in: Convert system path returned by font_path()
8698 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8699 abstraction module is needed for loading fonts (if any). Export
8700 that as `GRUB_PRELOAD_MODULES'.
8701 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8702 insmod commands).
8703
52bd3de9 87042008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8705
8706 Remove some unused code from reiserfs.
f19dbdb7 8707
52bd3de9 8708 * fs/reiserfs.c (struct grub_reiserfs_key)
8709 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8710 (struct grub_reiserfs_node_body): Removed.
8711 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8712 Likewise.
8713 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8714 Likewise.
8715 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8716 Likewise.
8717 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8718 Likewise.
8719 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8720 Likewise.
8721 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8722 Likewise.
8723 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8724 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8725 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8726
2f80039d 87272008-01-10 Robert Millan <rmh@aybabtu.com>
8728
8729 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8730 Determines if a file is garbage left by packaging systems, etc.
8731 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8732 for processing /etc/grub.d scripts.
8733 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8734 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8735 as a condition for processing Linux images.
8736
87888032 87372008-01-10 Pavel Roskin <proski@gnu.org>
8738
8739 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8740 to compile reiserfs.c on PowerPC.
8741
7e54fced 87422008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8743
8744 * kern/device.c (grub_device_iterate): Do not abort device iteration
8745 when one of the devices cannot be opened.
8746 * kern/disk.c (grub_disk_open): Do not account previous failures of
8747 unrelated functions when grub_errno is checked for.
8748
5aa541e6 87492008-01-08 Robert Millan <rmh@aybabtu.com>
8750
8751 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8752 `! grub_linux_is_bzimage', change order of address comparison to make
8753 it more intuitive, and improve "too big zImage" error message.
8754
7076340d 87552008-01-08 Robert Millan <rmh@aybabtu.com>
8756
8757 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8758 `$(update-grub_DATA)'.
8759 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8760 targets.
8761
9ca70333 87622008-01-07 Robert Millan <rmh@aybabtu.com>
8763
8764 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8765 which instruction is modified by grub-setup during installation
8766 (since it wasn't obvious by only looking at this file).
8767
38ccf575 87682008-01-07 Robert Millan <rmh@aybabtu.com>
8769
8770 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8771 listing actual TODO items.
8772
f5db4291 87732008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8774
868967cf 8775 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8776 correctly.
8777 (grub_reiserfs_get_key_offset): Likewise.
8778 (grub_reiserfs_set_key_offset): Likewise.
8779 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 8780 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 8781
8782 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8783 better to remove the bitfield version completely.
f19dbdb7 8784
868967cf 87852008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8786
f5db4291 8787 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8788 allocated from the heap, due to the fshelp implementation.
8789 (grub_reiserfs_dir): Free NODE, due to the same reason.
8790
492e6d9d 87912008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8792
8793 Mostly from Vincent Pelletier:
f19dbdb7 8794
492e6d9d 8795 * fs/reiserfs.c: New file.
f19dbdb7 8796
492e6d9d 8797 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8798 (reiserfs_mod_SOURCES): New variable.
8799 (reiserfs_mod_CFLAGS): Likewise.
8800 (reiserfs_mod_LDFLAGS): Likewise.
8801
8802 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8803 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8804 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8805 normal/color.c.
8806
9ce3e7c1 88072008-01-06 Robert Millan <rmh@aybabtu.com>
8808
8809 * normal/color.c: Remove `<grub/env.h>'.
8810
f3b58148 88112008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8812
8813 * include/grub/normal.h: Include <grub/env.h>.
8814
7ac3bcfa 88152008-01-05 Robert Millan <rmh@aybabtu.com>
8816
8817 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8818 usage example with `(hd0,1)'.
fb358190 8819 Reported by Samuel Thibault.
7ac3bcfa 8820
c8ee99d7 88212008-01-05 Robert Millan <rmh@aybabtu.com>
8822
8823 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8824 (grub_linux_boot_zimage): Rename to ...
8825 (grub_linux_boot): ... this.
8826 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8827 (grub_linux_boot_zimage): Conditionalize zImage copy.
8828
8829 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8830 (grub_linux_boot_bzimage): Remove prototype.
8831 (grub_linux_boot_zimage): Rename to ...
8832 (grub_linux_boot): ... this.
8833
8834 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8835 (grub_linux_boot): Remove function.
8836
0ece25b1 88372008-01-05 Robert Millan <rmh@aybabtu.com>
8838
8839 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8840 (grub_env_write_color_highlight): Likewise.
8841 (grub_wait_after_message): Likewise.
8842
8843 * normal/color.c: New file.
8844
8845 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8846 (normal_mod_DEPENDENCIES): Likewise.
8847
8848 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8849 (normal_mod_DEPENDENCIES): Likewise.
8850
8851 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8852 (normal_mod_DEPENDENCIES): Likewise.
8853
8854 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8855 (normal_mod_DEPENDENCIES): Likewise.
8856
8857 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8858 for waiting after a message is printed.
8859 * normal/main.c (read_config_file): Likewise.
8860 (grub_normal_init): Register grub_env_write_color_normal() and
8861 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8862 `color_highlight' variables as global.
8863
8864 * normal/menu.c (grub_wait_after_message): New function.
8865 (grub_color_menu_normal): New variable. Replaces ...
8866 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8867 (grub_color_menu_highlight): New variable. Replaces ...
8868 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8869 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8870 `GRUB_TERM_COLOR_STANDARD'.
8871 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8872 `normal_code' and `highlight_code' to `old_color_normal' and
8873 `old_color_highlight', respectively.
8874 (grub_menu_init_page): Update colors when drawing the menu, based on
8875 `menu_color_normal' and `menu_color_highlight' variables.
8876 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8877 a message is printed.
8878
182dd4e5 88792008-01-05 Robert Millan <rmh@aybabtu.com>
8880
8881 * kern/env.c (grub_env_context_open): Propagate hooks for global
8882 variables to new context.
8883
8884 * kern/main.c (grub_set_root_dev): Export `root' variable.
8885
ddf8f6ad 88862008-01-05 Robert Millan <rmh@aybabtu.com>
8887
8888 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 8889 discs unconditionally, since udev and others have options to provide
ddf8f6ad 8890 them.
8891
d8b43d9b 88922008-01-05 Robert Millan <rmh@aybabtu.com>
8893
8894 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8895
2bff2de3 88962008-01-04 Christian Franke <franke@computer.org>
8897
8898 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8899 of eisa_mmap.
8900
97eab917 89012008-01-03 Pavel Roskin <proski@gnu.org>
8902
8903 * kern/i386/linuxbios/init.c: Put "void" to all function
8904 declarations with no arguments.
8905 * kern/powerpc/ieee1275/init.c: Likewise.
8906 * term/i386/pc/at_keyboard.c: Likewise.
8907 * term/i386/pc/vga_text.c: Likewise.
8908 * util/grub-mkdevicemap.c: Likewise.
8909
b9416d00 89102008-01-02 Robert Millan <rmh@aybabtu.com>
8911
8912 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8913 message when loaded image is out of bounds.
8914 (grub_multiboot_load_elf64): Likewise.
8915
92695df9 89162008-01-02 Pavel Roskin <proski@gnu.org>
8917
8918 * util/grub.d/10_linux.in: Try version without ".old" when
8919 looking for initrd. It's better to use initrd from the newer
8920 kernel of the same version than no initrd at all.
8921
d98d9cad 89222008-01-01 Robert Millan <rmh@aybabtu.com>
8923
8924 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8925
dbfdce36 89262008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8927
f19dbdb7 8928 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 8929 grub_video_get_active_render_target.
8930 (grub_video_adapter): Added unmap_color and get_active_render_target.
8931
f19dbdb7 8932 * video/video.c: Added grub_video_unmap_color and
dbfdce36 8933 grub_video_get_active_render_target.
8934 (grub_video_get_info): Changed method to accept NULL pointer as an
8935 argument to allow detection of active video adapter.
8936
8937 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8938 grub_video_vbe_unmap_color_int.
8939 Added grub_video_vbe_unmap_color and
8940 grub_video_vbe_get_active_render_target.
8941 (grub_video_vbe_adapter): Added unmap_color and
8942 get_active_render_target.
8943
f19dbdb7 8944 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 8945 with grub_video_vbe_unmap_color_int.
8946
8947 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8948 (DEFAULT_NORMAL_COLOR): Likewise.
8949 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8950 (DEFAULT_FG_COLOR): Removed.
8951 (DEFAULT_BG_COLOR): Likewise.
8952 (DEFAULT_CURSOR_COLOR): Changed value.
8953 (grub_virtual_screen): Added standard_color_setting,
8954 normal_color_setting, highlight_color_setting and term_color.
8955 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8956 (bitmap_width): Added.
8957 (bitmap_height): Likewise.
8958 (bitmap): Likewise.
8959 (set_term_color): Likewise.
8960 (grub_virtual_screen_setup): Changed to use new terminal coloring
8961 settings.
8962 (grub_gfxterm_init): Added init for bitmap.
8963 (grub_gfxterm_fini): Added destroy for bitmap.
8964 (redraw_screen_rect): Updated to use background bitmap and new
8965 terminal coloring.
8966 (scroll_up): Added optimization for case when there is no bitmap.
8967 (grub_gfxterm_cls): Fixed to use correct background color.
8968 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8969 coloring.
8970 (grub_virtual_screen_setcolor): Likewise.
8971 (grub_virtual_screen_getcolor): Added.
8972 (grub_gfxterm_background_image_cmd): Likewise.
8973 (grub_video_term): Added setcolor and getcolor.
8974 (MOD_INIT): Added registration of background_image command.
8975 (MOD_TERM): Added unregistration for background_image command.
8976
c3c20931 89772007-12-30 Pavel Roskin <proski@gnu.org>
8978
8979 * loader/multiboot_loader.c: Fix multiboot command
8980 unregistration. Fix all typos in the word "multiboot".
8981
df266716 89822007-12-29 Pavel Roskin <proski@gnu.org>
94239199 8983
8984 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8985 support for initrd names used in Fedora.
8986
fc6e896c 89872007-12-26 Bean <bean123ch@gmail.com>
8988
8989 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8990 (cpio_mod_SOURCES): New variable.
8991 (cpio_mod_CFLAGS): Likewise.
8992 (cpio_mod_LDFLAGS): Likewise.
8993
8994 * fs/cpio.c: New file.
8995
8996 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8997
8998 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8999
9000 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9001
9002 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9003
533110ad 90042007-12-25 Robert Millan <rmh@aybabtu.com>
9005
9006 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9007 (grub_getcolor): New function.
9008
9009 * kern/term.c (grub_getcolor): New function.
9010 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9011 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9012 (print_entry): Set normal and highlight colors to
9013 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9014 respectively, before printing and restore them to old
9015 values afterwards.
9016 (grub_menu_init_page): Likewise. Fill an additional colored space
9017 that would otherwise be left blank.
9018
9019 * term/efi/console.c (grub_console_getcolor): New function.
9020 (struct grub_console_term.getcolor): New variable.
9021 * term/i386/pc/console.c (grub_console_getcolor): New function.
9022 (struct grub_console_term.getcolor): New variable.
9023 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9024 (struct grub_console_term.getcolor): New variable.
9025
9026 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9027 (struct grub_console_term.setcolor): Remove variable.
9028 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9029 (struct grub_console_term.setcolor): Remove variable.
9030 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9031 (struct grub_console_term.setcolor): Remove variable.
9032 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9033 (struct grub_console_term.setcolor): Remove variable.
9034
4931827f 90352007-12-25 Robert Millan <rmh@aybabtu.com>
9036
9037 * configure.ac: Search for possible unifont.hex locations, and
9038 define UNIFONT_HEX if found.
9039
9040 * Makefile.in (UNIFONT_HEX): Define variable.
9041 (DATA): Rename to ...
9042 (PKGLIB): ... this. Update all users.
9043 (PKGDATA): New variable.
9044 (pkgdata_IMAGES): Rename to ...
9045 (pkglib_IMAGES): ... this. Update all users.
9046 (pkgdata_MODULES): Rename to ...
9047 (pkglib_MODULES): ... this. Update all users.
9048 (pkgdata_PROGRAMS): Rename to ...
9049 (pkglib_PROGRAMS): ... this. Update all users.
9050 (pkgdata_DATA): Rename to ...
9051 (pkglib_DATA): ... this. Update all users.
9052 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9053 (unicode.pff, ascii.pff): New rules.
9054 (all-local): Add `$(PKGDATA)' dependency.
9055 (install-local): Process `$(PKGDATA)'.
9056
9057 * util/update-grub_lib.in (font_path): Search for *.pff files in
9058 a few more locations, including `${pkgdata}'.
9059
57e57e31 90602007-12-23 Robert Millan <rmh@aybabtu.com>
9061
9062 Patch from Bean <bean123ch@gmail.com>:
9063 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9064 `size'.
9065
4bc72aa9 90662007-12-21 Bean <bean123ch@gmail.com>
9067
9068 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9069 (ntfscomp_mod_SOURCES): New variable.
9070 (ntfscomp_mod_CFLAGS): Likewise.
9071 (ntfscomp_mod_LDFLAGS): Likewise.
9072
9073 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9074 (grub_probe_SOURCES): Likewise.
9075 (grub_emu_SOURCES): Likewise.
9076
9077 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9078 (grub_emu_SOURCES): Likewise.
9079
9080 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9081 (grub_emu_SOURCES): Likewise.
9082
9083 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9084 (grub_emu_SOURCES): Likewise.
9085
9086 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9087 (read_run_list): Renamed to grub_ntfs_read_run_list.
9088 (decomp_nextvcn): Moved to ntfscomp.c.
9089 (decomp_getch): Likewise.
9090 (decomp_get16): Likewise.
9091 (decomp_block): Likewise.
9092 (read_block): Likewise.
9093 (read_data): Partially moved to ntfscomp.c.
9094 (fixup): Change unsigned to grub_uint16_t.
9095 (read_mft): Change unsigned long to grub_uint32_t.
9096 (read_attr): Likewise.
9097 (read_data): Likewise.
9098 (read_run_data): Likewise.
9099 (read_run_list): Likewise.
9100 (read_mft): Likewise.
9101
9102 * fs/ntfscomp.c: New file.
9103
9104 * include/grub/ntfs.h: New file.
9105
af680a87 91062007-12-16 Robert Millan <rmh@aybabtu.com>
9107
9108 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9109 IDE disk check, since Linux is known to support 20 IDE disks.
9110 Reported by Colin Watson.
9111
84be7599 91122007-12-15 Bean <bean123ch@gmail.com>
9113
9114 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9115 (lnxboot_img_SOURCES): New variable.
9116 (lnxboot_img_ASFLAGS): Likewise.
9117 (lnxboot_img_LDFLAGS): Likewise.
9118
9119 * boot/i386/pc/lnxboot.S: New file.
9120
6af9db01 91212007-11-24 Pavel Roskin <proski@gnu.org>
9122
9123 * configure.ac: Test if '--build-id=none' is supported by the
9124 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9125 objcopy to generate incorrect binary files (binutils
9126 2.17.50.0.18-1 as shipped by Fedora 8).
9127 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9128 linking, so that build ID doesn't break the test.
9129
7361cfe6 91302007-11-24 Pavel Roskin <proski@gnu.org>
9131
9132 * include/grub/i386/time.h: use "void" in the argument list
9133 of grub_cpu_idle().
9134 * include/grub/powerpc/time.h: Likewise.
9135 * include/grub/sparc64/time.h: Likewise.
9136
1593e10c 91372007-11-18 Christian Franke <franke@computer.org>
9138
9139 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9140 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9141 This fixes the problem that function keys did not work in grub-emu.
9142
3b8db1a8 91432007-11-18 Christian Franke <franke@computer.org>
9144
9145 * disk/host.c (grub_host_open): Remove attribute unused from
9146 name parameter. Add check for "host". This fixes the problem
9147 that grub-emu does not find partitions.
9148
2e29408d 91492007-11-18 Christian Franke <franke@computer.org>
9150
9151 * util/hostfs.c (is_dir): New function.
9152 (grub_hostfs_dir): Handle missing dirent.d_type case.
9153 (grub_hostfs_read): Add missing fseek().
9154 (grub_hostfs_label): Clear label pointer. This fixes a crash
9155 of grub-emu on "ls (host)".
9156
398cd047 91572007-11-18 Christian Franke <franke@computer.org>
9158
9159 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9160 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9161 to 64 bit boundary by default.
9162
c405c391 91632007-11-18 Bean <bean123ch@gmail.com>
9164
9165 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9166 (hexdump_mod_SOURCES): New variable.
9167 (hexdump_mod_CFLAGS): Likewise.
9168 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 9169
c405c391 9170 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9171
9172 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9173
9174 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9175
9176 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9177
9178 * include/grub/hexdump.h: New file.
9179
9180 * commands/hexdump.c: New file.
9181
5cced7fd 91822007-11-10 Robert Millan <rmh@aybabtu.com>
9183
9184 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9185 in grub_outb() calls.
9186 (beep_on): Likewise.
9187
8b714eb0 91882007-11-10 Christian Franke <franke@computer.org>
9189
9190 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9191 (grub_menu_run): Likewise.
9192
ce0f1839 91932007-11-10 Robert Millan <rmh@aybabtu.com>
9194
9195 * include/grub/i386/efi/machine.h: New file.
9196 * include/grub/i386/linuxbios/machine.h: Likewise.
9197 * include/grub/i386/pc/machine.h: Likewise.
9198 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9199 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9200
9201 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9202 (serial_hw_io_addr): New variable.
9203 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9204 instead of `(unsigned short *) 0x400'.
9205
270c237d 92062007-11-10 Bean <bean123ch@gmail.com>
9207
9208 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9209
a87783bf 92102007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9211
9212 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9213 (vga_mod_SOURCES): Added.
9214 (vga_mod_CFLAGS): Likewise.
9215 (vga_mod_LDFLAGS): Likewise.
9216
9217 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9218 grub_outb() calls.
9219 (set_map_mask): Likewise.
9220 (set_read_map): Likewise.
9221 (set_read_address): Likewise.
9222 (vga_font): Removed variable.
9223 (get_vga_glyph): Removed function.
9224 (invalidate_char): Likewise.
9225 (write_char): Changed to use grub_font_get_glyph() for font
9226 information.
9227 (grub_vga_putchar): Likewise.
9228 (grub_vga_getcharwidth): Likewise.
9229
6433b448 92302007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9231
9232 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9233 flags.
9234 (pxeboot_img_LDFLAGS): Likewise.
9235 (diskboot_img_LDFLAGS): Likewise.
9236 (kernel_img_LDFLAGS): Likewise.
9237
49178511 92382007-11-06 Robert Millan <rmh@aybabtu.com>
9239
9240 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9241 in grub_outb() calls.
9242 (serial_hw_init): Likewise.
9243
53b052de 92442007-11-05 Robert Millan <rmh@aybabtu.com>
9245
9246 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9247 spaces. Skip non-regular files.
9248
5ab33bba 92492007-11-05 Robert Millan <rmh@aybabtu.com>
9250
9251 * kern/disk.c (grub_disk_firmware_fini)
9252 (grub_disk_firmware_is_tainted): New variables.
9253
9254 * include/grub/disk.h (grub_disk_firmware_fini)
9255 (grub_disk_firmware_is_tainted): Likewise.
9256
9257 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9258 (grub_disk_biosdisk_fini): ... to here.
9259 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9260 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9261 is set. Register grub_disk_biosdisk_fini() in
9262 `grub_disk_firmware_fini'.
9263
9264 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9265 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9266 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9267 to finish existing firmware disk interface.
9268
9269 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9270 (ata_mod_SOURCES): New variable.
9271 (ata_mod_CFLAGS): Likewise.
9272 (ata_mod_LDFLAGS): Likewise.
9273
0149ab7c 92742007-11-05 Robert Millan <rmh@aybabtu.com>
9275
9276 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9277 (grub_ata_wait): Reimplement using grub_millisleep().
9278
9279 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9280 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9281
be7ac41e 92822007-11-03 Marco Gerards <marco@gnu.org>
9283
9284 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9285 (CRTC_ADDR_PORT): New macro.
9286 (CRTC_DATA_PORT): Likewise.
9287 (CRTC_CURSOR): Likewise.
9288 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9289 (CRTC_CURSOR_ADDR_LOW): Likewise.
9290 (update_cursor): New function.
9291 (grub_console_real_putchar): Call `update_cursor'.
9292 (grub_console_gotoxy): Likewise.
9293 (grub_console_cls): Set the default color when clearing the
9294 screen.
9295 (grub_console_setcursor): Implemented.
9296
bb06ab2e 92972007-11-03 Marco Gerards <marco@gnu.org>
9298
9299 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9300 become activate.
9301 (grub_ata_pio_write): Likewise.
9302
9303 (grub_atapi_identify): Wait after issuing an ATA command.
9304 (grub_atapi_packet): Likewise.
9305 (grub_ata_identify): Likewise.
9306 (grub_ata_readwrite): Likewise.
9307
cf8f780b 93082007-11-03 Marco Gerards <marco@gnu.org>
9309
9310 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9311 (grub_ata_pio_write): Likewise.
9312 (grub_ata_readwrite): Use `grub_error', instead of
9313 returning `grub_errno'.
9314
ed649e54 93152007-11-03 Marco Gerards <marco@gnu.org>
9316
9317 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9318 grub_ata_pio_write once for every single sector, instead of for
9319 multiple sectors.
9320
ca25d8f0 93212007-10-31 Robert Millan <rmh@aybabtu.com>
9322
9323 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9324
9325 * conf/i386-linuxbios.rmk: New file.
9326
9327 * kern/i386/pc/hardware.c: Likewise.
9328 * term/i386/pc/at_keyboard.c: Likewise.
9329 * term/i386/pc/vga_text.c: Likewise.
9330
9331 * include/grub/i386/linuxbios/boot.h: Likewise.
9332 * include/grub/i386/linuxbios/console.h: Likewise.
9333 * include/grub/i386/linuxbios/init.h: Likewise.
9334 * include/grub/i386/linuxbios/kernel.h: Likewise.
9335 * include/grub/i386/linuxbios/loader.h: Likewise.
9336 * include/grub/i386/linuxbios/memory.h: Likewise.
9337 * include/grub/i386/linuxbios/serial.h: Likewise.
9338 * include/grub/i386/linuxbios/time.h: Likewise.
9339
9340 * kern/i386/linuxbios/init.c: Likewise.
9341 * kern/i386/linuxbios/startup.S: Likewise.
9342 * kern/i386/linuxbios/table.c: Likewise.
9343
e911ecc1 93442007-10-31 Marco Gerards <marco@gnu.org>
9345
9346 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9347 (ata_mod_SOURCES): New variable.
9348 (ata_mod_CFLAGS): Likewise.
9349 (ata_mod_LDFLAGS): Likewise.
9350
9351 * disk/ata.c: New file.
9352
9353 * include/grub/disk.h (grub_disk_dev_id): Add
9354 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 9355
7f66d0e0 93562007-10-31 Robert Millan <rmh@aybabtu.com>
9357
9358 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9359 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9360
9361 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9362 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9363
9364 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9365 `<grub/types.h>'.
9366
9367 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9368
5cd7dd46 93692007-10-27 Robert Millan <rmh@aybabtu.com>
9370
3236ca65 9371 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 9372
2ebfc90f 93732007-10-22 Robert Millan <rmh@aybabtu.com>
9374
9375 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9376 `"../realmode.S"'.
9377 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9378
73fcb0f3 93792007-10-22 Robert Millan <rmh@aybabtu.com>
9380
9381 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9382 (pkgdata_MODULES): Add `biosdisk.mod'.
9383 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9384 variables.
9385
9386 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9387 (grub_biosdisk_init): Replace with ...
9388 (GRUB_MOD_INIT(biosdisk)): ... this.
9389 (grub_biosdisk_fini): Replace with ...
9390 (GRUB_MOD_FINI(biosdisk)): ... this.
9391
9392 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9393 (grub_machine_init): Remove call to grub_biosdisk_init().
9394 (grub_machine_fini): Remove call to grub_machine_fini().
9395
9396 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9397
3381d274 93982007-10-22 Robert Millan <rmh@aybabtu.com>
9399
9400 * include/grub/time.h: New file.
9401 * include/grub/i386/time.h: Likewise.
9402 * include/grub/powerpc/time.h: Likewise.
9403 * include/grub/sparc64/time.h: Likewise.
9404
9405 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9406 instances to ...
9407 (KERNEL_MACHINE_TIME_HEADER): ... this.
9408 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9409 instances to ...
9410 (KERNEL_MACHINE_TIME_HEADER): ... this.
9411 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9412 instances to ...
9413 (KERNEL_MACHINE_TIME_HEADER): ... this.
9414
9415 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9416 (grub_millisleep): New function.
9417 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9418 (grub_millisleep): New function.
9419 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9420 Remove `grub/machine/time.h' include.
9421 (grub_millisleep): New function.
9422 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9423 Remove `grub/machine/time.h' include.
9424 (grub_millisleep): New function.
9425
9426 * include/grub/misc.h (grub_div_roundup): New function.
9427
9428 * kern/misc.c: Include `<grub/time.h>'.
9429 (grub_millisleep_generic): New function.
9430
9431 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9432 Add `time.h'.
9433 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9434 Add `time.h'.
9435 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9436 `machine/time.h'. Add `time.h'.
9437 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9438
a39a0312 94392007-10-21 Robert Millan <rmh@aybabtu.com>
9440
9441 * include/grub/misc.h (grub_max): New function.
9442
2aad70e2 94432007-10-21 Robert Millan <rmh@aybabtu.com>
9444
9445 * util/misc.c (grub_util_info): Call fflush() before returning.
9446
54b71c4b 94472007-10-20 Robert Millan <rmh@aybabtu.com>
9448
9449 * genmk.rb (Image): Copy `extra_flags' from here ...
9450 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9451
9452 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9453 to `argc' and `args' arguments.
9454
a979f513 94552007-10-17 Robert Millan <rmh@aybabtu.com>
9456
9457 * kern/i386/loader.S: New file.
9458
9459 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9460 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9461 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9462 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9463 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9464 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9465 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9466 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9467 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9468 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9469 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9470 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9471 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9472 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9473
9474 * kern/i386/realmode.S: New file.
9475
9476 * kern/i386/pc/startup.S (protstack): Moved from here ...
9477 * kern/i386/realmode.S (protstack)... to here.
9478 * kern/i386/pc/startup.S (gdt): Moved from here ...
9479 * kern/i386/realmode.S (gdt)... to here.
9480 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9481 * kern/i386/realmode.S (prot_to_real)... to here.
9482
9483 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9484 `kern/i386/realmode.S'.
9485
825fc8fd 94862007-10-17 Robert Millan <rmh@aybabtu.com>
9487
9488 * include/grub/i386/loader.h: New file.
9489
9490 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9491 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9492 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9493 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9494 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9495 * include/grub/i386/loader.h (grub_linux_prot_size)
9496 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9497 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9498 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9499 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9500
9501 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9502
e179b2f4 95032007-10-15 Robert Millan <rmh@aybabtu.com>
9504
9505 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9506 filesystem when dev->disk is unset.
9507 Do probe for filesystem even when dev->disk->has_partitions is set.
9508 In case a filesystem is found, always report it.
9509 In case it isn't, if dev->disk->has_partitions is set, report that
9510 a partition table was found instead of reporting that no filesystem
9511 could be identified.
9512
5db82af6 95132007-10-12 Robert Millan <rmh@aybabtu.com>
9514
9515 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9516 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9517
68f6ac74 9518 * include/grub/types.h (grub_host_to_target16): New macro.
9519 (grub_host_to_target32): Likewise.
9520 (grub_host_to_target64): Likewise.
9521 (grub_target_to_host16): Likewise.
9522 (grub_target_to_host32): Likewise.
9523 (grub_target_to_host64): Likewise.
5db82af6 9524
9525 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9526 Renamed from to ...
9527 (GRUB_MOD_ALIGN): ...this. Update all users.
9528
68f6ac74 9529 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9530 grub_host_to_target32.
9531 Replace grub_be_to_cpu32 with grub_target_to_host32.
9532 (load_modules): Likewise.
9533 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9534 Replace grub_be_to_cpu32 with grub_target_to_host32.
9535 Replace grub_cpu_to_be16 with grub_host_to_target16.
9536 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 9537
3cf497cc 95382007-10-12 Robert Millan <rmh@aybabtu.com>
9539
9540 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9541 * util/elf/grub-mkimage.c: ... here.
9542
9543 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9544 `util/powerpc/ieee1275/grub-mkimage.c'.
9545
c8cc3692 95462007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 9547
c8cc3692 9548 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9549 and make it easier to figure out.
9550 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9551 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9552 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9553 leave us with less than HEAP_MIN_SIZE total heap.
9554 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 9555
5c58b791 95562007-10-03 Robert Millan <rmh@aybabtu.com>
9557
9558 * include/grub/i386/io.h: New file.
9559 * commands/i386/pc/play.c (inb): Removed.
9560 (outb): Removed.
9561 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9562 with grub_outb().
afcd2ef8 9563 * term/i386/pc/serial.c (inb): Removed.
9564 (outb): Removed.
9565 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9566 with grub_outb().
9567 * term/i386/pc/vga.c (inb): Removed.
9568 (outb): Removed.
9569 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9570 with grub_outb().
5c58b791 9571
1a477ed6 95722007-10-02 Robert Millan <rmh@aybabtu.com>
9573
9574 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9575 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9576 Reported by Marcin Kurek.
9577
6b5d80fa 95782007-09-07 Robert Millan <rmh@aybabtu.com>
9579
9580 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9581 SmartFirmware version updates (as released by Sven Luther), and avoid
9582 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9583 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9584 known broken.
9585
5618afbf 95862007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9587
9588 From Hitoshi Ozeki:
9589 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9590 when merging two regions.
9591
6139dcd9 95922007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9593
508e39ee 9594 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9595 * normal/completion.c (grub_normal_do_completion): Likewise.
9596 Reported by Hitoshi Ozeki.
9597
95982007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9599
6139dcd9 9600 Do not use devices at boot in chainloading.
f19dbdb7 9601
6139dcd9 9602 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9603 (boot_part_addr): Likewise.
9604 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9605 with BOOT_DRIVE and BOOT_PART_ADDR.
9606 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9607 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9608
38da6516 96092007-08-29 Robert Millan <rmh@aybabtu.com>
9610
9611 Patch from Simon Peter <dn.tlp@gmx.net>:
9612 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9613 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9614 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9615 util/i386/pc/grub-setup.c_DEPENDENCIES.
9616 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9617 util/grub-probe.c_DEPENDENCIES.
9618 * conf/powerpc-ieee1275.rmk: Likewise.
9619
29d0928c 96202007-08-28 Robert Millan <rmh@aybabtu.com>
9621
9622 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9623 to tell grub-mkdevicemap how to name devices.
9624 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9625 feature).
9626
9627 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9628 util/i386/get_disk_name.c.
9629 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9630 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9631 util/ieee1275/get_disk_name.c.
9632
9633 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9634
9635 * DISTLIST: Add util/i386/get_disk_name.c and
9636 util/ieee1275/get_disk_name.c.
9637
9638 * util/grub-mkdevicemap.c: Replace device naming logic with
9639 grub_util_get_disk_name() calls.
9640
5a0d3cca 96412007-08-20 Robert Millan <rmh@aybabtu.com>
9642
9643 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9644 (so that it works for both plural and singular quantities).
9645
8b72db2f 96462007-08-05 Robert Millan <rmh@aybabtu.com>
9647
9648 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9649 so that [xz] isn't taken into account when determining order.
9650
352466bf 96512007-08-02 Marco Gerards <marco@gnu.org>
9652
9653 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9654 `include/multiboot2.h', `include/grub/elfload.h',
9655 `include/multiboot.h', `include/grub/multiboot.h',
9656 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9657 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9658 `kern/elf.c', `loader/multiboot_loader.c',
9659 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9660 `loader/i386/pc/multiboot2.c',
9661 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9662 `util/i386/pc/grub-mkrescue.in'. Remove
9663 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9664 `include/grub/i386/pc/util/biosdisk.h' and
9665 `include/grub/powerpc/ieee1275/multiboot.h'.
9666
8f096014 96672007-08-02 Bean <bean123ch@gmail.com>
9668
9669 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9670 (ntfs_mod_SOURCES): New variable.
9671 (ntfs_mod_CFLAGS): Likewise.
9672 (ntfs_mod_LDFLAGS): Likewise.
9673
9674 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9675 (grub_probe_SOURCES): Likewise.
9676 (grub_emu_SOURCES): Likewise.
9677
9678 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9679 (grub_emu_SOURCES): Likewise.
9680
9681 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9682 (grub_emu_SOURCES): Likewise.
f19dbdb7 9683
8f096014 9684 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9685
9686 * fs/ntfs.c: New file.
9687
9959f7db 96882007-08-02 Bean <bean123ch@gmail.com>
9689
9690 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9691
9692 * file.h (grub_file): Likewise.
9693
9694 * fshelp.h (grub_fshelp_read_file): Likewise.
9695
9696 * util/i386/pc/grub-setup.c (setup): Likewise.
9697 (save_first_sector): Likewise.
9698 (save_blocklists): Likewise.
f19dbdb7 9699
9959f7db 9700 * fs/affs.c (grub_affs_read_file): Likewise.
9701
9702 * fs/ext2.c (grub_ext2_read_file): Likewise.
9703
9704 * fs/fat.c (grub_fat_read_data): Likewise.
9705
9706 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9707
9708 * fs/hfs.c (grub_hfs_read_file): Likewise.
9709
9710 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9711
9712 * fs/jfs.c (grub_jfs_read_file): Likewise.
9713
9714 * fs/minix.c (grub_minix_read_file): Likewise.
9715
9716 * fs/sfs.c (grub_sfs_read_file): Likewise.
9717
9718 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9719
9959f7db 9720 * fs/xfs.c (grub_xfs_read_file): Likewise.
9721
9722 * command/blocklist.c (read_blocklist): Likewise.
9723 (print_blocklist): Likewise.
9724
0a203f83 97252007-08-02 Marco Gerards <marco@gnu.org>
9726
9727 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9728 `util/hostfs.c'.
9729
9730 * disk/host.c: New file.
9731
9732 * util/hostfs.c: Likewise.
9733
9734 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9735 return `GRUB_ERR_BAD_FS'.
9736 * fs/sfs.c (grub_sfs_mount): Likewise.
9737 * fs/xfs.c (grub_xfs_mount): Likewise.
9738
9739 * include/grub/disk.h (enum grub_disk_dev_id): Add
9740 `GRUB_DISK_DEVICE_HOST_ID'.
9741
9742 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9743
e5dfe777 97442007-07-24 Jerone Young <jerone@gmail.com>
9745
f19dbdb7 9746 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9747 modules for compilation.
9748 * conf/powerpc-ieee1275.rmk: Likewise.
9749
9750 * include/multiboot.h: Move multiboot definitions to one file. Rename
9751 many definitions to not get grub specific.
9752 * include/multiboot2.h: Create header with multiboot 2 definitions.
9753 * include/grub/multiboot.h: Header for grub specific function
9754 prototypes and definitions.
9755 * include/grub/multiboot2.h: Likewise.
9756 * include/grub/multiboot_loader.h: Likewise.
9757 * include/grub/i386/pc/multiboot.h: Removed.
9758 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9759
9760 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9761 and 2 to allow for one multiboot and module commands.
9762 * loader/multiboot2.c: Add multiboot2 functionality.
9763 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9764 and definition names.
9765 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9766 2 functions.
9767 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9768 ieee1275 specific multiboot2 code.
9769
9770 * kern/i386/pc/startup.S: Change headers and definition names for
9771 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9772
daf0f0ba 97732007-07-22 Robert Millan <rmh@aybabtu.com>
9774
9775 * geninitheader.sh: Process file specified in first parameter rather
9776 than hardcoding grub_modules_init.lst.
fe6b695a 9777 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 9778 than hardcoding grub_modules_init.h.
9779
9780 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9781 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9782 grub_probe_init.[ch] and grub_setup_init.[ch].
9783
9784 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9785 grub_modules_init.h with grub_emu_init.h.
9786 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9787 grub_probe_init.[ch] files.
9788 * conf/i386-efi.rmk: Likewise.
9789 * conf/i386-pc.rmk: Likewise.
9790 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9791 grub_setup_init.[ch] files.
9792
9793 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9794 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9795 to initialize modules rather than a list of hardcoded functions.
9796 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9797 grub_init_all() to initialize modules rather than a list of hardcoded
9798 functions.
9799
54cdc1cc 98002007-07-22 Robert Millan <rmh@aybabtu.com>
9801
9802 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9803 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9804
ad0686cc 98052007-07-22 Robert Millan <rmh@aybabtu.com>
9806
9807 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9808 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9809 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9810 flag when running on SmartFirmware.
9811 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9812 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9813 was set.
9814
9815 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9816 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9817 rather than decreasing it.
9818
9819 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9820 there's not enough space to do it, fail in the same way as when it
9821 can't be done because there are no partitions.
9822
9823 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9824 when nvsetenv failed.
9825
969c02ec 98262007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9827
9828 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9829 because this rule is automatically generated.
9830 (grub-mkrescue): Removed for the same reason as above.
9831
5a79f472 98322007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9833
9834 Migrate to GNU General Public License Version 3.
f19dbdb7 9835
5a79f472 9836 * COPYING: Replaced with the plain text version of GPLv3.
9837
9838 * config.guess: Updated from gnulib.
9839 * config.sub: Likewise.
9840
9841 * geninit.sh: Output a GPLv3 copyright notice.
9842 * geninitheader.sh: Likewise.
9843 * genmodsrc.sh: Likewise.
9844 * gensymlist.sh.in: Likewise.
9845
9846 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9847 * boot/i386/pc/diskboot.S: Likewise.
9848 * boot/i386/pc/pxeboot.S: Likewise.
9849 * commands/blocklist.c: Likewise.
9850 * commands/boot.c: Likewise.
9851 * commands/cat.c: Likewise.
9852 * commands/cmp.c: Likewise.
9853 * commands/configfile.c: Likewise.
9854 * commands/echo.c: Likewise.
9855 * commands/help.c: Likewise.
9856 * commands/ls.c: Likewise.
9857 * commands/search.c: Likewise.
9858 * commands/terminal.c: Likewise.
9859 * commands/test.c: Likewise.
9860 * commands/videotest.c: Likewise.
9861 * commands/i386/cpuid.c: Likewise.
9862 * commands/i386/pc/halt.c: Likewise.
9863 * commands/i386/pc/play.c: Likewise.
9864 * commands/i386/pc/reboot.c: Likewise.
9865 * commands/i386/pc/vbeinfo.c: Likewise.
9866 * commands/i386/pc/vbetest.c: Likewise.
9867 * commands/ieee1275/halt.c: Likewise.
9868 * commands/ieee1275/reboot.c: Likewise.
9869 * commands/ieee1275/suspend.c: Likewise.
9870 * disk/loopback.c: Likewise.
9871 * disk/lvm.c: Likewise.
9872 * disk/raid.c: Likewise.
9873 * disk/efi/efidisk.c: Likewise.
9874 * disk/i386/pc/biosdisk.c: Likewise.
9875 * disk/ieee1275/ofdisk.c: Likewise.
9876 * font/manager.c: Likewise.
9877 * fs/affs.c: Likewise.
9878 * fs/ext2.c: Likewise.
9879 * fs/fat.c: Likewise.
9880 * fs/fshelp.c: Likewise.
9881 * fs/hfs.c: Likewise.
9882 * fs/hfsplus.c: Likewise.
9883 * fs/iso9660.c: Likewise.
9884 * fs/jfs.c: Likewise.
9885 * fs/minix.c: Likewise.
9886 * fs/sfs.c: Likewise.
9887 * fs/ufs.c: Likewise.
9888 * fs/xfs.c: Likewise.
9889 * hello/hello.c: Likewise.
9890 * include/grub/acorn_filecore.h: Likewise.
9891 * include/grub/arg.h: Likewise.
9892 * include/grub/bitmap.h: Likewise.
9893 * include/grub/boot.h: Likewise.
9894 * include/grub/cache.h: Likewise.
9895 * include/grub/device.h: Likewise.
9896 * include/grub/disk.h: Likewise.
9897 * include/grub/dl.h: Likewise.
9898 * include/grub/elfload.h: Likewise.
9899 * include/grub/env.h: Likewise.
9900 * include/grub/err.h: Likewise.
9901 * include/grub/file.h: Likewise.
9902 * include/grub/font.h: Likewise.
9903 * include/grub/fs.h: Likewise.
9904 * include/grub/fshelp.h: Likewise.
9905 * include/grub/gzio.h: Likewise.
9906 * include/grub/hfs.h: Likewise.
9907 * include/grub/kernel.h: Likewise.
9908 * include/grub/loader.h: Likewise.
9909 * include/grub/lvm.h: Likewise.
9910 * include/grub/misc.h: Likewise.
9911 * include/grub/mm.h: Likewise.
9912 * include/grub/net.h: Likewise.
9913 * include/grub/normal.h: Likewise.
9914 * include/grub/parser.h: Likewise.
9915 * include/grub/partition.h: Likewise.
9916 * include/grub/pc_partition.h: Likewise.
9917 * include/grub/raid.h: Likewise.
9918 * include/grub/rescue.h: Likewise.
9919 * include/grub/script.h: Likewise.
9920 * include/grub/setjmp.h: Likewise.
9921 * include/grub/symbol.h: Likewise.
9922 * include/grub/term.h: Likewise.
9923 * include/grub/terminfo.h: Likewise.
9924 * include/grub/tparm.h: Likewise.
9925 * include/grub/types.h: Likewise.
9926 * include/grub/video.h: Likewise.
9927 * include/grub/efi/api.h: Likewise.
9928 * include/grub/efi/chainloader.h: Likewise.
9929 * include/grub/efi/console.h: Likewise.
9930 * include/grub/efi/console_control.h: Likewise.
9931 * include/grub/efi/disk.h: Likewise.
9932 * include/grub/efi/efi.h: Likewise.
9933 * include/grub/efi/pe32.h: Likewise.
9934 * include/grub/efi/time.h: Likewise.
9935 * include/grub/i386/linux.h: Likewise.
9936 * include/grub/i386/setjmp.h: Likewise.
9937 * include/grub/i386/types.h: Likewise.
9938 * include/grub/i386/efi/kernel.h: Likewise.
9939 * include/grub/i386/efi/loader.h: Likewise.
9940 * include/grub/i386/efi/time.h: Likewise.
9941 * include/grub/i386/pc/biosdisk.h: Likewise.
9942 * include/grub/i386/pc/boot.h: Likewise.
9943 * include/grub/i386/pc/chainloader.h: Likewise.
9944 * include/grub/i386/pc/console.h: Likewise.
9945 * include/grub/i386/pc/init.h: Likewise.
9946 * include/grub/i386/pc/kernel.h: Likewise.
9947 * include/grub/i386/pc/loader.h: Likewise.
9948 * include/grub/i386/pc/memory.h: Likewise.
9949 * include/grub/i386/pc/multiboot.h: Likewise.
9950 * include/grub/i386/pc/serial.h: Likewise.
9951 * include/grub/i386/pc/time.h: Likewise.
9952 * include/grub/i386/pc/vbe.h: Likewise.
9953 * include/grub/i386/pc/vbeblit.h: Likewise.
9954 * include/grub/i386/pc/vbefill.h: Likewise.
9955 * include/grub/i386/pc/vbeutil.h: Likewise.
9956 * include/grub/i386/pc/vga.h: Likewise.
9957 * include/grub/ieee1275/ieee1275.h: Likewise.
9958 * include/grub/ieee1275/ofdisk.h: Likewise.
9959 * include/grub/powerpc/libgcc.h: Likewise.
9960 * include/grub/powerpc/setjmp.h: Likewise.
9961 * include/grub/powerpc/types.h: Likewise.
9962 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9963 * include/grub/powerpc/ieee1275/console.h: Likewise.
9964 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9965 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9966 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9967 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9968 * include/grub/powerpc/ieee1275/time.h: Likewise.
9969 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9970 * include/grub/sparc64/libgcc.h: Likewise.
9971 * include/grub/sparc64/setjmp.h: Likewise.
9972 * include/grub/sparc64/types.h: Likewise.
9973 * include/grub/sparc64/ieee1275/console.h: Likewise.
9974 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9975 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9976 * include/grub/sparc64/ieee1275/time.h: Likewise.
9977 * include/grub/util/biosdisk.h: Likewise.
9978 * include/grub/util/getroot.h: Likewise.
9979 * include/grub/util/lvm.h: Likewise.
9980 * include/grub/util/misc.h: Likewise.
9981 * include/grub/util/raid.h: Likewise.
9982 * include/grub/util/resolve.h: Likewise.
9983 * io/gzio.c: Likewise.
9984 * kern/device.c: Likewise.
9985 * kern/disk.c: Likewise.
9986 * kern/dl.c: Likewise.
9987 * kern/elf.c: Likewise.
9988 * kern/env.c: Likewise.
9989 * kern/err.c: Likewise.
9990 * kern/file.c: Likewise.
9991 * kern/fs.c: Likewise.
9992 * kern/loader.c: Likewise.
9993 * kern/main.c: Likewise.
9994 * kern/misc.c: Likewise.
9995 * kern/mm.c: Likewise.
9996 * kern/parser.c: Likewise.
9997 * kern/partition.c: Likewise.
9998 * kern/rescue.c: Likewise.
9999 * kern/term.c: Likewise.
10000 * kern/efi/efi.c: Likewise.
10001 * kern/efi/init.c: Likewise.
10002 * kern/efi/mm.c: Likewise.
10003 * kern/i386/dl.c: Likewise.
10004 * kern/i386/efi/init.c: Likewise.
10005 * kern/i386/efi/startup.S: Likewise.
10006 * kern/i386/pc/init.c: Likewise.
10007 * kern/i386/pc/lzo1x.S: Likewise.
10008 * kern/i386/pc/startup.S: Likewise.
10009 * kern/ieee1275/ieee1275.c: Likewise.
10010 * kern/powerpc/cache.S: Likewise.
10011 * kern/powerpc/dl.c: Likewise.
10012 * kern/powerpc/ieee1275/cmain.c: Likewise.
10013 * kern/powerpc/ieee1275/crt0.S: Likewise.
10014 * kern/powerpc/ieee1275/init.c: Likewise.
10015 * kern/powerpc/ieee1275/openfw.c: Likewise.
10016 * kern/sparc64/cache.S: Likewise.
10017 * kern/sparc64/dl.c: Likewise.
10018 * kern/sparc64/ieee1275/init.c: Likewise.
10019 * kern/sparc64/ieee1275/openfw.c: Likewise.
10020 * loader/efi/chainloader.c: Likewise.
10021 * loader/efi/chainloader_normal.c: Likewise.
10022 * loader/i386/efi/linux.c: Likewise.
10023 * loader/i386/efi/linux_normal.c: Likewise.
10024 * loader/i386/pc/chainloader.c: Likewise.
10025 * loader/i386/pc/chainloader_normal.c: Likewise.
10026 * loader/i386/pc/linux.c: Likewise.
10027 * loader/i386/pc/linux_normal.c: Likewise.
10028 * loader/i386/pc/multiboot.c: Likewise.
10029 * loader/i386/pc/multiboot_normal.c: Likewise.
10030 * loader/powerpc/ieee1275/linux.c: Likewise.
10031 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10032 * normal/arg.c: Likewise.
10033 * normal/cmdline.c: Likewise.
10034 * normal/command.c: Likewise.
10035 * normal/completion.c: Likewise.
10036 * normal/execute.c: Likewise.
10037 * normal/function.c: Likewise.
10038 * normal/lexer.c: Likewise.
10039 * normal/main.c: Likewise.
10040 * normal/menu.c: Likewise.
10041 * normal/menu_entry.c: Likewise.
10042 * normal/misc.c: Likewise.
10043 * normal/parser.y: Likewise.
10044 * normal/script.c: Likewise.
10045 * normal/i386/setjmp.S: Likewise.
10046 * normal/powerpc/setjmp.S: Likewise.
10047 * normal/sparc64/setjmp.S: Likewise.
10048 * partmap/acorn.c: Likewise.
10049 * partmap/amiga.c: Likewise.
10050 * partmap/apple.c: Likewise.
10051 * partmap/gpt.c: Likewise.
10052 * partmap/pc.c: Likewise.
10053 * partmap/sun.c: Likewise.
10054 * term/gfxterm.c: Likewise.
10055 * term/terminfo.c: Likewise.
10056 * term/efi/console.c: Likewise.
10057 * term/i386/pc/console.c: Likewise.
10058 * term/i386/pc/serial.c: Likewise.
10059 * term/i386/pc/vesafb.c: Likewise.
10060 * term/i386/pc/vga.c: Likewise.
10061 * term/ieee1275/ofconsole.c: Likewise.
10062 * util/biosdisk.c: Likewise.
10063 * util/console.c: Likewise.
10064 * util/genmoddep.c: Likewise.
10065 * util/getroot.c: Likewise.
10066 * util/grub-emu.c: Likewise.
10067 * util/grub-mkdevicemap.c: Likewise.
10068 * util/grub-probe.c: Likewise.
10069 * util/lvm.c: Likewise.
10070 * util/misc.c: Likewise.
10071 * util/raid.c: Likewise.
10072 * util/resolve.c: Likewise.
10073 * util/update-grub.in: Likewise.
10074 * util/update-grub_lib.in: Likewise.
10075 * util/grub.d/00_header.in: Likewise.
10076 * util/grub.d/10_hurd.in: Likewise.
10077 * util/grub.d/10_linux.in: Likewise.
10078 * util/i386/efi/grub-install.in: Likewise.
10079 * util/i386/efi/grub-mkimage.c: Likewise.
10080 * util/i386/pc/grub-install.in: Likewise.
10081 * util/i386/pc/grub-mkimage.c: Likewise.
10082 * util/i386/pc/grub-mkrescue.in: Likewise.
10083 * util/i386/pc/grub-setup.c: Likewise.
10084 * util/i386/pc/misc.c: Likewise.
10085 * util/powerpc/ieee1275/grub-install.in: Likewise.
10086 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10087 * util/powerpc/ieee1275/misc.c: Likewise.
10088 * video/bitmap.c: Likewise.
10089 * video/video.c: Likewise.
10090 * video/i386/pc/vbe.c: Likewise.
10091 * video/i386/pc/vbeblit.c: Likewise.
10092 * video/i386/pc/vbefill.c: Likewise.
10093 * video/i386/pc/vbeutil.c: Likewise.
10094 * video/readers/tga.c: Likewise.
10095
3572d015 100962007-07-02 Robert Millan <rmh@aybabtu.com>
10097
10098 * conf/i386-efi.rmk: Replace obsolete reference to
10099 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10100 with util/getroot.c.
10101 * conf/powerpc-ieee1275.rmk: Likewise.
10102 * conf/sparc64-ieee1275.rmk: Likewise.
10103
10104 * util/grub-emu.c (main): Fix unchecked pointer handling.
10105
2c2a681b 101062007-07-02 Robert Millan <rmh@aybabtu.com>
10107
10108 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10109 invocation to fail, in order to support partition-less media.
10110
10111 * util/i386/pc/grub-install.in: Likewise.
10112
10113 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10114 which fs or partmap modules are needed (akin to its sister scripts).
10115
10116 Also use grub-probe to get rid of unportable /proc/mounts check.
10117
10118 Print the same informational message that the other scripts do, before
fe6b695a 10119 exiting.
2c2a681b 10120
6193defe 101212007-06-23 Robert Millan <rmh@aybabtu.com>
10122
fe6b695a 10123 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 10124 a font file can be found and, if so, echo the GRUB path to it.
10125
10126 * util/update-grub.in: Handle multiple terminals depending on user
10127 input, platform availability and font file presence. Propagate
10128 variables of our findings to /etc/grub.d/ children.
10129
10130 * util/grub.d/00_header.in: Handle multiple terminals, based on
10131 environment setup by update-grub.
10132
eface1dc 101332007-06-23 Robert Millan <rmh@aybabtu.com>
10134
ba50d28f 10135 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 10136
bf697e28 101372007-06-21 Robert Millan <rmh@aybabtu.com>
10138
10139 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10140 indicate end of data section in kernel image.
10141 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10142 GRUB_KERNEL_MACHINE_DATA_END.
10143
10144 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10145 space for it.
10146 * kern/i386/efi/startup.S: Likewise.
10147
10148 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10149 during image generation. Implement --prefix option to override this
10150 patch.
10151 * util/i386/efi/grub-mkimage.c: Likewise.
10152
10153 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10154 code to make path relative to its root into a separate function.
10155
10156 * util/i386/pc/grub-install.in: Use newly provided
10157 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10158 pass the result to grub-install --prefix.
10159
baa574b4 101602007-06-13 Robert Millan <rmh@aybabtu.com>
10161
10162 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10163 DEFAULT_DEVICE_MAP.
10164 * util/grub-emu.c: Use above definitions from misc.h instead of
10165 defining them.
10166 * util/grub-mkdevicemap.c: Likewise.
10167 * util/i386/pc/grub-setup.c: Likewise.
10168 * util/grub-probe.c: Likewise.
10169 (probe): Abort with grub_util_error() when either
10170 grub_guess_root_device or grub_util_get_grub_dev fails.
10171
0215dcbf 101722007-06-12 Robert Millan <rmh@aybabtu.com>
10173
10174 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10175 "pager" assignment.
10176 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10177 "pcdata".
10178 * util/grub-probe.c (probe): Likewise for "drive_name".
10179
8af2ab7b 101802007-06-11 Robert Millan <rmh@aybabtu.com>
10181
10182 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10183 not just the cdrom one.
10184
59d31694 101852007-06-11 Robert Millan <rmh@aybabtu.com>
10186
10187 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10188 Add --pkglibdir=DIR option to override pkglibdir.
10189 Mention --image-type=TYPE in help output.
10190 Fix --grub-mkimage (it was a no-op).
fe6b695a 10191 Abort gracefully when no parameter is given.
59d31694 10192
7ee367e4 101932007-06-11 Robert Millan <rmh@aybabtu.com>
10194
10195 * util/i386/pc/grub-mkrescue.in: New file.
10196 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10197 * Makefile.in: Handle bin_SCRIPTS.
10198
29b0ed46 101992007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10200
10201 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10202 list of video modes.
10203
c0f90770 102042007-06-06 Robert Millan <rmh@aybabtu.com>
10205
10206 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10207 file doesn't exist, or if it is in a filesystem grub can't read.
10208
10209 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10210 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10211 header comment to fit in 80 columns when the variables are resolved.
10212
10213 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10214 could be identified by update-grub. Remove redundant check for
fe6b695a 10215 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 10216 handles that).
10217
fb36dc26 102182007-06-04 Robert Millan <rmh@aybabtu.com>
10219
10220 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10221
10222 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10223
10224 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10225
0c68c93e 102262007-06-04 Robert Millan <rmh@aybabtu.com>
10227
10228 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10229
10230 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10231 grub_apple_partition_map_fini.
10232
10233 * util/biosdisk.c
10234 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10235 to access >2 TiB disks).
10236
10237 Print disk->total_sectors with %llu instead of %lu, since this
10238 variable is always 64-bit (prevents wrong disk size from being displayed
10239 on either >2 TiB disk or big-endian CPU).
10240
10241 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10242 into a generic case that supports all (sane) partition maps.
10243
10244 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10245 breaks big-endian.
10246
10247 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10248 and grub_apple_partition_map_fini() after that.
10249
0f23eb74 102502007-06-01 Robert Millan <rmh@aybabtu.com>
10251
10252 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10253
10254 * util/grub.d/00_header.in: Only enable gfxterm when
10255 convert_system_path_to_grub_path() succeeds.
10256
42c71976 102572007-05-20 Robert Millan <rmh@aybabtu.com>
10258
10259 * util/update-grub_lib.in: New file.
10260 * DISTLIST: Add update-grub_lib.in.
10261 * conf/common.rmk: Generate update-grub_lib and install it in
10262 $(lib_DATA).
10263 * Makefile.in: Add install routine for $(lib_DATA).
10264
10265 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10266 function provided by update-grub_lib to support arbitrary paths of
10267 unifont.pff.
10268 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10269 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10270
5beb2291 102712007-05-19 Robert Millan <rmh@aybabtu.com>
10272
10273 * commands/i386/cpuid.c: New module.
10274 * DISTLIST: Add it.
10275 * conf/i386-efi.rmk: Enable cpuid.mod.
10276 * conf/i386-pc.rmk: Likewise.
10277
7262eca1 102782007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10279
10280 * kern/disk.c (grub_disk_read): Check return value of
10281 grub_realloc().
10282
260ba823 102832007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10284
10285 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10286 arrays.
10287 * disk/raid.c (grub_raid_open): Likewise.
10288
1ecb6cf2 102892007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10290
10291 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10292 stack instead of on the heap.
10293
10294 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10295 before doing a read on it.
10296
10297 * configure.ac: Only use -fno-stack-protector for the target
10298 environment.
f19dbdb7 10299
21c8cbb1 103002007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10301
10302 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10303 __attribute_ ((unused)) to mode_type argument.
10304
10305 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 10306
21c8cbb1 10307 * kern/misc.c (memcmp): Fix prototype.
10308
10309 * include/grub/partition.h [GRUB_UTIL]
10310 (grub_gpt_partition_map_init): Add prototype.
10311 (grub_gpt_partition_map_fini): Likewise.
10312
10313 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10314 at the right place.
10315
10316 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10317 (grub_fat_read_data): Likewise.
10318 (grub_fat_find_dir): Likewise.
10319
10320 * font/manager.c (find_glyph): Make table a const.
10321 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 10322
849d55d3 103232007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10324
10325 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10326 code, first search for device in /dev/mapper, then in /dev.
10327 (grub_util_get_grub_dev): New function.
10328 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10329 prototype.
10330 * util/grub-probe.c (probe): Remove check for RAID, call
10331 grub_util_get_grub_dev() instead of
10332 grub_util_biosdisk_get_grub_dev().
10333 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10334 grub_util_biosdisk_get_grub_dev().
10335 * util/i386/pc/grub-setup.c (main): Likewise.
10336
8fff7c2f 103372007-05-16 Robert Millan <rmh@aybabtu.com>
10338
10339 * DISTLIST: Update for the latest changes.
10340 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10341 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10342 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10343 grub/util/biosdisk.h.
10344 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10345 grub/util/biosdisk.h.
10346
48e12b52 103472007-05-16 Robert Millan <rmh@aybabtu.com>
10348
10349 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10350
46b9d128 103512007-05-16 Robert Millan <rmh@aybabtu.com>
10352
10353 * util/i386/efi/grub-install.in: New.
10354 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10355 newly added grub-install.
10356 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10357 include.
10358 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10359 grub/util/biosdisk.h.
10360 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10361 grub/util/biosdisk.h.
10362
2d1a40a9 103632007-05-16 Robert Millan <rmh@aybabtu.com>
10364
10365 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10366 * include/grub/util/biosdisk.h: ... here.
10367 * util/i386/pc/biosdisk.c: Moved to ...
10368 * util/biosdisk.c: ... here.
10369 * util/i386/pc/getroot.c: Moved to ...
10370 * util/getroot.c: ... here.
10371 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10372 * util/grub-mkdevicemap.c: ... here.
10373 * util/i386/pc/grub-probe.c: Moved to ...
10374 * util/grub-probe.c: ... here.
10375
9e26e3bc 103762007-05-15 Robert Millan <rmh@aybabtu.com>
10377
10378 * util/update-grub.in: Remove duplicated line in grub.cfg header
10379 message.
10380
57f96397 103812007-05-13 Robert Millan <rmh@aybabtu.com>
10382
10383 * util/update-grub.in: Fix a few assumptions about the devices holding
10384 /, /boot and /boot/grub being the same.
10385 * util/grub.d/00_header.in: Likewise.
10386 * util/grub.d/10_hurd.in: Likewise.
10387 * util/grub.d/10_linux.in: Likewise.
10388
10389 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10390 patterns. Use that to define the `.old' suffix as older than `'.
10391
10392 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10393
10394 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10395 the grub.cfg header message.
10396
2e610d62 103972007-05-11 Robert Millan <rmh@aybabtu.com>
10398
10399 * util/update-grub.in: Create device.map if it doesn't already exist,
10400 before attempting to run grub-probe.
10401 Check for grub-probe and grub-mkdevicemap with the same code
10402 grub-install is using.
10403 Remove test mode.
10404
3f6a10ef 104052007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10406
10407 * Makefile.in: Add the datarootdir autoconf variable.
10408
02e7b75e 104092007-05-09 Robert Millan <rmh@aybabtu.com>
10410
10411 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 10412 fail gracefully if dev->disk->partition == NULL.
02e7b75e 10413
75f396cc 104142007-05-07 Robert Millan <rmh@aybabtu.com>
10415
10416 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10417 determine partition map module.
10418 * util/i386/pc/grub-install.in: Use this feature to decide which
10419 partition module to load, instead of hardcoding pc and gpt.
10420
da65cb36 104212007-05-07 Robert Millan <rmh@aybabtu.com>
10422
10423 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10424 source directory differs from build directory.
10425
b57d6a91 104262007-05-05 Robert Millan <rmh@aybabtu.com>
10427
10428 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10429 initialisation.
10430
509d00f1 104312007-05-05 Robert Millan <rmh@aybabtu.com>
10432
10433 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10434
c48f23ef 104352007-05-05 Robert Millan <rmh@aybabtu.com>
10436
10437 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10438 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10439
20b97658 104402007-05-05 Robert Millan <rmh@aybabtu.com>
10441
10442 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10443 (grub_probe_SOURCES): Likewise.
10444 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10445 GPT and initialize dos_part and bsd_part accordingly.
10446 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10447 install_bsd_part.
10448 (main): Activate gpt module for use during partition identification,
10449 and deactivate it afterwards.
10450 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10451 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10452 partition identification, and deactivate it afterwards.
10453
99123174 104542007-05-05 Robert Millan <rmh@aybabtu.com>
10455
10456 * term/i386/pc/console.c (grub_console_fini): Call
10457 grub_term_set_current() before grub_term_unregister().
10458
ebd97f6e 104592007-05-04 Robert Millan <rmh@aybabtu.com>
10460
10461 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10462 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10463 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10464 and update-grub_DATA.
10465 * conf/common.rmk: Build and install update-grub components.
10466 * conf/common.mk: Regenerate.
10467 * util/update-grub.in: New. Core of update-grub.
10468 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10469 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10470 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10471 * util/grub.d/README: New. Document grub.d directory layout.
10472
b06a264d 104732007-05-01 Robert Millan <rmh@aybabtu.com>
10474
10475 * util/grub-emu.c: Move initialization functions
10476 grub_util_biosdisk_init() and grub_init_all() before
10477 grub_util_biosdisk_get_grub_dev(), which relies on them.
10478
41f0050e 104792007-04-19 Robert Millan <rmh@aybabtu.com>
10480
10481 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10482 it is used later.
10483
04582bb3 104842007-04-18 Jerone Young <jerone@gmail.com>
10485
f19dbdb7 10486 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 10487 stanza.
10488
08db4632 104892007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 10490
08db4632 10491 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10492 continue on and look for device node with real device name.
10493
801b76be 104942007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 10495
fe6b695a 10496 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 10497 ability.
10498 * Makefile.in: Add autoconf package transformation code.
10499 * util/i386/pc/grub-install.in: Likewise.
10500 * util/powerpc/ieee1275/grub-install.in: Likewise.
10501
6795c4e1 105022007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10503
10504 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10505 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10506 (EXT2_REVISION): Likewise.
10507 (EXT2_INODE_SIZE): Likewise.
10508 (struct grub_ext2_block_group): Added a missing member
10509 "used_dirs".
10510 (grub_ext2_read_inode): Divide by the inode size in a superblock
10511 instead of 128 to obtain INODES_PER_BLOCK.
10512 Use the macro EXT2_INODE_SIZE instead of directly using
10513 SBLOCK->INODE_SIZE.
10514
d70af616 105152007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10516
10517 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10518 superblock instead of the structure size to compute an
10519 offset. This fixes the problem that GRUB could not read a
10520 filesystem when inode size is different from 128-byte.
10521
3b801603 105222007-03-05 Marco Gerards <marco@gnu.org>
10523
10524 * normal/main.c (read_config_file): When "menu" is not set, create
10525 an initial context.
10526
4785bfe4 105272007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10528
10529 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10530 (HEAP_LIMIT): New macro.
10531 (grub_claim_heap): Claim memory up to `heaplimit'.
10532
a0cbb023 105332007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10534
10535 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10536 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10537 (_start): Likewise.
10538 (grub_arch_modules_addr): Return address after `_end'.
10539 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10540 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10541 (add_segments): Calculate `_end' from phdr size and location.
10542 (ALIGN_UP): Moved to ...
10543 * include/grub/misc.h: here.
10544 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10545 New macro.
10546 (GRUB_IEEE1275_MODULE_BASE): Removed.
10547
fd7d8eba 105482007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10549
10550 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10551 loop boundary.
10552
9b09e6fc 105532007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10554
10555 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10556 All users updated.
10557 (grub_elf64_load_hook_t): Likewise.
10558 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10559 debug output.
10560
3ce27299 105612007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10562
10563 * kern/mm.c: Update copyright.
10564 (grub_mm_debug): Correct syntax error.
10565 (grub_mm_dump_free): New function.
10566 (grub_debug_free): Call `grub_free'.
10567 * include/grub/mm.h: Update copyright.
10568 (grub_mm_dump_free): Add declaration.
10569
077d5fee 105702007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10571
10572 * include/grub/ieee1275/ieee1275.h: Update copyright.
10573 * kern/powerpc/ieee1275/init.c: Likewise.
10574 * kern/powerpc/ieee1275/openfw.c: Likewise.
10575
10576 * loader/powerpc/ieee1275/linux.c: Likewise.
10577 * include/grub/elfload.h: Likewise.
10578 * kern/elf.c: Likewise.
10579 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10580 callers.
10581 (grub_elf64_load): Likewise.
10582 (grub_elf32_load_segment): Move to a nested function.
10583 (grub_elf64_load_segment): Likewise.
10584
dc946850 105852007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10586
10587 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10588 prototype.
10589 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10590 (grub_heap_len): Likewise.
10591 (HEAP_SIZE): New macro.
10592 (grub_claim_heap): New function.
10593 (grub_machine_init): Don't claim heap directly. Call
10594 `grub_claim_heap'.
10595 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10596 (grub_available_iterate): New function.
10597
baa2a121 105982007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10599
10600 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10601 * configure.ac: Use it for testing the HOST and TARGET compilers.
10602
4fe9862e 106032006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10604
10605 * Makefile.in (enable_grub_emu): New variable.
10606 * configure.ac (--enable-grub-emu): New option.
10607 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10608 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10609 * conf/i386-pc.rmk: Likewise.
10610 * conf/powerpc-ieee1275.rmk: Likewise.
10611 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10612
a8aa5762 106132006-12-12 Marco Gerards <marco@gnu.org>
10614
10615 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10616
10617 * kern/env.c (grub_env_unset): Don't free the member `value' when
10618 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10619 pointer.
10620
10621 * normal/main.c (current_menu): Removed.
10622 (free_menu): Unset the `menu' environment variable.
10623 (grub_normal_menu_addentry): Make use of the environment variable
10624 `menu', instead of using the global `current_menu'. Allocate
10625 memory for the sourcecode of this entry.
10626 (read_config_file): New argument `nested', changed all callers.
10627 Only in the case of a new context, initialize a new menu. Set the
10628 `menu' environment variable.
10629 (grub_normal_execute): Don't set and unset the environment
10630 variable `menu' here anymore. Only free the menu when leaving the
10631 context.
10632
10633 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10634 leak.
10635
957b3a3e 106362006-12-11 Marco Gerards <marco@gnu.org>
10637
10638 * normal/menu_entry.c (run): Fix off by one bug so the last line
10639 is executed. Move the loader check to outside the loop.
10640
ef875714 106412006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10642
10643 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10644
4e739985 106452006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10646
10647 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10648 the number of sectors. Reported by Andrey Shuvikov
10649 <mr_hyro@yahoo.com>.
f19dbdb7 10650
790707f2 106512006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10652
10653 * kern/disk.c (grub_disk_read): When there is a read error, always
10654 try to read only the necessary data.
f19dbdb7 10655
790707f2 10656 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10657 disk/raid.c.
10658 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10659 prototype.
10660 [GRUB_UTIL] (grub_raid_fini): Likewise.
10661 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10662 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10663 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10664 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10665 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10666 and grub_raid_fini().
f19dbdb7 10667
03e58196 106682006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10669
10670 * include/grub/types.h (__unused): Rename to UNUSED.
10671 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10672 (grub_elf64_size): Likewise.
f19dbdb7 10673
ae4f23bf 106742006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10675
10676 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10677 grub_error_push and grub_error_pop in the error-handling path.
10678 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10679 length.
10680
2166cc83 106812006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10682
10683 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10684 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10685 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10686 (kernel_elf_SOURCES): Likewise.
10687 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10688 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10689 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10690 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10691 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10692 (elf_mod_SOURCES): New variable.
10693 (elf_mod_CFLAGS): Likewise.
10694 (elf_mod_LDFLAGS): Likewise.
10695 * include/grub/types.h (__unused): New macro.
10696 * include/grub/elfload.h: New file.
10697 * kern/elf.c: Likewise.
10698 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10699 (ELF32_LOADMASK): New macro.
10700 (ELF64_LOADMASK): Likewise.
10701 (vmlinux): Removed.
10702 (grub_linux_load32): New function.
10703 (grub_linux_load64): Likewise.
10704 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10705 Use grub_elf_t instead of grub_file_t.
10706
a09d5aa5 107072006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10708
10709 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10710 `catch_result' to struct set_color_args.
10711
d976fc51 107122006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10713
10714 * normal/menu.c: Include grub/script.h.
10715 * normal/menu_entry.c: Likewise.
10716 * include/grub/normal.h: Do not include grub/script.h.
10717
67507549 107182006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10719
10720 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10721
69203a99 107222006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10723
10724 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10725 disk.
10726 (grub_disk_close): Print debug messages when closing a disk.
10727 (grub_disk_read): Print debug messages when disk read fails.
10728 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10729 filesystem type.
10730 * kern/partition.c: Include misc.h.
10731 (grub_partition_iterate): Print debug messages when detecting
10732 partition type.
10733
e2b8278c 107342006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10735
10736 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10737 is negative.
10738 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10739
97b2f2ff 107402006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10741
10742 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10743 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10744
6555d655 107452006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10746
10747 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10748 instead of sizeof(lv). Patch by Michael Guntsche.
10749
4d42b77f 107502006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10751
10752 * disk/lvm.c: Rename VGS to VG_LIST.
10753 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10754 (grub_lvm_open): Likewise.
10755 Thanks to Michael Guntsche for finding this bug.
10756
5d74d927 107572006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10758
10759 * configure.ac (AC_INIT): Bumped to 1.95.
10760
a1bb27e4 107612006-10-14 Robert Millan <rmh@aybabtu.com>
10762
10763 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10764 with "/dev/.static/dev/md".
10765
e0994b8b 107662006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10767
10768 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10769 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10770 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10771 DRIVE_NAME are always freed.
10772
10773 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10774 DOS_PART, as a DOS partition is counted from one instead of zero
10775 now. Reported by Robert Millan.
10776
ddd5cee9 107772006-10-14 Robert Millan <rmh@aybabtu.com>
10778
10779 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10780 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10781 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10782 string returned by grub_guess_root_device.
10783 * util/i386/pc/grub-setup.c: Likewise.
10784 * util/i386/pc/grub-probefs.c: Likewise.
10785
10786 * util/i386/pc/grub-probefs.c: Rename to ...
10787 * util/i386/pc/grub-probe.c: ... this.
10788 * DISTLIST: Remove grub-probefs, add grub-probe.
10789 * conf/i386-efi.rmk: Likewise.
10790 * conf/i386-pc.rmk: Likewise.
10791 * util/i386/pc/grub-install.in: Likewise.
10792
10793 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10794 choose which information we want to print.
10795
2b002173 107962006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10797
10798 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10799 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10800 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10801 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10802 video/readers/tga.c and video/i386/pc/vbeutil.c.
10803
108042006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10805
10806 Added support for RAID and LVM.
f19dbdb7 10807
2b002173 10808 * disk/lvm.c: New file.
10809 * disk/raid.c: Likewise.
10810 * include/grub/lvm.h: Likewise.
f19dbdb7 10811 * include/grub/raid.h: Likewise.
2b002173 10812 * include/grub/util/lvm.h: Likewise.
10813 * include/grub/util/raid.h: Likewise.
10814 * util/lvm.c: Likewise.
10815 * util/raid.c: Likewise.
10816
10817 * include/grub/disk.h (grub_disk_dev_id): Add
10818 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10819 (grub_disk_get_size): New prototype.
10820 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10821 returns a partition.
10822 (grub_disk_get_size): New function.
f19dbdb7 10823
2b002173 10824 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10825 verbatim if grub_install_dos_part is -2.
10826
10827 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10828 and LVM devices.
10829
10830 * util/i386/pc/grub-setup.c (setup): New argument
10831 MUST_EMBED. Force embedding of GRUB when the argument is
10832 true. Close FILE before returning.
10833 (main): Add support for RAID and LVM.
f19dbdb7 10834
2b002173 10835 * conf/common.rmk: Add RAID and LVM modules.
10836 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10837 util/lvm.c.
10838 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10839
10840 * kern/misc.c (grub_strstr): New function.
10841 * include/grub/misc.h (grub_strstr): New prototype.
10842
050548d0 108432006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10844
10845 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10846
da849d2d 108472006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10848
10849 * kern/misc.c (grub_strtoull): Guess the base only if not
10850 specified.
10851
97b2f2ff 108522006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 10853
10854 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10855 PowerMac support.
10856
97b2f2ff 108572006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 10858
10859 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10860
10861 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10862 Remove `flags' argument. All callers changed.
10863 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10864 (IEEE1275_IHANDLE_INVALID): New variable.
10865 (IEEE1275_CELL_INVALID): New variable.
10866 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10867 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10868 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10869 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10870 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10871 codes from Open Firmware. All callers updated.
10872 (grub_ieee1275_next_property): Directly return Open Firmware return
10873 code.
10874 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10875 Standardize error checking from `grub_ieee1275_get_property'.
10876 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10877 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10878
97b2f2ff 108792006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 10880
10881 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10882 `instance_to_package_args' to `instance_to_path_args'.
10883
10884 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10885 `grub_ieee1275_chosen'.
10886
10887 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10888 `grub_ieee1275_interpret'.
10889
97b2f2ff 108902006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 10891
10892 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10893
97b2f2ff 108942006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 10895
10896 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10897 (__cmpdi): Likewise.
10898
10899 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10900 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10901 `grub_ssize_t'.
10902
02bb8acc 10903 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 10904
10905 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10906 to type `grub_ssize_t'.
10907 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10908
7f9a8531 109092006-09-22 Marco Gerards <marco@gnu.org>
10910
10911 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10912 newlines.
10913
b5ef1102 109142006-09-22 Marco Gerards <marco@gnu.org>
10915
10916 * commands/echo.c: New file.
10917
10918 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10919
10920 * conf/common.rmk (echo_mod_SOURCES): New variable.
10921 (echo_mod_CFLAGS): Likewise.
10922 (echo_mod_LDFLAGS): Likewise.
10923
2cff3677 109242006-09-22 Marco Gerards <marco@gnu.org>
10925
10926 * normal/main.c (get_line): Malloc memory instead of using
10927 preallocated memory. Removed the arguments `cmdline' and
10928 `max_len'. Updated all callers.
10929
6ba4688b 109302006-09-22 Marco Gerards <marco@gnu.org>
10931
10932 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10933 (normal_mod_DEPENDENCIES): Likewise.
10934
10935 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10936 (normal_mod_DEPENDENCIES): Likewise.
10937
10938 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10939
e02ac02c 109402006-09-22 Johan Rydberg <jrydberg@gnu.org>
10941
10942 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10943 programs.
10944 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10945 (normal_mod_DEPENDENCIES): Likewise.
10946 * conf/i386-pc.mk: Regenerate.
10947 * conf/i386-efi.mk: Likewise
10948 * conf/common.mk: Likewise.
10949 * conf/powerpc-ieee1275.mk: Likewise.
10950 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10951
8d252e44 109522006-09-22 Robert Millan <rmh@aybabtu.com>
10953
10954 Sync with i386 version.
10955 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10956 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10957
209bf7ac 109582006-09-21 Robert Millan <rmh@aybabtu.com>
10959
10960 Import from GRUB Legacy (lib/device.c):
10961 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10962 (init_device_map) [__linux__]: Add support for I2O devices.
10963
6b146090 109642006-09-14 Marco Gerards <marco@gnu.org>
10965
10966 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10967 `-melf_i386'.
10968
e38600a8 109692006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 10970
10971 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10972 /boot/grub/*.lst.
78fa1790 10973
2952da5d 10974 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 10975
2952da5d 10976 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10977 before adding it to device.map.
10978
01b82a64 109792006-08-15 Johan Rydberg <jrydberg@gnu.org>
10980
fe6b695a 10981 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 10982 compiles a file; using the -MD option.
10983 * conf/common.mk: Regenerate.
10984 * conf/i386-pc.mk: Likewise.
10985 * conf/i386-efi.mk: Likewise.
10986 * conf/powerpc-ieee1275.mk: Likewise.
10987 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10988
1064790d 109892006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10990
10991 Move the prototypes of grub_setjmp and grub_longjmp to
10992 cpu/setjmp.h, so that each architecture may specify different
10993 attributes.
f19dbdb7 10994
1064790d 10995 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10996 (grub_longjmp): Likewise.
10997 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10998 (grub_longjmp): Likewise.
10999 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11000 (grub_longjmp): Likewise.
11001
11002 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11003 [!GRUB_UTIL] (grub_longjmp): Removed.
11004
29dda3ed 110052006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11006
11007 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11008 "color!" method does not return any value.
11009
ad2a06ed 110102006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11011
11012 * include/grub/bitmap.h: New file.
11013
11014 * include/grub/i386/pc/vbeutil.h: Likewise.
11015
11016 * video/bitmap.c: Likewise.
11017
11018 * video/readers/tga.c: Likewise.
11019
11020 * video/i386/pc/vbeutil.c: Likewise.
11021
11022 * commands/videotest.c: Code cleanup and updated to reflect to new
11023 video API.
11024
11025 * term/gfxterm.c: Likewise.
11026
11027 * video/video.c: Likewise.
11028
11029 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11030 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11031 (bitmap_mod_SOURCES): New entry.
11032 (bitmap_mod_CFLAGS): Likewise.
11033 (bitmap_mod_LDFLAGS): Likewise.
11034 (tga_mod_SOURCES): Likewise.
11035 (tga_mod_CFLAGS): Likewise.
11036 (tga_mod_LDFLAGS): Likewise.
11037
11038 * include/grub/video.h (grub_video_blit_operators): New enum type.
11039 (grub_video_render_target): Changed as forward declaration and moved
11040 actual definition to be video driver specific.
11041 (grub_video_adapter.blit_bitmap): Added blitting operator.
11042 (grub_video_adapter.blit_render_target): Likewise.
11043 (grub_video_blit_bitmap): Likewise.
11044 (grub_video_blit_render_target): Likewise.
11045
11046 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11047 driver specific render target definition.
11048 (grub_video_vbe_map_rgba): Added driver internal helper.
11049 (grub_video_vbe_unmap_color): Updated to use
11050 grub_video_i386_vbeblit_info.
11051 (grub_video_vbe_get_video_ptr): Likewise.
11052
11053 * include/grub/i386/pc/vbeblit.h
11054 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11055 grub_video_i386_vbeblit_info.
11056 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11057 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11058 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11059 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11060 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11061 (grub_video_i386_vbeblit_index_index): Likewise.
11062 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11063 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11064 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11065 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11066 operator.
11067 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11068 operator.
11069
11070 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11071 include/grub/i386/pc/vbeblit.h.
11072
11073 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11074 Updated to use grub_video_i386_vbeblit_info.
11075 (grub_video_i386_vbefill_R8G8B8): Likewise.
11076 (grub_video_i386_vbefill_index): Likewise.
11077 (grub_video_i386_vbefill): Added generic filler.
11078
11079 * video/i386/pc/vbefill.c: Updated to reflect changes on
11080 include/grub/i386/pc/vbefill.h.
11081
11082 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11083 grub_video_i386_vbeblit_info.
11084 (grub_video_vbe_unmap_color): Likewise.
11085 (grub_video_vbe_blit_glyph): Likewise.
11086 (grub_video_vbe_scroll): Likewise.
11087 (grub_video_vbe_draw_pixel): Removed function.
11088 (grub_video_vbe_get_pixel): Likewise.
11089 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11090 updated code to use it.
11091 (common_blitter): Added common blitter for render target and bitmap.
11092 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11093 (grub_video_vbe_blit_render_target): Likewise.
11094
bc8c036d 110952006-07-30 Johan Rydberg <jrydberg@gnu.org>
11096
11097 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11098 is in text mode if there is no console control protocol instance
11099 available.
11100
684a8eff 111012006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11102
11103 * include/grub/video.h: Code cleanup.
11104
11105 * include/grub/i386/pc/vbe.h: Likewise.
11106
11107 * video/i386/pc/vbe.c: Likewise.
11108
11109 * video/i386/pc/vbeblit.c: Likewise.
11110
11111 * video/i386/pc/vbefill.c: Likewise.
11112
11113 * video/video.c: Likewise. Also added more comments.
11114
5915059b 111152006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11116
11117 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11118 (struct grub_biosdisk_dap): Likewise.
11119
11120 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11121 linkage settings for all functions.
11122
90ce5d56 111232006-07-12 Marco Gerards <marco@gnu.org>
11124
11125 * configure.ac (--enable-mm-debug): Fix typo.
11126
11127 * genkernsyms.sh.in: Use proper quoting for `CC'.
11128
43e7f879 111292006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11130
11131 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11132 (normal_mod_ASFLAGS): Remove "-m32".
11133
4889bdec 111342006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11135
11136 * util/misc.c: Include config.h.
11137 [!HAVE_MEMALIGN]: Do not include malloc.h.
11138 (grub_memalign): Use posix_memalign, if present. Then, use
11139 memalign, if present. Otherwise, emit an error.
11140
11141 * util/grub-emu.c: Do not include malloc.h.
11142
11143 * include/grub/util/misc.h: Include unistd.h. This is required for
11144 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11145 D. Eades III <hde@foobar-qux.org>.
11146
11147 * configure.ac (AC_GNU_SOURCE): Added.
11148 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11149 type.
11150
fd39d4da 111512006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11152
11153 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11154 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11155
b786f3b5 111562006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11157
11158 * include/grub/types.h (grub_host_addr_t): Rename to
11159 grub_target_addr_t.
11160 (grub_host_off_t): Rename to grub_target_off_t.
11161 (grub_host_size_t): Rename to grub_target_size_t.
11162 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11163 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11164
11165 * include/grub/kernel.h (struct grub_module_header): Change type
11166 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11167 (grub_module_info): Likewise.
f19dbdb7 11168
051988bb 111692006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11170
11171 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11172 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11173 Velazquez <jesus.velazquez@gmail.com>.
11174
deae281b 111752006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11176
11177 Count partitions from 1 instead of 0 in the string representation
11178 of partitions. Still use 0-based internally.
f19dbdb7 11179
deae281b 11180 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11181 (sun_partition_map_iterate): Use grub_partition_t instead of
11182 struct grub_partition *. Cast DESC->START_CYLINDER to
11183 grub_uint64_t after converting the endian.
11184 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11185 (sun_partition_map_get_name): Add 1 to P->INDEX.
11186
11187 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11188 PCDATA->DOS_PART.
11189 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11190
11191 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11192 zero instead of one.
11193 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11194 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11195
11196 * partmap/apple.c (apple_partition_map_iterate): Change the type
11197 of POS to unsigned.
11198 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11199 (apple_partition_map_get_name): Add 1 into P->INDEX.
11200
11201 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11202 of POS to unsigned.
11203 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11204 calculate the offset of a partition.
11205 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11206 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11207
11208 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11209 SECTOR to grub_disk_addr_t.
11210 (acorn_partition_map_iterate): Likewise.
11211 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11212 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11213 top.
11214 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11215
11216 * kern/i386/pc/init.c (make_install_device): Add 1 into
11217 GRUB_INSTALL_DOS_PART.
11218
11219 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11220 conditional.
11221
524a1e6a 112222006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11223
11224 Clean up the code to support 64-bit addressing in disks and
11225 files. This change is not enough for filesystems yet.
f19dbdb7 11226
524a1e6a 11227 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11228 type of "start" to grub_uint64_t.
11229 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11230 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11231 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11232 convert addresses.
11233
11234 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11235 to grub_disk_addr_t.
11236
11237 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11238 string.
11239
11240 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11241
11242 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11243 to char *.
11244
11245 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11246
11247 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11248
11249 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11250
11251 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11252 to grub_off_t, to detect an error from grub_file_seek.
11253 (grub_multiboot_load_elf32): Likewise.
11254
11255 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11256 maximum unsigned long value when an overflow is detected.
11257 (grub_strtoull): New function.
11258 (grub_divmod64): Likewise.
11259 (grub_lltoa): use grub_divmod64.
11260
11261 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11262 grub_disk_addr_t.
11263 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11264 the pointer to next character. Use grub_strtoull instead of
11265 grub_strtoul.
11266 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11267 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11268 respectively.
11269
fe6b695a 11270 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 11271 return value is signed.
11272 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11273 test if OFFSET is less than zero, as OFFSET is unsigned now.
11274
11275 * kern/disk.c (struct grub_disk_cache): Change the type of
11276 "sector" to grub_disk_addr_t.
11277 (grub_disk_cache_get_index): Change the type of SECTOR to
11278 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11279 unsigned after shifting.
11280 (grub_disk_cache_invalidate): Change the type of SECTOR to
11281 grub_disk_addr_t.
11282 (grub_disk_cache_unlock): Likewise.
11283 (grub_disk_cache_store): Likewise.
11284 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11285 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11286 grub_disk_addr_t and grub_uint64_t, respectively.
11287 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11288 body, as the value of OFFSET is tweaked by
11289 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11290 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11291 respectively.
11292 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11293 body, as the value of OFFSET is tweaked by
11294 grub_disk_check_range. Change the types of LEN and N to
11295 grub_size_t.
11296
11297 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11298 and "saved_offset" to grub_off_t.
11299 (test_header): Cast BUF to char *.
11300 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11301 to char *.
11302 (grub_gzio_read): Change the types of OFFSET and SIZE to
11303 grub_off_t and grub_size_t, respectively.
11304
11305 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11306 Removed.
11307 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11308 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11309 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11310 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11311 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11312
11313 * include/grub/types.h (grub_off_t): Unconditionally set to
11314 grub_uint64_t.
11315 (grub_disk_addr_t): Changed to grub_uint64_t.
11316
11317 * include/grub/partition.h (struct grub_partition): Change the
11318 types of "start", "len" and "offset" to grub_disk_addr_t,
11319 grub_uint64_t and grub_disk_addr_t, respectively.
11320 (grub_partition_get_start): Return grub_disk_addr_t.
11321 (grub_partition_get_len): Return grub_uint64_t.
11322
11323 * include/grub/misc.h (grub_strtoull): New prototype.
11324 (grub_divmod64): Likewise.
11325
11326 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11327 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11328 grub_off_t, respectively.
11329 All callers and references changed.
11330
11331 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11332 grub_size_t in "read".
11333 All callers and references changed.
11334
11335 * include/grub/file.h (struct grub_file): Change the types of
11336 "offset" and "size" to grub_off_t and grub_off_t,
11337 respectively. Change the type of SECTOR to grub_disk_addr_t in
11338 "read_hook".
11339 (grub_file_read): Change the type of LEN to grub_size_t.
11340 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11341 grub_off_t.
11342 (grub_file_size): Return grub_off_t.
11343 (grub_file_tell): Likewise.
11344 All callers and references changed.
11345
11346 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11347 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11348 "write".
11349 (struct grub_disk): Change the type of "total_sectors" to
11350 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 11351 "read_hook".
524a1e6a 11352 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11353 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11354 (grub_disk_write): Likewise.
11355 All callers and references changed.
11356
11357 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11358 char * for grub_strncmp to silence gcc.
11359 (grub_iso9660_mount): Likewise.
11360 (grub_iso9660_mount): Likewise.
11361 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11362 return statement.
11363 (grub_iso9660_iterate_dir): Likewise.
11364 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11365
11366 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11367 LEN to grub_disk_addr_t and grub_size_t, respectively.
11368
11369 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11370
11371 * fs/jfs.c (grub_jfs_read_file): Likewise.
11372
11373 * fs/minix.c (grub_jfs_read_file): Likewise.
11374
11375 * fs/sfs.c (grub_jfs_read_file): Likewise.
11376
11377 * fs/ufs.c (grub_jfs_read_file): Likewise.
11378
11379 * fs/xfs.c (grub_jfs_read_file): Likewise.
11380
11381 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11382 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11383 respectively.
11384
11385 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11386 BLKNR to -1 instead of returning GRUB_ERRNO.
11387 (grub_ext2_read_file): Change the types of SECTOR and
11388 LEN to grub_disk_addr_t and grub_size_t, respectively.
11389
11390 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11391 LEN to grub_disk_addr_t and grub_size_t, respectively.
11392
11393 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11394 grub_file_read.
11395
11396 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11397 string. Do not cast SECTOR explicitly.
11398
11399 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11400 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11401 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11402 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11403 over 2TB and LBA mode is not supported, raise an error.
11404 (get_safe_sectors): New function.
11405 (grub_biosdisk_read): Use get_safe_sectors.
11406 (grub_biosdisk_write): Likewise.
11407
11408 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11409 (grub_efidisk_write): Likewise.
11410
11411 * disk/loopback.c (delete_loopback): Cosmetic changes.
11412 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11413 correctly.
11414 (grub_loopback_open): Likewise.
11415 (grub_loopback_read): Likewise. Also, change the type of POS to
11416 grub_off_t, and fix the usage of grub_memset.
11417
11418 * commands/i386/pc/play.c: Include grub/machine/time.h.
11419
11420 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11421 print FILE->SIZE.
11422
11423 * commands/configfile.c: Include grub/env.h.
11424
11425 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11426 GRUB_ERRNO directly instead. Change the type of POS to
11427 grub_off_t. Follow the coding standard.
11428
11429 * commands/blocklist.c: Include grub/partition.h.
11430 (grub_cmd_blocklist): Return an error if the underlying device is
11431 not a disk. Take the starting sector of a partition into account,
11432 if a partition is used.
11433
11434 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11435 a length field.
11436 (lba_mode): Support 64-bit addresses.
11437 (chs_mode): Likewise.
11438 (copy_buffer): Adapted to the new offsets of a length field and a
11439 segment field.
11440 (blocklist_default_start): Allocate 64-bit space.
11441
11442 * boot/i386/pc/boot.S (force_lba): Removed.
11443 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 11444 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 11445 space.
11446 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11447 is useless.
11448 (lba_mode): Refactored to support a 64-bit address. More size
11449 optimization.
11450 (setup_sectors): Likewise.
11451
53af98ad 114522006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11453
11454 * DISTLIST: Added include/grub/i386/linux.h. Removed
11455 include/grub/i386/pc/linux.h
11456
11457 * configure.ac (AC_INIT): Bumped to 1.94.
11458
11459 * config.guess: Updated from gnulib.
11460 * config.sub: Likewise.
11461 * install-sh: Likewise.
11462 * mkinstalldirs: Likewise.
11463
b4c1940a 114642006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11465
11466 * conf/common.rmk (grub_modules_init.lst): Depended on
11467 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11468 MODSRCFILES.
11469
11470 * genmk.rb (PModule::rule): Reverted the previous change.
11471
cfca1cfd 114722006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11473
11474 * conf/common.rmk (grub_modules_init.lst): Depends on
11475 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11476 that the target does not exist before producing.
11477 (grub_modules_init.h): Remove the target before generating.
11478 (grub_emu_init.c): Likewise.
11479
11480 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11481
aa6d7826 114822006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11483
11484 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11485 for the target-specific tests. Make sure that we also have the
11486 up-to-date target variables for those tests.
11487
26c607b9 114882006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11489
11490 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11491 (PModule::rule): Likewise.
11492
0162321a 114932006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11494
11495 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11496 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11497 target-specific flags should be prefixed.
11498 (PModule::rule): Likewise.
11499
6c826348 115002006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11501
11502 * configure.ac (CMP): Check if cmp is available explicitly.
11503
b977bf01 115042006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11505
11506 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11507 (target_cpu): New variable.
11508 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 11509
b977bf01 11510 * util/i386/pc/grub-install.in (host_cpu): Removed.
11511 (target_cpu): New variable.
11512 (pkglibdir): Use target_cpu instead of host_cpu.
11513
11514 * util/genmoddep.c: Removed.
f19dbdb7 11515
b977bf01 11516 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11517 instead of GRUB_HOST_SIZEOF_VOID_P.
11518 * kern/dl.c: Likewise.
11519
11520 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11521 ...
11522 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11523 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11524 (GRUB_TARGET_SIZEOF_LONG): ... this.
11525 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11526 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11527 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11528 to ...
11529 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11530 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11531 (GRUB_TARGET_SIZEOF_LONG): ... this.
11532 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11533 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11534 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11535 to ...
11536 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11537 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11538 (GRUB_TARGET_SIZEOF_LONG): ... this.
11539 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11540 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11541
11542 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11543 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11544 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11545 instead of GRUB_HOST_SIZEOF_LONG.
11546 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11547 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11548 GRUB_CPU_WORDS_BIGENDIAN.
11549 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11550 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11551 grub_host_ssize_t.
11552
11553 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11554 (genmoddep_SOURCES): Likewise.
11555 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11556 (genmoddep_SOURCES): Likewise.
11557 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11558 (genmoddep_SOURCES): Likewise.
11559 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11560 Likewise.
11561 (genmoddep_SOURCES): Likewise.
11562
11563 * genmoddep.awk: New file.
11564
11565 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11566 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11567 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11568 (PModule::rule): Likewise.
11569 (Program::rule): Likewise.
11570 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11571 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11572 respectively.
11573
11574 * configure.ac: Rewritten intensively to use host and target
11575 instead of build and host, respectively.
11576
11577 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11578 (host_cpu): Removed.
11579 (target_cpu): New variable.
11580 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11581 (BUILD_CC): Removed.
11582 (BUILD_CFLAGS): Likewise.
11583 (BUILD_CPPFLAGS): Likewise.
11584 (TARGET_CC): New variable.
11585 (TARGET_CFLAGS): Likewise.
11586 (TARGET_CPPFLAGS): Likewise.
11587 (TARGET_LDFLAGS): Likewise.
11588 (AWK): Likewise.
11589 (include): Use target_cpu instead of host_cpu.
11590 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 11591
b977bf01 11592 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11593
f09771a1 115942006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11595
11596 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11597 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11598 field 'false' to 'exec_on_false'.
11599 (grub_script_create_cmdif): Renamed argument names to reflect above
11600 changes.
11601
11602 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11603
11604 * normal/script.c (grub_script_create_cmdif): Likewise.
11605
118f4fb3 116062006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11607
11608 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11609 top.
11610 (grub_hfsplus_btree_recptr): Likewise.
11611 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11612 FILEBLOCK both to pass a block number and store next block
11613 number.
11614 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11615 overflow file correctly. Specify errors appropriately, because
11616 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11617 grub_hfsplus_btree_recptr to get the pointer to a found key.
11618 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11619 is found.
11620
11621 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11622 linux.mod.
11623 (_linux_mod_SOURCES): New variable.
11624 (_linux_mod_CFLAGS): Likewise.
11625 (_linux_mod_LDFLAGS): Likewise.
11626 (linux_mod_SOURCES): Likewise.
11627 (linux_mod_CFLAGS): Likewise.
11628 (linux_mod_LDFLAGS): Likewise.
11629
11630 * DISTLIST: Added loader/i386/efi/linux.c,
11631 loader/i386/efi/linux_normal.c and
11632 include/grub/i386/efi/loader.h.
11633
11634 * loader/i386/efi/linux.c: New file.
11635 * loader/i386/efi/linux_normal.c: Likewise.
11636 * include/grub/i386/efi/loader.h: Likewise.
11637
89a7d726 116382006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11639
11640 * commands/blocklist.c: New file.
11641
11642 * DISTLIST: Added commands/blocklist.c.
11643
11644 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 11645 color for the background, and a darker color for the foreground.
89a7d726 11646 (grub_console_checkkey): Return READ_KEY.
11647 (grub_console_cls): Set the background to
11648 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11649
11650 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11651
11652 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11653 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11654
11655 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11656 prototype.
11657
11658 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11659 BG. The spec is wrong again.
11660
11661 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11662 prototype.
11663 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11664
11665 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11666 commands/blocklist.c.
11667 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11668
89a7d726 11669 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11670 (blocklist_mod_SOURCES): New variable.
11671 (blocklist_mod_CFLAGS): Likewise.
11672 (blocklist_mod_LDFLAGS): Likewise.
11673
75c8f258 116742006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11675
11676 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11677 duplication.
11678 (lba_mode): Use %eax more intensively to reduce the code size.
11679
da2eb181 116802006-05-20 Marco Gerards <marco@gnu.org>
11681
11682 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11683
11684 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11685 for `menuentry'.
11686 (script): Accept leading newlines.
11687 (newlines): New rule to describe 0 or more newlines.
11688 (commands): Accept `command' with trailing newline. Fixed the
11689 order in which arguments were passed to `grub_script_add_cmd'.
11690 Accept commands separated by newlines.
11691 (function): Changed to accept newlines.
11692 (menuentry) Rewritten.
11693
11694 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11695 front of the list, instead of to the end.
11696
577b4050 116972006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11698
11699 * util/i386/pc/grub-install.in (bindir): New variable.
11700 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11701 Shaver <lbgwjl@gmail.com>.
11702
0d6e1189 117032006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11704
11705 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11706 grub/machine/linux.h
11707 * loader/i386/pc/linux.c: Likewise.
11708
11709 * include/grub/i386/pc/linux.h: Moved to ...
11710 * include/grub/i386/linux.h: ... here.
11711
11712 * include/grub/i386/linux.h (struct linux_kernel_params): New
11713 struct.
f19dbdb7 11714
31b86e9f 117152006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11716
11717 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11718 checking.
11719 (grub_video_vbe_blit_glyph): Likewise.
11720 (grub_video_vbe_blit_bitmap): Likewise.
11721 (grub_video_vbe_blit_render_target): Likewise.
11722
83b984de 117232006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11724
11725 * configure.ac (--with-platform): Properly quote the square
11726 brackets.
11727
5f0413bd 117282006-05-08 Marco Gerards <marco@gnu.org>
11729
11730 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11731 this...
11732 (kernel_elf_HEADERS): ...to this. Updated all users.
11733 (grubof_symlist.c): Renamed from this...
11734 (kernel_elf_symlist.c): ...to this. Updated all users.
11735 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11736 (grubof_SOURCES): Renamed from this...
11737 (kernel_elf_SOURCES): ...to this.
11738 (grubof_HEADERS): Renamed from this...
11739 (kernel_elf_HEADERS): ...to this.
11740 (grubof_CFLAGS): Renamed from this...
11741 (kernel_elf_CFLAGS): ...to this.
11742 (grubof_ASFLAGS): Renamed from this...
11743 (kernel_elf_ASFLAGS): ...to this.
11744 (grubof_LDFLAGS): Renamed from this...
11745 (kernel_elf_LDFLAGS): ...to this.
11746
11747 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11748 this...
11749 (kernel_elf_HEADERS): ...to this. Updated all users.
11750 (grubof_symlist.c): Renamed from this...
11751 (kernel_elf_symlist.c): ...to this. Updated all users.
11752 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11753 (grubof_SOURCES): Renamed from this...
11754 (kernel_elf_SOURCES): ...to this.
11755 (grubof_HEADERS): Renamed from this...
11756 (kernel_elf_HEADERS): ...to this.
11757 (grubof_CFLAGS): Renamed from this...
11758 (kernel_elf_CFLAGS): ...to this.
11759 (grubof_ASFLAGS): Renamed from this...
11760 (kernel_elf_ASFLAGS): ...to this.
11761 (grubof_LDFLAGS): Renamed from this...
11762 (kernel_elf_LDFLAGS): ...to this.
11763
11764 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11765 `kernel.elf' instead of `grubof'.
11766
05568c2e 117672006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11768
11769 Add --with-platform to configure. Use pkglibdir instead of
11770 pkgdatadir. This is reported by Roger Leigh.
11771
11772 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11773 (host_vendor): Likewise.
11774 (host_os): Likewise.
11775 (pkgdatadir): Likewise.
11776 (platform): New variable.
11777 (pkglibdir): Likewise.
11778 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 11779
05568c2e 11780 * util/i386/pc/grub-install.in (datadir): Removed.
11781 (host_vendor): Likewise.
11782 (host_os): Likewise.
11783 (pkgdatadir): Likewise.
11784 (platform): New variable.
11785 (pkglibdir): Likewise.
11786 Use PKGLIBDIR instead of PKGDATADIR.
11787
11788 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11789 instead of GRUB_DATADIR.
11790 (main): Likewise.
11791 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11792 (main): Likewise.
11793 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11794 (main): Likewise.
11795
11796 * configure.ac (--with-platform): New option.
11797 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11798
11799 * Makefile.in: Include a makefile based on PLATFORM instead of
11800 HOST_VENDOR.
11801 (pkgdatadir): Not appended by the machine type.
11802 (pkglibdir): Appended by the machine type.
11803 (host_vendor): Removed.
11804 (platform): New variable.
11805 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11806 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11807 (uninstall): Likewise.
11808
4e93851c 118092006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11810
11811 Use the environment context in the menu. Remove the commands
11812 "default" and "timeout", and use variables instead.
f19dbdb7 11813
4e93851c 11814 * normal/menu.c: Include grub/env.h.
11815 (print_entry): Cast TITLE to silence gcc.
11816 (get_timeout): New function.
11817 (set_timeout): Likewise.
11818 (get_entry_number): Likewise.
11819 (run_menu): Use a default entry, a fallback entry and a timeout
11820 in the environment variables "default", "fallback" and
11821 "timeout". Also, tweak the default entry if it is not within the
11822 current menu entries.
11823 (grub_menu_run): Use a fallback entry in the environment variable
11824 "fallback".
11825
11826 * normal/main.c (read_config_file): Do not initialize
11827 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11828 NEWMENU->TIMEOUT.
11829 (grub_normal_execute): Use a data slot to store the menu.
11830
11831 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11832 fallback_entry and timeout.
11833 (struct grub_menu_list): Removed.
11834 (grub_menu_list_t): Likewise.
11835 (struct grub_context): Likewise.
11836 (grub_context_t): Likewise.
11837 (grub_context_get): Likewise.
11838 (grub_context_get_current_menu): Likewise.
11839 (grub_context_push_menu): Likewise.
11840 (grub_context_pop_menu): Likewise.
11841 (grub_default_init): Likewise.
11842 (grub_default_fini): Likewise.
11843 (grub_timeout_init): Likewise.
11844 (grub_timeout_fini): Likewise.
11845
11846 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11847 and timeout.mod.
11848 (normal_mod_SOURCES): Removed normal/context.c.
11849
11850 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11851 commands/default.c, commands/timeout.c and normal/context.c.
11852 (normal_mod_SOURCES): Removed normal/context.c.
11853
11854 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11855 commands/timeout.c and normal/context.c.
11856 (normal_mod_SOURCES): Removed normal/context.c.
11857
11858 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11859 commands/default.c, commands/timeout.c and normal/context.c.
11860 (normal_mod_SOURCES): Removed normal/context.c.
11861
11862 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11863 timeout.mod.
11864 (default_mod_SOURCES): Removed.
11865 (default_mod_CFLAGS): Likewise.
11866 (default_mod_LDFLAGS): Likewise.
11867 (timeout_mod_SOURCES): Removed.
11868 (timeout_mod_CFLAGS): Likewise.
11869 (timeout_mod_LDFLAGS): Likewise.
11870
11871 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11872 normal/context.c.
11873
11874 * commands/default.c: Removed.
11875 * commands/timeout.c: Likewise.
11876 * normal/context.c: Likewise.
11877
1eb9cc1d 118782006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11879
11880 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11881
385bd9c1 118822006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11883
11884 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11885 "next" to "prev" for readability.
11886 (struct grub_env_sorted_var): New struct.
11887 (grub_env_context): Renamed to ...
11888 (initial_context): ... this.
11889 (grub_env_var_context): Renamed to ...
11890 (current_context): ... this.
11891 (grub_env_find): Look only at CURRENT_CONTEXT.
11892 (grub_env_context_open): Rewritten to copy exported variables from
11893 previous context.
11894 (grub_env_context_close): Rewritten according to the new
11895 scheme. Also, add an assertion to prevent the initial context from
11896 removed.
11897 (grub_env_insert): Removed the code for the sorted list.
11898 (grub_env_remove): Likewise.
11899 (grub_env_export): Simply mark the variable with
11900 GRUB_ENV_VAR_GLOBAL.
11901 (grub_env_set): A cosmetic change for naming consistency.
11902 (grub_env_get): Likewise.
11903 (grub_env_unset): Likewise.
11904 (grub_env_iterate): Rewritten to sort variables within this
11905 function.
11906 (grub_register_variable_hook): Fixed for naming consistency. Call
11907 grub_env_find again, only if NAME is not found at the first time.
11908 (mangle_data_slot_name): New function.
11909 (grub_env_set_data_slot): Likewise.
11910 (grub_env_get_data_slot): Likewise.
11911 (grub_env_unset_data_slot): Likewise.
11912
11913 * include/grub/env.h (grub_env_var_type): New enum.
11914 (GRUB_ENV_VAR_LOCAL): New constant.
11915 (GRUB_ENV_VAR_GLOBAL): Likewise.
11916 (GRUB_ENV_VAR_DATA): Likewise.
11917 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11918 "type".
11919 (grub_env_set): Replace VAR with NAME for consistency.
11920 (grub_register_variable_hook): Likewise.
11921 (grub_env_export): Specify the name of the argument.
11922 (grub_env_set_data_slot): New prototype.
11923 (grub_env_get_data_slot): Likewise.
11924 (grub_env_unset_data_slot): Likewise.
11925
7f362539 119262006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11927
11928 Extend the loader so that GRUB can accept a loader which comes
11929 back to GRUB when a loaded image exits. Also, this change adds
11930 support for a chainloader on EFI.
f19dbdb7 11931
7f362539 11932 * term/efi/console.c: Include grub/misc.h.
11933 (grub_console_checkkey): Display a scan code on the top for
11934 debugging. This will be removed once the EFI port gets stable.
11935 Correct the scan code mapping.
11936
11937 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11938 allocate memory from larger regions, in order to reduce the number
11939 of allocated regions. Otherwise, the MacOSX loader panics.
11940 (filter_memory_map): Avoid less than 1MB for compatibility with
11941 other loaders.
11942 (add_memory_regions): Allocate from the tail of a region, if
11943 possible, to avoid allocating a region near to 1MB, for the MacOSX
11944 loader.
11945
11946 * kern/efi/init.c (grub_efi_set_prefix): Specify
11947 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11948
11949 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11950 argument IMAGE_HANDLE and specify it to get a loaded image.
11951 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11952 grub_efi_get_loaded_image.
fe6b695a 11953 (grub_efi_get_filename): Divide the length by the size of
7f362539 11954 grub_efi_char16_t.
11955 (grub_efi_get_device_path): New function.
11956 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11957 the length by the size of grub_efi_char16_t for a file path device
11958 path node.
11959
11960 * kern/loader.c (grub_loader_noreturn): New variable.
11961 (grub_loader_set): Accept a new argument NORETURN. Set
11962 GRUB_LOADER_NORETURN to NORETURN.
11963 All callers changed.
11964 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11965 grub_machine_fini.
11966
11967 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11968 prototype.
11969 (grub_efi_get_loaded_image): Take an argument to specify an image
11970 handle.
11971
11972 * include/grub/loader.h (grub_loader_set): Added one more argument
11973 NORETURN.
11974
11975 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11976 instead of grub_efi_open_protocol.
11977 (grub_efidisk_get_device_name): Likewise.
11978 (grub_efidisk_close): Print a newline.
11979 (grub_efidisk_get_device_handle): Fixed to use
11980 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11981 GRUB_EFI_DEVICE_PATH_TYPE.
11982
11983 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11984 * kern/efi/efi.c (device_path_guid): ... here.
11985
11986 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11987 chain.mod.
11988 (kernel_mod_HEADERS): Added efi/disk.h.
11989 (_chain_mod_SOURCES): New variable.
11990 (_chain_mod_CFLAGS): Likewise.
11991 (_chain_mod_LDFLAGS): Likewise.
11992 (chain_mod_SOURCES): Likewise.
11993 (chain_mod_CFLAGS): Likewise.
11994 (chain_mod_LDFLAGS): Likewise.
11995
11996 * DISTLIST: Added include/grub/efi/chainloader.h,
11997 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11998
11999 * include/grub/efi/chainloader.h: New file.
12000 * loader/efi/chainloader.c: Likewise.
12001 * loader/efi/chainloader_normal.c: Likewise.
12002
c0111d6e 120032006-04-30 Marco Gerards <marco@gnu.org>
12004
12005 * commands/configfile.c (grub_cmd_source): New function.
12006 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12007 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12008
df5341da 120092006-04-30 Marco Gerards <marco@gnu.org>
12010
12011 * normal/execute.c (grub_script_execute_cmd): Change the return
12012 type to `grub_err_t'. Correctly return the error.
12013 (grub_script_execute_cmdline): In case a command line is not a
12014 command or a function, try to interpret it as an assignment.
12015
f85934bd 120162006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12017
12018 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12019 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12020 skip a node whose name is obviously invalid as UTF-16,
12021 i.e. contains a NUL character. Stop the iteration when the last
12022 directory entry is found. Instead of using the return value of
12023 grub_hfsplus_btree_iterate_node, store the value in RET and use
12024 it, because the iterator can be stopped by the last directory
12025 entry.
12026
8f8a2cf8 120272006-04-30 Marco Gerards <marco@gnu.org>
12028
12029 * include/grub/env.h (grub_env_export): New prototype. Reported
12030 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12031
a27e84ce 120322006-04-30 Marco Gerards <marco@gnu.org>
12033
12034 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12035 size of the extents in a catalog file record.
12036
eaef0553 120372006-04-29 Marco Gerards <marco@gnu.org>
12038
12039 * commands/configfile.c (grub_cmd_configfile): Execute the
12040 configfile within its own context.
12041
12042 * include/grub/env.h (grub_env_context_open): New prototype.
12043 (grub_env_context_close): Likewise.
12044
12045 * kern/env.c (grub_env): Removed.
12046 (grub_env_sorted): Likewise.
12047 (grub_env_context): New variable.
12048 (grub_env_var_context): Likewise.
12049 (grub_env_find): Search both the active context and the global
12050 context.
12051 (grub_env_context_open): New function.
12052 (grub_env_context_close): Likewise.
12053 (grub_env_insert): Likewise.
12054 (grub_env_remove): Likewise.
12055 (grub_env_export): Likewise.
12056 (grub_env_set): Changed to use helper functions to avoid code
12057 duplication.
12058 (grub_env_iterate): Rewritten so both the current context and the
12059 global context are being used.
12060
12061 * normal/command.c (export_command): New function.
12062 (grub_command_init): Register the `export' function.
12063
7b455f4d 120642006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12065
12066 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12067 explicitly to suppress gcc's warnings.
12068 * fs/fat.c (grub_fat_find_dir): Likewise.
12069 (grub_fat_label): Likewise.
12070 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12071 (grub_xfs_mount): Likewise.
12072 (grub_xfs_label): Likewise.
12073 * fs/affs.c (grub_affs_mount): Likewise.
12074 (grub_affs_label): Likewise.
12075 (grub_affs_iterate_dir): Likewise.
12076 * fs/sfs.c (grub_sfs_mount): Likewise.
12077 (grub_sfs_iterate_dir): Likewise.
12078 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12079 * fs/hfs.c (grub_hfs_mount): Likewise.
12080 (grub_hfs_cmp_catkeys): Likewise.
12081 (grub_hfs_find_dir): Likewise.
12082 (grub_hfs_dir): Likewise.
12083 (grub_hfs_label): Likewise.
12084 * fs/jfs.c (grub_jfs_mount): Likewise.
12085 (grub_jfs_opendir): Likewise.
12086 (grub_jfs_getent): Likewise.
12087 (grub_jfs_lookup_symlink): Likewise.
12088 (grub_jfs_label): Likewise.
12089 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12090 (grub_hfsplus_iterate_dir): Likewise.
12091 (grub_hfsplus_btree_iterate_node): Made static.
12092
12093 * util/grub-emu.c (prefix): New variable.
12094 (grub_machine_set_prefix): New function.
12095 (main): Do not set the environment variable "prefix" here. Only
12096 set PREFIX, which is used later by grub_machine_set_prefix.
12097
12098 * include/grub/video.h: Do not include grub/symbol.h.
12099 (grub_video_register): Not exported. This symbol is not defined in
12100 the kernel.
12101 (grub_video_unregister): Likewise.
12102 (grub_video_iterate): Likewise.
12103 (grub_video_setup): Likewise.
12104 (grub_video_restore): Likewise.
12105 (grub_video_get_info): Likewise.
12106 (grub_video_get_blit_format): Likewise.
12107 (grub_video_set_palette): Likewise.
12108 (grub_video_get_palette): Likewise.
12109 (grub_video_set_viewport): Likewise.
12110 (grub_video_get_viewport): Likewise.
12111 (grub_video_map_color): Likewise.
12112 (grub_video_map_rgb): Likewise.
12113 (grub_video_map_rgba): Likewise.
12114 (grub_video_fill_rect): Likewise.
12115 (grub_video_blit_glyph): Likewise.
12116 (grub_video_blit_bitmap): Likewise.
12117 (grub_video_blit_render_target): Likewise.
12118 (grub_video_scroll): Likewise.
12119 (grub_video_swap_buffers): Likewise.
12120 (grub_video_create_render_target): Likewise.
12121 (grub_video_delete_render_target): Likewise.
12122 (grub_video_set_active_render_target): Likewise.
12123
12124 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12125 Undefined.
12126 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12127
12128 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12129 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12130 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12131 instead of $(srcdir)/genkernsyms.sh.
12132
12133 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12134 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12135 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12136 instead of $(srcdir)/genkernsyms.sh.
12137
12138 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12139 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12140 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12141 instead of $(srcdir)/genkernsyms.sh.
12142
12143 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12144 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12145 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12146 instead of $(srcdir)/genkernsyms.sh.
12147
12148 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12149 genkernsyms.sh.
12150
12151 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12152 genkernsyms.sh.
12153 (gensymlist.sh): New target.
12154 (genkernsyms.sh): Likewise.
12155
12156 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12157 genkernsyms.sh.in and gensymlist.sh.in.
12158
12159 * genkernsyms.sh: Removed.
12160 * gensymlist.sh: Likewise.
f19dbdb7 12161
7b455f4d 12162 * genkernsyms.sh.in: New file.
12163 * gensymlist.sh.in: Likewise.
12164
1885bb27 121652006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12166
12167 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12168 clobber "prefix", since we may have already set it manually.
12169
71538dff 121702006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12171
12172 * kern/misc.c (abort): New alias for grub_abort.
12173
2965c7cc 121742006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12175
12176 A new machine-specific function "grub_machine_set_prefix" is
12177 defined. This is called after loading modules, so that a prefix
12178 initialization can use modules. Also, this change adds an
12179 intensive debugging feature for the memory manager via the
12180 configure option "--enable-mm-debug".
f19dbdb7 12181
2965c7cc 12182 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12183 PART.LEN.
12184
12185 * kern/sparc64/ieee1275/init.c (abort): Removed.
12186 (grub_stop): Likewise.
12187 (grub_exit): New function.
12188 (grub_set_prefix): Renamed to ...
12189 (grub_machine_set_prefix): ... this.
12190 (grub_machine_init): Do not call grub_set_prefix.
12191
12192 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12193 (grub_machine_set_prefix): ... this.
12194 (grub_machine_init): Do not call grub_set_prefix.
12195
12196 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12197 (grub_machine_init): Do not set the prefix here.
12198
12199 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12200
12201 * kern/efi/init.c: Include grub/mm.h.
12202 (grub_efi_set_prefix): New function.
12203
12204 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12205 (grub_efi_get_filename): New function.
12206 (grub_print_device_path): Renamed to ...
12207 (grub_efi_print_device_path): ... this.
12208
12209 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12210 [MM_DEBUG] (grub_realloc): Likewise.
12211 [MM_DEBUG] (grub_free): Likewise.
12212 [MM_DEBUG] (grub_memalign): Likewise.
12213 [MM_DEBUG] (grub_mm_debug): New variable.
12214 [MM_DEBUG] (grub_debug_malloc): New function.
12215 [MM_DEBUG] (grub_debug_free): New function.
12216 [MM_DEBUG] (grub_debug_realloc): New function.
12217 [MM_DEBUG] (grub_debug_memalign): New function.
12218
12219 * kern/misc.c (grub_abort): Print a newline to distinguish
12220 the message.
12221
12222 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12223 grub_set_root_dev after loading modules. This is necessary when
12224 setting a prefix depends on modules.
12225
12226 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12227 (grub_efi_print_device_path): ... this.
12228 (grub_efi_get_filename): New prototype.
12229 (grub_efi_set_prefix): Likewise.
12230
12231 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12232 and grub/disk.h.
12233 (grub_efidisk_get_device_handle): New prototype.
12234 (grub_efidisk_get_device_name): Likewise.
12235
12236 * include/grub/mm.h: Include config.h.
12237 (MM_DEBUG): Removed.
12238 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12239 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12240 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12241 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12242 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12243 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12244 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12245 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12246 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12247
12248 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12249
12250 * disk/efi/efidisk.c: Include grub/partition.h.
12251 (iterate_child_devices): New function.
12252 (add_device): First, compare only last device path nodes, so that
12253 devices are sorted by the types.
12254 (grub_efidisk_get_device_handle): New function.
12255 (grub_efidisk_get_device_name): Likewise.
12256
12257 * configure.ac (--enable-mm-debug): New option to enable the
12258 memory manager debugging feature. This makes the binary much
12259 bigger, so is disabled by default.
12260
9cacaa17 122612006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12262
12263 Use grub_abort instead of grub_stop, and grub_exit must be
12264 define in each architecture now. Also, this change adds support
12265 for EFI disks.
f19dbdb7 12266
9cacaa17 12267 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12268 (grub_getkey): New function.
12269 (grub_term_get_current): Likewise.
12270
12271 * util/i386/pc/grub-setup.c: Include grub/term.h.
12272 (grub_getkey): New function.
12273 (grub_term_get_current): Likewise.
12274
12275 * util/misc.c (grub_stop): Renamed to ...
12276 (grub_exit): ... this.
12277
12278 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12279 (grub_exit): ... this.
12280 (grub_machine_init): Use grub_abort instead of abort.
12281 (grub_stop): Removed.
12282
12283 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12284 abort.
12285
12286 * kern/i386/pc/startup.S (grub_exit): New function.
12287 (cold_reboot): New label.
12288
12289 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12290 (grub_efi_init): Call grub_efidisk_init.
12291 (grub_efi_fini): Call grub_efidisk_fini.
12292
12293 * kern/efi/efi.c: Include grub/mm.h.
12294 (grub_efi_console_control_guid): Renamed to ...
12295 (console_control_guid): ... this.
12296 (grub_efi_loaded_image_guid): Renamed to ...
12297 (loaded_image_guid): ... this.
12298 (grub_efi_locate_handle): New function.
12299 (grub_efi_open_protocol): Likewise.
12300 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12301 GRUB_EFI_CONSOLE_CONTROL_GUID.
12302 (grub_efi_exit): Removed.
12303 (grub_stop): Likewise.
12304 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12305 (grub_exit): New function.
12306 (grub_print_device_path): Likewise.
12307
12308 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12309 (grub_enter_rescue_mode): Register "exit".
12310
12311 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12312 (grub_abort): New function.
12313
12314 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12315
12316 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12317
12318 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12319
12320 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12321 (grub_print_device_path): New prototype.
12322 (grub_efi_locate_handle): Likewise.
12323 (grub_efi_open_protocol): Likewise.
12324
12325 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12326 * disk/efi/efidisk.c: Likewise.
12327
12328 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12329
12330 * include/grub/efi/console_control.h
12331 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12332
12333 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12334 last 8 bytes as an array.
12335 (GRUB_EFI_DISK_IO_GUID): New macro.
12336 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12337 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12338 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12339 grub_uint8_t.
12340 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12341 (struct grub_efi_device_path): Rename the member "sub_type" to
12342 "subtype".
12343 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12344 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12345 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12346 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12347 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12348 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12349 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12350 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12351 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12352 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12353 (struct grub_efi_pci_device_path): New structure.
12354 (grub_efi_pci_device_path_t): New type.
12355 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12356 (struct grub_efi_pccard_device_path): New structure.
12357 (grub_efi_pccard_device_path_t): New type.
12358 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12359 (struct grub_efi_memory_mapped_device_path): New structure.
12360 (grub_efi_memory_mapped_device_path_t): New type.
12361 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12362 (struct grub_efi_vendor_device_path): New structure.
12363 (grub_efi_vendor_device_path_t): New type.
12364 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12365 (struct grub_efi_controller_device_path): New structure.
12366 (grub_efi_controller_device_path_t): New type.
12367 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12368 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12369 (struct grub_efi_acpi_device_path): New structure.
12370 (grub_efi_acpi_device_path_t): New type.
12371 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12372 (struct grub_efi_expanded_acpi_device_path): New structure.
12373 (grub_efi_expanded_acpi_device_path_t): New type.
12374 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12375 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12376 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12377 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12378 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12379 (struct grub_efi_atapi_device_path): New structure.
12380 (grub_efi_atapi_device_path_t): New type.
12381 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12382 (struct grub_efi_fibre_channel_device_path): New structure.
12383 (grub_efi_fibre_channel_device_path_t): New type.
12384 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12385 (struct grub_efi_1394_device_path): New structure.
12386 (grub_efi_1394_device_path_t): New type.
12387 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12388 (struct grub_efi_usb_device_path): New structure.
12389 (grub_efi_usb_device_path_t): New type.
12390 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12391 (struct grub_efi_usb_class_device_path): New structure.
12392 (grub_efi_usb_class_device_path_t): New type.
12393 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12394 (struct grub_efi_i2o_device_path): New structure.
12395 (grub_efi_i2o_device_path_t): New type.
12396 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12397 (struct grub_efi_mac_address_device_path): New structure.
12398 (grub_efi_mac_address_device_path_t): New type.
12399 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12400 (struct grub_efi_ipv4_device_path): New structure.
12401 (grub_efi_ipv4_device_path_t): New type.
12402 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12403 (struct grub_efi_ipv6_device_path): New structure.
12404 (grub_efi_ipv6_device_path_t): New type.
12405 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12406 (struct grub_efi_infiniband_device_path): New structure.
12407 (grub_efi_infiniband_device_path_t): New type.
12408 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12409 (struct grub_efi_uart_device_path): New structure.
12410 (grub_efi_uart_device_path_t): New type.
12411 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12412 (struct grub_efi_vendor_messaging_device_path): New structure.
12413 (grub_efi_vendor_messaging_device_path_t): New type.
12414 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12415 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12416 (struct grub_efi_hard_drive_device_path): New structure.
12417 (grub_efi_hard_drive_device_path_t): New type.
12418 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12419 (struct grub_efi_cdrom_device_path): New structure.
12420 (grub_efi_cdrom_device_path_t): New type.
12421 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12422 (struct grub_efi_vendor_media_device_path): New structure.
12423 (grub_efi_vendor_media_device_path_t): New type.
12424 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12425 (struct grub_efi_file_path_device_path): New structure.
12426 (grub_efi_file_path_device_path_t): New type.
12427 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12428 (struct grub_efi_protocol_device_path): New structure.
12429 (grub_efi_protocol_device_path_t): New type.
12430 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12431 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12432 (struct grub_efi_bios_device_path): New structure.
12433 (grub_efi_bios_device_path_t): New type.
12434 (struct grub_efi_disk_io): New structure.
12435 (grub_efi_disk_io_t): New type.
12436 (struct grub_efi_block_io_media): New structure.
12437 (grub_efi_block_io_media_t): New type.
12438 (struct grub_efi_block_io): New structure.
12439 (grub_efi_block_io_t): New type.
12440
12441 * include/grub/misc.h (grub_stop): Removed.
12442 (grub_exit): New prototype.
12443 (grub_abort): Likewise.
12444
12445 * include/grub/disk.h (enum grub_disk_dev_id): Added
12446 GRUB_DISK_DEVICE_EFIDISK_ID.
12447
12448 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12449 disk/efi/efidisk.c.
12450 (kernel_syms.lst): Remove the target if an error occurs.
12451
49986a9f 124522006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12453
12454 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12455 as it was simply too buggy.
12456
970d3b8a 124572006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12458
12459 * kern/misc.c (grub_lltoa): New function.
12460 (grub_vsprintf): Added support for the long long suffix,
12461 i.e. "ll".
12462
ff04ec24 124632006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12464
12465 * Makefile.in (LDFLAGS): Add variable.
12466 (LD): Remove variable.
12467 * configure.ac: Add -m32 to LDFLAGS.
12468 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12469 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12470 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12471 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12472 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12473 variables.
12474 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12475 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12476 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12477
37e5e1a4 124782006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12479
12480 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12481 length for unknown glyph.
12482
c352d8dd 124832006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12484
2eab1c0d 12485 Add support for pre-loaded modules into the EFI port.
f19dbdb7 12486
2eab1c0d 12487 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12488 completely. Accept one more argument DIR. The caller has changed.
12489
12490 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12491
12492 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12493 (grub_efi_loaded_image_guid): New variable.
12494 (grub_efi_get_loaded_image): New function.
12495 (grub_arch_modules_addr): Likewise.
12496
12497 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12498 prototype.
12499
12500 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12501 (struct grub_efi_loaded_image): New structure.
12502 (grub_efi_loaded_image_t): New type.
12503
125042006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12505
c352d8dd 12506 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12507 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12508 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12509
6d01d6b4 125102006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12511
12512 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12513
976a4ea0 125142006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12515
12516 * DISTLIST: Added include/grub/efi/console.h,
12517 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12518 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12519
12520 * include/grub/efi/console.h: New file.
12521 * include/grub/efi/time.h: Likewise.
12522 * include/grub/i386/efi/kernel.h: Likewise.
12523 * kern/efi/init.c: Likewise.
12524 * kern/efi/mm.c: Likewise.
12525 * term/efi/console.c: Likewise.
f19dbdb7 12526
976a4ea0 12527 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12528 (grub_stop): Removed.
12529 (grub_get_rtc): Likewise.
12530 (grub_machine_init): Simply call grub_efi_init.
12531 (grub_machine_fini): Call grub_efi_fini.
12532
12533 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12534 (grub_efi_output_string): Removed.
12535 (grub_efi_stall): New function.
12536 (grub_stop): Likewise.
12537 (grub_get_rtc): Likewise.
12538
12539 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12540 (grub_efi_stall): New prototype.
12541 (grub_efi_allocate_pages): Likewise.
12542 (grub_efi_free_pages): Likewise.
12543 (grub_efi_get_memory_map): Likewise.
12544 (grub_efi_mm_init): Likewise.
12545 (grub_efi_mm_fini): Likewise.
12546 (grub_efi_init): Likewise.
12547 (grub_efi_fini): Likewise.
12548
12549 * include/grub/i386/efi/time.h: Do not include
12550 grub/symbol.h. Include grub/efi/time.h.
12551 (GRUB_TICKS_PER_SECOND): Removed.
12552 (grub_get_rtc): Likewise.
12553
12554 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12555 Added padding. The EFI spec is buggy.
12556 (GRUB_EFI_BLACK): New macro.
12557 (GRUB_EFI_BLUE): Likewise.
12558 (GRUB_EFI_GREEN): Likewise.
12559 (GRUB_EFI_CYAN): Likewise.
12560 (GRUB_EFI_RED): Likewise.
12561 (GRUB_EFI_MAGENTA): Likewise.
12562 (GRUB_EFI_BROWN): Likewise.
12563 (GRUB_EFI_LIGHTGRAY): Likewise.
12564 (GRUB_EFI_BRIGHT): Likewise.
12565 (GRUB_EFI_DARKGRAY): Likewise.
12566 (GRUB_EFI_LIGHTBLUE): Likewise.
12567 (GRUB_EFI_LIGHTGREEN): Likewise.
12568 (GRUB_EFI_LIGHTCYAN): Likewise.
12569 (GRUB_EFI_LIGHTRED): Likewise.
12570 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12571 (GRUB_EFI_YELLOW): Likewise.
12572 (GRUB_EFI_WHITE): Likewise.
12573 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12574 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12575 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12576 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12577 (GRUB_EFI_BACKGROUND_RED): Likewise.
12578 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12579 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12580 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12581 (GRUB_EFI_TEXT_ATTR): Likewise.
12582
12583 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12584 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12585 (kernel_mod_HEADERS): Added efi/time.h.
12586
83709125 125872006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12588
12589 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12590 include/grub/efi/api.h, include/grub/efi/console_control.h,
12591 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12592 include/grub/i386/efi/time.h, kern/efi/efi.c,
12593 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12594 and util/i386/efi/grub-mkimage.c.
12595
12596 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12597
12598 * genmk.rb (PModule#rule): Do not export symbols if
12599 #{prefix}_EXPORTS is set to "no".
12600
12601 * conf/i386-efi.mk: New file.
12602 * conf/i386-efi.rmk: Likewise.
12603 * include/grub/efi/api.h: Likewise.
12604 * include/grub/efi/console_control.h: Likewise.
12605 * include/grub/efi/efi.h: Likewise.
12606 * include/grub/efi/pe32.h: Likewise.
12607 * include/grub/i386/efi/time.h: Likewise.
12608 * kern/efi/efi.c: Likewise.
12609 * kern/i386/efi/init.c: Likewise.
12610 * kern/i386/efi/startup.S: Likewise.
12611 * util/i386/efi/grub-mkimage.c: Likewise.
12612
126132006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 12614
12615 * include/grub/script.h: Include <grub/parser.h> and
12616 "grub_script.tab.h".
12617 (struct grub_lexer_param): New struct.
12618 (struct grub_parser_param): Likewise.
12619 (grub_script_create_arglist): Pass the state in an argument.
12620 (grub_script_add_arglist): Likewise.
12621 (grub_script_create_cmdline): Likewise.
12622 (grub_script_create_cmdblock): Likewise.
12623 (grub_script_create_cmdif): Likewise.
12624 (grub_script_create_cmdmenu): Likewise.
12625 (grub_script_add_cmd): Likewise.
12626 (grub_script_arg_add): Likewise.
12627 (grub_script_lexer_ref): Likewise.
12628 (grub_script_lexer_deref): Likewise.
12629 (grub_script_lexer_record_start): Likewise.
12630 (grub_script_lexer_record_stop): Likewise.
12631 (grub_script_mem_record): Likewise.
12632 (grub_script_mem_record_stop): Likewise.
12633 (grub_script_malloc): Likewise.
12634 (grub_script_yylex): Likewise.
12635 (grub_script_yyparse): Likewise.
12636 (grub_script_yyerror): Likewise.
12637 (grub_script_yylex): Likewise.
12638 (grub_script_lexer_init): Return the state.
12639
12640 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12641 (grub_script_lexer_done): Likewise.
12642 (grub_script_lexer_getline): Likewise.
12643 (grub_script_lexer_refs): Likewise.
12644 (script): Likewise.
12645 (newscript): Likewise.
12646 (record): Likewise.
12647 (recording): Likewise.
12648 (recordpos): Likewise.
12649 (recordlen): Likewise.
12650 (grub_script_lexer_init): Return the state instead of setting
12651 global variables.
12652 (grub_script_lexer_ref): Use the newly added argument for state
12653 instead of globals.
12654 (grub_script_lexer_deref): Likewise.
12655 (grub_script_lexer_record_start): Likewise.
12656 (grub_script_lexer_record_stop): Likewise.
12657 (recordchar): Likewise.
12658 (nextchar): Likewise.
12659 (grub_script_yylex2): Likewise.
12660 (grub_script_yylex): Likewise.
12661 (grub_script_yyerror): Likewise.
12662
12663 * normal/parser.y (func_mem): Removed variable.
12664 (menu_entry): Likewise.
12665 (err): Likewise.
12666 (%lex-param): New parser option.
12667 (%parse-param): Likewise.
12668 (script): Always return the AST.
12669 (argument): Pass the state around.
12670 (arguments): Likewise.
12671 (grubcmd): Likewise.
12672 (commands): Likewise.
12673 (function): Likewise.
12674 (menuentry): Likewise.
12675 (if_statement): Likewise.
12676 (if): Likewise.
12677
12678 * normal/script.c (grub_script_memused): Removed variable.
12679 (grub_script_parsed): Likewise.
12680 (grub_script_malloc): Added a state argument. Use that instead of
12681 global variables.
12682 (grub_script_mem_record): Likewise.
12683 (grub_script_mem_record_stop): Likewise.
12684 (grub_script_arg_add): Likewise.
12685 (grub_script_add_arglist): Likewise.
12686 (grub_script_create_cmdline): Likewise.
12687 (grub_script_create_cmdif): Likewise.
12688 (grub_script_create_cmdmenu): Likewise.
12689 (grub_script_add_cmd): Likewise.
12690 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12691
e2a8c904 126922006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12693
12694 * normal/command.c (grub_command_init): Remove the title command.
12695
12696 * normal/lexer.c (grub_script_yylex): Renamed from this...
12697 (grub_script_yylex2): ... to this.
12698 (grub_script_yylex): New function. Temporary
12699 introduced to filter some tokens.
12700 (grub_script_yyerror): Print a newline.
12701
12702 * normal/main.c (read_config_file): Output information about the
12703 lines that contain errors. Wait for a key after all lines have
12704 been processed. Don't return an empty menu.
12705
12706 * normal/parser.y (func_mem): Don't initialize.
12707 (menu_entry): Likewise.
12708 (err): New variable.
12709 (script): Don't return anything when an error was encountered.
12710 (ws, returns): Removed rules.
12711 (argument): Disabled concatenated variable support.
12712 (arguments): Remove explicit separators.
12713 (grubcmd): Likewise.
12714 (function): Likewise.
12715 (menuentry): Likewise.
12716 (if): Likewise.
12717 (commands): Likewise. Add error handling.
12718
12719 * normal/script.c (grub_script_create_cmdline): If
12720 `grub_script_parsed' is 0, assume the parser encountered an error.
12721
c9a86192 127222006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12723
12724 * configure.ac: Add support for EFI. Fix the typo
12725 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12726
70f3b243 127272006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12728
12729 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12730 foreign multibyte characters should be shown correctly.
12731
65f201ad 127322006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12733
12734 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12735 calculation.
12736 (read_config_file): Made it to close file before returning.
12737
b4b93674 127382006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12739
12740 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12741 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12742 video/i386/pc/vbefill.c.
12743
12744 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12745 video/i386/pc/vbefill.c.
12746
12747 * include/grub/video.h (grub_video_blit_format): New enum.
12748 (grub_video_mode_info): Added new member blit_format.
12749 (grub_video_get_blit_format): New function prototype.
12750
12751 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12752 function prototype.
12753 (grub_video_vbe_map_rgb): Likewise.
12754 (grub_video_vbe_unmap_color): Likewise.
12755
12756 * include/grub/i386/pc/vbeblit.h: New file.
12757
12758 * include/grub/i386/pc/vbefill.h: New file.
12759
12760 * video/video.c (grub_video_get_blit_format): New function.
12761 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12762 (grub_video_vbe_map_rgb): Likewise.
12763 (grub_video_vbe_unmap_color): Likewise.
12764
12765 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12766 optimized fills.
12767 (grub_video_vbe_blit_render_target): Changed to use more optimized
12768 blits.
12769 (grub_video_vbe_setup): Added detection for optimized settings.
12770 (grub_video_vbe_create_render_target): Likewise.
12771
12772 * video/i386/pc/vbeblit.c: New file.
12773
12774 * video/i386/pc/vbefill.c: New file.
12775
c2379b9c 127762006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12777
12778 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12779 here...
12780
12781 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12782 parsing to support both hex and dec ranges. If filename was missing
12783 show usage information.
12784
bd0d7896 127852006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12786
12787 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12788 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12789
12790 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12791 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12792 (video_mod_SOURCES): Added.
12793 (video_mod_CFLAGS): Likewise.
12794 (video_mod_LDFLAGS): Likewise.
12795 (gfxterm_mod_SOURCES): Likewise.
12796 (gfxterm_mod_CFLAGS): Likewise.
12797 (gfxterm_mod_LDFLAGS): Likewise.
12798 (videotest_mod_SOURCES): Likewise.
12799 (videotest_mod_CFLAGS): Likewise.
12800 (videotest_mod_LDFLAGS): Likewise.
12801 (vesafb_mod_SOURCES): Removed.
12802 (vesafb_mod_CFLAGS): Likewise.
12803 (vesafb_mod_LDFLAGS): Likewise.
12804 (vga_mod_SOURCES): Likewise.
12805 (vga_mod_CFLAGS): Likewise.
12806 (vga_mod_LDFLAGS): Likewise.
12807
12808 * commands/videotest.c: New file.
12809
12810 * font/manager.c (fill_with_default_glyph): Modified to use
12811 grub_font_glyph.
12812 (grub_font_get_glyph): Likewise.
12813 (fontmanager): Renamed from this...
12814 (font_manager): ... to this.
12815
12816 * include/grub/font.h (grub_font_glyph): Added new structure.
12817 (grub_font_get_glyph): Modified to use grub_font_glyph.
12818
12819 * include/grub/misc.h (grub_abs): Added as inline function.
12820
12821 * include/grub/video.h: New file.
12822
12823 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12824 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12825 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12826 (grub_vbe_get_controller_info): Renamed from this...
12827 (grub_vbe_bios_get_controller_info): ... to this.
12828 (grub_vbe_get_mode_info): Renamed from this...
12829 (grub_vbe_bios_get_mode_info): ... to this.
12830 (grub_vbe_set_mode): Renamed from this...
12831 (grub_vbe_bios_set_mode): ... to this.
12832 (grub_vbe_get_mode): Renamed from this...
12833 (grub_vbe_bios_get_mode): ... to this.
12834 (grub_vbe_set_memory_window): Renamed from this...
12835 (grub_vbe_bios_set_memory_window): ... to this.
12836 (grub_vbe_get_memory_window): Renamed from this...
12837 (grub_vbe_bios_get_memory_window): ... to this.
12838 (grub_vbe_set_scanline_length): Renamed from this...
12839 (grub_vbe_set_scanline_length): ... to this.
12840 (grub_vbe_get_scanline_length): Renamed from this...
12841 (grub_vbe_bios_get_scanline_length): ... to this.
12842 (grub_vbe_set_display_start): Renamed from this...
12843 (grub_vbe_bios_set_display_start): ... to this.
12844 (grub_vbe_get_display_start): Renamed from this...
12845 (grub_vbe_bios_get_display_start): ... to this.
12846 (grub_vbe_set_palette_data): Renamed from this...
12847 (grub_vbe_bios_set_palette_data): ... to this.
12848 (grub_vbe_set_pixel_rgb): Removed.
12849 (grub_vbe_set_pixel_index): Likewise.
12850
12851 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12852 from this...
12853 (grub_vbe_bios_get_controller_info): ... to this.
12854 (grub_vbe_get_mode_info): Renamed from this...
12855 (grub_vbe_bios_get_mode_info): ... to this.
12856 (grub_vbe_set_mode): Renamed from this...
12857 (grub_vbe_bios_set_mode): ... to this.
12858 (grub_vbe_get_mode): Renamed from this...
12859 (grub_vbe_bios_get_mode): ... to this.
12860 (grub_vbe_set_memory_window): Renamed from this...
12861 (grub_vbe_bios_set_memory_window): ... to this.
12862 (grub_vbe_get_memory_window): Renamed from this...
12863 (grub_vbe_bios_get_memory_window): ... to this.
12864 (grub_vbe_set_scanline_length): Renamed from this...
12865 (grub_vbe_set_scanline_length): ... to this.
12866 (grub_vbe_get_scanline_length): Renamed from this...
12867 (grub_vbe_bios_get_scanline_length): ... to this.
12868 (grub_vbe_set_display_start): Renamed from this...
12869 (grub_vbe_bios_set_display_start): ... to this.
12870 (grub_vbe_get_display_start): Renamed from this...
12871 (grub_vbe_bios_get_display_start): ... to this.
12872 (grub_vbe_set_palette_data): Renamed from this...
12873 (grub_vbe_bios_set_palette_data): ... to this.
12874 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12875 getting corrupted after calling it. Added more pushes and pops.
12876 (grub_vbe_bios_set_mode): Likewise.
12877 (grub_vbe_bios_get_mode): Likewise.
12878 (grub_vbe_bios_get_memory_window): Likewise.
12879 (grub_vbe_bios_set_scanline_length): Likewise.
12880 (grub_vbe_bios_get_scanline_length): Likewise.
12881 (grub_vbe_bios_get_display_start): Likewise.
12882 (grub_vbe_bios_set_palette_data): Likewise.
12883
12884 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12885 (cl_insert): Likewise.
12886 (cl_delete): Likewise.
12887
12888 * term/gfxterm.c: New file.
12889
12890 * term/i386/pc/vesafb.c: Removed file.
12891
12892 * video/video.c: New file.
12893
12894 * video/i386/pc/vbe.c (real2pm): Added new function.
12895 (grub_video_vbe_draw_pixel): Likewise.
12896 (grub_video_vbe_get_video_ptr): Likewise.
12897 (grub_video_vbe_get_pixel): Likewise
12898 (grub_video_vbe_init): Likewise.
12899 (grub_video_vbe_fini): Likewise.
12900 (grub_video_vbe_setup): Likewise.
12901 (grub_video_vbe_get_info): Likewise.
12902 (grub_video_vbe_set_palette): Likewise.
12903 (grub_video_vbe_get_palette): Likewise.
12904 (grub_video_vbe_set_viewport): Likewise.
12905 (grub_video_vbe_get_viewport): Likewise.
12906 (grub_video_vbe_map_color): Likewise.
12907 (grub_video_vbe_map_rgb): Likewise.
12908 (grub_video_vbe_map_rgba): Likewise.
12909 (grub_video_vbe_unmap_color): Likewise.
12910 (grub_video_vbe_fill_rect): Likewise.
12911 (grub_video_vbe_blit_glyph): Likewise.
12912 (grub_video_vbe_blit_bitmap): Likewise.
12913 (grub_video_vbe_blit_render_target): Likewise.
12914 (grub_video_vbe_scroll): Likewise.
12915 (grub_video_vbe_swap_buffers): Likewise.
12916 (grub_video_vbe_create_render_target): Likewise.
12917 (grub_video_vbe_delete_render_target): Likewise.
12918 (grub_video_vbe_set_active_render_target): Likewise.
12919 (grub_vbe_set_pixel_rgb): Remove function.
12920 (grub_vbe_set_pixel_index): Likewise.
12921 (index_color_mode): Remove static variable.
12922 (active_mode): Likewise.
12923 (framebuffer): Likewise.
12924 (bytes_per_scan_line): Likewise.
12925 (grub_video_vbe_adapter): Added new static variable.
12926 (framebuffer): Likewise.
12927 (render_target): Likewise.
12928 (initial_mode): Likewise.
12929 (mode_in_use): Likewise.
12930 (mode_list): Likewise.
12931
5f97350b 129322006-03-10 Marco Gerards <marco@gnu.org>
12933
12934 * configure.ac (AC_INIT): Bumped to 1.93.
12935
12936 * DISTLIST: Added `include/grub/hfs.h'.
12937
a3c5c6f8 129382006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12939
12940 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12941 18H, which might help the BIOS falling back to next boot media.
12942
6de53d26 129432006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12944
12945 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12946 Poe Chen <poe.poechen@gmail.com>.
12947
77c4a393 129482006-01-17 Marco Gerards <marco@gnu.org>
12949
12950 * include/grub/normal.h: Include <grub/script.h>.
12951 (grub_command_list): Removed struct.
12952 (grub_command_list_t): Removed type.
12953 (grub_menu_entry): Remove members `num' and `command_list'. Add
12954 members `commands' and `sourcecode'.
12955 * include/grub/script.h: Add inclusion guards.
12956 (grub_script_cmd_menuentry): New struct.
12957 (grub_script_execute_menuentry): New prototype.
12958 (grub_script_lexer_record_start): Likewise.
12959 (grub_script_lexer_record_stop): Likewise.
12960 * normal/execute.c (grub_script_execute_menuentry): New function.
12961 * normal/lexer.c (record, recording, recordpos, recordlen): New
12962 variables.
12963 (grub_script_lexer_record_start): New function.
12964 (grub_script_lexer_record_stop): Likewise.
12965 (recordchar): Likewise.
12966 (nextchar): Likewise.
12967 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12968 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12969 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12970 (current_menu): New variable.
12971 (free_menu): Mainly rewritten.
12972 (grub_normal_menu_addentry): New function.
12973 (read_config_file): Rewritten.
12974 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 12975 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 12976 the menu entry.
12977 (run): Mainly rewritten.
12978 * normal/parser.y (menu_entry): New variable.
12979 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12980 (menuentry): New rule.
12981 (command): Add `menuentry'.
12982 (if_statement): Allow additional returns before `fi'.
12983 * normal/script.c (grub_script_create_cmdmenu): New function.
12984
144f1f98 129852006-01-03 Marco Gerards <marco@gnu.org>
12986
12987 * INSTALL: GNU Bison is required.
12988 * configure.ac: Rewritten the test to detect Bison.
12989 * Makefile.in (YACC): New variable. Reported by Xun Sun
12990 <xun.sun.cn@gmail.com>.
12991
af4b2d89 129922006-01-03 Marco Gerards <marco@gnu.org>
12993
12994 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12995 the HFS+ filesystem to filesystem blocks.
12996 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12997 GCC warning is silenced.
12998
15643b71 129992006-01-03 Marco Gerards <marco@gnu.org>
13000
13001 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13002 read from disk from big endian to host byte order.
13003
00905879 130042006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13005
13006 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13007 documentation.
13008 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13009 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13010 embedded HFS+ filesystem.
13011 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13012 (grub_hfs_sblock): Move from here...
13013 * include/grub/hfs.h: To here... New file.
13014 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13015 documentation.
13016 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13017 New macros.
13018 (grub_hfsplus_volheader): Change type of member `magic' to
13019 `grub_uint16_t'.
13020 (grub_hfsplus_data): Add new member `embedded_offset'.
13021 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13022 returned block.
13023 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13024 Calculate the offset.
13025
8899bc3e 130262005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13027
13028 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13029 Removed.
13030 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13031
ae8c0277 130322005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13033
13034 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13035 ENV->NAME is NULL after allocating ENV->VALUE.
13036
07084456 130372005-12-25 Marco Gerards <marco@gnu.org>
13038
13039 * kern/env.c (grub_env_set): Rewritten the error handling code.
13040
4750f5f1 130412005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13042
13043 * geninit.sh: Made more robust, and more portable.
13044
50214199 130452005-12-25 Marco Gerards <marco@gnu.org>
13046
13047 Add support for Apple HFS+ filesystems.
f19dbdb7 13048
50214199 13049 * fs/hfsplus.c: New file.
13050
13051 * DISTLIST: Added `fs/hfsplus.c'.
13052
13053 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13054 (hfsplus_mod_SOURCES): New variable.
13055 (hfsplus_mod_CFLAGS): Likewise.
13056 (hfsplus_mod_LDFLAGS): Likewise.
13057 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13058 (grub_setup_SOURCES): Likewise.
13059 (grub_mkdevicemap_SOURCES): Likewise.
13060 (grub_emu_SOURCES): Likewise.
13061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13062
13063 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13064
13065 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13066
befaed6c 130672005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13068
13069 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13070 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13071 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13072 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13073 normal/lexer.c, normal/parser.y, normal/script.c, and
13074 partmap/gpt.c.
13075 Removed kern/sparc64/cache.c.
13076
13077 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13078 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13079 grub_emu_init.c.
13080
13081 * configure.ac (AC_INIT): Bumped to 1.92.
13082
6a124103 130832005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13084
13085 * kern/err.c (grub_error_push): Added new function to support error
13086 stacks.
13087 (grub_error_pop): Likewise.
13088 (grub_error_stack_items): New local variable to support error stacks.
13089 (grub_error_stack_pos): Likewise.
13090 (grub_error_stack_assert): Likewise.
13091 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13092 stack depth.
13093 (grub_print_error): Added support to print errors from error stack.
13094
13095 * include/grub/err.h (grub_error_push): Added function prototype.
13096 (grub_error_pop): Likewise.
13097
be973c1b 130982005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13099
13100 * configure.ac: Accept `powerpc64' as host_cpu.
13101 (amd64): Rename to `biarch32'.
13102
13103 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13104 non-cacheline-aligned addresses.
13105
13106 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13107 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13108 if `size' is non-zero.
13109
b04216ab 131102005-12-03 Marco Gerards <mgerards@xs4all.nl>
13111
13112 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13113 and `cd' to make sure the filename is not prefixed with a
13114 directory name.
13115 (pkgdata_MODULES): Add `gpt.mod'.
13116 (gpt_mod_SOURCES): New variable.
13117 (gpt_mod_CFLAGS): Likewise.
13118 (gpt_mod_LDFLAGS): Likewise.
13119
13120 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13121
13122 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13123 New macro.
13124
13125 * partmap/gpt.c: New file.
13126
13127 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13128 GPT partition map is detected.
13129
41730ed9 131302005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13131
13132 * commands/i386/pc/play.c: New file.
13133 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13134 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13135 macros.
f19dbdb7 13136
95dc3643 131372005-11-27 Marco Gerards <mgerards@xs4all.nl>
13138
13139 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13140 ((unused))' to silence gcc warning.
13141
1569ec51 131422005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13143
13144 * configure.ac: Correct `AC_PROG_YACC' test.
13145
9abde152 131462005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13147
13148 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13149 check before installing files.
13150
44b83271 131512005-11-22 Mike Small <smallm@panix.com>
13152
13153 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13154 number regex so multidigit numbers are recognized correctly.
13155
131562005-11-22 Mike Small <smallm@panix.com>
13157
13158 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13159 debugging message before attempting to claim memory.
13160 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13161 multiple addresses in case of failure.
13162
9c12956b 131632005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13164
13165 * term/tparm.c (get_space): Remove empty `if' statement.
13166
13167 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13168
13169 * kern/parser.c (check_varstate): Rename `state' to 's'.
13170
aeaf81d9 131712005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13172
13173 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13174 variable definitions to the beginning of each function. Sort stack
13175 variables by size.
13176 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13177 `buf' argument to `char *'.
13178
79bbb63f 131792005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13180
13181 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13182 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13183 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 13184 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13185 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13186 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13187 configfile.mod, search.mod, gzio.mod and test.mod.
13188 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13189 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13190 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13191 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13192 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13193 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13194 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13195 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13196 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13197 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13198 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13199 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13200 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13201 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13202 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13203 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13204 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13205 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13206 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13207 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13208 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13209 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13210 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13211
13212 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13213 `grep --include'.
13214 (pkgdata_MODULES): Add test.mod.
13215
233b1628 132162005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13217
13218 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13219 appending to variables with "+=".
13220 (PModule): Use full pathname to generate *.lst filenames.
13221
13222 * Makefile.in: Fixed list rules moved from genmk.rb.
13223 (.DELETE_ON_ERROR): New special target.
13224 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13225
13226 * conf/i386-pc.rmk: Include conf/common.mk.
13227 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13228 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 13229 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13230 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13231 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13232 configfile.mod, search.mod, gzio.mod and test.mod.
13233 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13234 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13235 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13236 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13237 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13238 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13239 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13240 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13241 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13242 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13243 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13244 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13245 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13246 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13247 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13248 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13249 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13250 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13251 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13252 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13253 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13254 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13255 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13256 here...
13257 * conf/common.rmk: ... to here. New file.
13258
13259 * conf/common.mk: New file.
13260
16f820c8 132612005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13262
13263 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13264 (grub_script.tab.c): ... here.
13265
13266 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13267 (grub_script.tab.c): ... here.
13268
13269 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13270 (grub_script.tab.c): ... here.
13271
13272 * normal/command.c (grub_command_find): Fixed a memory leak of
13273 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13274
63ba1554 132752005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13276
13277 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13278 "@" which marks the start of a comment on ARM.
13279 (VARIABLE): Likewise.
13280
7f67dc13 132812005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13282
79bbb63f 13283 Add support for Linux/ADFS partition tables.
7f67dc13 13284
13285 * partmap/acorn.c: New file.
13286
13287 * include/grub/acorn_filecore.h: Likewise.
13288
13289 * DISTLIST: Added `partmap/acorn.c' and
13290 `include/grub/acorn_filecore.h'.
f19dbdb7 13291
7f67dc13 13292 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13293 `partmap/acorn.c'.
13294 (pkgdata_MODULES): Add `acorn.mod'.
13295 (acorn_mod_SOURCES): New variable.
13296 (acorn_mod_CFLAGS): Likewise.
13297
13298 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13299 `partmap/acorn.c'.
13300 (pkgdata_MODULES): Add `acorn.mod'.
13301 (acorn_mod_SOURCES): New variable.
13302 (acorn_mod_CFLAGS): Likewise.
13303
13304 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13305 (pkgdata_MODULES): Add `acorn.mod'.
13306 (acorn_mod_SOURCES): New variable.
13307 (acorn_mod_CFLAGS): Likewise.
13308 (acorn_mod_LDFLAGS): Likewise.
13309
13310 * include/types.h (grub_disk_addr_t): New typedef.
13311
6d099807 133122005-11-13 Marco Gerards <mgerards@xs4all.nl>
13313
13314 * geninit.sh: New file.
13315
13316 * geninitheader.sh: Likewise.
13317
13318 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13319 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13320 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13321 * commands/configfile.c (grub_configfile_init)
13322 (grub_configfile_fini): Likewise.
13323 * commands/default.c (grub_default_init, grub_default_fini):
13324 Likewise.
13325 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13326 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13327 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13328 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13329 Likewise.
13330 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13331 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13332 Likewise.
13333 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 13334 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 13335 Likewise.
13336 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13337 Likewise.
fe6b695a 13338 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 13339 Likewise.
13340 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13341 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13342 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13343 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13344 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13345 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13346 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13347 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13348 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13349 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13350 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13351 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13352 * partmap/amiga.c (grub_amiga_partition_map_init)
13353 (grub_amiga_partition_map_fini): Likewise.
13354 * partmap/apple.c (grub_apple_partition_map_init)
13355 (grub_apple_partition_map_fini): Likewise.
13356 * partmap/pc.c (grub_pc_partition_map_init)
13357 (grub_pc_partition_map_fini): Likewise.
13358 * partmap/sun.c (grub_sun_partition_map_init,
13359 grub_sun_partition_map_fini): Likewise.
13360 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13361 Likewise.
13362
13363 * util/grub-emu.c: Include <grub_modules_init.h>.
13364 (main): Don't initialize and de-initialize any modules directly,
13365 use `grub_init_all' and `grub_fini_all' instead.
13366
13367 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13368 `grub_vesafb_mod_init'.
13369 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13370 all users.
13371 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13372 `grub_vga_mod_init'. Updated all users.
13373 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 13374
6d099807 13375 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13376 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13377 rules.
13378
13379 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13380 Generate a function to initialize the module in utilities.
13381 Updated all callers.
13382 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13383 initialize the module in utilities. Updated all callers.
13384
9046bcf0 133852005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13386
13387 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13388 escape sequence and a literal ^L to clear the screen.
13389
13390 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13391 when returning from Open Firmware.
13392
d13ea639 133932005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13394
13395 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13396 (grub_ofconsole_height): Likewise.
13397 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13398 manually insert a '\n'.
13399 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13400 `grub_ofconsole_height'. Return early if these are already set.
13401
a8fcf206 134022005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13403
13404 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13405 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13406 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13407 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13408 and `normal/script.c'.
13409 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13410 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13411 (test_mod_SOURCES): New variable.
13412 (test_mod_CFLAGS): Likewise.
13413 (test_mod_LDFLAGS): Likewise.
13414 (pkgdata_MODULES): Add `test.mod'.
13415 (grub_script.tab.c): New rule.
13416 (grub_script.tab.h): Likewise.
13417
b6b32745 134182005-11-07 Marco Gerards <mgerards@xs4all.nl>
13419
13420 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13421 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13422 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13423 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13424 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13425 (test_mod_SOURCES): New variable.
13426 (test_mod_CFLAGS): Likewise.
13427 (pkgdata_MODULES): Add `test.mod'.
13428 (grub_script.tab.c): New rule.
13429 (grub_script.tab.h): Likewise.
13430
daac212a 134312005-11-06 Marco Gerards <mgerards@xs4all.nl>
13432
13433 Add initial scripting support.
13434
13435 * commands/test.c: New file.
13436 * include/grub/script.h: Likewise.
13437 * normal/execute.c: Likewise.
13438 * normal/function.c: Likewise.
13439 * normal/lexer.c: Likewise.
13440 * normal/parser.y: Likewise.
13441 * normal/script.c: Likewise.
13442
13443 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 13444
daac212a 13445 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13446 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13447 `normal/function.c' and `normal/script.c'.
13448 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13449 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 13450 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13451 variables.
daac212a 13452 (pkgdata_MODULES): Add `test.mod'.
13453 (grub_script.tab.c): New rule.
13454 (grub_script.tab.h): Likewise.
13455
13456 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13457
13458 * include/grub/normal.h (grub_test_init): New prototype.
13459 (grub_test_fini): Likewise.
f19dbdb7 13460
daac212a 13461 * normal/command.c: Include <grub/script.h>.
13462 (grub_command_execute): Rewritten.
f19dbdb7 13463
daac212a 13464 * util/grub-emu.c (main): Call `grub_test_init' and
13465 `grub_test_fini'.
13466
77500b2b 134672005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13468
13469 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13470 to 0.
13471 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13472 there are no pending characters.
13473
e45deb9e 134742005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13475
13476 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13477 `grub_strndup' to drop device arguments. Replace unnecessary
13478 `grub_strndup' with `grub_strdup'.
13479
4ce32619 134802005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13481
13482 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13483 `debug' environment variable has been set.
13484
134852005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13486
4ce32619 13487 * Makefile.in (install-local): Use $(DATA).
13488 (uninstall): Likewise.
13489 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13490 (sbin_UTILITIES): ... to here.
13491 (sbin_SCRIPTS): New variable.
13492 (grub_install_SOURCES): New variable.
13493 * util/powerpc/ieee1275/grub-install.in: New file.
13494 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13495 variable.
13496 (add_segments): Call `grub_util_get_path'.
13497
25fe6f03 134982005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13499
13500 From Timothy Baldwin:
13501 * commands/ls.c (grub_ls_list_files): Close FILE with
13502 grub_file_close.
13503 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13504
04ccf3ec 135052005-10-24 Marco Gerards <mgerards@xs4all.nl>
13506
13507 * include/grub/parser.h: New file.
13508
13509 * kern/parser.c: Likewise.
13510
13511 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13512 (grub_setup_SOURCES): Likewise.
13513 (grub_probefs_SOURCES): Likewise.
13514 (grub_emu_SOURCES): Likewise.
13515 (kernel_img_HEADERS): Add `parser.h'.
13516
13517 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13518 (grub_emu_SOURCES): Add `kern/parser.c'.
13519 (grubof_SOURCES): Likewise.
13520
13521 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13522 (grubof_SOURCES): Add `kern/parser.c'.
13523
13524 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13525
13526 * kern/misc.c (grub_split_cmdline): Removed function.
13527
13528 * kern/rescue.c: Include <grub/parser.h>.
13529 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13530 of `grub_split_cmdline'.
13531
13532 * normal/command.c: Include <grub/parser.h>.
13533 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13534 of `grub_split_cmdline'.
13535
13536 * normal/completion.c: Include <grub/parser.h>.
13537 (cmdline_state): New variable.
13538 (iterate_dir): End the filename with a quote depending on the
13539 command line state.
13540 (get_state): new function.
13541 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13542 split the arguments and determine the current argument. When the
13543 argument string is not quoted, escape all spaces.
13544
6d8f4b0e 135452005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13546
13547 * normal/sparc64/setjmp.S: New file.
13548
15cf03ed 135492005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13550
13551 * include/grub/sparc64/libgcc.h: New file.
13552 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13553 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13554 normal/sparc64/setjmp.c.
13555
03e8661a 135562005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13557
13558 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13559 * kern/sparc64/cache.S: New file.
13560 * kern/sparc64/cache.c: Removed.
13561 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13562 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13563 -mtune=ultrasparc.
13564 (COMMON_LDFLAGS): Add -melf64_sparc.
13565 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13566 (grubof_SOURCES): Use cache.S instead of cache.c.
13567 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13568 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13569 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13570 commented though.
13571 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13572 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13573 (linux_mod_CFLAGS): Commented out.
13574 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13575 out because module isn't built.
13576 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13577 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13578 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13579 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13580 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13581 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13582 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13583 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13584 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13585 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13586 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13587 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13588 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13589 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13590
34eeec8a 135912005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13592
13593 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13594 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13595 longer, because HFS should not be used on PC.
13596
708367a3 135972005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13598
13599 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13600 consistently within the loop.
13601
6fa1251a 136022005-10-15 Marco Gerards <mgerards@xs4all.nl>
13603
13604 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13605 directory can not be read.
13606
4801580b 136072005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13608
13609 * configure.ac (AC_INIT): Increase the version number to 1.91.
13610
13611 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13612 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13613 term/i386/pc/serial.c.
13614
219ad426 136152005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13616
13617 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13618 file size must be permitted.
13619
13620 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13621 between %ah and %al.
13622
688e5699 136232005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13624
13625 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13626 grub_uint64_t.
13627 Call the hook with a NUL-terminated filename.
13628 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13629 grub_cpu_to_be32.
13630
13631 * kern/term.c (cursor_state): New variable.
13632 (grub_term_set_current): Reset the cursor state on a new
13633 terminal.
13634 (grub_setcursor): Rewritten to use CURSOR_STATE.
13635 (grub_getcursor): New function.
13636
13637 * include/grub/term.h (grub_getcursor): New prototype.
13638
13639 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13640 integers on ARM. Reported by Timothy Baldwin
13641 <T.E.Baldwin99@members.leeds.ac.uk>.
13642
bb34586c 136432005-10-11 Marco Gerards <mgerards@xs4all.nl>
13644
13645 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13646 allocated.
13647 (grub_sfs_dir): Likewise.
13648
9a909877 136492005-10-09 Marco Gerards <mgerards@xs4all.nl>
13650
13651 Add support for the SFS filesystem.
13652
13653 * fs/sfs.c: New file.
13654
13655 * DISTLIST: Added `fs/sfs.c'.
13656
13657 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13658 (grub_probefs_SOURCES): Likewise.
13659 (grub_emu_SOURCES): Likewise.
13660 (pkgdata_MODULES): Add `sfs.mod'.
13661 (sfs_mod_SOURCES): New variable.
13662 (sfs_mod_CFLAGS): Likewise.
13663 (sfs_mod_LDFLAGS): Likewise.
13664
13665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13666 (pkgdata_MODULES): Add `sfs.mod'.
13667 (sfs_mod_SOURCES): New variable.
13668 (sfs_mod_CFLAGS): Likewise.
13669
13670 * util/grub-emu.c (main): Call `grub_sfs_init' and
13671 `grub_sfs_fini'.
13672
13673 * include/grub/fs.h (grub_sfs_init): New prototype.
13674 (grub_sfs_fini): Likewise.
13675
57bdbde3 136762005-10-07 Marco Gerards <mgerards@xs4all.nl>
13677
13678 Add support for the AFFS filesystem.
13679
13680 * fs/affs.c: New file.
13681
13682 * DISTLIST: Added `fs/affs.c'.
13683
13684 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13685 (grub_probefs_SOURCES): Likewise.
13686 (grub_emu_SOURCES): Likewise.
13687 (pkgdata_MODULES): Add `affs.mod'.
13688 (affs_mod_SOURCES): New variable.
13689 (affs_mod_CFLAGS): Likewise.
13690 (affs_mod_LDFLAGS): Likewise.
13691
13692 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13693 (pkgdata_MODULES): Add `affs.mod'.
13694 (affs_mod_SOURCES): New variable.
13695 (affs_mod_CFLAGS): Likewise.
13696
13697 * util/grub-emu.c (main): Call `grub_affs_init' and
13698 `grub_affs_fini'.
13699
13700 * include/grub/fs.h (grub_affs_init): New prototype.
13701 (grub_affs_fini): Likewise.
13702
047b67e0 137032005-10-01 Marco Gerards <mgerards@xs4all.nl>
13704
13705 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13706
59b8208a 137072005-10-01 Marco Gerards <mgerards@xs4all.nl>
13708
13709 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13710 `-m32' to CFLAGS.
13711
13712 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13713 linking.
f19dbdb7 13714
59b8208a 13715 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13716 (COMMON_LDFLAGS): New variable.
13717 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13718 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13719 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13720 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13721 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13722 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13723 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13724 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13725 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13726 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13727 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13728 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13729 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13730 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13731 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13732 variables.
13733 (normal_mod_ASFLAGS): Add `-m32'.
13734
13735 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13736 (grub_host_size_t, grub_host_ssize_t): New types.
13737 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13738 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13739 `GRUB_HOST_SIZEOF_VOID_P'.
13740
13741 * include/grub/kernel.h (struct grub_module_header): Type of
13742 member offset changed to `grub_host_off_t'. Type of member size
13743 changed to `grub_host_size_t'.
13744 (struct grub_module_info): Type of member offset changed to
13745 `grub_host_off_t'. Type of member size changed to
13746 `grub_host_size_t'.
13747
b4093103 137482005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13749
13750 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 13751
b4093103 13752 * kern/i386/pc/startup.S (multiboot_header): New label.
13753 (multiboot_entry): Likewise.
13754 (multiboot_trampoline): Likewise.
13755
13756 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13757 Increased to 0x4A0.
13758
13759 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13760 put parentheses after a question mark.
13761 [!GRUB_UTIL] (my_mod): New variable.
13762
13763 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13764
b2499b29 137652005-09-28 Marco Gerards <mgerards@xs4all.nl>
13766
13767 Adds support for the XFS filesystem. Btrees are not supported
13768 yet.
13769
13770 * fs/xfs.c: New file.
13771
13772 * DISTLIST: Added `fs/xfs.c'.
13773
13774 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13775 (grub_probefs_SOURCES): Likewise.
13776 (grub_emu_SOURCES): Likewise.
13777 (pkgdata_MODULES): Add `xfs.mod'.
13778 (xfs_mod_SOURCES): New variable.
13779 (xfs_mod_CFLAGS): Likewise.
13780
13781 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13782 (pkgdata_MODULES): Add `xfs.mod'.
13783 (xfs_mod_SOURCES): New variable.
13784 (xfs_mod_CFLAGS): Likewise.
13785
13786 * util/grub-emu.c (main): Call `grub_xfs_init' and
13787 `grub_xfs_fini'.
13788
13789 * include/grub/fs.h (grub_xfs_init): New prototype.
13790 (grub_xfs_fini): Likewise.
13791
f19dbdb7 13792
83d37a62 137932005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13794
13795 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13796 color modes, allow greater than 16 colors to be configured as
13797 a default palette.
13798
47d2d65e 137992005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13800
13801 * normal/completion.c (complete_arguments): Add the qualifier
13802 const into OPTIONS.
13803
13804 From Omniflux <omniflux+lists@omniflux.com>:
13805 * include/grub/terminfo.h: New file.
13806 * include/grub/tparm.h: Likewise.
13807 * include/grub/i386/pc/serial.h: Likewise.
13808 * term/terminfo.c: Likewise.
13809 * term/tparm.c: Likewise.
13810 * term/i386/pc/serial.c: Likewise.
13811 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13812 serial.mod.
13813 (terminfo_mod_SOURCES): New variable.
13814 (terminfo_mod_CFLAGS): Likewise.
13815 (serial_mod_SOURCES): Likewise.
13816 (serial_mod_CFLAGS): Likewise.
13817
48b671ff 138182005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13819
13820 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13821 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13822 and kern/powerpc/ieee1275/cmain.c, respectively.
13823
13824 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13825 * kern/powerpc/ieee1275/crt0.S: ... here.
13826
13827 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13828 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 13829
48b671ff 13830 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13831 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13832 instead of boot/powerpc/ieee1275/crt0.S and
13833 boot/powerpc/ieee1275/cmain.c, respectively.
13834
13835 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13836 sectors. It was not used anyway.
13837
09fc77a7 138382005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13839
13840 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13841 `unused parameter' warning.
13842
003789c7 138432005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13844
13845 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13846 function.
13847 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13848 getcharwidth.
13849
67f44c86 138502005-08-28 Marco Gerards <metgerards@student.han.nl>
13851
13852 * include/grub/normal.h (enum grub_completion_type): Added
13853 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13854
13855 * normal/cmdline.c (print_completion): Handle
13856 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13857 * normal/menu_entry.c (store_completion): Likewise.
13858
13859 * normal/completion.c (complete_arguments): New function.
13860 (grub_normal_do_completion): Call `complete_arguments' when the
13861 current words start with a dash.
13862
0b5abe02 138632005-08-27 Marco Gerards <metgerards@student.han.nl>
13864
13865 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13866 `gzio.mod' instead of `io.mod').
13867
d9864ee1 138682005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13869
13870 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13871 (DISTDIRS): Added io and video.
13872 Rewrite the search routine to make an output consistently.
13873
13874 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13875 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13876 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13877 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13878 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13879 util/powerpc/ieee1275/misc.c.
f19dbdb7 13880
d9864ee1 13881 * include/grub/gzio.h: New file.
13882 * io/gzio.c: Likewise.
f19dbdb7 13883
d9864ee1 13884 * kern/file.c (grub_file_close): Call grub_device_close only if
13885 FILE->DEVICE is not NULL.
13886
13887 * include/grub/mm.h [!NULL] (NULL): New macro.
13888
13889 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13890
13891 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13892 (pkgdata_MODULES): Added gzio.mod.
13893 (gzio_mod_SOURCES): New variable.
13894 (gzio_mod_CFLAGS): Likewise.
13895
13896 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13897 (pkgdata_MODULES): Added gzio.mod.
13898 (gzio_mod_SOURCES): New variable.
13899 (gzio_mod_CFLAGS): Likewise.
13900
13901 * commands/cat.c: Include grub/gzio.h.
13902 (grub_cmd_cat): Use grub_gzfile_open instead of
13903 grub_file_open.
f19dbdb7 13904
d9864ee1 13905 * commands/cmp.c: Include grub/gzio.h.
13906 (grub_cmd_cmp): Use grub_gzfile_open instead of
13907 grub_file_open.
13908
13909 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13910 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13911 grub_file_open.
13912 (grub_rescue_cmd_module): Likewise.
13913
fa46f4b5 139142005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13915
13916 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13917 kern/sparc64/ieee1275/init.c because it contains _start.
13918 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13919
e9211b5d 139202005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13921
13922 * configure.ac: Add support for sparc64 host with ieee1275
13923 firmware.
13924 * configure: Generated from configure.ac.
13925 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13926 instead of int.
13927 (grub_ofdisk_read): Likewise.
13928 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13929 pointers as (void *) to remove a warning.
13930 (grub_ofdisk_close): Likewise.
13931 (grub_ofdisk_read): Likewise.
13932 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13933 returns, so make it return void to remove a warning.
13934 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13935 Corresponding prototype change.
13936 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13937 values, and cast the pointers as (void *) to remove a warning.
13938 (grub_mm_dump): Likewise.
13939 * conf/sparc64-ieee1275.mk: New file.
13940 * conf/sparc64-ieee1275.rmk: Likewise.
13941 * include/grub/sparc64/setjmp.h: Likewise.
13942 * include/grub/sparc64/types.h: Likewise.
13943 * include/grub/sparc64/ieee1275/console.h: Likewise.
13944 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13945 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13946 * include/grub/sparc64/ieee1275/time.h: Likewise.
13947 * kern/sparc64/cache.c: Likewise.
13948 * kern/sparc64/dl.c: Likewise.
13949 * kern/sparc64/ieee1275/init.c: Likewise.
13950 * kern/sparc64/ieee1275/openfw.c: Likewise.
13951
385c6a92 139522005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13953
13954 * util/console.c (grub_ncurses_putchar): If C is greater than
13955 0x7f, set C to a question mark.
13956 (grub_ncurses_getcharwidth): New function.
13957 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13958 getcharwidth.
13959
13960 * normal/menu.c (print_entry): Made aware of Unicode. First,
13961 convert TITLE to UCS-4, and predict the cursor position by
13962 grub_getcharwidth.
13963
13964 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13965 const to SRC.
13966 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13967
16ccb8b1 139682005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13969
13970 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13971 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13972 grub_strcat.
13973
13974 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13975 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13976 grub_strcpy and grub_strlen. Take it into account that a space
13977 character is inserted as a delimiter.
13978
6a85ce79 139792005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13980
13981 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 13982 invalid magic in the error.
6a85ce79 13983
13984 * commands/search.c: New file.
f19dbdb7 13985
6a85ce79 13986 * util/grub-emu.c (main): Call grub_search_init and
13987 grub_search_fini.
13988
13989 * kern/rescue.c (grub_rescue_print_disks): Removed.
13990 (grub_rescue_print_devices): New function.
13991 (grub_rescue_cmd_ls): Use grub_device_iterate with
13992 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13993 grub_rescue_print_disks.
13994
13995 * kern/partition.c (grub_partition_iterate): Return the result of
13996 PARTMAP->ITERATE instead of GRUB_ERRNO.
13997
13998 * kern/device.c: Include grub/partition.h.
13999 (grub_device_iterate): New function.
14000
14001 * include/grub/partition.h (grub_partition_iterate): Return int
14002 instead of grub_err_t.
14003
14004 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14005 prototype.
14006 [GRUB_UTIL] (grub_search_fini): Likewise.
14007
14008 * include/grub/device.h (grub_device_iterate): New prototype.
14009
14010 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14011 commands/search.c.
14012 (pkgdata_MODULES): Added search.mod.
14013 (search_mod_SOURCES): New variable.
14014 (search_mod_CFLAGS): Likewise.
14015
14016 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14017 (pkgdata_MODULES): Added search.mod.
14018 (search_mod_SOURCES): New variable.
14019 (search_mod_CFLAGS): Likewise.
14020
14021 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14022 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14023 All callers changed.
14024
14025 * DISTLIST: Added commands/search.c.
14026
ef095434 140272005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14028
14029 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14030 conversion.
14031 (grub_getcharwidth): New function.
14032
14033 * kern/misc.c (grub_utf8_to_ucs4): New function.
14034
14035 * include/grub/term.h (struct grub_term): Added a new member
14036 "getcharwidth".
14037 (grub_getcharwidth): New prototype.
14038
14039 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14040
14041 * term/i386/pc/console.c (map_char): New function. Segregated from
14042 grub_console_putchar.
14043 (grub_console_putchar): Use map_char.
14044 (grub_console_getcharwidth): New function.
14045 (grub_console_term): Specified grub_console_getcharwidth as
14046 getcharwidth.
14047
14048 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14049 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14050
14051 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14052 GRUB_ERRNO.
14053 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14054 on grub_strtoul completely.
14055 (write_char): Declare local variables in the beginning of the
14056 function.
14057 (grub_vesafb_getcharwidth): New function.
14058 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14059 getcharwidth.
14060
1f0a95e4 140612005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14062
14063 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14064 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14065 commands/i386/pc/vbetest.c.
14066
14067 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14068 call grub_vbe_get_controller_info again, because the returned
14069 information is volatile.
14070 (grub_vbe_set_video_mode): Mostly rewritten.
14071 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14072 grub_vbe_status_t correctly.
14073 (grub_vbe_get_video_mode_info): Likewise.
14074 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14075 several if statements.
14076
14077 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14078 * commands/i386/pc/vbeinfo.c: ... this.
14079
14080 * commands/i386/pc/vbe_test.c: Renamed to ...
14081 * commands/i386/pc/vbetest.c: ... this.
14082
14083 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14084 ...
14085 (grub_cmd_vbeinfo): ... this. Save video modes before
14086 iterating. Skip a video mode, if it is not available, not enough
14087 information is given or it is monochrome. Show the memory
14088 model. Leave the interpretation of MODEVAR to grub_strtoul
14089 completely.
14090 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14091 (GRUB_MOD_FINI): Likewise.
14092
14093 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14094 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14095 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14096 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14097 grub_strtoul completely.
14098 (real2pm): Removed.
14099 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14100 (GRUB_MOD_FINI): Likewise.
14101
14102 * normal/misc.c: Include grub/mm.h.
14103
14104 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14105 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14106 (vbe_list_modes_mod_SOURCES): Removed.
14107 (vbe_list_modes_mod_CFLAGS): Likewise.
14108 (vbe_test_mod_SOURCES): Likewise.
14109 (vbe_test_mod_CFLAGS): Likewise.
14110 (vbeinfo_mod_SOURCES): New variable.
14111 (vbeinfo_mod_CFLAGS): Likewise.
14112 (vbetest_mod_SOURCES): Likewise.
14113 (vbetest_mod_CFLAGS): Likewise.
14114
992ffbbe 141152005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14116
14117 * normal/misc.c: New file.
14118
14119 * DISTLIST: Added normal/misc.c.
f19dbdb7 14120
992ffbbe 14121 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14122 DISK to HOOK. Call HOOK with DISK.
14123 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14124 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14125 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14126
14127 * normal/menu_entry.c (struct screen): Added a new member
14128 "completion_shown".
14129 (completion_buffer): New global variable.
14130 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14131 (store_completion): New function.
14132 (complete): Likewise.
14133 (clear_completions): Likewise.
14134 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14135 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14136 a tab, call complete.
14137
14138 * normal/completion.c (disk_dev): Removed.
14139 (print_simple_completion): Likewise.
14140 (print_partition_completion): Likewise.
14141 (print_func): New global variable.
14142 (add_completion): Do not take the arguments WHAT or PRINT any
14143 longer. Added a new argument TYPE. Instead of printing directly,
14144 call PRINT_FUNC if not NULL.
14145 All callers changed.
14146 (complete_device): Use a local variable DEV instead of
14147 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14148 (grub_normal_do_completion): Take a new argument HOOK. Do not
14149 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14150 empty string, return NULL instead.
14151 All callers changed.
14152
14153 * normal/cmdline.c (print_completion): New function.
14154
14155 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14156 to HOOK.
14157 All callers changed.
14158
14159 * kern/disk.c (grub_print_partinfo): Removed.
14160
14161 * include/grub/partition.h (struct grub_partition_map): Add a new
14162 argument DISK into HOOK of ITERATE.
14163 (grub_partition_iterate): Add a new argument DISK to HOOK.
14164
14165 * include/grub/normal.h (enum grub_completion_type): New enum.
14166 (grub_completion_type_t): New type.
14167 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14168 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14169 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14170 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14171 (grub_normal_do_completion): Added a new argument HOOK.
14172 (grub_normal_print_device_info): New prototype.
14173
14174 * include/grub/disk.h (grub_print_partinfo): Removed.
14175
14176 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14177 (normal_mod_SOURCES): Likewise.
14178 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14179 (normal_mod_SOURCES): Likewise.
14180
14181 * commands/ls.c (grub_ls_list_disks): Use
14182 grub_normal_print_device_info instead of grub_print_partinfo. Free
14183 PNAME.
14184 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14185 duplicating the code.
14186
0bd41162 141872005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14188
14189 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 14190 follow GCS more precisely.
14191 * commands/i386/pc/vbe_test.c: Likewise.
14192 * include/grub/i386/pc/vbe.h: Likewise.
14193 * term/i386/pc/vesafb.c: Likewise.
14194 * video/i386/pc/vbe.c: Likewise.
0bd41162 14195
6323696a 141962005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14197
14198 * DISTLIST: Added term/i386/pc/vesafb.c
14199 DISTLIST: Added video/i386/pc/vbe.c
14200 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14201 DISTLIST: Added commands/i386/pc/vbe_test.c.
14202 * commands/i386/pc/vbe_list_modes.c: New file.
14203 * commands/i386/pc/vbe_test.c: Likewise.
14204 * term/i386/pc/vesafb.c: Likewise.
14205 * video/i386/pc/vbe.c: Likewise.
14206 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14207 (grub_vbe_probe) Added prototype.
14208 (grub_vbe_set_video_mode) Likewise.
14209 (grub_vbe_get_video_mode) Likewise.
14210 (grub_vbe_get_video_mode_info) Likewise.
14211 (grub_vbe_set_pixel_rgb) Likewise.
14212 (grub_vbe_set_pixel_index) Likewise.
14213 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14214 (pkgdata_MODULES): Added vesafb.mod.
14215 (pkgdata_MODULES): Added vbe_list_modes.mod.
14216 (pkgdata_MODULES): Added vbe_test.mod.
14217 (vbe_mod_SOURCES): Added.
14218 (vbe_mod_CFLAGS): Likewise.
14219 (vesafb_mod_SOURCES): Likewise.
14220 (vesafb_mod_CFLAGS): Likewise.
14221 (vbe_list_modes_mod_SOURCES): Likewise.
14222 (vbe_list_modes_mod_CFLAGS): Likewise.
14223 (vbe_test_mod_SOURCES): Likewise.
14224 (vbe_test_mod_CFLAGS): Likewise.
14225
0a74e62f 142262005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14227
0a74e62f 14228 * normal/command.c (grub_command_execute): If INTERACTIVE is
14229 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14230 CMDLINE. Disable the pager if INTERACTIVE is true.
14231 All callers are changed.
14232
14233 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14234 before reading a config file.
14235 * normal/main.c (read_config_file): Even if a command is not
14236 found, register it if it is within an entry.
14237
14238 * util/grub-emu.c: Include sys/types.h and unistd.h.
14239 (options): Added --hold.
14240 (struct arguments): Added a new member "hold".
14241 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14242 missing.
14243 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14244 cleared by a debugger, if it is not zero.
14245
14246 * include/grub/normal.h (grub_command_execute): Add an argument
14247 INTERACTIVE.
14248
e51f85ae 142492005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14250
14251 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14252
e9c6f39b 142532005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14254
14255 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14256 program with another one, because the old one didn't detect a bug
14257 in gcc-3.4. Always use regparm 2, because the new test is still
14258 not enough for gcc-4.0. Someone must investigate a simple test
14259 case which detects a bug in gcc-4.0.
14260
8de3495c 142612005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14262
14263 * DISTLIST: Added normal/completion.c.
14264
14265 * normal/completion.c: New file.
f19dbdb7 14266
8de3495c 14267 * term/i386/pc/console.c (grub_console_getwh): New function.
14268 (grub_console_term): Assign grub_console_getwh to getwh.
14269
14270 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14271 function is defined in normal/completion.c as
14272 grub_normal_do_completion.
14273 (grub_cmdline_get): Use grub_normal_do_completion instead of
14274 grub_tab_complete.
14275
14276 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14277 returns non-zero, otherwise return 0.
14278 (grub_partition_iterate): First, probe the partition map. Then,
14279 call ITERATE only for this partition map.
14280
14281 * kern/misc.c (grub_strncmp): Rewritten.
14282
14283 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14284 returns non-zero. Otherwise return 0.
14285
14286 * include/grub/partition.h (grub_partition_map_iterate): Return
14287 int instead of void.
14288
14289 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14290
14291 * include/grub/misc.h (grub_strncmp): Change the type of N to
14292 grub_size_t.
14293
14294 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14295 of void.
14296
14297 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 14298 unsigned explicitly before comparing it with I.
8de3495c 14299
14300 * kern/main.c (grub_env_write_root): Add the attribute unused into
14301 VAR.
14302
14303 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14304 normal/completion.c.
14305 (normal_mod_SOURCES): Likewise.
14306 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14307 (normal_mod_SOURCES): Likewise.
14308
14309 * normal/command.c (grub_iterate_commands): If ITERATE returns
14310 non-zero, return one immediately.
14311
e85e144b 143122005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14313
14314 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14315 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14316 descriptions.
14317 (grub_vbe_get_controller_info): New function.
14318 (grub_vbe_get_mode_info): Likewise.
14319 (grub_vbe_set_mode): Likewise.
14320 (grub_vbe_get_mode): Likewise.
14321 (grub_vbe_set_memory_window): Likewise.
14322 (grub_vbe_get_memory_window): Likewise.
14323 (grub_vbe_set_scanline_length): Likewise.
14324 (grub_vbe_get_scanline_length): Likewise.
14325 (grub_vbe_set_display_start): Likewise.
14326 (grub_vbe_get_display_start): Likewise.
14327 (grub_vbe_set_palette_data): Likewise.
14328 * include/grub/i386/pc/vbe.h: New file.
14329
c46153d2 143302005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14331
14332 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14333 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14334 * DISTLIST: Likewise.
14335 * kern/ieee1275/of.c: Moved to ...
14336 * kern/ieee1275/ieee1275.c: ... here.
14337
0cb90c45 143382005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14339
14340 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14341 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14342 Pass 0 as `end' parameter to grub_strtoul().
14343
a19fb360 143442005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14345
14346 * include/grub/powerpc/ieee1275/console.h: Do not include
14347 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14348 ifdef.
14349 (grub_console_cur_color): Remove i386-specific prototype.
14350 (grub_console_real_putchar): Likewise.
14351 (grub_console_checkkey): Likewise.
14352 (grub_console_getkey): Likewise.
14353 (grub_console_getxy): Likewise.
14354 (grub_console_gotoxy): Likewise.
14355 (grub_console_cls): Likewise.
14356 (grub_console_setcursor): Likewise.
14357 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14358 Include <grub/machine/console.h>.
14359 * term/ieee1275/ofconsole.c: Likewise.
14360
4ac9bd04 143612005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14362
14363 * Makefile.in (LIBLZO): New variable.
14364
14365 * configure.ac: Check for LZO version 2.
14366
14367 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14368 lzo/lzo1x.h instead of lzo1x.h.
14369
14370 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14371 of -llzo.
14372
14373 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14374 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14375
14376 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14377 copying the data from PARTITION to P.
14378
f4917dfd 143792005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14380
14381 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14382 negative, unload the module.
14383
14384 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14385 map is "pc_partition_map" but not "pc".
14386 (usage): Fix the description. The options are --boot-image and
14387 --core-image but not --boot-file or --core-file.
14388 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14389 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14390 DEFAULT_DIRECTORY.
14391
14392 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14393 --core-file. Specify INSTALL_DEVICE as an argument.
14394
14395 * util/console.c: Include config.h.
14396 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14397 [HAVE_NCURSES_H]: Include ncurses.h.
14398 [HAVE_CURSES_H]: Include curses.h.
14399 [!A_NORMAL] (A_NORMAL): Defined as zero.
14400 [!A_STANDOUT] (A_STANDOUT): Likewise.
14401
14402 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14403 -lncurses.
14404 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14405
14406 * configure.ac: Check for curses libraries and headers.
14407
14408 * Makefile.in (LIBCURSES): New variable.
14409
14410 * genmk.rb (Script::rule): Set the executable bits.
14411
14412 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14413 name of the PC partition map is "pc_partition_map" but not "pc".
14414
0e143073 144152005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14416
14417 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14418 (modules): Likewise.
14419 (usage): Added descriptions for --modules and --grub-probefs.
14420 Handle --modules and --grub-probefs. Save the arguments in MODULES
14421 and GRUB_PROBEFS, respectively.
14422 Auto-detect a filesystem module against GRUBDIR. If the result is
14423 empty and modules are not specified explicitly, abort the
14424 installation. Add the result to MODULES.
14425
14426 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14427 disk/powerpc/ieee1275/ofdisk.c,
14428 include/grub/powerpc/ieee1275/init.h and
14429 term/powerpc/ieee1275/ofconsole.c.
14430 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14431 term/ieee1275/ofconsole.c.
14432
14433 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14434
14435 * COPYING: Upgraded to the latest version. Only the address of the
14436 FSF office has changed.
f19dbdb7 14437
efd6e6d5 144382005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14439
14440 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14441 kern/ieee1275.c with kern/ieee1275/of.c.
14442
14443 * kern/ieee1275.c: Moved to ...
14444 * kern/ieee1275/of.c: ... here.
14445
8ceafda2 144462005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14447
14448 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 14449 readability.
8ceafda2 14450
14451 * config.guess: Updated to the latest version from gnulib.
14452 * config.sub: Likewise.
14453 * install.sh: Likewise.
14454 * mkinstalldirs: Likewise.
14455
14456 * include/grub/console.h: Removed. This file is arch-specific. Do
14457 not put this in include/grub.
14458
14459 * include/grub/i386/pc/console.h: Resurrected.
14460
14461 * util/console.c: Include grub/machine/console.h instead of
14462 grub/console.h.
14463 * util/grub-emu.c: Likewise.
14464
267f6cd9 144652005-08-04 Marco Gerards <metgerards@student.han.nl>
14466
14467 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14468 hardcoded value.
f19dbdb7 14469
267f6cd9 14470 From Vincent Pelletier <subdino2004@yahoo.fr>
14471 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14472 Redefined to use grub_getwh.
14473 (grub_term): New member named getwh.
14474 (grub_getwh): New prototype.
14475 * kern/term.c (grub_getwh): New function.
14476 * term/i386/pc/console.c (grub_console_getwh): New function.
14477 (grub_console_term): New member `getwh'.
14478 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14479 (grub_vga_term): New member `getwh'.
0b5abe02 14480 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 14481 grub_ssize_t.
14482 (grub_ofconsole_getw): New function.
14483 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14484 (grub_ofconsole_term): New field named getwh and new initial
14485 value.
14486
3be7266d 144872005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14488
14489 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14490 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14491 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14492 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14493 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14494 of <grub/machine/ieee1275.h>.
14495 * commands/ieee1275/reboot.c: Likewise.
14496 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14497 * kern/ieee1275.c: ... to here. All users updated. Change all
14498 parameter structs to use new type `grub_ieee1275_cell_t'.
14499 * term/powerpc/ieee1275/ofconsole.c: Move ...
14500 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14501 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14502 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14503 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14504 to return int.
14505 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14506 Remove unused prototypes. All users updated.
14507 * include/grub/powerpc/ieee1275/console.h: Removed.
14508 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14509 `grub_ieee1275_cell_t'.
14510 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14511 Cast comparisons with -1 to the correct type.
14512 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14513 type to match `grub_ieee1275_entry_fn'.
14514
8b5f3938 145152005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14516
14517 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14518
14519 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14520 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14521 partmap/sun.c.
14522 (grub_probefs_SOURCES): New variable.
14523
14524 * util/i386/pc/grub-probefs.c: New file.
14525
14526 * util/i386/pc/grub-setup.c (main): Call
14527 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14528 grub_hfs_init and grub_jfs_init to initialize the system. Call
14529 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14530 grub_pc_partition_map_fini to finish the system.
14531
ea409713 145322005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14533
14534 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14535 function.
14536 (grub_multiboot_load_elf32): Likewise.
14537 (grub_multiboot_is_elf64): Likewise.
14538 (grub_multiboot_load_elf64): Likewise.
14539 (grub_multiboot_load_elf): Likewise.
14540 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14541 an ELF32 or ELF64 file.
14542 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14543
14544 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14545 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14546 NULL before calling FS->LABEL.
14547 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14548 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14549 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14550 before calling FS->LABEL.
14551
141a288b 145522005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14553
14554 * util/i386/pc/grub-install.in (datadir): New variable.
14555 (libdir): Removed.
14556 (pkgdatadir): New variable.
14557 (pkglibdir): Removed.
14558
0d5f8a54 145592005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14560
14561 * DISTLIST: Added util/i386/pc/grub-install.in.
14562
14563 * util/i386/pc/grub-install.in: New file.
14564
14565 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14566 (grub_install_SOURCES): Likewise.
14567
14568 * genmk.rb: Added support for scripts.
14569 (Script): New class.
14570 (scripts): New variable.
14571
14572 * Makefile.in (install-local): Install sbin_SCRIPTS by
14573 INSTALL_SCRIPT.
14574 (uninstall): Remove sbin_SCRIPTS.
14575
14576 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14577 device, try to get a GRUB device by
14578 grub_util_biosdisk_get_grub_dev.
14579 Free DEST_DEV.
14580
14581 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14582 description for --device-map.
14583
5f968e1e 145842005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14585
14586 Change the semantics of variable hooks. They now return strings
14587 instead of error values.
f19dbdb7 14588
5f968e1e 14589 * util/i386/pc/grub-setup.c: Include grub/env.h.
14590 (setup): Use grub_device_set_root instead of grub_env_set.
14591
14592 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14593 grub_env_get instead of grub_device_set_root and
14594 grub_device_get_root, respectively.
14595
14596 * kern/main.c (grub_env_write_root): New function.
14597 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14598 grub_env_set instead of grub_device_set_root.
14599
14600 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14601 many variables.
14602 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14603 rather than calling ENV->WRITE_HOOK afterwards.
14604 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14605 passing a pointer of a pointer.
14606 (grub_register_variable_hook): Change the types of "read_hook" and
14607 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14608 respectively.
14609 Allocate the default empty string on the heap, because this string
14610 may be freed later.
14611
14612 * kern/device.c: Include grub/env.h.
14613 (grub_device_set_root): Removed.
14614 (grub_device_get_root): Likewise.
14615 (grub_device_open): Use grub_env_get instead of
14616 grub_device_get_root.
14617
14618 * include/grub/env.h (grub_env_read_hook_t): New type.
14619 (grub_env_write_hook_t): Likewise.
14620 (grub_env_var): Change the types of "read_hook" and "write_hook"
14621 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14622 (grub_register_variable_hook): Likewise.
14623
14624 * include/grub/device.h (grub_device_set_root): Removed.
14625 (grub_device_set_root): Likewise.
14626
14627 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14628 make sure that DIRNAME terminates with '/', so that
14629 grub_fat_find_dir will fail if PATH is not a directory.
14630
14631 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14632 from DIRNAME.
14633 Use the qualifier auto for print_files and print_files_long.
14634 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14635 as a regular file.
14636 Put a newline only if there is no error.
14637 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14638 used.
14639
896f0afd 146402005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14641
14642 * kern/partition.c (grub_partition_probe): Initialize PART to
14643 NULL. Otherwise, when no partition map is registered, this returns
14644 a garbage.
14645
b28b81b2 146462005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14647
14648 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14649 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14650 valid.
14651
5f3607e0 146522005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14653
14654 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14655 information on each device, if it does not have partitions. Print
14656 "Device" instead of "Disk", because this function is not specific
14657 to disk devices.
14658
14659 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14660 static to ensure that it is put on the memory rather than a
14661 register.
14662
502c87e8 146632005-07-17 Yoshinori Okuji <okuji@enbug.org>
14664
14665 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14666 (grub_cat_init): Likewise.
14667 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14668 (options): Likewise.
14669 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14670 (grub_configfile_init): Likewise.
14671 * font/manager.c (GRUB_MOD_INIT): Likewise.
14672 * commands/help.c (GRUB_MOD_INIT): Likewise.
14673 (grub_help_init): Likewise.
14674 * normal/command.c (grub_command_init): Likewise.
14675 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14676 * disk/loopback.c (grub_loop_init): Likewise.
14677 (GRUB_MOD_INIT): Likewise.
14678 * commands/ls.c (grub_ls_init): Likewise.
14679 (GRUB_MOD_INIT): Likewise.
14680 (options): Likewise.
14681 * commands/boot.c (grub_boot_init): Likewise.
14682 (GRUB_MOD_INIT): Likewise.
14683 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14684 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14685 (GRUB_MOD_INIT): Likewise.
14686 * commands/cmp.c (grub_cmp_init): Likewise.
14687 (GRUB_MOD_INIT): Likewise.
14688
14689 * normal/arg.c: Use <> instead of "" to include header files.
14690 (SHORT_ARG_HELP): New macro.
14691 (SHORT_ARG_USAGE): Likewise.
14692 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14693 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14694 descriptions.
14695 (find_short): Check if C is 'h' or 'u' explicitly.
14696 (grub_arg_show_help): Use space characters instead of tabs. Treat
14697 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14698 are shown with --help and --usage only if they are not used for
14699 the command itself.
14700 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14701 'h' and 'u'.
14702
14703 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14704 const into "longarg". Change the type of "shortarg" to int.
14705
f806d18e 147062005-07-17 Yoshinori Okuji <okuji@enbug.org>
14707
14708 * boot/i386/pc/boot.S (boot_drive_check): New label.
14709
14710 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14711 macro.
14712
14713 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14714 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14715
e293232b 147162005-07-17 Yoshinori Okuji <okuji@enbug.org>
14717
14718 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14719 When turning off Gate A20, skip the check and return immediately,
14720 because this is not fatal usually.
14721
ebedfd00 147222005-07-17 Yoshinori Okuji <okuji@enbug.org>
14723
14724 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14725 be 0x7C00 instead of 0x8000.
14726
14727 * boot/i386/pc/pxeboot.S: Rewritten.
14728
14729 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14730 EXT_C.
14731 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14732 result.
14733
654fc59f 147342005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14735
14736 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14737 robustness. This routine now supports a BIOS call and System
14738 Control Port A to modify the gate A20.
14739
14740 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14741 Increased to 0x440.
14742
09f9923f 147432005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14744
14745 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14746 device path and resulting ihandle.
14747 (grub_ofdisk_close): dprintf the ihandle being closed.
14748 (grub_ofdisk_read): dprintf function parameters.
14749 * kern/mm.c (grub_mm_init_region): Likewise.
14750 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14751 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14752 size, and boot arguments.
14753 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14754 before loading into memory.
14755 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14756 before loading into memory.
14757
7ef504d8 147582005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14759
14760 * kern/mm.c: Added much documentation.
14761 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14762 8, set to 5 instead of 8.
14763
e0f050c2 147642005-07-10 Yoshinori Okuji <okuji@enbug.org>
14765
14766 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14767
14768 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14769 (grub_mkdevicemap_SOURCES): New variable.
14770
14771 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14772 lib/device.c of GRUB Legacy.
14773
7224189a 147742005-07-10 Yoshinori Okuji <okuji@enbug.org>
14775
14776 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14777 instead of PATH is NULL.
14778
68c864eb 147792005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14780
14781 * commands/cmp.c (BUFFER_SIZE): New macro.
14782 (grub_cmd_cmp): Close the right file at the right time. Compare
14783 only data just read. Don't report files of different size as
14784 identical. Dynamically allocate buffers. Move variable
14785 declarations at the beginning of function.
14786
e6f3e614 147872005-07-09 Yoshinori Okuji <okuji@enbug.org>
14788
14789 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14790 reverse.
14791
f8f1559a 147922004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14793
14794 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14795 when backspace is pressed at beginning of line.
14796
39c9d41d 147972005-07-03 Yoshinori Okuji <okuji@enbug.org>
14798
14799 * DISTLIST: Added genfslist.sh.
14800
14801 * normal/main.c (fs_module_list): New variable.
14802 (autoload_fs_module): New function.
14803 (read_fs_list): Likewise.
14804 (grub_normal_execute): Call read_fs_list.
14805
14806 * kern/fs.c (grub_fs_autoload_hook): New variable.
14807 (grub_fs_probe): Added support for auto-loading.
14808
14809 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14810 (grub_fs_module_list_t): New type.
14811
14812 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14813 (grub_fs_autoload_hook): New prototype.
14814
14815 * genfslist.sh: New file.
f19dbdb7 14816
39c9d41d 14817 * genmk.rb: Added a rule to generate a filesystem list.
14818
121c1d83 148192005-06-30 Marco Gerards <metgerards@student.han.nl>
14820
14821 * configure.ac: Fix the test for cross-compiling.
14822
14823 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14824 define GRUB_UTIL anymore.
14825
14826 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14827 so this function works on other systems than just big endian.
14828 (load_modules): Likewise.
14829 (add_segments): Likewise.
14830
e75d76e1 148312005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14832
14833 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14834 contains `l' modifier, get a long from va_arg().
14835
50b5a0a7 148362005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14837
14838 * kern/mm.c (grub_free): If the next free block which is being
14839 merged is the first free block, set the first block to the block
14840 being freed.
14841 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14842
89371b20 148432005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14844
14845 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14846 `grub_ieee1275_chosen'.
14847
168d6e58 148482005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14849
14850 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14851 (grub_ieee1275_chosen): New variable.
14852 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14853 `chosen'.
14854 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14855 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14856 Rename first argument to `phandle' for consistency.
14857 (grub_ieee1275_get_property_length): Likewise.
14858 (grub_ieee1275_next_property): Likewise. Change type of first argument
14859 to grub_ieee1275_phandle_t.
14860 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14861 Move export next to declaration.
14862 (grub_ieee1275_chosen): New variable.
14863 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14864 Correct cosmetic typo.
14865 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14866 `grub_ieee1275_chosen'.
14867 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14868 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14869 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14870 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14871 `grub_ieee1275_chosen'.
14872
ca5baa3f 148732005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14874
14875 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14876 /chosen/bootargs.
14877 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14878 /chosen/bootargs as "variable=value" pairs.
14879
708b345f 148802005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14881
14882 * include/grub/misc.h (grub_dprintf): New macro.
14883 (grub_real_dprintf): New prototype.
14884 (grub_strword): Likewise.
14885 (grub_iswordseparator): Likewise.
14886 * kern/misc.c (grub_real_dprintf): New function.
14887 (grub_strword): Likewise.
14888 (grub_iswordseparator): Likewise.
14889
f4c5e67c 148902005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14891
14892 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14893 (roundup): Remove macro.
14894 (grub_ieee1275_flags): Make static.
14895 (grub_ieee1275_realmode): Remove.
14896 (grub_ieee1275_test_flag): New function.
14897 (grub_ieee1275_set_flag): Likewise.
14898 (find_options): Rename to `grub_ieee1275_find_options'; update
14899 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14900 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14901 (cmain): New prototype.
14902 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14903 `grub_ieee1275_flags' directly.
14904 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14905 machine/biosdisk.h.
14906 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14907 Don't include grub/machine/init.h.
14908 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14909 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14910 Remove prototype.
14911 (grub_ieee1275_realmode): Likewise.
14912 (grub_ieee1275_flag): New enum.
14913 (grub_ieee1275_test_flag): New prototype.
14914 (grub_ieee1275_set_flag): New prototype.
14915 * include/grub/powerpc/ieee1275/init.h: Remove file.
14916 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14917 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14918 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14919 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14920 comment.
14921 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14922 `grub_ieee1275_test_flag'.
14923 (grub_ieee1275_encode_devname): Likewise.
14924
ed16607e 149252005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14926
14927 * include/grub/powerpc/ieee1275/ieee1275.h
14928 (grub_ieee1275_encode_devname): New prototype.
14929 (grub_ieee1275_get_filename): Likewise.
14930 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14931 function.
14932 (grub_set_prefix): Likewise.
14933 (grub_machine_init): Call grub_set_prefix.
14934 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14935 (grub_parse_type): New enum.
14936 (grub_ieee1275_get_devargs): New function.
14937 (grub_ieee1275_get_devname): Likewise.
14938 (grub_ieee1275_parse_args): Likewise.
14939 (grub_ieee1275_get_filename): Likewise.
14940 (grub_ieee1275_encode_devname): Likewise.
14941
be369920 149422005-03-30 Marco Gerards <metgerards@student.han.nl>
14943
14944 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14945 `grub_loader_unset'.
14946
a5ce3a4a 149472005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14948
14949 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14950 instead of grub_ieee1275_interpret.
14951 (grub_halt_init): New function.
14952 (grub_halt_fini): Likewise.
14953 (GRUB_MOD_INIT): Correct message grammar.
14954 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14955 instead of grub_ieee1275_interpret.
14956 (grub_reboot_init): New function.
14957 (grub_reboot_fini): Likewise.
14958 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14959 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14960 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14961 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14962 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14963 function.
14964 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14965 Add prototype.
14966 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14967 prototype.
14968 (grub_halt): Likewise.
14969 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14970 (cmain): Remove __attribute__((unused)).
14971 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14972 (grub_heap_len): Likewise.
14973 (grub_machine_fini): New function.
14974 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14975 (grub_halt): Likewise.
14976 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14977 function.
14978 * util/powerpc/ieee1275/misc.c: New file.
14979
0058f771 149802005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14981
14982 * DISTLIST: New file.
14983 * gendistlist.sh: Likewise.
f19dbdb7 14984
0058f771 14985 * Makefile.in (COMMON_DISTFILES): Removed.
14986 (BOOT_DISTFILES): Likewise.
14987 (CONF_DISTFILES): Likewise.
14988 (DISK_DISTFILES): Likewise.
14989 (FS_DISTFILES): Likewise.
14990 (INCLUDE_DISTFILES): Likewise.
14991 (KERN_DISTFILES): Likewise.
14992 (LOADER_DISTFILES): Likewise.
14993 (TERM_DISTFILES): Likewise.
14994 (UTIL_DISTFILES): Likewise.
14995 (DISTFILES): Likewise.
14996 (uninstall): Uninstall files in $(pkgdata_DATA).
14997 (DISTLIST): New target.
14998 (distdir): Use the contents of the file DISTLIST to get a list of
14999 distributed files.
15000
46b3b8a5 150012005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15002
15003 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15004 descriptor. This is ported from GRUB Legacy.
15005
15006 * gencmdlist.sh: Added an extra semicolon to make it work with
15007 old sed versions. Reported by Robert Bihlmeyer
15008 <robbe@orcus.priv.at>.
15009
5822ff87 150102005-03-08 Yoshinori Okuji <okuji@enbug.org>
15011
15012 Automatic loading of commands is supported.
f19dbdb7 15013
5822ff87 15014 * normal/main.c (read_command_list): New function.
15015 (grub_normal_execute): Call read_command_list.
15016
15017 * normal/command.c (grub_register_command): Return zero or CMD.
15018 Allocate CMD->NAME from the heap.
15019 Initialize CMD->MODULE_NAME to zero.
15020 Find the same name as well. If the same command is found and it is
15021 a dummy command, overwrite members. If it is not a dummy command,
15022 return zero.
15023 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15024 (grub_command_find): If a dummy command is found, load a module
15025 and retry to find a command only once.
15026
15027 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15028 make sure that each command is loaded.
15029
15030 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15031 macro.
15032 (struct grub_command): Remove const from the member `name'.
15033 Add a new member `module_name'.
15034 (grub_register_command): Return grub_command_t.
15035
15036 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15037 sure that each command is loaded.
15038
15039 * genmk.rb (PModule::rule): Specify a module name without the
15040 suffix ".mod" to gencmdlist.sh.
15041
7b1f4b57 150422005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15043
15044 * gencmdlist.sh: New file.
f19dbdb7 15045
7b1f4b57 15046 * genmk.rb (PModule::rule): Generate a rule for a command list.
15047 Clean command.lst.
15048 Generate command.lst from $(COMMANDFILES).
15049
15050 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15051 (DATA): Added $(pkgdata_DATA).
15052 (install-local): Install files in $(pkgdata_DATA).
15053
062aaf39 150542005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15055
15056 * term/i386/pc/vga.c (debug_command): Removed.
15057 (GRUB_MOD_INIT): Do not register the command "debug".
15058
15059 From Hollis Blanchard:
15060 * commands/configfile.c: New file.
15061 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15062 commands/configfile.c.
15063 (pkgdata_MODULES): Added configfile.mod.
15064 (configfile_mod_SOURCES): New variable.
15065 (configfile_mod_CFLAGS): Likewise.
15066 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15067 commands/configfile.c.
15068 (pkgdata_MODULES): Added configfile.mod.
15069 (configfile_mod_SOURCES): New variable.
15070 (configfile_mod_CFLAGS): Likewise.
15071 * util/grub-emu.c (main): Call grub_configfile_init and
15072 grub_configfile_fini.
15073 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15074 prototype.
15075 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 15076
cee01aa6 150772005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15078
15079 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15080 address.
15081
15082 * commands/help.c (grub_cmd_help): Do not print newlines after
15083 the last command in print_command_help.
15084
93f3a1d8 150852005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15086
15087 * commands/default.h: New file.
15088 * commands/timeout.h: Likewise.
15089 * normal/context.c: Likewise.
f19dbdb7 15090
93f3a1d8 15091 * util/misc.c: Do not include sys/times.h.
15092 Include sys/time.h and grub/machine/time.h.
15093 (grub_get_rtc): Rewritten with gettimeofday.
15094
15095 * util/grub-emu.c (main): Call grub_default_init and
15096 grub_timeout_init before grub_normal_init, and call
15097 grub_timeout_fini and grub_default_fini after grub_main.
15098
15099 * util/console.c (grub_ncurses_checkkey): Return the read
15100 character or -1.
15101
15102 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15103 timeouts.
15104
15105 * normal/main.c (read_config_file): Push MENU. If this fails,
15106 print an error and wait for a user input.
15107 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15108 If a menu is empty or an error occurs, pop MENU.
15109 (grub_normal_execute): Pop and free MENU after grub_menu_run
15110 returns.
15111
15112 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15113
15114 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15115 include time.h.
15116 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15117 without GRUB_UTIL.
15118 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15119 time.h.
15120 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15121 without GRUB_UTIL.
15122
15123 * include/grub/normal.h (struct grub_menu_list): New struct.
15124 (grub_menu_list_t): New type.
15125 (struct grub_context): New struct.
15126 (grub_context_t): New type.
15127 (grub_register_command): Got rid of EXPORT_FUNC.
15128 (grub_unregister_command): Likewise.
15129 (grub_context_get): New prototype.
15130 (grub_context_get_current_menu): Likewise.
15131 (grub_context_push_menu): Likewise.
15132 (grub_context_pop_menu): Likewise.
15133 [GRUB_UTIL] (grub_default_init): Likewise.
15134 [GRUB_UTIL] (grub_default_fini): Likewise.
15135 [GRUB_UTIL] (grub_timeout_init): Likewise.
15136 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15137
15138 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15139 commands/timeout.c and normal/context.c.
15140 (pkgdata_MODULES): Added default.mod and timeout.mod.
15141 (normal_mod_SOURCES): Added normal/context.c.
15142 (default_mod_SOURCES): New variable.
15143 (default_mod_CFLAGS): Likewise.
15144 (timeout_mod_SOURCES): Likewise.
15145 (timeout_mod_CFLAGS): Likewise.
15146 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15147 conf/i386-pc.rmk.
15148 (pkgdata_MODULES): Added default.mod and timeout.mod.
15149 (normal_mod_SOURCES): Added normal/context.c.
15150 (default_mod_SOURCES): New variable.
15151 (default_mod_CFLAGS): Likewise.
15152 (timeout_mod_SOURCES): Likewise.
15153 (timeout_mod_CFLAGS): Likewise.
15154
15155 * Makefile.in (all-local): Added $(MKFILES).
15156
4ed2e1dd 151572005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15158
15159 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15160 (grub_emu_SOURCES): Likewise.
15161 (pkgdata_MODULES): Add `sun.mod'.
15162 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15163 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15164 `partmap/sun.c'.
15165 (pkgdata_MODULES): Add `sun.mod'.
15166 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15167 * include/grub/partition.h (grub_sun_partition_map_init): New
15168 prototype.
15169 (grub_sun_partition_map_fini): Likewise.
15170 * partmap/sun.c: New file.
15171 * util/grub-emu.c (main): Initialize and de-initialize the sun
15172 partitionmap support.
15173
4d4e372e 151742005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15175
15176 This implements an Emacs-like menu entry editor.
f19dbdb7 15177
4d4e372e 15178 * normal/menu_entry.c: New file.
f19dbdb7 15179
4d4e372e 15180 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15181 characters to ASCII.
15182 (saved_char): New variable.
15183 (grub_ncurses_checkkey): Rewritten completely.
15184 (grub_ncurses_getkey): Likewise.
15185 (grub_ncurses_init): Call raw instead of cbreak.
15186
15187 * normal/menu.c (print_entry): Do not put a space.
15188 (init_page): Renamed to ...
15189 (grub_menu_init_page): ... this. All callers changed.
15190 (edit_menu_entry): Removed.
15191 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15192
15193 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15194
15195 * kern/misc.c (grub_vprintf): Call grub_refresh.
15196
15197 * normal/menu.c (DISP_LEFT): Renamed to ...
15198 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15199 * normal/menu.c (DISP_UP): Renamed to ...
15200 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15201 * normal/menu.c (DISP_RIGHT): Renamed to ...
15202 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15203 * normal/menu.c (DISP_DOWN): Renamed to ...
15204 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15205 * normal/menu.c (DISP_HLINE): Renamed to ...
15206 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15207 * normal/menu.c (DISP_VLINE): Renamed to ...
15208 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15209 * normal/menu.c (DISP_UL): Renamed to ...
15210 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15211 * normal/menu.c (DISP_UR): Renamed to ...
15212 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15213 * normal/menu.c (DISP_LL): Renamed to ...
15214 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15215 * normal/menu.c (DISP_LR): Renamed to ...
15216 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15217 * normal/menu.c (TERM_WIDTH): Renamed to ...
15218 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15219 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15220 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15221 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15222 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15223 * normal/menu.c (TERM_MARGIN): Renamed to ...
15224 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15225 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15226 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15227 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15228 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15229 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15230 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15231 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15232 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15233 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15234 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15235 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15236 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15237 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15238 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15239 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15240 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15241 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15242 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15243 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15244 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15245 All callers changed.
15246
15247 * include/grub/normal.h: New prototype.
15248
15249 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15250 normal/menu_entry.c.
15251 (normal_mod_SOURCES): Likewise.
15252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15253 (normal_mod_SOURCES): Likewise.
15254
e6b92c8a 152552005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15256
15257 * include/grub/normal.h (grub_halt_init): New prototype.
15258 (grub_halt_fini): Likewise.
15259 (grub_reboot_init): Likewise.
15260 (grub_reboot_fini): Likewise.
15261
15262 * util/grub-emu.c: Include signal.h.
15263 (main_env): New global variable.
15264 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15265 catch C-c.
15266 (grub_machine_fini): New function.
15267 (main): Call grub_halt_init and grub_reboot_init before
15268 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15269 Call setjmp with MAIN_ENV to go back afterwards.
15270 Call grub_machine_fini right before return.
15271
15272 * include/grub/util/misc.h: Include setjmp.h.
15273 (main_env): New prototype.
15274
15275 * include/grub/kernel.h (grub_machine_fini): New prototype.
15276 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15277 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15278
15279 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15280 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15281 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 15282
e6b92c8a 15283 * util/i386/pc/misc.c: New file.
f19dbdb7 15284
e6b92c8a 15285 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15286 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15287 commands/i386/pc/reboot.c.
15288
c642636f 152892005-02-14 Guillem Jover <guillem@hadrons.org>
15290
15291 * include/grub/dl.h (grub_dl_check_header): New prototype.
15292 (grub_arch_dl_check_header): Change return type to grub_err_t,
15293 remove size parameter and export function. Update all callers.
15294 * kern/dl.c (grub_dl_check_header): New function.
15295 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15296 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15297 are inside the core.
15298 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15299 independent ELF header checks.
15300 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15301 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15302 `grub_dl_check_header' instead of explicit checks. Check for the
15303 ELF type.
15304 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15305 `grub_dl_check_header' instead of explicit checks. Remove arch
15306 specific ELF header checks.
15307
e6b92c8a 15308 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15309 argument SIZE.
15310
5eabe94b 153112005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15312
15313 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15314 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15315
1b14a681 153162005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15317
15318 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 15319 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 15320 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 15321 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 15322 * partmap/amiga.c (amiga_partition_map_iterate): Return
15323 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15324 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15325
aca108aa 153262005-02-01 Guillem Jover <guillem@hadrons.org>
15327
15328 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15329 help info.
15330
c9f9c556 153312005-01-31 Marco Gerards <metgerards@student.han.nl>
15332
15333 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15334 Removed prototype.
15335 (grub_rescue_cmd_linux): New prototype.
15336 (grub_rescue_cmd_initrd): Likewise.
15337 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15338 `bi_rec'.
15339 (grub_linux_release_mem): Release the memory for the initrd.
15340 (grub_load_linux): Renamed from this...
15341 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15342 Changed `entry' not to be static. Loop over memory regions to
15343 find another one when the default fails.
15344 (grub_rescue_cmd_initrd): New function.
15345 (grub_linux_init): Remove function.
15346 (grub_linux_fini): Likewise.
15347 (GRUB_MOD_INIT): Register `initrd'.
15348 (GRUB_MOD_FINI): Unregister `initrd'.
15349 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15350 Function removed.
15351 (grub_linux_normal_fini): Likewise.
15352 (GRUB_MOD_INIT): Register `initrd'.
15353 (GRUB_MOD_FINI): Unregister `initrd'.
15354
990cf3aa 153552005-01-31 Marco Gerards <metgerards@student.han.nl>
15356
15357 * commands/help.c: New file.
15358 * normal/arg.c (show_help): Renamed to...
15359 (grub_arg_show_help): ... this.
15360 * commands/i386/pc/halt.c: New file.
15361 * commands/i386/pc/reboot.c: Likewise.
15362 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15363 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15364 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15365 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15366 variables.
15367 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15368 `commands/help.c'.
15369 (pkgdata_MODULES): Add `help.mod'.
15370 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15371 * grub/i386/pc/init.h (grub_reboot): New prototype.
15372 (grub_halt): Likewise.
15373 * include/grub/normal.h (grub_arg_show_help): New prototype.
15374 (grub_help_init): Likewise.
15375 (grub_help_fini): Likewise.
15376 * util/grub-emu.c (main): Initialize and deinitialize the help
15377 command.
15378
15379 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15380
15381 * normal/command.c (grub_command_init): Fixed the description of
15382 the `set' and `unset' commands.
15383
153842005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 15385
15386 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15387 function.
15388 * commands/ieee1275/halt.c: New file.
15389 * commands/ieee1275/reboot.c: Likewise.
15390 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15391 `__attribute__ ((unused))'. Some GCS related fixed.
15392 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15393 (grub_suspend_fini): Likewise.
15394 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15395 and `halt.mod'.
15396 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15397 (halt_mod_CFLAGS): New variables.
15398 * include/grub/powerpc/ieee1275/ieee1275.h
15399 (grub_ieee1275_interpret): New prototype.
15400
1ab09cc7 154012005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15402
15403 * include/grub/misc.h (memmove): New prototype.
15404 (memcpy): Likewise.
15405
8b8cbdb2 154062005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15407
15408 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15409 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15410
e3741a27 154112005-01-22 Marco Gerards <metgerards@student.han.nl>
15412
15413 * kern/misc.c (grub_strndup): Function rewritten.
15414
776bd780 154152005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15416
15417 * normal/menu.c (TERM_WIDTH): Macro redefined.
15418 (TERM_TOP_BORDER_Y): Likewise.
15419 (draw_border): Replaced while-loop by a for-loop. Make the number
15420 of lines consistent with the number of lines displayed in
15421 print_entries. Added a margin below the rectangle.
15422 (print_entry): Make the entry fit in the rectangle.
15423 (print_entries): Display the scroll arrows next to the right
15424 border.
15425
78026bce 154262005-01-21 Marco Gerards <metgerards@student.han.nl>
15427
15428 * fs/minix.c (grub_minix_find_file): Reserve more space for
15429 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15430 `grub_strncpy' to copy `path' into it.
15431
67bbaf0f 154322005-01-21 Marco Gerards <metgerards@student.han.nl>
15433
15434 Add the loopback device, a device via which files can be accessed
15435 as devices.
f19dbdb7 15436
67bbaf0f 15437 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15438 (pkgdata_MODULES): Add loopback.mod.
15439 (loopback_mod_SOURCES): New variable.
15440 (loopback_mod_CFLAGS): Likewise.
15441 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15442 `disk/loopback.c'.
15443 (pkgdata_MODULES): Add loopback.mod.
15444 (loopback_mod_SOURCES): New variable.
15445 (loopback_mod_CFLAGS): Likewise.
15446 * disk/loopback.c: new file.
15447 * include/grub/normal.h (grub_loop_init): New prototype.
15448 (grub_loop_fini): New prototype.
15449 * util/grub-emu.c (main): Initialize and de-initialize loopback
15450 support.
15451 * include/grub/disk.h (grub_disk_dev_id): Add
15452 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15453
6f1c18bd 154542005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15455
15456 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15457 function.
15458 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15459 (suspend_mod_SOURCES): New variable.
15460 (suspend_mod_CFLAGS): Likewise.
15461 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15462 New prototype.
15463 * commands/ieee1275/suspend.c: New file.
15464
b38551da 154652005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15466
15467 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 15468 ((unused))' to `__attribute__ ((used))'.
b38551da 15469 (GRUB_MOD_FINI): Likewise.
15470 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15471 * genmk.rb (PModule): Assign space to common symbols when linking
15472 modules.
15473
777aff39 154742005-01-20 Marco Gerards <metgerards@student.han.nl>
15475
15476 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15477 `unsigned' arguments to `grub_size_t'.
15478 (grub_malloc): Likewise.
15479 (grub_realloc): Likewise.
15480 (grub_memalign): Likewise.
15481 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15482 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15483 * util/misc.c (grub_malloc): Likewise.
15484 (grub_realloc): Likewise.
15485 * kern/mm.c (get_header_from_pointer): Change the casts to
15486 `unsigned' into a cast to `grub_size_t'.
15487
15488 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15489 point to `currnode' when `currnode' is changed.
15490
15491 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15492 Schottelius <nico-linux@schottelius.org>.
15493
d0ff18e1 154942005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15495
15496 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15497 (note_path): Remove variable.
15498 (GRUB_IEEE1275_NOTE_NAME): New macro.
15499 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15500 (grub_ieee1275_note_hdr): New structure.
15501 (grub_ieee1275_note_desc): Likewise.
15502 (grub_ieee1275_note): Likewise.
15503 (load_note): Remove `dir' argument. All callers updated. Remove
15504 `note_img' and `path'. Do not load a file from `note_path'.
15505 Initialize a struct grub_ieee1275_note and write that to `out'.
15506 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15507
4ca7004c 155082005-01-05 Marco Gerards <metgerards@student.han.nl>
15509
15510 * util/misc.c (grub_util_read_image): Revert last change. It
15511 called `grub_util_read_at', which seeks from the beginning of the
15512 file.
15513
0b412211 155142005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15515
15516 * TODO: Add note about endianness in grub-mkimage.
15517 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15518 section.
15519 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15520 (grub_mkimage_SOURCES): New target.
15521 * include/grub/kernel.h (grub_start_addr): Remove variable.
15522 (grub_end_addr): Likewise.
15523 (grub_total_module_size): Likewise.
15524 (grub_kernel_image_size): Likewise.
15525 (GRUB_MODULE_MAGIC): New constant.
15526 (grub_module_info): New structure.
15527 (grub_arch_modules_addr): New prototype.
15528 (grub_get_end_addr): Remove prototype.
15529 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15530 * include/grub/powerpc/ieee1275/kernel.h: New file.
15531 * include/grub/util/misc.h (grub_util_get_fp_size): New
15532 prototype.
15533 (grub_util_read_at): Likewise.
15534 (grub_util_write_image_at): Likewise.
15535 * kern/main.c (grub_get_end_addr): Remove function.
15536 (grub_load_modules): Call grub_arch_modules_addr instead of using
15537 grub_end_addr. Look for a grub_module_info struct in memory. Use
15538 the grub_module_info fields instead of calling grub_get_end_addr
15539 as loop conditions. Move grub_add_unused_region code here.
15540 (grub_add_unused_region): Remove function.
15541 * kern/i386/pc/init.c: Include grub/cache.h.
15542 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15543 one call to add_mem_region.
15544 (grub_arch_modules_addr): New function.
15545 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15546 (grub_total_module_size): Likewise.
15547 Include grub/machine/kernel.h.
15548 (grub_arch_modules_addr): New function.
15549 * util/grub-emu.c (grub_end_addr): Remove variable.
15550 (grub_total_module_size): Likewise.
15551 (grub_arch_modules_addr): New function.
15552 * util/misc.c: Include unistd.h.
15553 (grub_util_get_fp_size): New function.
15554 (grub_util_read_at): Likewise.
15555 (grub_util_write_image_at): Likewise.
15556 (grub_util_read_image): Call grub_util_read_at.
15557 (grub_util_write_image): Call grub_util_write_image_at.
15558 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15559 additional memory in kernel_img for a struct grub_module_info.
15560 Fill in that grub_module_info.
15561 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15562
458786f8 155632005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15564
15565 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15566 New function.
15567 * include/grub/powerpc/ieee1275/ieee1275.h
15568 (grub_ieee1275_milliseconds): New prototype.
15569 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15570 Change to 1000.
15571 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15572 grub_ieee1275_milliseconds.
15573
ac507d1b 155742005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15575
15576 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15577 variable.
15578 (find_options): New function.
15579 (cmain): Call find_options.
15580 * include/grub/powerpc/ieee1275/ieee1275.h
15581 (grub_ieee1275_realmode): New extern variable.
15582 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15583 grub_map if grub_ieee1275_realmode is false.
15584
6b8fd1c4 155852004-12-29 Marco Gerards <metgerards@student.han.nl>
15586
15587 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15588 lines are inserted and make it work like readline. Reported by
15589 Vincent Pelletier <subdino2004@yahoo.fr>.
15590
8514a1e0 155912004-12-28 Marco Gerards <metgerards@student.han.nl>
15592
15593 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15594
15595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15596 `kern/powerpc/cache.S'.
15597
924b6140 155982004-12-27 Marco Gerards <metgerards@student.han.nl>
15599
15600 * genmk.rb: Handle the `Program' class in the main loop. Written
15601 by Johan Rydberg <jrydberg@gnu.org>.
15602 (Program): New class.
15603 (programs): New variable.
15604 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15605 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15606 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15607 (help_arch): Function removed.
15608 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15609 `powerpc/libgcc.h' and `loader.h'.
15610 (pkgdata_PROGRAMS): New variable.
15611 (sbin_UTILITIES): Variable removed.
15612 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15613 (grubof_SOURCES): Variable re-defined so it only includes the
15614 core functionality.
15615 (grubof_CFLAGS): Remove `-DGRUBOF'.
15616 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15617 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15618 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15619 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15620 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15621 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15622 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15623 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15624 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15625 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15626 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15627 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15628 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15629 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15630 (pc_mod_CFLAGS): New variables.
15631 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15632 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15633 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15634 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15635 Moved from here...
15636 * include/grub/i386/pc/init.h (grub_os_area_addr)
15637 (rub_os_area_size): ... to here.
15638 * include/grub/powerpc/ieee1275/ieee1275.h
15639 (grub_ieee1275_entry_fn): Export symbol.
15640 * include/grub/powerpc/ieee1275/init.h: New file.
15641 * include/grub/powerpc/libgcc.h: Likewise.
15642 * include/grub/cache.h: Likewise.
15643 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15644 <hollis@penguinppc.org>.
15645 * kern/dl.c: Include <grub/cache.h>.
15646 (grub_dl_flush_cache): New function.
15647 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15648 for this module.
15649 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15650 (grub_console_init): Removed prototypes.
15651 (grub_machine_init): Don't initialize the modules anymore.
15652 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15653 static.
15654 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15655 Macro undef removed.
15656 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15657 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15658 relocation `R_PPC_REL32'. Return an error when the relocation is
15659 unknown.
15660 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15661 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15662 * util/misc.c (grub_arch_sync_caches): Likewise.
15663
e4b47e0c 156642004-12-19 Marco Gerards <metgerards@student.han.nl>
15665
15666 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15667 `symlist.c', add `grubof_symlist.c'.
15668 (symlist.c): Variable removed.
15669 (grubof_HEADERS): Variable added.
15670 (grubof_symlist.c): New target.
15671 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15672 `kernel_img_HEADERS'.
15673 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15674 * kern/powerpc/dl.c: New file.
15675 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15676 Function removed.
15677 (grub_arch_dl_relocate_symbols): Likewise.
15678 (grub_register_exported_symbols): Likewise.
15679
4ceb3636 156802004-12-13 Marco Gerards <metgerards@student.han.nl>
15681
15682 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15683 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15684 to fail instead. Reported by Vincent Pelletier
15685 <subdino2004@yahoo.fr>.
15686
15687 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15688 it is not allocated. Reported by Vincent Pelletier
15689 <subdino2004@yahoo.fr>.
15690
15691 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15692 output so the output looks better.
f19dbdb7 15693
3f1578fe 156942004-12-04 Marco Gerards <metgerards@student.han.nl>
15695
15696 Modulize the partition map support and add support for the amiga
15697 partition map.
f19dbdb7 15698
3f1578fe 15699 * commands/ls.c: Include <grub/partition.h> instead of
15700 <grub/machine/partition.h>.
15701 * kern/disk.c: Likewise.
15702 * kern/rescue.c: Likewise.
15703 * loader/i386/pc/chainloader.c: Likewise.
15704 * normal/cmdline.c: Likewise.
15705 * kern/powerpc/ieee1275/init.c: Likewise.
15706 (grub_machine_init): Call `grub_pc_partition_map_init',
15707 `grub_amiga_partition_map_init' and
15708 `grub_apple_partition_map_init'.
15709 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15710 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15711 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15712 `partition.h' and `pc_partition.h'.
15713 (grub_setup_SOURCES): Remove
15714 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15715 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15716 (grub_emu_SOURCES): Likewise.
15717 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15718 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15719 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15720 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15721 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15722 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15723 (grubof_SOURCES): Likewise.
15724 * disk/i386/pc/partition.c: File removed.
15725 * disk/powerpc/ieee1275/partition.c: Likewise.
15726 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15727 * include/grub/i386/pc/partition.h: Likewise.
15728 * kern/partition.c: New file.
15729 * partmap/amiga.c: Likewise.
15730 * partmap/apple.c: Likewise.
15731 * partmap/pc.c: Likewise.
15732 * include/grub/partition.h: Likewise..
15733 * include/grub/pc_partition.h: Likewise.
15734 * util/grub-emu.c: Include <grub/partition.h> instead of
15735 <grub/machine/partition.h>.
15736 (main): Call `grub_pc_partition_map_init',
15737 `grub_amiga_partition_map_init' and
15738 `grub_apple_partition_map_init' and deinitialize afterwards.
15739 * util/i386/pc/biosdisk.c: Include `#include
15740 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15741 `<grub/machine/partition.h>'.
15742 * util/i386/pc/grub-setup.c: Likewise.
15743 * util/i386/pc/biosdisk.c: Likewise.
15744 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15745 partition information in case of a PC partition.
15746 * util/i386/pc/grub-setup.c: Include `#include
15747 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15748 `<grub/machine/partition.h>'.
15749 (setup): Only access the PC specific partition information in case
15750 of a PC partition.
15751
0ef4ced9 157522004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15753
0ef4ced9 15754 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15755 (grub_longjmp): Likewise.
15756 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15757 20.
15758 * normal/powerpc/setjmp.S: New file.
15759 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15760 `normal/powerpc/setjmp.S'.
15761 (grubof_CFLAGS): Add `-DGRUBOF'.
15762 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15763 [GRUB_UTIL && !GRUBOF].
f19dbdb7 15764
19950e29 157652004-11-16 Marco Gerards <metgerards@student.han.nl>
15766
15767 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15768 property named `name'. Correctly handle the error returned by
15769 `grub_ieee1275_finddevice' if a device can not be opened.
15770
a2fea427 157712004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15772
15773 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15774 `actual' for negativity.
15775 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15776 kern/fshelp.c.
15777
41ea0ea3 157782004-11-01 Marco Gerards <metgerards@student.han.nl>
15779
15780 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15781 (PAGE_OFFSET): New macro.
15782 (CRTC_ADDR_PORT): Likewise.
15783 (CRTC_DATA_PORT): Likewise.
15784 (START_ADDR_HIGH_REGISTER): Likewise.
15785 (START_ADDR_LOW_REGISTER): Likewise.
15786 (GRAPHICS_ADDR_PORT): Likewise.
15787 (GRAPHICS_DATA_PORT): Likewise.
15788 (READ_MAP_REGISTER): Likewise.
15789 (INPUT_STATUS1_REGISTER): Likewise.
15790 (INPUT_STATUS1_VERTR_BIT): Likewise.
15791 (page): New variable.
15792 (wait_vretrace): New function.
15793 (set_read_map): Likewise.
15794 (set_start_address): Likewise.
15795 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15796 the right page.
15797 (check_vga_mem): Take the page into account.
15798 (write_char): Likewise.
15799 (write_cursor): Likewise.
15800 (scroll_up): Likewise. Copy the page to the page that is not
15801 shown and switch between both pages.
15802 (grub_vga_putchar): Fix off by one error.
15803 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15804 account.
15805
ad0bd20b 158062004-11-01 Marco Gerards <metgerards@student.han.nl>
15807
15808 Add support for iso9660 (including rockridge).
f19dbdb7 15809
ad0bd20b 15810 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15811 (iso9660_mod_SOURCES): New variable.
15812 (iso9660_mod_CFLAGS): Likewise.
15813 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15814 * include/grub/fs.h (grub_iso9660_init): New prototype.
15815 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15816 * fs/iso9660.c: New file.
15817
15818 * include/grub/misc.h (grub_strncat): New prototype.
15819 * kern/misc.c (grub_strncat): New function.
f19dbdb7 15820
ad0bd20b 15821 * fs/hfs.c (grub_hfs_mount): Translate the error
15822 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15823 * fs/jfs.c (grub_jfs_mount): Likewise.
15824 * fs/ufs.c (grub_ufs_mount): Likewise.
15825
a5477a59 158262004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15827
15828 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15829 which initialized BAT registers.
15830 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15831 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15832 Move from here...
15833 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15834 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15835 ... to here.
15836 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15837 (grub_mapclaim): Likewise.
15838 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15839 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15840 hand.
15841
9304c1f8 158422004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15843
15844 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15845 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15846 -ffreestanding and -msoft-float.
15847
86f4ae25 158482004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15849
15850 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15851 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15852 set in grub_ieee1275_flags.
15853
38912228 158542004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15855
15856 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15857 prototype.
15858 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15859 grub_console_init first.
15860 Change the memory range used for grub_ieee1275_claim and
15861 grub_mm_init_region.
15862 Print an error message if the claim fails.
15863 Include <grub/misc.h>.
15864
d1923dc8 158652004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15866
15867 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15868 Call grub_children_iterate for device nodes of type `scsi',
15869 `ide', or `ata'.
15870 (grub_ofdisk_open): Remove manual device alias resolution.
15871 Fix memory leak when device cannot be opened.
f19dbdb7 15872 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 15873 (grub_children_iterate): New prototype.
15874 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15875 New function.
15876 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15877 Return -1 if args.size was -1.
15878
4512e4f3 158792004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15880
15881 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15882 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15883 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15884 Open Firmware's memory for it; claim memory from _start to _end.
15885 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15886 (_end): New extern.
15887 (_start): Zero BSS from __bss_start to _end.
15888 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15889 New extern.
15890 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15891
4d61feb0 158922004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15893
ad0bd20b 15894 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15895 -1 if args.base was -1.
4d61feb0 15896
026fa2f9 158972004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15898
15899 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15900 escape sequence instead of a literal ^L. Also call
15901 grub_ofconsole_gotoxy.
15902
9f2220ef 159032004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15904
15905 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15906 void * arguments to grub_addr_t. All callers updated. Also make
15907 the `result' argument optional.
15908 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15909 All callers updated.
15910
8a572cd7 159112004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15912
15913 * commands/ls.c (grub_ls_list_files): Use the string following the
15914 initial ')', if present, as the filesystem path.
15915 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15916
15917 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15918
18aa81f2 159192004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15920
15921 Make the source code of the menu interface more readable.
f19dbdb7 15922
18aa81f2 15923 * normal/menu.c: Include grub/mm.h.
15924 (TERM_WIDTH): New macro.
15925 (TERM_HEIGHT): Likewise.
15926 (TERM_INFO_HEIGHT): Likewise.
15927 (TERM_MARGIN): Likewise.
15928 (TERM_SCROLL_WIDTH): Likewise.
15929 (TERM_TOP_BORDER_Y): Likewise.
15930 (TERM_LEFT_BORDER_X): Likewise.
15931 (TERM_BORDER_WIDTH): Likewise.
15932 (TERM_MESSAGE_HEIGHT): Likewise.
15933 (TERM_BORDER_HEIGHT): Likewise.
15934 (TERM_NUM_ENTRIES): Likewise.
15935 (TERM_FIRST_ENTRY_Y): Likewise.
15936 (TERM_ENTRY_WIDTH): Likewise.
15937 (TERM_CURSOR_X): Likewise.
15938 (draw_border): Use macros instead of magic numbers.
15939 (print_entry): Likewise.
15940 (print_entries): Likewise.
15941 (run_menu): Likewise. Also, handle the key 'e'.
15942 (run_menu_entry): Ignore empty command lines.
15943 (print_message): Added a new argument EDIT. If EDIT is true,
15944 print a different message.
15945 (init_page): Likewise.
15946 (edit_menu_entry): New function. Not implemented yet.
15947
b47efe30 159482004-09-17 Marco Gerards <metgerards@student.han.nl>
15949
15950 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15951 can be loaded from normal mode.
f19dbdb7 15952
b47efe30 15953 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15954 `multiboot.mod'.
15955 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15956 (multiboot_mod_CFLAGS): New variables.
15957 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 15958 * loader/i386/pc/multiboot_normal.c: Likewise.
15959
b47efe30 15960 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15961 attribute `unused'.
f19dbdb7 15962
b47efe30 15963 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15964 `fdiro' to read the mode information from instead of `diro'.
15965
15966 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15967 looking up a symlink.
15968
15969 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15970 macro.
15971 * normal/command.c (grub_command_execute): Don't parse the
15972 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15973 flags of the command.
15974
15975 * normal/menu.c (grub_menu_run): Fix typo.
15976
da75ac71 159772004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15978
15979 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15980
15981 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15982 `y + 1' instead of `y - 1'.
15983
15984 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 15985
062b24c2 159862004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15987
15988 From Hollis Blanchard <hollis@penguinppc.org>:
15989 * kern/misc.c (memmove): New alias for grub_memmove.
15990 (memcmp): New alias for grub_memcmp.
15991 (memset): New alias for grub_memset.
f19dbdb7 15992 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 15993 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 15994 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 15995 (grub_ieee1275_get_property): Likewise.
f19dbdb7 15996
8ddad845 159972004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15998
15999 Added normal mode command `chainloader' as module chain.mod, which
16000 depends on normal.mod and _chain.mod.
f19dbdb7 16001
8ddad845 16002 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16003 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16004 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16005 Deleted prototype.
16006 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16007 but arguments parsing moved to ...
16008 (grub_chainloader_cmd): ... here. New function.
16009 * include/grub/i386/pc/chainloader.h: New file.
16010 * loader/i386/pc/chainloader_normal.c: Likewise.
16011
2c1f4ce3 160122004-09-11 Marco Gerards <metgerards@student.han.nl>
16013
16014 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16015 (grub_mkimage_LDFLAGS): Likewise.
16016 (grub_emu_SOURCES): Likewise.
16017 (kernel_img_HEADERS): Added fshelp.h.
16018 * fs/ext2.c: Include <grub/fshelp.h>.
16019 (FILETYPE_REG): New macro.
16020 (FILETYPE_INO_REG): Likewise.
16021 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16022 Changed all users.
16023 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16024 all users.
16025 (grub_fshelp_node): New struct.
16026 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16027 to a pointer.
16028 (grub_ext2_get_file_block): Removed function.
16029 (grub_ext2_read_block): New function.
16030 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16031 This function was written.
16032 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16033 (grub_ext2_find_file): Removed function.
16034 (grub_ext2_read_symlink): New function.
16035 (grub_ext2_iterate_dir): Likewise.
16036 (grub_ext2_open): Rewritten.
16037 (grub_ext2_dir): Rewritten.
16038 * include/grub/fshelp.h: New file.
16039 * fs/fshelp.c: Likewise.
16040
3c52136a 160412004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16042
16043 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16044 (print_message): Add a missing newline.
16045 (run_menu): Added timeout support.
16046 (run_menu_entry): New local function.
16047 (grub_menu_run): Added support for booting.
16048
16049 * kern/loader.c (grub_loader_is_loaded): New function.
16050
16051 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16052 (grub_get_rtc): Exported.
16053
16054 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16055 (grub_get_rtc): Exported.
16056
16057 * include/grub/normal.h (struct grub_command_list): Remove
16058 constant from the member `command'.
16059
16060 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16061
16062 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16063
16064 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16065
aa033560 160662004-08-28 Marco Gerards <metgerards@student.han.nl>
16067
16068 Add support for the JFS filesystem.
16069
16070 * fs/jfs.c: New file.
16071 * include/grub/fs.h (grub_jfs_init): New prototype.
16072 (grub_jfs_fini): New prototype.
16073 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16074 (grub_emu_SOURCES): Likewise.
16075 (pkgdata_MODULES): Add jfs.mod.
16076 (jfs_mod_SOURCES): New variable.
16077 (jfs_mod_CFLAGS): Likewise.
16078 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16079 (grubof_SOURCES): Likewise.
16080 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16081
16082 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16083 endian to the host endian.
16084 (grub_fat_utf16_to_utf8): Move function from there...
16085 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 16086 the endianness of the source string anymore.
aa033560 16087 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16088
94bc45af 160892004-08-24 Marco Gerards <metgerards@student.han.nl>
16090
16091 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16092 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16093 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16094 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 16095
94bc45af 16096 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16097 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16098 for `node_found' and `it_dir'.
16099 (grub_hfs_dir): Add prototype for `dir_hook'.
16100
16101 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16102 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16103 and `indir32' to silence a gcc warning.
16104
16105 * include/grub/fs.h (grub_hfs_init): New prototype.
16106 (grub_hfs_fini): Likewise.
f19dbdb7 16107
16108
97543f08 161092004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16110
16111 Each disk device has its own id now. This is useful to make use
16112 of multiple disk devices.
f19dbdb7 16113
97543f08 16114 * include/grub/disk.h (grub_disk_dev_id): New enum.
16115 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16116 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16117
16118 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16119 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16120
16121 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16122 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16123
16124 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16125 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16126
16127 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16128 "id" which is used by the cache manager.
16129
16130 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16131 of just "GRUB".
16132
64372eb4 161332004-08-18 Marco Gerards <metgerards@student.han.nl>
16134
16135 * fs/hfs.c: New file.
16136 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16137 (grub_emu_SOURCES): Likewise.
16138 (pkgdata_MODULES): Add hfs.mod.
16139 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16140 (grubof_SOURCES): Likewise.
16141 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16142
16143 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16144 * kern/misc.c (grub_strncasecmp): Add function.
16145
cc61b58f 161462004-08-14 Marco Gerards <metgerards@student.han.nl>
16147
16148 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16149 with parentheses.
16150
16151 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16152 (grub_ext2_dir): In case the directory entry type is unknown, read
16153 it from the inode.
16154
0ef123f6 161552004-08-02 Peter Bruin <pjbruin@dds.nl>
16156
16157 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16158 grub_load_linux instead of grub_rescue_cmd_linux as second
16159 argument of grub_rescue_register_command.
16160
16161 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16162
a447c5df 161632004-07-27 Marco Gerards <metgerards@student.han.nl>
16164
16165 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16166 function.
16167 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16168 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16169 `loader/powerpc/ieee1275/linux.c',
16170 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16171 * include/grub/powerpc/ieee1275/ieee1275.h
16172 (grub_ieee1275_release): New prototype.
16173 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16174 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16175 normal, boot, linux and linux_normal.
16176 * loader/powerpc/ieee1275/linux.c: New file.
16177 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16178
5a9e3546 161792004-07-12 Marco Gerards <metgerards@student.han.nl>
16180
16181 * normal/arg.c (grub_arg_parse): Correct error handling after
16182 reallocating the argumentlist (check if `argl' is not null instead
16183 of checking if `args' is not null).
16184 * kern/mm.c (grub_realloc): Return the same pointer when using the
16185 same region, instead of returning the header address.
16186
e15199cb 161872004-07-11 Marco Gerards <metgerards@student.han.nl>
16188
16189 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16190 one block instead of two when looking for the initial partition.
16191 (grub_partition_probe): Initialize the local variable `p' with 0.
16192 Use base 10 for the grub_strtoul call.
16193 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16194 need for one local variable.
16195 (grub_strtoul): Don't add the new value to `num', instead of that
16196 just assign it.
16197
020616c2 161982004-07-11 Marco Gerards <metgerards@student.han.nl>
16199
16200 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16201 (pxeboot_img_SOURCES): New variable.
16202 (pxeboot_img_ASFLAGS): Likewise.
16203 (pxeboot_img_LDFLAGS): Likewise.
16204 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16205 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16206 <lode_leroy@hotmail.com>.
16207
6c51eb64 162082004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16209
16210 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16211 there was no input.
16212
cfb12aff 162132004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16214
16215 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16216 the history buffer logic.
16217
6eabba74 162182004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16219
16220 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16221 (FILETYPE_INO_SYMLINK): New macros.
16222 (grub_ext2_find_file): Check if the node is a directory using the
16223 inode stat information instead of using the filetype in the
16224 dirent. Exclude the first character of an absolute symlink.
16225 (grub_ext2_dir): Mask out the filetype part of the mode member of
16226 the inode.
16227
66e19ef8 162282004-05-24 Marco Gerards <metgerards@student.han.nl>
16229
16230 Add support for UFS version 1 and 2. Add support for the minix
16231 filesystem version 1 and 2, both the variants with 14 and 30 long
16232 filenames.
f19dbdb7 16233
66e19ef8 16234 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16235 fs/minix.c.
16236 (grub_emu_SOURCES): Likewise.
16237 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16238 (ufs_mod_SOURCES): New variable.
16239 (ufs_mod_CFLAGS): Likewise.
16240 (minix_mod_SOURCES): Likewise.
16241 (minix_mod_CFLAGS): Likewise.
16242 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16243 fs/minix.c.
16244 (grubof_SOURCES): Likewise.
16245 * fs/ufs.c: New file.
16246 * fs/minix.c: New file.
16247 * include/grub/fs.h (grub_ufs_init): New prototype.
16248 (grub_ufs_fini): Likewise.
16249 (grub_minix_init): Likewise.
16250 (grub_minix_fini): Likewise.
16251 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16252 minix fs.
16253
cc2e748a 162542004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16255
16256 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16257 commands/ls.c, commands/terminal.c, commands/boot.c,
16258 commands/cmp.c and commands/cat.c.
16259 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16260
16261 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16262 "env.h"
16263
4b13b216 162642004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16265
16266 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16267 and grub_, respectively. Because the conversion is trivial and
16268 mechanical, I omit the details here. Please refer to the CVS
16269 if you need more information.
16270
6a142551 162712004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16272
16273 * include/pupa: Renamed to ...
16274 * include/grub: ... this.
16275 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16276 * util/i386/pc/grub-mkimage.c: ... this.
16277 * util/i386/pc/pupa-setup.c: Renamed to ...
16278 * util/i386/pc/grub-setup.c: ... this.
16279 * util/pupa-emu.c: Renamed to ...
16280 * util/grub-emu.c: ... this.
16281
e56cdf21 162822004-03-29 Marco Gerards <metgerards@student.han.nl>
16283
16284 Add support for the newworld apple macintosh (PPC). This has been
16285 tested on the powerbook 2000 only. It only adds support for
16286 generic ieee1275 functions, console and disk support. This should
16287 be easy to port to other architectures with support for Open
16288 Firmware.
f19dbdb7 16289
e56cdf21 16290 * configure.ac: Accept the powerpc as host_cpu. In the case of
16291 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16292 specific tests are only executed while building for the i386.
16293 Inverse test for crosscompile.
16294 * genmk.rb (Utility): Allow assembler files.
16295 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16296 * conf/powerpc-ieee1275.rmk: New file.
16297 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16298 * disk/powerpc/ieee1275/partition.c: Likewise.
16299 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16300 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16301 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16302 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16303 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16304 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16305 * include/pupa/powerpc/ieee1275/loader.h
16306 * include/pupa/powerpc/setjmp.h: Likewise.
16307 * include/pupa/powerpc/types.h: Likewise.
16308 * kern/powerpc/ieee1275/init.c: Likewise.
16309 * kern/powerpc/ieee1275/openfw.c: Likewise.
16310 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16311
16312 These files were written by Johan Rydberg
16313 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 16314
e56cdf21 16315 * boot/powerpc/ieee1275/cmain.c: New file.
16316 * boot/powerpc/ieee1275/crt0.S: Likewise.
16317 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16318 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16319
8c8cc205 163202004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16321
16322 * Makefile.in: Update copyright.
16323 * genmodsrc.sh: Likewise.
16324 * gensymlist.sh: Likewise.
16325 * term/i386/pc/vga.c: Indent correctly.
16326
16327 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16328 bugreporting address.
16329 * util/i386/pc/pupa-setup.c (usage): Likewise,
16330 (main): Call pupa_ext2_init and pupa_ext2_fini.
16331
f19dbdb7 16332 * fs/fat.c (log2): Renamed to ...
8c8cc205 16333 (fat_log2): ... this.
16334 All callers changed.
16335 * kern/misc.c (memcpy): Alias to pupa_memmove.
16336 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16337 lvalue cast.
16338 * util/console.c (pupa_ncurses_fini): Return 0.
16339
16340 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16341 Move fail label here.
16342 [__GNU__]: Don't warn when using stat.
16343 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16344 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16345 long int. Use strtol instead of strtoul.
f19dbdb7 16346
db1771cf 163472004-03-14 Marco Gerards <metgerards@student.han.nl>
16348
16349 * commands/boot.c: New file.
16350 * commands/cat.c: Likewise.
16351 * commands/cmp.c: Likewise.
16352 * commands/ls.c: Likewise.
16353 * commands/terminal.c: Likewise.
16354 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16355 (pupa_register_command): Changed interface to match the new
16356 argument parser.
16357 (pupa_command_execute): Changed (almost rewritten) so it uses
16358 pupa_split_command. Added support for setting variables using the
16359 syntax `foo=bar'.
16360 (rescue_command): Changed to work with the new argument parser.
16361 (terminal_command): Moved from here to commands/terminal.c.
16362 (set_command): New function.
16363 (unset_command): New function.
16364 (insmod_command): New function.
16365 (rmmod_command): New function.
16366 (lsmod_command): New function.
16367 (pupa_command_init): Don't initialize the command terminal
16368 anymore. Initialize the commands set, unset, insmod, rmmod and
16369 lsmod.
16370 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16371 (kernel_img_HEADERS): Add arg.h and env.h.
16372 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16373 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16374 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16375 normal/arg.c.
16376 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16377 terminal.mod.
16378 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16379 (boot_mod_SOURCES): New variable.
16380 (terminal_mod_SOURCES): Likewise.
16381 (ls_mod_SOURCES): Likewise.
16382 (cmp_mod_SOURCES): Likewise.
16383 (cat_mod_SOURCES): Likewise.
16384
16385 * normal/arg.c: New file.
16386 * kern/env.c: Likewise.
16387 * include/pupa/arg.h: Likewise.
16388 * include/pupa/env.h: Likewise.
16389 * font/manager.c (font_command): Changed to match argument parsing
16390 interface changes.
16391 (PUPA_MOD_INIT): Likewise.
16392 * hello/hello.c (pupa_cmd_hello): Likewise.
16393 (PUPA_MOD_INIT): Likewise.
16394 * include/pupa/disk.h: Include <pupa/device.h>.
16395 (pupa_print_partinfo): New prototype.
16396 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16397 (pupa_dl_get_prefix): Likewise.
16398 * include/pupa/misc.h: Include <pupa/err.h>.
16399 (pupa_isgraph): New prototype.
16400 (pupa_isdigit): Likewise.
16401 (pupa_split_cmdline): Likewise.
16402 * include/pupa/normal.h: Include <pupa/arg.h>.
16403 (pupa_command): Changed the prototype of the member `func' to
16404 match the argument parsing interface. Added member `options'.
16405 (pupa_register_command): Updated to match function.
16406 (pupa_arg_parse): New prototype.
16407 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16408 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16409 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16410 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16411 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16412 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16413 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16414 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16415 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16416 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16417 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16418 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16419 * kern/disk.c: Include <pupa/file.h>.
16420 (pupa_print_partinfo): New function.
16421 * kern/dl.c: Include <pupa/env.h>.
16422 (pupa_dl_dir): Variable removed.
16423 (pupa_dl_load): Use the environment variable `prefix' instead of
16424 the variable pupa_dl_dir.
16425 (pupa_dl_set_prefix): Function removed.
16426 (pupa_dl_get_prefix): Likewise.
16427 * kern/i386/pc/init.c: Include <pupa/env.h>.
16428 (pupa_machine_init): Use the environment variable `prefix' instead of
16429 using pupa_dl_set_prefix to set the prefix.
16430 * kern/main.c: Include <pupa/env.h>.
16431 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16432 using pupa_dl_get_prefix to get the prefix.
16433 * kern/misc.c: Include <pupa/env.h>.
16434 (pupa_isdigit): New function.
16435 (pupa_isgraph): Likewise.
16436 (pupa_ftoa): Likewise.
16437 (pupa_vsprintf): Added support for printing values of the type
16438 `double'. Make it possible to format variable output when using
16439 formatting like `%1.2%f'.
16440 (pupa_split_cmdline): New function.
16441 * kern/rescue.c: Include <pupa/env.h>.
16442 (next_word): Removed function.
16443 (pupa_rescue_cmd_prefix): Likewise.
16444 (pupa_rescue_cmd_set): New function.
16445 (pupa_rescue_cmd_unset): New function.
16446 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16447 split the command line instead of splitting it here. Added
16448 support for setting variables using the syntax `foo=bar'. Don't
16449 initialize the prefix command anymore. Initialized the set and
16450 unset commands.
16451 * normal/cmdline.c: Include <pupa/env.h>.
16452 (pupa_tab_complete): Added prototypes for print_simple_completion,
16453 print_partition_completion, add_completion, iterate_commands,
16454 iterate_dev, iterate_part and iterate_dir. Moved code to print
16455 partition information from here to kern/disk.c.
fe6b695a 16456 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 16457 * normal/main.c: Include <pupa/env.h>.
16458 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16459 instead of using pupa_dl_get_prefix to get the prefix.
16460 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16461 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16462 warning.
16463 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16464 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16465 ((unused))' to silence a gcc warning.
16466 (pupa_vga_setcolor): Likewise.
16467 (debug_command): Changed to match argument parsing
16468 interface changes.
16469 * util/pupa-emu.c: Include <pupa/env.h>.
16470 (options): Added 0's for unused fields to silence a gcc warning.
16471 (argp): Likewise.
16472 (main): Use the environment variable `prefix' instead of using
16473 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16474 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16475 and terminal.
16476
16477 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16478 * util/misc.c: Include <malloc.h>.
16479 (pupa_malloc): Rewritten so errors are correctly reported.
16480 (pupa_realloc): Likewise.
16481 (pupa_memalign): Likewise.
16482 (pupa_mm_init_region): Declare unused variables with
16483 `__attribute__ ((unused))' to silence a gcc warning.
16484 * normal/i386/setjmp.S: Remove tab at the end of the file to
16485 silence a gcc warning.
16486 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16487 variables with `__attribute__ ((unused))' to silence a gcc
16488 warning.
16489 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16490 local variable i unsigned to silence a gcc warning.
16491
16492 * kern/term.c: Include <pupa/misc.h>.
16493 (pupa_more_lines): New variable.
16494 (pupa_more): Likewise.
16495 (pupa_putcode): When the pager is active pause at the end of every
16496 screen.
16497 (pupa_set_more): New function.
16498 * include/pupa/term.h (pupa_set_more): New prototype.
16499
16500
3b1139cb 165012004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16502
16503 Now this project is GRUB 2 rather than PUPA. The location of
16504 the CVS repository was moved to GRUB's.
f19dbdb7 16505
3b1139cb 16506 * configure.ac: Use bug-grub as the reporting address.
16507 Use GRUB instead of PUPA.
16508 Change the version number to 1.90.
16509
8367695c 165102004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16511
16512 * genkernsyms.sh: Updated copyright information.
16513 * genmk.rb: Likewise.
16514 * genmodsrc.sh: Likewise.
16515 * gensymlist.sh: Likewise.
16516 * boot/i386/pc/boot.S: Likewise.
16517 * boot/i386/pc/diskboot.S: Likewise.
16518 * disk/i386/pc/biosdisk.c: Likewise.
16519 * disk/i386/pc/partition.c: Likewise.
16520 * font/manager.c: Likewise.
16521 * fs/ext2.c: Likewise.
16522 * fs/fat.c: Likewise.
16523 * include/pupa/boot.h: Likewise.
16524 * include/pupa/device.h: Likewise.
16525 * include/pupa/disk.h: Likewise.
16526 * include/pupa/dl.h: Likewise.
16527 * include/pupa/elf.h: Likewise.
16528 * include/pupa/err.h: Likewise.
16529 * include/pupa/file.h: Likewise.
16530 * include/pupa/font.h: Likewise.
16531 * include/pupa/fs.h: Likewise.
16532 * include/pupa/kernel.h: Likewise.
16533 * include/pupa/loader.h: Likewise.
16534 * include/pupa/misc.h: Likewise.
16535 * include/pupa/mm.h: Likewise.
16536 * include/pupa/net.h: Likewise.
16537 * include/pupa/normal.h: Likewise.
16538 * include/pupa/rescue.h: Likewise.
16539 * include/pupa/setjmp.h: Likewise.
16540 * include/pupa/symbol.h: Likewise.
16541 * include/pupa/term.h: Likewise.
16542 * include/pupa/types.h: Likewise.
16543 * include/pupa/i386/setjmp.h: Likewise.
16544 * include/pupa/i386/types.h: Likewise.
16545 * include/pupa/i386/pc/biosdisk.h: Likewise.
16546 * include/pupa/i386/pc/boot.h: Likewise.
16547 * include/pupa/i386/pc/console.h: Likewise.
16548 * include/pupa/i386/pc/init.h: Likewise.
16549 * include/pupa/i386/pc/kernel.h: Likewise.
16550 * include/pupa/i386/pc/linux.h: Likewise.
16551 * include/pupa/i386/pc/loader.h: Likewise.
16552 * include/pupa/i386/pc/memory.h: Likewise.
16553 * include/pupa/i386/pc/multiboot.h: Likewise.
16554 * include/pupa/i386/pc/partition.h: Likewise.
16555 * include/pupa/i386/pc/time.h: Likewise.
16556 * include/pupa/i386/pc/vga.h: Likewise.
16557 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16558 * include/pupa/util/getroot.h: Likewise.
16559 * include/pupa/util/misc.h: Likewise.
16560 * include/pupa/util/resolve.h: Likewise.
16561 * kern/device.c: Likewise.
16562 * kern/disk.c: Likewise.
16563 * kern/dl.c: Likewise.
16564 * kern/err.c: Likewise.
16565 * kern/file.c: Likewise.
16566 * kern/fs.c: Likewise.
16567 * kern/loader.c: Likewise.
16568 * kern/main.c: Likewise.
16569 * kern/misc.c: Likewise.
16570 * kern/mm.c: Likewise.
16571 * kern/rescue.c: Likewise.
16572 * kern/term.c: Likewise.
16573 * kern/i386/dl.c: Likewise.
16574 * kern/i386/pc/init.c: Likewise.
16575 * kern/i386/pc/lzo1x.S: Likewise.
16576 * kern/i386/pc/startup.S: Likewise.
16577 * loader/i386/pc/chainloader.c: Likewise.
16578 * loader/i386/pc/linux.c: Likewise.
16579 * loader/i386/pc/multiboot.c: Likewise.
16580 * normal/cmdline.c: Likewise.
16581 * normal/command.c: Likewise.
16582 * normal/main.c: Likewise.
16583 * normal/menu.c: Likewise.
16584 * normal/i386/setjmp.S: Likewise.
16585 * term/i386/pc/console.c: Likewise.
16586 * term/i386/pc/vga.c: Likewise.
16587 * util/console.c: Likewise.
16588 * util/genmoddep.c: Likewise.
16589 * util/misc.c: Likewise.
16590 * util/pupa-emu.c: Likewise.
16591 * util/resolve.c: Likewise.
16592 * util/unifont2pff.rb: Likewise.
16593 * util/i386/pc/biosdisk.c: Likewise.
16594 * util/i386/pc/getroot.c: Likewise.
16595 * util/i386/pc/pupa-mkimage.c: Likewise.
16596 * util/i386/pc/pupa-setup.c: Likewise.
16597
e6eced71 165982004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16599
16600 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16601 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16602 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16603 reading and reset it after reading.
16604 (pupa_ext2_close): Return PUPA_ERR_NONE.
16605
16606 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16607 Correct value.
16608 (struct linux_kernel_header): Add kernel_version and
16609 initrd_addr_max.
16610 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16611 pupa_file_read succeeds.
16612 (pupa_rescue_cmd_initrd): Implement.
16613
5aded270 166142003-12-03 Marco Gerards <metgerards@student.han.nl>
16615
16616 * fs/ext2.c (pupa_ext2_label): New function.
16617 (pupa_ext2_fs): Added label.
16618 * fs/fat.c (pupa_fat_label): New function.
16619 (pupa_fat_fs): Added label.
16620 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16621
16622 * kern/misc.c (pupa_strndup): New function.
16623 * include/pupa/misc.h (pupa_strndup): New prototype.
16624
16625 * include/pupa/normal.h: Include <pupa/err.h>.
16626 (pupa_set_history): New prototype.
16627 (pupa_iterate_commands): New prototype.
16628 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16629 <pupa/disk.h>, <pupa/file.h>.
16630 (hist_size): New variable.
16631 (hist_lines): Likewise.
16632 (hist_end): Likewise.
16633 (hist_used): Likewise.
16634 (pupa_set_history): New function.
16635 (pupa_history_get): Likewise.
16636 (pupa_history_add): Likewise.
16637 (pupa_history_replace): Likewise.
16638 (pupa_tab_complete): Likewise.
16639 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16640 completion shows partitionnames while completing partitions, this
16641 feature was suggested by Jeff Bailey.
16642 * normal/command.c (pupa_iterate_commands): New function.
16643 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16644 (pupa_normal_init): Initialize history buffer.
16645 (PUPA_MOD_INIT): Likewise.
16646 (pupa_normal_fini): Free the history buffer.
16647 (PUPA_MOD_FINI): Likewise.
16648
16649 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16650 key.
16651
16652 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16653 * configure.ac [i386]: Check for regparam bug.
16654 (NESTED_FUNC_ATTR) [! i386]: Defined.
16655
1f7315a3 166562003-11-17 Marco Gerards <metgerards@student.han.nl>
16657
16658 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16659 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16660 (pupa_emu_SOURCES): New variable.
16661 (pupa_emu_LDFLAGS): Likewise.
16662 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16663 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16664 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16665 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16666 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16667 (pupa_jmp_buf): New typedef.
16668 (pupa_setjmp) [PUPA_UTIL]: New macro.
16669 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16670 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16671 (pupa_refresh): New prototype.
16672 * include/pupa/util/getroot.h: New file.
16673 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16674 it.
16675 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16676 (pupa_rescue_cmd_cat): Likewise.
16677 (pupa_rescue_cmd_ls): Likewise.
16678 (pupa_rescue_cmd_testload): Likewise.
16679 (pupa_rescue_cmd_lsmod): Likewise.
16680 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16681 * normal/menu.c (run_menu): Likewise.
16682 * kern/term.c (pupa_cls): Likewise.
16683 (pupa_refresh): New function.
16684 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16685 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16686 * util/console.c: New file.
f19dbdb7 16687
1f7315a3 16688 * util/i386/pc/getroot.c: New file.
16689 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16690 (pupa_putchar): New function.
16691 (pupa_refresh): Likewise.
16692 (xgetcwd): Function moved to ...
16693 (strip_extra_slashes): Likewise.
16694 (get_prefix): Likewise.
f19dbdb7 16695 * util/i386/pc/getroot.c: ... here.
1f7315a3 16696 (find_root_device): Function moved and renamed to...
16697 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16698 Changed all callers.
16699 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16700 and renamed to...
16701 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16702 Changed all callers.
16703 * util/misc.c (pupa_memalign): New function.
16704 (pupa_mm_init_region): Likewise.
16705 (pupa_register_exported_symbols): Likewise.
16706 (pupa_putchar): Function removed.
16707 * util/pupa-emu.c: New file.
16708
9a5c1ade 167092003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16710
16711 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16712 (_multiboot_mod_SOURCES): New variable.
16713 (_multiboot_mod_CFLAGS): Likewise.
16714 * loader/i386/pc/multiboot.c: New file.
16715 * include/pupa/i386/pc/multiboot.h: Likewise.
16716 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16717 (pupa_multiboot_real_boot): New function.
16718 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16719 (pupa_multiboot_real_boot): New prototype.
16720 (pupa_rescue_cmd_multiboot): Likewise
16721 (pupa_rescue_cmd_module): Likewise.
16722
16723 * kern/loader.c (pupa_loader_set): Continue when
16724 pupa_loader_unload_func() fails.
16725 (pupa_loader_unset): New function.
16726 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16727
16728 * kern/misc.c (pupa_stpcpy): New function.
16729 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16730
8e72a9c0 167312003-11-12 Marco Gerards <metgerards@student.han.nl>
16732
16733 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16734 for available extensions.
16735
16736 * include/pupa/i386/pc/time.h: New file.
16737 * kern/disk.c: Include <pupa/machine/time.h>.
16738 (PUPA_CACHE_TIMEOUT): New macro.
16739 (pupa_last_time): New variable.
16740 (pupa_disk_open): Flush the cache when there was a timeout.
16741 (pupa_disk_close): Reset the timer.
16742 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16743 pupa_currticks.
16744 * util/misc.c: Include <sys/times.h>
16745 (pupa_get_rtc): New function.
16746
c4adbd32 167472003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16748
16749 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16750 as blocks.
16751 (pupa_ext2_get_file_block): Use blocks member.
16752
16753 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16754 first block. Return -1 instead of pupa_errno on error.
16755
bfd30f06 167562003-10-27 Marco Gerards <metgerards@student.han.nl>
16757
16758 * README: In the pupa-mkimage example use _chain instead of chain
16759 and ext2 instead of fat.
16760 * TODO: Replace ext2fs with jfs as an example. Add an item for
16761 adding journal playback for ext2fs.
16762 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16763 (pkgdata_MODULES): Added ext2.mod.
16764 (ext2_mod_SOURCES): New variable.
16765 (ext2_mod_CFLAGS): Likewise.
16766 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16767 * include/pupa/misc.h (pupa_strncpy): New prototype.
16768 (pupa_strcat): Likewise.
16769 (pupa_strncmp): Likewise.
16770 * kern/misc.c (pupa_strcat): Enable function.
16771 (pupa_strncpy): New function.
16772 (pupa_strncmp): Likewise.
16773 * fs/ext2.c: New file.
f19dbdb7 16774
bfd30f06 16775 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16776 when the read failed before retrying.
16777 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16778 (_FILE_OFFSET_BITS): Likewise.
16779 * configure.ac: Added AC_SYS_LARGEFILE.
16780
98d15063 167812003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16782
16783 * genmk.rb (PModule#rule): Make sure to get only symbol names
16784 from the output of nm.
16785 Reported by Robert Millan <zeratul2@wanadoo.es>.
16786
18d9c7cd 167872003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16788
16789 I forgot to check in these changes for a long time. This adds
16790 incomplete support for VGA console, and this is still very
16791 buggy. Also, a lot of consideration is required for I18N,
16792 UNICODE, and VGA font issues. Therefore, assume that this is
16793 such that "better than nothing".
f19dbdb7 16794
18d9c7cd 16795 * font/manager.c: New file.
16796 * include/pupa/font.h: Likewise.
16797 * include/pupa/i386/pc/vga.h: Likewise.
16798 * term/i386/pc/vga.c: Likewise.
16799 * util/unifont2pff.rb: Likewise.
16800
16801 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16802 (pkgdata_MODULES): Added vga.mod and font.mod.
16803 (vga_mod_SOURCES): New variables.
16804 (vga_mod_CFLAGS): Likewise.
16805 (font_mod_SOURCES): Likewise.
16806 (font_mod_CFLAGS): Likewise.
16807
16808 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16809
16810 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 16811 (struct pupa_term): Added init and fini.
18d9c7cd 16812 Changed the argument of putchar to pupa_uint32_t.
16813
16814 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16815 (pupa_console_real_putchar): New prototype.
16816 (pupa_console_putchar): Removed.
16817 (pupa_console_checkkey): Exported.
16818 (pupa_console_getkey): Likewise.
16819
16820 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16821 characters.
16822
16823 * kern/term.c (pupa_term_set_current): Rewritten.
16824 (pupa_putchar): Likewise.
16825 (pupa_putcode): New function.
16826
16827 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16828 (pupa_console_real_putchar): ... this.
16829 (pupa_vga_set_mode): New function.
16830 (pupa_vga_get_font): Likewise.
16831
16832 * normal/command.c: Include pupa/term.h.
16833 (terminal_command): New function.
16834 (pupa_command_init): Register the command "terminal".
16835
16836 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16837 (DISP_UP): Likewise.
16838 (DISP_RIGHT): Likewise.
16839 (DISP_DOWN): Likewise.
16840 (DISP_HLINE): Likewise.
16841 (DISP_VLINE): Likewise.
16842 (DISP_UL): Likewise.
16843 (DISP_UR): Likewise.
16844 (DISP_LL): Likewise.
16845 (DISP_LR): Likewise.
16846
16847 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 16848
977329f5 168492003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16850
16851 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16852 FIX. Reverse the path_list.
16853
16854 * include/pupa/normal.h: Export pupa_register_command and
16855 pupa_unregister_command.
16856
16857 * hello/hello.c (pupa_cmd_hello): New module.
16858 * conf/i386-pc.rmk: Added hello.mod.
16859
1f5ab428 168602003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16861
16862 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 16863
1f5ab428 16864 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16865 (compress_kernel): New variable.
16866 (generate_image): Heavily modified to support compressing a
16867 large part of the core image.
16868
16869 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16870 leak.
16871 (pupa_util_load_image): New function.
16872
16873 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16874 (pupa_compressed_size): New variable.
16875 (codestart): Enable Gate A20 here.
16876 Decompress the compressed part of the core image.
16877 Rearrange the code to put functions and variables which are
16878 required for initialization in the non-compressed part.
16879 Include lzo1x.S.
16880
16881 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16882 here.
16883
16884 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16885
f19dbdb7 16886 * include/pupa/i386/pc/kernel.h
1f5ab428 16887 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16888 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16889 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16890 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16891 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16892
16893 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16894
16895 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16896 (Utility#rule): Likewise.
16897
16898 * configure.ac: Check if LZO is available.
16899
ce5bf700 169002003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16901
16902 * include/pupa/normal.h: New file.
16903 * include/pupa/setjmp.h: Likewise.
16904 * include/pupa/i386/setjmp.h: Likewise.
16905 * normal/cmdline.c: Likewise.
16906 * normal/command.c: Likewise.
16907 * normal/main.c: Likewise.
16908 * normal/menu.c: Likewise.
16909 * normal/i386/setjmp.S: Likewise.
f19dbdb7 16910
ce5bf700 16911 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16912 (pupa_rescue_cmd_initrd): Likewise.
16913
16914 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16915 Likewise.
16916
16917 * kern/i386/pc/startup.S (translation_table): New variable.
16918 (translate_keycode): New function.
16919 (pupa_console_getkey): Call translate_keycode.
16920
16921 * kern/rescue.c (attempt_normal_mode): New function.
16922 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16923 it failed, print a message.
16924
16925 * kern/mm.c (pupa_real_malloc): Print more information when a
16926 free magic is broken.
16927 (pupa_free): If the first free header is not free actually, set
16928 it to P.
16929
16930 * kern/main.c (pupa_load_normal_mode): Just load the module
16931 "normal".
16932 (pupa_main): Don't print the message
16933 "Entering into rescue mode..." here.
16934
16935 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16936 Declared.
16937 (pupa_rescue_cmd_initrd): Likewise.
16938 (pupa_rescue_cmd_initrd): Likewise.
16939
16940 * include/pupa/symbol.h (FUNCTION): Specify the type.
16941 (VARIABLE): Likewise.
16942
16943 * include/pupa/err.h (pupa_err_t): Added
16944 PUPA_ERR_UNKNOWN_COMMAND.
16945
16946 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16947 (pupa_dl_get_prefix): Likewise.
16948
16949 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16950 Added _chain.mod and _linux.mod instead of chain.mod and
16951 linux.mod.
16952 (chain_mod_SOURCES): Renamed to ...
16953 (_chain_mod_SOURCES): ... this.
16954 (chain_mod_CFLAGS): Renamed to ...
16955 (_chain_mod_CFLAGS): ... this.
16956 (linux_mod_SOURCES): Renamed to ...
16957 (_linux_mod_SOURCES): ... this.
16958 (linux_mod_CFLAGS): Renamed to ...
16959 (_linux_mod_CFLAGS): ... this.
16960 (normal_mod_SOURCES): New variable.
16961 (normal_mod_CFLAGS): Likewise.
16962 (normal_mod_ASFLAGS): Likewise.
16963
169642003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16965
16966 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16967 possible.
16968
fe6b695a 16969 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 16970 recursively.
16971 (pupa_dl_unref): Unrefer depending modules recursively.
16972 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16973 a module is unloaded before one depending on that module is
16974 unloaded.
16975 (pupa_dl_unload): Unload depending modules explicitly,
16976 if possible.
16977
c04da074 169782003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16979
16980 * include/pupa/i386/pc/linux.h: New file.
16981 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 16982
c04da074 16983 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16984 Removed.
16985 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16986 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16987 of PUPA_CHAINLOADER_BOOT_SECTOR.
16988
16989 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16990 (pupa_linux_prot_size): New variable.
16991 (pupa_linux_tmp_addr): Likewise.
16992 (pupa_linux_real_addr): Likewise.
16993 (pupa_linux_boot_zimage): New function.
16994 (pupa_linux_boot_bzimage): Likewise.
16995
16996 * kern/i386/pc/init.c (struct mem_region): New structure.
16997 (MAX_REGIONS): New macro.
16998 (mem_regions): New variable.
16999 (num_regions): Likewise.
17000 (pupa_os_area_addr): Likewise.
17001 (pupa_os_area_size): Likewise.
17002 (pupa_lower_mem): Likewise.
17003 (pupa_upper_mem): Likewise.
17004 (add_mem_region): New function.
17005 (compact_mem_regions): Likewise.
17006 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17007 the size of the conventional memory and that of so-called upper
17008 memory (before the first memory hole).
17009 Instead of adding each found region to free memory, use
17010 add_mem_region and add them after removing overlaps.
17011 Also, add only 1/4 of the upper memory to free memory. The rest
17012 is used for loading OS images. Maybe this is ad hoc, but this
17013 makes it much easier to relocate OS images when booting.
17014
17015 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17016 (pupa_enter_rescue_mode): Don't register initrd and module.
17017
17018 * kern/mm.c: Include pupa/dl.h.
17019
17020 * kern/main.c: Include pupa/file.h and pupa/device.h.
17021
17022 * kern/loader.c (pupa_loader_load_module_func): Removed.
17023 (pupa_loader_load_module): Likewise.
17024
17025 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17026 ``.o''.
17027
17028 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17029 (pupa_linux_tmp_addr): Likewise.
17030 (pupa_linux_real_addr): Likewise.
17031 (pupa_linux_boot_zimage): Likewise.
17032 (pupa_linux_boot_bzimage): Likewise.
17033
17034 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17035 (pupa_upper_mem): Likewise.
17036 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17037 module is too dangerous.
17038
17039 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17040 (pupa_os_area_size): Likewise.
17041 (pupa_loader_set): Remove the first argument. Loader doesn't
17042 manage modules or initrd any longer.
17043 (pupa_loader_load_module): Removed.
17044
17045 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17046 (linux_mod_SOURCES): New variable.
17047 (linux_mod_CFLAGS): Likewise.
17048
a13f9237 170492003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17050
17051 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17052 the length of a blocklist correctly.
17053
17054 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17055 Use ioctl only if the OS file is a block device.
17056 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17057 not very useful for normal files.
17058
17059 * kern/main.c (pupa_set_root_dev): New function.
17060 (pupa_load_normal_mode): Likewise.
17061 (pupa_main): Call those above.
17062
17063 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17064 pupa_uint16_t.
17065
17066 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17067
a5ffe966 170682003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17069
17070 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17071 (setup): Configure the installed partition information and the
17072 dl prefix.
17073
17074 * loader/i386/pc/chainloader.c (my_mod): New variable.
17075 (pupa_chainloader_unload): New function.
17076 (pupa_rescue_cmd_chainloader): Refer itself.
17077 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17078
17079 * kern/i386/pc/startup.S (install_partition): Removed.
17080 (version_string): Likewise.
17081 (config_file): Likewise.
17082 (pupa_install_dos_part): New variable.
17083 (pupa_install_bsd_part): Likewise.
17084 (pupa_prefix): Likewise.
17085 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17086
17087 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17088 and pupa/misc.h.
17089 (make_install_device): New function.
17090 (pupa_machine_init): Set the dl prefix.
17091
17092 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17093 (buf): Renamed to ...
17094 (linebuf): ... this.
17095 (pupa_rescue_cmd_prefix): New function.
17096 (pupa_rescue_cmd_insmod): Likewise.
17097 (pupa_rescue_cmd_rmmod): Likewise.
17098 (pupa_rescue_cmd_lsmod): Likewise.
17099 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17100 rmmod and lsmod.
17101
17102 * kern/mm.c (pupa_memalign): If failed even after invalidating
17103 disk caches, unload unneeded modules and retry.
17104
17105 * kern/misc.c (pupa_memmove): New function.
17106 (pupa_memcpy): Removed.
17107 (pupa_strcpy): New function.
17108 (pupa_itoa): Made static.
17109
17110 * kern/dl.c (pupa_dl_iterate): New function.
17111 (pupa_dl_ref): Likewise.
17112 (pupa_dl_unref): Likewise.
17113 (pupa_dl_unload): Return if succeeded or not.
17114 (pupa_dl_unload_unneeded): New function.
17115 (pupa_dl_unload_all): Likewise.
17116 (pupa_dl_init): Renamed to ...
17117 (pupa_dl_set_prefix): ... this.
17118 (pupa_dl_get_prefix): New function.
17119
17120 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17121 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17122 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17123 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17124 (pupa_install_dos_part): Declared.
17125 (pupa_install_bsd_part): Likewise.
17126 (pupa_prefix): Likewise.
17127 (pupa_boot_drive): Likewise.
17128
17129 * include/pupa/types.h: Fix a typo.
17130
17131 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17132 pupa_memmove.
17133 (pupa_memmove): Declared.
17134 (pupa_strcpy): Likewise.
17135
17136 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17137 pupa_mod_init takes one argument, its own module.
17138 (pupa_dl_unload_unneeded): Declared.
17139 (pupa_dl_unload_all): Likewise.
17140 (pupa_dl_ref): Likewise.
17141 (pupa_dl_unref): Likewise.
17142 (pupa_dl_iterate): Likewise.
17143 (pupa_dl_init): Renamed to ...
17144 (pupa_dl_set_prefix): ... this.
17145 (pupa_dl_get_prefix): Declared.
17146
17147 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 17148 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 17149 unloaded.
17150 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17151 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17152
17153 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17154 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17155
012d7999 171562003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17157
17158 * util/i386/pc/pupa-setup.c (setup): Define the internal
17159 function find_first_partition_start at the top level, because GCC
17160 3.0.x cannot compile internal functions in deeper scopes
17161 correctly.
17162 (find_root_device): Use lstat instead of stat.
17163 Don't follow symbolic links.
17164 Fix the path-constructing code.
17165
17166 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17167 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17168 by a BLKGETSIZE ioctl first, because block devices don't fill
17169 the member st_mode of the structure stat on Linux.
17170 [__linux__] (linux_find_partition): Use a temporary buffer
17171 REAL_DEV for the working space. Copy it to DEV before returning.
17172 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17173 buffer cache consistent.
17174 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17175 strncmp. The previous value was merely wrong.
17176 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17177
17178 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17179 FAT size is 12. The previous value was merely wrong.
17180
17181 * kern/main.c (pupa_main): Don't split the starting message from
17182 newlines.
17183
17184 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17185 LF, because BIOS goes crazy about character attributes in this
17186 case.
17187
1cc73a62 171882003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17189
17190 * include/i386/pc/util/biosdisk.h: New file.
17191 * util/i386/pc/biosdisk.c: Likewise.
17192 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 17193
1cc73a62 17194 * Makefile.in (INCLUDE_DISTFILES): Added
17195 include/pupa/i386/pc/util/biosdisk.h.
17196 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17197 directory util/i386/pc.
17198 (install-local): Added a rule for sbin_UTILITIES.
17199 (uninstall): Likewise.
17200
17201 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17202
17203 * util/misc.c (xrealloc): New function.
17204 (pupa_malloc): Likewise.
17205 (pupa_free): Likewise.
17206 (pupa_realloc): Likewise.
17207 (pupa_stop): Likewise.
17208 (pupa_putchar): Likewise.
17209
17210 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17211
17212 * include/pupa/util/misc.h (xrealloc): Declared.
17213
17214 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17215 macro.
17216 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17217 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17218
17219 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17220 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17221
17222 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17223 way should be implemented.
17224 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17225
17226 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17227 the size of NAME for safety.
17228 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17229 0x88.
17230
17231 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17232 (pupa_setup_SOURCES): Likewise.
17233
17234 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17235
08b70fe8 172362002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17237
17238 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17239 bunch of pushl's from pusha, because this destroys the return
17240 value.
17241
62ddcc8f 172422002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17243
17244 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17245 This means that any missing prototypes could be fatal. Also, you
17246 must take care when writing assembly code. See the comments at
17247 the beginning of startup.S, for more details.
f19dbdb7 17248
62ddcc8f 17249 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17250 compilation mechanism.
17251 (pupa_chainloader_real_boot): Likewise.
17252 (pupa_biosdisk_rw_int13_extensions): Likewise.
17253 (pupa_biosdisk_rw_standard): Likewise.
17254 (pupa_biosdisk_check_int13_extensions): Likewise.
17255 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17256 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17257 (pupa_get_memsize): Likewise.
17258 (pupa_get_mmap_entry): Likewise.
17259 (pupa_console_putchar): Likewise.
17260 (pupa_console_setcursor): Likewise.
17261 (pupa_getrtsecs): Use pushl instead of push.
17262
17263 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17264 memory instead of the stack for a mmap entry, because some
17265 BIOSes may ignore the maximum size and overflow.
17266
17267 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17268
17269 * genmk.rb (PModule#rule): Compile automatically generated
17270 sources with module-specific CFLAGS as well as other sources.
17271
9962ed99 172722002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17273
17274 * configure.ac: Check ld.
17275 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17276 respectively, before checking endianness and sizes.
17277
17278 * Makefile.in (LD): New variable.
f19dbdb7 17279
abdfc3c5 172802002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17281
17282 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17283
6a161fa9 172842002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17285
17286 * Changelog: New file.
17287