]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-06-11 Felix Zielcke <fzielcke@z-51.de>
[grub2.git] / ChangeLog
CommitLineData
25ad2323 12009-06-11 Felix Zielcke <fzielcke@z-51.de>
2
3 * util/grub.d/30_os-prober.in: Fix a comment. Source
4 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
5 to set the root device. Place drivemap command in the generated
6 chain entry.
7
e65acb0c 82009-06-11 Pavel Roskin <proski@gnu.org>
9
10 * configure.ac: Remove host_m32. Issues with 64-bit utilities
11 have long been resolved.
12
f285fe2d 132009-06-11 Colin Watson <cjwatson@ubuntu.com>
14
bd47b0b5 15 * util/grub.d/10_linux.in: Capitalise "Linux".
16
f285fe2d 17 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
18
a0c62e4e 192009-06-11 Pavel Roskin <proski@gnu.org>
20
b6783cb2 21 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
22 fix a gcc warning and ensure that the function won't ever exit.
23
dde032e8 24 * kern/i386/ieee1275/init.c: Add missing prototype for
25 grub_stop_floppy().
26
22cd079d 27 * loader/ieee1275/multiboot2.c [__i386__]: Include
28 grub/cpu/multiboot.h.
29
a0c62e4e 30 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
31 casts to short - they are not portable and cause warnings. Fix
32 use of uninitialized values in input_buf. Use ARRAY_SIZE.
33
63963d17 342009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
35
36 Drivemap fixes
37
38 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
39 new function
40 (grub_get_root_biosnumber_saved): new variable
41 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
42 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 43 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 44 %dx after the call if necessary
45 * conf/common.rmk (pkglib_MODULES): remove boot.mod
46 (boot_mod_SOURCES): remove
47 (boot_mod_CFLAGS): remove
48 (boot_mod_LDFLAGS): remove
49 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
50 (boot_mod_SOURCES): new variable
51 (boot_mod_CFLAGS): likewise
52 (boot_mod_LDFLAGS): likewise
53 * conf/i386-efi.rmk: likewise
54 * conf/i386-ieee1275.rmk: likewise
55 * conf/i386-pc.rmk: likewise
56 * conf/powerpc-ieee1275.rmk: likewise
57 * conf/sparc64-ieee1275.rmk: likewise
58 * conf/x86_64-efi.rmk: likewise
59 * include/grub/i386/pc/biosnum.h: new file
60 * lib/i386/pc/biosnum.c: likewise
61 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
62 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
63 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 64
25ad2323 65>>>>>>> .r2306
33abf7ae 662009-06-10 Pavel Roskin <proski@gnu.org>
67
5ac35b35 68 * io/gzio.c (test_header): Don't reuse one buffer for all data.
69 Use separate variables. Read only the file size at the end, but
70 not the checksum that we don't use.
71
5c5215d5 72 * kern/file.c (grub_file_read): Use void pointer for the buffer.
73 Adjust all callers.
74
27d5fef7 75 * kern/ieee1275/openfw.c: Remove libc includes.
76 * kern/ieee1275/cmain.c: Likewise.
77 * include/grub/ieee1275/ieee1275.h: Likewise.
78
33abf7ae 79 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
80 compiler warnings.
81
d2d49665 822009-06-10 Felix Zielcke <fzielcke@z-51.de>
83
84 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
85 `genparttoollist.sh'.
86 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
87 Add `*.sh' to the list find searches for and change `mdate.sh'
88 to `mdate-sh'.
89
fe052e37 902009-06-10 Pavel Roskin <proski@gnu.org>
91
2763ac18 92 * include/grub/multiboot2.h: Provide compatibility defines for
93 multiboot2.h.
94 * include/multiboot2.h: Include stdint.h only if needed, using
95 angle brackets.
96 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
97 grub/multiboot2.h.
98 * loader/ieee1275/multiboot2.c: Likewise.
99 * loader/multiboot2.c: Likewise.
100 * loader/multiboot_loader.c: Likewise.
101
437e6adc 102 * configure.ac: Use -nostdlib when probing for the target. It
103 should not be required to have libc for the target.
104
06a6836c 105 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
106 they fail without libc headers for the target.
107 * include/grub/powerpc/libgcc.h: Use weak attribute for all
108 exports.
109 * include/grub/sparc64/libgcc.h: Likewise. Don't use
110 preprocessor conditionals.
111
fe052e37 112 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
113 build system doesn't need to be aware of the tar.c internals.
114
afd22553 1152009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 116
afd22553 117 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 118
6b787c4f 1192009-06-09 Robert Millan <rmh.grub@aybabtu.com>
120
121 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
122 disk limit to 26 for IDE, Virtio, Xen and SCSI.
123
1242009-06-09 Felix Zielcke <fzielcke@z-51.de>
125
126 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 127 aren't available if ata.mod gets used.
6b787c4f 128
473d1e45 1292009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 130
473d1e45 131 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 132 initialising controller.
473d1e45 133 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 134
255a27d4 1352009-06-08 Felix Zielcke <fzielcke@z-51.de>
136
137 * util/i386/pc/grub-install.in: Add a parameter --disk-module
138 to choose between ata and biosdisk module on i386-pc.
139
473d1e45 1402009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 141
d55842d8 142 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
143 Subclass and Programming Interface fields in terms of the 3 byte
144 Class Code register.
145 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
146
fa5db0b1 147 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
148 interface is OHCI. Add grub_dprintf for symmetry with
149 bus/usb/uhci.c.
150 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
151 interface is UHCI. Add interf variable for programming
152 interface. Print interface with class/subclass.
153
c0947beb 154 * bus/usb/ohci.c: Set interf with correct field.
155
69da8877 156 * bus/usb/uhci.c: Remove unneeded doubled lines.
157 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
158 Remove whitespace inside comment.
159
9e172e30 1602009-06-08 Robert Millan <rmh.grub@aybabtu.com>
161
162 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
163 as fallback an equivalent option without depth.
164
de65ee2b 1652009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
166
167 Not fail if unable to retrieve C/H/S on LBA disks
168
473d1e45 169 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 170 if unable to retrieve C/H/S on LBA disks
171
b57ea2c9 1722009-06-08 Pavel Roskin <proski@gnu.org>
173
174 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
175 about aliasing.
176
af361263 1772009-06-08 Felix Zielcke <fzielcke@z-51.de>
178
179 * Makefile.in (uninstall): Remove all $lib_DATA files.
180
4c9ec6b3 1812009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
182
183 Bugfix: install on partitionless device
184
185 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
186 is a whole disk
187
e76fc924 1882009-06-08 Felix Zielcke <fzielcke@z-51.de>
189
190 * Makefile.in (uninstall): Remove all $include_DATA files.
191
ba5a0d05 1922009-06-08 Felix Zielcke <fzielcke@z-51.de>
193
194 * commands/true.c: New file. Implement the true and false commands.
195 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
196 (true_mod_SOURCES): New variable.
197 (true_mod_CFLAGS): Likewise.
198 (true_mod_LDFLAGS): Likewise.
199
c8048e32 2002009-06-05 Colin D Bennett <colin@gibibit.com>
201
202 Optimized font character lookup using binary search instead of linear
203 search. Fonts now are required to have the character index ordered by
204 code point.
205
206 * font/font.c (load_font_index): Verify that fonts have ordered
207 character indices.
208 (find_glyph): Use binary search instead of linear search to find a
209 character in a font.
210
408305be 2112009-06-05 Michael Scherer <misc@mandriva.org>
212
213 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
214 uses case sensitive btree.
215 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
216 only for case insensitive filesystems.
217
8ee1e0d9 2182009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
219
220 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
221 * conf/common.rmk (search_mod_CFLAGS): likewise
222
a9966eb1 2232009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
224
473d1e45 225 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 226 compensate a compiler bug
227
9e7100fb 2282009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
229
473d1e45 230 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 231 instead of '\b'
473d1e45 232
ede21d71 2332009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
234
235 Definitions for creating asm symbols with Apple's CC
236
237 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
238 [APPLE_CC] (VARIABLE): likewise
239
9dbf7653 2402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
241
242 Disable lnxboot.img when compiled
243 with Apple's CC
244
245 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
246 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
247 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
248 [! APPLE_CC] (CODE_LENG): skip
249 [! APPLE_CC] (setup_sects): likewise
250 [! APPLE_CC]: skip filling
473d1e45 251
e93cdc3d 2522009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
253
254 Address in trampolines based on 32-bit registers when compiled
255 with Apple's CC
256
473d1e45 257 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 258 for addresses
259 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
260
6c688477 2612009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
262
263 Avoid aliases when compiling with Apple's CC for PCBIOS machine
264
265 * kern/misc.c [APPLE_CC] (memcpy): new function
266 [APPLE_CC] (memmove): likewise
267 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 268 (memcpy): define alias conditionally on !APPLE_CC
6c688477 269 (memset): likewise
270 (abort): likewise
271 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
272 APPLE_CC are defined
273 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
274 (grub_assert_fail): make prototype conditional
275
e37ffc5c 2762009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
277
278 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
279
473d1e45 280 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
281 grub-macho2img
e37ffc5c 282 (CLEANFILES): add grub-macho2img
283 (grub_macho2img_SOURCES): new variable
284 * kern/i386/pc/startup.S (bss_start): new variable
285 (bss_end): likewise
286 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
287 * util/grub-macho2img.c: new file
288
cf00df31 2892009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
290
291 Use objconv when compiling with Apple's CC
292
293 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
294 (efiemu64.o): likewise
295 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
296 when compiling with Apple's CC
297 (efiemu64_s.o): likewise
298 * configure.ac: check for objconv when compiling with Apple's CC
299 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 300
d119a20c 3012009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
302
303 Define segment as well as section when compiling with
304 Apple's CC
305
306 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
307 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
308 (efiemu_convert_pointer): likewise
309 (efiemu_set_virtual_address_map): likewise
310 (efiemu_convert_pointer): likewise
311 (efiemu_getcrc32): likewise
312 (init_crc32_table): likewise
313 (reflect): likewise
314 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
315 (GRUB_MOD_DEP): likewise
473d1e45 316
c8600122 3172009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
318
319 Allow a compilation without -mcmodel=large
320
321 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
322 when compiled without -mcmodel=large
473d1e45 323 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 324 without -mcmodel=large
473d1e45 325 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 326 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 327
e8df1d4e 3282009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
329
330 Remove nested functions in efiemu core
331
332 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 333
cc6c3ac1 3342009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
335
336 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
337
338 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
339 temporary storage
473d1e45 340 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
341 using Apple's CC
cc6c3ac1 342 (grub_cpu_is_tsc_supported): likewise
343 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 344
3e325901 3452009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
346
347 Absolute addressing through constant with Apple's cc
348
349 * kern/i386/pc/startup.S: Define necessary constants
350 and address through it when using ABS with Apple's CC
351 * boot/i386/pc/diskboot.S: likewise
352 * boot/i386/pc/boot.S: likewise
353 * boot/i386/pc/lnxboot.S: likewise
354 * boot/i386/pc/cdboot.S: likewise
355 * mmap/i386/pc/mmap_helper.S: likewise
356 * commands/i386/pc/drivemap_int13h.S: likewise
357
2b167a72 3582009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
359
360 Check if compiler is apple cc
361
362 * Makefile.in (ASFLAGS): new variable
363 (TARGET_ASFLAGS): likewise
364 (TARGET_MODULE_FORMAT): likewise
365 (TARGET_APPLE_CC): likewise
366 (OBJCONV): likewise
367 (TARGET_IMG_CFLAGS): likewise
368 (TARGET_CPPFLAGS): add includedir
369 * configure.ac: call grub_apple_cc and grub_apple_target_cc
370 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
371 Check for linker script only if compiler isn't Apple's CC
372 (TARGET_MODULE_FORMAT): set
373 (TARGET_APPLE_CC): likewise
374 (TARGET_ASFLAGS): likewise
375 (ASFLAGS): likewise
376 Check for objcopy only if compiler isn't Apple's CC
377 Check for BSS symbol only if compiler isn't Apple's CC
378 * genmk.rb: adapt nm options if we use Apple's utils
379 * aclocal.m4 (grub_apple_cc): new test
380 (grub_apple_target_cc): likewise
473d1e45 381
fb14123e 3822009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
383
384 Simplify sed expressions and improve awk
385
386 * Makefile.in (install-local): simplify sed expression
387 * gencmdlist.sh: likewise
388 * genmoddep.awk: avoid adding module as a dependency of itself
389
5b889789 3902009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
391
392 Add missing start symbols
393
394 * boot/i386/pc/boot.S: add start
fb14123e 395 * boot/i386/pc/pxeboot.S: likewise
473d1e45 396
fd2bf2e3 3972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
398
399 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 400
401 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 402 (relocate_addresses): consider both r_addend and value at offset
403 (make_mods_section): zerofill modinfo and header
404 (convert_elf): write prefix here
473d1e45 405
5389763d 4062009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
407
408 Use .asciz instead of .string
409
410 * i386/pc/diskboot.S: use .asciz instead of .string
411 * i386/pc/boot.S: likewise
412 * include/grub/dl.h (GRUB_MOD_DEP): likewise
413 (GRUB_MOD_NAME): likewise
473d1e45 414
3eb5ed4e 4152009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
416
417 gfxpayload support
418
419 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
420 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
421 (grub_video_setup): remove
422 (grub_video_set_mode): new prototype
423 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
424 (vid_mode): remove
425 (linux_vesafb_res): compile only on PCBIOS
426 (grub_linux_boot): support gfxpayload
427 * loader/i386/pc/xnu.c (video_hook): new function
428 (grub_xnu_set_video): support gfxpayload
429 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
430 (DEFAULT_VIDEO_HEIGHT): likewise
431 (DEFAULT_VIDEO_FLAGS): likewise
432 (DEFAULT_VIDEO_MODE): new definition
433 (video_hook): new function
434 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 435 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 436 loading xnu
437 * video/video.c (grub_video_setup): removed
473d1e45 438 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 439 grub_video_setup
440
4b0e1143 4412009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
442
443 Avoid calling biosdisk in drivemap
444
445 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
446 (revparse_biosdisk): likewise
447 (list_mappings): derive name from id directly
448 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 449
fda6cb98 4502009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
451
452 Script fixes
453
454 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
455 (grub_lexer_param): add tokenonhold
456 (grub_script_create_cmdline): remove cmdline. All callers updated
457 (grub_script_function_create): make functionname
458 grub_script_arg. All callers updated
459 (grub_script_execute_argument_to_string): new prototype
460 * kern/parser.c (state_transitions): reorder
461 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 462 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 463 make global
464 (grub_script_execute_cmdline): use new format
465 * script/sh/function.c (grub_script_function_create): make functionname
466 grub_script_arg. All callers updated
473d1e45 467 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 468 (grub_script_yylex): remove
469 (grub_script_yylex2): renamed to ...
470 (grub_script_yylex): ...renamed
471 parse the expressions like a${b}c
472 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
473 (GRUB_PARSER_TOKEN_VAR): remove
474 (GRUB_PARSER_TOKEN_NAME): likewise
475 ("if"): declare as typeless
476 ("while"): likewise
477 ("function"): likewise
478 ("else"): likewise
479 ("then"): likewise
480 ("fi"): likewise
481 (text): remove
482 (argument): likewise
483 (script): accept empty scripts and make exit on error
484 (arguments): use GRUB_PARSER_TOKEN_ARG
485 (function): likewise
486 (command): move error handling to script
487 (menuentry): move grub_script_lexer_ref before
473d1e45 488 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 489 argument. All callers updated
490
f4448a07 4912009-06-04 Robert Millan <rmh.grub@aybabtu.com>
492
493 Prevent GRUB from probing floppies during boot.
494
495 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
496 * commands/search.c (options): Add --no-floppy.
497 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
498 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
499 --no-floppy when searching for UUIDs.
500
2bf5885a 5012009-06-04 Robert Millan <rmh.grub@aybabtu.com>
502
503 Simplify the code duplication in commands/search.c.
504
505 * commands/search.c (search_label, search_fs_uuid): Merge into ...
506 (search_fs): ... this. Update all users.
507
f6fd460a 5082009-06-03 Felix Zielcke <fzielcke@z-51.de>
509
510 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
511
cbb3c83e 5122009-05-28 Pavel Roskin <proski@gnu.org>
513
57788cfd 514 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
515 Remove the original symlink explicitly.
516
cbb3c83e 517 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
518 just one slash. That's how grub_fshelp_find_file() does it.
519
cd0d5e30 5202009-05-26 Pavel Roskin <proski@gnu.org>
521
f0f8bbe2 522 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
523 to `str'.
524
cd0d5e30 525 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
526 possibly unused.
527
8c2cab51 5282009-05-25 Christian Franke <franke@computer.org>
529
530 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
531 register.
532 (grub_atapi_identify): Add wait after drive select.
533 (grub_ata_identify): Do more strict status register check before
534 calling grub_atapi_identify (). Suppress error message if status
535 register is 0x00 after command failure. Add status register
536 check after PIO read to avoid bogus identify due to stuck DRQ.
537 Thanks to Pavel Roskin for testing.
538 (grub_device_initialize): Remove unsafe status register check.
539 Thanks to 'phcoder' for problem report and patch.
540 Prevent sign extension in debug message.
541
230c0ad6 5422009-05-23 Colin D Bennett <colin@gibibit.com>
543
544 Cleaned up `include/grub/normal.h'. Grouped prototypes by
545 definition file, and functions defined in `normal/menu.c' have had
546 their prototypes moved to `include/grub/menu.h' for consistency.
547
548 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
549 from normal.h.
550 (grub_menu_get_entry): Likewise.
551 (grub_menu_get_timeout): Likewise.
552 (grub_menu_set_timeout): Likewise.
553 (grub_menu_execute_entry): Likewise.
554 (grub_menu_execute_with_fallback): Likewise.
555 (grub_menu_entry_run): Likewise.
556
557 * include/grub/normal.h: Re-ordered and grouped function
558 prototypes by file that the function is defined in.
559 (grub_menu_execute_callback): Removed; moved to menu.h.
560 (grub_menu_get_entry): Likewise.
561 (grub_menu_get_timeout): Likewise.
562 (grub_menu_set_timeout): Likewise.
563 (grub_menu_execute_entry): Likewise.
564 (grub_menu_execute_with_fallback): Likewise.
565 (grub_menu_entry_run): Likewise.
566 (grub_menu_addentry): Renamed from this ...
567 (grub_normal_add_menu_entry): ... to this.
568
569 * normal/main.c (grub_menu_addentry): Renamed from this ...
570 (grub_normal_add_menu_entry): ... to this.
571
572 * script/sh/execute.c (grub_script_execute_menuentry): Update
573 reference to renamed grub_menu_addentry function.
574
861f03a5 5752009-05-23 Felix Zielcke <fzielcke@z-51.de>
576
577 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
578
96b1619a 5792009-05-22 Pavel Roskin <proski@gnu.org>
580
bf6a5fb2 581 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
582 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
583 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
584 compiling for the i386 targets, but not for the utilities.
585
96b1619a 586 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
587 to grub_uint8_t.
588 (grub_root_drive): Likewise.
589 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
590 remove alignment.
591 (grub_root_drive): Change size to byte.
592 (grub_start_addr): Remove.
593 (grub_end_addr): Likewise.
594 (grub_apm_bios_info): Likewise.
595
b729776b 5962009-05-21 Felix Zielcke <fzielcke@z-51.de>
597
598 * normal/i386: Remove.
599 * normal/powerpc: Likewise.
600 * normal/sparc64: Likewise.
601 * normal/x86_64: Likewise.
602
0a15ce80 6032009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
604
605 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 606 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 607 * loader/i386/xnu_helper.S: Likewise
d6da58e6 608
33db9015 6092009-05-18 Colin D Bennett <colin@gibibit.com>
610
d6da58e6 611 Display error messages when parsing a Lua statement fails.
612 Previously, executing a syntactically invalid statement like
613 ")foo" or "bar;" would silently fail.
33db9015 614
615 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 616 (grub_lua_parse_line): Improved reporting of Lua parser and
617 execution errors.
33db9015 618
46422c89 6192009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
620
621 Remove -Werror which causes build to fail on some systems
622
623 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
624 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
625 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 626
22f53a96 6272009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
628
629 trampoline for linux on 64-bit platform
630
18f547ad 631 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
632 loader/i386/efi/linux_trampoline.S
633 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 634 declaration
d6da58e6 635 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
636 here
22f53a96 637 * loader/i386/linux_trampoline.S: moved here
d6da58e6 638 * loader/i386/efi/linux.c (allocate_pages): reserve space for
639 trampoline
22f53a96 640 (jumpvector): removed
641 (grub_linux_trampoline_start): new declaration
642 (grub_linux_trampoline_end): likewise
643 (grub_linux_boot): use trampoline when on 64-bit platform
644 * loader/i386/linux.c: likewise
645
cb5a0f40 6462009-05-16 Pavel Roskin <proski@gnu.org>
647
648 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
649 const to avoid a warning.
650 (grub_lua_setenv): Likewise.
651 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
652 lmsg to fix a warning.
653
334f2c28 6542009-05-16 Felix Zielcke <fzielcke@z-51.de>
655
656 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 657 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
658 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
659 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
660 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
661 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
662 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
663 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 664
59e5d3ec 6652009-05-16 Felix Zielcke <fzielcke@z-51.de>
666
667 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
668
9d87a1ba 6692009-05-16 Bean <bean123ch@gmail.com>
670
671 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
672 (lua_mod_SOURCES): New variable.
673 (lua_mod_CFLAGS): Likewise.
674 (lua_mod_LDFLAGS): Likewise.
675
676 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
677 (setjmp_mod_SOURCES): New variable.
678 (setjmp_mod_CFLAGS): Likewise.
679 (setjmp_LDFLAGS): Likewise.
680
681 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
682 (setjmp_mod_SOURCES): New variable.
683 (setjmp_mod_CFLAGS): Likewise.
684 (setjmp_LDFLAGS): Likewise.
685
686 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
687 (setjmp_mod_SOURCES): New variable.
688 (setjmp_mod_CFLAGS): Likewise.
689 (setjmp_LDFLAGS): Likewise.
690
691 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
692 (setjmp_mod_SOURCES): New variable.
693 (setjmp_mod_CFLAGS): Likewise.
694 (setjmp_LDFLAGS): Likewise.
695
696 * normal/i386/setjmp.S: Moved from here ...
697 * lib/i386/setjmp.S: ... Moved here
698 * normal/x86_64/setjmp.S: Moved from here ...
699 * lib/x86_64/setjmp.S: ... Moved here
700 * normal/powerpc/setjmp.S: Moved from here ...
701 * lib/powerpc/setjmp.S: ... Moved here
702 * normal/sparc64/setjmp.S: Moved from here ...
703 * lib/sparc64/setjmp.S: ... Moved here
704
705 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
706 returns_twice in mingw.
707
708 * script/lua/grub_lib.c: New file.
709 * script/lua/grub_lib.h: Likewise.
710 * script/lua/grub_lua.h: Likewise.
711 * script/lua/grub_main.c: Likewise.
712 * script/lua/lapi.c: Likewise.
713 * script/lua/lapi.h: Likewise.
714 * script/lua/lauxlib.c: Likewise.
715 * script/lua/lauxlib.h: Likewise.
716 * script/lua/lbaselib.c: Likewise.
717 * script/lua/lcode.c: Likewise.
718 * script/lua/lcode.h: Likewise.
719 * script/lua/ldblib.c: Likewise.
720 * script/lua/ldebug.c: Likewise.
721 * script/lua/ldebug.h: Likewise.
722 * script/lua/ldo.c: Likewise.
723 * script/lua/ldo.h: Likewise.
724 * script/lua/ldump.c: Likewise.
725 * script/lua/lfunc.c: Likewise.
726 * script/lua/lfunc.h: Likewise.
727 * script/lua/lgc.c: Likewise.
728 * script/lua/lgc.h: Likewise.
729 * script/lua/linit.c: Likewise.
730 * script/lua/liolib.c: Likewise.
731 * script/lua/llex.c: Likewise.
732 * script/lua/llex.h: Likewise.
733 * script/lua/llimits.h: Likewise.
734 * script/lua/lmathlib.c: Likewise.
735 * script/lua/lmem.c: Likewise.
736 * script/lua/lmem.h: Likewise.
737 * script/lua/loadlib.c: Likewise.
738 * script/lua/lobject.c: Likewise.
739 * script/lua/lobject.h: Likewise.
740 * script/lua/lopcodes.c: Likewise.
741 * script/lua/lopcodes.h: Likewise.
742 * script/lua/loslib.c: Likewise.
743 * script/lua/lparser.c: Likewise.
744 * script/lua/lparser.h: Likewise.
745 * script/lua/lstate.c: Likewise.
746 * script/lua/lstate.h: Likewise.
747 * script/lua/lstring.c: Likewise.
748 * script/lua/lstring.h: Likewise.
749 * script/lua/lstrlib.c: Likewise.
750 * script/lua/ltable.c: Likewise.
751 * script/lua/ltable.h: Likewise.
752 * script/lua/ltablib.c: Likewise.
753 * script/lua/ltm.c: Likewise.
754 * script/lua/ltm.h: Likewise.
755 * script/lua/lua.h: Likewise.
756 * script/lua/luaconf.h: Likewise.
757 * script/lua/lualib.h: Likewise.
758 * script/lua/lundump.c: Likewise.
759 * script/lua/lundump.h: Likewise.
760 * script/lua/lvm.c: Likewise.
761 * script/lua/lvm.h: Likewise.
762 * script/lua/lzio.c: Likewise.
763 * script/lua/lzio.h: Likewise.
764
5e898c9d 7652009-05-16 Bean <bean123ch@gmail.com>
766
767 * include/grub/kernel.h (grub_module_header_types): Add type
768 OBJ_TYPE_CONFIG.
769
770 * kern/main.c (grub_load_config): New function.
771 (grub_main): Call grub_load_config to read boot config.
772
773 * grub-mkimage (generate_image): New parameter config_path.
774 (options): New option --config.
775 (main): Parse --config option, and pass it to generate_image.
776
cf353a47 7772009-05-14 Christian Franke <franke@computer.org>
778
779 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
780 This fixes build on Cygwin.
781
3834887f 7822009-05-14 Pavel Roskin <proski@gnu.org>
783
784 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
785 jump. This saves two bytes, so the typical case of 2 swapped
786 drives would fit 32 bytes.
787
8090fc01 7882009-05-13 Pavel Roskin <proski@gnu.org>
789
ac963883 790 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
791 grub_uint32_t to avoid a warning.
792
8090fc01 793 * loader/i386/linux.c (allocate_pages): When assigning
794 real_mode_mem, cast through grub_size_t to fix a warning. The
795 code already makes sure that the value would fit a pointer.
796 (grub_linux_setup_video): Cast render_target->data to
797 grub_size_t to fix a warning.
798
18f547ad 7992009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 800
801 * commands/i386/pc/drivemap.c: New file - implement drivemap
802 command.
803 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
804 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
805
6f6a8b28 8062009-05-13 Pavel Roskin <proski@gnu.org>
807
808 * util/i386/pc/grub-setup.c (setup): Remove unused variable
809 embedding_area_exists.
810
15fbf4c4 8112009-05-13 Robert Millan <rmh.grub@aybabtu.com>
812
813 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
814 it easier to understand / work with.
59978c8a 815 Improve warning messages for cases where there's no embedding area,
816 or when it is too small (or core.img too large).
15fbf4c4 817
238e871f 8182009-05-13 Pavel Roskin <proski@gnu.org>
819
0ab3a9a4 820 * loader/i386/pc/multiboot2.c: Add necessary includes for
821 grub_multiboot2_real_boot().
822
a2c8c5f8 823 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
824 PX record is always little-endian. We only need the lower 2
825 bytes of the mode.
826
faec96af 827 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
828 facilitate code reuse.
829 (grub_cpio_mount): Use "struct head", not a char buffer. This
830 fixes a warning reported by gcc 4.4.
831
238e871f 832 * kernel/disk.c (grub_disk_read): Use void pointer for the
833 buffer.
834 (grub_disk_write): Use const void pointer for the buffer.
835 Adjust all callers. Remove unnecessary casts.
836
901d2f0c 8372009-05-10 Robert Millan <rmh.grub@aybabtu.com>
838
839 * util/i386/pc/grub-install.in: Update copyright year.
840
18f547ad 8412009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 842
843 gptsync
844
845 * commands/gptsync.c: new file
846 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
847 (gptsync_mod_SOURCES): new variable
848 (gptsync_mod_CFLAGS): likewise
849 (gptsync_mod_LDFLAGS): likewise
18f547ad 850 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 851 new definition
852 (GRUB_PC_PARTITION_TYPE_HFS): likewise
853 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
854 * conf/i386-ieee1275.rmk: likewise
855 * conf/i386-pc.rmk: likewise
856 * conf/powerpc-ieee1275.rmk: likewise
857
b4ba690a 8582009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
859
860 Fixed grub-emu
861
862 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
863 (grub_dl_ref): likewise
864
317e1a44 8652009-05-08 Robert Millan <rmh.grub@aybabtu.com>
866
867 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
868 split in two functions (one for msdos and one for gpt).
869
041b8094 8702009-05-08 Pavel Roskin <proski@gnu.org>
871
752473c2 872 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
873 not modified.
874
041b8094 875 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
876 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
877 Initialize them with -1. Add sanity check for bad1. Eliminate
878 nerr variable.
879
172800ce 8802009-05-08 David S. Miller <davem@davemloft.net>
881
882 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
883
29aa5e81 8842009-05-06 Robert Millan <rmh.grub@aybabtu.com>
885
886 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 887 existence.
29aa5e81 888
96613b62 8892009-05-05 Felix Zielcke <fzielcke@z-51.de>
890
891 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 892 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 893
eef73c8a 8942009-05-05 David S. Miller <davem@davemloft.net>
895
896 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
897
119494b5 8982009-05-05 Pavel Roskin <proski@gnu.org>
899
900 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
901 of grub_dl_ref() and grub_dl_unref().
902 * commands/parttool.c: Remove preprocessor conditionals around
903 grub_dl_ref() and grub_dl_unref().
904 * fs/affs.c: Likewise.
905 * fs/afs.c: Likewise.
906 * fs/cpio.c: Likewise.
907 * fs/ext2.c: Likewise.
908 * fs/fat.c: Likewise.
909 * fs/hfs.c: Likewise.
910 * fs/hfsplus.c: Likewise.
911 * fs/iso9660.c: Likewise.
912 * fs/jfs.c: Likewise.
913 * fs/minix.c: Likewise.
914 * fs/ntfs.c: Likewise.
915 * fs/reiserfs.c: Likewise.
916 * fs/sfs.c: Likewise.
917 * fs/udf.c: Likewise.
918 * fs/ufs.c: Likewise.
919 * fs/xfs.c: Likewise.
920 * include/grub/dl.h: Likewise.
921 * loader/xnu.c: Likewise.
922
de5fd76e 9232009-05-04 Pavel Roskin <proski@gnu.org>
924
925 * commands/acpi.c: Remove unused variable my_mod.
926 * partmap/amiga.c: Likewise.
927 * partmap/apple.c: Likewise.
928 * partmap/gpt.c: Likewise.
929 * partmap/pc.c: Likewise.
930 * partmap/sun.c: Likewise.
931 * term/gfxterm.c: Likewise.
932 * term/i386/pc/vesafb.c: Likewise.
933 * term/i386/pc/vga.c: Likewise.
934
983598ad 9352009-05-04 David S. Miller <davem@davemloft.net>
936
937 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
938 pointer args to grub_ieee1275_get_property().
939
8aadec43 940 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
941
9554b15e 942 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
943 devices, and do not traverse down under controller nodes.
944
67e23c90 945 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
946 (grub_ofdisk_open): Use it to un-escape "," characters.
947 * kern/disk.c (find_part_sep): New.
948 (grub_disk_open): Use it to find the first non-escaped ','
949 character in the disk name.
950 * util/ieee1275/devicemap.c (escape_of_path): New.
951 (grub_util_emit_devicemap_entry): Use it.
952 * util/sparc64/ieee1275/grub-install.in: Update script to
953 strip partition specifiers properly by not triggering on
954 '\' escaped ',' characters.
955
74bfdd2f 9562009-05-04 Robert Millan <rmh.grub@aybabtu.com>
957
958 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
959 to 0x300.
960 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
961 resolutions.
962 (linux_vesafb_modes): Add a lot of additional modes to the list (based
963 on documentation from Wikipedia).
964
4241d2b1 9652009-05-04 Pavel Roskin <proski@gnu.org>
966
967 * disk/ata.c: Spelling fixes.
968 * disk/raid.c: Likewise.
969 * disk/usbms.c: Likewise.
970 * disk/dmraid_nvidia.c: Likewise.
971 * kern/ieee1275/openfw.c: Likewise.
972 * kern/ieee1275/init.c: Likewise.
973 * kern/ieee1275/cmain.c: Likewise.
974 * boot/i386/pc/cdboot.S: Likewise.
975 * video/readers/png.c: Likewise.
976 * video/i386/pc/vbe.c: Likewise.
977 * fs/udf.c: Likewise.
978 * fs/hfs.c: Likewise.
979 * fs/reiserfs.c: Likewise.
980 * efiemu/runtime/efiemu.c: Likewise.
981 * efiemu/main.c: Likewise.
982 * efiemu/mm.c: Likewise.
983 * include/grub/elf.h: Likewise.
984 * include/grub/xnu.h: Likewise.
985 * include/grub/usbdesc.h: Likewise.
986 * include/grub/usb.h: Likewise.
987 * include/grub/script_sh.h: Likewise.
988 * include/grub/lib/LzmaEnc.h: Likewise.
989 * include/grub/efiemu/efiemu.h: Likewise.
990 * include/grub/command.h: Likewise.
991 * normal/menu.c: Likewise.
992 * normal/main.c: Likewise.
993 * normal/datetime.c: Likewise.
994 * bus/usb/uhci.c: Likewise.
995 * mmap/i386/uppermem.c: Likewise.
996 * mmap/mmap.c: Likewise.
997 * commands/acpi.c: Likewise.
998 * commands/test.c: Likewise.
999 * partmap/apple.c: Likewise.
1000 * font/font.c: Likewise.
1001 * loader/sparc64/ieee1275/linux.c: Likewise.
1002 * loader/macho.c: Likewise.
1003 * loader/i386/bsd_trampoline.S: Likewise.
1004 * loader/i386/bsd.c: Likewise.
1005 * loader/xnu.c: Likewise.
1006 * term/i386/pc/vesafb.c: Likewise.
1007 * term/usb_keyboard.c: Likewise.
1008 * util/resolve.c: Likewise.
1009 * util/getroot.c: Likewise.
1010
0cfc0083 10112009-05-04 Felix Zielcke <fzielcke@z-51.de>
1012
1013 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1014
7c1d00cd 10152009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1016
1017 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1018 build error.
1019
b01f0548 10202009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1021
1022 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1023 parameter only available on BIOS.
1024
ecc3eb22 10252009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1026
1027 Removed wrong semicolon in declaration
1028
1029 * grub/misc.h (grub_dprintf): remove semicolon
1030
112972a9 10312009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1032
1033 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1034 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1035 is done by grub_cmd_linux() now).
1036 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1037 restore video to text mode.
1038 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1039 indicates lack of "vga=" parameter. "vga=0" is mapped to
1040 `GRUB_LINUX_VID_MODE_NORMAL'.
1041
afd5c115 10422009-05-04 Felix Zielcke <fzielcke@z-51.de>
1043
1044 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1045 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1046 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 1047 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 1048 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1049 `grub_script.tab.c'.
1050
1051 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1052 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1053 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1054 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1055 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1056
faa517ce 1057 * Makefile.in: Remove duplicated 2008 in Copyright line.
1058
ae0c0bdc 10592009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1060
473d1e45 1061 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 1062 unconditionally.
1063 * include/grub/util/misc.h (grub_util_warn): New declaration.
1064
1065 * util/i386/pc/grub-install.in: Understand --force and pass it down
1066 to grub-setup.
1067
1068 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1069 down to setup().
1070 (setup): Improve error messages and add warnings when requested to
1071 install in odd layouts. Refuse to install using blocklists unless
1072 --force was set.
1073
18f547ad 10742009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 1075
1076 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1077
6d260daa 10782009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1079
1080 Updated copyright year
1081
1082 * fs/hfsplus.c: updated copyright year
18f547ad 1083
69f853f8 10842009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1085
1086 HFS+ UUID
1087
18f547ad 1088 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 1089 in the space previously used by unused3
1090 (grub_hfsplus_uuid): new function
1091 (grub_hfsplus_fs): added uuid field
1092
4c402e73 10932009-05-03 Pavel Roskin <proski@gnu.org>
1094
1095 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1096 suppress warnings. It's no longer needed.
1097 * disk/host.c: Likewise.
1098 * disk/ata_pthru.c: Likewise.
1099 * disk/loopback.c: Likewise.
1100 * hook/datehook.c: Likewise.
1101 * parttool/pcpart.c: Likewise.
1102 * fs/i386/pc/pxe.c: Likewise.
1103 * fs/ntfscomp.c: Likewise.
1104 * efiemu/main.c: Likewise.
1105 * mmap/mmap.c: Likewise.
1106 * commands/crc.c: Likewise.
1107 * commands/hexdump.c: Likewise.
1108 * commands/hdparm.c: Likewise.
1109 * commands/acpi.c: Likewise.
1110 * commands/echo.c: Likewise.
1111 * commands/minicmd.c: Likewise.
1112 * commands/blocklist.c: Likewise.
1113 * commands/memrw.c: Likewise.
1114 * commands/loadenv.c: Likewise.
1115 * commands/usbtest.c: Likewise.
1116 * commands/lsmmap.c: Likewise.
1117 * commands/boot.c: Likewise.
1118 * commands/parttool.c: Likewise.
1119 * commands/configfile.c: Likewise.
1120 * commands/search.c: Likewise.
1121 * commands/ieee1275/suspend.c: Likewise.
1122 * commands/cat.c: Likewise.
1123 * commands/i386/pc/pxecmd.c: Likewise.
1124 * commands/i386/pc/play.c: Likewise.
1125 * commands/i386/pc/halt.c: Likewise.
1126 * commands/i386/pc/vbeinfo.c: Likewise.
1127 * commands/i386/pc/vbetest.c: Likewise.
1128 * commands/lspci.c: Likewise.
1129 * commands/date.c: Likewise.
1130 * commands/handler.c: Likewise.
1131 * commands/ls.c: Likewise.
1132 * commands/test.c: Likewise.
1133 * commands/cmp.c: Likewise.
1134 * commands/efi/loadbios.c: Likewise.
1135 * commands/efi/fixvideo.c: Likewise.
1136 * commands/halt.c: Likewise.
1137 * commands/help.c: Likewise.
1138 * commands/reboot.c: Likewise.
1139 * hello/hello.c: Likewise.
1140 * script/sh/main.c: Likewise.
1141 * loader/xnu.c: Likewise.
1142 * term/terminfo.c: Likewise.
1143 * term/i386/pc/serial.c: Likewise.
1144 * term/usb_keyboard.c: Likewise.
1145
515b5079 11462009-05-03 David S. Miller <davem@davemloft.net>
1147
1148 * normal/menu.c: Include grub/parser.h
1149
dfc31a22 11502009-05-03 Pavel Roskin <proski@gnu.org>
1151
2fee74f1 1152 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1153 not char*.
1154 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1155 Suggested by Javier Martín <lordhabbit@gmail.com>
1156
dfc31a22 1157 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1158 efiemu??.o doesn't exist.
1159 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1160 copying.
1161
18f547ad 11622009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 1163
1164 FreeBSD 64-bit support
1165
18f547ad 1166 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 1167 and loader/i386/bsd_trampoline.S
1168 (bsd_mod_ASFLAGS): new variable
1169 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1170 (FREEBSD_MODTYPE_KERNEL64): likewise
1171 (grub_bsd64_trampoline_start): likewise
1172 (grub_bsd64_trampoline_end): likewise
1173 (grub_bsd64_trampoline_selfjump): likewise
1174 (grub_bsd64_trampoline_gdt): likewise
1175 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1176 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1177 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1178 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 1179 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 1180 of "attrib" member
1181 * loader/i386/bsd_pagetable.c: new file
1182 * loader/i386/bsd_trampoline.S: likewise
1183 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1184 (ALIGN_VAR): likewise
1185 (entry_hi): new variable
1186 (kern_end_mdofs): likewise
1187 (is_64bit): likewise
1188 (grub_freebsd_add_meta): use ALIGN_VAR
1189 (grub_e820_mmap): new declaration
1190 (grub_freebsd_add_mmap): new function
1191 (grub_freebsd_add_meta_module): support 64 bit kernels
1192 (grub_freebsd_list_modules): use ALIGN_VAR
1193 (gdt_descriptor): new declaration
1194 (grub_freebsd_boot): support 64 bit kernels
1195 (grub_bsd_elf64_hook): new function
1196 (grub_bsd_load_elf): support elf64
1197
038c5720 11982009-05-03 Bean <bean123ch@gmail.com>
1199
1200 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1201 after we get the result of if statement.
1202
fc45fb58 12032009-05-03 Bean <bean123ch@gmail.com>
1204
1205 * Makefile.in (enable_efiemu): New variable.
1206
1207 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1208 set.
1209 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1210 path.
1211 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1212 path, add -mno-red-zone option.
1213 (efiemu64_s.o): Likewise.
1214 (efiemu64.o): Use macro $^ for source file.
1215
1216 * configure.ac (--enable-efiemu): New option.
1217
bbee0f2b 12182009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1219
1220 xnu support
1221
1222 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1223 (pkglib_MODULES): add xnu.mod
1224 (xnu_mod_SOURCES): new variable
1225 (xnu_mod_CFLAGS): likewise
1226 (xnu_mod_LDFLAGS): likewise
1227 (xnu_mod_ASFLAGS): likewise
1228 * conf/i386-pc.rmk: likewise
1229 * conf/x86_64-efi.rmk: likewise
7dd4a573 1230 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1231 new declaration
1232 * include/grub/i386/macho.h: new file
1233 * include/grub/i386/xnu.h: likewise
1234 * include/grub/macho.h: likewise
1235 * include/grub/machoload.h: likewise
1236 * include/grub/x86_64/macho.h: likewise
1237 * include/grub/x86_64/xnu.h: likewise
1238 * include/grub/xnu.h: likewise
1239 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1240 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1241 * loader/i386/efi/xnu.c: new file
1242 * loader/i386/pc/xnu.c: likewise
1243 * loader/i386/xnu.c: likewise
1244 * loader/i386/xnu_helper.S: likewise
1245 * loader/macho.c: likewise
1246 * loader/xnu.c: likewise
1247 * loader/xnu_resume.c: likewise
1248 * util/grub-dumpdevtree: likewise
1249 * include/grub/i386/pit.h: include grub/err.h
1250 (grub_pit_wait): export
1251 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1252
5caf964d 12532009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1254
1255 Efiemu
7dd4a573 1256
5caf964d 1257 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1258 _linux_efi, linux_efi.
1259 new files in grub-emu
5caf964d 1260 new targets efiemu32.o and efiemu64.o
1261 * loader/linux_normal_efiemu.c: likewise
1262 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1263 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1264 files to copy
1265 * include/grub/autoefi.h: new file
7dd4a573 1266 * include/grub/i386/efiemu.h: likewise
5caf964d 1267 * include/grub/i386/pc/efiemu.h: likewise
1268 * include/grub/efi/api.h: add LL suffix when necessary
1269 new definitions relating to tables
1270 * include/grub/efiemu/efiemu.h: new file
1271 * include/grub/efiemu/runtime.h: likewise
1272 * efiemu/prepare.c: likewise
1273 * efiemu/loadcore_common.c: likewise
1274 * efiemu/loadcore64.c: likewise
1275 * efiemu/runtime/efiemu.sh: likewise
1276 * efiemu/runtime/efiemu.S: likewise
1277 * efiemu/runtime/efiemu.c: likewise
1278 * efiemu/runtime/config.h: likewise
1279 * efiemu/prepare32.c: likewise
1280 * efiemu/main.c: likewise
1281 * efiemu/modules/pnvram.c: likewise
1282 * efiemu/modules/i386: likewise
1283 * efiemu/modules/i386/pc: likewise
1284 * efiemu/modules/acpi.c: likewise
1285 * efiemu/i386/pc/cfgtables.c: likewise
1286 * efiemu/i386/loadcore64.c: likewise
1287 * efiemu/i386/loadcore32.c: likewise
1288 * efiemu/prepare64.c: likewise
1289 * efiemu/loadcore.c: likewise
1290 * efiemu/symbols.c: likewise
1291 * efiemu/mm.c: likewise
1292 * efiemu/loadcore32.c: likewise
7dd4a573 1293
12942009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 1295
1296 ACPI spoofing
1297
1298 * commands/acpi.c: new file
1299 * commands/i386/pc/acpi.c: likewise
1300 * commands/efi/acpi.c: likewise
1301 * include/grub/acpi.h: likewise
1302 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1303 (acpi_mod_SOURCES): new variable
1304 (acpi_mod_CFLAGS): likewise
1305 (acpi_mod_LDFLAGS): likewise
1306 * conf/i386-efi.rmk: likewise
1307 * conf/x86_64-efi.rmk: likewise
1308
7dd4a573 13092009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 1310
1311 Missing part from mmap patch
1312
1313 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1314 (grub_mmap_unregister)
1315 (grub_mmap_free_and_unregister): use grub_mmap_register
1316
7dd4a573 13172009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 1318
1319 Mmap services
1320
1321 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1322 * loader/i386/linux.c (find_mmap_size): likewise
1323 (allocate_pages): likewise
1324 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1325 (grub_fill_multiboot_mmap): likewise
1326 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1327 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1328 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1329 (OPENBSD_MMAP_RESERVED): likewise
1330 * include/grub/i386/pc/memory.h: include grub/memory.h
1331 (grub_lower_mem): removed
1332 (grub_upper_mem): likewise
1333 (GRUB_MACHINE_MEMORY_ACPI): new definition
1334 (GRUB_MACHINE_MEMORY_NVS): likewise
1335 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1336 (GRUB_MACHINE_MEMORY_HOLE): likewise
1337 (grub_machine_mmap_register): likewise
1338 (grub_machine_mmap_unregister): likewise
1339 (grub_machine_get_upper): likewise
1340 (grub_machine_get_lower): likewise
1341 (grub_machine_get_post64): likewise
1342 * include/grub/i386/efi/memory.h: new file
1343 * include/grub/x86_64/efi/memory.h: likewise
1344 * include/grub/efi/memory.h: likewise
1345 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1346 (mmap_mod_SOURCES): new variable
1347 (mmap_mod_LDFLAGS): likewise
1348 (mmap_mod_ASFLAGS): likewise
1349 * conf/i386-coreboot.rmk: likewise
1350 * conf/i386-ieee1275.rmk: likewise
1351 * conf/i386-efi.rmk: likewise
1352 * conf/x86_64-efi.rmk: likewise
1353 * include/grub/types.h (UINT_TO_PTR): new macro
1354 (PTR_TO_UINT32): likewise
1355 (PTR_TO_UINT64): likewise
1356 * include/grub/memory.h: new file
1357 * mmap/i386/pc/mmap.c: likewise
1358 * mmap/i386/pc/mmap_helper.S: likewise
1359 * mmap/i386/uppermem.c: likewise
1360 * mmap/mmap.c: likewise
1361 * mmap/efi/mmap.c: likewise
7dd4a573 1362 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 1363 grub_upper_mem
1364 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1365 (grub_upper_mem): likewise
1366 (grub_machine_init): don't use grub_upper_mem,
1367 make grub_lower_mem local
1368 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1369 grub_mmap_iterate and grub_mmap_get_upper
1370 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1371
d558e6b5 13722009-05-02 Bean <bean123ch@gmail.com>
1373
1374 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1375 script/sh/parser.y.
1376 (pkglib_MODULES): Add normal.mod and sh.mod.
1377 (normal_SOURCES): New variable.
1378 (normal_mod_CFLAGS): Likewise.
1379 (normal_mod_LDFLAGS): Likewise.
1380 (sh_mod_SOURCES): Likewise.
1381 (sh_mod_CFLAGS): Likewise.
1382 (sh_mod_LDFLAGS): Likewise.
1383
1384 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1385 script/sh/lexer.c_DEPENDENCIES.
1386 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1387 kern/rescue_reader.c and kern/rescue_parser.c.
1388 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1389 (grub_emu_SOURCES): Change source files.
1390 (pkglib_MODULES): Remove normal.mod.
1391 (normal_SOURCES): Removed.
1392 (normal_mod_CFLAGS): Likewise.
1393 (normal_mod_LDFLAGS): Likewise.
1394 * conf/i386-coreboot.rmk: Likewise.
1395 * conf/i386-efi.rmk: Likewise.
1396 * conf/i386-ieee1276.rmk: Likewise.
1397 * conf/powerpc-ieee1275.rmk: Likewise.
1398 * conf/sparc64-ieee1275.rmk: Likewise.
1399 * conf/x86_64-efi.rmk: Likewise.
1400
1401 * include/grub/command.h (grub_command_execute): New inline function.
1402
1403 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1404
1405 * include/grub/normal.h: Remove <grub/setjmp.h>.
1406 (grub_fs_module_list): Moved to normal/autofs.c.
1407 (grub_exit_env): Removed.
1408 (grub_command_execute): Likewise.
1409 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1410 parameter script.
1411 (read_command_list): New function declaration.
1412 (read_fs_list): Likewise.
1413
1414 * include/parser.h: Include <grub/reader.h>.
1415 (grub_parser_split_cmdline): Change type of getline parameter.
1416 (grub_parser): New structure.
1417 (grub_parser_class): New variable.
1418 (grub_parser_execute): New function declaration.
1419 (grub_register_rescue_parser): Likewise.
1420 (grub_parser_register): New inline function.
1421 (grub_parser_unregister): Likewise.
1422 (grub_parser_get_current): Likewise.
1423 (grub_parser_set_current): Likewise.
1424
1425 * include/grub/reader.h: New file.
1426 * kern/reader.c: Likewise.
1427 * kern/rescue_parser.c: Likewise.
1428 * kern/rescue_reader.c: Likewise.
1429 * normal/autofs.c: Likewise.
1430 * normal/dyncmd.c: Likewise.
1431
1432 * include/grub/rescue.h: Removed.
1433 * normal/command.h: Likewise.
1434
1435 * include/grub/script.h: Moved to ...
1436 * include/grub/script_sh.h: ... Moved here.
1437 * normal/execute.c: Moved to ...
1438 * script/sh/execute.c: ... Moved here.
1439 * normal/function.c: Moved to ...
1440 * script/sh/function.c: ... Moved here.
1441 * normal/lexer.c: Moved to ...
1442 * script/sh/lexer.c: ... Moved here.
1443 * normal/parser.y: Moved to ...
1444 * script/sh/parser.y: ... Moved here.
1445 * normal/script.c: Moved to ...
1446 * script/sh/script.c: ... Moved here.
1447
1448 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1449 <grub/reader.h>.
1450 (grub_exit_env): Removed.
1451 (fs_module_list): Moved to normal/autofs.c.
1452 (grub_file_getline): Don't handle comment here.
1453 (free_menu): Skip removed field entry->commands.
1454 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1455 script parameter.
1456 (read_config_file): Removed nested parameter, change getline function.
1457 (grub_enter_normal_mode): Removed.
1458 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1459 (read_command_list): Likewise.
1460 (autoload_fs_module): Moved to normal/autofs.c.
1461 (read_fs_list): Likewise.
1462 (reader_nested): New variable.
1463 (grub_normal_execute): Run parser.sh to switch to sh parser.
1464 (grub_cmd_rescue): Removed.
1465 (cmd_normal): Removed.
1466 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1467 rescue command.
1468 (grub_cmdline_run): New function.
1469 (grub_normal_reader_init): Likewise.
1470 (grub_normal_read_line): Likewise.
1471 (grub_env_write_pager): Likewise.
1472 (cmdline): New variable.
1473 (grub_normal_reader): Likewise.
1474 (GRUB_MOD_INIT): Register normal reader and set as current, register
1475 pager hook, register normal command with grub_register_command_prio,
1476 so that it won't show up in command.lst.
1477 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1478 grub_fs_autoload_hook.
1479
1480 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1481 (grub_menu_execute_entry): Replace grub_script_execute with
1482 grub_parser_execute, change parameter to grub_command_execute.
1483
1484 * normal/menu_text.c: Remove <grub/script.h>.
1485
1486 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1487 and <grub/parser.h>.
1488 (run): Change editor_getline to use new parser interface. Change
1489 parameter to grub_command_execute.
1490
1491 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1492 <grub/reader.h> and <grub/parser.h>.
1493 (grub_load_normal_mode): Execute normal command.
1494 (grub_main): Call grub_register_core_commands,
1495 grub_register_rescue_parser and grub_register_rescue_reader, use
1496 grub_reader_loop to enter input loop.
1497
7dd4a573 1498 * kern/parser.c (grub_parser_split_cmdline): Change type of
1499 getline parameter.
d558e6b5 1500 (grub_parser_class): New variable.
1501 (grub_parser_execute): New function.
1502
1503 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1504 * loader/multiboot2.c: Likewise.
1505 * loader/sparc64/ieee1275/linux.c: Likewise.
1506
1507 * util/grub-emu.c (read_command_list): New dummy function.
1508
18db813d 15092009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1510
1511 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1512 count to 16 for CCISS and IDA.
1513
6c67de15 15142009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1515
1516 * normal/menu_text.c (grub_wait_after_message): Print a newline
1517 after waiting for user input.
1518
1519 * loader/i386/linux.c: Include `<grub/normal.h>'.
1520 (grub_cmd_linux): Improve the error message about `ask' mode, by
1521 waiting for user input so it's not missed (we can do this, since
1522 user requested interaction).
1523
d9dc87b0 15242009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1525
1526 Added missing lst to grub-mkrescue
1527
1528 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1529 and ${input_dir}/parttool.lst
1530
ac8a2baa 15312009-04-30 David S. Miller <davem@davemloft.net>
1532
ad22a610 1533 * util/hostdisk.c (device_is_wholedisk): New function.
1534 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1535 zero only if device_is_wholedisk() returns true.
1536
6966215d 1537 * util/hostdisk.c (convert_system_partition_to_system_disk):
1538 Handle virtual disk devices named /dev/vdiskX as found on sparc
1539 and powerpc.
1540
ac8a2baa 1541 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1542 lettered partition specifier is found, convert to numbered.
1543
979b4fb4 15442009-04-29 David S. Miller <davem@davemloft.net>
1545
e2bf39b2 1546 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1547 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1548
3c64e104 1549 * normal/command.c: Add missing newline at end of file.
1550
979b4fb4 1551 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1552 warnings.
1553 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1554 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1555 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1556 ihandles have a 32-bit type but need to be stored in a "void *".
1557
136d9f82 15582009-04-28 Pavel Roskin <proski@gnu.org>
1559
9459c306 1560 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1561 not disk. Adjust all dependencies.
2e08a26a 1562 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 1563 grub_disk_close().
1564
136d9f82 1565 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1566 parent's partition, don't copy it by reference, as it gets freed
1567 on close.
1568
7dd4a573 15692009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 1570
1571 Preboot hooks support
1572
1573 * commands/boot.c (struct grub_preboot_t): new declaration
1574 (preboots_head): new variable
1575 (preboots_tail): likewise
1576 (grub_loader_register_preboot_hook): new function
1577 (grub_loader_unregister_preboot_hook): likewise
1578 (grub_loader_set): launch preboot hooks
1579 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1580 (grub_loader_register_preboot_hook): new declaration
1581 (grub_loader_unregister_preboot_hook): likewise
1582
5af922b5 15832009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1584
1585 Warning fix
1586
7dd4a573 1587 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 1588 calling grub_dprintf
1589
a5562c30 15902009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1591
1592 Bug and warning fixes
1593
7dd4a573 1594 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 1595 declaration
1596 * commands/test.c (test_parse): fixed bug with file tests and corrected
1597 declaration of find_file
1598
4006f85c 15992009-04-26 Pavel Roskin <proski@gnu.org>
1600
1601 * Makefile.in: Don't install empty manual pages if help2man is
1602 missing. Use help2man option for output, not shell redirection.
1603
5c77c3de 16042009-04-26 David S. Miller <davem@davemloft.net>
1605
1606 * util/grub-mkdevicemap.c (make_device_map): Add missing
1607 NESTED_FUNC_ATTR to process_device().
1608
033b10a8 16092009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1610
1611 Test command
1612
1613 * commands/test.c: rewritten to use bash-like test
1614
e4343593 16152009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1616
1617 Parttool autoloading and improvements
1618
7dd4a573 1619 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 1620 (parttool.lst): new target
1621 * genmk.rb: generate parttool-*
1622 (CLEANFILES): add #{parttool}
1623 (PARTTOOLFILES): new variable
1624 * genparttoollist.sh: new file
7dd4a573 1625 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 1626 (grub_pcpart_type): likewise
1627 * commands/parttool.c (helpmsg): new variable
1628 (grub_cmd_parttool): output help if not enough arguments are supplied
1629 autoload modules
1630 (GRUB_MOD_INIT(parttool)): use helpmsg
1631
0d312500 16322009-04-24 David S. Miller <davem@davemloft.net>
1633
7dd4a573 1634 Avoiding opening same device multiple times in device iterator.
0d312500 1635
1636 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 1637 and use it to build a list of partitions in iterate_disk() and
0d312500 1638 iterate_partition().
1639
ac20caff 1640 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1641 on disk->data.
1642
0dcf7495 1643 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1644 grub_devalias_iterate() result instead of unconditional 0.
1645 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1646 Also, capture hook return value, either directly or via
1647 grub_children_iterate(), and propagate to caller.
1648 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1649 grub_children_iterate): Return value is now 'int' instead of
1650 'grub_err_t'.
1651 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1652 like a proper iterator, stopping when hooks return non-zero.
1653 (grub_devalias_iterate): Likewise.
1654
c8c08833 16552009-04-23 David S. Miller <davem@davemloft.net>
1656
1657 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1658
f01005a8 16592009-04-22 David S. Miller <davem@davemloft.net>
1660
1661 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1662 is larger than address_cells, use that value for address_cells too.
1663
4e8269da 1664 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1665 IEEE1275_MAX_PATH_LEN): Define.
1666 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1667 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1668 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1669 'devtype'. Explicitly NULL terminate devalias expansion.
1670
a1447506 1671 * util/sparc64/ieee1275/misc.c: New file.
1672 * util/sparc64/ieee1275/grub-setup.c: New file.
1673 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1674 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1675 * util/sparc64/ieee1275/grub-install.in: New file.
1676 * util/ieee1275/ofpath.c: New file.
1677 * util/ieee1275/devicemap.c: New file.
1678 * util/devicemap.c: New file.
1679 * util/deviceiter.c: New file.
1680 * kern/sparc64/ieee1275/init.c: New file.
1681 * include/grub/util/ofpath.h: New file.
1682 * include/grub/util/deviceiter.h: New file.
1683 * util/grub-mkdevicemap.c: Include deviceiter.h.
1684 Implement using grub_util_emit_devicemap_entry and
1685 grub_util_iterate_devices.
1686 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1687 util/devicemap.c into grub-mkdevicemap
1688 * conf/i386-efi.rmk: Likewise.
1689 * conf/i386-ieee1275.rmk: Likewise.
1690 * conf/i386-pc.rmk: Likewise.
1691 * conf/powerpc-ieee1275.rmk: Likewise.
1692 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1693 images and installation utilities. Build kernel as image
1694 instead of as elf binary. Use common rules as much as possible.
1695
7dd4a573 16962009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 1697
1698 Correct GPT definition
1699
7dd4a573 1700 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 1701 of "attrib" member
1702
c6c5219f 17032009-04-19 Felix Zielcke <fzielcke@z-51.de>
1704
1705 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1706
0552ff9f 17072009-04-19 David S. Miller <davem@davemloft.net>
1708
1709 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1710 (grub_rescue_cmd_linux): Rename to...
1711 (grub_cmd_linux): and fix prototype.
1712 (grub_rescue_cmd_initrd): Rename to...
1713 (grub_cmd_initrd): and fix prototype.
1714 (cmd_linux, cmd_initrd): New.
1715 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1716 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1717
d1a282fc 17182009-04-17 Pavel Roskin <proski@gnu.org>
1719
07c5039f 1720 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1721 format.
1722 (grub_ohci_transfer): Likewise.
1723
b012002d 1724 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1725
1bc09c35 1726 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1727 return without a value. Fix inconsistent indentation.
1728
e0ff9126 1729 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1730 match struct grub_fs.
1731
d1a282fc 1732 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1733 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1734 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1735 * commands/lspci.c (grub_lspci_iter): Likewise.
1736
a96df3f2 17372009-04-16 Bean <bean123ch@gmail.com>
1738
1739 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1740 value.
1741
41bb0fe9 17422009-04-15 Pavel Roskin <proski@gnu.org>
1743
1744 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1745 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1746 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1747 definitions.
1748
596c6970 17492009-04-15 Felix Zielcke <fzielcke@z-51.de>
1750
1751 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 1752 that no multiple data or metadata areas are supported and `Unknown
596c6970 1753 metadata header'.
1754
7dd4a573 17552009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 1756
1757 Move loader out of the kernel
1758
1759 * kern/loader.c: moved to ...
1760 * commands/boot.c: ... moved here
1761 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1762 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1763 * include/grub/kernel.h (grub_machine_fini): export
1764 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1765 (grub_loader_set): likewise
1766 (grub_loader_unset): likewise
1767 (grub_loader_boot): likewise
1768 * conf/common.rmk: new module boot.mod
1769 (pkglib_MODULES): add boot.mod
1770 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1771 (grub_emu_SOURCES): likewise
1772 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1773 (grub_emu_SOURCES): likewise
1774 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1775 (grub_emu_SOURCES): likewise
1776 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1777 (grub_emu_SOURCES): likewise
1778 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1779 (grub_emu_SOURCES): likewise
7dd4a573 1780 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1781 (grub_emu_SOURCES): likewise
0d5d5653 1782 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 1783 (grub_emu_SOURCES): likewise
0d5d5653 1784
7dd4a573 17852009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 1786
1787 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 1788
5999d619 1789 * kern/misc.c (grub_itoa): Removed function
1790 (grub_ltoa): likewise
1791 (grub_vsprintf): use grub_lltoa
1792
7dd4a573 17932009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 1794
1795 Restore grub-emu
1796
1797 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1798 * conf/i386-coreboot.rmk: likewise
1799 * conf/i386-ieee1275.rmk: likewise
1800 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1801
20318222 18022009-04-15 Felix Zielcke <fzielcke@z-51.de>
1803
1804 * INSTALL: Add that `./autogen.sh' needs to be run before
1805 `./configure.'.
1806
d05f0df3 18072009-04-14 Bean <bean123ch@gmail.com>
1808
1809 * Makefile.in (pkglib_DATA): Add handler.lst.
1810 (handler.lst): New rule.
1811
1812 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1813 * conf/i386-coreboot.rmk: Likewise.
1814 * conf/i386-ieee1275.rmk: Likewise.
1815 * conf/i386-efi.rmk: Likewise.
1816 * conf/x86_64-efi.rmk: Likewise.
1817 * conf/powerpc-ieee1275.rmk: Likewise.
1818 * conf/sparc64-ieee1275.rmk: Likewise.
1819
1820 * genhandlerlist.sh: New file.
1821
1822 * genmk.rb: Add rules to generate handler.lst.
1823
1824 * include/grub/normal.h (grub_file_getline): New function definition.
1825 (read_handler_list): Likewise.
1826 (free_handler_list): Likewise.
1827
1828 * include/grub/term.h (grub_term_register_input): Add name parameter
1829 for auto generation of handler.lst.
1830 (grub_term_register_output): Likewise.
1831
1832 * normal/handler.c: New file.
1833
1834 * normal/main.c (get_line): Renamed to grub_file_getline.
1835 (read_config_file): Use the newly renamed grub_file_getline.
1836 (read_command_list): Likewise.
1837 (read_fs_list): Likewise.
1838 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1839 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1840
1841 * term/efi/console.c (grub_console_init): Add name parameter for auto
1842 generation of handler.lst.
1843 * term/gfxterm.c: Likewise.
1844 * term/i386/pc/at_keyboard.c: Likewise.
1845 * term/i386/pc/console.c: Likewise.
1846 * term/i386/pc/serial.c: Likewise.
1847 * term/i386/pc/vesafb.c: Likewise.
1848 * term/i386/pc/vga.c: Likewise.
1849 * term/i386/pc/vga_text.c: Likewise.
1850 * term/ieee1275/ofconsole.c: Likewise.
1851 * term/usb_keyboard.c: Likewise.
1852
33c846be 18532009-04-14 Bean <bean123ch@gmail.com>
1854
1855 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1856 properly with null character.
1857
4484e01e 18582009-04-14 Felix Zielcke <fzielcke@z-51.de>
1859
1860 * configure: Remove.
1861 * config.h.in: Likewise.
f93d668e 1862 * stamp-h.in: Likewise.
4484e01e 1863 * DISTLIST: Likewise.
1864 * conf/common.mk: Likewise.
1865 * conf/i386-coreboot.mk: Likewise.
1866 * conf/i386-efi.mk: Likewise.
1867 * conf/i386-ieee1275.mk: Likewise.
1868 * conf/i386.mk: Likewise.
1869 * conf/i386-pc.mk: Likewise.
1870 * conf/powerpc-ieee1275.mk: Likewise.
1871 * conf/sparc64-ieee1275.mk: Likewise.
1872 * conf/x86_64-efi.mk: Likewise.
1873
1874 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1875 develop on GRUB.
1876
7dd4a573 18772009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1878 David S. Miller <davem@davemloft.net>
1879
1880 * util/hostdisk.c (make_device_name): Fix buffer length
1881 calculations.
1882
e25b5a8c 18832009-04-14 Felix Zielcke <fzielcke@z-51.de>
1884
1885 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1886 <sys/param.h> and <sys/sysctl.h>.
1887 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1888 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1889 opening the device and reset them afterwards.
1890
1f1f580c 18912009-04-13 Pavel Roskin <proski@gnu.org>
1892
1893 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1894 Reported by John Stanley <jpsinthemix@verizon.net>
1895
7ebc2d6b 18962009-04-13 Robert Millan <rmh@aybabtu.com>
1897
1898 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1899 that name for menuentries when appropriate.
7ebc2d6b 1900
d8ba3667 19012009-04-13 Felix Zielcke <fzielcke@z-51.de>
1902
1903 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1904
cba416eb 19052009-04-13 Robert Millan <rmh@aybabtu.com>
1906
1907 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1908 to Linux, simply abort telling the user it's no longer supported.
1909
a547a745 19102009-04-13 Felix Zielcke <fzielcke@z-51.de>
1911
1912 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1913 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1914 `freebsd_loadenv' only when devices.hints exist.
1915
232a769c 19162009-04-13 Pavel Roskin <proski@gnu.org>
1917
1918 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1919
c3012039 19202009-04-13 Felix Zielcke <fzielcke@z-51.de>
1921
1922 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1923 partition number.
1924 (grub_drive): Likewise.
1925
234022fe 19262009-04-13 David S. Miller <davem@davemloft.net>
1927
1928 * kern/sparc64/ieee1275/ieee1275.c: New file.
1929 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1930 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1931 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1932 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1933 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1934 grub_ieee1275_alloc_physmem): Declare new exported functions.
1935
d8e1836c 1936 * include/grub/sparc64/ieee1275/loader.h: New file.
1937 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1938 * include/grub/sparc64/kernel.h: Likewise.
1939 * loader/sparc64/ieee1275/linux.c: Likewise.
1940
96bd81ec 1941 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1942 (grub_fstest_SOURCES): Likewise.
1943
6a4737e5 1944 * util/hostdisk.c (make_device_name): Do not make any assumptions
1945 about the length of drive names.
1946
1d7a72fd 1947 * kern/dl.c (grub_dl_load_file): Close file immediately when
1948 we are done using it.
1949
56bc2471 19502009-04-12 David S. Miller <davem@davemloft.net>
1951
1952 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1953 values. Noticed by Pavel Roskin.
1954
df38d0bb 1955 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1956 target compiler.
7dd4a573 1957
e382e93a 1958 * genmk.rb: Add more flexible image type specification, also
1959 pass --strip-unneeded to objcopy.
1960 * conf/i386-pc.rmk: Use *_FORMAT.
1961 * conf/i386-pc.mk: Rebuilt.
1962
f5dbbca9 1963 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1964 (OFDISK_HASH_SZ): Define.
1965 (ofdisk_hash): New hash table.
1966 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1967 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1968 instead of device phandle which is not unique.
1969
91c88b12 1970 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1971 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1972 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1973 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1974 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1975 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1976 GRUB_KERNEL_MACHINE_DATA_END): Define.
1977 (grub_kernel_image_size, grub_total_module_size): Declare.
1978
5b5d4aa5 19792009-04-12 Pavel Roskin <proski@gnu.org>
1980
7dd4a573 1981 * configure.ac: Change the logic when we check for target tools.
1982 Do it when the target is specified and it's different from the
1983 specified value of the host.
5b5d4aa5 1984
c91e1793 19852009-04-11 Felix Zielcke <fzielcke@z-51.de>
1986
1987 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1988 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1989 GNU/kFreeBSD. Check if a device is a character device. Use
1990 DIOCGMEDIASIZE to get the size.
1991 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1992 support for GNU/kFreeBSD.
1993 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1994 is a character device instead of a block device. Add support for
1995 FreeBSD device names.
1996
1997 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1998 is a character device instead of a block device.
1999
2000 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2001 is a character device instead of a block device.
2002
b1ac8644 20032009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2004
2005 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2006 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2007 FreeBSD. Check if a device is a character device. Use
2008 DIOCGMEDIASIZE to get the size.
2009 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2010 support for FreeBSD.
2011 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2012 is a character device instead of a block device. Add support for
2013 FreeBSD device names.
2014
2015 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2016 a character device instead of a block device.
2017 (grub_util_check_char_device): New function.
2018
2019 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2020 a character device instead of a block device.
2021
2022 * include/grub/util/getroot.h (grub_util_check_char_device): New
2023 prototype.
2024
a3f7515a 20252009-04-11 David S. Miller <davem@davemloft.net>
2026
2027 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2028 static libgcc.
2029 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2030 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2031 function, if present.
2032 (__bswapdi2): Likewise.
2033
0d44993d 2034 * include/grub/sparc64/ieee1275/boot.h: New file.
2035 * boot/sparc64/ieee1275/boot.S: Likewise.
2036 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2037
ed3d2bc2 2038 * kern/misc.c (grub_ltoa): New function.
2039 (grub_vsprintf): Use it to format 'long' integers.
2040
d3bfb59c 20412009-04-10 David S. Miller <davem@davemloft.net>
2042
2043 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2044 slots are of type grub_ieee1275_cell_t.
2045 (grub_nand_read): Likewise.
2046 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2047 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2048 macros are used to compare values in arg/ret block of the call.
2049 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2050 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2051 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2052 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2053 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2054 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2055 grub_ieee1275_close, grub_ieee1275_set_property,
2056 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2057 grub_ieee1275_cell_t.
2058 * kern/ieee1275/openfw.c (grub_map): Likewise.
2059 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2060 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2061
450e2238 2062 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2063 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2064 (grub_devalias_iterate): Likewise.
2065
7dd4a573 20662009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 2067
2068 UFS improvements
2069
2070 * fs/ufs.c (INODE_NBLOCKS): new definition
2071 (struct grub_ufs_dirent): added fields for non-BSD dirents
2072 (grub_ufs_get_file_block): fixed double indirect handling
2073 (grub_ufs_lookup_symlink): use more robust way to determine whether
2074 symlink is inline
2075 (grub_ufs_find_file): support for non-BSD dirents
2076 (grub_ufs_dir): support for non-BSD dirents
2077
e7e6862a 20782009-04-10 Bean <bean123ch@gnail.com>
2079
2080 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2081 attribute, otherwise the size would be wrong for i386 platform.
2082
2083 * include/grub/pci.h (grub_pci_read_word): New inline function.
2084 (grub_pci_read_byte): Likewise.
2085 (grub_pci_write): Likewise.
2086 (grub_pci_write_word): Likewise.
2087 (grub_pci_write_byte): Likewise.
2088
2089 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2090
2091 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2092 (find_framebuf): Scan pci to locate the frame buffer address.
2093
2094 * commands/efi/fixvideo.c: New file.
2095
2096 * commands/efi/loadbios.c: Likewise.
2097
2098 * commands/memrw.c: Likewise.
2099
2100 * util/grub-dumpbios.in: Likewise.
2101
2102 * conf/common.rmk (grub-dumpbios): New utility.
2103 (pkglib_MODULES): New module memrw.mod.
2104 (memrw_mod_SOURCE): New macro.
2105 (memrw_mod_CFLAGS): Likewise.
2106 (memrw_mod_LDFLAGS): Likewise.
2107
7dd4a573 2108 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2109 fixvideo.mod.
2110 (loadbios_mod_SOURCE): New macro.
2111 (loadbios_mod_CFLAGS): Likewise.
2112 (loadbios_mod_LDFLAGS): Likewise.
2113 (fixvideo_mod_SOURCE): Likewise.
2114 (fixvideo_mod_CFLAGS): Likewise.
2115 (fixvideo_mod_LDFLAGS): Likewise.
2116
7dd4a573 2117 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2118 fixvideo.mod.
2119 (loadbios_mod_SOURCE): New macro.
2120 (loadbios_mod_CFLAGS): Likewise.
2121 (loadbios_mod_LDFLAGS): Likewise.
2122 (fixvideo_mod_SOURCE): Likewise.
2123 (fixvideo_mod_CFLAGS): Likewise.
2124 (fixvideo_mod_LDFLAGS): Likewise.
2125
af63ada2 21262009-04-08 Felix Zielcke <fzielcke@z-51.de>
2127
2128 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2129
c2cdde70 21302009-04-07 David S. Miller <davem@davemloft.net>
2131
2132 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2133 support for R_SPARC_OLO10 relocations. Fix compile warning for
2134 R_SPARC_WDISP30 case.
ea3f72cf 2135 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 2136
761319cf 21372009-04-06 Pavel Roskin <proski@gnu.org>
2138
1007d1f5 2139 * include/grub/misc.h (ARRAY_SIZE): New macro.
2140 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2141 New macro.
2142 * loader/i386/linux.c (allocate_pages): Use free_pages().
2143 (grub_linux_unload): Don't use free_pages().
2144 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2145 wrong index. Treat all other modes as text modes.
2146 (grub_cmd_linux): Initialize vid_mode unconditionally to
2147 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2148
761319cf 2149 * commands/help.c (print_command_help): Use cmd->prio, not
2150 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2151
ea761d40 21522009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 2153
ea761d40 2154 Parttool
2155
2156 * parttool/pcpart.c: new file
2157 * commands/parttool.c: likewise
2158 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2159 (parttool_mod_SOURCES): new variable
2160 (parttool_mod_CFLAGS): likewise
2161 (parttool_mod_LDFLAGS): likewise
2162 (pcpart_mod_SOURCES): likewise
2163 (pcpart_mod_CFLAGS): likewise
2164 (pcpart_mod_LDFLAGS): likewise
7dd4a573 2165 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 2166 and parttool/pcpart.c
2167 * conf/i386-efi.rmk: likewise
2168 * conf/i386-ieee1275.rmk: likewise
2169 * conf/i386-pc.rmk: likewise
2170 * conf/powerpc-ieee1275.rmk: likewise
2171 * conf/sparc64-ieee1275.rmk: likewise
2172 * conf/x86_64-ieee1275.rmk: likewise
2173
05aaebfb 21742009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2175
2176 Support for mtime and further expandability of dir command
2177
2178 * include/grub/lib/datetime.h: moved to ...
7dd4a573 2179 * include/grub/datetime.h: ... moved here and added
05aaebfb 2180 declaration of grub_unixtime2datetime. All users updated
7dd4a573 2181 * include/grub/fs.h: new syntax for dir and mtime functions in
2182 struct grub_fs
05aaebfb 2183 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2184 and GRUB_FSHELP_FLAGS_MASK
2185 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2186 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2187 (grub_ext2_mtime): new function
2188 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2189 (grub_hfsplus_mtime): new function
2190 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2191 (GRUB_UFS_ATTR_FILE): likewise
2192 (GRUB_UFS_ATTR_LNK): likewise
2193 (struct grub_ufs_sblock): new fields mtime
2194 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2195 all users updated
2196 (grub_ufs_dir): mtime support
2197 (grub_ufs_mtime): new function
2198 * fs/affs.c (grub_affs_dir): use new dir syntax
2199 * fs/afs.c (grub_afs_dir): likewise
2200 * fs/cpio.c (grub_cpio_dir): likewise
2201 * fs/fat.c (grub_fat_find_dir): likewise
2202 * fs/hfs.c (grub_hfs_dir): likewise
2203 * fs/iso9660.c (grub_iso9660_dir): likewise
2204 * fs/jfs.c (grub_jfs_dir): likewise
2205 * fs/minix.c (grub_minix_dir): likewise
2206 * fs/ntfs.c (grub_ntfs_dir): likewise
2207 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2208 * fs/sfs.c (grub_sfs_dir): likewise
2209 * fs/xfs.c (grub_xfs_dir): likewise
2210 * util/hostfs.c (grub_hostfs_dir): likewise
2211 * lib/datetime.c: moved to ...
2212 * normal/datetime.c: ... moved here
2213 (grub_unixtime2datetime): new function
2214 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2215 * normal/completion.c (iterate_dir): use new dir syntax
2216 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2217 last modification time of a volume
7dd4a573 2218 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2219 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2220 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2221 (normal_mod_SOURCES): likewise
2222 (datetime_mod_SOURCES): Removed lib/datetime.c
2223 * conf/i386-efi.rmk: likewise
7dd4a573 2224 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2225 * conf/i386-pc.rmk: likewise
2226 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2227 * conf/sparc64-ieee1275.rmk: likewise
2228 * conf/x86_64-efi.rmk: likewise
05aaebfb 2229
8a7e1a14 22302009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2231
2232 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2233
2234 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2235 on grub_fat_find_dir
2236 (grub_fat_find_dir): use grub_fat_iterate_dir
2237 (grub_fat_label): likewise
2238
04186a9c 22392009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2240
7dd4a573 2241 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2242 and command.h
2243 remove extraneous kernel_elf_HEADERS
2244
da4c0bb6 22452009-04-04 Bean <bean123ch@gnail.com>
2246
2247 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2248
2249 * util/misc.c: Likewise.
2250
54ad9555 22512009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2252
2253 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2254 instead of grub_printf.
2255
7a6bf9f2 22562009-04-03 Robert Millan <rmh@aybabtu.com>
2257
2258 * loader/i386/linux.c (grub_linux_setup_video): Fill
2259 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2260 values from `mode info' structure instead of hardcoded
2261 values.
2262
3fcc2083 22632009-04-01 Pavel Roskin <proski@gnu.org>
2264
2265 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2266 unused now.
2267 * genmk.rb: Likewise.
2268 * configure.ac: Likewise.
2269
5ec9740b 22702009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2271
2272 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2273 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2274
5270cec8 22752009-04-01 David S. Miller <davem@davemloft.net>
2276
2277 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2278 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2279 (grub_setjmp): Mark with 'returns_twice' attribute.
2280 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2281 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2282 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2283
9c3dd854 22842009-04-01 Robert Millan <rmh@aybabtu.com>
2285
2286 Reapply fix from 2008-07-28 which was accidentally reverted; also
2287 perform the same fix to a similar check in same function.
2288
2289 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2290 with the same number are found, just use issue a warning with
2291 grub_dprintf(), as this error has been reported to be non-fatal.
2292
0d818b7e 22932009-03-31 Pavel Roskin <proski@gnu.org>
2294
2295 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2296 for cross-compilation.
2297
95646d92 22982009-03-30 Robert Millan <rmh@aybabtu.com>
2299
2300 Fix i386-ieee1275 build.
2301
2302 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2303 Remove declaration.
2304
6a003ed1 23052009-03-30 Pavel Roskin <proski@gnu.org>
2306
2307 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2308 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2309 zero-terminated, rely only on the strlen value. Fix comparison
2310 of strings differing in length.
2311
92f33540 23122009-03-30 Robert Millan <rmh@aybabtu.com>
2313
2314 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2315 checking for abi version. Improve error messages on BIOS to notify
2316 user about `linux16' command.
2317
a8c48fd5 23182009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2319
f968172e 2320 Leak fixes
a8c48fd5 2321
f968172e 2322 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2323 in case of collision
2324 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 2325
9c323f09 23262009-03-29 Robert Millan <rmh@aybabtu.com>
2327
2328 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2329 set `vid_mode' accordingly.
2330 (grub_linux_boot): Process `vid_mode' and set video mode.
2331
ae68f423 23322009-03-29 Robert Millan <rmh@aybabtu.com>
2333
2334 * util/grub.d/10_linux.in (linux_entry): New function.
2335 Factorize generation of Linux boot entries.
2336
5709cfc4 23372009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2338
2339 Make the format of Environment Block plain text. The boot loader
2340 part is not tested well yet.
7dd4a573 2341
5709cfc4 2342 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2343 (buffer): Removed.
2344 (envblk): Likewise.
2345 (usage): Remove "info" and "clear". Add "unset". Update the
2346 description of "set", as this does not delete variables any
2347 longer.
2348 (create_envblk_file): Complete rewrite.
2349 (open_envblk_file): Likewise.
2350 (cmd_info): Removed.
2351 (cmd_list): Likewise.
2352 (cmd_set): Likewise.
2353 (cmd_clear): Likewise.
2354 (list_variables): New function.
2355 (write_envblk): Likewise.
2356 (set_variables): Likewise.
2357 (unset_variables): Likewise.
2358 (main): Complete rewrite.
2359
2360 * commands/loadenv.c (buffer): Removed.
2361 (envblk): Likewise.
2362 (open_envblk_file): New function.
2363 (read_envblk_file): Complete rewrite.
2364 (grub_cmd_load_env): Likewise.
2365 (grub_cmd_list_env): Likewise.
2366 (struct blocklist): New struct.
2367 (free_blocklists): New function.
2368 (check_blocklists): Likewise.
2369 (write_blocklists): Likewise.
2370 (grub_cmd_save_env): Complete rewrite.
2371
2372 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2373 a plain text signature.
2374 (GRUB_ENVBLK_MAXLEN): Removed.
2375 (struct grub_envblk): Complete rewrite.
2376 (grub_envblk_find): Removed.
2377 (grub_envblk_insert): Likewise.
2378 (grub_envblk_open): New prototype.
2379 (grub_envblk_set): Likewise.
2380 (grub_envblk_delete): Put const to VALUE.
2381 (grub_envblk_iterate): Put const to NAME and VALUE.
2382 (grub_envblk_close): New prototype.
2383 (grub_envblk_buffer): New inline function.
2384 (grub_envblk_size): Likewise.
2385
2386 * lib/envblk.c: Include grub/mm.h.
2387 (grub_env_find): Removed.
2388 (grub_envblk_open): New function.
2389 (grub_envblk_close): Likewise.
2390 (escaped_value_len): Likewise.
2391 (find_next_line): Likewise.
2392 (grub_envblk_insert): Removed.
2393 (grub_envblk_set): New function.
2394 (grub_envblk_delete): Complete rewrite.
2395 (grub_envblk_iterate): Likewise.
2396
a9368fd3 23972009-03-28 Robert Millan <rmh@aybabtu.com>
2398
2399 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2400 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2401 variables. Use 16-bit loader.
2402 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2403 loader.
2404 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2405 (grub_linux16_boot): ... this. Update all users.
2406 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2407 (grub_linux_boot): ... this. Update all users.
2408
2409 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2410 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2411 commands to `linux16' and `initrd16'.
2412 (GRUB_MOD_FINI(linux)): Rename to ...
2413 (GRUB_MOD_FINI(linux16)): ... this.
2414
e4dd5a7e 24152009-03-24 Pavel Roskin <proski@gnu.org>
2416
2417 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2418 not just for compilation.
2419
c04d6e05 24202009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2421
2422 Move multiboot helper out of kernel
2423
2424 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2425 `loader/i386/multiboot_helper.S'.
2426 * conf/i386-coreboot.rmk: Likewise
2427 * conf/i386-ieee1275.rmk: Likewise
2428
2429 * kern/i386/loader.S: Move multiboot helpers from here...
2430 * loader/i386/multiboot_helper.S: ...moved here
2431 * include/grub/i386/loader.h: Move declarations of multiboot
2432 helpers from here...
2433 * include/grub/i386/multiboot.h: ...moved here
2434 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2435
42a5b3fc 24362009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2437
2438 * kern/env.c (grub_env_context_open): Added an argument to specify
2439 whether a new context inherits exported variables from current
2440 one. This is useful when making a sandbox to interpret a config
2441 file.
2442 All callers updated.
2443
2444 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2445
b28bbc4e 24462009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2447
2448 * kern/env.c (grub_env_context_close): Fix memory leaks.
2449
f04f02e4 24502009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2451
2452 * normal/main.c (grub_normal_execute): Added an argument
2453 BATCH to specify if an interactive interface should be provided
2454 after reading a config file.
2455 All callers updated.
2456 (read_command_list): Prevent being executed twice.
2457 (read_fs_list): Likewise.
2458
42a5b3fc 2459 * include/grub/normal.h (grub_normal_execute): Updated the
2460 prototype.
f04f02e4 2461
41473ac2 24622009-03-22 Pavel Roskin <proski@gno.org>
2463
fbc00b0c 2464 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2465 _start.
2466 * kern/i386/pc/startup.S: Likewise.
2467 * kern/i386/efi/startup.S: Likewise.
2468 * kern/i386/ieee1275/startup.S: Likewise.
2469 * kern/i386/coreboot/startup.S: Likewise.
2470 * kern/x86_64/efi/startup.S: Likewise.
2471
41473ac2 2472 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2473 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2474 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2475
2274cc8f 24762009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2477
2478 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2479
2480 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2481 limit detection.
2482 Use vaddr of correct segment for entry_point.
2483
b1b797cb 24842009-03-21 Bean <bean123ch@gmail.com>
2485
2486 * commands/blocklist.c: Add include file <grub/command.h>, remove
2487 <grub/normal.h> and <grub/arg.h>.
2488 (grub_cmd_blocklist): Use the new command interface.
2489 (GRUB_MOD_INIT): Likewise.
2490 (GRUB_MOD_FINI): Likewise.
2491 * commands/boot.c: Likewise.
2492 * commands/cat.c: Likewise.
2493 * commands/cmp.c: Likewise.
2494 * commands/configfile.c: Likewise.
2495 * commands/crc.c: Likewise.
2496 * commands/echo.c: Likewise.
2497 * commands/halt.c: Likewise.
2498 * commands/handler.c: Likewise.
2499 * commands/hdparm.c: Likewise.
2500 * commands/help.c: Likewise.
2501 * commands/hexdump.c: Likewise.
2502 * commands/loadenv.c: Likewise.
2503 * commands/ls.c: Likewise.
2504 * commands/lsmmap.c: Likewise.
2505 * commands/lspci.c: Likewise.
2506 * commands/loadenv.c: Likewise.
2507 * commands/read.c: Likewise.
2508 * commands/reboot.c: Likewise.
2509 * commands/search.c: Likewise.
2510 * commands/sleep.c: Likewise.
2511 * commands/test.c: Likewise.
2512 * commands/usbtest.c: Likewise.
2513 * commands/videotest.c: Likewise.
2514 * commands/i386/cpuid.c: Likewise.
2515 * commands/i386/pc/halt.c: Likewise.
2516 * commands/i386/pc/play.c: Likewise.
2517 * commands/i386/pc/pxecmd.c: Likewise.
2518 * commands/i386/pc/vbeinfo.c: Likewise.
2519 * commands/i386/pc/vbetest.c: Likewise.
2520 * commands/ieee1275/suspend.c: Likewise.
2521 * disk/loopback.c: Likewise.
2522 * font/font_cmd.c: Likewise.
2523 * hello/hello.c: Likewise.
2524 * loader/efi/appleloader.c: Likewise.
2525 * loader/efi/chainloader.c: Likewise.
2526 * loader/i386/bsd.c: Likewise.
2527 * loader/i386/efi/linux.c: Likewise.
2528 * loader/i386/ieee1275/linux.c: Likewise.
2529 * loader/i386/linux.c: Likewise.
2530 * loader/i386/pc/chainloader.c: Likewise.
2531 * loader/i386/pc/linux.c: Likewise.
2532 * loader/powerpc/ieee1275/linux.c: Likewise.
2533 * loader/multiboot_loader.c: Likewise.
2534 * term/gfxterm.c: Likewise.
2535 * term/i386/pc/serial.c: Likewise.
2536 * term/terminfo.c: Likewise.
2537
2538 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2539 * term/i386/pc/vga.c: Likewise.
2540 * video/readers/jpeg.c: Likewise.
2541 * video/readers/png.c: Likewise.
2542 * video/readers/tga.c: Likewise.
2543
2544 * util/grub-fstest (cmd_loopback): Removed.
2545 (cmd_blocklist): Likewise.
2546 (cmd_ls): Likewise.
2547 (grub_register_command): Likewise.
2548 (grub_unregister_command): Likewise.
2549 (execute_command): Use grub_command_find to locate command and execute
2550 it.
2551
2552 * include/grub/efi/chainloader.h: Removed.
2553 * loader/efi/chainloader_normal.c: Likewise.
2554 * loader/i386/bsd_normal.c: Likewise.
2555 * loader/i386/pc/chainloader_normal.c: Likewise.
2556 * loader/i386/pc/multiboot_normal.c: Likewise.
2557 * loader/linux_normal.c: Likewise.
2558 * loader/multiboot_loader_normal.c: Likewise.
2559 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2560
2561 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2562 and grub_register_command_p1.
2563
2564 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2565 kern/command.c, lib/arg.c and commands/extcmd.c.
2566 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2567 (minicmd_mod_SOURCES): New variable.
2568 (minicmd_mod_CFLAGS): Likewise.
2569 (minicmd_mod_LDFLAGS): Likewise.
2570 (extcmd_mod_SOURCES): Likewise.
2571 (extcmd_mod_CFLAGS): Likewise.
2572 (extcmd_mod_LDFLAGS): Likewise.
2573 (boot_mod_SOURCES): Removed.
2574 (boot_mod_CFLAGS): Likewise.
2575 (boot_mod_LDFLAGS): Likewise.
2576
2577 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2578 kern/corecmd.c.
2579 (kernel_img_HEADERS): Add command.h.
2580 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2581 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2582 and lib/arg.c.
2583 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2584 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2585 remove the corresponding normal mode command.
2586 (normal_mod_SOURCES): Remove normal/arg.c.
2587 * conf/i386-coreboot.rmk: Likewise.
2588 * conf/i386-efi.rmk: Likewise.
2589 * conf/i386-ieee1275.rmk: Likewise.
2590 * conf/powerpc-ieee1275.rmk: Likewise.
2591 * conf/x86_64-efi.rmk: Likewise.
2592
2593 * include/grub/arg.h: Move from here ...
2594 * include/grub/lib/arg.h: ... to here.
2595
2596 * normal/arg.c: Move from here ...
2597 * lib/arg.c: ... to here.
2598
2599 * commands/extcmd.c: New file.
2600 * commands/minicmd.c: Likewise.
2601 * include/grub/command.h: Likewise.
2602 * include/grub/extcmd.h: Likewise.
2603 * kern/command.c: Likewise.
2604 * kern/corecmd.c: Likewise.
2605
2606 * kern/list.c (grub_list_iterate): Return int instead of void.
2607 (grub_list_insert): New function.
2608 (grub_prio_list_insert): Likewise.
2609
2610 * kern/rescue.c (grub_rescue_command): Removed.
2611 (grub_rescue_command_list): Likewise.
2612 (grub_rescue_register_command): Likewise.
2613 (grub_rescue_unregister_command): Likewise.
2614 (grub_rescue_cmd_boot): Move to minicmd.c
2615 (grub_rescue_cmd_help): Likewise.
2616 (grub_rescue_cmd_info): Likewise.
2617 (grub_rescue_cmd_boot): Likewise.
2618 (grub_rescue_cmd_testload): Likewise.
2619 (grub_rescue_cmd_dump): Likewise.
2620 (grub_rescue_cmd_rmmod): Likewise.
2621 (grub_rescue_cmd_lsmod): Likewise.
2622 (grub_rescue_cmd_exit): Likewise.
2623 (grub_rescue_print_devices): Moved to corecmd.c.
2624 (grub_rescue_print_files): Likewise.
2625 (grub_rescue_cmd_ls): Likewise.
2626 (grub_rescue_cmd_insmod): Likewise.
2627 (grub_rescue_cmd_set): Likewise.
2628 (grub_rescue_cmd_unset): Likewise.
7d074e3c 2629 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 2630 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 2631 commands, remove grub_rescue_register_command calls.
b1b797cb 2632
7d074e3c 2633 * normal/command.c (grub_register_command): Removed.
b1b797cb 2634 (grub_unregister_command): Likewise.
2635 (grub_command_find): Likewise.
2636 (grub_iterate_commands): Likewise.
2637 (rescue_command): Likewise.
2638 (export_command): Moved to corecmd.c.
2639 (set_command): Removed.
2640 (unset_command): Likewise.
2641 (insmod_command): Likewise.
2642 (rmmod_command): Likewise.
2643 (lsmod_command): Likewise.
2644 (grub_command_init): Likewise.
2645
2646 * normal/completion.c (iterate_command): Use cmd->prio to check for
2647 active command.
2648 (complete_arguments): Use grub_extcmd_t structure to find options.
2649 (grub_normal_do_completion): Change function grub_iterate_commands to
2650 grub_command_iterate.
2651
2652 * normal/execute.c (grub_script_execute_cmd): No need to parse
2653 argument here.
2654
2655 * normal/main.c (grub_dyncmd_dispatcher): New function.
2656 (read_command_list): Register unload commands as dyncmd.
2657 (grub_cmd_normal): Use new command interface, register rescue,
2658 unregister normal at entry, register normal, unregister rescue at exit.
2659
2660 * include/grub/list.h (grub_list_test_t): New type.
2661 (grub_list_iterate): Return int instead of void.
2662 (grub_list_insert): New function.
2663 (GRUB_AS_NAMED_LIST_P): New macro.
2664 (GRUB_AS_PRIO_LIST): Likewise.
2665 (GRUB_AS_PRIO_LIST_P): Likewise.
2666 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2667 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2668 (grub_prio_list): New structure.
2669 (grub_prio_list_insert): New function.
2670 (grub_prio_list_remove): New inline function.
2671
2672 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2673 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2674 (GRUB_COMMAND_FLAG_MENU): Likewise.
2675 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2676 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2677 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2678 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2679 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2680 (grub_command): Likewise.
2681 (grub_register_command): Likewise.
2682 (grub_command_find): Likewise.
2683 (grub_iterate_commands): Likewise.
2684 (grub_command_init): Likewise.
2685 (grub_arg_parse): Likewise.
2686 (grub_arg_show_help): Likewise.
2687
2688 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2689 (grub_rescue_unregister_command): Likewise.
2690
2691 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2692 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2693 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2694
2695 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2696 grub_rescue_cmd_initrd.
2697 * include/grub/i386/loader.h: Likewise.
2698 * include/grub/x86_64/loader.h: Likewise.
2699
2700 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2701
1f4147aa 27022009-03-21 Bean <bean123ch@gmail.com>
2703
2704 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2705 instead of stat in mingw environment.
2706
2707 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2708
2709 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2710
2711 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2712 AC_CONFIG_LINKS.
2713
2156d5ba 27142009-03-21 Bean <bean123ch@gmail.com>
2715
2716 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2717 out of range error.
2718
177b82ca 27192009-03-18 Michel Dänzer <michel@daenzer.net>
2720
2721 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2722 checking inode flags for EXT4_EXTENTS_FLAG.
2723
14aad807 27242009-03-18 Robert Millan <rmh@aybabtu.com>
2725
2726 * loader/i386/linux.c: Include `<grub/video.h>' and
2727 `<grub/i386/pc/vbe.h>'..
2728 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2729 (grub_linux32_boot): Attempt to configure video settings with
2730 grub_linux_setup_video().
2731 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2732 to avoid grub_console_fini() which would step out of graphical mode
2733 unconditionally.
2734
8cf83a27 27352009-03-14 Robert Millan <rmh@aybabtu.com>
2736
2737 Fix build on powerpc.
2738 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2739
40164e75 27402009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2741
2742 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2743 background image command.
2744
c58bc32a 27452009-03-12 Colin D Bennett <colin@gibibit.com>
2746
2747 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2748 (grub_gfxterm_putchar): Extract pairs of identical calls to
2749 draw_cursor out of conditional blocks.
2750
5415144a 27512009-03-11 Pavel Roskin <proski@gnu.org>
2752
2753 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2754 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2755
6394042e 27562009-03-11 Robert Millan <rmh@aybabtu.com>
2757
2758 * loader/i386/multiboot_elfxx.c
2759 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2760
b7b50e5f 27612009-03-11 Felix Zielcke <fzielcke@z-51.de>
2762
2763 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2764 `kern/handler.c'.
2765
1ca7fc96 27662009-03-11 Robert Millan <rmh@aybabtu.com>
2767
2768 * loader/i386/multiboot.c (code_size): New variable.
2769 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 2770 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 2771 4-byte alignment to MBI and others by increasing
7d074e3c 2772 `boot_loader_name_length' appropriately.
1ca7fc96 2773
2774 * loader/i386/multiboot_elfxx.c
2775 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2776
a83ea1d2 27772009-03-09 Felix Zielcke <fzielcke@z-51.de>
2778
2779 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2780 `fs/ext2.c'.
2781
aa9f3bff 27822009-03-08 Robert Millan <rmh@aybabtu.com>
2783
2784 Make loader/i386/linux.c usable on i386-pc again.
2785
2786 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2787 memory to heap.
2788 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2789 `#error' stanza.
2790
d8b3b60e 27912009-03-07 Bean <bean123ch@gmail.com>
2792
2793 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2794 allocation.
2795
b362c9e9 27962009-03-06 Robert Millan <rmh@aybabtu.com>
2797
2798 Fix display issue on terminals with screen size other than 80x25
2799 (e.g. gfxterm with resolution higher than 640x480).
2800
2801 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 2802 position relative to the center of the terminal instead of relying
b362c9e9 2803 on a hardcoded offset.
2804
9304eef1 28052009-03-04 Robert Millan <rmh@aybabtu.com>
2806
2807 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2808 installed.
2809
2810 * Makefile.in (host_kernel): New variable.
2811 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2812 scripts instead of just the windows one.
2813 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2814
eabc95fb 28152009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 2816
2817 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2818 `kern/handler.c'.
2819 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2820 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2821 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2822 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2823 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2824 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2825
ceb1223c 28262009-03-04 Felix Zielcke <fzielcke@z-51.de>
2827
2828 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2829 or if there's no space for the disk label and print the partition number on a
2830 invalid magic.
2831
4910684a 28322009-03-04 Felix Zielcke <fzielcke@z-51.de>
2833
2834 * util/misc.c: Include <time.h>.
2835 (grub_millisleep): New function.
2836
7e9ca17a 28372009-03-04 Bean <bean123ch@gmail.com>
2838
2839 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2840 another option -mno-red-zone.
2841
2842 * commands/handler.c: Change module description.
2843
2844 * kern/handler.c: Add missing space at the end of description line.
2845
2846 * kern/list.c: Likewise.
2847
f501677c 28482009-03-03 Robert Millan <rmh@aybabtu.com>
2849
2850 Move more components to the relocation area, and fix mbi pointer
2851 handling to use the destination rather than the origin (thanks to
2852 Vladimir Serbinenko for spotting).
2853
2854 * loader/i386/multiboot.c (mbi_dest): New variable.
2855 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2856 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2857 relocation area.
2858
9902d047 28592009-03-01 Bean <bean123ch@gmail.com>
2860
50fb7002 2861 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 2862 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2863 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2864 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2865
2866 * loader/i386/efi/linux.c (acpi_guid): New variable.
2867 (acpi_guid): Likewise.
2868 (EBDA_SEG_ADDR): New constant.
2869 (LOW_MEM_ADDR): Likewise.
2870 (FAKE_EBDA_SEG): Likewise.
2871 (fake_bios_data): New function.
2872 (grub_linux_boot): Call fake_bios_data.
2873
71b9f361 28742009-03-01 Bean <bean123ch@gmail.com>
2875
2876 * commands/terminal.c: Removed.
2877
2878 * commands/handler.c: New file.
2879
2880 * include/grub/list.h: Likewise.
2881
2882 * include/grub/handler.h: Likewise.
2883
2884 * kern/list.c: Likewise.
2885
2886 * kern/handler.c: Likewise.
2887
2888 * kern/term.h: Include header file <grub/handler.h>.
2889 (grub_term_input): Move next field to the beginning.
2890 (grub_term_output): Likewise.
2891 (grub_term_input_class): New variable.
2892 (grub_term_output_class): Likewise.
2893 (grub_term_register_input): Changed to inline function.
2894 (grub_term_register_output): Likewise.
2895 (grub_term_unregister_input): Likewise.
2896 (grub_term_unregister_output): Likewise.
2897 (grub_term_set_current_input): Likewise.
2898 (grub_term_set_current_output): Likewise.
2899 (grub_term_get_current_input): Likewise.
2900 (grub_term_get_current_output): Likewise.
2901 (grub_term_iterate_input): Removed.
2902 (grub_term_iterate_output): Likewise.
2903
2904 * kern/term.c (grub_term_list_input): Removed.
2905 (grub_term_list_output): Likewise.
2906 (grub_term_input_class): New variable.
2907 (grub_term_output_class): Likewise.
50fb7002 2908 (grub_cur_term_input): Change variable as macro.
71b9f361 2909 (grub_cur_term_output): Likewise.
2910 (grub_term_register_input): Removed.
2911 (grub_term_register_output): Likewise.
2912 (grub_term_unregister_input): Likewise.
2913 (grub_term_unregister_output): Likewise.
2914 (grub_term_set_current_input): Likewise.
2915 (grub_term_set_current_output): Likewise.
2916 (grub_term_iterate_input): Likewise.
2917 (grub_term_iterate_output): Likewise.
2918 (grub_term_get_current_input): Likewise.
2919 (grub_term_get_current_output): Likewise.
2920
2921 * util/grub-editenv.c: Include header file <grub/handler.h>.
2922 (grub_term_get_current_input): Removed.
2923 (grub_term_get_current_output): Likewise.
2924 (grub_term_input_class): New variable.
50fb7002 2925 (grub_term_output_class): Likewise.
71b9f361 2926
2927 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2928 (grub_term_get_current_output): Likewise.
2929 (grub_term_input_class): New variable.
50fb7002 2930 (grub_term_output_class): Likewise.
71b9f361 2931
2932 * util/grub-probe.c (grub_term_get_current_input): Removed.
2933 (grub_term_get_current_output): Likewise.
2934 (grub_term_input_class): New variable.
50fb7002 2935 (grub_term_output_class): Likewise.
71b9f361 2936
2937 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2938 (grub_term_get_current_output): Likewise.
2939 (grub_term_input_class): New variable.
50fb7002 2940 (grub_term_output_class): Likewise.
71b9f361 2941
2942 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2943 (terminal_mod_SOURCES): Likewise.
2944 (terminal_mod_CFLAGS): Likewise.
2945 (terminal_mod_LDFLAGS): Likewise.
2946
2947 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2948 handler.c.
2949 (kernel_img_SOURCES): Add list.c and handler.c.
2950 (kernel_img_HEADERS): Add list.h and handler.h.
2951
2952 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2953 handler.c.
2954 (kernel_mod_SOURCES): Add list.c and handler.c.
2955 (kernel_mod_HEADERS): Add list.h and handler.h.
2956
2957 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2958 handler.c.
2959 (kernel_elf_SOURCES): Add list.c and handler.c.
2960 (kernel_elf_HEADERS): Add list.h and handler.h.
2961
2962 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2963 handler.c.
2964 (kernel_elf_SOURCES): Add list.c and handler.c.
2965 (kernel_elf_HEADERS): Add list.h and handler.h.
2966
2967 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2968 handler.c.
2969 (kernel_mod_SOURCES): Add list.c and handler.c.
2970 (kernel_mod_HEADERS): Add list.h and handler.h.
2971
2972 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2973 handler.c.
2974 (kernel_elf_SOURCES): Add list.c and handler.c.
2975 (kernel_elf_HEADERS): Add list.h and handler.h.
2976
8a31787f 29772009-02-27 Robert Millan <rmh@aybabtu.com>
2978
2979 Factorize elf32 / elf64 code in Multiboot loader. This will
2980 prevent it from getting out of sync again.
2981
2982 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2983 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2984 grub_multiboot_load_elf64): Move from here ...
2985 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2986 grub_multiboot_load_elf): ... to here (new file).
2987
51cd3dfc 29882009-02-27 Robert Millan <rmh@aybabtu.com>
2989
2990 * util/grub.d/10_linux.in: Rename "single-user mode" to
2991 "recovery mode".
2992
6e8c9c3a 29932009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2994
2995 Don't leak in SCSI code.
2996 * disk/scsi.c (grub_scsi_close): free `scsi'.
2997
4b6bf4f9 29982009-02-27 Robert Millan <rmh@aybabtu.com>
2999
3000 * loader/i386/pc/multiboot.c: Move from here ...
3001 * loader/i386/multiboot.c: ... to here. Update all users.
3002
b9413424 30032009-02-27 Robert Millan <rmh@aybabtu.com>
3004
3005 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3006 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3007
50fb7002 30082009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 3009
3010 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3011 b-tree.
3012
8cc50345 30132009-02-27 Robert Millan <rmh@aybabtu.com>
3014
3015 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3016 `0x' qualifier as 0 when base is specified as parameter).
3017
6e09b8b7 30182009-02-24 Bean <bean123ch@gmail.com>
3019
3020 * configure.ac: Check for -mcmodel=large in x86_64 target.
3021
3022 * include/grub/efi/api.h (efi_call_10): New macro.
3023 (efi_wrap_10): New function.
3024
3025 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3026 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3027 (GRUB_PE32_REL_BASED_LOW): Likewise.
3028 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3029 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3030 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3031 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3032 (GRUB_PE32_REL_BASED_REL): Likewise.
3033 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3034 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3035 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3036
3037 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3038 issue.
3039
3040 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3041 (efi_wrap_10): New function.
3042
3043 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3044
3045 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3046 MB/MBP model (NV chipset).
3047 (devdata_devs): Add devpath_5 to the list.
3048
3049 * load/i386/efi/linux.c (video_base): Remove variable.
3050 (RGB_MASK): New macro.
3051 (RGB_MAGIC): Likewise.
3052 (LINE_MIN): Likewise.
3053 (LINE_MAX): Likewise.
3054 (FBTEST_STEP): Likewise.
3055 (FBTEST_COUNT): Likewise.
3056 (fb_list): New variable.
3057 (grub_find_video_card): Remove function.
3058 (find_framebuf): New function.
3059 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3060 line length.
3061
3062 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3063 problem for x86_64.
3064
74b21bee 30652009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3066
3067 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3068
3069 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3070 coding tool name.
3071
a455f472 30722009-02-22 Robert Millan <rmh@aybabtu.com>
3073
3074 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3075 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3076 in our relocation, instead of using it directly from heap. Also
3077 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3078
6374daf3 30792009-02-21 Robert Millan <rmh@aybabtu.com>
3080
3081 Implement USB keyboard support (based on patch by Marco Gerards)
3082
3083 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3084 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3085 (usb_keyboard_mod_LDFLAGS): New variables.
3086
3087 * term/usb_keyboard.c: New file.
3088
8fa4ea70 30892009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3090
3091 Corrected wrong declaration
3092
3093 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3094
353976ac 30952009-02-14 Christian Franke <franke@computer.org>
3096
3097 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3098 (grub_lspci_iter): Print class code and programming interface byte.
3099
6aa1169b 31002009-02-14 Christian Franke <franke@computer.org>
3101
3102 * gendistlist.sh: Ignore `.svn' directories.
3103
265372ca 31042009-02-14 Felix Zielcke <fzielcke@z-51.de>
3105
3106 * fs/fat.c: Add 2009 to Copyright line.
3107
9ff516f3 31082009-02-14 Christian Franke <franke@computer.org>
3109
3110 * commands/hdparm.c: New file. Provides `hdparm' command
3111 which sends ATA commands via grub_disk_ata_pass_through ().
3112
3113 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3114
3115 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3116 and <grub/cpu/io.h> to include/grub/ata.h.
3117 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3118 (GRUB_CDROM_SECTOR_SIZE): Remove.
3119 (GRUB_ATA_*): Move to include/grub/ata.h.
3120 (GRUB_ATAPI_*): Likewise.
3121 (enum grub_ata_commands): Likewise.
3122 (enum grub_ata_timeout_milliseconds): Likewise.
3123 (struct grub_ata_device): Likewise.
3124 (grub_ata_regset): Likewise.
3125 (grub_ata_regget): Likewise.
3126 (grub_ata_regset2): Likewise.
3127 (grub_ata_regget2): Likewise.
3128 (grub_ata_check_ready): Likewise.
3129 (grub_ata_wait_not_busy): Remove static, exported in
3130 include/grub/ata.h.
3131 (grub_ata_wait_drq): Likewise.
3132 (grub_ata_pio_read): Likewise.
3133
3134 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3135 function for hdparm.mod.
3136
3137 * include/grub/ata.h: New file, contains declarations from
3138 disk/ata.c.
3139 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3140
3141 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3142 (grub_disk_ata_pass_through): New exported variable.
3143
3144 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3145
772e23da 31462009-02-13 Colin D Bennett <colin@gibibit.com>
3147
3148 Support multiple fallback entries, and provide an API to support
3149 executing default+fallback menu entries. Renamed the `terminal' menu
3150 viewer to `text'.
3151
3152 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3153 variable declaration.
3154 (grub_menu_execute_callback): New structure declaration.
3155 (grub_menu_execute_callback_t): New typedef.
3156 (grub_menu_execute_with_fallback): New function declaration.
3157 (grub_menu_get_entry): Likewise.
3158 (grub_menu_get_timeout): Likewise.
3159 (grub_menu_set_timeout): Likewise.
3160
3161 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3162
3163 * normal/menu.c (grub_wait_after_message): Moved to
3164 `normal/menu_text.c'.
3165 (draw_border): Likewise.
3166 (print_message): Likewise.
3167 (print_entry): Likewise.
3168 (print_entries): Likewise.
3169 (grub_menu_init_page): Likewise.
3170 (get_entry_number): Likewise.
3171 (print_timeout): Likewise.
3172 (run_menu): Likewise.
3173 (grub_menu_execute_entry): Likewise.
3174 (show_text_menu): Likewise.
3175 (get_and_remove_first_entry_number): New function.
3176 (grub_menu_execute_with_fallback): Likewise.
3177 (get_entry): Renamed to ...
3178 (grub_menu_get_entry): .. this and made it global.
3179 (get_timeout): Renamed to ...
3180 (grub_menu_get_timeout): ... this and made it global.
3181 (set_timeout): Renamed to ...
3182 (grub_menu_set_timeout): ... this and made it global.
3183 (grub_normal_terminal_menu_viewer): Renamed to ...
3184 (grub_normal_text_menu_viewer): ... this.
3185
3186 * normal/menu_text.c: New file. Extracted text-menu-specific code
3187 from normal/menu.c.
3188
3189 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3190 (normal_mod_SOURCES): Likewise.
3191
3192 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3193 (normal_mod_SOURCES): Likewise.
3194
3195 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3196 (normal_mod_SOURCES): Likewise.
3197
3198 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3199 (normal_mod_SOURCES): Likewise.
3200
3201 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3202 (normal_mod_SOURCES): Likewise.
3203
3204 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3205 (normal_mod_SOURCES): Likewise.
3206
3207 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3208 (normal_mod_SOURCES): Likewise.
3209
16ac430e 32102009-02-11 Robert Millan <rmh@aybabtu.com>
3211
3212 * util/grub.d/00_header.in: Update old reference to `font' command.
3213
06ff20fc 32142009-02-10 Felix Zielcke <fzielcke@z-51.de>
3215
3216 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3217
3218 Based on patch from Javier Martín.
3219
96da9407 32202009-02-09 Felix Zielcke <fzielcke@z-51.de>
3221
3222 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3223 to avoid false positives with FAT.
96da9407 3224 (grub_fstest_SOURCES): Likewise.
3225 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3226 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3227 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3228 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3229 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3230 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3231
6dca6fe4 32322009-02-09 Felix Zielcke <fzielcke@z-51.de>
3233
06ff20fc 3234 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3235 bpb.version_specific.fat12_or_fat16.fstype and
3236 bpb.version_specific.fat32.fstype.
3237
2550c62f 32382009-02-08 Robert Millan <rmh@aybabtu.com>
3239
be110b30 3240 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3241
56978920 32422009-02-08 Robert Millan <rmh@aybabtu.com>
3243
3244 * Makefile.in (host_os, host_cpu): New variables.
3245 (target_os): Remove. Update all users.
3246
d64399b5 32472009-02-08 Marco Gerards <marco@gnu.org>
3248
3249 * Makefile.in (enable_grub_emu_usb): New variable.
3250 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3251 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3252 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3253 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3254 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3255 `usbtest.mod' and `usbms.mod'.
3256 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3257 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3258 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3259 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3260 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3261 variables.
3262
3263 * disk/usbms.c: New file.
3264
3265 * include/grub/usb.h: Likewise.
3266
3267 * include/grub/usbtrans.h: Likewise.
3268
3269 * include/grub/usbdesc.h: Likewise.
3270
3271 * bus/usb/usbtrans.c: Likewise.
3272
3273 * bus/usb/ohci.c: Likewise.
3274
3275 * bus/usb/uhci.c: Likewise.
3276
3277 * bus/usb/usbhub.c: Likewise.
3278
3279 * bus/usb/usb.c: Likewise.
3280
3281 * commands/usbtest.c: Likewise.
3282
3283 * util/usb.c: Likewise.
50fb7002 3284
d64399b5 3285 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3286
3287 * configure.ac: Test for libusb presence.
50fb7002 3288
d64399b5 3289 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3290
2b40d6bb 32912009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3292
3293 * kern/mm.c: Add more comments.
3294
73a4ce81 32952009-02-08 Robert Millan <rmh@aybabtu.com>
3296
3297 Patch from Javier Martín.
3298 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3299 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3300
f821ce59 33012009-02-08 Robert Millan <rmh@aybabtu.com>
3302
3303 * fs/cpio.c: Split tar functionality to ...
3304 * fs/tar.c: ... here (new file). Update all users.
3305
aebfc4b0 33062009-02-07 Robert Millan <rmh@aybabtu.com>
3307
3308 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3309 backward-incompatible features.
3310
3311 Based on patch from Javier Martín, with some adjustments.
3312
50fb7002 33132009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 3314
3315 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3316
0bb5115e 33172009-02-07 Robert Millan <rmh@aybabtu.com>
3318
3319 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3320 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3321 after the RAID stuff.
3322
38a0f8e7 33232009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3324
50fb7002 3325 Fixes problem when running vbetest command as reported by
38a0f8e7 3326 Vladimir Serbinenko <phcoder@gmail.com>.
3327
3328 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3329
3143cc1c 33302009-02-04 Felix Zielcke <fzielcke@z-51.de>
3331
3332 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3333 /dev/md/NpN style mdraid devices.
3334
9cba6fce 33352009-02-03 Felix Zielcke <fzielcke@z-51.de>
3336
3337 * util/unifont2pff.rb: Remove.
3338
e507a2c1 33392009-02-03 Felix Zielcke <fzielcke@z-51.de>
3340
3341 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3342 `#'.
3343
d2c2b4cd 33442009-02-03 Felix Zielcke <fzielcke@z-51.de>
3345
3346 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3347 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3348 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3349 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3350 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3351 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3352 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3353
b4315fb0 33542009-02-02 Christian Franke <franke@computer.org>
3355
3356 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3357
de3aa260 33582009-02-01 Felix Zielcke <fzielcke@z-51.de>
3359
7c3ff286 3360 * INSTALL: Note that we now require at least autoconf 2.59 and
3361 that LZO is optional.
de3aa260 3362
825a182b 33632009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3364
3365 Base on patch on bug #24154 created by Tomas Tintera
3366 <trosos@seznam.cz>.
3367
3368 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3369
a69ef770 33702009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3371
7c3ff286 3372 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 3373 <bero@arklinux.org>.
3374
3375 * normal/parser.y (script_init): Add missing semicolon.
3376
6fa42fa6 33772009-01-31 Colin D Bennett <colin@gibibit.com>
3378
7c3ff286 3379 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 3380 (free_menu_entry_classes): Added.
3381 (grub_normal_menu_addentry): Added class property handling.
3382 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3383 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3384
3385 * normal/menu_viewer.c: New file.
3386
3387 * normal/menu.c (run_menu_entry): Renamed to ...
3388 (grub_menu_execute_entry): ... this and made it as global.
3389 (grub_menu_run): Renamed to ...
3390 (show_text_menu): ... this and made it local.
3391 (show_text_menu): Adapt to new function names.
3392 (grub_normal_terminal_menu_viewer): New global variable.
3393
3394 * include/grub/menu.h: New file.
3395
3396 * include/grub/menu_viewer.h: New file.
3397
3398 * include/grub/normal.h: Added include to grub/menu.h.
3399 (grub_menu_entry): Moved to include/grub/menu.h.
3400 (grub_menu_entry_t): Likewise.
3401 (grub_menu): Likewise.
3402 (grub_menu_t): Likewise.
3403 (grub_normal_terminal_menu_viewer): Added.
3404 (grub_menu_execute_entry): Likewise.
3405 (grub_menu_run): Removed.
3406
3407 * DISTLIST: Added include/grub/menu.h.
3408 Added include/grub/menu_viewer.h.
3409 Added normal/menu_viewer.c.
3410
34112009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3412
3413 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3414 arglist for menutitle arguments.
3415
3416 * normal/main.c (grub_normal_menu_addentry): Likewise.
3417
3418 * normal/parser.y (menuentry): Likewise.
3419
3420 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3421
3422 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3423 (grub_script_create_cmdmenu): Likewise.
3424
3425 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3426
3427 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3428 changes.
3429
3430 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3431
3432 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3433
3434 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3435
3436 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3437
3438 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3439
3440 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3441
56192c23 34422009-01-30 Christian Franke <franke@computer.org>
3443
3444 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3445 in option help text.
3446
d72521b3 34472009-01-27 Pavel Roskin <proski@gnu.org>
3448
3449 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3450
994b5e84 34512009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3452
3453 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3454
3455 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3456
3457 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3458 unregister function.
3459
6a7eab2c 34602009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3461
3462 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3463
3464 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3465
3466 * util/grub-mkfont.c (usage): Fix typo.
3467
3468 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3469
1806b56e 34702009-01-26 Daniel Mierswa <impulze@impulze.org>
3471
3fb18f09 3472 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3473
336e1fb9 3474 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3475
1806b56e 3476 * kern/misc.c (grub_strcasecmp): New function.
3477 (grub_strcasecmp): Use grub_size_t instead of int for length.
3478 Fix return value.
3479 * include/grub/misc.h: Update function prototypes.
3480
580b2a0f 34812009-01-26 Robert Millan <rmh@aybabtu.com>
3482
3483 * configure.ac: Fix cross-compilation check.
ef257b36 3484
d31c24f1 34852009-01-22 Christian Franke <franke@computer.org>
3486
3487 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3488 (precision) digit string. Allow `.format2' without `format1' (width).
3489 Limit input chars for `%s' output to `format2' if specified. This is
3490 compatible with standard printf ().
3491
3138b44c 34922009-01-22 Christian Franke <franke@computer.org>
3493
3494 * disk/ata.c (grub_ata_wait_status): Replace by ...
3495 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3496 other status bits may be invalid while BSY is asserted.
3497 (grub_ata_check_ready): New function.
3498 (grub_ata_cmd): Removed.
3499 (grub_ata_wait_drq): New function.
3500 (grub_ata_strncpy): Remove inline.
3501 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3502 and error check now done by grub_ata_wait_drq ().
3503 (grub_ata_pio_write): Likewise.
3504 (grub_atapi_identify): Set DEV before check for !BSY. Use
3505 grub_ata_wait_drq () to wait for data.
3506 (grub_ata_device_initialize): Add status register check to
3507 detect missing SATA slave devices. Add debug messages.
3508 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3509 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3510 transfer loop by grub_ata_pio_write ().
3511 (grub_ata_identify): Set DEV before check for !BSY. Use
3512 grub_ata_wait_drq () to wait for data.
ef257b36 3513 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 3514 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3515 read/write in one loop. Fix invalid command on write. Fix incomplete
3516 command on (size % batch) == 0. Add missing error check after write of
3517 last block. Add debug messages.
3518 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3519
59a64ef6 35202009-01-19 Christian Franke <franke@computer.org>
3521
3522 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3523 (GRUB_ATAPI_IREASON_*): Likewise.
3524 (grub_ata_pio_write): Fix timeout error return.
3525 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3526 (grub_atapi_wait_drq): New function.
3527 (grub_atapi_packet): New parameter `size'.
3528 Use grub_atapi_wait_drq () and direct write instead of
3529 grub_ata_pio_write ().
3530 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3531 reads the number of bytes requested by the device for each DRQ
3532 assertion.
3533 (grub_atapi_write): Remove old implementation, return not
3534 implemented instead.
3535
1cfe20b3 35362009-01-19 Christian Franke <franke@computer.org>
3537
3538 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3539 of 512 to calculate data size.
3540 (grub_scsi_read12): Likewise.
3541 (grub_scsi_write10): Likewise.
3542 (grub_scsi_write12): Likewise.
3543 (grub_scsi_read): Adjust size according to blocksize.
3544 Add checks for invalid blocksize and unaligned transfer.
3545
bee5fe5d 35462009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3547
3548 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3549
ef257b36 3550 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 3551 width glyphs.
3552
3e643f8c 35532009-01-19 Robert Millan <rmh@aybabtu.com>
3554
3555 * config.guess: Update to latest version from config git.
3556 * config.sub: Likewise.
3557
4fa80998 35582009-01-17 Felix Zielcke <fzielcke@z-51.de>
3559
3560 * Makefile.in: Change font compilation to use new grub-mkfont instead
3561 of java version.
3562
3563 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3564 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3565 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3566 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3567 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3568 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3569 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3570 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3571 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3572
7086085b 35732009-01-16 Christian Franke <franke@computer.org>
3574
3575 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3576 (enum grub_ata_timeout_milliseconds): New enum.
3577 (grub_ata_wait_status): Add parameter milliseconds.
3578 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3579 recovery from timed-out commands.
3580 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3581 return grub_errno instead of REG_ERROR.
3582 (grub_ata_pio_write): Add parameter milliseconds.
3583 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3584 Pass milliseconds to grub_ata_wait_status () and
3585 grub_ata_pio_read ().
3586 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3587 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3588 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3589 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3590 It is not suitable for device detection, because DEV bit is ignored,
3591 the command may run too long, and not all devices set the signature
3592 properly.
3593 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3594 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3595 Fix device selection, DEV bit must be set first to address the registers
3596 of the correct device.
3597 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3598 grub_ata_pio_read/write ().
3599 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3600 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3601
4a412913 36022009-01-13 Carles Pina i Estany <carles@pina.cat>
3603
3604 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3605
7795c55e 36062009-01-13 Bean <bean123ch@gmail.com>
d913988c 3607
3608 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3609
7795c55e 36102009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 3611
3612 * Makefile.in: (enable_grub_mkfont): New variable.
3613 (freetype_cflags): Likewise.
3614 (freetype_libs): Likewise.
3615
3616 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3617 (grub_mkfont_SOURCES): New variable.
3618 (grub_mkfont_CFLAGS): Likewise.
3619 (grub_mkfont_LDFLAGS): Likewise.
3620
3621 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3622 library if `--enable-grub-mkfont' is requested.
3623 (enable_grub_mkfont): New variable.
3624 (freetype_cflags): Likewise.
3625 (freetype_libs): Likewise.
3626
3627 * util/grub-mkfont.c: New file.
3628
093af1fe 36292009-01-12 Christian Franke <franke@computer.org>
3630
3631 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3632 mode check. Fix setting of compat_use[].
3633
f36cc108 36342009-01-10 Robert Millan <rmh@aybabtu.com>
3635
3636 Update a few copyright years which we forgot to do in 2008 (only for
3637 files whose changes made in 2008 were copyright-significant)
3638
3639 * Makefile.in: Add 2008 to Copyright line.
3640 * disk/ieee1275/ofdisk.c: Likewise.
3641 * disk/efi/efidisk.c: Likewise.
3642 * kern/dl.c: Likewise.
3643 * kern/sparc64/ieee1275/init.c: Likewise.
3644 * kern/mm.c: Likewise.
3645 * kern/efi/mm.c: Likewise.
3646 * boot/i386/pc/boot.S: Likewise.
3647 * genfslist.sh: Likewise.
3648 * fs/iso9660.c: Likewise.
3649 * fs/hfs.c: Likewise.
3650 * fs/jfs.c: Likewise.
3651 * fs/minix.c: Likewise.
3652 * fs/ufs.c: Likewise.
3653 * gensymlist.sh.in: Likewise.
3654 * genkernsyms.sh.in: Likewise.
3655 * include/grub/misc.h: Likewise.
3656 * include/grub/types.h: Likewise.
3657 * include/grub/symbol.h: Likewise.
3658 * include/grub/elf.h: Likewise.
3659 * include/grub/kernel.h: Likewise.
3660 * include/grub/disk.h: Likewise.
3661 * include/grub/dl.h: Likewise.
3662 * include/grub/i386/linux.h: Likewise.
3663 * include/grub/i386/pc/biosdisk.h: Likewise.
3664 * include/grub/efi/api.h: Likewise.
3665 * include/grub/efi/pe32.h: Likewise.
3666 * include/grub/util/misc.h: Likewise.
3667 * normal/execute.c: Likewise.
3668 * normal/arg.c: Likewise.
3669 * normal/completion.c: Likewise.
3670 * normal/lexer.c: Likewise.
3671 * normal/parser.y: Likewise.
3672 * normal/misc.c: Likewise.
3673 * commands/i386/pc/vbeinfo.c: Likewise.
3674 * commands/hexdump.c: Likewise.
3675 * commands/terminal.c: Likewise.
3676 * commands/ls.c: Likewise.
3677 * commands/help.c: Likewise.
3678 * partmap/pc.c: Likewise.
3679 * loader/efi/chainloader.c: Likewise.
3680 * loader/multiboot_loader.c: Likewise.
3681 * loader/i386/pc/multiboot2.c: Likewise.
3682 * term/efi/console.c: Likewise.
3683 * term/i386/pc/serial.c: Likewise.
3684 * util/lvm.c: Likewise.
3685 * util/console.c: Likewise.
3686 * util/i386/efi/grub-mkimage.c: Likewise.
3687 * util/raid.c: Likewise.
3688
7f02114b 36892009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3690
3691 * commands/videotest.c: Removed include to grub/machine/memory.h.
3692
3693 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3694 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3695 (video_mod_SOURCES): Removed.
3696 (video_mod_CFLAGS): Likewise.
3697 (video_mod_LDFLAGS): Likewise.
3698 (gfxterm_mod_SOURCES): Likewise.
3699 (gfxterm_mod_CFLAGS): Likewise.
3700 (gfxterm_mod_LDFLAGS): Likewise.
3701 (videotest_mod_SOURCES): Likewise.
3702 (videotest_mod_CFLAGS): Likewise.
3703 (videotest_mod_LDFLAGS): Likewise.
3704 (bitmap_mod_SOURCES): Likewise.
3705 (bitmap_mod_CFLAGS): Likewise.
3706 (bitmap_mod_LDFLAGS): Likewise.
3707 (tga_mod_SOURCES): Likewise.
3708 (tga_mod_CFLAGS): Likewise.
3709 (tga_mod_LDFLAGS): Likewise.
3710 (jpeg_mod_SOURCES): Likewise.
3711 (jpeg_mod_CFLAGS): Likewise.
3712 (jpeg_mod_LDFLAGS): Likewise.
3713 (png_mod_SOURCES): Likewise.
3714 (png_mod_CFLAGS): Likewise.
3715 (png_mod_LDFLAGS): Likewise.
3716
3717 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3718 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3719 (video_mod_SOURCES): Added.
3720 (video_mod_CFLAGS): Likewise.
3721 (video_mod_LDFLAGS): Likewise.
3722 (videotest_mod_SOURCES): Likewise.
3723 (videotest_mod_CFLAGS): Likewise.
3724 (videotest_mod_LDFLAGS): Likewise.
3725 (bitmap_mod_SOURCES): Likewise.
3726 (bitmap_mod_CFLAGS): Likewise.
3727 (bitmap_mod_LDFLAGS): Likewise.
3728 (tga_mod_SOURCES): Likewise.
3729 (tga_mod_CFLAGS): Likewise.
3730 (tga_mod_LDFLAGS): Likewise.
3731 (jpeg_mod_SOURCES): Likewise.
3732 (jpeg_mod_CFLAGS): Likewise.
3733 (jpeg_mod_LDFLAGS): Likewise.
3734 (png_mod_SOURCES): Likewise.
3735 (png_mod_CFLAGS): Likewise.
3736 (png_mod_LDFLAGS): Likewise.
3737 (gfxterm_mod_SOURCES): Likewise.
3738 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 3739 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 3740
3741 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3742 grub/machine/console.h.
3743
644fff97 37442009-01-04 Jerone Young <jerone@gmail.com>
3745
3746 Make on screen instructions clearer
3747
3748 Based on patch created by Jidanni <jidanni@jidanni.org>
3749
3750 * normal/menu.c: print clearer instructions on the screen
3751
1e901a75 37522009-01-02 Colin D Bennett <colin@gibibit.com>
3753
3754 New font engine.
34c44600 3755
1e901a75 3756 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3757 build system and fixed gfxterm.c to work with different sized fonts.
3758
3759 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 3760
1e901a75 3761 * configure: Re-generated.
34c44600 3762
1e901a75 3763 * DISTLIST: Removed font/manager.c.
3764 Added font/font.c.
3765 Added font/font_cmd.c.
34c44600 3766
1e901a75 3767 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3768 compilation.
34c44600 3769
1e901a75 3770 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 3771
3772 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 3773
3774 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 3775
1e901a75 3776 * normal/menu.c: Likewise.
34c44600 3777
1e901a75 3778 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3779 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 3780
1e901a75 3781 * include/grub/font.h: Replaced with new file.
34c44600 3782
1e901a75 3783 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3784 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3785 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3786 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3787 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 3788 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 3789 fg_red, fg_green, fg_blue, fg_alpha.
3790 (grub_video_adapter): Removed blit_glyph.
34c44600 3791 (grub_video_blit_glyph): Removed.
3792
1e901a75 3793 * font/manager.c: Removed file.
34c44600 3794
3795 * font/font.c: New file.
3796
1e901a75 3797 * font/font_cmd.c: Likewise.
34c44600 3798
1e901a75 3799 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 3800
1e901a75 3801 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3802 (grub_video_vbe_map_rgba): Likewise.
3803 (grub_video_vbe_unmap_color_int): Likewise.
3804 (grub_video_vbe_blit_glyph): Removed.
3805 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 3806
1e901a75 3807 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3808 (get_pixel): Likewise.
34c44600 3809 (set_pixel): Likewise.
3810
1e901a75 3811 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 3812
1e901a75 3813 * term/gfxterm.c: Adapted to new font engine.
34c44600 3814
1e901a75 3815 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 3816
1e901a75 3817 * term/i386/pc/vga.c: Likewise.
34c44600 3818
1e901a75 3819 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 3820
1e901a75 3821 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 3822
1e901a75 3823 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3824
1e901a75 3825 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3826
1e901a75 3827 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 3828
1e901a75 3829 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 3830
1e901a75 3831 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 3832
1e901a75 3833 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 3834
1e901a75 3835 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3836
3837 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 3838
1e901a75 3839 * util/grub-mkconfig_lib.in: Changed font extension.
3840
278922e8 38412008-12-28 Felix Zielcke <fzielcke@z-51.de>
3842
3843 * util/getroot.c (grub_util_get_grub_dev): Add support for
3844 /dev/md/dNNpNN style partitionable mdraid devices.
3845
3ced05cf 38462008-12-12 Alex Smith <alex@alex-smith.me.uk>
3847
3848 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3849 at a time limit of the PXE TFTP API correctly.
3850 (grub_pxefs_close): Likewise.
3851
7fd0ee30 38522008-11-29 Robert Millan <rmh@aybabtu.com>
3853
34c44600 3854 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 3855 grub_ata_device_initialize() calls.
3856
34c44600 38572008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 3858
3859 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3860 iteration failed.
3861 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3862
89313780 38632008-11-28 Robert Millan <rmh@aybabtu.com>
3864
3865 Fix build on powerpc-ieee1275. Based on patch created by
3866 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3867 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3868 `kern/ieee1275/mmap.c'.
3869 * include/grub/powerpc/ieee1275/memory.h: New file.
3870
15257703 3871 Provide grub-install on coreboot.
3872 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3873 (grub_install_SOURCES): New variable.
3874 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3875 usable on coreboot.
3876
9fc5388a 38772008-11-25 Felix Zielcke <fzielcke@z-51.de>
3878
3879 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3880 to `grub_term_input_t'.
3881 (grub_term_get_current_output): Change return type to
3882 `grub_term_output_t'.
3883
bc3a2f31 38842008-11-22 Robert Millan <rmh@aybabtu.com>
3885
34c44600 3886 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3887 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3888 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3889 grub_vga_text_cls().
3890
80fc88f2 3891 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3892 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3893
cbf36fd3 3894 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3895 to 0x200000 (avoids trouble with some OFW implementations, and matches
3896 with the one in Yaboot).
3897 Reported by Manoel Abranches
3898
73e8e268 38992008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3900
3901 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3902 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3903
73e8e268 3904 * util/grub-mkconfig_lib.in (grub_warn): New function.
3905 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3906 warnings, to obtain consistent formatting.
3907 * util/grub.d/00_header.in: Likewise.
3908 * util/update-grub_lib.in: Likewise.
3909
e94045a1 3910 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3911 Move comment text to `#error' stanza.
e94045a1 3912
79d29fd7 3913 Harmonize ieee1275's grub_available_iterate() with the generic
3914 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3915 build problem on i386-ieee1275):
3916 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3917 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3918 parameter `type'. Update all users of this function.
3919 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3920 `kern/ieee1275/mmap.c'.
3921 * kern/ieee1275/init.c
3922 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3923 with ...
3924 (grub_machine_mmap_iterate): ... this.
3925 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3926 return type to `grub_err_t'. Update all implementations of this
3927 function prototype.
3928 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3929 Likewise.
3930
60d6b16e 3931 Add `lsmmap' command (lists firmware-provided memory map):
3932 * commands/lsmmap.c: New file.
3933 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3934 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3935 variables.
3936 * conf/powerpc-ieee1275.rmk: Likewise.
3937 * conf/i386-coreboot.rmk: Likewise.
3938 * conf/i386-ieee1275.rmk: Likewise.
3939
ebaaf49b 39402008-11-19 Robert Millan <rmh@aybabtu.com>
3941
3942 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3943 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3944 constraints to initrd allocation (based on code from
3945 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3946 for Linux to find it.
ebaaf49b 3947
dfab719f 39482008-11-14 Robert Millan <rmh@aybabtu.com>
3949
3950 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3951 order to cope with duplicate slashes.
3952
10fc3eb9 39532008-11-14 Robert Millan <rmh@aybabtu.com>
3954
3955 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3956 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3957 don't want to mess with lower memory, because it is used in the Linux
3958 loader.
3959
3960 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 3961 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 3962 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3963 is in our heap (probably as a result of it being corrupted during
2f2a3442 3964 decompression). Add #error instance with comment to explain why this
3965 loader isn't currently usable on PC/BIOS.
10fc3eb9 3966
e2e07847 39672008-11-14 Robert Millan <rmh@aybabtu.com>
3968
3969 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 3970 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 3971
fe8e8d69 39722008-11-12 Robert Millan <rmh@aybabtu.com>
3973
3974 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3975
3976 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3977 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3978 from here ...
3979 * include/grub/i386/pc/memory.h: ... to here.
3980
976b07d0 39812008-11-12 Robert Millan <rmh@aybabtu.com>
3982
3983 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3984 split).
3985
3986 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3987 (grub_console_cur_color, grub_console_real_putchar)
3988 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3989 (grub_console_setcolorstate, grub_console_setcolor)
3990 (grub_console_getcolor): Move from here ...
3991 * include/grub/i386/vga_common.h: ... to here (new file).
3992
3993 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3994 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3995 `<grub/i386/io.h>'.
3996 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3997 `<grub/i386/vga_common.h>'.
3998
76679cd3 39992008-11-12 Robert Millan <rmh@aybabtu.com>
4000
4001 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4002 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4003 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4004 variables.
4005 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4006 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4007
4008 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4009 grub_console_init() with call to grub_vga_text_init().
4010 (grub_machine_fini): Replace call to
4011 grub_console_fini() with call to grub_vga_text_fini() and
4012 grub_at_keyboard_fini().
4013
4014 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4015 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4016 (grub_console_setcolorstate, grub_console_setcolor)
4017 (grub_console_getcolor): New function prototypes.
4018
4019 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4020 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4021 (grub_vga_text_setcursor): Static-ize.
4022 (grub_vga_text_term): New structure.
4023 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4024
4025 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4026 (grub_console_cur_color, grub_console_standard_color)
4027 (grub_console_normal_color, grub_console_highlight_color)
4028 (map_char, grub_console_putchar, grub_console_getcharwidth)
4029 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4030 (grub_console_getcolor): Move from here ...
4031 * term/i386/vga_common.c: ... to here (same function names).
4032
95b841d3 40332008-11-12 Robert Millan <rmh@aybabtu.com>
4034
4035 Use newly-added Multiboot support in coreboot.
4036
4037 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4038 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4039
4040 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4041 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4042 (codestart): Store the MBI in `startup_multiboot_info' when we're
4043 being loaded using Multiboot.
4044
4045 * kern/i386/coreboot/init.c (grub_machine_init): Move
4046 grub_at_keyboard_init() call to beginning of function (useful for
4047 debugging). Call grub_machine_mmap_init() before attempting to use
4048 grub_machine_mmap_iterate().
4049 (grub_lower_mem, grub_upper_mem): Move from here ...
4050 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4051 here (new file).
4052
4053 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4054 function prototype.
4055
761ca975 40562008-11-12 Robert Millan <rmh@aybabtu.com>
4057
4058 Fix a regression introduced by the at_keyboard.mod split. Because
4059 some terminals are default on some platforms and non-default on
4060 others, the first terminal being registered determines which is
4061 going to be default.
4062
4063 * kern/term.c (grub_term_register_input): If this is the first
4064 terminal being registered, set it as the current one.
4065 (grub_term_register_output): Likewise.
4066
4067 * term/efi/console.c (grub_console_init): Do not call
4068 grub_term_set_current_output() or grub_term_set_current_input().
4069 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4070 * term/i386/pc/console.c (grub_console_init): Likewise.
4071 (grub_console_fini): Do not call grub_term_set_current_input()
4072 (but leave grub_term_set_current_output() to restore text mode).
4073
6c529df7 40742008-11-10 Robert Millan <rmh@aybabtu.com>
4075
4076 * util/grub.d/00_header.in: Add backward compatibility check for
4077 versions of terminal.mod that don't understand `terminal_input' or
4078 `terminal_output'.
4079
132e4113 40802008-11-09 Robert Millan <rmh@aybabtu.com>
4081
4082 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4083 `terminal_input' / `terminal_output', not `terminal'.
4084
ac293d50 40852008-11-08 Robert Millan <rmh@aybabtu.com>
4086
4087 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 4088 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 4089
0025933a 40902008-11-08 Robert Millan <rmh@aybabtu.com>
4091
4092 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 4093 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 4094 members. Update all users.
4095 * util/console.c (grub_ncurses_term): Split in ...
4096 (grub_ncurses_term_input): ... this, and ...
4097 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 4098 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 4099
37c86336 41002008-11-08 Robert Millan <rmh@aybabtu.com>
4101
4102 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4103 (PKGDATA): Add $(pkgdata_SRCDIR).
4104 (pkglib_BUILDDIR): New variable.
4105 (pkgdata_SRCDIR): New variable.
4106 (build_env.mk): New target.
4107 (include_DATA): New variable.
4108 (install-local): Install $(include_DATA) files in $(includedir).
4109
b6c15a2d 41102008-11-07 Pavel Roskin <proski@gnu.org>
4111
d99d46f1 4112 * gendistlist.sh: Use C locale for sorting to ensure consistent
4113 output on all systems.
4114
b6c15a2d 4115 * util/grub.d/00_header.in: Remove incorrect space before
4116 "serial".
4117
c32ee8c9 41182008-11-07 Robert Millan <rmh@aybabtu.com>
4119
4120 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4121 per specification.
4122 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4123 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4124 (based on find_multi_boot1_header).
4125 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4126 using find_multi_boot2_header(), and abort if neither Multiboot or
4127 Multiboot headers were found.
4128
651c29b7 41292008-11-07 Robert Millan <rmh@aybabtu.com>
4130
4131 Modularize at_keyboard.mod:
4132
4133 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4134 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4135 (at_keyboard_mod_LDFLAGS): New variables.
4136
4137 Actual terminal split:
4138
4139 * include/grub/term.h (struct grub_term): Split in ...
4140 (struct grub_term_input): ... this, and ...
4141 (struct grub_term_output): ... this. Update all users.
4142 (grub_term_set_current): Split in ...
4143 (grub_term_set_current_input): ... this, and ...
4144 (grub_term_set_current_output): ... this.
4145 (grub_term_get_current): Split in ...
4146 (grub_term_get_current_input): ... this, and ...
4147 (grub_term_get_current_output): ... this.
4148 (grub_term_register): Split in ...
4149 (grub_term_register_input): ... this, and ...
4150 (grub_term_register_output): ... this.
4151 (grub_term_unregister): Split in ...
4152 (grub_term_unregister_input): ... this, and ...
4153 (grub_term_unregister_output): ... this.
4154 (grub_term_iterate): Split in ...
4155 (grub_term_iterate_input): ... this, and ...
4156 (grub_term_iterate_output): ... this.
4157
4158 * kern/term.c (grub_term_list): Split in ...
4159 (grub_term_list_input): ... this, and ...
4160 (grub_term_list_output): ... this. Update all users.
4161 (grub_cur_term): Split in ...
4162 (grub_cur_term_input): ... this, and ...
4163 (grub_cur_term_output): ... this. Update all users.
4164 (grub_term_set_current): Split in ...
4165 (grub_term_set_current_input): ... this, and ...
4166 (grub_term_set_current_output): ... this.
4167 (grub_term_get_current): Split in ...
4168 (grub_term_get_current_input): ... this, and ...
4169 (grub_term_get_current_output): ... this.
4170 (grub_term_register): Split in ...
4171 (grub_term_register_input): ... this, and ...
4172 (grub_term_register_output): ... this.
4173 (grub_term_unregister): Split in ...
4174 (grub_term_unregister_input): ... this, and ...
4175 (grub_term_unregister_output): ... this.
4176 (grub_term_iterate): Split in ...
4177 (grub_term_iterate_input): ... this, and ...
4178 (grub_term_iterate_output): ... this.
4179
4180 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4181 a check for input and one for output (and only attempt to get keys
4182 from user when input works).
4183
4184 * util/grub-probe.c (grub_term_get_current): Split in ...
4185 (grub_term_get_current_input): ... this, and ...
4186 (grub_term_get_current_output): ... this.
4187 * util/grub-fstest.c: Likewise.
4188 * util/i386/pc/grub-setup.c: Likewise.
4189 * util/grub-editenv.c: Likewise.
4190
4191 Portability adjustments:
4192
4193 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4194 `term/i386/pc/at_keyboard.c'.
4195 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4196 grub_keyboard_controller_init() (now handled by terminal .init).
4197 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4198 grub_at_keyboard_init().
4199 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4200 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4201 at_keyboard.mod via input terminal interface).
4202 * include/grub/i386/coreboot/console.h: Convert into a stub for
4203 `<grub/i386/pc/console.h>'.
4204
4205 Migrate full terminals to new API:
4206
4207 * term/efi/console.c (grub_console_term): Split into ...
4208 (grub_console_term_input): ... this, and ...
4209 (grub_console_term_output): ... this. Update all users.
4210 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4211 (grub_ofconsole_init): Split into ...
4212 (grub_ofconsole_init_input): ... this, and ...
4213 (grub_ofconsole_init_output): ... this.
4214 (grub_ofconsole_term): Split into ...
4215 (grub_ofconsole_term_input): ... this, and ...
4216 (grub_ofconsole_term_output): ... this. Update all users.
4217 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4218 (grub_serial_term_input): ... this, and ...
4219 (grub_serial_term_output): ... this. Update all users.
4220 * term/i386/pc/console.c (grub_console_term): Split into ...
4221 (grub_console_term_input): ... this, and ...
4222 (grub_console_term_output): ... this. Update all users.
4223 (grub_console_term_input): Only enable it on PC/BIOS platform.
4224 (grub_console_init): Remove grub_keyboard_controller_init() call.
4225
4226 Migrate input terminals to new API:
4227
4228 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4229 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4230 i386-specific anyway).
4231 (grub_console_checkkey): Rename to ...
4232 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4233 users.
4234 (grub_keyboard_controller_orig): New variable.
4235 (grub_console_getkey): Rename to ...
4236 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4237 users.
4238 (grub_keyboard_controller_init): Static-ize. Save original
4239 controller value so that it can be restored ...
4240 (grub_keyboard_controller_fini): ... here (new function).
4241 (grub_at_keyboard_term): New structure.
4242 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4243 functions.
4244
4245 Migrate output terminals to new API:
4246
4247 * term/i386/pc/vga.c (grub_vga_term): Change type to
4248 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4249 members. Update all users.
4250 * term/gfxterm.c (grub_video_term): Change type to
4251 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4252 members. Update all users.
4253 * include/grub/i386/pc/console.h (grub_console_checkkey)
4254 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4255 etc).
4256
4257 Migrate `terminal' command and userland tools to new API:
4258
4259 * commands/terminal.c (grub_cmd_terminal): Split into ...
4260 (grub_cmd_terminal_input): ... this, and ...
4261 (grub_cmd_terminal_output): ... this.
4262 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4263 `terminal_input' and `terminal_output'.
4264 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4265 `terminal_input' / `terminal_output' API.
4266 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4267 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4268 provided ${GRUB_TERMINAL}, convert it).
4269
96e5d876 42702008-11-04 Robert Millan <rmh@aybabtu.com>
4271
4272 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4273 for FreeBSD.
4274 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4275
556f3775 42762008-11-03 Bean <bean123ch@gmail.com>
4277
4278 * kern/elf.c (grub_elf32_load): Revert to previous code.
4279 (grub_elf64_load): Likewise.
4280
4281 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4282
926b9823 42832008-11-01 Robert Millan <rmh@aybabtu.com>
4284
4285 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4286 (TARGET_CPPFLAGS): Likewise.
4287 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4288
1432e958 42892008-11-01 Carles Pina i Estany <carles@pina.cat>
4290
4291 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4292
dba3f844 42932008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 4294
4295 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4296 addition of objects until the code is not going to be able to fail.
4297
dba3f844 42982008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 4299
4300 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4301 (add a missing NULL check, and correct them by moving the pointer
4302 operations after the actual check).
4303
7ab28c21 43042008-10-29 Robert Millan <rmh@aybabtu.com>
4305
4306 * util/i386/pc/grub-install.in: Handle empty string as output from
4307 make_system_path_relative_to_its_root().
4308
1b7748eb 43092008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4310
4311 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4312 circular metadata worst case scenario. If the metadata is circular
4313 then copy the wrap in place.
4314 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4315 project lib/format_text/layout.h
4316 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4317
c9618ab2 43182008-10-03 Felix Zielcke <fzielcke@z-51.de>
4319
7a36edca 4320 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 4321
bf981c62 43222008-10-03 Felix Zielcke <fzielcke@z-51.de>
4323
4324 * util/update-grub_lib.in: Mention filename in warning message.
4325
6d994591 43262008-09-29 Felix Zielcke <fzielcke@z-51.de>
4327
4328 * NEWS: Update for rename of update-grub to grub-mkconfig.
4329
18ade780 43302008-09-29 Felix Zielcke <fzielcke@z-51.de>
4331
4332 * util/update-grub_lib.in: Copy to ...
4333 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 4334 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 4335 * util/update-grub.in: Rename to ...
4336 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4337 option. Add `--output' option to allow users to specify the generated
4338 configuration file. Default to stdout.
4339 (update_grub_dir): Rename to ...
4340 (grub_mkconfig_dir): ... this.
4341 (grub_cfg): Default to an empty string.
4342 * conf/common.rmk (update-grub): Rename to ...
4343 (grub-mkconfig): ... this.
4344 (update-grub_lib): Copy to ...
4345 (grub-mkconfig_lib): ... this.
4346 (update-grub_SCRIPTS): Copy to ...
4347 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4348 (update-grub_DATA): Rename to ...
4349 (grub-mkconfig_DATA): ... this.
4350
556ce6ac 43512008-09-28 Robert Millan <rmh@aybabtu.com>
4352
4353 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4354 to `modified'. Add the real `created' field.
4355 (grub_iso9660_uuid): Use `modified' rather than `created' for
4356 constructing the UUID.
4357
43582008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 4359
4360 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4361 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4362
92274e85 43632008-09-28 Bean <bean123ch@gmail.com>
4364
4365 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4366 Thanks to Christian Franke for finding this bug.
4367
add6f17a 43682008-09-25 Robert Millan <rmh@aybabtu.com>
4369
4370 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4371 instances of grub_util_get_disk_name() (see previous commit).
4372
d2a367b8 43732008-09-25 Robert Millan <rmh@aybabtu.com>
4374
4375 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4376 `util/i386/get_disk_name.c'.
4377 * conf/i386-efi.rmk: Likewise.
4378 * conf/x86_64-efi.rmk: Likewise.
4379 * conf/i386-coreboot.rmk: Likewise.
4380 * conf/i386-ieee1275.rmk: Likewise.
4381 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4382 `util/ieee1275/get_disk_name.c'.
4383 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4384 * util/ieee1275/get_disk_name.c: Remove file.
4385 * util/i386/get_disk_name.c: Remove file.
4386 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4387 "hd%d" for device.map entries, rather than using
4388 grub_util_get_disk_name().
4389
81a06771 43902008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 4391
4392 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4393 warning.
4394 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4395
5a004279 43962008-09-24 Carles Pina i Estany <carles@pina.cat>
4397
4398 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4399 Changed to 0x5100.
4400 (GRUB_TERM_PPAGE): Changed to 0x4900.
4401
397093d3 44022008-09-24 Robert Millan <rmh@aybabtu.com>
4403
4404 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4405 macros (they were i386-pc specific).
4406 * include/grub/sparc64/ieee1275/console.h: Likewise.
4407 * include/grub/efi/console.h: Likewise.
4408
a91b6c7c 44092008-09-22 Bean <bean123ch@gmail.com>
4410
4411 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4412 resident and in attribute list.
4413
4414 * include/grub/ntfs.h (BMP_LEN): Removed.
4415
c40fd116 44162008-09-22 Bean <bean123ch@gmail.com>
4417
81a06771 4418 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 4419 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4420
4421 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4422 error occurs, as grub_disk_open will call grub_disk_close, which will
4423 call p->close (scsi).
4424
81a06771 44252008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 4426
4427 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4428 (AC_PREREQ): Bumped to 2.59.
4429 (AC_TRY_COMPILE): Replace obsolete macro with ...
4430 (AC_COMPILE_IFELSE): ... this.
4431 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4432 (AC_LINK_IFELSE): ... this.
4433
5dc43410 44342008-09-21 Felix Zielcke <fzielcke@z-51.de>
4435
4436 * autogen.sh: Add a call to `gendistlist.sh'.
4437
9035dce4 44382008-09-19 Christian Franke <franke@computer.org>
4439
4440 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4441 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4442 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4443 Export __enable_execute_stack() to modules.
4444 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4445 New function.
4446
7fd75377 44472008-09-09 Felix Zielcke <fzielcke@z-51.de>
4448
040030b3 4449 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4450 Sort the list.
4451
44522008-09-09 Felix Zielcke <fzielcke@z-51.de>
4453
4454 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 4455 #include <grub/util/hostdisk.h>.
4456
89d5ffcf 44572008-09-08 Robert Millan <rmh@aybabtu.com>
4458
4459 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4460 segments when their filesz is zero (grub_file_read() interprets
81a06771 4461 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 4462 Use `lowest_segment' rather than 0 for calculating the current
4463 segment load address.
4464
40da438f 44652008-09-08 Robert Millan <rmh@aybabtu.com>
4466
4467 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4468 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4469 clobbered useful information.
4470
ddbf5556 44712008-09-08 Robert Millan <rmh@aybabtu.com>
4472
4473 * include/grub/util/biosdisk.h: Move to ...
4474 * include/grub/util/hostdisk.h: ... here. Update all users.
4475 * util/biosdisk.c: Move to ...
4476 * util/hostdisk.c: ... here. Update all users.
4477
783d0f48 44782008-09-07 Robert Millan <rmh@aybabtu.com>
4479
4480 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4481 variables.
4482 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4483 and length can be stored directly in the `mbi->mmap_addr' and
4484 `mbi->mmap_length' struct fields.
4485
548e2ea5 44862008-09-07 Robert Millan <rmh@aybabtu.com>
4487
4488 * conf/i386.rmk: New file. Provides declaration for building
4489 `cpuid.mod'.
4490 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4491 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4492 variables.
4493 Include `conf/i386.mk'.
4494 * conf/i386-efi.rmk: Likewise.
4495 * conf/x86_64-efi.rmk: Likewise.
4496 * conf/i386-coreboot.rmk: Likewise.
4497 * conf/i386-ieee1275.rmk: Likewise.
4498
0ea85a37 44992008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4500
4501 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4502 Adds optimization support for BGR based modes.
4503
4504 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4505 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4506 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4507 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4508 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4509 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4510 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4511 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4512 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4513 (grub_video_i386_vbeblit_index_index): Likewise.
4514 (grub_video_i386_vbeblit_replace_directN): Added.
4515 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4516 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4517 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4518 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4519 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4520 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 4521 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 4522 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4523 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4524 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4525 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4526 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4527 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4528
4529 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4530 (grub_video_i386_vbefill_R8G8B8): Likewise.
4531 (grub_video_i386_vbefill_index): Likewise.
4532 (grub_video_i386_vbefill_direct32): Added.
4533 (grub_video_i386_vbefill_direct24): Likewise.
4534 (grub_video_i386_vbefill_direct16): Likewise.
4535 (grub_video_i386_vbefill_direct8): Likewise.
4536
81a06771 4537 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 4538 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4539 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4540 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4541 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4542 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 4543
0ea85a37 4544 * video/video.c (grub_video_get_blit_format): Updated to use new
4545 blit formats. Added handling for 16 bit color modes.
81a06771 4546
4547 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 4548 fillers.
4549 (common_blitter): Updated to use new blitters.
4550
4551 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4552 Removed.
4553 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4554 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4555 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4556 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4557 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4558 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4559 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4560 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4561 (grub_video_i386_vbeblit_index_index): Likewise.
4562 (grub_video_i386_vbeblit_replace_directN): Added.
4563 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4564 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4565 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4566 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4567 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4568 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4569 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4570 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4571 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4572 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4573 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4574 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4575 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 4576
0ea85a37 4577 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4578 (grub_video_i386_vbefill_R8G8B8): Likewise.
4579 (grub_video_i386_vbefill_index): Likewise.
4580 (grub_video_i386_vbefill_direct32): Added.
4581 (grub_video_i386_vbefill_direct24): Likewise.
4582 (grub_video_i386_vbefill_direct16): Likewise.
4583 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 4584
0ea85a37 4585 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4586 types.
81a06771 4587
0ea85a37 4588 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4589 types.
81a06771 4590
0ea85a37 4591 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4592 blitter types.
81a06771 4593
0ea85a37 4594 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4595 types.
4596
e8a83df6 45972008-09-06 Felix Zielcke <fzielcke@z-51.de>
4598
4599 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4600 RAID level 1.
4601
6bcd8ee5 46022008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 4603
6bcd8ee5 4604 * fs/iso9660.c (grub_iso9660_date): New structure.
4605 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4606 (grub_iso9660_uuid): New function.
c375ae58 4607
59261157 46082008-09-05 Bean <bean123ch@gmail.com>
4609
4610 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4611
4612 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4613 insensitive bit for names in Win32 and Win32 & DOS namespace.
4614
4615 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4616
4617 * include/grub/types.h (LONG_MAX): Likewise.
4618
58b6645a 46192008-09-04 Felix Zielcke <fzielcke@z-51.de>
4620
4ee55921 4621 * util/getroot.c: Include <config.h>.
4622 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4623 add support for /dev/md/N devices and handle LVM double dash escaping.
4624
46252008-09-04 Felix Zielcke <fzielcke@z-51.de>
4626
4627 * config.guess: Update to latest version from config git.
4628 * config.sub: Likewise.
58b6645a 4629
9124f65d 46302008-09-03 Robert Millan <rmh@aybabtu.com>
4631
4632 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4633 `disk->total_sectors'.
4634
81a06771 46352008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 4636
4637 * include/grub/normal.h: Fixed incorrect comment for
4638 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4639
81a06771 46402008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 4641
4642 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4643 values with defines.
4644
4645 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4646 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4647 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4648 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4649 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4650 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4651 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4652 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4653 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4654 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4655 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4656 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4657 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4658 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4659 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4660 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4661 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4662 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4663 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4664
93d5cbf8 46652008-08-31 Robert Millan <rmh@aybabtu.com>
4666
4667 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4668 declaration.
4669 (grub_multiboot): Fix a few warnings.
4670
21751d50 46712008-08-31 Robert Millan <rmh@aybabtu.com>
4672
4673 * loader/i386/pc/multiboot.c: Update comment not to say that
4674 boot_device support is unimplemented.
4675
e27a75c5 46762008-08-31 Robert Millan <rmh@aybabtu.com>
4677
4678 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4679 or memory map support are unimplemented.
4680
81a06771 46812008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 4682
4683 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4684
81a06771 46852008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 4686
4687 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4688 total video memory in 'vbeinfo' output; show color format details for
4689 each video mode.
4690
7c5d8d95 46912008-08-30 Pavel Roskin <proski@gnu.org>
4692
4693 * util/genmoddep.c: Remove for real this time.
4694 * DISTLIST: Remove util/genmoddep.c.
4695
4cebd25a 46962008-08-30 Robert Millan <rmh@aybabtu.com>
4697
4698 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4699 as required by Multiboot spec (it was already 4-byte aligned, but
4700 only by chance).
4701
b497a269 47022008-08-29 Pavel Roskin <proski@gnu.org>
4703
e3925185 4704 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4705 * kern/powerpc/ieee1275/startup.S: ... this.
4706 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4707 * DISTLIST: Likewise.
4708
b497a269 4709 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4710 grub/cpu/kernel.h. Add start label for consistency with other
4711 platforms. Add grub_prefix immediately after start. Add jump
4712 to the code after grub_prefix.
4713 * include/grub/powerpc/kernel.h: Provide valid values for
4714 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4715
6e5a42fe 47162008-08-29 Bean <bean123ch@gmail.com>
4717
4718 * configure.ac: Change host_os to cygwin for mingw.
4719 (asprintf): New check for function.
4720
4721 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4722 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4723
4724 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 4725 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 4726 sync, sleep and grub_util_get_disk_size for mingw.
4727
4728 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4729 to get size in mingw.
4730 (open_device): Use flag O_BINARY if it's defined.
4731 (find_root_device): Add dummy code for mingw.
4732
4733 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4734 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4735 (get_scsi_disk_name): Return 0 for mingw.
4736
4737 * util/hostfs.c: #include <grub/util/misc.h>.
4738 (grub_hostfs_open): Use "rb" flag to open file, use
4739 grub_util_get_disk_size to get disk size for mingw.
4740
4741 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4742 (asprintf): New function if HAVE_ASPRINTF is not set.
4743 (sync): New function for mingw.
4744 (sleep): Likewise.
4745 (grub_util_get_disk_size): Likewise.
4746
ab3f2673 47472008-08-28 Pavel Roskin <proski@gnu.org>
4748
4749 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4750 kern/time.c.
4751
1c282483 47522008-08-28 Robert Millan <rmh@aybabtu.com>
4753
4754 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4755
678e849c 47562008-08-28 Robert Millan <rmh@aybabtu.com>
4757
4758 Change find_grub_drive() syntax so it doesn't prevent it from
4759 detecting NULL names as errors.
4760
4761 * util/biosdisk.c (find_grub_drive): Move free slot search code
4762 from here ...
4763 (find_free_slot): ... to here.
4764 (read_device_map): Use find_free_slot() to search for free slots.
4765
965c75ca 47662008-08-27 Marco Gerards <marco@gnu.org>
4767
4768 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4769 (scsi_mod_SOURCES): New variable.
4770 (scsi_mod_CFLAGS): Likewise
4771 (scsi_mod_LDFLAGS): Likewise.
4772
4773 * disk/scsi.c: New file.
4774
4775 * include/grub/scsi.h: Likewise.
4776
4777 * include/grub/scsicmd.h: Likewise.
4778
4779 * disk/ata.c: Include <grub/scsi.h>.
4780 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4781 instead.
4782 (grub_ata_iterate): Skip ATAPI devices.
4783 (grub_ata_open): Only handle ATAPI devices.
4784 (struct grub_atapi_read): Removed.
4785 (grub_atapi_readsector): Likewise.
4786 (grub_ata_read): No longer handle ATAPI devices.
4787 (grub_ata_write): Likewise.
4788 (grub_atapi_iterate): New function.
4789 (grub_atapi_read): Likewise.
4790 (grub_atapi_write): Likewise.
4791 (grub_atapi_open): Likewise.
4792 (grub_atapi_close): Likewise.
4793 (grub_atapi_dev): New variable.
4794 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4795 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4796
4797 * include/grub/disk.h (enum grub_disk_dev_id): Add
4798 `GRUB_DISK_DEVICE_SCSI_ID'.
4799
c07ae501 48002008-08-26 Robert Millan <rmh@aybabtu.com>
4801
4802 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4803 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4804 descriptive.
4805
5ed20adc 48062008-08-23 Bean <bean123ch@gmail.com>
4807
4808 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4809 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4810 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4811 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4812 dm_nv.mod.
4813 (raid5rec_mod_SOURCES): New macro.
4814 (raid5rec_mod_CFLAGS): Likewise.
4815 (raid5rec_mod_LDFLAGS): Likewise.
4816 (raid6rec_mod_SOURCES): Likewise.
4817 (raid6rec_mod_CFLAGS): Likewise.
4818 (raid6rec_mod_LDFLAGS): Likewise.
4819 (mdraid_mod_SOURCES): Likewise.
4820 (mdraid_mod_CFLAGS): Likewise.
4821 (mdraid_mod_LDFLAGS): Likewise.
4822 (dm_nv_mod_SOURCES): Likewise.
4823 (dm_nv_mod_CFLAGS): Likewise.
4824 (dm_nv_mod_LDFLAGS): Likewise.
4825
4826 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4827 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4828 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4829
4830 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4831 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4832
4833 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4834
4835 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4836
4837 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4838
4839 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4840
4841 * disk/raid5_recover.c: New file.
4842
4843 * disk/raid6_recover.c: Likewise.
4844
4845 * disk/mdraid_linux.c: Likewise.
4846
4847 * disk/dmraid_nvidia.c: Likewise.
4848
4849 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4850 ULONG_MAX.
4851
4852 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4853 calculate the size of raid device.
4854 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4855 different layout of raid5.
4856 (grub_raid_scan_device): Remove code specific to mdraid.
4857 (grub_raid_list): New variable.
4858 (free_array): New function.
4859 (grub_raid_register): Likewise.
4860 (grub_raid_unregister): Likewise.
4861 (grub_raid_rescan): Likewise.
4862 (GRUB_MOD_INIT): Don't iterate device here.
4863 (GRUB_MOD_FINI): Use free_array to release resource.
4864
4865 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4866 (grub_raid5_recover_func_t): New function variable type.
4867 (grub_raid6_recover_func_t): Likewise.
4868 (grub_raid5_recover_func): New variable.
4869 (grub_raid6_recover_func): Likewise.
4870 (grub_raid_register): New function.
4871 (grub_raid_unregister): Likewise.
4872 (grub_raid_rescan): Likewise.
4873 (grub_raid_block_xor): Likewise.
4874
4875 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4876 (CMD_CRC): New macro.
4877 (part): Removed.
4878 (read_file): Handle device as well as file.
4879 (cmd_crc): New function.
4880 (fstest): Handle multiple disks.
4881 (options): Remove part, raw and long, add root and diskcount.
4882 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4883 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4884 add handling for the new options, support multiple disks.
4885
4886 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4887
29c18915 48882008-08-23 Bean <bean123ch@gmail.com>
4889
4890 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4891
4892 * genfslist.sh: Ignore kernel.mod.
4893
4894 * genpartmaplist.sh: Likewise.
4895
8415f261 48962008-08-23 Robert Millan <rmh@aybabtu.com>
4897
4898 * util/getroot.c (find_root_device): Skip anything that starts with
4899 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4900
d5a7dc5b 49012008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4902
d5a7dc5b 4903 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4904 * util/grub.d/00_header.in: Allow the administrator to change default
4905 gfxmode via ${GRUB_GFXMODE}.
4906
380cfbb4 49072008-08-21 Felix Zielcke <fzielcke@z-51.de>
4908
4909 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4910
c9baafe7 49112008-08-21 Robert Millan <rmh@aybabtu.com>
4912
4913 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4914 loader.
4915 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4916 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4917
e290bef2 49182008-08-20 Carles Pina i Estany <carles@pina.cat>
4919
4920 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4921 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4922
f9dbfc96 49232008-08-19 Robert Millan <rmh@aybabtu.com>
4924
4925 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4926 (struct grub_virtual_screen): Remove `cursor_color'.
4927 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4928 initialization.
4929 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4930
dd6bd6ab 49312008-08-18 Robert Millan <rmh@aybabtu.com>
4932
4933 Unify (identical) linux_normal.c files.
4934 * loader/i386/efi/linux_normal.c: Move from here ...
4935 * loader/linux_normal.c: ... to here. Update all users.
4936 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4937 * loader/i386/ieee1275/linux_normal.c: Likewise.
4938
7f42f83e 49392008-08-18 Robert Millan <rmh@aybabtu.com>
4940
4941 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4942 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4943 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4944 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4945 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4946 New macros.
4947 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4948 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4949 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4950 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4951 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4952 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4953 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4954 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4955 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4956 portably using grub_getxy().
4957 Replace `-EFI' with `-bzImage' in boot message.
4958
38487ddb 49592008-08-17 Robert Millan <rmh@aybabtu.com>
4960
4961 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4962
deceb3ec 49632008-08-17 Robert Millan <rmh@aybabtu.com>
4964
4965 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4966
4967 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4968 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4969 (grub_machine_mmap_iterate): New function declaration.
4970 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4971 structure.
4972 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4973 macros.
4974
4975 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4976 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4977 Move e820 parsing from here ...
4978 * kern/i386/pc/mmap.c: New file.
4979 (grub_machine_mmap_iterate): ... to here.
4980
4981 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4982 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4983 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4984 (grub_available_iterate): Redeclare to return `void', and redeclare
4985 its hook to use grub_uint64_t as addr and size parameters, and rename
4986 to ...
4987 (grub_machine_mmap_iterate): ... this. Update all users.
4988
4989 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4990 to make it more readable. Rename to ...
4991 (grub_machine_mmap_iterate): ... this.
4992
4993 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4994 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4995 (grub_multiboot): Allocate an extra region after the payload, and fill
4996 it with a Multiboot memory map. Adjust a.out loader to calculate size
4997 with the extra space.
4998 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4999 with the extra space.
5000
f8aa0f43 50012008-08-17 Carles Pina i Estany <carles@pina.cat>
5002
9807deb9 5003 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 5004
605f5bb6 50052008-08-17 Felix Zielcke <fzielcke@z-51.de>
5006
5007 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5008 mdate-sh to the list `find' searches for.
5009 * DISTLIST: Regenerated.
5010
210db6c6 50112008-08-16 Felix Zielcke <fzielcke@z-51.de>
5012
5013 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5014 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 5015 genmoddep.awk, gensymlist.sh.in.
5016 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 5017 * DISTLIST: Regenerated.
48cdbfd4 5018 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 5019
1082b929 50202008-08-16 Robert Millan <rmh@aybabtu.com>
5021
5022 * disk/raid.c (grub_raid_init): Handle/report errors set by
5023 grub_device_iterate().
5024 * disk/lvm.c (grub_lvm_init): Likewise.
5025
42ce5170 50262008-08-15 Bean <bean123ch@gmail.com>
5027
5028 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5029 and datehook.mod.
5030 (datetime_mod_SOURCES): New macro.
5031 (datetime_mod_CFLAGS): Likewise.
5032 (datetime_mod_LDFLAGS): Likewise.
5033 (date_mod_SOURCES): Likewise.
5034 (date_mod_CFLAGS): Likewise.
5035 (date_mod_LDFLAGS): Likewise.
5036 (datehook_mod_SOURCES): Likewise.
5037 (datehook_mod_CFLAGS): Likewise.
5038 (datehook_mod_LDFLAGS): Likewise.
5039
5040 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5041 and datehook.mod.
5042 (datetime_mod_SOURCES): New macro.
5043 (datetime_mod_CFLAGS): Likewise.
5044 (datetime_mod_LDFLAGS): Likewise.
5045 (date_mod_SOURCES): Likewise.
5046 (date_mod_CFLAGS): Likewise.
5047 (date_mod_LDFLAGS): Likewise.
5048 (datehook_mod_SOURCES): Likewise.
5049 (datehook_mod_CFLAGS): Likewise.
5050 (datehook_mod_LDFLAGS): Likewise.
5051
5052 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5053 and datehook.mod.
5054 (datetime_mod_SOURCES): New macro.
5055 (datetime_mod_CFLAGS): Likewise.
5056 (datetime_mod_LDFLAGS): Likewise.
5057 (date_mod_SOURCES): Likewise.
5058 (date_mod_CFLAGS): Likewise.
5059 (date_mod_LDFLAGS): Likewise.
5060 (datehook_mod_SOURCES): Likewise.
5061 (datehook_mod_CFLAGS): Likewise.
5062 (datehook_mod_LDFLAGS): Likewise.
5063
5064 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5065 and datehook.mod.
5066 (datetime_mod_SOURCES): New macro.
5067 (datetime_mod_CFLAGS): Likewise.
5068 (datetime_mod_LDFLAGS): Likewise.
5069 (date_mod_SOURCES): Likewise.
5070 (date_mod_CFLAGS): Likewise.
5071 (date_mod_LDFLAGS): Likewise.
5072 (datehook_mod_SOURCES): Likewise.
5073 (datehook_mod_CFLAGS): Likewise.
5074 (datehook_mod_LDFLAGS): Likewise.
5075
5076 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5077 and datehook.mod.
5078 (datetime_mod_SOURCES): New macro.
5079 (datetime_mod_CFLAGS): Likewise.
5080 (datetime_mod_LDFLAGS): Likewise.
5081 (date_mod_SOURCES): Likewise.
5082 (date_mod_CFLAGS): Likewise.
5083 (date_mod_LDFLAGS): Likewise.
5084 (datehook_mod_SOURCES): Likewise.
5085 (datehook_mod_CFLAGS): Likewise.
5086 (datehook_mod_LDFLAGS): Likewise.
5087
5088 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5089
5090 * commands/date.c: New file.
5091
5092 * hook/datehook.c: Likewise.
5093
5094 * include/grub/lib/datetime.h: Likewise.
5095
5096 * include/grub/i386/cmos.h: Likewise.
5097
5098 * lib/datetime.c: Likewise.
5099
5100 * lib/i386/datetime.c: Likewise.
5101
5102 * lib/efi/datetime.c: Likewise.
5103
0e9242da 51042008-08-14 Robert Millan <rmh@aybabtu.com>
5105
5106 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5107 (grub_mkelfimage_SOURCES): New variable.
5108 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5109
5110 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5111 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5112 * conf/powerpc-ieee1275.rmk: Likewise.
5113 * conf/i386-ieee1275.rmk: Likewise.
5114
5115 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5116 * kern/i386/coreboot/init.c: Likewise.
5117
5118 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5119 with `<grub/cpu/kernel.h>'.
5120 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5121 to ...
5122 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5123 * kern/i386/coreboot/startup.S: Likewise.
5124
5125 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5126 (GRUB_MOD_GAP): Remove.
5127 * include/grub/powerpc/kernel.h: New file.
5128 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5129 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5130 * include/grub/i386/kernel.h: New file.
5131 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5132 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5133 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5134
5135 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5136 `grub-mkelfimage'.
5137 Use --directory when invoking grub_mkimage.
5138
5139 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5140 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5141 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5142 and GRUB_KERNEL_CPU_PREFIX.
5143
b86408f8 51442008-08-14 Felix Zielcke <fzielcke@z-51.de>
5145
d5e619ca 5146 * include/grub/err.h (grub_err_printf): New function prototype.
5147 * util/misc.c (grub_err_printf): New function.
5148 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5149 grub_printf.
5150 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 5151
7161f0e0 51522008-08-13 Robert Millan <rmh@aybabtu.com>
5153
5154 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5155
a1967522 51562008-08-13 Robert Millan <rmh@aybabtu.com>
5157
5158 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5159 boot entry.
5160
371458b5 51612008-08-12 Robert Millan <rmh@aybabtu.com>
5162
5163 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5164 of the relocation code from here ...
5165 (grub_multiboot): ... to here.
5166 (forward_relocator, backward_relocator): Move from here ...
5167 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5168 (grub_multiboot_backward_relocator): ... to here.
5169 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5170 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5171 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5172 (grub_multiboot_forward_relocator_end)
5173 (grub_multiboot_backward_relocator)
5174 (grub_multiboot_backward_relocator_end): New variables.
5175
05f9452b 51762008-08-12 Bean <bean123ch@gmail.com>
5177
5178 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5179
20024ab0 51802008-08-11 Robert Millan <rmh@aybabtu.com>
5181
5182 * kern/i386/linuxbios/startup.S: Move from here ...
5183 * kern/i386/coreboot/startup.S: ... to here.
5184
5185 * kern/i386/linuxbios/init.c: Move from here ...
5186 * kern/i386/coreboot/init.c: ... to here.
5187
5188 * kern/i386/linuxbios/table.c: Move from here ...
5189 * kern/i386/coreboot/mmap.c: ... to here.
5190
5191 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5192
e352e9cd 51932008-08-11 Robert Millan <rmh@aybabtu.com>
5194
5195 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5196 errors. Leave it to the upper layer to handle them.
5197
2d05bc6a 51982008-08-09 Christian Franke <franke@computer.org>
5199
5200 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5201 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5202 Install `grub.d/10_windows' only on Cygwin.
5203 * configure.ac: Add subst of `target_os'.
5204 Check `target_os' also before setting TARGET_OBJ2ELF.
5205 Add `--enable-grub-pe2elf'.
5206
042bd419 52072008-08-08 Robert Millan <rmh@aybabtu.com>
5208
5209 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5210 (grub_last_time): Change type to grub_uint64_t.
5211 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5212 (grub_disk_close): Likewise.
5213
5214 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5215 (run_menu): Migrate code from to using grub_get_time_ms().
5216
5217 * util/misc.c (grub_get_time_ms): New function.
5218
7f280db5 52192008-08-08 Marco Gerards <marco@gnu.org>
5220
5221 * disk/ata.c (grub_ata_regget): Change return type to
5222 `grub_uint8_t'.
5223 (grub_ata_regget2): Likewise.
5224 (grub_ata_wait_status): New function.
5225 (grub_ata_wait_busy): Removed function, updated all users to use
5226 `grub_ata_wait_status'.
5227 (grub_ata_wait_drq): Likewise.
5228 (grub_ata_cmd): New function.
5229 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5230 error handling.
5231 (grub_ata_pio_write): Add error handling.
5232 (grub_atapi_identify): Likewise.
5233 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5234 handling.
5235 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5236 handling. Actually use the detected registers. Reorder the
5237 detection logic such that it is easier to read.
5238 (grub_ata_pciinit): Do not assign the same ID to each controller.
5239 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5240 handling.
5241 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5242
5243 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5244
1fbc5e66 52452008-08-08 Marco Gerards <marco@gnu.org>
5246
5247 * NEWS: Update.
5248
819ce6c0 52492008-08-07 Bean <bean123ch@gmail.com>
5250
5251 * include/grub/x86_64/pci.h: New file.
5252
5c41d44d 52532008-08-07 Christian Franke <franke@computer.org>
5254
5255 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5256 (TIMER2_GATE): Likewise.
5257 (grub_pit_wait): Add enable/disable of the timer2 gate
5258 bit of port 0x61. This fixes a possible infinite loop.
5259
5ebc275d 52602008-08-07 Bean <bean123ch@gmail.com>
5261
5262 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5263 kern/i386/tsc.c and kern/i386/pit.c.
5264
5265 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5266 x86_64 platform.
5267
5268 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5269 <grub/i386/tsc.h>.
5270
5271 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5272
e383b3d0 52732008-08-07 Bean <bean123ch@gmail.com>
5274
5275 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5276
5277 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5278
5279 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5280 multiple inclusion. Add #include <grub/types.h>.
5281
1cbb58ac 52822008-08-06 Christian Franke <franke@computer.org>
5283
5284 * conf/common.rmk: Build and install `10_windows'.
5285 * util/grub.d/10_windows.in: New script.
5286
337f5a1e 52872008-08-06 Pavel Roskin <proski@gnu.org>
5288
5289 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5290
057bc4ac 52912008-08-06 Robert Millan <rmh@aybabtu.com>
5292
5293 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5294 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5295
2b99f123 52962008-08-06 Bean <bean123ch@gmail.com>
5297
5298 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5299 (grub_pxefs_fs_int): Remove dummy definition.
5300 (grub_pxefs_open): Use data->block_size to store the current block
5301 size setting.
5302 (grub_pxefs_read): Use block size stored in data->block_size. As the
5303 value of grub_pxe_blksize can be changed after the file is opened.
5304
9f0234cb 53052008-08-06 Bean <bean123ch@gmail.com>
5306
5307 * fs/i386/pc/pxe.c (curr_file): new variable.
5308 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5309 require the dummy internal file system anymore.
5310 (grub_pxefs_read): Removed.
5311 (grub_pxefs_close): Likewise.
5312 (grub_pxefs_fs_int): Likewise.
5313 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5314 connection when we switch file.
5315 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5316
a55d42e0 53172008-08-06 Robert Millan <rmh@aybabtu.com>
5318
5319 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5320 `halt.mod'.
5321 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5322 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5323
5324 * kern/i386/halt.c: New file.
5325 * kern/i386/reboot.c: Likewise.
5326 * include/grub/i386/reboot.h: Likewise.
5327 * include/grub/i386/halt.h: Likewise.
5328
5329 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5330 Include `<grub/cpu/halt.h>'.
5331 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5332 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5333
5334 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5335 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5336 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5337 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5338 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5339 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5340 from here ...
5341 * include/grub/i386/at_keyboard.h: ... to here.
5342
24371d26 53432008-08-05 Robert Millan <rmh@aybabtu.com>
5344
5345 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5346 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5347 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5348 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5349 `kern/generic/millisleep.c'.
5350
5351 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5352 instead of grub_get_rtc().
5353 (grub_tsc_init): Initialize `tsc_boot_time'.
5354
5355 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5356 (grub_machine_init): Use grub_tsc_init() rather than
5357 installing an RTC-based handler via grub_install_get_time_ms().
5358
5359 * kern/i386/pit.c: New file.
5360 * include/grub/i386/pit.h: Likewise.
5361
9e7007b3 53622008-08-05 Bean <bean123ch@gmail.com>
5363
5364 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5365
5366 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5367 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5368 (pxe_mod_SOURCES): New macro.
5369 (pxe_mod_CFLAGS): Likewise.
5370 (pxe_mod_LDFLAGS): Likewise.
5371 (pxecmd_mod_SOURCES): Likewise.
5372 (pxecmd_mod_CFLAGS): Likewise.
5373 (pxecmd_mod_LDFLAGS): Likewise.
5374
5375 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5376 (grub_pxe_call): Likewise.
5377
5378 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5379
5380 * commands/i386/pc/pxecmd.c: New file.
5381
9f0234cb 5382 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 5383
5384 * include/grub/i386/pc/pxe.h: Likewise.
5385
6977d49f 53862008-08-05 Bean <bean123ch@gmail.com>
5387
5388 * util/console.c (grub_console_cur_color): New variable.
5389 (grub_console_standard_color): Likewise.
5390 (grub_console_normal_color): Likewise.
5391 (grub_console_highlight_color): Likewise.
5392 (color_map): Likewise.
5393 (use_color): Likewise.
5394 (NUM_COLORS): New macro.
5395 (grub_ncurses_setcolorstate): Handle color properly.
5396 (grub_ncurses_setcolor): Don't change color here, just remember the
5397 settings, color will be set in grub_ncurses_setcolorstate.
5398 (grub_ncurses_getcolor): New function.
5399 (grub_ncurses_init): Initialize color pairs.
5400 (grub_ncurses_term): New member grub_ncurses_getcolor.
5401
9c2ff3ee 54022008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 5403
9c2ff3ee 5404 High resolution timer support. Implemented for x86 CPUs using TSC.
5405 Extracted generic grub_millisleep() so it's linked in only as needed.
5406 This requires a Pentium compatible CPU; if the RDTSC instruction is
5407 not supported, then it falls back on the generic grub_get_time_ms()
5408 implementation that uses the machine's RTC.
5409
5410 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5411 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5412 `kern/generic/millisleep.c'.
5413
5414 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5415 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5416
5417 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5418 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5419
5420 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5421
5422 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5423 `kern/generic/millisleep.c'.
5424
5425 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5426
5427 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5428
5429 * kern/generic/rtc_get_time_ms.c: New file.
5430
5431 * kern/generic/millisleep.c: New file.
337f5a1e 5432
9c2ff3ee 5433 * kern/misc.c: Don't include
5434 <kern/time.h> anymore.
5435 (grub_millisleep_generic): Removed.
5436
5437 * commands/sleep.c (grub_interruptible_millisleep): Uses
5438 grub_get_time_ms() instead of grub_get_rtc().
5439
5440 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5441 function.
5442 (grub_cpu_is_cpuid_supported): New inline function.
5443 (grub_cpu_is_tsc_supported): New inline function.
5444 (grub_tsc_init): New function prototype.
5445 (grub_tsc_get_time_ms): New function prototype.
5446
5447 * kern/i386/tsc.c (grub_get_time_ms): New file.
5448
5449 * include/grub/time.h: Include <grub/types.h.
5450 (grub_millisleep_generic): Removed.
5451 (grub_get_time_ms): New prototype.
5452 (grub_install_get_time_ms): New prototype.
5453 (grub_rtc_get_time_ms): New prototype.
5454
5455 * kern/time.c (grub_get_time_ms): New function.
5456 (grub_install_get_time_ms): New function.
5457
5458 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5459 <grub/time.h> anymore.
5460 (grub_millisleep): Removed.
5461 (grub_machine_init): Call grub_tsc_init.
5462
5463 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5464 get_time_ms() implementation.
5465
5466 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5467 (ieee1275_get_time_ms): New function.
5468 (grub_machine_init): Install get_time_ms() implementation.
5469
5470 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5471 (grub_machine_init): Call grub_tsc_init().
5472 (grub_millisleep): Removed.
bf06a93f 5473
9c2ff3ee 5474 * kern/ieee1275/init.c (grub_millisleep): Removed.
5475 (grub_machine_init): Install ieee1275_get_time_ms()
5476 implementation.
5477 (ieee1275_get_time_ms): New function.
5478 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5479 real work.
5480
9ec92aaf 54812008-08-05 Marco Gerards <marco@gnu.org>
5482
5483 * disk/ata.c: Include <grub/pci.h>.
5484 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5485 (grub_ata_initialize): Rewritten.
5486 (grub_ata_device_initialize): New function.
5487
8d23f507 54882008-08-04 Pavel Roskin <proski@gnu.org>
5489
5490 * kern/main.c: Include grub/mm.h.
5491
5e15ee3d 54922008-08-04 Robert Millan <rmh@aybabtu.com>
5493
5494 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5495 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5496 corruption problem).
5497
a9053f8f 54982008-08-04 Robert Millan <rmh@aybabtu.com>
5499
5500 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5501 warnings introduced in my last commit.
5502
dd19c7d7 55032008-08-03 Robert Millan <rmh@aybabtu.com>
5504
5505 Make PCI available on all i386 architectures.
5506
5507 * include/grub/i386/pc/pci.h: Move from here ...
5508 * include/grub/i386/pci.h: ... to here.
5509
5510 * include/grub/i386/pc/pci.h: Remove.
5511 * include/grub/i386/efi/pci.h: Remove.
5512 * include/grub/x86_64/efi/pci.h: Remove.
5513
5514 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5515 `<grub/cpu/pci.h>'.
5516
5517 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5518 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5519 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5520
5521 * conf/i386-ieee1275.rmk: Likewise.
5522
e14a6184 55232008-08-03 Robert Millan <rmh@aybabtu.com>
5524
5525 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5526 (grub_console_setcursor): Make it possible to set cursor off.
5527
52768e37 55282008-08-03 Robert Millan <rmh@aybabtu.com>
5529
5530 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5531 of modules instead of assuming which platform provides what.
5532 * util/update-grub.in: Likewise.
5533
2d52f57f 55342008-08-03 Robert Millan <rmh@aybabtu.com>
5535
5536 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5537 instead of `grub_install_dos_part' to determine whether a drive needs
5538 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 5539 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 5540
2a5cd121 55412008-08-02 Robert Millan <rmh@aybabtu.com>
5542
5543 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5544
93808428 55452008-08-02 Robert Millan <rmh@aybabtu.com>
5546
5547 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5548 of informational grub_dprintf() calls.
5549
3bd0a12a 55502008-08-02 Robert Millan <rmh@aybabtu.com>
5551
5552 * disk/memdisk.c (memdisk_size): Don't initialize.
5553 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5554
5555 * include/grub/i386/pc/kernel.h
5556 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5557 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5558 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5559 (grub_arch_memdisk_size): Remove.
5560
5561 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5562 field (was only used to transfer a constant). Add `type' field to
5563 support multiple module types.
5564 (grub_module_iterate): New function.
5565
5566 * kern/device.c (grub_device_open): Do not hide error messages
5567 when grub_disk_open() fails. Use grub_print_error() instead.
5568
5569 * kern/i386/pc/init.c (grub_arch_modules_addr)
5570 (grub_arch_memdisk_size): Remove functions.
5571 (grub_arch_modules_addr): Return the module address in high memory
5572 (now that it isn't copied anymore).
5573
5574 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5575 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5576 decompression routine (grub_total_module_size already includes that
5577 now). Don't copy modules back to low memory.
5578
5579 * kern/main.c: Include `<grub/mm.h>'.
5580 (grub_load_modules): Split out (and use) ...
5581 (grub_module_iterate): ... this function, which iterates through
5582 module objects and runs a hook.
5583 Comment out grub_mm_init_region() call, as it would cause non-ELF
5584 modules to be overwritten.
5585
5586 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5587 the memdisk image in its own region, make it part of the module list.
5588 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5589 (main): Parse --memdisk|-m option, and pass user-provided path as
5590 parameter to generate_image().
5591 (add_segments): Pass `memdisk_path' down to load_modules().
5592 (load_modules): Embed memdisk image in module section when requested.
5593 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5594 `header.type' instead of `header.offset'.
5595
5596 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5597 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5598 (memdisk_mod_LDFLAGS): New variables.
5599 * conf/i386-coreboot.rmk: Likewise.
5600 * conf/i386-ieee1275.rmk: Likewise.
5601
a927cc73 56022008-08-02 Robert Millan <rmh@aybabtu.com>
5603
5604 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5605 (backward_relocator): New variables. Used to allocate and relocate
5606 the payload, respectively.
5607 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 5608 address, install the appropriate relocator code in each bound of
a927cc73 5609 the payload, and set the entry point such that
5610 grub_multiboot_real_boot() will jump to one of them.
5611
5612 * kern/i386/loader.S (grub_multiboot_payload_size)
5613 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5614 (grub_multiboot_payload_entry_offset): New variables.
5615 (grub_multiboot_real_boot): Set cpu context to what the relocator
5616 expects, and jump to the relocator instead of the payload.
5617
5618 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5619 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5620 (grub_multiboot_payload_entry_offset): Export.
5621
b15d8a0c 56222008-08-01 Bean <bean123ch@gmail.com>
5623
5624 * normal/menu_entry.c (editor_getline): Don't return the original
5625 string as result, as it will be released by lexer once it has done
5626 using it.
5627
cdfb3d22 56282008-08-01 Robert Millan <rmh@aybabtu.com>
5629
5630 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5631 within menuentries, not before them.
5632 util/grub.d/10_hurd.in: Likewise.
5633
9175e93d 56342008-08-01 Bean <bean123ch@gmail.com>
5635
5636 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5637 (bufio_mod_SOURCES): New macro.
5638 (bufio_mod_CFLAGS): Likewise.
5639 (bufio_mod_LDFLAGS): Likewise.
5640
5641 * include/grub/bufio.h: New file.
5642
5643 * io/bufio.c: Likewise.
5644
5645 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5646 (grub_video_reader_png): Use grub_buffile_open to open file.
5647
5648 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5649 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5650
5651 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5652 (grub_video_reader_tga): Use grub_buffile_open to open file.
5653
5654 * font/manager.c: Include <grub/bufio.h>.
5655 (add_font): Use grub_buffile_open to open file.
5656
3d8383e7 56572008-07-31 Robert Millan <rmh@aybabtu.com>
5658
5659 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5660 ELF segments, use a macro for arbitrarily accessing any of them instead
5661 of preparing a pointer that allows access to one at a time.
5662 (grub_multiboot_load_elf64): Likewise.
5663
16e641b6 56642008-07-31 Bean <bean123ch@gmail.com>
5665
5666 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5667 GRUB_KERNEL_MACHINE_DATA_END.
5668
59198b72 56692008-07-30 Robert Millan <rmh@aybabtu.com>
5670
5671 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5672 Increase from 0x50 to 0x60.
5673 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5674 use UUIDs to identify the root drive for them. If that's not
5675 possible, abort.
5676 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5677 check, for cross-disk installs.
5678
ae88bca3 56792008-07-30 Robert Millan <rmh@aybabtu.com>
5680
5681 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5682 is non-empty, use it to set the `prefix' environment variable instead
5683 of the usual approach.
5684 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5685 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5686 environment variable instead of dummy make_install_device().
5687
5688 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5689 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 5690 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 5691
5692 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5693 New variable reference.
5694 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5695 New macro. Defines offset of `grub_prefix' within startup.S (relative
5696 to `start').
5697 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5698 section within startup.S (relative to `start').
5699 * include/grub/i386/coreboot/kernel.h: Likewise.
5700
5701 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5702 Overwrite grub_prefix with its contents, at the beginning of the
5703 first segment.
5704 (main): Understand -p|--prefix.
5705
14f41dd1 57062008-07-30 Robert Millan <rmh@aybabtu.com>
5707
5708 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5709
4ca049a3 57102008-07-30 Robert Millan <rmh@aybabtu.com>
5711
5712 * term/i386/pc/vga_text.c (grub_console_cls): Use
5713 grub_console_gotoxy() to go back to beginning of the screen.
5714 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5715
2921d337 57162008-07-29 Christian Franke <franke@computer.org>
5717
5718 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5719 Add conversion of emulated mount points on Cygwin.
5720
b609876d 57212008-07-29 Christian Franke <franke@computer.org>
5722
5723 * util/update-grub.in: Add a check for admin
5724 group on Cygwin.
5725 Remove old `grub.cfg.new' before creation.
5726 Add `-f' to `mv' to handle the different filesystem
5727 semantics of Windows.
5728
e93e4679 57292008-07-29 Bean <bean123ch@gmail.com>
5730
5731 * normal/main.c (get_line): Fix buffer overflow bug.
5732
41694fd0 57332008-07-28 Robert Millan <rmh@aybabtu.com>
5734
5735 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5736 (struct grub_apple_header): New struct. Describes the layout of
5737 the partmap header.
5738 (apple_partition_map_iterate): Check the header magic as well as the
5739 partition magic (which was already being checked).
5740
cfd0b4e6 57412008-07-28 Pavel Roskin <proski@gnu.org>
5742
5743 * genmk.rb: Add a warning to the beginning of the output that
5744 it's a generated file and should not be edited.
5745
93cce016 57462008-07-28 Robert Millan <rmh@aybabtu.com>
5747
5748 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5749 with the same number are found, just use issue a warning with
5750 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 5751
cd1df915 57522008-07-27 Robert Millan <rmh@aybabtu.com>
5753
5754 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5755 information.
5756
b70a8427 57572008-07-27 Bean <bean123ch@gmail.com>
5758
5759 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5760 (grub_fat_find_dir): Ignore case when comparing filename.
5761
8f5e379f 57622008-07-27 Bean <bean123ch@gmail.com>
5763
5764 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5765 smallino, as it's more descriptive, and i8count can be confused with
5766 the other field count.
5767 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5768 inode type.
5769
a85cd5a0 57702008-07-27 Bean <bean123ch@gmail.com>
5771
5772 * commands/crc.c: New file.
5773
5774 * lib/crc.c: Likewise.
5775
5776 * include/grub/lib/crc.h: Likewise.
5777
5778 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5779
5780 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5781 (hexdump): Move this function to ...
5782
5783 * lib/hexdump.c: ... here.
5784
5785 * include/grub/hexdump.h: Renamed to ...
5786
5787 * include/grub/lib/hexdump.h: ... this.
5788
5789 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5790
5791 * util/grub-editenv.c: Likewise.
5792
5793 * include/envblk.h: Renamed to ...
5794
5795 * include/lib/envblk.h: ... this.
5796
5797 * util/envblk.c: Renamed to ...
5798
5799 * lib/envblk.c: ... this.
5800
5801 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5802 lib/hexdump.c.
5803 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5804 (pkglib_MODULES): Add crc.mod.
5805 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5806 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5807 (crc_mod_SOURCES): New macro.
5808 (crc_mod_CFLAGS): Likewise.
5809 (crc_mod_LDFLAGS): Likewise.
5810
5811 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5812
5813 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5814
5815 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5816
5817 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5818
5819 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5820
c298def0 58212008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 5822
5823 * commands/help.c: Include <grub/term.h>.
5824 (TERM_WIDTH): Removed. Updated all users.
5825
cc349fb3 58262008-07-27 Pavel Roskin <proski@gnu.org>
5827
5828 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5829 spurious warnings about a comment within a comment.
5830
9051607e 58312008-07-25 Robert Millan <rmh@aybabtu.com>
5832
5833 * util/getroot.c (find_root_device): Skip devices that match
5834 /dev/dm-[0-9]. This lets the real device be found for any type of
5835 abstraction (LVM, EVMS, RAID..).
5836 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5837 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5838 device is found first, find_root_device() will now skip it.
5839
01453bfc 58402008-07-24 Pavel Roskin <proski@gnu.org>
5841
5842 * include/grub/types.h: Use __builtin_bswap32() and
5843 __builtin_bswap64() with gcc 4.3 and newer.
5844
6af9849f 58452008-07-24 Christian Franke <franke@computer.org>
5846
3a0fa256 5847 * util/i386/pc/grub-install.in: If `--debug' is specified,
5848 pass `--verbose' to grub-setup.
5849 Abort script if make_system_path_relative_to_its_root() fails.
5850
7810e747 58512008-07-24 Bean <bean123ch@gmail.com>
5852
5853 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5854 variable `target_platform' should be `platform'.
5855
42290e17 58562008-07-24 Bean <bean123ch@gmail.com>
5857
51cc5193 5858 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 5859 (grub_png_init_fixed_block): New function.
5860 (grub_png_decode_image_data): Handle fixed huffman code compression.
5861
2a8a80e4 58622008-07-24 Bean <bean123ch@gmail.com>
5863
5864 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5865 (grub_pe2elf_SOURCES): New macro.
5866 (CLEANFILES): Add grub-pe2elf.
5867
5868 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5869 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5870 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5871 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5872 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5873 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5874 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5875 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5876 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5877 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5878 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5879 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5880 (GRUB_PE32_DT_FUNCTION): Likewise.
5881 (GRUB_PE32_REL_I386_DIR32): Likewise.
5882 (GRUB_PE32_REL_I386_REL32): Likewise.
5883 (grub_pe32_symbol): New structure.
5884 (grub_pe32_reloc): Likewise.
5885
5886 * util/grub-pe2elf.c: New file.
5887
5888 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5889 start symbol in non pc platform.
5890
5891 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5892
5893 The following patches are from Christian Franke.
5894
5895 * include/grub/dl.h: Remove .previous, gas supports this only
5896 for ELF format.
5897
5898 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5899 Remove .type, gas supports this only for ELF format.
5900
5901 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5902 nullbytes in symbol table. This fixes an infinite loop if table is
5903 zero filled.
5904
5905 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5906 TARGET_IMG_LDFLAGS and EXEEXT.
5907
5908 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5909 TARGET_IMG_LDFLAGS_AC.
5910 (grub_CHECK_STACK_ARG_PROBE): New function.
5911
5912 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5913
5914 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5915
5916 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5917 to set TARGET_IMG_LD* accordingly.
5918 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5919 Add call to grub_CHECK_STACK_ARG_PROBE.
5920 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5921
5922 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5923
5924 * genmk.rb: Add EXEEXT to CLEANFILES.
5925
12ccdb75 59262008-07-23 Robert Millan <rmh@aybabtu.com>
5927
5928 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5929 define the codes for arrows and lines used for the menu).
5930 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5931 as well.
5932
5933 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5934 fonts, because the latter are too slow.
5935
18eeaf04 59362008-07-21 Bean <bean123ch@gmail.com>
5937
5938 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5939 a20. Run keyboard test last, as it will cause macbook to halt.
5940
b095e2ad 59412008-07-18 Pavel Roskin <proski@gnu.org>
5942
5943 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5944 load foreign architecture modules correctly anyway. Keep
5945 support for loading host architecture modules, whether we
5946 compile them or not.
5947
737feb35 59482008-07-17 Pavel Roskin <proski@gnu.org>
5949
3f4ce737 5950 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5951 change target_cpu. The compiler default can mismatch target_cpu
5952 in any case.
5953
4ad2d049 5954 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5955 * kern/efi/efi.c: Likewise.
5956
f6130a12 5957 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5958 target compiler is functional.
5959 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5960 are set up.
5961
58393a2d 5962 * configure.ac: Default to efi platform for x86_64-apple. Allow
5963 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5964 adjustments from the rest, only do them if target is not
5965 explicitly given. Merge other adjustments with the final sanity
5966 check. Remove an extraneous check for supported CPU. Be
5967 specific which CPU and which platform is not supported.
5968
737feb35 5969 * configure.ac: Default to pc platform for x86_64.
5970
546f966a 59712008-07-17 Robert Millan <rmh@aybabtu.com>
5972
5973 Partial LinuxBIOS -> Coreboot rename.
5974
5975 * conf/i386-linuxbios.rmk: Renamed to ...
5976 * conf/i386-coreboot.rmk: ... this.
5977 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5978 * configure.ac: Accept "coreboot" as input platform (but maintain
5979 compatibility with "linuxbios").
5980 * include/grub/i386/linuxbios: Renamed to ...
5981 * include/grub/i386/coreboot: ... this.
5982
20011694 59832008-07-17 Bean <bean123ch@gmail.com>
5984
5985 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 5986 (appleldr_mod_SOURCE): New variable.
20011694 5987 (appleldr_mod_CFLAGS): Likewise.
5988 (appleldr_mod_LDFLAGS): Likewise.
5989 (pci_mod_SOURCES): Likewise.
5990 (pci_mod_CFLAGS): Likewise.
5991 (pci_mod_LDFLAGS): Likewise.
5992 (lspci_mod_SOURCES): Likewise.
5993 (lspci_mod_CFLAGS): Likewise.
5994 (lspci_mod_LDFLAGS): Likewise.
5995
5996 * conf/x86_64-efi.rmk: New file.
5997
5998 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5999 macro.
6000 (grub_efidisk_write): Likewise.
6001
6002 * include/efi/api.h (efi_call_0): New macro.
6003 (efi_call_1): Likewise.
6004 (efi_call_2): Likewise.
6005 (efi_call_3): Likewise.
6006 (efi_call_4): Likewise.
6007 (efi_call_5): Likewise.
6008 (efi_call_6): Likewise.
6009
6010 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6011 grub_rescue_cmd_chainloader.
6012
6013 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6014 (grub_pe32_optional_header): Change some fields based on i386 or
6015 x86_64 platform.
6016 (GRUB_PE32_PE32_MAGIC): Likewise.
6017
6018 * include/grub/efi/uga_draw.h: New file.
6019
6020 * include/grub/elf.h (STN_ABS): New constant.
6021 (R_X86_64_NONE): Relocation constant for x86_64.
6022 (R_X86_64_64): Likewise.
6023 (R_X86_64_PC32): Likewise.
6024 (R_X86_64_GOT32): Likewise.
6025 (R_X86_64_PLT32): Likewise.
6026 (R_X86_64_COPY): Likewise.
6027 (R_X86_64_GLOB_DAT): Likewise.
6028 (R_X86_64_JUMP_SLOT): Likewise.
6029 (R_X86_64_RELATIVE): Likewise.
6030 (R_X86_64_GOTPCREL): Likewise.
6031 (R_X86_64_32): Likewise.
6032 (R_X86_64_32S): Likewise.
6033 (R_X86_64_16): Likewise.
6034 (R_X86_64_PC16): Likewise.
6035 (R_X86_64_8): Likewise.
6036 (R_X86_64_PC8): Likewise.
6037
6038 * include/grub/i386/efi/pci.h: New file.
6039
6040 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6041 Change it value based on platform.
6042 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6043 (GRUB_E820_RAM): Likewise.
6044 (GRUB_E820_RESERVED): Likewise.
6045 (GRUB_E820_ACPI): Likewise.
6046 (GRUB_E820_NVS): Likewise.
6047 (GRUB_E820_EXEC_CODE): Likewise.
6048 (GRUB_E820_MAX_ENTRY): Likewise.
6049 (grub_e820_mmap): New structure.
6050 (linux_kernel_header): Change the efi field according to different
6051 kernel version, also field from linux_kernel_header.
6052
6053 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6054
6055 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6056 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6057 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6058 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6059 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6060 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6061 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6062 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6063 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6064 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6065
6066 * include/grub/x86_64/efi/kernel.h: New file.
6067
6068 * include/grub/x86_64/efi/loader.h: Likewise.
6069
6070 * include/grub/x86_64/efi/machine.h: Likewise.
6071
6072 * include/grub/x86_64/efi/pci.h: Likewise.
6073
6074 * include/grub/x86_64/efi/time.h: Likewise.
6075
6076 * include/grub/x86_64/linux.h: Likewise.
6077
6078 * include/grub/x86_64/setjmp.h: Likewise.
6079
6080 * include/grub/x86_64/time.h: Likewise.
6081
6082 * include/grub/x86_64/types.h: Likewise.
6083
6084 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6085 GRUB_TARGET_SIZEOF_VOID_P.
6086
6087 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6088 (grub_efi_locate_handle): Likewise.
6089 (grub_efi_open_protocol): Likewise.
6090 (grub_efi_set_text_mode): Likewise.
6091 (grub_efi_stall): Likewise.
6092 (grub_exit): Likewise.
6093 (grub_reboot): Likewise.
6094 (grub_halt): Likewise.
6095 (grub_efi_exit_boot_services): Likewise.
6096 (grub_get_rtc): Likewise.
6097
6098 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6099 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6100 (grub_efi_allocate_pages): Wrap efi calls.
6101 (grub_efi_free_pages): Wrap efi calls.
6102 (grub_efi_get_memory_map): Wrap efi calls.
6103
6104 * kern/x86_64/dl.c: New file.
6105
6106 * kern/x86_64/efi/callwrap.S: Likewise.
6107
6108 * kern/x86_64/efi/startup.S: Likewise.
6109
6110 * loader/efi/appleloader.c: Likewise.
6111
6112 * loader/efi/chainloader.c (cmdline): New variable.
6113 (grub_chainloader_unload): Wrap efi calls.
6114 (grub_chainloader_boot): Likewise.
6115 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6116 command line.
6117
6118 * loader/efi/chainloader_normal.c (chainloader_command):
6119 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6120 command line.
6121
6122 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6123 method.
6124 (grub_e820_add_region): New function.
6125 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6126 booting.
6127 (grub_find_video_card): New function.
6128 (grub_linux_setup_video): New function.
6129 (grub_rescue_cmd_linux): Probe for video information.
6130
6131 * normal/x86_64/setjmp.S: New file.
6132
6133 * term/efi/console.c (map_char): New function.
6134 (grub_console_putchar): Map unicode char.
6135 (grub_console_checkkey): Wrap efi calls.
6136 (grub_console_getkey): Likewise.
6137 (grub_console_getwh): Likewise.
6138 (grub_console_gotoxy): Likewise.
6139 (grub_console_cls): Likewise.
6140 (grub_console_setcolorstate): Likewise.
6141 (grub_console_setcursor): Likewise.
6142
6143 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6144
59652a20 61452008-07-16 Pavel Roskin <proski@gnu.org>
6146
ef294055 6147 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6148 format strings.
6149
59652a20 6150 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6151 pointer, not an integer. This fixes a warning and prevents
6152 precision loss on 64-bit systems.
6153 (relocate_addresses): Remove unneeded cast.
6154
afc3b5d7 61552008-07-15 Pavel Roskin <proski@gnu.org>
6156
506b2b3e 6157 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6158
62ead89c 6159 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6160
c4cd51d7 6161 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6162 Fix comparison between signed and unsigned.
6163
0d3d8f28 6164 * include/grub/i386/ieee1275/console.h: Declare
6165 grub_console_init() and grub_console_fini().
6166
8804b286 6167 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6168 It's empty and unused.
6169
ee01cf35 6170 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6171 beginning to avoid warnings with some compilers.
6172
afc3b5d7 6173 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6174 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6175
e4e8eaa5 61762008-07-14 Pavel Roskin <proski@gnu.org>
6177
407aceb4 6178 * kern/env.c (grub_register_variable_hook): Don't copy empty
6179 string, it leaks memory. Pass "" to grub_env_set(), it should
6180 handle constant strings.
6181
e4e8eaa5 6182 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6183 * commands/cmp.c (grub_cmd_cmp): Likewise.
6184 * kern/dl.c (grub_dl_flush_cache): Likewise.
6185 (grub_dl_load_core): Likewise.
6186 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6187 (grub_elf64_load_phdrs): Likewise.
6188
d4e2dad3 61892008-07-13 Pavel Roskin <proski@gnu.org>
6190
6191 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6192 between signed and unsigned.
6193 (LzmaEnc_Finish): Fix warning about an unused parameter.
6194
aa24b516 61952008-07-13 Bean <bean123ch@gmail.com>
6196
6197 * Makefile.in (enable_lzo): New rule.
6198
6199 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6200
6201 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6202
6203 * boot/i386/pc/lnxboot.S: #include <config.h>.
6204
6205 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 6206 its value according to the compression algorithm used, lzo or lzma.
aa24b516 6207
6208 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6209 compression algorithm according to configure macro.
6210
6211 * kern/i386/pc/startup.S (codestart): Likewise.
6212
6213 * kern/i386/pc/lzma_decode.S: New file.
6214
6215 * include/grub/lib/LzFind.h: Likewise.
6216
6217 * include/grub/lib/LzHash.h: Likewise.
6218
6219 * include/grub/lib/LzmaDec.h: Likewise.
6220
6221 * include/grub/lib/LzmaEnc.h: Likewise.
6222
6223 * include/grub/lib/LzmaTypes.h: Likewise.
6224
6225 * lib/LzFind.c: Likewise.
6226
6227 * lib/LzmaDec.c: Likewise.
6228
6229 * lib/LzmaEnc.c: Likewise.
6230
4ae821ac 62312008-07-13 Bean <bean123ch@gmail.com>
6232
6233 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6234 (grub_ext4_extent_header): New structure.
6235 (grub_ext4_extent): Likewise.
6236 (grub_ext4_extent_idx): Likewise.
6237 (grub_ext4_find_leaf): New function.
6238 (grub_ext2_read_block): Handle extents.
6239
9a745147 62402008-07-12 Robert Millan <rmh@aybabtu.com>
6241
6242 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6243
d49a4cf6 62442008-07-11 Robert Millan <rmh@aybabtu.com>
6245
6246 * util/grub.d/40_custom.in: New file. Example on how to add custom
6247 entries to /etc/grub.d.
6248 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6249 40_custom (implicitly, by merging all the grub.d rules).
6250
947414b4 62512008-07-11 Pavel Roskin <proski@gnu.org>
6252
0059cf6f 6253 * commands/read.c (grub_getline): Fix invalid memory access.
6254 Don't add newline to the variable value.
6255
947414b4 6256 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6257 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6258 (serial_hw_get_port): Check validity of the port number.
6259 (grub_cmd_serial): Check return value of serial_hw_get_port().
6260
62a02d00 62612008-07-07 Pavel Roskin <proski@gnu.org>
6262
6263 * boot/i386/pc/diskboot.S (notification_string): Replace
6264 "Loading kernel" with just "loading". This is shorter, less
6265 confusing and saves a few bytes for possible future changes.
6266
3e5581b0 62672008-07-05 Pavel Roskin <proski@gnu.org>
6268
ea387a48 6269 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6270 size for ATAPI devices, they are undefined. Output sector
6271 number in decimal form.
6272
3e5581b0 6273 * disk/ata.c: Use named constants for status bits.
6274
fdecb8fd 62752008-07-04 Pavel Roskin <proski@gnu.org>
6276
bcd35b90 6277 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6278 grub_addr_t before casting it to the void pointer to fix a
6279 warning. Non-addressable regions are discarded earlier.
6280 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6281 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6282 (check_signature): Don't shadow table_header.
6283 (grub_linuxbios_table_iterate): Cast numeric constants to
6284 grub_linuxbios_table_header_t.
6285 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6286 grub_stop().
6287
af58ab3d 6288 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6289 prevent warnings.
6290
1759aa57 6291 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6292 pointer, which can cause warnings. Support 64-bit addresses.
6293
fdecb8fd 6294 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6295 of sizeof(long). This fixes PowerPC image generation on x86_64.
6296
8516d2a8 62972008-07-04 Robert Millan <rmh@aybabtu.com>
6298
6299 This fixes a performance issue when pc & gpt partmap iterators
6300 didn't abort iteration even after our hook found what it was
fe987087 6301 looking for (often causing expensive probes of non-existent drives).
8516d2a8 6302
6303 Some callers relied on previous buggy behaviour, since they would
34c44600 6304 raise an error when their own hooks caused early abortion of its
8516d2a8 6305 iteration.
6306
6307 * kern/device.c (grub_device_open): Improve error message.
6308 * disk/lvm.c (grub_lvm_open): Likewise.
6309 * disk/raid.c (grub_raid_open): Likewise.
6310
6311 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6312 when hook requests it, independently of grub_errno.
6313 (pc_partition_map_probe): Do not fail when find_func() caused
6314 early abortion of pc_partition_map_iterate().
6315
6316 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6317 when hook requests it, independently of grub_errno.
6318 (gpt_partition_map_probe): Do not fail when find_func() caused
6319 early abortion of gpt_partition_map_iterate().
6320
6321 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6322 when hook requests it, independently of grub_errno. Do not fail when
6323 part_map_iterate_hook() caused early abortion of p->iterate().
6324
6325 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6326 when grub_partition_iterate() returned with non-zero.
6327
277d0de9 63282008-07-03 Pavel Roskin <proski@gnu.org>
6329
6330 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6331 like we do in grub_ata_pio_read().
6332 (grub_ata_readwrite): Always write individual sectors. Fix the
6333 sector count for the remainder.
6334 (grub_ata_write): Enable writing to ATA devices. Correctly
6335 report error for ATAPI devices.
6336
d4c9b428 63372008-07-02 Pavel Roskin <proski@gnu.org>
6338
e43fc690 6339 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6340 warning.
6341
f707af42 6342 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6343 for every read sector, we already increment it for the whole
6344 batch. This fixes reading more than 256 sectors at once.
6345
11e16b15 6346 * util/grub-editenv.c (cmd_info): Cast argument to long
6347 explicitly. ptrdiff_t reduces to int on i386.
6348
cbabfdd4 6349 * util/grub-editenv.c (main): Be specific which parameter is
6350 missing.
6351
b8fbce0a 6352 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6353 (memdisk): Make memdisk_orig_addr a pointer.
6354
c9c8e606 6355 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6356 for file offsets, use grub_off_t instead. Fix printf format
6357 warnings.
6358
ca62e598 6359 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6360 there. Real unexpected warnings should not drown in the noise
6361 about known problems.
6362
ce8d1766 6363 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6364 grub_disk_addr_t for memory addresses.
6365
00c7a56a 6366 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6367 explicitly to fix a warning.
6368
08d3ef09 6369 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6370
cb71ba20 6371 * Makefile.in (MODULE_LDFLAGS): New variable.
6372 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6373 the linker accepts --build-id=none.
6374 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6375 MODULE_LDFLAGS.
6376 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6377
d4c9b428 6378 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6379 those in Linux XFS code. Provide a way to access 64-bit parent
6380 inode.
6381 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6382 the end of struct grub_xfs_dir_header.
6383
d4156eee 63842008-07-02 Bean <bean123ch@gmail.com>
6385
6386 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6387 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6388 and GRUB_IEEE1275_FLAG_NO_ANSI.
6389
6390 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6391 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6392 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6393
6394 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6395 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6396
6397 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6398 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6399
6400 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6401 esc sequence on non ANSI terminal.
6402 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6403
6404 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6405 beginning of file.
6406
2270f77b 64072008-07-02 Bean <bean123ch@gmail.com>
6408
6409 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6410 (grub_editenv_SOURCES): New variable.
6411 (pkglib_MODULES): Add loadenv.mod.
6412 (loadenv_mod_SOURCES): New variable.
6413 (loadenv_mod_CFLAGS): Likewise.
6414 (loadenv_mod_LDFLAGS): Likewise.
6415
6416 * include/grub/envblk.h: New file.
6417
6418 * util/envblk.c: New file.
6419
6420 * util/grub-editenv.c: New file.
6421
6422 * commands/loadenv.c: New file.
6423
0e9e51ec 64242008-07-01 Pavel Roskin <proski@gnu.org>
6425
d89b7634 6426 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6427 not unsigned char. This fixes warnings and is consistent with
6428 other tags.
6429
bf1835b1 6430 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6431
8222a04b 6432 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6433
6a42d99d 6434 * term/tparm.c (analyze): Always set *popcount.
6435
10b159d1 6436 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6437 cast to fix a warning.
6438
b8789f6c 6439 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6440 cast to suppress a warning.
6441
29d7e38a 6442 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6443 grub_fshelp_read_file() expects.
6444
f341f669 6445 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6446 write uuid as a 32-bit value in CPU byte order, so declare and
6447 use it as such.
6448
0e9e51ec 6449 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6450 long if the format specifier expects it.
6451 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6452 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6453 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6454 long to fix a warning.
6455 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6456 grub_dprintf() arguments to fix warnings.
6457
3aefa857 64582008-06-30 Pavel Roskin <proski@gnu.org>
6459
56c7668b 6460 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6461 install_bsd_part immediately before core.img is embedded or
6462 modified on disk. This fixes core.img verification if core.img
6463 cannot be embedded.
6464
3aefa857 6465 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6466 core_path to calculate the blocklist.
6467 Patch from Javier Martín <lordhabbit@gmail.com>
6468
5444088d 64692008-06-29 Robert Millan <rmh@aybabtu.com>
6470
6471 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6472 block to disk block.
6473 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6474 Patch from Niels Böhm <bitbucket@arcor.de>
6475
674835c8 64762008-06-29 Robert Millan <rmh@aybabtu.com>
6477
6478 * util/update-grub_lib.in (font_path): Search for fonts in
6479 /boot/grub first, which is more likely to be readable (we aren't
6480 deciding where fonts live, just looking for them).
6481
f527dbc8 64822008-06-26 Pavel Roskin <proski@gnu.org>
6483
6c2d8df6 6484 * util/biosdisk.c (read_device_map): Don't leave dead map
6485 entries for devices failing stat() check.
6486
f527dbc8 6487 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6488 core_path_dev for the core.img path on the target device.
6489
aebe3d13 64902008-06-26 Robert Millan <rmh@aybabtu.com>
6491
6492 * disk/fs_uuid.c: New file.
6493 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6494 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6495 (fs_uuid_mod_LDFLAGS): New variables.
6496 * include/grub/disk.h (grub_disk_dev_id): Add
6497 `GRUB_DISK_DEVICE_UUID_ID'.
6498 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6499 implement iterate().
6500
37aaf354 65012008-06-26 Robert Millan <rmh@aybabtu.com>
6502
6503 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6504 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6505 Linux image includes no initrd.
6506
25ff262a 65072008-06-21 Javier Martín <lordhabbit@gmail.com>
6508
6509 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6510 call to resolve the core image location that effectively appended the
6511 name twice.
6512
76a2bd44 65132008-06-21 Robert Millan <rmh@aybabtu.com>
6514
6515 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6516 call from here ...
6517
6518 * util/grub.d/10_hurd.in: ... to here ...
6519 * util/grub.d/10_linux.in: ... and here.
6520
650e1c79 65212008-06-19 Robert Millan <rmh@aybabtu.com>
6522
fe987087 6523 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 6524 after it has been set by grub_machine_set_prefix().
6525
6ce63911 65262008-06-19 Robert Millan <rmh@aybabtu.com>
6527
6528 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6529 search result when not saving to variable, not the other way around.
6530 When saving to variable, abort iteration as soon as a match is found.
6531
73940cec 65322008-06-19 Robert Millan <rmh@aybabtu.com>
6533
6534 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6535 check for partition that provides /boot/grub. Its logic is flawed,
6536 as it prevents prepare_grub_to_access_device() from being called
6537 multiple times.
6538
3c62a39d 65392008-06-19 Robert Millan <rmh@aybabtu.com>
6540
6541 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6542 "insmod" command directly when abstraction modules are needed,
fe987087 6543 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 6544 since it had already been processed).
6545
47395a42 65462008-06-19 Pavel Roskin <proski@gnu.org>
6547
6548 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6549 changed. This is needed in case GRUB_LIBDIR changes.
6550 * conf/i386-ieee1275.rmk: Likewise.
6551 * conf/i386-linuxbios.rmk: Likewise.
6552 * conf/i386-pc.rmk: Likewise.
6553 * conf/powerpc-ieee1275.rmk: Likewise.
6554
a145ac2d 65552008-06-18 Pavel Roskin <proski@gnu.org>
6556
6557 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6558 kernel_elf_symlist.c to symlist.c for consistency with other
6559 architectures. Update all users.
6560 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6561
7847c51e 65622008-06-18 Robert Millan <rmh@aybabtu.com>
6563
6564 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6565 it in prefix.
6566
6567 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6568 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6569 a RAID device, run setup() for all members independently on whether
6570 LVM abstraction is being used.
6571 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6572 If grub-mkimage has set `*install_dos_part == -2', don't override this
6573 value.
6574 Perform *install_dos_part adjustments independently on whether
6575 we're embedding or not.
6576 Clarify error message when image is too big for embedding.
6577 Remove duplicate *install_dos_part stanza.
6578
b23e5644 65792008-06-17 Robert Millan <rmh@aybabtu.com>
6580
6581 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6582 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6583 variables.
6584 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6585 values in grub_ofconsole_normal_color and
6586 grub_ofconsole_highlight_color (they're not directly related to
6587 background and foreground).
6588 (grub_ofconsole_setcolorstate): Extract background and foreground
6589 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6590
0aac2f79 65912008-06-17 Robert Millan <rmh@aybabtu.com>
6592
6593 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6594 /boot/grub for the check in last commit, not /boot (they could be
6595 different partitions).
6596
3cca7ef3 65972008-06-16 Robert Millan <rmh@aybabtu.com>
6598
6599 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6600 asked to setup access for the same partition that provides /boot,
6601 don't bother using UUIDs since our root already has the value we
6602 want.
6603
347396d8 66042008-06-16 Robert Millan <rmh@aybabtu.com>
6605
6606 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6607 I2O devices.
6608 Patch from Sven Mueller <sven@debian.org>.
6609
991477f8 66102008-06-16 Robert Millan <rmh@aybabtu.com>
6611
6612 * util/update-grub.in: Check for $EUID instead of $UID.
6613 Reported by Vincent Zweije.
6614
d31a32a1 66152008-06-16 Bean <bean123ch@gmail.com>
6616
fe987087 6617 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 6618 (grub_ext2_read_block): Likewise.
6619 (grub_ext2_read_inode): Likewise.
6620 (grub_ext2_mount): Likewise.
6621 (grub_ext2_close): Likewise.
6622 (grub_ext3_get_journal): Removed.
6623
fe987087 6624 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 6625 (grub_reiserfs_read_symlink): Likewise.
6626 (grub_reiserfs_mount): Likewise.
6627 (grub_reiserfs_open): Likewise.
6628 (grub_reiserfs_read): Likewise.
6629 (grub_reiserfs_close): Likewise.
6630 (grub_reiserfs_get_journal): Removed.
6631
6632 * fs/fshelp.c (grub_fshelp_read): Removed.
6633 (grub_fshelp_map_block): Likewise.
6634
6635 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6636 (grub_fshelp_journal): Likewise.
6637 (grub_fshelp_read): Likewise.
6638 (grub_fshelp_map_block): Likewise.
6639
3540a760 66402008-06-16 Pavel Roskin <proski@gnu.org>
6641
6642 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6643 floating point anymore.
6644 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6645
95614c84 66462008-06-15 Pavel Roskin <proski@gnu.org>
6647
6648 * commands/ls.c (grub_ls_list_files): Use integer calculations
6649 for human readable format, avoid floating point use.
6650 * kern/misc.c (grub_ftoa): Remove.
6651 (grub_vsprintf): Remove floating point support.
6652
50465dd6 66532008-06-15 Robert Millan <rmh@aybabtu.com>
6654
fe6b695a 6655 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 6656 devices.
6657 Reported by Max Vozeler.
6658
a9207284 66592008-06-15 Robert Millan <rmh@aybabtu.com>
6660
6661 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6662 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6663 skipped later.
6664 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6665 the beginning of the prefix.
6666
6667 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6668 It is assumed that if we have a memdisk, grub-mkimage has set
6669 grub_prefix to include the "(memdisk)" drive in it.
6670
a7cbd45a 66712008-06-15 Robert Millan <rmh@aybabtu.com>
6672
6673 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6674 Initialize keyboard controller after registering the terminal, so that
6675 grub_printf() can be called from grub_keyboard_controller_init().
6676
21cf716a 66772008-06-15 Robert Millan <rmh@aybabtu.com>
6678
6679 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6680 extent-btree which is written as big endian on disk.
6681 Reported by Alain Greppin <al@chilibi.org>.
6682
23a64d8e 66832008-06-14 Robert Millan <rmh@aybabtu.com>
6684
6685 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6686 * util/i386/pc/grub-install.in (modules): Likewise.
6687
d687651c 66882008-06-13 Pavel Roskin <proski@gnu.org>
6689
6690 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6691
dfe9ddd4 66922008-06-13 Bean <bean123ch@gmail.com>
6693
6694 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6695
6696 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6697
6698 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6699 to indicate sparse block.
6700
16ae7781 67012008-06-12 Pavel Roskin <proski@gnu.org>
6702
e6d1a308 6703 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6704 number, grub_fshelp_read() does it for us.
6705
16ae7781 6706 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6707 linear disk read with journal translation.
6708 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6709 * include/grub/fshelp.h: Declare grub_fshelp_read().
6710
40fd3a2b 67112008-06-09 Pavel Roskin <proski@gnu.org>
6712
6713 * fs/minix.c (grub_minix_mount): Handle error reading
6714 superblock.
6715
f5679726 67162008-06-08 Robert Millan <rmh@aybabtu.com>
6717
6718 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6719 don't append the RAID prefix afterwards.
6720 Reported by Clint Adams.
6721
ce525529 67222008-06-08 Robert Millan <rmh@aybabtu.com>
6723
6724 Based on description from Pavel:
6725 * kern/disk.c (grub_disk_check_range): Rename to ...
6726 (grub_disk_adjust_range): ... this. Add a comment explaining the
6727 tasks performed by this function.
6728
ad4936a0 67292008-06-08 Robert Millan <rmh@aybabtu.com>
6730
6731 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6732 `num_serial' (for consistency with other variables).
6733 (struct grub_ntfs_data): Add `uuid' member.
6734 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6735 (grub_ntfs_uuid): New function.
6736 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6737
dc20b0f9 67382008-06-07 Pavel Roskin <proski@gnu.org>
6739
6740 * util/biosdisk.c (open_device): Revert last change to the
6741 function, it broke installation. The sector needs to be
6742 different dependent on which device is opened.
6743
c5e3cfba 67442008-06-06 Robert Millan <rmh@aybabtu.com>
6745
6746 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6747 rest of GRUB, and breakage doesn't happen if its value were modified.
6748
6749 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6750 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6751 a constant (same value).
6752 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6753 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6754
26a1f8c4 67552008-06-06 Robert Millan <rmh@aybabtu.com>
6756
6757 * util/biosdisk.c (open_device): Do not modify sector offset when
6758 accessing a partition. kern/disk.c already handles this for us.
6759
25d6b327 67602008-06-06 Robert Millan <rmh@aybabtu.com>
6761
6762 * util/grub-emu.c (grub_machine_init): Move code in this function from
6763 here ...
6764 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6765 segfault in case grub_printf() is called).
6766
6767 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6768 grub_probe. Update all users not to explicitly add it again.
6769 (grub_device): New variable; contains corresponding device for grubdir.
6770 (fs_module, partmap_module, devabstraction_module): Pass
6771 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6772 every time.
6773
9ece62fb 67742008-06-05 Robert Millan <rmh@aybabtu.com>
6775
6776 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6777 is found, print it (same layout as with labels).
6778
1ad36d37 67792008-06-04 Robert Millan <rmh@aybabtu.com>
6780
6781 * util/biosdisk.c (get_drive): Rename to ...
6782 (find_grub_drive): ... this. Update all users.
6783
6784 (get_os_disk): Rename to ...
6785 (convert_system_partition_to_system_disk): ... this. Update all users.
6786
6787 (find_drive): Rename to ...
6788 (find_system_device): ... this. Update all users.
6789
e6a30859 67902008-06-04 Robert Millan <rmh@aybabtu.com>
6791
6792 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6793 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6794 (make_device_map): Likewise.
6795
00c108a4 67962008-06-01 Robert Millan <rmh@aybabtu.com>
6797
6798 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6799 before dereferencing it.
6800
6801 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6802 union with fat12/fat16-specific ones. Add some new fields, including
6803 `num_serial' for both versions.
6804 (struct grub_fat_data): Add `uuid' member.
6805 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6806 names. Initialize `data->uuid' using `num_serial'.
6807 (grub_fat_uuid): New function.
6808 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6809
6810 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6811 (grub_reiserfs_uuid): New function.
6812 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6813 member.
6814
6815 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6816 (grub_xfs_uuid): New function.
6817 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6818
1385c5bb 68192008-06-01 Robert Millan <rmh@aybabtu.com>
6820
6821 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6822 code that is backward compatible with pre-uuid search command.
6823
c682dfd7 68242008-05-31 Robert Millan <rmh@aybabtu.com>
6825
6826 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6827 floppies after everything else, to ensure floppy drive isn't accessed
6828 unnecessarily (patch from Bean).
6829
b7db5d47 68302008-05-31 Robert Millan <rmh@aybabtu.com>
6831
6832 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6833 not print device names when we were asked to set a variable.
6834
6e037aa9 68352008-05-31 Robert Millan <rmh@aybabtu.com>
6836
6837 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6838 using "cursor-on" and "cursor-off" commands (understood at least by
6839 the Open Firmware flavour on OLPC).
6840
41305bc8 68412008-05-31 Michael Gorven <michael@gorven.za.net>
6842
6843 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6844 on and off sequences.
6845
69ba137e 68462008-05-31 Robert Millan <rmh@aybabtu.com>
6847
6848 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6849 * util/update-grub.in: Likewise.
6850
520ae21b 68512008-05-30 Pavel Roskin <proski@gnu.org>
6852
6853 * util/biosdisk.c (linux_find_partition): Simplify logic and
6854 make the code more universal. Keep special processing for
6855 devfs, but use a simple rule for all other devices. If the
6856 device ends with a number, append 'p' and the partition number.
6857 Otherwise, append only the partition number.
6858
5786569b 68592008-05-30 Robert Millan <rmh@aybabtu.com>
6860
6861 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6862 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6863 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6864 the `root' parameter to Linux.
6865
51500452 68662008-05-30 Robert Millan <rmh@aybabtu.com>
6867
6868 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6869 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6870 --fs_uuid with --fs-uuid.
6871 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6872 all filesystems support them).
6873
811d3878 68742008-05-30 Robert Millan <rmh@aybabtu.com>
6875
6876 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6877 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6878
cab63c95 68792008-05-30 Robert Millan <rmh@aybabtu.com>
6880
6881 * util/grub.d/00_header.in: Remove obsolete comment referencing
6882 convert_system_path_to_grub_path().
6883 * util/update-grub.in: Likewise.
6884 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6885 (convert_system_path_to_grub_path): Add a warning message explaining
6886 that this function is deprecated. Rely on is_path_readable_by_grub()
6887 for the readability checks.
6888 (font_path): Use is_path_readable_by_grub() for the readability
6889 check rather than convert_system_path_to_grub_path().
6890
972e2f7a 68912008-05-30 Robert Millan <rmh@aybabtu.com>
6892
6893 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6894 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6895 converting it first.
6896 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6897 grub.cfg for access to font file, and afterwards call it again to set
6898 the root device.
6899
62191274 69002008-05-30 Robert Millan <rmh@aybabtu.com>
6901
6902 * commands/search.c (options): Add --fs_uuid option.
6903 (search_fs_uuid): New function.
6904 (grub_cmd_search): Fix --set argument passing.
6905 Use search_fs_uuid() when requested via --fs_uuid.
6906 (grub_search_init): Update help message.
6907 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6908 and redeclare it as an array of 16-bit words.
6909 (grub_ext2_uuid): New function.
6910 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6911 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6912 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6913 (GRUB_DEVICE_BOOT_UUID): New variables.
6914 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6915 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6916 whenever possible.
6917 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6918 just assume `root' variable has the right value.
6919 * util/grub.d/10_linux.in: Likewise.
6920 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6921 via PRINT_FS_UUID.
6922 (main): Recognise `-t fs_uuid' argument.
6923
01b73ec8 69242008-05-30 Robert Millan <rmh@aybabtu.com>
6925
6926 * util/biosdisk.c (map): Redefine structure to hold information
6927 about GRUB drive name.
fe6b695a 6928 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6929 drive names.
6930 (call_hook): Remove.
6931 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6932 member. Assume drive has partitions.
6933 (grub_util_biosdisk_open): Access device names via `.device' struct
6934 member.
6935 (open_device): Likewise.
6936 (find_drive): Likewise.
6937 (read_device_map): Adjust map[] usage to match the new struct
6938 definition. Don't check for duplicates (still possible, but not cheap
6939 anymore).
6940 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6941 (make_device_name): Remove assumption of BIOS-like drive names.
6942
22f16596 69432008-05-30 Pavel Roskin <proski@gnu.org>
6944
6945 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6946 compiling execute.c doesn't need grub_script.tab.h anymore.
6947 (normal/command.c_DEPENDENCIES): Likewise.
6948 (normal/function.c_DEPENDENCIES): Likewise.
6949 * conf/i386-ieee1275.rmk: Likewise.
6950 * conf/i386-linuxbios.rmk: Likewise.
6951 * conf/i386-pc.rmk: Likewise.
6952 * conf/powerpc-ieee1275.rmk: Likewise.
6953 * conf/sparc64-ieee1275.rmk: Likewise.
6954
528ad8f2 69552008-05-29 Pavel Roskin <proski@gnu.org>
6956
d1dff95d 6957 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6958 when scanning metadata for volume group name.
6959
528ad8f2 6960 * include/grub/script.h: Don't include grub_script.tab.h. It's
6961 a generated file, which may only be included from the files with
6962 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6963 use union YYSTYPE, as the later allows forward declaration.
6964 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6965
47248e08 69662008-05-29 Robert Millan <rmh@aybabtu.com>
6967
6968 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6969 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6970 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6971 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6972 scan codes.
6973
ee632529 69742008-05-29 Robert Millan <rmh@aybabtu.com>
6975
6976 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6977 control key combinations.
6978
eee96e08 69792008-05-29 Robert Millan <rmh@aybabtu.com>
6980
6981 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6982 * util/ieee1275/grub-install.in: ... to here.
6983 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6984 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6985 (grub_install_SOURCES): Likewise.
6986
da9a6a94 69872008-05-29 Robert Millan <rmh@aybabtu.com>
6988
6989 * fs/affs.c: Update copyright year.
6990 * fs/ext2.c: Likewise.
6991 * fs/fshelp.c: Likewise.
6992 * fs/hfsplus.c: Likewise.
6993 * fs/ntfs.c: Likewise.
6994 * fs/xfs.c: Likewise.
6995 * include/grub/fshelp.h: Likewise.
6996 * util/grub-mkdevicemap.c: Likewise.
6997
12e65f3a 69982008-05-28 Robert Millan <rmh@aybabtu.com>
6999
7000 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7001 might need to be fatfs to support some firmware implementations
7002 (e.g. OFW or EFI).
7003
23023641 70042008-05-28 Robert Millan <rmh@aybabtu.com>
7005
7006 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7007 devices.
7008 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7009 (make_device_map): Likewise.
7010
887d2619 70112008-05-20 Bean <bean123ch@gmail.com>
7012
7013 * fs/fshelp.c (grub_fshelp_map_block): New function.
7014 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7015 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7016
7017 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7018 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7019 (grub_fshelp_journal): New structure.
7020 (grub_fshelp_map_block): New function prototype.
7021 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7022 (grub_fshelp_map_block): Likewise.
7023
7024 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7025 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7026 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7027 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7028 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7029 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7030 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7031 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7032 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7033 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7034 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7035 (grub_ext2_sblock): New members for journal support.
7036 (grub_ext3_journal_header): New structure.
7037 (grub_ext3_journal_revoke_header): Likewise.
7038 (grub_ext3_journal_block_tag): Likewise.
7039 (grub_ext3_journal_sblock): Likewise.
7040 (grub_fshelp_node): New members logfile and journal.
7041 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7042 grub_fshelp_map_block to get real block number.
7043 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7044 number.
7045 (grub_ext2_read_inode): Likewise.
7046 (grub_ext3_get_journal): New function.
7047 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7048 (grub_ext2_close): Release memory used by journal.
7049
7050 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7051 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7052 (grub_reiserfs_transaction_header): Renamed to
7053 grub_reiserfs_description_block, replace field data with real_blocks.
7054 (grub_reiserfs_commit_block): New structure.
7055 (grub_reiserfs_data): New member journal.
7056 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7057 number.
7058 (grub_reiserfs_read_symlink): Likewise.
7059 (grub_reiserfs_iterate_dir): Likewise.
7060 (grub_reiserfs_open): Likewise.
7061 (grub_reiserfs_read): Likewise.
7062 (grub_reiserfs_get_journal): New function.
7063 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7064 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7065 using grub_reiserfs_get_journal.
7066 (grub_reiserfs_close): Release memory used by journal.
7067
7068 * fs/affs.c (grub_affs_read_block): Change block type to
7069 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7070
7071 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7072
7073 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7074
7075 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7076
7077 * fs/udf.c (grub_udf_read_block): Change block type to
7078 grub_disk_addr_t. Use type cast to avoid warning.
7079
7080 * fs/xfs.c (grub_xfs_read_block): Likewise.
7081
b7c6bed5 70822008-05-16 Christian Franke <franke@computer.org>
7083
7084 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7085 to ensure that break with ESC will always work.
7086 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7087 Remove ESC from keyboard queue.
7088
eedf167f 70892008-05-16 Christian Franke <franke@computer.org>
7090
7091 * util/biosdisk.c: [__CYGWIN__] Add includes.
7092 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7093 (get_os_disk): Move variable declarations to OS specific
7094 parts to avoid warning.
7095 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7096 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7097 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7098 Cygwin.
7099 * util/getroot.c: [__CYGWIN__] Add includes.
7100 (strip_extra_slashes): Fix "/" case.
7101 [__CYGWIN__] (get_win32_path): New function.
7102 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7103 [__CYGWIN__] (find_root_device): Disable.
7104 [__CYGWIN__] (get_bootsec_serial): New function.
7105 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7106 [__linux__] (grub_guess_root_device): Add early returns to simplify
7107 structure.
7108 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7109 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7110 check for Linux only.
7111
a079699e 71122008-05-15 Bean <bean123ch@gmail.com>
7113
7114 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7115 keyboard hang problem in apple's intel mac.
7116
1cf4059a 71172008-05-09 Robert Millan <rmh@aybabtu.com>
7118
7119 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7120 devices.
7121 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7122 (make_device_map): Likewise.
7123 Reported by Aurelien Jarno <aurel32@debian.org>
7124
ed759390 71252008-05-07 Ian Campbell <ijc@hellion.org.uk>
7126
7127 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7128 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7129 (make_device_map): Output entries for xvd type disks.
7130
b56c4eaa 71312008-05-07 Robert Millan <rmh@aybabtu.com>
7132
7133 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7134 devices.
7135 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7136 (make_device_map): Likewise.
7137 Reported by Roland Dreier <rdreier@cisco.com>
7138
7f8866ed 71392008-05-07 Robert Millan <rmh@aybabtu.com>
7140
7141 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7142 grub_strstr() call. Correct a few mistakes in failure path handling.
7143
b0346e0f 71442008-05-06 Robert Millan <rmh@aybabtu.com>
7145
7146 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7147 Do not print a trailing slash (therefore, the root directory is an
7148 empty string).
7149 (convert_system_path_to_grub_path): Do not remove trailing slash
7150 from make_system_path_relative_to_its_root() output.
7151
7152 * util/i386/pc/grub-install.in: Add trailing slash to output from
7153 make_system_path_relative_to_its_root().
7154
6cf12cbd 71552008-05-06 Robert Millan <rmh@aybabtu.com>
7156
7157 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7158 ensures that output lines aren't intermangled with those sent to
7159 stderr (via grub_util_info()).
7160 * util/grub-probe.c (grub_refresh): Likewise.
7161 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7162
0fbb3117 71632008-05-05 Christian Franke <franke@computer.org>
7164
7165 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7166 Add Cygwin device names.
7167 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7168 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7169 (check_device): Return error instead of success on empty name.
7170 (make_device_map): Move label inside linux specific code to
7171 prevent compiler warning.
7172
8124cdb7 71732008-04-30 Robert Millan <rmh@aybabtu.com>
7174
7175 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7176 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7177 first boot option.
7178 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7179
094c01d0 71802008-04-29 Robert Millan <rmh@aybabtu.com>
7181
7182 * docs/grub.cfg: New file (example GRUB configuration).
7183
f4b1fc02 71842008-04-26 Robert Millan <rmh@aybabtu.com>
7185
329ce2a5 7186 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7187 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7188 and `disk/ieee1275/nand.c'.
f4b1fc02 7189
25f16ec1 71902008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 7191
25f16ec1 7192 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7193 i386-linuxbios.
7194
7195 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7196 change the buffer size to 4096 for cdrom device.
7197
7198 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7199 and nand.mod.
7200 (_linux_mod_SOURCES): New variable.
7201 (_linux_mod_CFLAGS): Likewise.
7202 (_linux_mod_LDFLAGS): Likewise.
7203 (linux_mod_SOURCES): Likewise.
7204 (linux_mod_CFLAGS): Likewise.
7205 (linux_mod_LDFLAGS): Likewise.
7206 (nand_mod_SOURCES): Likewise.
7207 (nand_mod_CFLAGS): Likewise.
7208 (nand_mod_LDFLAGS): Likewise.
7209
7210 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7211 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7212 type property. (nand device in olpc don't have this property)
7213
7214 * include/grub/disk.h (grub_disk_dev_id): New macro
7215 GRUB_DISK_DEVICE_NAND_ID.
7216
7217 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7218 function prototype.
7219 (grub_rescue_cmd_initrd): Likewise.
7220
7221 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7222 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7223 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7224
25f16ec1 7225 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7226 GRUB_MACHINE_IEEE1275 is defined.
7227
7228 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7229 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7230
7231 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7232 on nested function heap_init.
7233 (grub_upper_mem): New variable for i386-ieee1275.
7234 (grub_get_extended_memory): New function for i386-ieee1275.
7235 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7236
7237 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7238 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7239 property.
f19dbdb7 7240
25f16ec1 7241 * loader/i386/ieee1275/linux.c: New file.
7242
7243 * loader/i386/ieee1275/linux_normal.c: New file.
7244
7245 * disk/ieee1275/nand.c: New file.
7246
e89d61e9 72472008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7248
7249 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7250 value.
7251 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7252
602566f6 72532008-04-18 Robert Millan <rmh@aybabtu.com>
7254
7255 Restructures early code path on ieee1275 to unify grub_main() as
7256 the first C function that is executed in every platform.
7257
7258 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7259 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7260 cmain().
7261 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7262 * kern/ieee1275/cmain.c (cmain): Rename to ...
7263 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7264 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7265 at the beginning.
7266
57490c2b 72672008-04-18 Robert Millan <rmh@aybabtu.com>
7268
7269 * util/update-grub.in: Fix syntax error when setting
7270 `GRUB_PRELOAD_MODULES'.
7271 Reported by Stephane Chazelas <stephane@artesyncp.com>
7272
1977517d 72732008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7274
7275 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7276 section into account, newer toolchains generate unique build ids
7277 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7278 we want build ids to be preserved
1977517d 7279 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7280 far from other sections don't cause the raw binary images grow
7281 size
7282
bfb1f1a2 72832008-04-15 Robert Millan <rmh@aybabtu.com>
7284
7285 * disk/lvm.c: Update copyright year.
7286 * kern/misc.c: Likewise.
7287
01979850 72882008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7289
7290 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 7291 there is no memory left for physical volume name.
01979850 7292
0a1150e2 72932008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7294
7295 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7296 volume name mapping to support bigger than 9 character names properly.
7297
82ead3fe 72982008-04-13 Robert Millan <rmh@aybabtu.com>
7299
7300 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7301 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7302
e54a72f5 73032008-04-13 Christian Franke <franke@computer.org>
7304
7305 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7306 to create a floppy emulation boot CD when non emulation mode
7307 does not work.
7308 Enable Joliet CD filesystem extension.
7309
9fe86034 73102008-04-13 Robert Millan <rmh@aybabtu.com>
7311
7312 * kern/misc.c (grub_strncat): Fix off-by-one error.
7313 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7314
7315 * kern/env.c (grub_env_context_close): Clear current context, not
7316 previous one.
7317 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7318
7319 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7320
7ceeee39 73212008-04-13 Robert Millan <rmh@aybabtu.com>
7322
7323 Improve robustness when handling LVM.
7324
7325 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 7326 (and leave `*p' unmodified).
7ceeee39 7327 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7328 through it.
7329 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7330 iterating through it.
7331 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7332 through it.
fe6b695a 7333 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 7334 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7335 Don't assume `vg->pvs != NULL' when iterating through it.
7336
58cd3d85 73372008-04-13 Robert Millan <rmh@aybabtu.com>
7338
7339 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7340 * genmk.rb (partmap): New variable.
7341 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7342 (#{partmap}): New target rule.
7343 * genpartmaplist.sh: New file.
7344 * Makefile.in (pkglib_DATA): Add partmap.lst.
7345 (partmap.lst): New target rule.
7346 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7347 modules (including all partition maps), instead of preloading them.
7348
78b51059 73492007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7350
7351 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7352 `linux-boot-prober' (if installed) to detect other operating
7353 systems which are installed on the computer and add them to
7354 the boot menu.
7355 * conf/common.rmk: Build and install 30_os-prober.
7356
a91627b4 73572008-04-12 Robert Millan <rmh@aybabtu.com>
7358
7359 * kern/powerpc/ieee1275/init.c: Move from here ...
7360 * kern/ieee1275/init.c: ... to here. Update all users.
7361
7362 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7363 * kern/ieee1275/cmain.c: ... to here. Update all users.
7364
7365 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7366 * kern/ieee1275/openfw.c: ... to here. Update all users.
7367
7368 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7369 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7370
322562ea 73712008-04-10 Pavel Roskin <proski@gnu.org>
7372
7373 * configure.ac: Always use "_cv_" in cache variables for
7374 compatibility with Autoconf 2.62.
7375
a02a73c5 73762008-04-07 Robert Millan <rmh@aybabtu.com>
7377
7378 Revert grub/machine/init.h addition by Pavel (since it breaks on
7379 i386-ieee1275 and others):
7380 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7381 * util/powerpc/ieee1275/misc.c: Likewise.
7382
25c024b1 73832008-04-07 Robert Millan <rmh@aybabtu.com>
7384
7385 * util/grub-probe.c (probe): Improve error message.
7386
3cbd2f98 73872008-04-07 Robert Millan <rmh@aybabtu.com>
7388
7389 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7390 (this prevents the presence of a bogus entry from ruining the whole
7391 thing).
7392
87a297bf 73932008-04-06 Pavel Roskin <proski@gnu.org>
7394
36747a62 7395 * util/biosdisk.c: Include grub/util/biosdisk.h.
7396 * util/grub-fstest.c (execute_command): Make static.
7397 * util/grub-mkdevicemap.c (check_device): Likewise.
7398 * util/i386/pc/misc.c: Include grub/machine/init.h.
7399 * util/powerpc/ieee1275/misc.c: Likewise.
7400 * util/lvm.c: Include grub/util/lvm.h.
7401 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7402 grub/cache.h.
7403 * util/raid.c: Include grub/util/raid.h.
7404 (grub_util_getdiskname): Make static.
7405
87a297bf 7406 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7407 grub_hostfs_fini(), as they are called from grub_init_all() and
7408 grub_fini_all() respectively. This fixes an infinite loop in
7409 grub-fstest due to double registration of hostfs.
7410 Reported by Christian Franke <Christian.Franke@t-online.de>
7411
f6ce7629 74122008-04-05 Pavel Roskin <proski@gnu.org>
7413
7414 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7415 all 8 functions. Otherwise, probe function 0 only.
7416
070e49e4 74172008-04-04 Pavel Roskin <proski@gnu.org>
7418
8b088a4c 7419 * commands/lspci.c (grub_lspci_iter): Print the bus number
7420 correctly.
7421
4f657021 7422 * commands/lspci.c (grub_pci_classes): Fix typos.
7423 (grub_lspci_iter): Don't print func twice. Print vendor ID
7424 before device ID, as it's normally done.
7425
070e49e4 7426 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7427 Fix signedness warnings.
7428 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7429 Likewise.
7430 * util/ieee1275/get_disk_name.c: Include config.h so that
7431 _GNU_SOURCE is defined and getline() is declared. Mark an
7432 unused argument as such. Fix a signedness warning.
7433
ba7328dc 74342008-04-02 Pavel Roskin <proski@gnu.org>
7435
26887f22 7436 * genkernsyms.sh.in: Use more robust assignments for CC and
7437 srcdir. Quote srcdir.
7438 * gensymlist.sh.in: Likewise. Assert at the compile time that
7439 the symbol table is not empty.
7440
ba7328dc 7441 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7442 * fs/cpio.c (grub_cpio_read): Likewise.
7443
0f582c6b 74442008-04-01 Pavel Roskin <proski@gnu.org>
7445
4b6e1995 7446 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7447 * disk/host.c (grub_host_open): Likewise.
7448 * disk/loopback.c (grub_loopback_open): Likewise.
7449 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7450 disk->id as in disk/host.c, not a multi-character constant.
7451
828a2768 7452 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7453 later is obsolete, potentially dangerous and sets a bad example.
7454 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7455 * util/misc.c (grub_util_get_image_size): Likewise.
7456
2bb4fb47 7457 * disk/loopback.c (options): Improve help for "--partitions".
7458
0f582c6b 7459 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7460 options to align them with the short options, e.g. "echo -e".
7461
a33224e0 74622008-03-31 Bean <bean123ch@gmail.com>
7463
7464 * video/reader/png.c (grub_png_data): New member is_16bit and
7465 image_data.
7466 (grub_png_decode_image_header): Detect 16 bit png image.
7467 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7468 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7469 (grub_video_reader_png): Release memory occupied by image_data.
7470
7471 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7472 4096 bytes.
7473 (grub_nfs_mount): Skip the test for sector per cluster.
7474
7475 * include/grub/ntfs.h (MAX_SPC): Removed.
7476
86cb4f54 74772008-03-31 Bean <bean123ch@gmail.com>
7478
7479 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7480 (grub_probe_SOURCES): Add fs/afs.c.
7481 (grub_fstest_SOURCES): Likewise.
7482 (afs_mod_SOURCES): New variable.
7483 (afs_mod_CFLAGS): Likewise.
7484 (afs_mod_LDFLAGS): Likewise.
7485
7486 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7487 (grub_emu_SOURCES): Likewise.
7488
7489 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7490
7491 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7492
7493 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7494
7495 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7496
7497 * fs/afs.c: New file.
7498
17c74c21 74992008-03-30 Pavel Roskin <proski@gnu.org>
7500
4cb68e89 7501 * disk/host.c: Include grub/misc.h to fix a warning.
7502 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7503 warnings about implicit declarations.
7504
8790bb04 7505 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7506 variable.
7507 * include/grub/i386/loader.h: Change declaration of
7508 grub_linux_boot() to match what grub_loader_set() expects.
7509 * util/getroot.c (grub_guess_root_device): Return const char* to
7510 fix a warning.
7511 * util/grub-probe.c (probe): Fix a warning about uninitialized
7512 abstraction_name variable.
7513 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7514 second argument as unused to fix a warning.
7515
9a3f3296 7516 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7517 missing grub_error() call.
7518
0ecef90d 7519 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7520 2.60 and newer uses it to define datadir.
7521
0bf6d401 7522 * commands/sleep.c: Fix warning about implicit declaration.
7523 * disk/memdisk.c: Likewise.
7524 * loader/aout.c: Likewise.
7525 * loader/i386/bsd_normal.c: Likewise.
7526 * util/grub-probe.c: Likewise.
7527
7cdacf97 7528 * commands/i386/cpuid.c (has_longmode): Make static.
7529 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7530 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7531
17c74c21 7532 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7533 GDT. This is more robust, as %ds can change.
7534 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7535 calling real_to_prot().
7536 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7537
80a3e68b 75382008-03-28 Pavel Roskin <proski@gnu.org>
7539
7540 * kern/i386/pc/startup.S: Assert that uncompressed functions
7541 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7542 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7543 code, as they push parts of the code (error handlers) beyond
7544 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7545 code as correctness and size.
7546
77bcd272 75472008-03-28 Pavel Roskin <proski@gnu.org>
7548
7549 * kern/i386/pc/startup.S
7550 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7551 data block address to the real mode, keep offset minimal. This
7552 works around a bug in AWARD BIOS on old Athlon systems, which
7553 makes CD detection hang.
7554
c5dfd43b 75552008-03-26 Pavel Roskin <proski@gnu.org>
7556
7557 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7558 const.
7559 * include/grub/normal.h: Add grub_parse_color_name_pair()
7560 declaration.
7561
bf962df2 75622008-03-24 Bean <bean123ch@gmail.com>
7563
7564 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7565 (cd_count): Removed.
7566 (cd_drive): New variable.
7567 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7568 (grub_biosdisk_call_hook): Likewise.
7569 (grub_biosdisk_iterate): Change cdrom detection method.
7570 (grub_biosdisk_open): Replace cd_start with cd_drive.
7571 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7572 detect cdrom device.
7573
7574 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7575 Removed.
7576 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7577 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7578 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7579 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7580 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7581 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7582 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7583 (grub_biosdisk_cdrp): New structure.
7584 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7585
7586 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7587
7588 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7589 device.
7590
7591 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7592 New function.
7593
68e7fc7a 75942008-03-20 Robert Millan <rmh@aybabtu.com>
7595
7596 Remove 2 TiB limit in ata.mod.
7597 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7598 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7599 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7600 grub_uint64_t instead of grub_uint32_t.
7601
38ad2cf5 76022008-03-05 Bean <bean123ch@gmail.com>
7603
7604 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7605 (grub_multiboot): Set boot device.
7606
7607 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7608
2b89344e 76092008-03-02 Bean <bean123ch@gmail.com>
7610
7611 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7612 symlink_buffer.
7613
87a95d1f 76142008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7615
7616 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7617 texinfo.tex.
7618
7619 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7620 modified.
7621
7622 * docs/fdl.texi: New file.
f19dbdb7 7623
87a95d1f 7624 * docs/mdate-sh: New file. Copied from gnulib.
7625 * docs/texinfo.tex: Likewise.
7626
7627 * config.guess: Updated from gnulib.
7628 * install-sh: Likewise.
7629
7dc15d8e 76302008-02-28 Robert Millan <rmh@aybabtu.com>
7631
7632 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7633 (aout_mod_SOURCES): New variable.
7634 (aout_mod_CFLAGS): Likewise.
7635 (aout_mod_LDFLAGS): Likewise.
7636
7637 * conf/i386-ieee1275.rmk: Likewise.
7638
b00ab696 76392008-02-28 Robert Millan <rmh@aybabtu.com>
7640
7641 * util/update-grub.in: Reorganise terminal validity check. Accept
7642 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7643 Based on suggestion by Franklin PIAT.
7644
79ca2d78 76452008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7646
7647 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7648 function.
7649 * util/getroot.c (grub_util_check_block_device): New function that
7650 returns the given argument if it is a block device and returns NULL else.
7651 * util/grub-probe.c (argument_is_device): New variable.
7652 (probe): Promote device_name from a variable to an argument. Receive
7653 device_name from grub_util_check_block_device() if path is NULL and from
7654 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 7655 (options): Introduce new parameter '-d, --device'.
79ca2d78 7656 (main): Add description of the new parameter to the help screen.
7657 Rename path variable to argument. Set argument_is_device if the '-d'
7658 option is given. Pass argument to probe() depending on
7659 argument_is_device.
7660
0d16e571 76612008-02-24 Bean <bean123ch@gmail.com>
7662
7663 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7664 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7665 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7666 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7667 (GRUB_ISO9660_VOLDESC_END): Likewise.
7668 (grub_iso9660_primary_voldesc): New member escape.
7669 (grub_iso9660_data): New member joliet.
7670 (grub_iso9660_convert_string): New function.
7671 (grub_iso9660_mount): Detect joliet extension.
7672 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7673 (grub_iso9660_iso9660_label): Likewise.
7674
7675 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7676 (grub_setup_SOURCES): Add fs/udf.c.
7677 (grub_fstest_SOURCES): Likewise.
7678 (udf_mod_SOURCES): New variable.
7679 (udf_mod_CFLAGS): Likewise.
7680 (udf_mod_LDFLAGS): Likewise.
7681
7682 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7683 (grub_emu_SOURCES): Likewise.
7684
7685 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7686
7687 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7688
7689 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7690
7691 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7692
7693 * fs/udf.c: New file.
7694
8a594a17 76952008-02-24 Robert Millan <rmh@aybabtu.com>
7696
7697 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7698 (normal/lexer.c_DEPENDENCIES): New variables.
7699 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7700 (normal/lexer.c_DEPENDENCIES): Likewise.
7701 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7702 (normal/lexer.c_DEPENDENCIES): Likewise.
7703 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7704 (normal/lexer.c_DEPENDENCIES): Likewise.
7705 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7706 (normal/lexer.c_DEPENDENCIES): Likewise.
7707 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7708 (normal/lexer.c_DEPENDENCIES): Likewise.
7709
2dc33c03 77102008-02-23 Robert Millan <rmh@aybabtu.com>
7711
7712 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7713 since they were intended to be in hex. This didn't break previously
7714 because of a bug in gpt_partition_map_iterate() (see below).
7715
7716 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7717 when checking the validity of GPT header.
7718 Remove `partno', since it always provides the same information as `i'.
7719
f6f4cfb0 77202008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7721
7722 * include/grub/efi/time.h: Fix a wrong comment.
7723
79ff665f 77242008-02-19 Pavel Roskin <proski@gnu.org>
7725
7726 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7727 message.
7728
d38e24c2 77292008-02-19 Bean <bean123ch@gmail.com>
7730
7731 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7732 (aout_mod_SOURCES): New variable.
7733 (aout_mod_CFLAGS): Likewise.
7734 (aout_mod_LDFLAGS): Likewise.
7735 (_bsd_mod_SOURCES): New variable.
7736 (_bsd_mod_CFLAGS): Likewise.
7737 (_bsd_mod_LDFLAGS): Likewise.
7738 (bsd_mod_SOURCES): New variable.
7739 (bsd_mod_CFLAGS): Likewise.
7740 (bsd_mod_LDFLAGS): Likewise.
7741
7742 * include/grub/aout.h: New file.
7743
7744 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7745
7746 * include/grub/i386/bsd.h: New file.
7747
7748 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7749 to make it public.
7750
7751 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7752 function is called, so that it's possible to change it inside the hook.
7753 (grub_elf64_load): Likewise.
7754 (grub_elf_file): Don't close the file if elf header is not found.
7755 (grub_elf_close): Close the file if grub_elf_file fails (The new
7756 grub_elf_file won't close it).
7757 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7758 (grub_elf64_size): Likewise.
7759
7760 * kern/i386/loader.S (grub_unix_real_boot): New function.
7761
7762 * loader/aout.c: New file.
7763
7764 * loader/i386/bsd.c: New file.
7765
7766 * loader/i386/bsd_normal.c: New file.
7767
7768 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7769
7770 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 7771 can test other formats.
d38e24c2 7772
b93bdb0f 77732008-02-19 Robert Millan <rmh@aybabtu.com>
7774
7775 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7776 (grub_gpt_partition_type_empty): Redefine with macro from
7777 `<grub/gpt_partition.h>'.
7778 (gpt_partition_map_iterate): Adjust partition type comparison.
7779
7780 Export `entry' as partmap-specific `part.data' struct.
7781 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7782
7783 * include/grub/gpt_partition.h (grub_gpt_header)
7784 (grub_gpt_partentry): ... to here (new file).
7785
7786 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7787
7788 (grub_gpt_partition_type_bios_boot): New const variable, defined
7789 with macro from `<grub/gpt_partition.h>'.
7790
7791 (setup): Replace `first_start' with `embed_region', which keeps
7792 track of the embed region (and is partmap-agnostic).
7793
7794 Replace find_first_partition_start() with find_usable_region(),
7795 which finds a usable region for embedding using partmap-specific
7796 knowledge (supports PC/MSDOS and GPT).
7797
7798 Fix all assumptions that the embed region start at sector 1, using
7799 `embed_region.start' from now on. Similarly, use `embed_region.end'
7800 rather than `first_start' to calculate available size.
7801
7802 In grub_util_info() message, replace "into after the MBR" with an
7803 indication of the specific sector our embed region starts at.
7804
66cb40f6 78052008-02-19 Robert Millan <rmh@aybabtu.com>
7806
7807 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7808 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7809 `commands/reboot.c'.
7810 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7811 (halt_mod_SOURCES): Likewise.
7812 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7813 (halt_mod_SOURCES): Likewise.
7814
b7202015 78152008-02-17 Christian Franke <franke@computer.org>
7816
7817 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7818
32b0fc49 78192008-02-17 Robert Millan <rmh@aybabtu.com>
7820
7821 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7822 set `first_start' to 0 for non-PC/MSDOS partition maps.
7823
aca63502 78242008-02-16 Robert Millan <rmh@aybabtu.com>
7825
7826 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7827 do not assume partition map is PC/MSDOS before performing checks that
7828 are specific to that layout.
7829
0de8be86 78302008-02-13 Robert Millan <rmh@aybabtu.com>
7831
7832 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7833 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7834 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7835
c3db8364 78362008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7837
7838 * configure.ac: Only a cosmetic change on the handling of
7839 -fno-stack-protector.
7840
f714229e 78412008-02-12 Alexandre Boeglin <alex@boeglin.org>
7842
c3db8364 7843 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7844 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7845 reboot.c.
f714229e 7846 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7847 (halt_mod_SOURCES): New variable.
7848 (halt_mod_CFLAGS): Likewise.
7849 (halt_mod_LDFLAGS): Likewise.
7850 (reboot_mod_SOURCES): Likewise.
7851 (reboot_mod_CFLAGS): Likewise.
7852 (reboot_mod_LDFLAGS): Likewise.
7853
c3db8364 7854 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7855 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7856 reboot.c.
f714229e 7857 (halt_mod_SOURCES): Likewise.
7858 (reboot_mod_SOURCES): Likewise.
7859
c3db8364 7860 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7861 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 7862 (reboot_mod_SOURCES): Likewise.
7863
7864 * commands/i386/pc/reboot.c: merge this file ...
7865
7866 * commands/ieee1275/reboot.c: ... and this file ...
7867
7868 * commands/reboot.c: ... to this file.
c3db8364 7869 Add some precompiler directive to include the correct header for
7870 each machine.
f714229e 7871
7872 * commands/ieee1275/halt.c: move this file ...
7873
7874 * commands/halt.c: ... to here.
c3db8364 7875 Add some precompiler directive to include the correct header for
7876 each machine.
f714229e 7877
7878 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7879 (grub_halt): Likewise.
7880
7881 * kern/efi/efi.c (grub_reboot): New function.
7882 (grub_halt): Likewise.
7883
c74493e0 78842008-02-12 Robert Millan <rmh@aybabtu.com>
7885
7886 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7887 /dev (like it is done for /dev/mapper). This doesn't provide support
7888 for EVMS, but at least it is now easy to identify the problem when it
7889 arises.
7890
d0db4b04 78912008-02-11 Robert Millan <rmh@aybabtu.com>
7892
7893 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7894 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7895 comparing it with -1, not 0.
7896
bf748642 78972008-02-10 Robert Millan <rmh@aybabtu.com>
7898
7899 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7900 `disk/lvm.c'.
7901 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7902 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7903
7904 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7905 `disk/lvm.c' to the end of the list.
7906 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7907 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7908
b5db202a 79092008-02-10 Robert Millan <rmh@aybabtu.com>
7910
7911 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7912 grub_print_error() instead. This will let user know why we're entering
7913 rescue mode.
7914 Based on suggestions from Sam Morris.
7915
83abee31 79162008-02-10 Alexandre Boeglin <alex@boeglin.org>
7917
7918 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7919 on remaining N args, instead of "--" arg N times.
7920
78d5a08b 79212008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7922
7923 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7924 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7925 pattern for unknown glyphs.
7926
68807e5f 79272008-02-09 Robert Millan <rmh@aybabtu.com>
7928
7929 * configure.ac: Probe for `help2man'.
7930 * Makefile.in (builddir): New variable.
7931 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7932 or otherwise add a few flags/options to it.
7933 (install-local): For every executable utility or script that is
7934 installed, invoke $(HELP2MAN) to install a manpage based on --help
7935 output.
7936
7937 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7938 that it doesn't prevent --help from working in build tree.
7939
7940 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7941 with `bug-grub@gnu.org'.
7942 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7943 * util/update-grub.in (usage): New function.
7944 Implement proper argument check, with support for --help and --version
7945 (as well as existing -y).
7946
79472008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7948
7949 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7950 avoid overwriting previous output.
7951 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7952
c1962162 79532008-02-09 Robert Millan <rmh@aybabtu.com>
7954
7955 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7956 drawing the menu.
7957
3dac2e3f 79582008-02-09 Robert Millan <rmh@aybabtu.com>
7959
7960 * commands/sleep.c: New file.
7961 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7962 (sleep_mod_SOURCES): New variable.
7963 (sleep_mod_CFLAGS): Likewise.
7964 (sleep_mod_LDFLAGS): Likewise.
7965
7a634e08 79662008-02-09 Robert Millan <rmh@aybabtu.com>
7967
7968 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7969 situations in which we can deduce the RAID size and the superblock
7970 doesn't match it.
7971
b92f0c18 79722008-02-09 Robert Millan <rmh@aybabtu.com>
7973
7974 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7975 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7976 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7977
7978 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7979 and return a grub_diskmemberlist_t composed of physical array members.
7980 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7981
7982 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7983 prototype.
7984 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7985 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7986 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7987
7988 * util/grub-probe.c (probe): Move partmap probing code from here ...
7989 (probe_partmap): ... to here.
7990 (probe): Use probe_partmap() once for the disk we're probing, and
7991 additionally, when such disk contains a memberlist() struct member,
7992 once for each disk that is contained in the structure returned by
7993 memberlist().
7994
91a4bf68 79952008-02-09 Robert Millan <rmh@aybabtu.com>
7996
7997 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7998 environment variable to 'all' in order to obtain debug output from
7999 non-util/ code.
8000 * util/i386/pc/grub-setup.c (main): Likewise.
8001
a96f9caa 80022008-02-08 Robert Millan <rmh@aybabtu.com>
8003
8004 * disk/raid.c (grub_raid_scan_device): Check for
8005 `array->device[sb.this_disk.number]' rather than for
8006 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 8007 guaranteed to be accessible.
a96f9caa 8008
b37a9222 80092008-02-08 Robert Millan <rmh@aybabtu.com>
8010
8011 * disk/raid.c: Update copyright.
8012 * fs/cpio.c: Likewise.
8013 * include/grub/raid.h: Likewise.
8014 * loader/i386/pc/multiboot.c: Likewise.
8015 * util/hostfs.c: Likewise.
8016
5626aee1 80172008-02-08 Robert Millan <rmh@aybabtu.com>
8018
8019 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8020 to a grub_disk_t array.
8021 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8022 `device[x]'.
8023 (grub_raid_scan_device): Replace `device[x].name' accesses with
8024 `device[x]->name'. Simplify initialization of `array->device[x]'.
8025
554f0187 80262008-02-08 Robert Millan <rmh@aybabtu.com>
8027
8028 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8029 grub_dprintf() calls.
8030 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8031 error message.
8032
1ec8425d 80332008-02-07 Christian Franke <franke@computer.org>
8034
8035 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8036 instead of fseek and ftell to support large files.
8037 (grub_hostfs_read): Likewise.
8038
f2156fda 80392008-02-07 Robert Millan <rmh@aybabtu.com>
8040
8041 Patch from Jeroen Dekkers.
8042 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 8043 failure, since successfully reading all array members might not be
f2156fda 8044 required.
8045
9216e0e7 80462008-02-06 Robert Millan <rmh@aybabtu.com>
8047
8048 * util/grub-probe.c (probe): Simplify partmap probing (with the
8049 assumption that the first word up to the underscore equals to
8050 the module name).
8051
b0dfd29a 80522008-02-06 Christian Franke <franke@computer.org>
8053
8054 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8055 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8056 last block of a cpio or tar stream.
8057 Check for "TRAILER!!!" instead of any empty data
8058 block to detect last block of a cpio stream.
8059 (grub_cpio_dir): Fix constness of variable np.
8060 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8061 cpio or tar trailer is detected. This fixes a crash
8062 on open of a non existing file.
8063
c32865bf 80642008-02-05 Bean <bean123ch@gmail.com>
8065
8066 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8067 address of entry.
8068 (grub_multiboot_load_elf64): Likewise.
8069 (grub_multiboot): Initialize mbi structure.
8070
8071 * util/grub-fstest.c: Don't include unused header file script.h.
8072
fe6b695a 8073 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 8074 of file.
8075 (grub_fstest_SOURCES): Likewise.
8076
409480b7 80772008-02-05 Robert Millan <rmh@aybabtu.com>
8078
8079 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8080 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8081 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8082 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8083
8084 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8085 (translation_table): Replace hardcoded values with macros
8086 provided by `<grub/term.h>'.
8087
8088 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8089 (keyboard_map): Correct/add a few values, with macros provided
8090 by `<grub/term.h>'.
8091 (keyboard_map_shift): Zero values that don't differ from their
8092 `keyboard_map' equivalents.
8093 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8094 Discard the second scan code that is always sent by Caps lock.
8095 Only use `keyboard_map_shift' when it provides a non-zero value,
8096 otherwise fallback to `keyboard_map'.
8097
99fadbaa 80982008-02-04 Bean <bean123ch@gmail.com>
8099
8100 * Makefile.in (enable_grub_fstest): New variable.
8101
8102 * conf/common.rmk (grub_fstest_init.lst): New rule.
8103 (grub_fstest_init.h): Likewise.
8104 (grub_fstest_init.c): Likewise.
8105 (util/grub-fstest.c_DEPENDENCIES): New variable.
8106 (grub_fstest_SOURCES): Likewise.
8107
8108 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8109
8110 * util/grub-fstest.c: New file.
8111
bf567c50 81122008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8113
8114 Make grub-setup handle a separate root device.
f19dbdb7 8115
bf567c50 8116 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8117 so that the root device can be compared with the destination
8118 device.
8119 When embedding the core image, if the root and destination devices
8120 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8121 0xFF.
8122 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 8123
9be6b98b 81242008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8125
8126 Add support for having a grub directory in a different drive. This
8127 is still only the data handling part.
f19dbdb7 8128
9be6b98b 8129 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8130 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8131 (grub_root_drive): New variable.
8132
8133 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8134 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8135 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8136 as it was.
8137
8138 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8139
8140 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8141 macro.
8142 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8143
8144 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8145 is bogus, because PXE booting does not specify any drive
8146 correctly.
8147
8148 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8149 am not sure if this is really correct.
8150
8151 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8152 is always identical to the boot drive when booting from a CD.
8153
8154 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8155 longer.
8156 (root_drive): New variable.
8157 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8158 (setup_sectors): Push %dx right after popping it, because %dh will
8159 be modified later.
8160 (copy_buffer): Restore %dx.
8161
e0ca0677 81622008-02-03 Robert Millan <rmh@aybabtu.com>
8163
8164 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8165 use `cdboot.img' for cdrom images.
8166
3b3f6629 81672008-02-03 Robert Millan <rmh@aybabtu.com>
8168
8169 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8170 only setup gfxterm when `font' command has succeeded.
8171
d42b3672 81722008-02-03 Robert Millan <rmh@aybabtu.com>
8173
8174 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8175 (grub_rescue_cmd_multiboot_loader)
8176 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8177
fa370ea6 81782008-02-03 Pavel Roskin <proski@gnu.org>
8179
e0c5dacb 8180 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 8181 %edx and %esi from stack only after grub_gate_a20() is called.
8182 grub_gate_a20() clobbers %edx.
8183
f2a76e1d 81842008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8185
8186 * configure.ac (AC_INIT): Bumped to 1.96.
8187
8188 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8189 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8190 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8191 video/readers/png.c.
8192
90fd32d1 81932008-02-03 Bean <bean123ch@gmail.com>
9be665dd 8194
8195 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8196 (cdboot_img_SOURCES): New variable.
8197 (cdboot_img_ASFLAGS): New variable.
8198 (cdboot_img_LDFLAGS): New variable.
8199
8200 * boot/i386/pc/cdboot.S: New file.
8201
8202 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8203 (cd_count): Likewise.
8204 (grub_biosdisk_get_drive): Add support for cd device.
8205 (grub_biosdisk_call_hook): Likewise.
8206 (grub_biosdisk_iterate): Likewise.
8207 (grub_biosdisk_open): Likewise.
8208 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8209 (grub_biosdisk_rw): Support reading from cd device.
8210 (GRUB_MOD_INIT): Iterate cd devices.
8211
8212 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8213 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8214 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8215
8216 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8217
4020aa53 82182008-02-02 Robert Millan <rmh@aybabtu.com>
8219
8220 * commands/read.c: New file.
8221 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8222 (read_mod_SOURCES): New variable.
8223 (read_mod_CFLAGS): Likewise.
8224 (read_mod_LDFLAGS): Likewise.
8225
e03a1132 82262008-02-02 Robert Millan <rmh@aybabtu.com>
8227
8228 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8229 determining whether menu has to be displayed.
8230
58c69220 82312008-02-02 Marco Gerards <marco@gnu.org>
8232
8233 * bus/pci.c: New file.
8234
8235 * include/grub/pci.h: Likewise.
8236
8237 * include/grub/i386/pc/pci.h: Likewise.
8238
8239 * commands/lspci.c: Likewise.
8240
8241 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8242 `lspci.mod'.
8243 (pci_mod_SOURCES): New variable.
8244 (pci_mod_CFLAGS): Likewise.
8245 (pci_mod_LDFLAGS): Likewise.
8246 (lspci_mod_SOURCES): Likewise.
8247 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8248 (lspci_mod_LDFLAGS): Likewise.
58c69220 8249
c004e1b4 82502008-02-02 Bean <bean123ch@gmail.com>
8251
8252 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8253 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8254
8255 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8256 (grub_xfs_btree_node): New structure.
8257 (grub_xfs_btree_root): New structure.
8258 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8259 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8260 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8261 (GRUB_XFS_EXTENT_SIZE): Likewise.
8262 (grub_xfs_read_block): Support btree format type.
8263 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8264 Use directory block as basic unit.
8265
8266 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8267
8268 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8269 __attribute__ ((__regparm__ (1))).
8270
f95562bf 82712008-02-01 Robert Millan <rmh@aybabtu.com>
8272
8273 Correct a mistake in previous commit.
8274
8275 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8276 top.
8277 (normal/command.c_DEPENDENCIES): New variable.
8278
7d31f41f 82792008-02-01 Robert Millan <rmh@aybabtu.com>
8280
8281 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8282 top.
8283 (normal/command.c_DEPENDENCIES): New variable.
8284 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8285 * conf/i386-ieee1275.rmk: Likewise.
8286 * conf/i386-linuxbios.rmk: Likewise.
8287 * conf/i386-pc.rmk: Likewise.
8288 * conf/sparc64-ieee1275.rmk: Likewise.
8289 * conf/powerpc-ieee1275.rmk: Likewise.
8290 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8291
8292 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8293
60b6be74 82942008-02-01 Robert Millan <rmh@aybabtu.com>
8295
8296 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8297 call at beginning of function.
8298
078522ab 82992008-01-31 Pavel Roskin <proski@gnu.org>
8300
8301 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 8302 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8303 (grub_mkrescue_SOURCES): Likewise.
078522ab 8304 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8305
ccaa8a5f 83062008-01-30 Robert Millan <rmh@aybabtu.com>
8307
8308 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8309 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8310 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8311 (grub_probe_SOURCES): ... to here.
8312
8313 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8314 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8315 * conf/i386-ieee1275.rmk: Likewise.
8316 * conf/i386-linuxbios.rmk: Likewise.
8317 * conf/powerpc-ieee1275.rmk: Likewise.
8318
ae5a9cd7 83192008-01-30 Tristan Gingold <gingold@free.fr>
8320
8321 * kern/rescue.c: Silently accept empty lines.
8322
70bc2ef2 83232008-01-29 Bean <bean123ch@gmail.com>
8324
8325 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8326 (real_code_2): Code cleanup and change comment style.
8327 (move_memory): Avoid using 32-bit address mode.
8328
6a4d50ea 83292008-01-29 Bean <bean123ch@gmail.com>
8330
8331 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8332 (png_mod_SOURCES): New variable.
8333 (png_mod_CFLAGS): Likewise.
8334 (png_mod_LDFLAGS): Likewise.
8335
8336 * video/readers/png.c: New file.
8337
11cc30ac 83382008-01-28 Robert Millan <rmh@aybabtu.com>
8339
8340 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8341 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8342 `ifndef GRUB_MOD_GAP' hack.
8343 * util/elf/grub-mkimage.c (add_segments): Likewise.
8344
3abc589f 83452008-01-27 Robert Millan <rmh@aybabtu.com>
8346
8347 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8348 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 8349 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 8350
e1907778 83512008-01-27 Robert Millan <rmh@aybabtu.com>
8352
8353 Get grub-emu to build again (including parallel builds).
8354
8355 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8356 Split into ...
8357 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8358 (normal/execute.c_DEPENDENCIES): ... this, ...
8359 (grub-emu_DEPENDENCIES): ... and this.
8360
8361 * conf/i386-efi.rmk: Likewise.
8362 * conf/i386-linuxbios.rmk: Likewise.
8363 * conf/i386-ieee1275.rmk: Likewise.
8364 * conf/powerpc-ieee1275.rmk: Likewise.
8365 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8366
2216b101 83672008-01-27 Robert Millan <rmh@aybabtu.com>
8368
8369 * NEWS: Add a few items.
8370
f75172d9 83712008-01-27 Robert Millan <rmh@aybabtu.com>
8372
8373 Fix parallel builds with grub-emu. Based on earlier commit for
8374 grub-probe and grub-setup.
8375
8376 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8377 (util/grub-emu.c_DEPENDENCIES): ... this.
8378 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8379 (util/grub-emu.c_DEPENDENCIES): ... this.
8380 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8381 (util/grub-emu.c_DEPENDENCIES): ... this.
8382 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8383 (util/grub-emu.c_DEPENDENCIES): ... this.
8384 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8385 (util/grub-emu.c_DEPENDENCIES): ... this.
8386
3f51de77 83872008-01-27 Pavel Roskin <proski@gnu.org>
8388
8389 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8390 to create a gap between _end and the modules added to the image
8391 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8392 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8393 * util/elf/grub-mkimage.c (add_segments): Likewise.
8394
2033f53e 83952008-01-26 Pavel Roskin <proski@gnu.org>
8396
8397 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8398 just return an error.
8399
22da1f6f 84002008-01-26 Bean <bean123ch@gmail.com>
8401
8402 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8403 (grub_reiserfs_get_item): Save offset of the next item.
8404 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8405
2a9525e6 84062008-01-25 Robert Millan <rmh@aybabtu.com>
8407
8408 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8409 make all filesystem sources appear together (possibly fixing omissions
8410 while at it).
8411 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8412 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8413 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8414 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8415
8416 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8417 add `kern/file.c'.
8418 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8419 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8420 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8421 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8422
8423 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8424 (probe): Add a sanity check to make sure of our ability to read
8425 requested files when probing for filesystem type.
8426
8427 * genmk.rb: Update copyright year (2007).
8428
8429 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8430 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8431 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8432 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8433 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8434 : Remove function prototypes.
8435
b95f71b5 84362008-01-25 Robert Millan <rmh@aybabtu.com>
8437
8438 Revert my previous commits (based on wrong assumption of how grub_errno
8439 works).
8440
fe6b695a 8441 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 8442 * kern/file.c (grub_file_open): Likewise.
8443
d08bbb49 84442008-01-24 Pavel Roskin <proski@gnu.org>
8445
8446 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8447 that hang if GRUB tries to setup colors.
8448 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8449 colors for firmwares that don't support it.
8450 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8451 Recognize Open Hack'Ware, set flags to work around its
8452 limitations.
8453
605e36ed 84542008-01-24 Robert Millan <rmh@aybabtu.com>
8455
8456 * kern/file.c (grub_file_open): Do not account previous failures of
8457 unrelated functions when grub_errno is checked for.
8458 Reported by Oleg Strikov.
8459
bac332a1 84602008-01-24 Bean <bean123ch@gmail.com>
8461
8462 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8463 (grub_ufs_sblock): New member volume name.
8464 (grub_ufs_find_file): Fix string copy bug.
8465 (grub_ufs_label): Implement this function properly.
8466
8467 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8468 (grub_hfs_iterate_records): Use the correct file number for extents
8469 and catalog file. Fix problem in next index calculation.
8470 (grub_hfs_find_node): Replace recursive function call with loop.
8471 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8472
15c80c09 84732008-01-23 Robert Millan <rmh@aybabtu.com>
8474
8475 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8476 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8477 (grub_multiboot2_real_boot): New function prototype.
8478
8479 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8480 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8481
8482 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8483 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8484
305338fd 84852008-01-23 Robert Millan <rmh@aybabtu.com>
8486
8487 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8488 #ifdef'ed out grub_printf().
8489
3ea52685 84902008-01-23 Robert Millan <rmh@aybabtu.com>
8491
8492 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8493 grub_dprintf calls, since they make "debug=all" mode unusable.
8494 (grub_console_checkkey): Likewise.
8495
5882ae4b 84962008-01-23 Robert Millan <rmh@aybabtu.com>
8497
8498 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8499 `term/i386/pc/at_keyboard.c'.
8500 (pkglib_MODULES): Add `serial.mod'.
8501 (serial_mod_SOURCES): New variable.
8502 (serial_mod_CFLAGS): Likewise.
8503 (serial_mod_LDFLAGS): Likewise.
8504
8505 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8506 `<grub/powerpc/ieee1275/console.h>'.
8507 (grub_keyboard_controller_init): New function prototype.
8508 (grub_console_checkkey): Likewise.
8509 (grub_console_getkey): Likewise.
8510
8511 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8512 keyboard on i386.
8513
8514 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8515 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8516
06ab5303 85172008-01-23 Robert Millan <rmh@aybabtu.com>
8518
8519 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8520 present, "(memdisk)/boot/grub" becomes the default prefix.
8521
8522 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8523 a memdisk tarball with all the modules. Add --overlay=DIR option that
8524 allows users to overlay additional files into the image.
8525
dbb475a4 85262008-01-23 Robert Millan <rmh@aybabtu.com>
8527
8528 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8529 and `machine/memory.h'.
8530 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8531 (_multiboot_mod_SOURCES): New variable.
8532 (_multiboot_mod_CFLAGS): Likewise.
8533 (_multiboot_mod_LDFLAGS): Likewise.
8534 (multiboot_mod_SOURCES): Likewise.
8535 (multiboot_mod_CFLAGS): Likewise.
8536 (multiboot_mod_LDFLAGS): Likewise.
8537
8538 * include/grub/i386/ieee1275/loader.h: New file.
8539
8540 * include/grub/i386/ieee1275/machine.h: Likewise.
8541
8542 * include/grub/i386/ieee1275/memory.h: Likewise.
8543
8544 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8545 variable declaration.
8546 (grub_os_area_size): Likewise.
8547
8548 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8549 (grub_lower_mem, grub_upper_mem): New variables.
8550 (grub_stop_floppy): New function (just to make
8551 grub_multiboot2_real_boot() happy).
8552
8553 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8554 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8555 (grub_stop): New function.
8556 Include `"../realmode.S"' and `"../loader.S"'.
8557
8558 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8559 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8560
8561 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8562 rely on grub_multiboot2_real_boot() for final boot.
8563
25638629 85642008-01-22 Robert Millan <rmh@aybabtu.com>
8565
8566 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8567 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8568 device that doesn't look like an SD card.
8569 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8570 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8571 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8572 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8573 found.
8574
9dad816d 85752008-01-22 Robert Millan <rmh@aybabtu.com>
8576
8577 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8578 avoid claiming over our own code.
8579
34842f2d 85802008-01-22 Bean <bean123ch@gmail.com>
8581
8582 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8583 (jpeg_mod_SOURCES): New variable.
8584 (jpeg_mod_CFLAGS): Likewise.
8585 (jpeg_mod_LDFLAGS): Likewise.
8586
8587 * video/readers/jpeg.c : New file.
8588
44023a28 85892008-01-22 Bean <bean123ch@gmail.com>
8590
8591 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8592 there are no more items.
8593
bc2d8ac6 85942008-01-21 Robert Millan <rmh@aybabtu.com>
8595
8596 * kern/mm.c (grub_mm_init_region): Improve debug message.
8597
261bd4bc 85982008-01-21 Robert Millan <rmh@aybabtu.com>
8599
8600 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8601 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8602 address.
8603 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8604 a C macro.
8605 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8606 Indicates start of upper memory.
8607 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8608 (generate_image): Abort when image size is big enough to corrupt
8609 upper memory.
8610
8611 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8612 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8613 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8614 instead of hardcoding 0xA0000.
8615 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8616 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8617 instead of hardcoding 0xA0000.
8618
f970b55e 86192008-01-21 Robert Millan <rmh@aybabtu.com>
8620
8621 * disk/memdisk.c (memdisk_size): New variable.
8622 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8623 `memdisk_size'.
8624 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8625 image to dynamic memory.
8626 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8627 `memdisk_size'. Free memdisk block.
8628
1a8b0526 86292008-01-21 Robert Millan <rmh@aybabtu.com>
8630
8631 Fix detection of very small filesystems (like tar).
8632
8633 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8634 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8635 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8636 a problem with this disk).
8637
6e9b4aab 86382008-01-21 Robert Millan <rmh@aybabtu.com>
8639
8640 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8641 on grub_biosdisk_rw_standard() error.
8642
0d8837b2 86432008-01-21 Robert Millan <rmh@aybabtu.com>
8644
8645 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8646 recent changes.
8647 * kern/elf.c: Likewise.
8648 * kern/ieee1275/ieee1275.c: Likewise.
8649 * kern/powerpc/ieee1275/openfw.c: Likewise.
8650 * term/ieee1275/ofconsole.c: Likewise.
8651
ffd36e34 86522008-01-21 Robert Millan <rmh@aybabtu.com>
8653
8654 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8655
3f0093d0 8656 * include/grub/kernel.h (grub_arch_memdisk_addr)
8657 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 8658
3f0093d0 8659 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8660 (grub_arch_memdisk_size): ... to here.
ffd36e34 8661
6c391b21 86622008-01-21 Robert Millan <rmh@aybabtu.com>
8663
8664 Mostly based on bugfix from Bean.
8665
8666 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8667 attribute with hook() parameter.
8668 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8669 declaration.
8670 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8671 attribute with hook() parameter.
8672 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8673 declaration.
8674
55a581dc 86752008-01-21 Robert Millan <rmh@aybabtu.com>
8676
8677 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8678 (pkglib_MODULES): Add `memdisk.mod'.
8679 (memdisk_mod_SOURCES): New variable.
8680 (memdisk_mod_CFLAGS): Likewise.
8681 (memdisk_mod_LDFLAGS): Likewise.
8682
8683 * disk/memdisk.c: New file.
8684
8685 * include/grub/disk.h (grub_disk_dev_id): Add
8686 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8687
8688 * include/grub/i386/pc/kernel.h
8689 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8690 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8691 (grub_kernel_image_size): New variable declaration.
8692 (grub_total_module_size): Likewise.
8693 (grub_memdisk_image_size): Likewise.
8694
8695 * include/grub/i386/pc/memory.h
8696 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8697
8698 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8699 (grub_arch_memdisk_addr): New variable declaration.
8700 (grub_arch_memdisk_size): Likewise.
8701
8702 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8703 (grub_arch_memdisk_size): Likewise.
8704
8705 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8706 (codestart): Replace hardcoded `0x100000' with
8707 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8708
8709 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8710 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8711 not NULL, append the contents of the file it refers to, at the end of
8712 the compressed kernel image. Initialize `grub_memdisk_image_size'
8713 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8714 (options): Add "memdisk"|'m' option.
8715 (main): Parse --memdisk|-m option, and pass user-provided path as
8716 parameter to generate_image().
8717
3d7f54c9 87182008-01-20 Robert Millan <rmh@aybabtu.com>
8719
8720 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8721 grub_dprintf() calls from here ...
8722 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8723
0bf74728 87242008-01-20 Robert Millan <rmh@aybabtu.com>
8725
8726 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8727
8728 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8729 declaration.
8730 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8731 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8732 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 8733 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 8734 property).
8735 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8736 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8737
33bf70a7 87382008-01-19 Robert Millan <rmh@aybabtu.com>
8739
fe6b695a 8740 Get rid of confusing function (superseded by
33bf70a7 8741 `grub_ieee1275_get_integer_property')
8742 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8743 prototype.
8744 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8745 function.
8746 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8747 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 8748 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 8749
e2da7d26 87502008-01-19 Robert Millan <rmh@aybabtu.com>
8751
8752 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8753 command after "shut-down", since implementations differ on which
8754 the command for halt is.
8755
59f1fd8d 87562008-01-19 Robert Millan <rmh@aybabtu.com>
8757
8758 * include/grub/i386/linuxbios/console.h: Add header protection.
8759 (grub_keyboard_controller_init): New function prototype.
8760 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8761 (KEYBOARD_COMMAND_READ): Likewise.
8762 (KEYBOARD_COMMAND_WRITE): Likewise.
8763 (KEYBOARD_SCANCODE_SET1): Likewise.
8764 (grub_keyboard_controller_write): New function.
8765 (grub_keyboard_controller_read): Likewise.
8766 (grub_keyboard_controller_init): Likewise.
8767
8768 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8769 (grub_console_init): On coreboot/LinuxBIOS, call
8770 grub_keyboard_controller_init().
8771
5f5a7c15 87722008-01-19 Robert Millan <rmh@aybabtu.com>
8773
8774 PowerPC changes provided by Pavel Roskin.
8775
8776 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8777 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8778 don't rely on cmain() doing it.
8779 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8780 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8781
1210e168 87822008-01-16 Robert Millan <rmh@aybabtu.com>
8783
8784 * include/grub/i386/linuxbios/memory.h
8785 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8786 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8787 receive `table_header' as argument. Instead, probe for it in the
8788 known memory ranges where it can be present.
8789 (grub_available_iterate): Do not pass a fixed `table_header' address
8790 to grub_linuxbios_table_iterate().
8791
3d04eab8 87922008-01-15 Robert Millan <rmh@aybabtu.com>
8793
8794 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8795 * conf/i386-ieee1275.rmk: New file.
8796 * include/grub/i386/ieee1275/console.h: Likewise.
8797 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8798 * include/grub/i386/ieee1275/kernel.h: Likewise.
8799 * include/grub/i386/ieee1275/time.h: Likewise.
8800 * kern/i386/ieee1275/init.c: Likewise.
8801 * kern/i386/ieee1275/startup.S: Likewise.
8802
d1bc1b73 88032008-01-15 Robert Millan <rmh@aybabtu.com>
8804
8805 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8806 when pointers are 32-bit (but still do set it to one when they are
8807 64-bit).
8808
66a65807 88092008-01-15 Robert Millan <rmh@aybabtu.com>
8810
8811 * include/grub/ieee1275/ieee1275.h
8812 (grub_ieee1275_get_integer_property): New function prototype.
8813
8814 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8815 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 8816 grub_ieee1275_get_property() to handle endianness.
66a65807 8817
8818 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8819 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 8820 where appropriate.
66a65807 8821 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8822 (grub_map): Likewise.
8823 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8824
a83ccafd 88252008-01-15 Bean <bean123ch@gmail.com>
8826
8827 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8828 (grub_script_execute_cmdline): Reset grub_errno.
8829
8830 * normal/main.c (read_config_file): Reset grub_errno.
8831
8832 * normal/parse.y (script_init): New.
8833 (script): Move function and menuentry here.
8834 (delimiter): New.
8835 (command): Add delimiter at the end of command.
8836 (commands): Adjust to match the new command.
8837 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 8838 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 8839 (if): Use the new commands.
8840
8841 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8842
df6ecfc6 88432008-01-15 Robert Millan <rmh@aybabtu.com>
8844
8845 * normal/menu.c (run_menu): Move timeout message from here ...
8846 (print_timeout): ... to here.
8847 (run_menu): Use print_timeout() once during initial draw to print
8848 the whole message, and again in every clock tick to update only
8849 the number of seconds.
8850
87ae25eb 88512008-01-15 Robert Millan <rmh@aybabtu.com>
8852
8853 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8854 actual size of `available' from grub_ieee1275_get_property(), and
8855 restrict parsing to that bound.
8856
47bf09a4 88572008-01-15 Christian Franke <franke@computer.org>
8858
8859 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8860 (argp_program_version): Remove variable.
8861 (argp_program_bug_address): Likewise.
8862 (options): Convert from struct argp_option to struct option.
8863 (struct arguments): Remove.
8864 (parse_opt): Remove.
8865 (usage): New function.
8866 (main): Replace struct args members by simple variables.
8867 Replace argp_parse() by getopt_long().
8868 Add switch to evaluate options.
8869 Add missing "(...)" around root_dev in prefix string.
8870
c86f1469 88712008-01-14 Robert Millan <rmh@aybabtu.com>
8872
8873 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8874 for grub_ieee1275_exit(), in order to improve portability.
8875
e622c559 88762008-01-14 Robert Millan <rmh@aybabtu.com>
8877
8878 * util/grub.d/10_linux.in (prefix): Define.
8879 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8880
44cb1ec8 88812008-01-13 Pavel Roskin <proski@gnu.org>
8882
8883 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8884 grub_errno if no errors have been detected.
8885
1eb8c802 88862008-01-12 Robert Millan <rmh@aybabtu.com>
8887
8888 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8889 (grub_util_get_dev_abstraction): New function prototype.
8890
8891 * util/getroot.c: Include `<grub/util/getroot.h>'
8892 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8893 (grub_util_get_dev_abstraction): ... here (new function).
8894
8895 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8896 `PRINT_ABSTRACTION'.
8897 (probe): Probe for abstraction type when requested.
8898 (main): Understand `--target=abstraction'.
8899
8900 * util/i386/efi/grub-install.in: Add abstraction module to core
8901 image when it is found to be necessary.
8902 * util/i386/pc/grub-install.in: Likewise.
8903 * util/powerpc/ieee1275/grub-install.in: Likewise.
8904
8905 * util/update-grub_lib.in (font_path): Return system path without
8906 converting to GRUB path.
8907 * util/update-grub.in: Convert system path returned by font_path()
8908 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8909 abstraction module is needed for loading fonts (if any). Export
8910 that as `GRUB_PRELOAD_MODULES'.
8911 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8912 insmod commands).
8913
52bd3de9 89142008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8915
8916 Remove some unused code from reiserfs.
f19dbdb7 8917
52bd3de9 8918 * fs/reiserfs.c (struct grub_reiserfs_key)
8919 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8920 (struct grub_reiserfs_node_body): Removed.
8921 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8922 Likewise.
8923 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8924 Likewise.
8925 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8926 Likewise.
8927 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8928 Likewise.
8929 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8930 Likewise.
8931 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8932 Likewise.
8933 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8934 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8935 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8936
2f80039d 89372008-01-10 Robert Millan <rmh@aybabtu.com>
8938
8939 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8940 Determines if a file is garbage left by packaging systems, etc.
8941 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8942 for processing /etc/grub.d scripts.
8943 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8944 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8945 as a condition for processing Linux images.
8946
87888032 89472008-01-10 Pavel Roskin <proski@gnu.org>
8948
8949 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8950 to compile reiserfs.c on PowerPC.
8951
7e54fced 89522008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8953
8954 * kern/device.c (grub_device_iterate): Do not abort device iteration
8955 when one of the devices cannot be opened.
8956 * kern/disk.c (grub_disk_open): Do not account previous failures of
8957 unrelated functions when grub_errno is checked for.
8958
5aa541e6 89592008-01-08 Robert Millan <rmh@aybabtu.com>
8960
8961 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8962 `! grub_linux_is_bzimage', change order of address comparison to make
8963 it more intuitive, and improve "too big zImage" error message.
8964
7076340d 89652008-01-08 Robert Millan <rmh@aybabtu.com>
8966
8967 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8968 `$(update-grub_DATA)'.
8969 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8970 targets.
8971
9ca70333 89722008-01-07 Robert Millan <rmh@aybabtu.com>
8973
8974 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8975 which instruction is modified by grub-setup during installation
8976 (since it wasn't obvious by only looking at this file).
8977
38ccf575 89782008-01-07 Robert Millan <rmh@aybabtu.com>
8979
8980 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8981 listing actual TODO items.
8982
f5db4291 89832008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8984
868967cf 8985 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8986 correctly.
8987 (grub_reiserfs_get_key_offset): Likewise.
8988 (grub_reiserfs_set_key_offset): Likewise.
8989 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 8990 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 8991
8992 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8993 better to remove the bitfield version completely.
f19dbdb7 8994
868967cf 89952008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8996
f5db4291 8997 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8998 allocated from the heap, due to the fshelp implementation.
8999 (grub_reiserfs_dir): Free NODE, due to the same reason.
9000
492e6d9d 90012008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9002
9003 Mostly from Vincent Pelletier:
f19dbdb7 9004
492e6d9d 9005 * fs/reiserfs.c: New file.
f19dbdb7 9006
492e6d9d 9007 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9008 (reiserfs_mod_SOURCES): New variable.
9009 (reiserfs_mod_CFLAGS): Likewise.
9010 (reiserfs_mod_LDFLAGS): Likewise.
9011
9012 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9013 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9014 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9015 normal/color.c.
9016
9ce3e7c1 90172008-01-06 Robert Millan <rmh@aybabtu.com>
9018
9019 * normal/color.c: Remove `<grub/env.h>'.
9020
f3b58148 90212008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9022
9023 * include/grub/normal.h: Include <grub/env.h>.
9024
7ac3bcfa 90252008-01-05 Robert Millan <rmh@aybabtu.com>
9026
9027 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9028 usage example with `(hd0,1)'.
fb358190 9029 Reported by Samuel Thibault.
7ac3bcfa 9030
c8ee99d7 90312008-01-05 Robert Millan <rmh@aybabtu.com>
9032
9033 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9034 (grub_linux_boot_zimage): Rename to ...
9035 (grub_linux_boot): ... this.
9036 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9037 (grub_linux_boot_zimage): Conditionalize zImage copy.
9038
9039 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9040 (grub_linux_boot_bzimage): Remove prototype.
9041 (grub_linux_boot_zimage): Rename to ...
9042 (grub_linux_boot): ... this.
9043
9044 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9045 (grub_linux_boot): Remove function.
9046
0ece25b1 90472008-01-05 Robert Millan <rmh@aybabtu.com>
9048
9049 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9050 (grub_env_write_color_highlight): Likewise.
9051 (grub_wait_after_message): Likewise.
9052
9053 * normal/color.c: New file.
9054
9055 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9056 (normal_mod_DEPENDENCIES): Likewise.
9057
9058 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9059 (normal_mod_DEPENDENCIES): Likewise.
9060
9061 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9062 (normal_mod_DEPENDENCIES): Likewise.
9063
9064 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9065 (normal_mod_DEPENDENCIES): Likewise.
9066
9067 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9068 for waiting after a message is printed.
9069 * normal/main.c (read_config_file): Likewise.
9070 (grub_normal_init): Register grub_env_write_color_normal() and
9071 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9072 `color_highlight' variables as global.
9073
9074 * normal/menu.c (grub_wait_after_message): New function.
9075 (grub_color_menu_normal): New variable. Replaces ...
9076 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9077 (grub_color_menu_highlight): New variable. Replaces ...
9078 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9079 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9080 `GRUB_TERM_COLOR_STANDARD'.
9081 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9082 `normal_code' and `highlight_code' to `old_color_normal' and
9083 `old_color_highlight', respectively.
9084 (grub_menu_init_page): Update colors when drawing the menu, based on
9085 `menu_color_normal' and `menu_color_highlight' variables.
9086 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9087 a message is printed.
9088
182dd4e5 90892008-01-05 Robert Millan <rmh@aybabtu.com>
9090
9091 * kern/env.c (grub_env_context_open): Propagate hooks for global
9092 variables to new context.
9093
9094 * kern/main.c (grub_set_root_dev): Export `root' variable.
9095
ddf8f6ad 90962008-01-05 Robert Millan <rmh@aybabtu.com>
9097
9098 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 9099 discs unconditionally, since udev and others have options to provide
ddf8f6ad 9100 them.
9101
d8b43d9b 91022008-01-05 Robert Millan <rmh@aybabtu.com>
9103
9104 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9105
2bff2de3 91062008-01-04 Christian Franke <franke@computer.org>
9107
9108 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9109 of eisa_mmap.
9110
97eab917 91112008-01-03 Pavel Roskin <proski@gnu.org>
9112
9113 * kern/i386/linuxbios/init.c: Put "void" to all function
9114 declarations with no arguments.
9115 * kern/powerpc/ieee1275/init.c: Likewise.
9116 * term/i386/pc/at_keyboard.c: Likewise.
9117 * term/i386/pc/vga_text.c: Likewise.
9118 * util/grub-mkdevicemap.c: Likewise.
9119
b9416d00 91202008-01-02 Robert Millan <rmh@aybabtu.com>
9121
9122 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9123 message when loaded image is out of bounds.
9124 (grub_multiboot_load_elf64): Likewise.
9125
92695df9 91262008-01-02 Pavel Roskin <proski@gnu.org>
9127
9128 * util/grub.d/10_linux.in: Try version without ".old" when
9129 looking for initrd. It's better to use initrd from the newer
9130 kernel of the same version than no initrd at all.
9131
d98d9cad 91322008-01-01 Robert Millan <rmh@aybabtu.com>
9133
9134 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9135
dbfdce36 91362008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9137
f19dbdb7 9138 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 9139 grub_video_get_active_render_target.
9140 (grub_video_adapter): Added unmap_color and get_active_render_target.
9141
f19dbdb7 9142 * video/video.c: Added grub_video_unmap_color and
dbfdce36 9143 grub_video_get_active_render_target.
9144 (grub_video_get_info): Changed method to accept NULL pointer as an
9145 argument to allow detection of active video adapter.
9146
9147 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9148 grub_video_vbe_unmap_color_int.
9149 Added grub_video_vbe_unmap_color and
9150 grub_video_vbe_get_active_render_target.
9151 (grub_video_vbe_adapter): Added unmap_color and
9152 get_active_render_target.
9153
f19dbdb7 9154 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 9155 with grub_video_vbe_unmap_color_int.
9156
9157 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9158 (DEFAULT_NORMAL_COLOR): Likewise.
9159 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9160 (DEFAULT_FG_COLOR): Removed.
9161 (DEFAULT_BG_COLOR): Likewise.
9162 (DEFAULT_CURSOR_COLOR): Changed value.
9163 (grub_virtual_screen): Added standard_color_setting,
9164 normal_color_setting, highlight_color_setting and term_color.
9165 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9166 (bitmap_width): Added.
9167 (bitmap_height): Likewise.
9168 (bitmap): Likewise.
9169 (set_term_color): Likewise.
9170 (grub_virtual_screen_setup): Changed to use new terminal coloring
9171 settings.
9172 (grub_gfxterm_init): Added init for bitmap.
9173 (grub_gfxterm_fini): Added destroy for bitmap.
9174 (redraw_screen_rect): Updated to use background bitmap and new
9175 terminal coloring.
9176 (scroll_up): Added optimization for case when there is no bitmap.
9177 (grub_gfxterm_cls): Fixed to use correct background color.
9178 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9179 coloring.
9180 (grub_virtual_screen_setcolor): Likewise.
9181 (grub_virtual_screen_getcolor): Added.
9182 (grub_gfxterm_background_image_cmd): Likewise.
9183 (grub_video_term): Added setcolor and getcolor.
9184 (MOD_INIT): Added registration of background_image command.
9185 (MOD_TERM): Added unregistration for background_image command.
9186
c3c20931 91872007-12-30 Pavel Roskin <proski@gnu.org>
9188
9189 * loader/multiboot_loader.c: Fix multiboot command
9190 unregistration. Fix all typos in the word "multiboot".
9191
df266716 91922007-12-29 Pavel Roskin <proski@gnu.org>
94239199 9193
9194 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9195 support for initrd names used in Fedora.
9196
fc6e896c 91972007-12-26 Bean <bean123ch@gmail.com>
9198
9199 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9200 (cpio_mod_SOURCES): New variable.
9201 (cpio_mod_CFLAGS): Likewise.
9202 (cpio_mod_LDFLAGS): Likewise.
9203
9204 * fs/cpio.c: New file.
9205
9206 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9207
9208 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9209
9210 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9211
9212 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9213
533110ad 92142007-12-25 Robert Millan <rmh@aybabtu.com>
9215
9216 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9217 (grub_getcolor): New function.
9218
9219 * kern/term.c (grub_getcolor): New function.
9220 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9221 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9222 (print_entry): Set normal and highlight colors to
9223 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9224 respectively, before printing and restore them to old
9225 values afterwards.
9226 (grub_menu_init_page): Likewise. Fill an additional colored space
9227 that would otherwise be left blank.
9228
9229 * term/efi/console.c (grub_console_getcolor): New function.
9230 (struct grub_console_term.getcolor): New variable.
9231 * term/i386/pc/console.c (grub_console_getcolor): New function.
9232 (struct grub_console_term.getcolor): New variable.
9233 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9234 (struct grub_console_term.getcolor): New variable.
9235
9236 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9237 (struct grub_console_term.setcolor): Remove variable.
9238 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9239 (struct grub_console_term.setcolor): Remove variable.
9240 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9241 (struct grub_console_term.setcolor): Remove variable.
9242 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9243 (struct grub_console_term.setcolor): Remove variable.
9244
4931827f 92452007-12-25 Robert Millan <rmh@aybabtu.com>
9246
9247 * configure.ac: Search for possible unifont.hex locations, and
9248 define UNIFONT_HEX if found.
9249
9250 * Makefile.in (UNIFONT_HEX): Define variable.
9251 (DATA): Rename to ...
9252 (PKGLIB): ... this. Update all users.
9253 (PKGDATA): New variable.
9254 (pkgdata_IMAGES): Rename to ...
9255 (pkglib_IMAGES): ... this. Update all users.
9256 (pkgdata_MODULES): Rename to ...
9257 (pkglib_MODULES): ... this. Update all users.
9258 (pkgdata_PROGRAMS): Rename to ...
9259 (pkglib_PROGRAMS): ... this. Update all users.
9260 (pkgdata_DATA): Rename to ...
9261 (pkglib_DATA): ... this. Update all users.
9262 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9263 (unicode.pff, ascii.pff): New rules.
9264 (all-local): Add `$(PKGDATA)' dependency.
9265 (install-local): Process `$(PKGDATA)'.
9266
9267 * util/update-grub_lib.in (font_path): Search for *.pff files in
9268 a few more locations, including `${pkgdata}'.
9269
57e57e31 92702007-12-23 Robert Millan <rmh@aybabtu.com>
9271
9272 Patch from Bean <bean123ch@gmail.com>:
9273 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9274 `size'.
9275
4bc72aa9 92762007-12-21 Bean <bean123ch@gmail.com>
9277
9278 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9279 (ntfscomp_mod_SOURCES): New variable.
9280 (ntfscomp_mod_CFLAGS): Likewise.
9281 (ntfscomp_mod_LDFLAGS): Likewise.
9282
9283 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9284 (grub_probe_SOURCES): Likewise.
9285 (grub_emu_SOURCES): Likewise.
9286
9287 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9288 (grub_emu_SOURCES): Likewise.
9289
9290 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9291 (grub_emu_SOURCES): Likewise.
9292
9293 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9294 (grub_emu_SOURCES): Likewise.
9295
9296 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9297 (read_run_list): Renamed to grub_ntfs_read_run_list.
9298 (decomp_nextvcn): Moved to ntfscomp.c.
9299 (decomp_getch): Likewise.
9300 (decomp_get16): Likewise.
9301 (decomp_block): Likewise.
9302 (read_block): Likewise.
9303 (read_data): Partially moved to ntfscomp.c.
9304 (fixup): Change unsigned to grub_uint16_t.
9305 (read_mft): Change unsigned long to grub_uint32_t.
9306 (read_attr): Likewise.
9307 (read_data): Likewise.
9308 (read_run_data): Likewise.
9309 (read_run_list): Likewise.
9310 (read_mft): Likewise.
9311
9312 * fs/ntfscomp.c: New file.
9313
9314 * include/grub/ntfs.h: New file.
9315
af680a87 93162007-12-16 Robert Millan <rmh@aybabtu.com>
9317
9318 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9319 IDE disk check, since Linux is known to support 20 IDE disks.
9320 Reported by Colin Watson.
9321
84be7599 93222007-12-15 Bean <bean123ch@gmail.com>
9323
9324 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9325 (lnxboot_img_SOURCES): New variable.
9326 (lnxboot_img_ASFLAGS): Likewise.
9327 (lnxboot_img_LDFLAGS): Likewise.
9328
9329 * boot/i386/pc/lnxboot.S: New file.
9330
6af9db01 93312007-11-24 Pavel Roskin <proski@gnu.org>
9332
9333 * configure.ac: Test if '--build-id=none' is supported by the
9334 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9335 objcopy to generate incorrect binary files (binutils
9336 2.17.50.0.18-1 as shipped by Fedora 8).
9337 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9338 linking, so that build ID doesn't break the test.
9339
7361cfe6 93402007-11-24 Pavel Roskin <proski@gnu.org>
9341
9342 * include/grub/i386/time.h: use "void" in the argument list
9343 of grub_cpu_idle().
9344 * include/grub/powerpc/time.h: Likewise.
9345 * include/grub/sparc64/time.h: Likewise.
9346
1593e10c 93472007-11-18 Christian Franke <franke@computer.org>
9348
9349 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9350 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9351 This fixes the problem that function keys did not work in grub-emu.
9352
3b8db1a8 93532007-11-18 Christian Franke <franke@computer.org>
9354
9355 * disk/host.c (grub_host_open): Remove attribute unused from
9356 name parameter. Add check for "host". This fixes the problem
9357 that grub-emu does not find partitions.
9358
2e29408d 93592007-11-18 Christian Franke <franke@computer.org>
9360
9361 * util/hostfs.c (is_dir): New function.
9362 (grub_hostfs_dir): Handle missing dirent.d_type case.
9363 (grub_hostfs_read): Add missing fseek().
9364 (grub_hostfs_label): Clear label pointer. This fixes a crash
9365 of grub-emu on "ls (host)".
9366
398cd047 93672007-11-18 Christian Franke <franke@computer.org>
9368
9369 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9370 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9371 to 64 bit boundary by default.
9372
c405c391 93732007-11-18 Bean <bean123ch@gmail.com>
9374
9375 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9376 (hexdump_mod_SOURCES): New variable.
9377 (hexdump_mod_CFLAGS): Likewise.
9378 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 9379
c405c391 9380 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9381
9382 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9383
9384 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9385
9386 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9387
9388 * include/grub/hexdump.h: New file.
9389
9390 * commands/hexdump.c: New file.
9391
5cced7fd 93922007-11-10 Robert Millan <rmh@aybabtu.com>
9393
9394 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9395 in grub_outb() calls.
9396 (beep_on): Likewise.
9397
8b714eb0 93982007-11-10 Christian Franke <franke@computer.org>
9399
9400 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9401 (grub_menu_run): Likewise.
9402
ce0f1839 94032007-11-10 Robert Millan <rmh@aybabtu.com>
9404
9405 * include/grub/i386/efi/machine.h: New file.
9406 * include/grub/i386/linuxbios/machine.h: Likewise.
9407 * include/grub/i386/pc/machine.h: Likewise.
9408 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9409 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9410
9411 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9412 (serial_hw_io_addr): New variable.
9413 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9414 instead of `(unsigned short *) 0x400'.
9415
270c237d 94162007-11-10 Bean <bean123ch@gmail.com>
9417
9418 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9419
a87783bf 94202007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9421
9422 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9423 (vga_mod_SOURCES): Added.
9424 (vga_mod_CFLAGS): Likewise.
9425 (vga_mod_LDFLAGS): Likewise.
9426
9427 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9428 grub_outb() calls.
9429 (set_map_mask): Likewise.
9430 (set_read_map): Likewise.
9431 (set_read_address): Likewise.
9432 (vga_font): Removed variable.
9433 (get_vga_glyph): Removed function.
9434 (invalidate_char): Likewise.
9435 (write_char): Changed to use grub_font_get_glyph() for font
9436 information.
9437 (grub_vga_putchar): Likewise.
9438 (grub_vga_getcharwidth): Likewise.
9439
6433b448 94402007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9441
9442 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9443 flags.
9444 (pxeboot_img_LDFLAGS): Likewise.
9445 (diskboot_img_LDFLAGS): Likewise.
9446 (kernel_img_LDFLAGS): Likewise.
9447
49178511 94482007-11-06 Robert Millan <rmh@aybabtu.com>
9449
9450 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9451 in grub_outb() calls.
9452 (serial_hw_init): Likewise.
9453
53b052de 94542007-11-05 Robert Millan <rmh@aybabtu.com>
9455
9456 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9457 spaces. Skip non-regular files.
9458
5ab33bba 94592007-11-05 Robert Millan <rmh@aybabtu.com>
9460
9461 * kern/disk.c (grub_disk_firmware_fini)
9462 (grub_disk_firmware_is_tainted): New variables.
9463
9464 * include/grub/disk.h (grub_disk_firmware_fini)
9465 (grub_disk_firmware_is_tainted): Likewise.
9466
9467 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9468 (grub_disk_biosdisk_fini): ... to here.
9469 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9470 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9471 is set. Register grub_disk_biosdisk_fini() in
9472 `grub_disk_firmware_fini'.
9473
9474 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9475 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9476 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9477 to finish existing firmware disk interface.
9478
9479 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9480 (ata_mod_SOURCES): New variable.
9481 (ata_mod_CFLAGS): Likewise.
9482 (ata_mod_LDFLAGS): Likewise.
9483
0149ab7c 94842007-11-05 Robert Millan <rmh@aybabtu.com>
9485
9486 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9487 (grub_ata_wait): Reimplement using grub_millisleep().
9488
9489 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9490 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9491
be7ac41e 94922007-11-03 Marco Gerards <marco@gnu.org>
9493
9494 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9495 (CRTC_ADDR_PORT): New macro.
9496 (CRTC_DATA_PORT): Likewise.
9497 (CRTC_CURSOR): Likewise.
9498 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9499 (CRTC_CURSOR_ADDR_LOW): Likewise.
9500 (update_cursor): New function.
9501 (grub_console_real_putchar): Call `update_cursor'.
9502 (grub_console_gotoxy): Likewise.
9503 (grub_console_cls): Set the default color when clearing the
9504 screen.
9505 (grub_console_setcursor): Implemented.
9506
bb06ab2e 95072007-11-03 Marco Gerards <marco@gnu.org>
9508
9509 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9510 become activate.
9511 (grub_ata_pio_write): Likewise.
9512
9513 (grub_atapi_identify): Wait after issuing an ATA command.
9514 (grub_atapi_packet): Likewise.
9515 (grub_ata_identify): Likewise.
9516 (grub_ata_readwrite): Likewise.
9517
cf8f780b 95182007-11-03 Marco Gerards <marco@gnu.org>
9519
9520 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9521 (grub_ata_pio_write): Likewise.
9522 (grub_ata_readwrite): Use `grub_error', instead of
9523 returning `grub_errno'.
9524
ed649e54 95252007-11-03 Marco Gerards <marco@gnu.org>
9526
9527 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9528 grub_ata_pio_write once for every single sector, instead of for
9529 multiple sectors.
9530
ca25d8f0 95312007-10-31 Robert Millan <rmh@aybabtu.com>
9532
9533 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9534
9535 * conf/i386-linuxbios.rmk: New file.
9536
9537 * kern/i386/pc/hardware.c: Likewise.
9538 * term/i386/pc/at_keyboard.c: Likewise.
9539 * term/i386/pc/vga_text.c: Likewise.
9540
9541 * include/grub/i386/linuxbios/boot.h: Likewise.
9542 * include/grub/i386/linuxbios/console.h: Likewise.
9543 * include/grub/i386/linuxbios/init.h: Likewise.
9544 * include/grub/i386/linuxbios/kernel.h: Likewise.
9545 * include/grub/i386/linuxbios/loader.h: Likewise.
9546 * include/grub/i386/linuxbios/memory.h: Likewise.
9547 * include/grub/i386/linuxbios/serial.h: Likewise.
9548 * include/grub/i386/linuxbios/time.h: Likewise.
9549
9550 * kern/i386/linuxbios/init.c: Likewise.
9551 * kern/i386/linuxbios/startup.S: Likewise.
9552 * kern/i386/linuxbios/table.c: Likewise.
9553
e911ecc1 95542007-10-31 Marco Gerards <marco@gnu.org>
9555
9556 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9557 (ata_mod_SOURCES): New variable.
9558 (ata_mod_CFLAGS): Likewise.
9559 (ata_mod_LDFLAGS): Likewise.
9560
9561 * disk/ata.c: New file.
9562
9563 * include/grub/disk.h (grub_disk_dev_id): Add
9564 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 9565
7f66d0e0 95662007-10-31 Robert Millan <rmh@aybabtu.com>
9567
9568 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9569 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9570
9571 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9572 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9573
9574 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9575 `<grub/types.h>'.
9576
9577 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9578
5cd7dd46 95792007-10-27 Robert Millan <rmh@aybabtu.com>
9580
3236ca65 9581 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 9582
2ebfc90f 95832007-10-22 Robert Millan <rmh@aybabtu.com>
9584
9585 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9586 `"../realmode.S"'.
9587 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9588
73fcb0f3 95892007-10-22 Robert Millan <rmh@aybabtu.com>
9590
9591 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9592 (pkgdata_MODULES): Add `biosdisk.mod'.
9593 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9594 variables.
9595
9596 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9597 (grub_biosdisk_init): Replace with ...
9598 (GRUB_MOD_INIT(biosdisk)): ... this.
9599 (grub_biosdisk_fini): Replace with ...
9600 (GRUB_MOD_FINI(biosdisk)): ... this.
9601
9602 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9603 (grub_machine_init): Remove call to grub_biosdisk_init().
9604 (grub_machine_fini): Remove call to grub_machine_fini().
9605
9606 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9607
3381d274 96082007-10-22 Robert Millan <rmh@aybabtu.com>
9609
9610 * include/grub/time.h: New file.
9611 * include/grub/i386/time.h: Likewise.
9612 * include/grub/powerpc/time.h: Likewise.
9613 * include/grub/sparc64/time.h: Likewise.
9614
9615 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9616 instances to ...
9617 (KERNEL_MACHINE_TIME_HEADER): ... this.
9618 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9619 instances to ...
9620 (KERNEL_MACHINE_TIME_HEADER): ... this.
9621 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9622 instances to ...
9623 (KERNEL_MACHINE_TIME_HEADER): ... this.
9624
9625 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9626 (grub_millisleep): New function.
9627 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9628 (grub_millisleep): New function.
9629 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9630 Remove `grub/machine/time.h' include.
9631 (grub_millisleep): New function.
9632 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9633 Remove `grub/machine/time.h' include.
9634 (grub_millisleep): New function.
9635
9636 * include/grub/misc.h (grub_div_roundup): New function.
9637
9638 * kern/misc.c: Include `<grub/time.h>'.
9639 (grub_millisleep_generic): New function.
9640
9641 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9642 Add `time.h'.
9643 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9644 Add `time.h'.
9645 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9646 `machine/time.h'. Add `time.h'.
9647 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9648
a39a0312 96492007-10-21 Robert Millan <rmh@aybabtu.com>
9650
9651 * include/grub/misc.h (grub_max): New function.
9652
2aad70e2 96532007-10-21 Robert Millan <rmh@aybabtu.com>
9654
9655 * util/misc.c (grub_util_info): Call fflush() before returning.
9656
54b71c4b 96572007-10-20 Robert Millan <rmh@aybabtu.com>
9658
9659 * genmk.rb (Image): Copy `extra_flags' from here ...
9660 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9661
9662 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9663 to `argc' and `args' arguments.
9664
a979f513 96652007-10-17 Robert Millan <rmh@aybabtu.com>
9666
9667 * kern/i386/loader.S: New file.
9668
9669 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9670 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9671 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9672 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9673 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9674 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9675 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9676 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9677 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9678 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9679 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9680 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9681 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9682 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9683
9684 * kern/i386/realmode.S: New file.
9685
9686 * kern/i386/pc/startup.S (protstack): Moved from here ...
9687 * kern/i386/realmode.S (protstack)... to here.
9688 * kern/i386/pc/startup.S (gdt): Moved from here ...
9689 * kern/i386/realmode.S (gdt)... to here.
9690 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9691 * kern/i386/realmode.S (prot_to_real)... to here.
9692
9693 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9694 `kern/i386/realmode.S'.
9695
825fc8fd 96962007-10-17 Robert Millan <rmh@aybabtu.com>
9697
9698 * include/grub/i386/loader.h: New file.
9699
9700 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9701 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9702 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9703 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9704 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9705 * include/grub/i386/loader.h (grub_linux_prot_size)
9706 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9707 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9708 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9709 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9710
9711 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9712
e179b2f4 97132007-10-15 Robert Millan <rmh@aybabtu.com>
9714
9715 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9716 filesystem when dev->disk is unset.
9717 Do probe for filesystem even when dev->disk->has_partitions is set.
9718 In case a filesystem is found, always report it.
9719 In case it isn't, if dev->disk->has_partitions is set, report that
9720 a partition table was found instead of reporting that no filesystem
9721 could be identified.
9722
5db82af6 97232007-10-12 Robert Millan <rmh@aybabtu.com>
9724
9725 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9726 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9727
68f6ac74 9728 * include/grub/types.h (grub_host_to_target16): New macro.
9729 (grub_host_to_target32): Likewise.
9730 (grub_host_to_target64): Likewise.
9731 (grub_target_to_host16): Likewise.
9732 (grub_target_to_host32): Likewise.
9733 (grub_target_to_host64): Likewise.
5db82af6 9734
9735 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9736 Renamed from to ...
9737 (GRUB_MOD_ALIGN): ...this. Update all users.
9738
68f6ac74 9739 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9740 grub_host_to_target32.
9741 Replace grub_be_to_cpu32 with grub_target_to_host32.
9742 (load_modules): Likewise.
9743 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9744 Replace grub_be_to_cpu32 with grub_target_to_host32.
9745 Replace grub_cpu_to_be16 with grub_host_to_target16.
9746 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 9747
3cf497cc 97482007-10-12 Robert Millan <rmh@aybabtu.com>
9749
9750 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9751 * util/elf/grub-mkimage.c: ... here.
9752
9753 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9754 `util/powerpc/ieee1275/grub-mkimage.c'.
9755
c8cc3692 97562007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 9757
c8cc3692 9758 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9759 and make it easier to figure out.
9760 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9761 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9762 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9763 leave us with less than HEAP_MIN_SIZE total heap.
9764 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 9765
5c58b791 97662007-10-03 Robert Millan <rmh@aybabtu.com>
9767
9768 * include/grub/i386/io.h: New file.
9769 * commands/i386/pc/play.c (inb): Removed.
9770 (outb): Removed.
9771 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9772 with grub_outb().
afcd2ef8 9773 * term/i386/pc/serial.c (inb): Removed.
9774 (outb): Removed.
9775 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9776 with grub_outb().
9777 * term/i386/pc/vga.c (inb): Removed.
9778 (outb): Removed.
9779 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9780 with grub_outb().
5c58b791 9781
1a477ed6 97822007-10-02 Robert Millan <rmh@aybabtu.com>
9783
9784 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9785 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9786 Reported by Marcin Kurek.
9787
6b5d80fa 97882007-09-07 Robert Millan <rmh@aybabtu.com>
9789
9790 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9791 SmartFirmware version updates (as released by Sven Luther), and avoid
9792 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9793 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9794 known broken.
9795
5618afbf 97962007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9797
9798 From Hitoshi Ozeki:
9799 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9800 when merging two regions.
9801
6139dcd9 98022007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9803
508e39ee 9804 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9805 * normal/completion.c (grub_normal_do_completion): Likewise.
9806 Reported by Hitoshi Ozeki.
9807
98082007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9809
6139dcd9 9810 Do not use devices at boot in chainloading.
f19dbdb7 9811
6139dcd9 9812 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9813 (boot_part_addr): Likewise.
9814 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9815 with BOOT_DRIVE and BOOT_PART_ADDR.
9816 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9817 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9818
38da6516 98192007-08-29 Robert Millan <rmh@aybabtu.com>
9820
9821 Patch from Simon Peter <dn.tlp@gmx.net>:
9822 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9823 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9824 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9825 util/i386/pc/grub-setup.c_DEPENDENCIES.
9826 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9827 util/grub-probe.c_DEPENDENCIES.
9828 * conf/powerpc-ieee1275.rmk: Likewise.
9829
29d0928c 98302007-08-28 Robert Millan <rmh@aybabtu.com>
9831
9832 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9833 to tell grub-mkdevicemap how to name devices.
9834 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9835 feature).
9836
9837 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9838 util/i386/get_disk_name.c.
9839 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9840 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9841 util/ieee1275/get_disk_name.c.
9842
9843 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9844
9845 * DISTLIST: Add util/i386/get_disk_name.c and
9846 util/ieee1275/get_disk_name.c.
9847
9848 * util/grub-mkdevicemap.c: Replace device naming logic with
9849 grub_util_get_disk_name() calls.
9850
5a0d3cca 98512007-08-20 Robert Millan <rmh@aybabtu.com>
9852
9853 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9854 (so that it works for both plural and singular quantities).
9855
8b72db2f 98562007-08-05 Robert Millan <rmh@aybabtu.com>
9857
9858 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9859 so that [xz] isn't taken into account when determining order.
9860
352466bf 98612007-08-02 Marco Gerards <marco@gnu.org>
9862
9863 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9864 `include/multiboot2.h', `include/grub/elfload.h',
9865 `include/multiboot.h', `include/grub/multiboot.h',
9866 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9867 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9868 `kern/elf.c', `loader/multiboot_loader.c',
9869 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9870 `loader/i386/pc/multiboot2.c',
9871 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9872 `util/i386/pc/grub-mkrescue.in'. Remove
9873 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9874 `include/grub/i386/pc/util/biosdisk.h' and
9875 `include/grub/powerpc/ieee1275/multiboot.h'.
9876
8f096014 98772007-08-02 Bean <bean123ch@gmail.com>
9878
9879 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9880 (ntfs_mod_SOURCES): New variable.
9881 (ntfs_mod_CFLAGS): Likewise.
9882 (ntfs_mod_LDFLAGS): Likewise.
9883
9884 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9885 (grub_probe_SOURCES): Likewise.
9886 (grub_emu_SOURCES): Likewise.
9887
9888 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9889 (grub_emu_SOURCES): Likewise.
9890
9891 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9892 (grub_emu_SOURCES): Likewise.
f19dbdb7 9893
8f096014 9894 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9895
9896 * fs/ntfs.c: New file.
9897
9959f7db 98982007-08-02 Bean <bean123ch@gmail.com>
9899
9900 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9901
9902 * file.h (grub_file): Likewise.
9903
9904 * fshelp.h (grub_fshelp_read_file): Likewise.
9905
9906 * util/i386/pc/grub-setup.c (setup): Likewise.
9907 (save_first_sector): Likewise.
9908 (save_blocklists): Likewise.
f19dbdb7 9909
9959f7db 9910 * fs/affs.c (grub_affs_read_file): Likewise.
9911
9912 * fs/ext2.c (grub_ext2_read_file): Likewise.
9913
9914 * fs/fat.c (grub_fat_read_data): Likewise.
9915
9916 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9917
9918 * fs/hfs.c (grub_hfs_read_file): Likewise.
9919
9920 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9921
9922 * fs/jfs.c (grub_jfs_read_file): Likewise.
9923
9924 * fs/minix.c (grub_minix_read_file): Likewise.
9925
9926 * fs/sfs.c (grub_sfs_read_file): Likewise.
9927
9928 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9929
9959f7db 9930 * fs/xfs.c (grub_xfs_read_file): Likewise.
9931
9932 * command/blocklist.c (read_blocklist): Likewise.
9933 (print_blocklist): Likewise.
9934
0a203f83 99352007-08-02 Marco Gerards <marco@gnu.org>
9936
9937 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9938 `util/hostfs.c'.
9939
9940 * disk/host.c: New file.
9941
9942 * util/hostfs.c: Likewise.
9943
9944 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9945 return `GRUB_ERR_BAD_FS'.
9946 * fs/sfs.c (grub_sfs_mount): Likewise.
9947 * fs/xfs.c (grub_xfs_mount): Likewise.
9948
9949 * include/grub/disk.h (enum grub_disk_dev_id): Add
9950 `GRUB_DISK_DEVICE_HOST_ID'.
9951
9952 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9953
e5dfe777 99542007-07-24 Jerone Young <jerone@gmail.com>
9955
f19dbdb7 9956 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9957 modules for compilation.
9958 * conf/powerpc-ieee1275.rmk: Likewise.
9959
9960 * include/multiboot.h: Move multiboot definitions to one file. Rename
9961 many definitions to not get grub specific.
9962 * include/multiboot2.h: Create header with multiboot 2 definitions.
9963 * include/grub/multiboot.h: Header for grub specific function
9964 prototypes and definitions.
9965 * include/grub/multiboot2.h: Likewise.
9966 * include/grub/multiboot_loader.h: Likewise.
9967 * include/grub/i386/pc/multiboot.h: Removed.
9968 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9969
9970 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9971 and 2 to allow for one multiboot and module commands.
9972 * loader/multiboot2.c: Add multiboot2 functionality.
9973 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9974 and definition names.
9975 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9976 2 functions.
9977 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9978 ieee1275 specific multiboot2 code.
9979
9980 * kern/i386/pc/startup.S: Change headers and definition names for
9981 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9982
daf0f0ba 99832007-07-22 Robert Millan <rmh@aybabtu.com>
9984
9985 * geninitheader.sh: Process file specified in first parameter rather
9986 than hardcoding grub_modules_init.lst.
fe6b695a 9987 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 9988 than hardcoding grub_modules_init.h.
9989
9990 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9991 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9992 grub_probe_init.[ch] and grub_setup_init.[ch].
9993
9994 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9995 grub_modules_init.h with grub_emu_init.h.
9996 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9997 grub_probe_init.[ch] files.
9998 * conf/i386-efi.rmk: Likewise.
9999 * conf/i386-pc.rmk: Likewise.
10000 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10001 grub_setup_init.[ch] files.
10002
10003 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10004 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10005 to initialize modules rather than a list of hardcoded functions.
10006 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10007 grub_init_all() to initialize modules rather than a list of hardcoded
10008 functions.
10009
54cdc1cc 100102007-07-22 Robert Millan <rmh@aybabtu.com>
10011
10012 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10013 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10014
ad0686cc 100152007-07-22 Robert Millan <rmh@aybabtu.com>
10016
10017 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10018 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10019 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10020 flag when running on SmartFirmware.
10021 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10022 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10023 was set.
10024
10025 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10026 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10027 rather than decreasing it.
10028
10029 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10030 there's not enough space to do it, fail in the same way as when it
10031 can't be done because there are no partitions.
10032
10033 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10034 when nvsetenv failed.
10035
969c02ec 100362007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10037
10038 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10039 because this rule is automatically generated.
10040 (grub-mkrescue): Removed for the same reason as above.
10041
5a79f472 100422007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10043
10044 Migrate to GNU General Public License Version 3.
f19dbdb7 10045
5a79f472 10046 * COPYING: Replaced with the plain text version of GPLv3.
10047
10048 * config.guess: Updated from gnulib.
10049 * config.sub: Likewise.
10050
10051 * geninit.sh: Output a GPLv3 copyright notice.
10052 * geninitheader.sh: Likewise.
10053 * genmodsrc.sh: Likewise.
10054 * gensymlist.sh.in: Likewise.
10055
10056 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10057 * boot/i386/pc/diskboot.S: Likewise.
10058 * boot/i386/pc/pxeboot.S: Likewise.
10059 * commands/blocklist.c: Likewise.
10060 * commands/boot.c: Likewise.
10061 * commands/cat.c: Likewise.
10062 * commands/cmp.c: Likewise.
10063 * commands/configfile.c: Likewise.
10064 * commands/echo.c: Likewise.
10065 * commands/help.c: Likewise.
10066 * commands/ls.c: Likewise.
10067 * commands/search.c: Likewise.
10068 * commands/terminal.c: Likewise.
10069 * commands/test.c: Likewise.
10070 * commands/videotest.c: Likewise.
10071 * commands/i386/cpuid.c: Likewise.
10072 * commands/i386/pc/halt.c: Likewise.
10073 * commands/i386/pc/play.c: Likewise.
10074 * commands/i386/pc/reboot.c: Likewise.
10075 * commands/i386/pc/vbeinfo.c: Likewise.
10076 * commands/i386/pc/vbetest.c: Likewise.
10077 * commands/ieee1275/halt.c: Likewise.
10078 * commands/ieee1275/reboot.c: Likewise.
10079 * commands/ieee1275/suspend.c: Likewise.
10080 * disk/loopback.c: Likewise.
10081 * disk/lvm.c: Likewise.
10082 * disk/raid.c: Likewise.
10083 * disk/efi/efidisk.c: Likewise.
10084 * disk/i386/pc/biosdisk.c: Likewise.
10085 * disk/ieee1275/ofdisk.c: Likewise.
10086 * font/manager.c: Likewise.
10087 * fs/affs.c: Likewise.
10088 * fs/ext2.c: Likewise.
10089 * fs/fat.c: Likewise.
10090 * fs/fshelp.c: Likewise.
10091 * fs/hfs.c: Likewise.
10092 * fs/hfsplus.c: Likewise.
10093 * fs/iso9660.c: Likewise.
10094 * fs/jfs.c: Likewise.
10095 * fs/minix.c: Likewise.
10096 * fs/sfs.c: Likewise.
10097 * fs/ufs.c: Likewise.
10098 * fs/xfs.c: Likewise.
10099 * hello/hello.c: Likewise.
10100 * include/grub/acorn_filecore.h: Likewise.
10101 * include/grub/arg.h: Likewise.
10102 * include/grub/bitmap.h: Likewise.
10103 * include/grub/boot.h: Likewise.
10104 * include/grub/cache.h: Likewise.
10105 * include/grub/device.h: Likewise.
10106 * include/grub/disk.h: Likewise.
10107 * include/grub/dl.h: Likewise.
10108 * include/grub/elfload.h: Likewise.
10109 * include/grub/env.h: Likewise.
10110 * include/grub/err.h: Likewise.
10111 * include/grub/file.h: Likewise.
10112 * include/grub/font.h: Likewise.
10113 * include/grub/fs.h: Likewise.
10114 * include/grub/fshelp.h: Likewise.
10115 * include/grub/gzio.h: Likewise.
10116 * include/grub/hfs.h: Likewise.
10117 * include/grub/kernel.h: Likewise.
10118 * include/grub/loader.h: Likewise.
10119 * include/grub/lvm.h: Likewise.
10120 * include/grub/misc.h: Likewise.
10121 * include/grub/mm.h: Likewise.
10122 * include/grub/net.h: Likewise.
10123 * include/grub/normal.h: Likewise.
10124 * include/grub/parser.h: Likewise.
10125 * include/grub/partition.h: Likewise.
10126 * include/grub/pc_partition.h: Likewise.
10127 * include/grub/raid.h: Likewise.
10128 * include/grub/rescue.h: Likewise.
10129 * include/grub/script.h: Likewise.
10130 * include/grub/setjmp.h: Likewise.
10131 * include/grub/symbol.h: Likewise.
10132 * include/grub/term.h: Likewise.
10133 * include/grub/terminfo.h: Likewise.
10134 * include/grub/tparm.h: Likewise.
10135 * include/grub/types.h: Likewise.
10136 * include/grub/video.h: Likewise.
10137 * include/grub/efi/api.h: Likewise.
10138 * include/grub/efi/chainloader.h: Likewise.
10139 * include/grub/efi/console.h: Likewise.
10140 * include/grub/efi/console_control.h: Likewise.
10141 * include/grub/efi/disk.h: Likewise.
10142 * include/grub/efi/efi.h: Likewise.
10143 * include/grub/efi/pe32.h: Likewise.
10144 * include/grub/efi/time.h: Likewise.
10145 * include/grub/i386/linux.h: Likewise.
10146 * include/grub/i386/setjmp.h: Likewise.
10147 * include/grub/i386/types.h: Likewise.
10148 * include/grub/i386/efi/kernel.h: Likewise.
10149 * include/grub/i386/efi/loader.h: Likewise.
10150 * include/grub/i386/efi/time.h: Likewise.
10151 * include/grub/i386/pc/biosdisk.h: Likewise.
10152 * include/grub/i386/pc/boot.h: Likewise.
10153 * include/grub/i386/pc/chainloader.h: Likewise.
10154 * include/grub/i386/pc/console.h: Likewise.
10155 * include/grub/i386/pc/init.h: Likewise.
10156 * include/grub/i386/pc/kernel.h: Likewise.
10157 * include/grub/i386/pc/loader.h: Likewise.
10158 * include/grub/i386/pc/memory.h: Likewise.
10159 * include/grub/i386/pc/multiboot.h: Likewise.
10160 * include/grub/i386/pc/serial.h: Likewise.
10161 * include/grub/i386/pc/time.h: Likewise.
10162 * include/grub/i386/pc/vbe.h: Likewise.
10163 * include/grub/i386/pc/vbeblit.h: Likewise.
10164 * include/grub/i386/pc/vbefill.h: Likewise.
10165 * include/grub/i386/pc/vbeutil.h: Likewise.
10166 * include/grub/i386/pc/vga.h: Likewise.
10167 * include/grub/ieee1275/ieee1275.h: Likewise.
10168 * include/grub/ieee1275/ofdisk.h: Likewise.
10169 * include/grub/powerpc/libgcc.h: Likewise.
10170 * include/grub/powerpc/setjmp.h: Likewise.
10171 * include/grub/powerpc/types.h: Likewise.
10172 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10173 * include/grub/powerpc/ieee1275/console.h: Likewise.
10174 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10175 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10176 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10177 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10178 * include/grub/powerpc/ieee1275/time.h: Likewise.
10179 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10180 * include/grub/sparc64/libgcc.h: Likewise.
10181 * include/grub/sparc64/setjmp.h: Likewise.
10182 * include/grub/sparc64/types.h: Likewise.
10183 * include/grub/sparc64/ieee1275/console.h: Likewise.
10184 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10185 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10186 * include/grub/sparc64/ieee1275/time.h: Likewise.
10187 * include/grub/util/biosdisk.h: Likewise.
10188 * include/grub/util/getroot.h: Likewise.
10189 * include/grub/util/lvm.h: Likewise.
10190 * include/grub/util/misc.h: Likewise.
10191 * include/grub/util/raid.h: Likewise.
10192 * include/grub/util/resolve.h: Likewise.
10193 * io/gzio.c: Likewise.
10194 * kern/device.c: Likewise.
10195 * kern/disk.c: Likewise.
10196 * kern/dl.c: Likewise.
10197 * kern/elf.c: Likewise.
10198 * kern/env.c: Likewise.
10199 * kern/err.c: Likewise.
10200 * kern/file.c: Likewise.
10201 * kern/fs.c: Likewise.
10202 * kern/loader.c: Likewise.
10203 * kern/main.c: Likewise.
10204 * kern/misc.c: Likewise.
10205 * kern/mm.c: Likewise.
10206 * kern/parser.c: Likewise.
10207 * kern/partition.c: Likewise.
10208 * kern/rescue.c: Likewise.
10209 * kern/term.c: Likewise.
10210 * kern/efi/efi.c: Likewise.
10211 * kern/efi/init.c: Likewise.
10212 * kern/efi/mm.c: Likewise.
10213 * kern/i386/dl.c: Likewise.
10214 * kern/i386/efi/init.c: Likewise.
10215 * kern/i386/efi/startup.S: Likewise.
10216 * kern/i386/pc/init.c: Likewise.
10217 * kern/i386/pc/lzo1x.S: Likewise.
10218 * kern/i386/pc/startup.S: Likewise.
10219 * kern/ieee1275/ieee1275.c: Likewise.
10220 * kern/powerpc/cache.S: Likewise.
10221 * kern/powerpc/dl.c: Likewise.
10222 * kern/powerpc/ieee1275/cmain.c: Likewise.
10223 * kern/powerpc/ieee1275/crt0.S: Likewise.
10224 * kern/powerpc/ieee1275/init.c: Likewise.
10225 * kern/powerpc/ieee1275/openfw.c: Likewise.
10226 * kern/sparc64/cache.S: Likewise.
10227 * kern/sparc64/dl.c: Likewise.
10228 * kern/sparc64/ieee1275/init.c: Likewise.
10229 * kern/sparc64/ieee1275/openfw.c: Likewise.
10230 * loader/efi/chainloader.c: Likewise.
10231 * loader/efi/chainloader_normal.c: Likewise.
10232 * loader/i386/efi/linux.c: Likewise.
10233 * loader/i386/efi/linux_normal.c: Likewise.
10234 * loader/i386/pc/chainloader.c: Likewise.
10235 * loader/i386/pc/chainloader_normal.c: Likewise.
10236 * loader/i386/pc/linux.c: Likewise.
10237 * loader/i386/pc/linux_normal.c: Likewise.
10238 * loader/i386/pc/multiboot.c: Likewise.
10239 * loader/i386/pc/multiboot_normal.c: Likewise.
10240 * loader/powerpc/ieee1275/linux.c: Likewise.
10241 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10242 * normal/arg.c: Likewise.
10243 * normal/cmdline.c: Likewise.
10244 * normal/command.c: Likewise.
10245 * normal/completion.c: Likewise.
10246 * normal/execute.c: Likewise.
10247 * normal/function.c: Likewise.
10248 * normal/lexer.c: Likewise.
10249 * normal/main.c: Likewise.
10250 * normal/menu.c: Likewise.
10251 * normal/menu_entry.c: Likewise.
10252 * normal/misc.c: Likewise.
10253 * normal/parser.y: Likewise.
10254 * normal/script.c: Likewise.
10255 * normal/i386/setjmp.S: Likewise.
10256 * normal/powerpc/setjmp.S: Likewise.
10257 * normal/sparc64/setjmp.S: Likewise.
10258 * partmap/acorn.c: Likewise.
10259 * partmap/amiga.c: Likewise.
10260 * partmap/apple.c: Likewise.
10261 * partmap/gpt.c: Likewise.
10262 * partmap/pc.c: Likewise.
10263 * partmap/sun.c: Likewise.
10264 * term/gfxterm.c: Likewise.
10265 * term/terminfo.c: Likewise.
10266 * term/efi/console.c: Likewise.
10267 * term/i386/pc/console.c: Likewise.
10268 * term/i386/pc/serial.c: Likewise.
10269 * term/i386/pc/vesafb.c: Likewise.
10270 * term/i386/pc/vga.c: Likewise.
10271 * term/ieee1275/ofconsole.c: Likewise.
10272 * util/biosdisk.c: Likewise.
10273 * util/console.c: Likewise.
10274 * util/genmoddep.c: Likewise.
10275 * util/getroot.c: Likewise.
10276 * util/grub-emu.c: Likewise.
10277 * util/grub-mkdevicemap.c: Likewise.
10278 * util/grub-probe.c: Likewise.
10279 * util/lvm.c: Likewise.
10280 * util/misc.c: Likewise.
10281 * util/raid.c: Likewise.
10282 * util/resolve.c: Likewise.
10283 * util/update-grub.in: Likewise.
10284 * util/update-grub_lib.in: Likewise.
10285 * util/grub.d/00_header.in: Likewise.
10286 * util/grub.d/10_hurd.in: Likewise.
10287 * util/grub.d/10_linux.in: Likewise.
10288 * util/i386/efi/grub-install.in: Likewise.
10289 * util/i386/efi/grub-mkimage.c: Likewise.
10290 * util/i386/pc/grub-install.in: Likewise.
10291 * util/i386/pc/grub-mkimage.c: Likewise.
10292 * util/i386/pc/grub-mkrescue.in: Likewise.
10293 * util/i386/pc/grub-setup.c: Likewise.
10294 * util/i386/pc/misc.c: Likewise.
10295 * util/powerpc/ieee1275/grub-install.in: Likewise.
10296 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10297 * util/powerpc/ieee1275/misc.c: Likewise.
10298 * video/bitmap.c: Likewise.
10299 * video/video.c: Likewise.
10300 * video/i386/pc/vbe.c: Likewise.
10301 * video/i386/pc/vbeblit.c: Likewise.
10302 * video/i386/pc/vbefill.c: Likewise.
10303 * video/i386/pc/vbeutil.c: Likewise.
10304 * video/readers/tga.c: Likewise.
10305
3572d015 103062007-07-02 Robert Millan <rmh@aybabtu.com>
10307
10308 * conf/i386-efi.rmk: Replace obsolete reference to
10309 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10310 with util/getroot.c.
10311 * conf/powerpc-ieee1275.rmk: Likewise.
10312 * conf/sparc64-ieee1275.rmk: Likewise.
10313
10314 * util/grub-emu.c (main): Fix unchecked pointer handling.
10315
2c2a681b 103162007-07-02 Robert Millan <rmh@aybabtu.com>
10317
10318 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10319 invocation to fail, in order to support partition-less media.
10320
10321 * util/i386/pc/grub-install.in: Likewise.
10322
10323 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10324 which fs or partmap modules are needed (akin to its sister scripts).
10325
10326 Also use grub-probe to get rid of unportable /proc/mounts check.
10327
10328 Print the same informational message that the other scripts do, before
fe6b695a 10329 exiting.
2c2a681b 10330
6193defe 103312007-06-23 Robert Millan <rmh@aybabtu.com>
10332
fe6b695a 10333 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 10334 a font file can be found and, if so, echo the GRUB path to it.
10335
10336 * util/update-grub.in: Handle multiple terminals depending on user
10337 input, platform availability and font file presence. Propagate
10338 variables of our findings to /etc/grub.d/ children.
10339
10340 * util/grub.d/00_header.in: Handle multiple terminals, based on
10341 environment setup by update-grub.
10342
eface1dc 103432007-06-23 Robert Millan <rmh@aybabtu.com>
10344
ba50d28f 10345 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 10346
bf697e28 103472007-06-21 Robert Millan <rmh@aybabtu.com>
10348
10349 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10350 indicate end of data section in kernel image.
10351 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10352 GRUB_KERNEL_MACHINE_DATA_END.
10353
10354 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10355 space for it.
10356 * kern/i386/efi/startup.S: Likewise.
10357
10358 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10359 during image generation. Implement --prefix option to override this
10360 patch.
10361 * util/i386/efi/grub-mkimage.c: Likewise.
10362
10363 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10364 code to make path relative to its root into a separate function.
10365
10366 * util/i386/pc/grub-install.in: Use newly provided
10367 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10368 pass the result to grub-install --prefix.
10369
baa574b4 103702007-06-13 Robert Millan <rmh@aybabtu.com>
10371
10372 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10373 DEFAULT_DEVICE_MAP.
10374 * util/grub-emu.c: Use above definitions from misc.h instead of
10375 defining them.
10376 * util/grub-mkdevicemap.c: Likewise.
10377 * util/i386/pc/grub-setup.c: Likewise.
10378 * util/grub-probe.c: Likewise.
10379 (probe): Abort with grub_util_error() when either
10380 grub_guess_root_device or grub_util_get_grub_dev fails.
10381
0215dcbf 103822007-06-12 Robert Millan <rmh@aybabtu.com>
10383
10384 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10385 "pager" assignment.
10386 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10387 "pcdata".
10388 * util/grub-probe.c (probe): Likewise for "drive_name".
10389
8af2ab7b 103902007-06-11 Robert Millan <rmh@aybabtu.com>
10391
10392 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10393 not just the cdrom one.
10394
59d31694 103952007-06-11 Robert Millan <rmh@aybabtu.com>
10396
10397 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10398 Add --pkglibdir=DIR option to override pkglibdir.
10399 Mention --image-type=TYPE in help output.
10400 Fix --grub-mkimage (it was a no-op).
fe6b695a 10401 Abort gracefully when no parameter is given.
59d31694 10402
7ee367e4 104032007-06-11 Robert Millan <rmh@aybabtu.com>
10404
10405 * util/i386/pc/grub-mkrescue.in: New file.
10406 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10407 * Makefile.in: Handle bin_SCRIPTS.
10408
29b0ed46 104092007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10410
10411 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10412 list of video modes.
10413
c0f90770 104142007-06-06 Robert Millan <rmh@aybabtu.com>
10415
10416 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10417 file doesn't exist, or if it is in a filesystem grub can't read.
10418
10419 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10420 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10421 header comment to fit in 80 columns when the variables are resolved.
10422
10423 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10424 could be identified by update-grub. Remove redundant check for
fe6b695a 10425 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 10426 handles that).
10427
fb36dc26 104282007-06-04 Robert Millan <rmh@aybabtu.com>
10429
10430 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10431
10432 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10433
10434 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10435
0c68c93e 104362007-06-04 Robert Millan <rmh@aybabtu.com>
10437
10438 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10439
10440 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10441 grub_apple_partition_map_fini.
10442
10443 * util/biosdisk.c
10444 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10445 to access >2 TiB disks).
10446
10447 Print disk->total_sectors with %llu instead of %lu, since this
10448 variable is always 64-bit (prevents wrong disk size from being displayed
10449 on either >2 TiB disk or big-endian CPU).
10450
10451 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10452 into a generic case that supports all (sane) partition maps.
10453
10454 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10455 breaks big-endian.
10456
10457 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10458 and grub_apple_partition_map_fini() after that.
10459
0f23eb74 104602007-06-01 Robert Millan <rmh@aybabtu.com>
10461
10462 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10463
10464 * util/grub.d/00_header.in: Only enable gfxterm when
10465 convert_system_path_to_grub_path() succeeds.
10466
42c71976 104672007-05-20 Robert Millan <rmh@aybabtu.com>
10468
10469 * util/update-grub_lib.in: New file.
10470 * DISTLIST: Add update-grub_lib.in.
10471 * conf/common.rmk: Generate update-grub_lib and install it in
10472 $(lib_DATA).
10473 * Makefile.in: Add install routine for $(lib_DATA).
10474
10475 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10476 function provided by update-grub_lib to support arbitrary paths of
10477 unifont.pff.
10478 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10479 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10480
5beb2291 104812007-05-19 Robert Millan <rmh@aybabtu.com>
10482
10483 * commands/i386/cpuid.c: New module.
10484 * DISTLIST: Add it.
10485 * conf/i386-efi.rmk: Enable cpuid.mod.
10486 * conf/i386-pc.rmk: Likewise.
10487
7262eca1 104882007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10489
10490 * kern/disk.c (grub_disk_read): Check return value of
10491 grub_realloc().
10492
260ba823 104932007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10494
10495 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10496 arrays.
10497 * disk/raid.c (grub_raid_open): Likewise.
10498
1ecb6cf2 104992007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10500
10501 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10502 stack instead of on the heap.
10503
10504 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10505 before doing a read on it.
10506
10507 * configure.ac: Only use -fno-stack-protector for the target
10508 environment.
f19dbdb7 10509
21c8cbb1 105102007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10511
10512 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10513 __attribute_ ((unused)) to mode_type argument.
10514
10515 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 10516
21c8cbb1 10517 * kern/misc.c (memcmp): Fix prototype.
10518
10519 * include/grub/partition.h [GRUB_UTIL]
10520 (grub_gpt_partition_map_init): Add prototype.
10521 (grub_gpt_partition_map_fini): Likewise.
10522
10523 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10524 at the right place.
10525
10526 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10527 (grub_fat_read_data): Likewise.
10528 (grub_fat_find_dir): Likewise.
10529
10530 * font/manager.c (find_glyph): Make table a const.
10531 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 10532
849d55d3 105332007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10534
10535 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10536 code, first search for device in /dev/mapper, then in /dev.
10537 (grub_util_get_grub_dev): New function.
10538 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10539 prototype.
10540 * util/grub-probe.c (probe): Remove check for RAID, call
10541 grub_util_get_grub_dev() instead of
10542 grub_util_biosdisk_get_grub_dev().
10543 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10544 grub_util_biosdisk_get_grub_dev().
10545 * util/i386/pc/grub-setup.c (main): Likewise.
10546
8fff7c2f 105472007-05-16 Robert Millan <rmh@aybabtu.com>
10548
10549 * DISTLIST: Update for the latest changes.
10550 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10551 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10552 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10553 grub/util/biosdisk.h.
10554 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10555 grub/util/biosdisk.h.
10556
48e12b52 105572007-05-16 Robert Millan <rmh@aybabtu.com>
10558
10559 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10560
46b9d128 105612007-05-16 Robert Millan <rmh@aybabtu.com>
10562
10563 * util/i386/efi/grub-install.in: New.
10564 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10565 newly added grub-install.
10566 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10567 include.
10568 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10569 grub/util/biosdisk.h.
10570 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10571 grub/util/biosdisk.h.
10572
2d1a40a9 105732007-05-16 Robert Millan <rmh@aybabtu.com>
10574
10575 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10576 * include/grub/util/biosdisk.h: ... here.
10577 * util/i386/pc/biosdisk.c: Moved to ...
10578 * util/biosdisk.c: ... here.
10579 * util/i386/pc/getroot.c: Moved to ...
10580 * util/getroot.c: ... here.
10581 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10582 * util/grub-mkdevicemap.c: ... here.
10583 * util/i386/pc/grub-probe.c: Moved to ...
10584 * util/grub-probe.c: ... here.
10585
9e26e3bc 105862007-05-15 Robert Millan <rmh@aybabtu.com>
10587
10588 * util/update-grub.in: Remove duplicated line in grub.cfg header
10589 message.
10590
57f96397 105912007-05-13 Robert Millan <rmh@aybabtu.com>
10592
10593 * util/update-grub.in: Fix a few assumptions about the devices holding
10594 /, /boot and /boot/grub being the same.
10595 * util/grub.d/00_header.in: Likewise.
10596 * util/grub.d/10_hurd.in: Likewise.
10597 * util/grub.d/10_linux.in: Likewise.
10598
10599 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10600 patterns. Use that to define the `.old' suffix as older than `'.
10601
10602 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10603
10604 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10605 the grub.cfg header message.
10606
2e610d62 106072007-05-11 Robert Millan <rmh@aybabtu.com>
10608
10609 * util/update-grub.in: Create device.map if it doesn't already exist,
10610 before attempting to run grub-probe.
10611 Check for grub-probe and grub-mkdevicemap with the same code
10612 grub-install is using.
10613 Remove test mode.
10614
3f6a10ef 106152007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10616
10617 * Makefile.in: Add the datarootdir autoconf variable.
10618
02e7b75e 106192007-05-09 Robert Millan <rmh@aybabtu.com>
10620
10621 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 10622 fail gracefully if dev->disk->partition == NULL.
02e7b75e 10623
75f396cc 106242007-05-07 Robert Millan <rmh@aybabtu.com>
10625
10626 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10627 determine partition map module.
10628 * util/i386/pc/grub-install.in: Use this feature to decide which
10629 partition module to load, instead of hardcoding pc and gpt.
10630
da65cb36 106312007-05-07 Robert Millan <rmh@aybabtu.com>
10632
10633 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10634 source directory differs from build directory.
10635
b57d6a91 106362007-05-05 Robert Millan <rmh@aybabtu.com>
10637
10638 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10639 initialisation.
10640
509d00f1 106412007-05-05 Robert Millan <rmh@aybabtu.com>
10642
10643 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10644
c48f23ef 106452007-05-05 Robert Millan <rmh@aybabtu.com>
10646
10647 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10648 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10649
20b97658 106502007-05-05 Robert Millan <rmh@aybabtu.com>
10651
10652 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10653 (grub_probe_SOURCES): Likewise.
10654 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10655 GPT and initialize dos_part and bsd_part accordingly.
10656 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10657 install_bsd_part.
10658 (main): Activate gpt module for use during partition identification,
10659 and deactivate it afterwards.
10660 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10661 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10662 partition identification, and deactivate it afterwards.
10663
99123174 106642007-05-05 Robert Millan <rmh@aybabtu.com>
10665
10666 * term/i386/pc/console.c (grub_console_fini): Call
10667 grub_term_set_current() before grub_term_unregister().
10668
ebd97f6e 106692007-05-04 Robert Millan <rmh@aybabtu.com>
10670
10671 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10672 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10673 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10674 and update-grub_DATA.
10675 * conf/common.rmk: Build and install update-grub components.
10676 * conf/common.mk: Regenerate.
10677 * util/update-grub.in: New. Core of update-grub.
10678 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10679 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10680 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10681 * util/grub.d/README: New. Document grub.d directory layout.
10682
b06a264d 106832007-05-01 Robert Millan <rmh@aybabtu.com>
10684
10685 * util/grub-emu.c: Move initialization functions
10686 grub_util_biosdisk_init() and grub_init_all() before
10687 grub_util_biosdisk_get_grub_dev(), which relies on them.
10688
41f0050e 106892007-04-19 Robert Millan <rmh@aybabtu.com>
10690
10691 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10692 it is used later.
10693
04582bb3 106942007-04-18 Jerone Young <jerone@gmail.com>
10695
f19dbdb7 10696 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 10697 stanza.
10698
08db4632 106992007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 10700
08db4632 10701 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10702 continue on and look for device node with real device name.
10703
801b76be 107042007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 10705
fe6b695a 10706 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 10707 ability.
10708 * Makefile.in: Add autoconf package transformation code.
10709 * util/i386/pc/grub-install.in: Likewise.
10710 * util/powerpc/ieee1275/grub-install.in: Likewise.
10711
6795c4e1 107122007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10713
10714 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10715 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10716 (EXT2_REVISION): Likewise.
10717 (EXT2_INODE_SIZE): Likewise.
10718 (struct grub_ext2_block_group): Added a missing member
10719 "used_dirs".
10720 (grub_ext2_read_inode): Divide by the inode size in a superblock
10721 instead of 128 to obtain INODES_PER_BLOCK.
10722 Use the macro EXT2_INODE_SIZE instead of directly using
10723 SBLOCK->INODE_SIZE.
10724
d70af616 107252007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10726
10727 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10728 superblock instead of the structure size to compute an
10729 offset. This fixes the problem that GRUB could not read a
10730 filesystem when inode size is different from 128-byte.
10731
3b801603 107322007-03-05 Marco Gerards <marco@gnu.org>
10733
10734 * normal/main.c (read_config_file): When "menu" is not set, create
10735 an initial context.
10736
4785bfe4 107372007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10738
10739 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10740 (HEAP_LIMIT): New macro.
10741 (grub_claim_heap): Claim memory up to `heaplimit'.
10742
a0cbb023 107432007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10744
10745 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10746 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10747 (_start): Likewise.
10748 (grub_arch_modules_addr): Return address after `_end'.
10749 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10750 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10751 (add_segments): Calculate `_end' from phdr size and location.
10752 (ALIGN_UP): Moved to ...
10753 * include/grub/misc.h: here.
10754 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10755 New macro.
10756 (GRUB_IEEE1275_MODULE_BASE): Removed.
10757
fd7d8eba 107582007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10759
10760 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10761 loop boundary.
10762
9b09e6fc 107632007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10764
10765 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10766 All users updated.
10767 (grub_elf64_load_hook_t): Likewise.
10768 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10769 debug output.
10770
3ce27299 107712007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10772
10773 * kern/mm.c: Update copyright.
10774 (grub_mm_debug): Correct syntax error.
10775 (grub_mm_dump_free): New function.
10776 (grub_debug_free): Call `grub_free'.
10777 * include/grub/mm.h: Update copyright.
10778 (grub_mm_dump_free): Add declaration.
10779
077d5fee 107802007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10781
10782 * include/grub/ieee1275/ieee1275.h: Update copyright.
10783 * kern/powerpc/ieee1275/init.c: Likewise.
10784 * kern/powerpc/ieee1275/openfw.c: Likewise.
10785
10786 * loader/powerpc/ieee1275/linux.c: Likewise.
10787 * include/grub/elfload.h: Likewise.
10788 * kern/elf.c: Likewise.
10789 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10790 callers.
10791 (grub_elf64_load): Likewise.
10792 (grub_elf32_load_segment): Move to a nested function.
10793 (grub_elf64_load_segment): Likewise.
10794
dc946850 107952007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10796
10797 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10798 prototype.
10799 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10800 (grub_heap_len): Likewise.
10801 (HEAP_SIZE): New macro.
10802 (grub_claim_heap): New function.
10803 (grub_machine_init): Don't claim heap directly. Call
10804 `grub_claim_heap'.
10805 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10806 (grub_available_iterate): New function.
10807
baa2a121 108082007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10809
10810 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10811 * configure.ac: Use it for testing the HOST and TARGET compilers.
10812
4fe9862e 108132006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10814
10815 * Makefile.in (enable_grub_emu): New variable.
10816 * configure.ac (--enable-grub-emu): New option.
10817 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10818 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10819 * conf/i386-pc.rmk: Likewise.
10820 * conf/powerpc-ieee1275.rmk: Likewise.
10821 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10822
a8aa5762 108232006-12-12 Marco Gerards <marco@gnu.org>
10824
10825 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10826
10827 * kern/env.c (grub_env_unset): Don't free the member `value' when
10828 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10829 pointer.
10830
10831 * normal/main.c (current_menu): Removed.
10832 (free_menu): Unset the `menu' environment variable.
10833 (grub_normal_menu_addentry): Make use of the environment variable
10834 `menu', instead of using the global `current_menu'. Allocate
10835 memory for the sourcecode of this entry.
10836 (read_config_file): New argument `nested', changed all callers.
10837 Only in the case of a new context, initialize a new menu. Set the
10838 `menu' environment variable.
10839 (grub_normal_execute): Don't set and unset the environment
10840 variable `menu' here anymore. Only free the menu when leaving the
10841 context.
10842
10843 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10844 leak.
10845
957b3a3e 108462006-12-11 Marco Gerards <marco@gnu.org>
10847
10848 * normal/menu_entry.c (run): Fix off by one bug so the last line
10849 is executed. Move the loader check to outside the loop.
10850
ef875714 108512006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10852
10853 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10854
4e739985 108552006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10856
10857 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10858 the number of sectors. Reported by Andrey Shuvikov
10859 <mr_hyro@yahoo.com>.
f19dbdb7 10860
790707f2 108612006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10862
10863 * kern/disk.c (grub_disk_read): When there is a read error, always
10864 try to read only the necessary data.
f19dbdb7 10865
790707f2 10866 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10867 disk/raid.c.
10868 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10869 prototype.
10870 [GRUB_UTIL] (grub_raid_fini): Likewise.
10871 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10872 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10873 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10874 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10875 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10876 and grub_raid_fini().
f19dbdb7 10877
03e58196 108782006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10879
10880 * include/grub/types.h (__unused): Rename to UNUSED.
10881 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10882 (grub_elf64_size): Likewise.
f19dbdb7 10883
ae4f23bf 108842006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10885
10886 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10887 grub_error_push and grub_error_pop in the error-handling path.
10888 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10889 length.
10890
2166cc83 108912006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10892
10893 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10894 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10895 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10896 (kernel_elf_SOURCES): Likewise.
10897 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10898 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10899 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10900 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10901 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10902 (elf_mod_SOURCES): New variable.
10903 (elf_mod_CFLAGS): Likewise.
10904 (elf_mod_LDFLAGS): Likewise.
10905 * include/grub/types.h (__unused): New macro.
10906 * include/grub/elfload.h: New file.
10907 * kern/elf.c: Likewise.
10908 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10909 (ELF32_LOADMASK): New macro.
10910 (ELF64_LOADMASK): Likewise.
10911 (vmlinux): Removed.
10912 (grub_linux_load32): New function.
10913 (grub_linux_load64): Likewise.
10914 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10915 Use grub_elf_t instead of grub_file_t.
10916
a09d5aa5 109172006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10918
10919 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10920 `catch_result' to struct set_color_args.
10921
d976fc51 109222006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10923
10924 * normal/menu.c: Include grub/script.h.
10925 * normal/menu_entry.c: Likewise.
10926 * include/grub/normal.h: Do not include grub/script.h.
10927
67507549 109282006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10929
10930 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10931
69203a99 109322006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10933
10934 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10935 disk.
10936 (grub_disk_close): Print debug messages when closing a disk.
10937 (grub_disk_read): Print debug messages when disk read fails.
10938 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10939 filesystem type.
10940 * kern/partition.c: Include misc.h.
10941 (grub_partition_iterate): Print debug messages when detecting
10942 partition type.
10943
e2b8278c 109442006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10945
10946 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10947 is negative.
10948 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10949
97b2f2ff 109502006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10951
10952 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10953 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10954
6555d655 109552006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10956
10957 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10958 instead of sizeof(lv). Patch by Michael Guntsche.
10959
4d42b77f 109602006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10961
10962 * disk/lvm.c: Rename VGS to VG_LIST.
10963 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10964 (grub_lvm_open): Likewise.
10965 Thanks to Michael Guntsche for finding this bug.
10966
5d74d927 109672006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10968
10969 * configure.ac (AC_INIT): Bumped to 1.95.
10970
a1bb27e4 109712006-10-14 Robert Millan <rmh@aybabtu.com>
10972
10973 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10974 with "/dev/.static/dev/md".
10975
e0994b8b 109762006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10977
10978 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10979 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10980 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10981 DRIVE_NAME are always freed.
10982
10983 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10984 DOS_PART, as a DOS partition is counted from one instead of zero
10985 now. Reported by Robert Millan.
10986
ddd5cee9 109872006-10-14 Robert Millan <rmh@aybabtu.com>
10988
10989 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10990 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10991 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10992 string returned by grub_guess_root_device.
10993 * util/i386/pc/grub-setup.c: Likewise.
10994 * util/i386/pc/grub-probefs.c: Likewise.
10995
10996 * util/i386/pc/grub-probefs.c: Rename to ...
10997 * util/i386/pc/grub-probe.c: ... this.
10998 * DISTLIST: Remove grub-probefs, add grub-probe.
10999 * conf/i386-efi.rmk: Likewise.
11000 * conf/i386-pc.rmk: Likewise.
11001 * util/i386/pc/grub-install.in: Likewise.
11002
11003 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11004 choose which information we want to print.
11005
2b002173 110062006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11007
11008 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11009 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11010 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11011 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11012 video/readers/tga.c and video/i386/pc/vbeutil.c.
11013
110142006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11015
11016 Added support for RAID and LVM.
f19dbdb7 11017
2b002173 11018 * disk/lvm.c: New file.
11019 * disk/raid.c: Likewise.
11020 * include/grub/lvm.h: Likewise.
f19dbdb7 11021 * include/grub/raid.h: Likewise.
2b002173 11022 * include/grub/util/lvm.h: Likewise.
11023 * include/grub/util/raid.h: Likewise.
11024 * util/lvm.c: Likewise.
11025 * util/raid.c: Likewise.
11026
11027 * include/grub/disk.h (grub_disk_dev_id): Add
11028 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11029 (grub_disk_get_size): New prototype.
11030 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11031 returns a partition.
11032 (grub_disk_get_size): New function.
f19dbdb7 11033
2b002173 11034 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11035 verbatim if grub_install_dos_part is -2.
11036
11037 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11038 and LVM devices.
11039
11040 * util/i386/pc/grub-setup.c (setup): New argument
11041 MUST_EMBED. Force embedding of GRUB when the argument is
11042 true. Close FILE before returning.
11043 (main): Add support for RAID and LVM.
f19dbdb7 11044
2b002173 11045 * conf/common.rmk: Add RAID and LVM modules.
11046 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11047 util/lvm.c.
11048 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11049
11050 * kern/misc.c (grub_strstr): New function.
11051 * include/grub/misc.h (grub_strstr): New prototype.
11052
050548d0 110532006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11054
11055 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11056
da849d2d 110572006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11058
11059 * kern/misc.c (grub_strtoull): Guess the base only if not
11060 specified.
11061
97b2f2ff 110622006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 11063
11064 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11065 PowerMac support.
11066
97b2f2ff 110672006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 11068
11069 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11070
11071 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11072 Remove `flags' argument. All callers changed.
11073 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11074 (IEEE1275_IHANDLE_INVALID): New variable.
11075 (IEEE1275_CELL_INVALID): New variable.
11076 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11077 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11078 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11079 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11080 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11081 codes from Open Firmware. All callers updated.
11082 (grub_ieee1275_next_property): Directly return Open Firmware return
11083 code.
11084 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11085 Standardize error checking from `grub_ieee1275_get_property'.
11086 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11087 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11088
97b2f2ff 110892006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 11090
11091 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11092 `instance_to_package_args' to `instance_to_path_args'.
11093
11094 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11095 `grub_ieee1275_chosen'.
11096
11097 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11098 `grub_ieee1275_interpret'.
11099
97b2f2ff 111002006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 11101
11102 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11103
97b2f2ff 111042006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 11105
11106 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11107 (__cmpdi): Likewise.
11108
11109 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11110 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11111 `grub_ssize_t'.
11112
02bb8acc 11113 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 11114
11115 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11116 to type `grub_ssize_t'.
11117 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11118
7f9a8531 111192006-09-22 Marco Gerards <marco@gnu.org>
11120
11121 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11122 newlines.
11123
b5ef1102 111242006-09-22 Marco Gerards <marco@gnu.org>
11125
11126 * commands/echo.c: New file.
11127
11128 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11129
11130 * conf/common.rmk (echo_mod_SOURCES): New variable.
11131 (echo_mod_CFLAGS): Likewise.
11132 (echo_mod_LDFLAGS): Likewise.
11133
2cff3677 111342006-09-22 Marco Gerards <marco@gnu.org>
11135
11136 * normal/main.c (get_line): Malloc memory instead of using
11137 preallocated memory. Removed the arguments `cmdline' and
11138 `max_len'. Updated all callers.
11139
6ba4688b 111402006-09-22 Marco Gerards <marco@gnu.org>
11141
11142 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11143 (normal_mod_DEPENDENCIES): Likewise.
11144
11145 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11146 (normal_mod_DEPENDENCIES): Likewise.
11147
11148 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11149
e02ac02c 111502006-09-22 Johan Rydberg <jrydberg@gnu.org>
11151
11152 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11153 programs.
11154 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11155 (normal_mod_DEPENDENCIES): Likewise.
11156 * conf/i386-pc.mk: Regenerate.
11157 * conf/i386-efi.mk: Likewise
11158 * conf/common.mk: Likewise.
11159 * conf/powerpc-ieee1275.mk: Likewise.
11160 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11161
8d252e44 111622006-09-22 Robert Millan <rmh@aybabtu.com>
11163
11164 Sync with i386 version.
11165 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11166 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11167
209bf7ac 111682006-09-21 Robert Millan <rmh@aybabtu.com>
11169
11170 Import from GRUB Legacy (lib/device.c):
11171 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11172 (init_device_map) [__linux__]: Add support for I2O devices.
11173
6b146090 111742006-09-14 Marco Gerards <marco@gnu.org>
11175
11176 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11177 `-melf_i386'.
11178
e38600a8 111792006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 11180
11181 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11182 /boot/grub/*.lst.
78fa1790 11183
2952da5d 11184 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 11185
2952da5d 11186 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11187 before adding it to device.map.
11188
01b82a64 111892006-08-15 Johan Rydberg <jrydberg@gnu.org>
11190
fe6b695a 11191 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 11192 compiles a file; using the -MD option.
11193 * conf/common.mk: Regenerate.
11194 * conf/i386-pc.mk: Likewise.
11195 * conf/i386-efi.mk: Likewise.
11196 * conf/powerpc-ieee1275.mk: Likewise.
11197 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11198
1064790d 111992006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11200
11201 Move the prototypes of grub_setjmp and grub_longjmp to
11202 cpu/setjmp.h, so that each architecture may specify different
11203 attributes.
f19dbdb7 11204
1064790d 11205 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11206 (grub_longjmp): Likewise.
11207 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11208 (grub_longjmp): Likewise.
11209 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11210 (grub_longjmp): Likewise.
11211
11212 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11213 [!GRUB_UTIL] (grub_longjmp): Removed.
11214
29dda3ed 112152006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11216
11217 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11218 "color!" method does not return any value.
11219
ad2a06ed 112202006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11221
11222 * include/grub/bitmap.h: New file.
11223
11224 * include/grub/i386/pc/vbeutil.h: Likewise.
11225
11226 * video/bitmap.c: Likewise.
11227
11228 * video/readers/tga.c: Likewise.
11229
11230 * video/i386/pc/vbeutil.c: Likewise.
11231
11232 * commands/videotest.c: Code cleanup and updated to reflect to new
11233 video API.
11234
11235 * term/gfxterm.c: Likewise.
11236
11237 * video/video.c: Likewise.
11238
11239 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11240 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11241 (bitmap_mod_SOURCES): New entry.
11242 (bitmap_mod_CFLAGS): Likewise.
11243 (bitmap_mod_LDFLAGS): Likewise.
11244 (tga_mod_SOURCES): Likewise.
11245 (tga_mod_CFLAGS): Likewise.
11246 (tga_mod_LDFLAGS): Likewise.
11247
11248 * include/grub/video.h (grub_video_blit_operators): New enum type.
11249 (grub_video_render_target): Changed as forward declaration and moved
11250 actual definition to be video driver specific.
11251 (grub_video_adapter.blit_bitmap): Added blitting operator.
11252 (grub_video_adapter.blit_render_target): Likewise.
11253 (grub_video_blit_bitmap): Likewise.
11254 (grub_video_blit_render_target): Likewise.
11255
11256 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11257 driver specific render target definition.
11258 (grub_video_vbe_map_rgba): Added driver internal helper.
11259 (grub_video_vbe_unmap_color): Updated to use
11260 grub_video_i386_vbeblit_info.
11261 (grub_video_vbe_get_video_ptr): Likewise.
11262
11263 * include/grub/i386/pc/vbeblit.h
11264 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11265 grub_video_i386_vbeblit_info.
11266 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11267 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11268 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11269 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11270 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11271 (grub_video_i386_vbeblit_index_index): Likewise.
11272 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11273 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11274 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11275 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11276 operator.
11277 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11278 operator.
11279
11280 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11281 include/grub/i386/pc/vbeblit.h.
11282
11283 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11284 Updated to use grub_video_i386_vbeblit_info.
11285 (grub_video_i386_vbefill_R8G8B8): Likewise.
11286 (grub_video_i386_vbefill_index): Likewise.
11287 (grub_video_i386_vbefill): Added generic filler.
11288
11289 * video/i386/pc/vbefill.c: Updated to reflect changes on
11290 include/grub/i386/pc/vbefill.h.
11291
11292 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11293 grub_video_i386_vbeblit_info.
11294 (grub_video_vbe_unmap_color): Likewise.
11295 (grub_video_vbe_blit_glyph): Likewise.
11296 (grub_video_vbe_scroll): Likewise.
11297 (grub_video_vbe_draw_pixel): Removed function.
11298 (grub_video_vbe_get_pixel): Likewise.
11299 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11300 updated code to use it.
11301 (common_blitter): Added common blitter for render target and bitmap.
11302 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11303 (grub_video_vbe_blit_render_target): Likewise.
11304
bc8c036d 113052006-07-30 Johan Rydberg <jrydberg@gnu.org>
11306
11307 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11308 is in text mode if there is no console control protocol instance
11309 available.
11310
684a8eff 113112006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11312
11313 * include/grub/video.h: Code cleanup.
11314
11315 * include/grub/i386/pc/vbe.h: Likewise.
11316
11317 * video/i386/pc/vbe.c: Likewise.
11318
11319 * video/i386/pc/vbeblit.c: Likewise.
11320
11321 * video/i386/pc/vbefill.c: Likewise.
11322
11323 * video/video.c: Likewise. Also added more comments.
11324
5915059b 113252006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11326
11327 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11328 (struct grub_biosdisk_dap): Likewise.
11329
11330 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11331 linkage settings for all functions.
11332
90ce5d56 113332006-07-12 Marco Gerards <marco@gnu.org>
11334
11335 * configure.ac (--enable-mm-debug): Fix typo.
11336
11337 * genkernsyms.sh.in: Use proper quoting for `CC'.
11338
43e7f879 113392006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11340
11341 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11342 (normal_mod_ASFLAGS): Remove "-m32".
11343
4889bdec 113442006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11345
11346 * util/misc.c: Include config.h.
11347 [!HAVE_MEMALIGN]: Do not include malloc.h.
11348 (grub_memalign): Use posix_memalign, if present. Then, use
11349 memalign, if present. Otherwise, emit an error.
11350
11351 * util/grub-emu.c: Do not include malloc.h.
11352
11353 * include/grub/util/misc.h: Include unistd.h. This is required for
11354 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11355 D. Eades III <hde@foobar-qux.org>.
11356
11357 * configure.ac (AC_GNU_SOURCE): Added.
11358 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11359 type.
11360
fd39d4da 113612006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11362
11363 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11364 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11365
b786f3b5 113662006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11367
11368 * include/grub/types.h (grub_host_addr_t): Rename to
11369 grub_target_addr_t.
11370 (grub_host_off_t): Rename to grub_target_off_t.
11371 (grub_host_size_t): Rename to grub_target_size_t.
11372 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11373 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11374
11375 * include/grub/kernel.h (struct grub_module_header): Change type
11376 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11377 (grub_module_info): Likewise.
f19dbdb7 11378
051988bb 113792006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11380
11381 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11382 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11383 Velazquez <jesus.velazquez@gmail.com>.
11384
deae281b 113852006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11386
11387 Count partitions from 1 instead of 0 in the string representation
11388 of partitions. Still use 0-based internally.
f19dbdb7 11389
deae281b 11390 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11391 (sun_partition_map_iterate): Use grub_partition_t instead of
11392 struct grub_partition *. Cast DESC->START_CYLINDER to
11393 grub_uint64_t after converting the endian.
11394 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11395 (sun_partition_map_get_name): Add 1 to P->INDEX.
11396
11397 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11398 PCDATA->DOS_PART.
11399 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11400
11401 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11402 zero instead of one.
11403 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11404 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11405
11406 * partmap/apple.c (apple_partition_map_iterate): Change the type
11407 of POS to unsigned.
11408 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11409 (apple_partition_map_get_name): Add 1 into P->INDEX.
11410
11411 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11412 of POS to unsigned.
11413 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11414 calculate the offset of a partition.
11415 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11416 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11417
11418 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11419 SECTOR to grub_disk_addr_t.
11420 (acorn_partition_map_iterate): Likewise.
11421 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11422 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11423 top.
11424 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11425
11426 * kern/i386/pc/init.c (make_install_device): Add 1 into
11427 GRUB_INSTALL_DOS_PART.
11428
11429 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11430 conditional.
11431
524a1e6a 114322006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11433
11434 Clean up the code to support 64-bit addressing in disks and
11435 files. This change is not enough for filesystems yet.
f19dbdb7 11436
524a1e6a 11437 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11438 type of "start" to grub_uint64_t.
11439 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11440 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11441 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11442 convert addresses.
11443
11444 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11445 to grub_disk_addr_t.
11446
11447 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11448 string.
11449
11450 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11451
11452 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11453 to char *.
11454
11455 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11456
11457 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11458
11459 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11460
11461 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11462 to grub_off_t, to detect an error from grub_file_seek.
11463 (grub_multiboot_load_elf32): Likewise.
11464
11465 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11466 maximum unsigned long value when an overflow is detected.
11467 (grub_strtoull): New function.
11468 (grub_divmod64): Likewise.
11469 (grub_lltoa): use grub_divmod64.
11470
11471 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11472 grub_disk_addr_t.
11473 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11474 the pointer to next character. Use grub_strtoull instead of
11475 grub_strtoul.
11476 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11477 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11478 respectively.
11479
fe6b695a 11480 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 11481 return value is signed.
11482 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11483 test if OFFSET is less than zero, as OFFSET is unsigned now.
11484
11485 * kern/disk.c (struct grub_disk_cache): Change the type of
11486 "sector" to grub_disk_addr_t.
11487 (grub_disk_cache_get_index): Change the type of SECTOR to
11488 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11489 unsigned after shifting.
11490 (grub_disk_cache_invalidate): Change the type of SECTOR to
11491 grub_disk_addr_t.
11492 (grub_disk_cache_unlock): Likewise.
11493 (grub_disk_cache_store): Likewise.
11494 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11495 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11496 grub_disk_addr_t and grub_uint64_t, respectively.
11497 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11498 body, as the value of OFFSET is tweaked by
11499 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11500 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11501 respectively.
11502 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11503 body, as the value of OFFSET is tweaked by
11504 grub_disk_check_range. Change the types of LEN and N to
11505 grub_size_t.
11506
11507 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11508 and "saved_offset" to grub_off_t.
11509 (test_header): Cast BUF to char *.
11510 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11511 to char *.
11512 (grub_gzio_read): Change the types of OFFSET and SIZE to
11513 grub_off_t and grub_size_t, respectively.
11514
11515 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11516 Removed.
11517 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11518 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11519 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11520 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11521 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11522
11523 * include/grub/types.h (grub_off_t): Unconditionally set to
11524 grub_uint64_t.
11525 (grub_disk_addr_t): Changed to grub_uint64_t.
11526
11527 * include/grub/partition.h (struct grub_partition): Change the
11528 types of "start", "len" and "offset" to grub_disk_addr_t,
11529 grub_uint64_t and grub_disk_addr_t, respectively.
11530 (grub_partition_get_start): Return grub_disk_addr_t.
11531 (grub_partition_get_len): Return grub_uint64_t.
11532
11533 * include/grub/misc.h (grub_strtoull): New prototype.
11534 (grub_divmod64): Likewise.
11535
11536 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11537 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11538 grub_off_t, respectively.
11539 All callers and references changed.
11540
11541 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11542 grub_size_t in "read".
11543 All callers and references changed.
11544
11545 * include/grub/file.h (struct grub_file): Change the types of
11546 "offset" and "size" to grub_off_t and grub_off_t,
11547 respectively. Change the type of SECTOR to grub_disk_addr_t in
11548 "read_hook".
11549 (grub_file_read): Change the type of LEN to grub_size_t.
11550 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11551 grub_off_t.
11552 (grub_file_size): Return grub_off_t.
11553 (grub_file_tell): Likewise.
11554 All callers and references changed.
11555
11556 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11557 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11558 "write".
11559 (struct grub_disk): Change the type of "total_sectors" to
11560 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 11561 "read_hook".
524a1e6a 11562 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11563 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11564 (grub_disk_write): Likewise.
11565 All callers and references changed.
11566
11567 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11568 char * for grub_strncmp to silence gcc.
11569 (grub_iso9660_mount): Likewise.
11570 (grub_iso9660_mount): Likewise.
11571 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11572 return statement.
11573 (grub_iso9660_iterate_dir): Likewise.
11574 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11575
11576 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11577 LEN to grub_disk_addr_t and grub_size_t, respectively.
11578
11579 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11580
11581 * fs/jfs.c (grub_jfs_read_file): Likewise.
11582
11583 * fs/minix.c (grub_jfs_read_file): Likewise.
11584
11585 * fs/sfs.c (grub_jfs_read_file): Likewise.
11586
11587 * fs/ufs.c (grub_jfs_read_file): Likewise.
11588
11589 * fs/xfs.c (grub_jfs_read_file): Likewise.
11590
11591 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11592 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11593 respectively.
11594
11595 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11596 BLKNR to -1 instead of returning GRUB_ERRNO.
11597 (grub_ext2_read_file): Change the types of SECTOR and
11598 LEN to grub_disk_addr_t and grub_size_t, respectively.
11599
11600 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11601 LEN to grub_disk_addr_t and grub_size_t, respectively.
11602
11603 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11604 grub_file_read.
11605
11606 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11607 string. Do not cast SECTOR explicitly.
11608
11609 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11610 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11611 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11612 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11613 over 2TB and LBA mode is not supported, raise an error.
11614 (get_safe_sectors): New function.
11615 (grub_biosdisk_read): Use get_safe_sectors.
11616 (grub_biosdisk_write): Likewise.
11617
11618 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11619 (grub_efidisk_write): Likewise.
11620
11621 * disk/loopback.c (delete_loopback): Cosmetic changes.
11622 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11623 correctly.
11624 (grub_loopback_open): Likewise.
11625 (grub_loopback_read): Likewise. Also, change the type of POS to
11626 grub_off_t, and fix the usage of grub_memset.
11627
11628 * commands/i386/pc/play.c: Include grub/machine/time.h.
11629
11630 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11631 print FILE->SIZE.
11632
11633 * commands/configfile.c: Include grub/env.h.
11634
11635 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11636 GRUB_ERRNO directly instead. Change the type of POS to
11637 grub_off_t. Follow the coding standard.
11638
11639 * commands/blocklist.c: Include grub/partition.h.
11640 (grub_cmd_blocklist): Return an error if the underlying device is
11641 not a disk. Take the starting sector of a partition into account,
11642 if a partition is used.
11643
11644 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11645 a length field.
11646 (lba_mode): Support 64-bit addresses.
11647 (chs_mode): Likewise.
11648 (copy_buffer): Adapted to the new offsets of a length field and a
11649 segment field.
11650 (blocklist_default_start): Allocate 64-bit space.
11651
11652 * boot/i386/pc/boot.S (force_lba): Removed.
11653 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 11654 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 11655 space.
11656 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11657 is useless.
11658 (lba_mode): Refactored to support a 64-bit address. More size
11659 optimization.
11660 (setup_sectors): Likewise.
11661
53af98ad 116622006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11663
11664 * DISTLIST: Added include/grub/i386/linux.h. Removed
11665 include/grub/i386/pc/linux.h
11666
11667 * configure.ac (AC_INIT): Bumped to 1.94.
11668
11669 * config.guess: Updated from gnulib.
11670 * config.sub: Likewise.
11671 * install-sh: Likewise.
11672 * mkinstalldirs: Likewise.
11673
b4c1940a 116742006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11675
11676 * conf/common.rmk (grub_modules_init.lst): Depended on
11677 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11678 MODSRCFILES.
11679
11680 * genmk.rb (PModule::rule): Reverted the previous change.
11681
cfca1cfd 116822006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11683
11684 * conf/common.rmk (grub_modules_init.lst): Depends on
11685 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11686 that the target does not exist before producing.
11687 (grub_modules_init.h): Remove the target before generating.
11688 (grub_emu_init.c): Likewise.
11689
11690 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11691
aa6d7826 116922006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11693
11694 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11695 for the target-specific tests. Make sure that we also have the
11696 up-to-date target variables for those tests.
11697
26c607b9 116982006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11699
11700 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11701 (PModule::rule): Likewise.
11702
0162321a 117032006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11704
11705 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11706 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11707 target-specific flags should be prefixed.
11708 (PModule::rule): Likewise.
11709
6c826348 117102006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11711
11712 * configure.ac (CMP): Check if cmp is available explicitly.
11713
b977bf01 117142006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11715
11716 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11717 (target_cpu): New variable.
11718 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 11719
b977bf01 11720 * util/i386/pc/grub-install.in (host_cpu): Removed.
11721 (target_cpu): New variable.
11722 (pkglibdir): Use target_cpu instead of host_cpu.
11723
11724 * util/genmoddep.c: Removed.
f19dbdb7 11725
b977bf01 11726 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11727 instead of GRUB_HOST_SIZEOF_VOID_P.
11728 * kern/dl.c: Likewise.
11729
11730 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11731 ...
11732 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11733 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11734 (GRUB_TARGET_SIZEOF_LONG): ... this.
11735 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11736 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11737 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11738 to ...
11739 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11740 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11741 (GRUB_TARGET_SIZEOF_LONG): ... this.
11742 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11743 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11744 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11745 to ...
11746 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11747 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11748 (GRUB_TARGET_SIZEOF_LONG): ... this.
11749 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11750 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11751
11752 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11753 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11754 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11755 instead of GRUB_HOST_SIZEOF_LONG.
11756 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11757 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11758 GRUB_CPU_WORDS_BIGENDIAN.
11759 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11760 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11761 grub_host_ssize_t.
11762
11763 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11764 (genmoddep_SOURCES): Likewise.
11765 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11766 (genmoddep_SOURCES): Likewise.
11767 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11768 (genmoddep_SOURCES): Likewise.
11769 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11770 Likewise.
11771 (genmoddep_SOURCES): Likewise.
11772
11773 * genmoddep.awk: New file.
11774
11775 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11776 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11777 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11778 (PModule::rule): Likewise.
11779 (Program::rule): Likewise.
11780 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11781 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11782 respectively.
11783
11784 * configure.ac: Rewritten intensively to use host and target
11785 instead of build and host, respectively.
11786
11787 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11788 (host_cpu): Removed.
11789 (target_cpu): New variable.
11790 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11791 (BUILD_CC): Removed.
11792 (BUILD_CFLAGS): Likewise.
11793 (BUILD_CPPFLAGS): Likewise.
11794 (TARGET_CC): New variable.
11795 (TARGET_CFLAGS): Likewise.
11796 (TARGET_CPPFLAGS): Likewise.
11797 (TARGET_LDFLAGS): Likewise.
11798 (AWK): Likewise.
11799 (include): Use target_cpu instead of host_cpu.
11800 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 11801
b977bf01 11802 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11803
f09771a1 118042006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11805
11806 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11807 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11808 field 'false' to 'exec_on_false'.
11809 (grub_script_create_cmdif): Renamed argument names to reflect above
11810 changes.
11811
11812 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11813
11814 * normal/script.c (grub_script_create_cmdif): Likewise.
11815
118f4fb3 118162006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11817
11818 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11819 top.
11820 (grub_hfsplus_btree_recptr): Likewise.
11821 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11822 FILEBLOCK both to pass a block number and store next block
11823 number.
11824 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11825 overflow file correctly. Specify errors appropriately, because
11826 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11827 grub_hfsplus_btree_recptr to get the pointer to a found key.
11828 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11829 is found.
11830
11831 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11832 linux.mod.
11833 (_linux_mod_SOURCES): New variable.
11834 (_linux_mod_CFLAGS): Likewise.
11835 (_linux_mod_LDFLAGS): Likewise.
11836 (linux_mod_SOURCES): Likewise.
11837 (linux_mod_CFLAGS): Likewise.
11838 (linux_mod_LDFLAGS): Likewise.
11839
11840 * DISTLIST: Added loader/i386/efi/linux.c,
11841 loader/i386/efi/linux_normal.c and
11842 include/grub/i386/efi/loader.h.
11843
11844 * loader/i386/efi/linux.c: New file.
11845 * loader/i386/efi/linux_normal.c: Likewise.
11846 * include/grub/i386/efi/loader.h: Likewise.
11847
89a7d726 118482006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11849
11850 * commands/blocklist.c: New file.
11851
11852 * DISTLIST: Added commands/blocklist.c.
11853
11854 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 11855 color for the background, and a darker color for the foreground.
89a7d726 11856 (grub_console_checkkey): Return READ_KEY.
11857 (grub_console_cls): Set the background to
11858 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11859
11860 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11861
11862 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11863 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11864
11865 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11866 prototype.
11867
11868 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11869 BG. The spec is wrong again.
11870
11871 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11872 prototype.
11873 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11874
11875 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11876 commands/blocklist.c.
11877 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11878
89a7d726 11879 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11880 (blocklist_mod_SOURCES): New variable.
11881 (blocklist_mod_CFLAGS): Likewise.
11882 (blocklist_mod_LDFLAGS): Likewise.
11883
75c8f258 118842006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11885
11886 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11887 duplication.
11888 (lba_mode): Use %eax more intensively to reduce the code size.
11889
da2eb181 118902006-05-20 Marco Gerards <marco@gnu.org>
11891
11892 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11893
11894 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11895 for `menuentry'.
11896 (script): Accept leading newlines.
11897 (newlines): New rule to describe 0 or more newlines.
11898 (commands): Accept `command' with trailing newline. Fixed the
11899 order in which arguments were passed to `grub_script_add_cmd'.
11900 Accept commands separated by newlines.
11901 (function): Changed to accept newlines.
11902 (menuentry) Rewritten.
11903
11904 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11905 front of the list, instead of to the end.
11906
577b4050 119072006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11908
11909 * util/i386/pc/grub-install.in (bindir): New variable.
11910 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11911 Shaver <lbgwjl@gmail.com>.
11912
0d6e1189 119132006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11914
11915 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11916 grub/machine/linux.h
11917 * loader/i386/pc/linux.c: Likewise.
11918
11919 * include/grub/i386/pc/linux.h: Moved to ...
11920 * include/grub/i386/linux.h: ... here.
11921
11922 * include/grub/i386/linux.h (struct linux_kernel_params): New
11923 struct.
f19dbdb7 11924
31b86e9f 119252006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11926
11927 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11928 checking.
11929 (grub_video_vbe_blit_glyph): Likewise.
11930 (grub_video_vbe_blit_bitmap): Likewise.
11931 (grub_video_vbe_blit_render_target): Likewise.
11932
83b984de 119332006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11934
11935 * configure.ac (--with-platform): Properly quote the square
11936 brackets.
11937
5f0413bd 119382006-05-08 Marco Gerards <marco@gnu.org>
11939
11940 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11941 this...
11942 (kernel_elf_HEADERS): ...to this. Updated all users.
11943 (grubof_symlist.c): Renamed from this...
11944 (kernel_elf_symlist.c): ...to this. Updated all users.
11945 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11946 (grubof_SOURCES): Renamed from this...
11947 (kernel_elf_SOURCES): ...to this.
11948 (grubof_HEADERS): Renamed from this...
11949 (kernel_elf_HEADERS): ...to this.
11950 (grubof_CFLAGS): Renamed from this...
11951 (kernel_elf_CFLAGS): ...to this.
11952 (grubof_ASFLAGS): Renamed from this...
11953 (kernel_elf_ASFLAGS): ...to this.
11954 (grubof_LDFLAGS): Renamed from this...
11955 (kernel_elf_LDFLAGS): ...to this.
11956
11957 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11958 this...
11959 (kernel_elf_HEADERS): ...to this. Updated all users.
11960 (grubof_symlist.c): Renamed from this...
11961 (kernel_elf_symlist.c): ...to this. Updated all users.
11962 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11963 (grubof_SOURCES): Renamed from this...
11964 (kernel_elf_SOURCES): ...to this.
11965 (grubof_HEADERS): Renamed from this...
11966 (kernel_elf_HEADERS): ...to this.
11967 (grubof_CFLAGS): Renamed from this...
11968 (kernel_elf_CFLAGS): ...to this.
11969 (grubof_ASFLAGS): Renamed from this...
11970 (kernel_elf_ASFLAGS): ...to this.
11971 (grubof_LDFLAGS): Renamed from this...
11972 (kernel_elf_LDFLAGS): ...to this.
11973
11974 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11975 `kernel.elf' instead of `grubof'.
11976
05568c2e 119772006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11978
11979 Add --with-platform to configure. Use pkglibdir instead of
11980 pkgdatadir. This is reported by Roger Leigh.
11981
11982 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11983 (host_vendor): Likewise.
11984 (host_os): Likewise.
11985 (pkgdatadir): Likewise.
11986 (platform): New variable.
11987 (pkglibdir): Likewise.
11988 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 11989
05568c2e 11990 * util/i386/pc/grub-install.in (datadir): Removed.
11991 (host_vendor): Likewise.
11992 (host_os): Likewise.
11993 (pkgdatadir): Likewise.
11994 (platform): New variable.
11995 (pkglibdir): Likewise.
11996 Use PKGLIBDIR instead of PKGDATADIR.
11997
11998 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11999 instead of GRUB_DATADIR.
12000 (main): Likewise.
12001 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12002 (main): Likewise.
12003 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12004 (main): Likewise.
12005
12006 * configure.ac (--with-platform): New option.
12007 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12008
12009 * Makefile.in: Include a makefile based on PLATFORM instead of
12010 HOST_VENDOR.
12011 (pkgdatadir): Not appended by the machine type.
12012 (pkglibdir): Appended by the machine type.
12013 (host_vendor): Removed.
12014 (platform): New variable.
12015 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12016 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12017 (uninstall): Likewise.
12018
4e93851c 120192006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12020
12021 Use the environment context in the menu. Remove the commands
12022 "default" and "timeout", and use variables instead.
f19dbdb7 12023
4e93851c 12024 * normal/menu.c: Include grub/env.h.
12025 (print_entry): Cast TITLE to silence gcc.
12026 (get_timeout): New function.
12027 (set_timeout): Likewise.
12028 (get_entry_number): Likewise.
12029 (run_menu): Use a default entry, a fallback entry and a timeout
12030 in the environment variables "default", "fallback" and
12031 "timeout". Also, tweak the default entry if it is not within the
12032 current menu entries.
12033 (grub_menu_run): Use a fallback entry in the environment variable
12034 "fallback".
12035
12036 * normal/main.c (read_config_file): Do not initialize
12037 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12038 NEWMENU->TIMEOUT.
12039 (grub_normal_execute): Use a data slot to store the menu.
12040
12041 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12042 fallback_entry and timeout.
12043 (struct grub_menu_list): Removed.
12044 (grub_menu_list_t): Likewise.
12045 (struct grub_context): Likewise.
12046 (grub_context_t): Likewise.
12047 (grub_context_get): Likewise.
12048 (grub_context_get_current_menu): Likewise.
12049 (grub_context_push_menu): Likewise.
12050 (grub_context_pop_menu): Likewise.
12051 (grub_default_init): Likewise.
12052 (grub_default_fini): Likewise.
12053 (grub_timeout_init): Likewise.
12054 (grub_timeout_fini): Likewise.
12055
12056 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12057 and timeout.mod.
12058 (normal_mod_SOURCES): Removed normal/context.c.
12059
12060 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12061 commands/default.c, commands/timeout.c and normal/context.c.
12062 (normal_mod_SOURCES): Removed normal/context.c.
12063
12064 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12065 commands/timeout.c and normal/context.c.
12066 (normal_mod_SOURCES): Removed normal/context.c.
12067
12068 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12069 commands/default.c, commands/timeout.c and normal/context.c.
12070 (normal_mod_SOURCES): Removed normal/context.c.
12071
12072 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12073 timeout.mod.
12074 (default_mod_SOURCES): Removed.
12075 (default_mod_CFLAGS): Likewise.
12076 (default_mod_LDFLAGS): Likewise.
12077 (timeout_mod_SOURCES): Removed.
12078 (timeout_mod_CFLAGS): Likewise.
12079 (timeout_mod_LDFLAGS): Likewise.
12080
12081 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12082 normal/context.c.
12083
12084 * commands/default.c: Removed.
12085 * commands/timeout.c: Likewise.
12086 * normal/context.c: Likewise.
12087
1eb9cc1d 120882006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12089
12090 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12091
385bd9c1 120922006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12093
12094 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12095 "next" to "prev" for readability.
12096 (struct grub_env_sorted_var): New struct.
12097 (grub_env_context): Renamed to ...
12098 (initial_context): ... this.
12099 (grub_env_var_context): Renamed to ...
12100 (current_context): ... this.
12101 (grub_env_find): Look only at CURRENT_CONTEXT.
12102 (grub_env_context_open): Rewritten to copy exported variables from
12103 previous context.
12104 (grub_env_context_close): Rewritten according to the new
12105 scheme. Also, add an assertion to prevent the initial context from
12106 removed.
12107 (grub_env_insert): Removed the code for the sorted list.
12108 (grub_env_remove): Likewise.
12109 (grub_env_export): Simply mark the variable with
12110 GRUB_ENV_VAR_GLOBAL.
12111 (grub_env_set): A cosmetic change for naming consistency.
12112 (grub_env_get): Likewise.
12113 (grub_env_unset): Likewise.
12114 (grub_env_iterate): Rewritten to sort variables within this
12115 function.
12116 (grub_register_variable_hook): Fixed for naming consistency. Call
12117 grub_env_find again, only if NAME is not found at the first time.
12118 (mangle_data_slot_name): New function.
12119 (grub_env_set_data_slot): Likewise.
12120 (grub_env_get_data_slot): Likewise.
12121 (grub_env_unset_data_slot): Likewise.
12122
12123 * include/grub/env.h (grub_env_var_type): New enum.
12124 (GRUB_ENV_VAR_LOCAL): New constant.
12125 (GRUB_ENV_VAR_GLOBAL): Likewise.
12126 (GRUB_ENV_VAR_DATA): Likewise.
12127 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12128 "type".
12129 (grub_env_set): Replace VAR with NAME for consistency.
12130 (grub_register_variable_hook): Likewise.
12131 (grub_env_export): Specify the name of the argument.
12132 (grub_env_set_data_slot): New prototype.
12133 (grub_env_get_data_slot): Likewise.
12134 (grub_env_unset_data_slot): Likewise.
12135
7f362539 121362006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12137
12138 Extend the loader so that GRUB can accept a loader which comes
12139 back to GRUB when a loaded image exits. Also, this change adds
12140 support for a chainloader on EFI.
f19dbdb7 12141
7f362539 12142 * term/efi/console.c: Include grub/misc.h.
12143 (grub_console_checkkey): Display a scan code on the top for
12144 debugging. This will be removed once the EFI port gets stable.
12145 Correct the scan code mapping.
12146
12147 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12148 allocate memory from larger regions, in order to reduce the number
12149 of allocated regions. Otherwise, the MacOSX loader panics.
12150 (filter_memory_map): Avoid less than 1MB for compatibility with
12151 other loaders.
12152 (add_memory_regions): Allocate from the tail of a region, if
12153 possible, to avoid allocating a region near to 1MB, for the MacOSX
12154 loader.
12155
12156 * kern/efi/init.c (grub_efi_set_prefix): Specify
12157 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12158
12159 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12160 argument IMAGE_HANDLE and specify it to get a loaded image.
12161 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12162 grub_efi_get_loaded_image.
fe6b695a 12163 (grub_efi_get_filename): Divide the length by the size of
7f362539 12164 grub_efi_char16_t.
12165 (grub_efi_get_device_path): New function.
12166 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12167 the length by the size of grub_efi_char16_t for a file path device
12168 path node.
12169
12170 * kern/loader.c (grub_loader_noreturn): New variable.
12171 (grub_loader_set): Accept a new argument NORETURN. Set
12172 GRUB_LOADER_NORETURN to NORETURN.
12173 All callers changed.
12174 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12175 grub_machine_fini.
12176
12177 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12178 prototype.
12179 (grub_efi_get_loaded_image): Take an argument to specify an image
12180 handle.
12181
12182 * include/grub/loader.h (grub_loader_set): Added one more argument
12183 NORETURN.
12184
12185 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12186 instead of grub_efi_open_protocol.
12187 (grub_efidisk_get_device_name): Likewise.
12188 (grub_efidisk_close): Print a newline.
12189 (grub_efidisk_get_device_handle): Fixed to use
12190 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12191 GRUB_EFI_DEVICE_PATH_TYPE.
12192
12193 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12194 * kern/efi/efi.c (device_path_guid): ... here.
12195
12196 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12197 chain.mod.
12198 (kernel_mod_HEADERS): Added efi/disk.h.
12199 (_chain_mod_SOURCES): New variable.
12200 (_chain_mod_CFLAGS): Likewise.
12201 (_chain_mod_LDFLAGS): Likewise.
12202 (chain_mod_SOURCES): Likewise.
12203 (chain_mod_CFLAGS): Likewise.
12204 (chain_mod_LDFLAGS): Likewise.
12205
12206 * DISTLIST: Added include/grub/efi/chainloader.h,
12207 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12208
12209 * include/grub/efi/chainloader.h: New file.
12210 * loader/efi/chainloader.c: Likewise.
12211 * loader/efi/chainloader_normal.c: Likewise.
12212
c0111d6e 122132006-04-30 Marco Gerards <marco@gnu.org>
12214
12215 * commands/configfile.c (grub_cmd_source): New function.
12216 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12217 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12218
df5341da 122192006-04-30 Marco Gerards <marco@gnu.org>
12220
12221 * normal/execute.c (grub_script_execute_cmd): Change the return
12222 type to `grub_err_t'. Correctly return the error.
12223 (grub_script_execute_cmdline): In case a command line is not a
12224 command or a function, try to interpret it as an assignment.
12225
f85934bd 122262006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12227
12228 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12229 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12230 skip a node whose name is obviously invalid as UTF-16,
12231 i.e. contains a NUL character. Stop the iteration when the last
12232 directory entry is found. Instead of using the return value of
12233 grub_hfsplus_btree_iterate_node, store the value in RET and use
12234 it, because the iterator can be stopped by the last directory
12235 entry.
12236
8f8a2cf8 122372006-04-30 Marco Gerards <marco@gnu.org>
12238
12239 * include/grub/env.h (grub_env_export): New prototype. Reported
12240 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12241
a27e84ce 122422006-04-30 Marco Gerards <marco@gnu.org>
12243
12244 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12245 size of the extents in a catalog file record.
12246
eaef0553 122472006-04-29 Marco Gerards <marco@gnu.org>
12248
12249 * commands/configfile.c (grub_cmd_configfile): Execute the
12250 configfile within its own context.
12251
12252 * include/grub/env.h (grub_env_context_open): New prototype.
12253 (grub_env_context_close): Likewise.
12254
12255 * kern/env.c (grub_env): Removed.
12256 (grub_env_sorted): Likewise.
12257 (grub_env_context): New variable.
12258 (grub_env_var_context): Likewise.
12259 (grub_env_find): Search both the active context and the global
12260 context.
12261 (grub_env_context_open): New function.
12262 (grub_env_context_close): Likewise.
12263 (grub_env_insert): Likewise.
12264 (grub_env_remove): Likewise.
12265 (grub_env_export): Likewise.
12266 (grub_env_set): Changed to use helper functions to avoid code
12267 duplication.
12268 (grub_env_iterate): Rewritten so both the current context and the
12269 global context are being used.
12270
12271 * normal/command.c (export_command): New function.
12272 (grub_command_init): Register the `export' function.
12273
7b455f4d 122742006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12275
12276 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12277 explicitly to suppress gcc's warnings.
12278 * fs/fat.c (grub_fat_find_dir): Likewise.
12279 (grub_fat_label): Likewise.
12280 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12281 (grub_xfs_mount): Likewise.
12282 (grub_xfs_label): Likewise.
12283 * fs/affs.c (grub_affs_mount): Likewise.
12284 (grub_affs_label): Likewise.
12285 (grub_affs_iterate_dir): Likewise.
12286 * fs/sfs.c (grub_sfs_mount): Likewise.
12287 (grub_sfs_iterate_dir): Likewise.
12288 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12289 * fs/hfs.c (grub_hfs_mount): Likewise.
12290 (grub_hfs_cmp_catkeys): Likewise.
12291 (grub_hfs_find_dir): Likewise.
12292 (grub_hfs_dir): Likewise.
12293 (grub_hfs_label): Likewise.
12294 * fs/jfs.c (grub_jfs_mount): Likewise.
12295 (grub_jfs_opendir): Likewise.
12296 (grub_jfs_getent): Likewise.
12297 (grub_jfs_lookup_symlink): Likewise.
12298 (grub_jfs_label): Likewise.
12299 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12300 (grub_hfsplus_iterate_dir): Likewise.
12301 (grub_hfsplus_btree_iterate_node): Made static.
12302
12303 * util/grub-emu.c (prefix): New variable.
12304 (grub_machine_set_prefix): New function.
12305 (main): Do not set the environment variable "prefix" here. Only
12306 set PREFIX, which is used later by grub_machine_set_prefix.
12307
12308 * include/grub/video.h: Do not include grub/symbol.h.
12309 (grub_video_register): Not exported. This symbol is not defined in
12310 the kernel.
12311 (grub_video_unregister): Likewise.
12312 (grub_video_iterate): Likewise.
12313 (grub_video_setup): Likewise.
12314 (grub_video_restore): Likewise.
12315 (grub_video_get_info): Likewise.
12316 (grub_video_get_blit_format): Likewise.
12317 (grub_video_set_palette): Likewise.
12318 (grub_video_get_palette): Likewise.
12319 (grub_video_set_viewport): Likewise.
12320 (grub_video_get_viewport): Likewise.
12321 (grub_video_map_color): Likewise.
12322 (grub_video_map_rgb): Likewise.
12323 (grub_video_map_rgba): Likewise.
12324 (grub_video_fill_rect): Likewise.
12325 (grub_video_blit_glyph): Likewise.
12326 (grub_video_blit_bitmap): Likewise.
12327 (grub_video_blit_render_target): Likewise.
12328 (grub_video_scroll): Likewise.
12329 (grub_video_swap_buffers): Likewise.
12330 (grub_video_create_render_target): Likewise.
12331 (grub_video_delete_render_target): Likewise.
12332 (grub_video_set_active_render_target): Likewise.
12333
12334 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12335 Undefined.
12336 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12337
12338 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12339 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12340 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12341 instead of $(srcdir)/genkernsyms.sh.
12342
12343 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12344 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12345 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12346 instead of $(srcdir)/genkernsyms.sh.
12347
12348 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12349 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12350 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12351 instead of $(srcdir)/genkernsyms.sh.
12352
12353 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12354 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12355 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12356 instead of $(srcdir)/genkernsyms.sh.
12357
12358 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12359 genkernsyms.sh.
12360
12361 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12362 genkernsyms.sh.
12363 (gensymlist.sh): New target.
12364 (genkernsyms.sh): Likewise.
12365
12366 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12367 genkernsyms.sh.in and gensymlist.sh.in.
12368
12369 * genkernsyms.sh: Removed.
12370 * gensymlist.sh: Likewise.
f19dbdb7 12371
7b455f4d 12372 * genkernsyms.sh.in: New file.
12373 * gensymlist.sh.in: Likewise.
12374
1885bb27 123752006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12376
12377 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12378 clobber "prefix", since we may have already set it manually.
12379
71538dff 123802006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12381
12382 * kern/misc.c (abort): New alias for grub_abort.
12383
2965c7cc 123842006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12385
12386 A new machine-specific function "grub_machine_set_prefix" is
12387 defined. This is called after loading modules, so that a prefix
12388 initialization can use modules. Also, this change adds an
12389 intensive debugging feature for the memory manager via the
12390 configure option "--enable-mm-debug".
f19dbdb7 12391
2965c7cc 12392 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12393 PART.LEN.
12394
12395 * kern/sparc64/ieee1275/init.c (abort): Removed.
12396 (grub_stop): Likewise.
12397 (grub_exit): New function.
12398 (grub_set_prefix): Renamed to ...
12399 (grub_machine_set_prefix): ... this.
12400 (grub_machine_init): Do not call grub_set_prefix.
12401
12402 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12403 (grub_machine_set_prefix): ... this.
12404 (grub_machine_init): Do not call grub_set_prefix.
12405
12406 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12407 (grub_machine_init): Do not set the prefix here.
12408
12409 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12410
12411 * kern/efi/init.c: Include grub/mm.h.
12412 (grub_efi_set_prefix): New function.
12413
12414 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12415 (grub_efi_get_filename): New function.
12416 (grub_print_device_path): Renamed to ...
12417 (grub_efi_print_device_path): ... this.
12418
12419 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12420 [MM_DEBUG] (grub_realloc): Likewise.
12421 [MM_DEBUG] (grub_free): Likewise.
12422 [MM_DEBUG] (grub_memalign): Likewise.
12423 [MM_DEBUG] (grub_mm_debug): New variable.
12424 [MM_DEBUG] (grub_debug_malloc): New function.
12425 [MM_DEBUG] (grub_debug_free): New function.
12426 [MM_DEBUG] (grub_debug_realloc): New function.
12427 [MM_DEBUG] (grub_debug_memalign): New function.
12428
12429 * kern/misc.c (grub_abort): Print a newline to distinguish
12430 the message.
12431
12432 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12433 grub_set_root_dev after loading modules. This is necessary when
12434 setting a prefix depends on modules.
12435
12436 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12437 (grub_efi_print_device_path): ... this.
12438 (grub_efi_get_filename): New prototype.
12439 (grub_efi_set_prefix): Likewise.
12440
12441 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12442 and grub/disk.h.
12443 (grub_efidisk_get_device_handle): New prototype.
12444 (grub_efidisk_get_device_name): Likewise.
12445
12446 * include/grub/mm.h: Include config.h.
12447 (MM_DEBUG): Removed.
12448 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12449 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12450 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12451 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12452 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12453 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12454 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12455 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12456 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12457
12458 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12459
12460 * disk/efi/efidisk.c: Include grub/partition.h.
12461 (iterate_child_devices): New function.
12462 (add_device): First, compare only last device path nodes, so that
12463 devices are sorted by the types.
12464 (grub_efidisk_get_device_handle): New function.
12465 (grub_efidisk_get_device_name): Likewise.
12466
12467 * configure.ac (--enable-mm-debug): New option to enable the
12468 memory manager debugging feature. This makes the binary much
12469 bigger, so is disabled by default.
12470
9cacaa17 124712006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12472
12473 Use grub_abort instead of grub_stop, and grub_exit must be
12474 define in each architecture now. Also, this change adds support
12475 for EFI disks.
f19dbdb7 12476
9cacaa17 12477 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12478 (grub_getkey): New function.
12479 (grub_term_get_current): Likewise.
12480
12481 * util/i386/pc/grub-setup.c: Include grub/term.h.
12482 (grub_getkey): New function.
12483 (grub_term_get_current): Likewise.
12484
12485 * util/misc.c (grub_stop): Renamed to ...
12486 (grub_exit): ... this.
12487
12488 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12489 (grub_exit): ... this.
12490 (grub_machine_init): Use grub_abort instead of abort.
12491 (grub_stop): Removed.
12492
12493 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12494 abort.
12495
12496 * kern/i386/pc/startup.S (grub_exit): New function.
12497 (cold_reboot): New label.
12498
12499 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12500 (grub_efi_init): Call grub_efidisk_init.
12501 (grub_efi_fini): Call grub_efidisk_fini.
12502
12503 * kern/efi/efi.c: Include grub/mm.h.
12504 (grub_efi_console_control_guid): Renamed to ...
12505 (console_control_guid): ... this.
12506 (grub_efi_loaded_image_guid): Renamed to ...
12507 (loaded_image_guid): ... this.
12508 (grub_efi_locate_handle): New function.
12509 (grub_efi_open_protocol): Likewise.
12510 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12511 GRUB_EFI_CONSOLE_CONTROL_GUID.
12512 (grub_efi_exit): Removed.
12513 (grub_stop): Likewise.
12514 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12515 (grub_exit): New function.
12516 (grub_print_device_path): Likewise.
12517
12518 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12519 (grub_enter_rescue_mode): Register "exit".
12520
12521 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12522 (grub_abort): New function.
12523
12524 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12525
12526 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12527
12528 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12529
12530 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12531 (grub_print_device_path): New prototype.
12532 (grub_efi_locate_handle): Likewise.
12533 (grub_efi_open_protocol): Likewise.
12534
12535 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12536 * disk/efi/efidisk.c: Likewise.
12537
12538 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12539
12540 * include/grub/efi/console_control.h
12541 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12542
12543 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12544 last 8 bytes as an array.
12545 (GRUB_EFI_DISK_IO_GUID): New macro.
12546 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12547 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12548 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12549 grub_uint8_t.
12550 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12551 (struct grub_efi_device_path): Rename the member "sub_type" to
12552 "subtype".
12553 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12554 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12555 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12556 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12557 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12558 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12559 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12560 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12561 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12562 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12563 (struct grub_efi_pci_device_path): New structure.
12564 (grub_efi_pci_device_path_t): New type.
12565 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12566 (struct grub_efi_pccard_device_path): New structure.
12567 (grub_efi_pccard_device_path_t): New type.
12568 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12569 (struct grub_efi_memory_mapped_device_path): New structure.
12570 (grub_efi_memory_mapped_device_path_t): New type.
12571 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12572 (struct grub_efi_vendor_device_path): New structure.
12573 (grub_efi_vendor_device_path_t): New type.
12574 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12575 (struct grub_efi_controller_device_path): New structure.
12576 (grub_efi_controller_device_path_t): New type.
12577 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12578 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12579 (struct grub_efi_acpi_device_path): New structure.
12580 (grub_efi_acpi_device_path_t): New type.
12581 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12582 (struct grub_efi_expanded_acpi_device_path): New structure.
12583 (grub_efi_expanded_acpi_device_path_t): New type.
12584 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12585 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12586 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12587 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12588 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12589 (struct grub_efi_atapi_device_path): New structure.
12590 (grub_efi_atapi_device_path_t): New type.
12591 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12592 (struct grub_efi_fibre_channel_device_path): New structure.
12593 (grub_efi_fibre_channel_device_path_t): New type.
12594 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12595 (struct grub_efi_1394_device_path): New structure.
12596 (grub_efi_1394_device_path_t): New type.
12597 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12598 (struct grub_efi_usb_device_path): New structure.
12599 (grub_efi_usb_device_path_t): New type.
12600 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12601 (struct grub_efi_usb_class_device_path): New structure.
12602 (grub_efi_usb_class_device_path_t): New type.
12603 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12604 (struct grub_efi_i2o_device_path): New structure.
12605 (grub_efi_i2o_device_path_t): New type.
12606 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12607 (struct grub_efi_mac_address_device_path): New structure.
12608 (grub_efi_mac_address_device_path_t): New type.
12609 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12610 (struct grub_efi_ipv4_device_path): New structure.
12611 (grub_efi_ipv4_device_path_t): New type.
12612 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12613 (struct grub_efi_ipv6_device_path): New structure.
12614 (grub_efi_ipv6_device_path_t): New type.
12615 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12616 (struct grub_efi_infiniband_device_path): New structure.
12617 (grub_efi_infiniband_device_path_t): New type.
12618 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12619 (struct grub_efi_uart_device_path): New structure.
12620 (grub_efi_uart_device_path_t): New type.
12621 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12622 (struct grub_efi_vendor_messaging_device_path): New structure.
12623 (grub_efi_vendor_messaging_device_path_t): New type.
12624 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12625 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12626 (struct grub_efi_hard_drive_device_path): New structure.
12627 (grub_efi_hard_drive_device_path_t): New type.
12628 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12629 (struct grub_efi_cdrom_device_path): New structure.
12630 (grub_efi_cdrom_device_path_t): New type.
12631 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12632 (struct grub_efi_vendor_media_device_path): New structure.
12633 (grub_efi_vendor_media_device_path_t): New type.
12634 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12635 (struct grub_efi_file_path_device_path): New structure.
12636 (grub_efi_file_path_device_path_t): New type.
12637 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12638 (struct grub_efi_protocol_device_path): New structure.
12639 (grub_efi_protocol_device_path_t): New type.
12640 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12641 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12642 (struct grub_efi_bios_device_path): New structure.
12643 (grub_efi_bios_device_path_t): New type.
12644 (struct grub_efi_disk_io): New structure.
12645 (grub_efi_disk_io_t): New type.
12646 (struct grub_efi_block_io_media): New structure.
12647 (grub_efi_block_io_media_t): New type.
12648 (struct grub_efi_block_io): New structure.
12649 (grub_efi_block_io_t): New type.
12650
12651 * include/grub/misc.h (grub_stop): Removed.
12652 (grub_exit): New prototype.
12653 (grub_abort): Likewise.
12654
12655 * include/grub/disk.h (enum grub_disk_dev_id): Added
12656 GRUB_DISK_DEVICE_EFIDISK_ID.
12657
12658 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12659 disk/efi/efidisk.c.
12660 (kernel_syms.lst): Remove the target if an error occurs.
12661
49986a9f 126622006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12663
12664 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12665 as it was simply too buggy.
12666
970d3b8a 126672006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12668
12669 * kern/misc.c (grub_lltoa): New function.
12670 (grub_vsprintf): Added support for the long long suffix,
12671 i.e. "ll".
12672
ff04ec24 126732006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12674
12675 * Makefile.in (LDFLAGS): Add variable.
12676 (LD): Remove variable.
12677 * configure.ac: Add -m32 to LDFLAGS.
12678 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12679 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12680 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12681 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12682 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12683 variables.
12684 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12685 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12686 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12687
37e5e1a4 126882006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12689
12690 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12691 length for unknown glyph.
12692
c352d8dd 126932006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12694
2eab1c0d 12695 Add support for pre-loaded modules into the EFI port.
f19dbdb7 12696
2eab1c0d 12697 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12698 completely. Accept one more argument DIR. The caller has changed.
12699
12700 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12701
12702 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12703 (grub_efi_loaded_image_guid): New variable.
12704 (grub_efi_get_loaded_image): New function.
12705 (grub_arch_modules_addr): Likewise.
12706
12707 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12708 prototype.
12709
12710 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12711 (struct grub_efi_loaded_image): New structure.
12712 (grub_efi_loaded_image_t): New type.
12713
127142006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12715
c352d8dd 12716 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12717 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12718 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12719
6d01d6b4 127202006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12721
12722 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12723
976a4ea0 127242006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12725
12726 * DISTLIST: Added include/grub/efi/console.h,
12727 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12728 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12729
12730 * include/grub/efi/console.h: New file.
12731 * include/grub/efi/time.h: Likewise.
12732 * include/grub/i386/efi/kernel.h: Likewise.
12733 * kern/efi/init.c: Likewise.
12734 * kern/efi/mm.c: Likewise.
12735 * term/efi/console.c: Likewise.
f19dbdb7 12736
976a4ea0 12737 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12738 (grub_stop): Removed.
12739 (grub_get_rtc): Likewise.
12740 (grub_machine_init): Simply call grub_efi_init.
12741 (grub_machine_fini): Call grub_efi_fini.
12742
12743 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12744 (grub_efi_output_string): Removed.
12745 (grub_efi_stall): New function.
12746 (grub_stop): Likewise.
12747 (grub_get_rtc): Likewise.
12748
12749 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12750 (grub_efi_stall): New prototype.
12751 (grub_efi_allocate_pages): Likewise.
12752 (grub_efi_free_pages): Likewise.
12753 (grub_efi_get_memory_map): Likewise.
12754 (grub_efi_mm_init): Likewise.
12755 (grub_efi_mm_fini): Likewise.
12756 (grub_efi_init): Likewise.
12757 (grub_efi_fini): Likewise.
12758
12759 * include/grub/i386/efi/time.h: Do not include
12760 grub/symbol.h. Include grub/efi/time.h.
12761 (GRUB_TICKS_PER_SECOND): Removed.
12762 (grub_get_rtc): Likewise.
12763
12764 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12765 Added padding. The EFI spec is buggy.
12766 (GRUB_EFI_BLACK): New macro.
12767 (GRUB_EFI_BLUE): Likewise.
12768 (GRUB_EFI_GREEN): Likewise.
12769 (GRUB_EFI_CYAN): Likewise.
12770 (GRUB_EFI_RED): Likewise.
12771 (GRUB_EFI_MAGENTA): Likewise.
12772 (GRUB_EFI_BROWN): Likewise.
12773 (GRUB_EFI_LIGHTGRAY): Likewise.
12774 (GRUB_EFI_BRIGHT): Likewise.
12775 (GRUB_EFI_DARKGRAY): Likewise.
12776 (GRUB_EFI_LIGHTBLUE): Likewise.
12777 (GRUB_EFI_LIGHTGREEN): Likewise.
12778 (GRUB_EFI_LIGHTCYAN): Likewise.
12779 (GRUB_EFI_LIGHTRED): Likewise.
12780 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12781 (GRUB_EFI_YELLOW): Likewise.
12782 (GRUB_EFI_WHITE): Likewise.
12783 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12784 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12785 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12786 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12787 (GRUB_EFI_BACKGROUND_RED): Likewise.
12788 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12789 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12790 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12791 (GRUB_EFI_TEXT_ATTR): Likewise.
12792
12793 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12794 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12795 (kernel_mod_HEADERS): Added efi/time.h.
12796
83709125 127972006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12798
12799 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12800 include/grub/efi/api.h, include/grub/efi/console_control.h,
12801 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12802 include/grub/i386/efi/time.h, kern/efi/efi.c,
12803 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12804 and util/i386/efi/grub-mkimage.c.
12805
12806 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12807
12808 * genmk.rb (PModule#rule): Do not export symbols if
12809 #{prefix}_EXPORTS is set to "no".
12810
12811 * conf/i386-efi.mk: New file.
12812 * conf/i386-efi.rmk: Likewise.
12813 * include/grub/efi/api.h: Likewise.
12814 * include/grub/efi/console_control.h: Likewise.
12815 * include/grub/efi/efi.h: Likewise.
12816 * include/grub/efi/pe32.h: Likewise.
12817 * include/grub/i386/efi/time.h: Likewise.
12818 * kern/efi/efi.c: Likewise.
12819 * kern/i386/efi/init.c: Likewise.
12820 * kern/i386/efi/startup.S: Likewise.
12821 * util/i386/efi/grub-mkimage.c: Likewise.
12822
128232006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 12824
12825 * include/grub/script.h: Include <grub/parser.h> and
12826 "grub_script.tab.h".
12827 (struct grub_lexer_param): New struct.
12828 (struct grub_parser_param): Likewise.
12829 (grub_script_create_arglist): Pass the state in an argument.
12830 (grub_script_add_arglist): Likewise.
12831 (grub_script_create_cmdline): Likewise.
12832 (grub_script_create_cmdblock): Likewise.
12833 (grub_script_create_cmdif): Likewise.
12834 (grub_script_create_cmdmenu): Likewise.
12835 (grub_script_add_cmd): Likewise.
12836 (grub_script_arg_add): Likewise.
12837 (grub_script_lexer_ref): Likewise.
12838 (grub_script_lexer_deref): Likewise.
12839 (grub_script_lexer_record_start): Likewise.
12840 (grub_script_lexer_record_stop): Likewise.
12841 (grub_script_mem_record): Likewise.
12842 (grub_script_mem_record_stop): Likewise.
12843 (grub_script_malloc): Likewise.
12844 (grub_script_yylex): Likewise.
12845 (grub_script_yyparse): Likewise.
12846 (grub_script_yyerror): Likewise.
12847 (grub_script_yylex): Likewise.
12848 (grub_script_lexer_init): Return the state.
12849
12850 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12851 (grub_script_lexer_done): Likewise.
12852 (grub_script_lexer_getline): Likewise.
12853 (grub_script_lexer_refs): Likewise.
12854 (script): Likewise.
12855 (newscript): Likewise.
12856 (record): Likewise.
12857 (recording): Likewise.
12858 (recordpos): Likewise.
12859 (recordlen): Likewise.
12860 (grub_script_lexer_init): Return the state instead of setting
12861 global variables.
12862 (grub_script_lexer_ref): Use the newly added argument for state
12863 instead of globals.
12864 (grub_script_lexer_deref): Likewise.
12865 (grub_script_lexer_record_start): Likewise.
12866 (grub_script_lexer_record_stop): Likewise.
12867 (recordchar): Likewise.
12868 (nextchar): Likewise.
12869 (grub_script_yylex2): Likewise.
12870 (grub_script_yylex): Likewise.
12871 (grub_script_yyerror): Likewise.
12872
12873 * normal/parser.y (func_mem): Removed variable.
12874 (menu_entry): Likewise.
12875 (err): Likewise.
12876 (%lex-param): New parser option.
12877 (%parse-param): Likewise.
12878 (script): Always return the AST.
12879 (argument): Pass the state around.
12880 (arguments): Likewise.
12881 (grubcmd): Likewise.
12882 (commands): Likewise.
12883 (function): Likewise.
12884 (menuentry): Likewise.
12885 (if_statement): Likewise.
12886 (if): Likewise.
12887
12888 * normal/script.c (grub_script_memused): Removed variable.
12889 (grub_script_parsed): Likewise.
12890 (grub_script_malloc): Added a state argument. Use that instead of
12891 global variables.
12892 (grub_script_mem_record): Likewise.
12893 (grub_script_mem_record_stop): Likewise.
12894 (grub_script_arg_add): Likewise.
12895 (grub_script_add_arglist): Likewise.
12896 (grub_script_create_cmdline): Likewise.
12897 (grub_script_create_cmdif): Likewise.
12898 (grub_script_create_cmdmenu): Likewise.
12899 (grub_script_add_cmd): Likewise.
12900 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12901
e2a8c904 129022006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12903
12904 * normal/command.c (grub_command_init): Remove the title command.
12905
12906 * normal/lexer.c (grub_script_yylex): Renamed from this...
12907 (grub_script_yylex2): ... to this.
12908 (grub_script_yylex): New function. Temporary
12909 introduced to filter some tokens.
12910 (grub_script_yyerror): Print a newline.
12911
12912 * normal/main.c (read_config_file): Output information about the
12913 lines that contain errors. Wait for a key after all lines have
12914 been processed. Don't return an empty menu.
12915
12916 * normal/parser.y (func_mem): Don't initialize.
12917 (menu_entry): Likewise.
12918 (err): New variable.
12919 (script): Don't return anything when an error was encountered.
12920 (ws, returns): Removed rules.
12921 (argument): Disabled concatenated variable support.
12922 (arguments): Remove explicit separators.
12923 (grubcmd): Likewise.
12924 (function): Likewise.
12925 (menuentry): Likewise.
12926 (if): Likewise.
12927 (commands): Likewise. Add error handling.
12928
12929 * normal/script.c (grub_script_create_cmdline): If
12930 `grub_script_parsed' is 0, assume the parser encountered an error.
12931
c9a86192 129322006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12933
12934 * configure.ac: Add support for EFI. Fix the typo
12935 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12936
70f3b243 129372006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12938
12939 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12940 foreign multibyte characters should be shown correctly.
12941
65f201ad 129422006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12943
12944 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12945 calculation.
12946 (read_config_file): Made it to close file before returning.
12947
b4b93674 129482006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12949
12950 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12951 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12952 video/i386/pc/vbefill.c.
12953
12954 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12955 video/i386/pc/vbefill.c.
12956
12957 * include/grub/video.h (grub_video_blit_format): New enum.
12958 (grub_video_mode_info): Added new member blit_format.
12959 (grub_video_get_blit_format): New function prototype.
12960
12961 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12962 function prototype.
12963 (grub_video_vbe_map_rgb): Likewise.
12964 (grub_video_vbe_unmap_color): Likewise.
12965
12966 * include/grub/i386/pc/vbeblit.h: New file.
12967
12968 * include/grub/i386/pc/vbefill.h: New file.
12969
12970 * video/video.c (grub_video_get_blit_format): New function.
12971 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12972 (grub_video_vbe_map_rgb): Likewise.
12973 (grub_video_vbe_unmap_color): Likewise.
12974
12975 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12976 optimized fills.
12977 (grub_video_vbe_blit_render_target): Changed to use more optimized
12978 blits.
12979 (grub_video_vbe_setup): Added detection for optimized settings.
12980 (grub_video_vbe_create_render_target): Likewise.
12981
12982 * video/i386/pc/vbeblit.c: New file.
12983
12984 * video/i386/pc/vbefill.c: New file.
12985
c2379b9c 129862006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12987
12988 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12989 here...
12990
12991 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12992 parsing to support both hex and dec ranges. If filename was missing
12993 show usage information.
12994
bd0d7896 129952006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12996
12997 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12998 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12999
13000 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13001 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13002 (video_mod_SOURCES): Added.
13003 (video_mod_CFLAGS): Likewise.
13004 (video_mod_LDFLAGS): Likewise.
13005 (gfxterm_mod_SOURCES): Likewise.
13006 (gfxterm_mod_CFLAGS): Likewise.
13007 (gfxterm_mod_LDFLAGS): Likewise.
13008 (videotest_mod_SOURCES): Likewise.
13009 (videotest_mod_CFLAGS): Likewise.
13010 (videotest_mod_LDFLAGS): Likewise.
13011 (vesafb_mod_SOURCES): Removed.
13012 (vesafb_mod_CFLAGS): Likewise.
13013 (vesafb_mod_LDFLAGS): Likewise.
13014 (vga_mod_SOURCES): Likewise.
13015 (vga_mod_CFLAGS): Likewise.
13016 (vga_mod_LDFLAGS): Likewise.
13017
13018 * commands/videotest.c: New file.
13019
13020 * font/manager.c (fill_with_default_glyph): Modified to use
13021 grub_font_glyph.
13022 (grub_font_get_glyph): Likewise.
13023 (fontmanager): Renamed from this...
13024 (font_manager): ... to this.
13025
13026 * include/grub/font.h (grub_font_glyph): Added new structure.
13027 (grub_font_get_glyph): Modified to use grub_font_glyph.
13028
13029 * include/grub/misc.h (grub_abs): Added as inline function.
13030
13031 * include/grub/video.h: New file.
13032
13033 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13034 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13035 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13036 (grub_vbe_get_controller_info): Renamed from this...
13037 (grub_vbe_bios_get_controller_info): ... to this.
13038 (grub_vbe_get_mode_info): Renamed from this...
13039 (grub_vbe_bios_get_mode_info): ... to this.
13040 (grub_vbe_set_mode): Renamed from this...
13041 (grub_vbe_bios_set_mode): ... to this.
13042 (grub_vbe_get_mode): Renamed from this...
13043 (grub_vbe_bios_get_mode): ... to this.
13044 (grub_vbe_set_memory_window): Renamed from this...
13045 (grub_vbe_bios_set_memory_window): ... to this.
13046 (grub_vbe_get_memory_window): Renamed from this...
13047 (grub_vbe_bios_get_memory_window): ... to this.
13048 (grub_vbe_set_scanline_length): Renamed from this...
13049 (grub_vbe_set_scanline_length): ... to this.
13050 (grub_vbe_get_scanline_length): Renamed from this...
13051 (grub_vbe_bios_get_scanline_length): ... to this.
13052 (grub_vbe_set_display_start): Renamed from this...
13053 (grub_vbe_bios_set_display_start): ... to this.
13054 (grub_vbe_get_display_start): Renamed from this...
13055 (grub_vbe_bios_get_display_start): ... to this.
13056 (grub_vbe_set_palette_data): Renamed from this...
13057 (grub_vbe_bios_set_palette_data): ... to this.
13058 (grub_vbe_set_pixel_rgb): Removed.
13059 (grub_vbe_set_pixel_index): Likewise.
13060
13061 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13062 from this...
13063 (grub_vbe_bios_get_controller_info): ... to this.
13064 (grub_vbe_get_mode_info): Renamed from this...
13065 (grub_vbe_bios_get_mode_info): ... to this.
13066 (grub_vbe_set_mode): Renamed from this...
13067 (grub_vbe_bios_set_mode): ... to this.
13068 (grub_vbe_get_mode): Renamed from this...
13069 (grub_vbe_bios_get_mode): ... to this.
13070 (grub_vbe_set_memory_window): Renamed from this...
13071 (grub_vbe_bios_set_memory_window): ... to this.
13072 (grub_vbe_get_memory_window): Renamed from this...
13073 (grub_vbe_bios_get_memory_window): ... to this.
13074 (grub_vbe_set_scanline_length): Renamed from this...
13075 (grub_vbe_set_scanline_length): ... to this.
13076 (grub_vbe_get_scanline_length): Renamed from this...
13077 (grub_vbe_bios_get_scanline_length): ... to this.
13078 (grub_vbe_set_display_start): Renamed from this...
13079 (grub_vbe_bios_set_display_start): ... to this.
13080 (grub_vbe_get_display_start): Renamed from this...
13081 (grub_vbe_bios_get_display_start): ... to this.
13082 (grub_vbe_set_palette_data): Renamed from this...
13083 (grub_vbe_bios_set_palette_data): ... to this.
13084 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13085 getting corrupted after calling it. Added more pushes and pops.
13086 (grub_vbe_bios_set_mode): Likewise.
13087 (grub_vbe_bios_get_mode): Likewise.
13088 (grub_vbe_bios_get_memory_window): Likewise.
13089 (grub_vbe_bios_set_scanline_length): Likewise.
13090 (grub_vbe_bios_get_scanline_length): Likewise.
13091 (grub_vbe_bios_get_display_start): Likewise.
13092 (grub_vbe_bios_set_palette_data): Likewise.
13093
13094 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13095 (cl_insert): Likewise.
13096 (cl_delete): Likewise.
13097
13098 * term/gfxterm.c: New file.
13099
13100 * term/i386/pc/vesafb.c: Removed file.
13101
13102 * video/video.c: New file.
13103
13104 * video/i386/pc/vbe.c (real2pm): Added new function.
13105 (grub_video_vbe_draw_pixel): Likewise.
13106 (grub_video_vbe_get_video_ptr): Likewise.
13107 (grub_video_vbe_get_pixel): Likewise
13108 (grub_video_vbe_init): Likewise.
13109 (grub_video_vbe_fini): Likewise.
13110 (grub_video_vbe_setup): Likewise.
13111 (grub_video_vbe_get_info): Likewise.
13112 (grub_video_vbe_set_palette): Likewise.
13113 (grub_video_vbe_get_palette): Likewise.
13114 (grub_video_vbe_set_viewport): Likewise.
13115 (grub_video_vbe_get_viewport): Likewise.
13116 (grub_video_vbe_map_color): Likewise.
13117 (grub_video_vbe_map_rgb): Likewise.
13118 (grub_video_vbe_map_rgba): Likewise.
13119 (grub_video_vbe_unmap_color): Likewise.
13120 (grub_video_vbe_fill_rect): Likewise.
13121 (grub_video_vbe_blit_glyph): Likewise.
13122 (grub_video_vbe_blit_bitmap): Likewise.
13123 (grub_video_vbe_blit_render_target): Likewise.
13124 (grub_video_vbe_scroll): Likewise.
13125 (grub_video_vbe_swap_buffers): Likewise.
13126 (grub_video_vbe_create_render_target): Likewise.
13127 (grub_video_vbe_delete_render_target): Likewise.
13128 (grub_video_vbe_set_active_render_target): Likewise.
13129 (grub_vbe_set_pixel_rgb): Remove function.
13130 (grub_vbe_set_pixel_index): Likewise.
13131 (index_color_mode): Remove static variable.
13132 (active_mode): Likewise.
13133 (framebuffer): Likewise.
13134 (bytes_per_scan_line): Likewise.
13135 (grub_video_vbe_adapter): Added new static variable.
13136 (framebuffer): Likewise.
13137 (render_target): Likewise.
13138 (initial_mode): Likewise.
13139 (mode_in_use): Likewise.
13140 (mode_list): Likewise.
13141
5f97350b 131422006-03-10 Marco Gerards <marco@gnu.org>
13143
13144 * configure.ac (AC_INIT): Bumped to 1.93.
13145
13146 * DISTLIST: Added `include/grub/hfs.h'.
13147
a3c5c6f8 131482006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13149
13150 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13151 18H, which might help the BIOS falling back to next boot media.
13152
6de53d26 131532006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13154
13155 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13156 Poe Chen <poe.poechen@gmail.com>.
13157
77c4a393 131582006-01-17 Marco Gerards <marco@gnu.org>
13159
13160 * include/grub/normal.h: Include <grub/script.h>.
13161 (grub_command_list): Removed struct.
13162 (grub_command_list_t): Removed type.
13163 (grub_menu_entry): Remove members `num' and `command_list'. Add
13164 members `commands' and `sourcecode'.
13165 * include/grub/script.h: Add inclusion guards.
13166 (grub_script_cmd_menuentry): New struct.
13167 (grub_script_execute_menuentry): New prototype.
13168 (grub_script_lexer_record_start): Likewise.
13169 (grub_script_lexer_record_stop): Likewise.
13170 * normal/execute.c (grub_script_execute_menuentry): New function.
13171 * normal/lexer.c (record, recording, recordpos, recordlen): New
13172 variables.
13173 (grub_script_lexer_record_start): New function.
13174 (grub_script_lexer_record_stop): Likewise.
13175 (recordchar): Likewise.
13176 (nextchar): Likewise.
13177 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13178 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13179 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13180 (current_menu): New variable.
13181 (free_menu): Mainly rewritten.
13182 (grub_normal_menu_addentry): New function.
13183 (read_config_file): Rewritten.
13184 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 13185 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 13186 the menu entry.
13187 (run): Mainly rewritten.
13188 * normal/parser.y (menu_entry): New variable.
13189 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13190 (menuentry): New rule.
13191 (command): Add `menuentry'.
13192 (if_statement): Allow additional returns before `fi'.
13193 * normal/script.c (grub_script_create_cmdmenu): New function.
13194
144f1f98 131952006-01-03 Marco Gerards <marco@gnu.org>
13196
13197 * INSTALL: GNU Bison is required.
13198 * configure.ac: Rewritten the test to detect Bison.
13199 * Makefile.in (YACC): New variable. Reported by Xun Sun
13200 <xun.sun.cn@gmail.com>.
13201
af4b2d89 132022006-01-03 Marco Gerards <marco@gnu.org>
13203
13204 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13205 the HFS+ filesystem to filesystem blocks.
13206 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13207 GCC warning is silenced.
13208
15643b71 132092006-01-03 Marco Gerards <marco@gnu.org>
13210
13211 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13212 read from disk from big endian to host byte order.
13213
00905879 132142006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13215
13216 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13217 documentation.
13218 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13219 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13220 embedded HFS+ filesystem.
13221 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13222 (grub_hfs_sblock): Move from here...
13223 * include/grub/hfs.h: To here... New file.
13224 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13225 documentation.
13226 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13227 New macros.
13228 (grub_hfsplus_volheader): Change type of member `magic' to
13229 `grub_uint16_t'.
13230 (grub_hfsplus_data): Add new member `embedded_offset'.
13231 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13232 returned block.
13233 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13234 Calculate the offset.
13235
8899bc3e 132362005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13237
13238 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13239 Removed.
13240 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13241
ae8c0277 132422005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13243
13244 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13245 ENV->NAME is NULL after allocating ENV->VALUE.
13246
07084456 132472005-12-25 Marco Gerards <marco@gnu.org>
13248
13249 * kern/env.c (grub_env_set): Rewritten the error handling code.
13250
4750f5f1 132512005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13252
13253 * geninit.sh: Made more robust, and more portable.
13254
50214199 132552005-12-25 Marco Gerards <marco@gnu.org>
13256
13257 Add support for Apple HFS+ filesystems.
f19dbdb7 13258
50214199 13259 * fs/hfsplus.c: New file.
13260
13261 * DISTLIST: Added `fs/hfsplus.c'.
13262
13263 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13264 (hfsplus_mod_SOURCES): New variable.
13265 (hfsplus_mod_CFLAGS): Likewise.
13266 (hfsplus_mod_LDFLAGS): Likewise.
13267 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13268 (grub_setup_SOURCES): Likewise.
13269 (grub_mkdevicemap_SOURCES): Likewise.
13270 (grub_emu_SOURCES): Likewise.
13271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13272
13273 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13274
13275 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13276
befaed6c 132772005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13278
13279 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13280 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13281 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13282 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13283 normal/lexer.c, normal/parser.y, normal/script.c, and
13284 partmap/gpt.c.
13285 Removed kern/sparc64/cache.c.
13286
13287 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13288 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13289 grub_emu_init.c.
13290
13291 * configure.ac (AC_INIT): Bumped to 1.92.
13292
6a124103 132932005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13294
13295 * kern/err.c (grub_error_push): Added new function to support error
13296 stacks.
13297 (grub_error_pop): Likewise.
13298 (grub_error_stack_items): New local variable to support error stacks.
13299 (grub_error_stack_pos): Likewise.
13300 (grub_error_stack_assert): Likewise.
13301 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13302 stack depth.
13303 (grub_print_error): Added support to print errors from error stack.
13304
13305 * include/grub/err.h (grub_error_push): Added function prototype.
13306 (grub_error_pop): Likewise.
13307
be973c1b 133082005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13309
13310 * configure.ac: Accept `powerpc64' as host_cpu.
13311 (amd64): Rename to `biarch32'.
13312
13313 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13314 non-cacheline-aligned addresses.
13315
13316 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13317 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13318 if `size' is non-zero.
13319
b04216ab 133202005-12-03 Marco Gerards <mgerards@xs4all.nl>
13321
13322 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13323 and `cd' to make sure the filename is not prefixed with a
13324 directory name.
13325 (pkgdata_MODULES): Add `gpt.mod'.
13326 (gpt_mod_SOURCES): New variable.
13327 (gpt_mod_CFLAGS): Likewise.
13328 (gpt_mod_LDFLAGS): Likewise.
13329
13330 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13331
13332 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13333 New macro.
13334
13335 * partmap/gpt.c: New file.
13336
13337 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13338 GPT partition map is detected.
13339
41730ed9 133402005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13341
13342 * commands/i386/pc/play.c: New file.
13343 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13344 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13345 macros.
f19dbdb7 13346
95dc3643 133472005-11-27 Marco Gerards <mgerards@xs4all.nl>
13348
13349 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13350 ((unused))' to silence gcc warning.
13351
1569ec51 133522005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13353
13354 * configure.ac: Correct `AC_PROG_YACC' test.
13355
9abde152 133562005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13357
13358 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13359 check before installing files.
13360
44b83271 133612005-11-22 Mike Small <smallm@panix.com>
13362
13363 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13364 number regex so multidigit numbers are recognized correctly.
13365
133662005-11-22 Mike Small <smallm@panix.com>
13367
13368 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13369 debugging message before attempting to claim memory.
13370 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13371 multiple addresses in case of failure.
13372
9c12956b 133732005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13374
13375 * term/tparm.c (get_space): Remove empty `if' statement.
13376
13377 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13378
13379 * kern/parser.c (check_varstate): Rename `state' to 's'.
13380
aeaf81d9 133812005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13382
13383 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13384 variable definitions to the beginning of each function. Sort stack
13385 variables by size.
13386 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13387 `buf' argument to `char *'.
13388
79bbb63f 133892005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13390
13391 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13392 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13393 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 13394 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13395 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13396 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13397 configfile.mod, search.mod, gzio.mod and test.mod.
13398 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13399 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13400 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13401 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13402 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13403 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13404 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13405 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13406 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13407 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13408 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13409 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13410 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13411 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13412 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13413 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13414 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13415 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13416 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13417 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13418 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13419 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13420 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13421
13422 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13423 `grep --include'.
13424 (pkgdata_MODULES): Add test.mod.
13425
233b1628 134262005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13427
13428 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13429 appending to variables with "+=".
13430 (PModule): Use full pathname to generate *.lst filenames.
13431
13432 * Makefile.in: Fixed list rules moved from genmk.rb.
13433 (.DELETE_ON_ERROR): New special target.
13434 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13435
13436 * conf/i386-pc.rmk: Include conf/common.mk.
13437 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13438 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 13439 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13440 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13441 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13442 configfile.mod, search.mod, gzio.mod and test.mod.
13443 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13444 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13445 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13446 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13447 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13448 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13449 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13450 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13451 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13452 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13453 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13454 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13455 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13456 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13457 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13458 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13459 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13460 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13461 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13462 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13463 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13464 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13465 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13466 here...
13467 * conf/common.rmk: ... to here. New file.
13468
13469 * conf/common.mk: New file.
13470
16f820c8 134712005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13472
13473 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13474 (grub_script.tab.c): ... here.
13475
13476 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13477 (grub_script.tab.c): ... here.
13478
13479 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13480 (grub_script.tab.c): ... here.
13481
13482 * normal/command.c (grub_command_find): Fixed a memory leak of
13483 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13484
63ba1554 134852005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13486
13487 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13488 "@" which marks the start of a comment on ARM.
13489 (VARIABLE): Likewise.
13490
7f67dc13 134912005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13492
79bbb63f 13493 Add support for Linux/ADFS partition tables.
7f67dc13 13494
13495 * partmap/acorn.c: New file.
13496
13497 * include/grub/acorn_filecore.h: Likewise.
13498
13499 * DISTLIST: Added `partmap/acorn.c' and
13500 `include/grub/acorn_filecore.h'.
f19dbdb7 13501
7f67dc13 13502 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13503 `partmap/acorn.c'.
13504 (pkgdata_MODULES): Add `acorn.mod'.
13505 (acorn_mod_SOURCES): New variable.
13506 (acorn_mod_CFLAGS): Likewise.
13507
13508 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13509 `partmap/acorn.c'.
13510 (pkgdata_MODULES): Add `acorn.mod'.
13511 (acorn_mod_SOURCES): New variable.
13512 (acorn_mod_CFLAGS): Likewise.
13513
13514 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13515 (pkgdata_MODULES): Add `acorn.mod'.
13516 (acorn_mod_SOURCES): New variable.
13517 (acorn_mod_CFLAGS): Likewise.
13518 (acorn_mod_LDFLAGS): Likewise.
13519
13520 * include/types.h (grub_disk_addr_t): New typedef.
13521
6d099807 135222005-11-13 Marco Gerards <mgerards@xs4all.nl>
13523
13524 * geninit.sh: New file.
13525
13526 * geninitheader.sh: Likewise.
13527
13528 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13529 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13530 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13531 * commands/configfile.c (grub_configfile_init)
13532 (grub_configfile_fini): Likewise.
13533 * commands/default.c (grub_default_init, grub_default_fini):
13534 Likewise.
13535 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13536 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13537 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13538 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13539 Likewise.
13540 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13541 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13542 Likewise.
13543 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 13544 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 13545 Likewise.
13546 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13547 Likewise.
fe6b695a 13548 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 13549 Likewise.
13550 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13551 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13552 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13553 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13554 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13555 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13556 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13557 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13558 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13559 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13560 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13561 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13562 * partmap/amiga.c (grub_amiga_partition_map_init)
13563 (grub_amiga_partition_map_fini): Likewise.
13564 * partmap/apple.c (grub_apple_partition_map_init)
13565 (grub_apple_partition_map_fini): Likewise.
13566 * partmap/pc.c (grub_pc_partition_map_init)
13567 (grub_pc_partition_map_fini): Likewise.
13568 * partmap/sun.c (grub_sun_partition_map_init,
13569 grub_sun_partition_map_fini): Likewise.
13570 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13571 Likewise.
13572
13573 * util/grub-emu.c: Include <grub_modules_init.h>.
13574 (main): Don't initialize and de-initialize any modules directly,
13575 use `grub_init_all' and `grub_fini_all' instead.
13576
13577 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13578 `grub_vesafb_mod_init'.
13579 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13580 all users.
13581 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13582 `grub_vga_mod_init'. Updated all users.
13583 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 13584
6d099807 13585 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13586 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13587 rules.
13588
13589 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13590 Generate a function to initialize the module in utilities.
13591 Updated all callers.
13592 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13593 initialize the module in utilities. Updated all callers.
13594
9046bcf0 135952005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13596
13597 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13598 escape sequence and a literal ^L to clear the screen.
13599
13600 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13601 when returning from Open Firmware.
13602
d13ea639 136032005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13604
13605 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13606 (grub_ofconsole_height): Likewise.
13607 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13608 manually insert a '\n'.
13609 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13610 `grub_ofconsole_height'. Return early if these are already set.
13611
a8fcf206 136122005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13613
13614 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13615 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13616 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13617 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13618 and `normal/script.c'.
13619 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13620 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13621 (test_mod_SOURCES): New variable.
13622 (test_mod_CFLAGS): Likewise.
13623 (test_mod_LDFLAGS): Likewise.
13624 (pkgdata_MODULES): Add `test.mod'.
13625 (grub_script.tab.c): New rule.
13626 (grub_script.tab.h): Likewise.
13627
b6b32745 136282005-11-07 Marco Gerards <mgerards@xs4all.nl>
13629
13630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13631 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13632 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13633 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13634 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13635 (test_mod_SOURCES): New variable.
13636 (test_mod_CFLAGS): Likewise.
13637 (pkgdata_MODULES): Add `test.mod'.
13638 (grub_script.tab.c): New rule.
13639 (grub_script.tab.h): Likewise.
13640
daac212a 136412005-11-06 Marco Gerards <mgerards@xs4all.nl>
13642
13643 Add initial scripting support.
13644
13645 * commands/test.c: New file.
13646 * include/grub/script.h: Likewise.
13647 * normal/execute.c: Likewise.
13648 * normal/function.c: Likewise.
13649 * normal/lexer.c: Likewise.
13650 * normal/parser.y: Likewise.
13651 * normal/script.c: Likewise.
13652
13653 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 13654
daac212a 13655 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13656 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13657 `normal/function.c' and `normal/script.c'.
13658 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13659 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 13660 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13661 variables.
daac212a 13662 (pkgdata_MODULES): Add `test.mod'.
13663 (grub_script.tab.c): New rule.
13664 (grub_script.tab.h): Likewise.
13665
13666 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13667
13668 * include/grub/normal.h (grub_test_init): New prototype.
13669 (grub_test_fini): Likewise.
f19dbdb7 13670
daac212a 13671 * normal/command.c: Include <grub/script.h>.
13672 (grub_command_execute): Rewritten.
f19dbdb7 13673
daac212a 13674 * util/grub-emu.c (main): Call `grub_test_init' and
13675 `grub_test_fini'.
13676
77500b2b 136772005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13678
13679 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13680 to 0.
13681 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13682 there are no pending characters.
13683
e45deb9e 136842005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13685
13686 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13687 `grub_strndup' to drop device arguments. Replace unnecessary
13688 `grub_strndup' with `grub_strdup'.
13689
4ce32619 136902005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13691
13692 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13693 `debug' environment variable has been set.
13694
136952005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13696
4ce32619 13697 * Makefile.in (install-local): Use $(DATA).
13698 (uninstall): Likewise.
13699 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13700 (sbin_UTILITIES): ... to here.
13701 (sbin_SCRIPTS): New variable.
13702 (grub_install_SOURCES): New variable.
13703 * util/powerpc/ieee1275/grub-install.in: New file.
13704 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13705 variable.
13706 (add_segments): Call `grub_util_get_path'.
13707
25fe6f03 137082005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13709
13710 From Timothy Baldwin:
13711 * commands/ls.c (grub_ls_list_files): Close FILE with
13712 grub_file_close.
13713 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13714
04ccf3ec 137152005-10-24 Marco Gerards <mgerards@xs4all.nl>
13716
13717 * include/grub/parser.h: New file.
13718
13719 * kern/parser.c: Likewise.
13720
13721 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13722 (grub_setup_SOURCES): Likewise.
13723 (grub_probefs_SOURCES): Likewise.
13724 (grub_emu_SOURCES): Likewise.
13725 (kernel_img_HEADERS): Add `parser.h'.
13726
13727 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13728 (grub_emu_SOURCES): Add `kern/parser.c'.
13729 (grubof_SOURCES): Likewise.
13730
13731 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13732 (grubof_SOURCES): Add `kern/parser.c'.
13733
13734 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13735
13736 * kern/misc.c (grub_split_cmdline): Removed function.
13737
13738 * kern/rescue.c: Include <grub/parser.h>.
13739 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13740 of `grub_split_cmdline'.
13741
13742 * normal/command.c: Include <grub/parser.h>.
13743 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13744 of `grub_split_cmdline'.
13745
13746 * normal/completion.c: Include <grub/parser.h>.
13747 (cmdline_state): New variable.
13748 (iterate_dir): End the filename with a quote depending on the
13749 command line state.
13750 (get_state): new function.
13751 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13752 split the arguments and determine the current argument. When the
13753 argument string is not quoted, escape all spaces.
13754
6d8f4b0e 137552005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13756
13757 * normal/sparc64/setjmp.S: New file.
13758
15cf03ed 137592005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13760
13761 * include/grub/sparc64/libgcc.h: New file.
13762 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13763 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13764 normal/sparc64/setjmp.c.
13765
03e8661a 137662005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13767
13768 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13769 * kern/sparc64/cache.S: New file.
13770 * kern/sparc64/cache.c: Removed.
13771 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13772 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13773 -mtune=ultrasparc.
13774 (COMMON_LDFLAGS): Add -melf64_sparc.
13775 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13776 (grubof_SOURCES): Use cache.S instead of cache.c.
13777 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13778 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13779 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13780 commented though.
13781 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13782 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13783 (linux_mod_CFLAGS): Commented out.
13784 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13785 out because module isn't built.
13786 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13787 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13788 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13789 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13790 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13791 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13792 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13793 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13794 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13795 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13796 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13797 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13798 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13799 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13800
34eeec8a 138012005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13802
13803 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13804 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13805 longer, because HFS should not be used on PC.
13806
708367a3 138072005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13808
13809 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13810 consistently within the loop.
13811
6fa1251a 138122005-10-15 Marco Gerards <mgerards@xs4all.nl>
13813
13814 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13815 directory can not be read.
13816
4801580b 138172005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13818
13819 * configure.ac (AC_INIT): Increase the version number to 1.91.
13820
13821 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13822 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13823 term/i386/pc/serial.c.
13824
219ad426 138252005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13826
13827 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13828 file size must be permitted.
13829
13830 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13831 between %ah and %al.
13832
688e5699 138332005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13834
13835 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13836 grub_uint64_t.
13837 Call the hook with a NUL-terminated filename.
13838 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13839 grub_cpu_to_be32.
13840
13841 * kern/term.c (cursor_state): New variable.
13842 (grub_term_set_current): Reset the cursor state on a new
13843 terminal.
13844 (grub_setcursor): Rewritten to use CURSOR_STATE.
13845 (grub_getcursor): New function.
13846
13847 * include/grub/term.h (grub_getcursor): New prototype.
13848
13849 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13850 integers on ARM. Reported by Timothy Baldwin
13851 <T.E.Baldwin99@members.leeds.ac.uk>.
13852
bb34586c 138532005-10-11 Marco Gerards <mgerards@xs4all.nl>
13854
13855 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13856 allocated.
13857 (grub_sfs_dir): Likewise.
13858
9a909877 138592005-10-09 Marco Gerards <mgerards@xs4all.nl>
13860
13861 Add support for the SFS filesystem.
13862
13863 * fs/sfs.c: New file.
13864
13865 * DISTLIST: Added `fs/sfs.c'.
13866
13867 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13868 (grub_probefs_SOURCES): Likewise.
13869 (grub_emu_SOURCES): Likewise.
13870 (pkgdata_MODULES): Add `sfs.mod'.
13871 (sfs_mod_SOURCES): New variable.
13872 (sfs_mod_CFLAGS): Likewise.
13873 (sfs_mod_LDFLAGS): Likewise.
13874
13875 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13876 (pkgdata_MODULES): Add `sfs.mod'.
13877 (sfs_mod_SOURCES): New variable.
13878 (sfs_mod_CFLAGS): Likewise.
13879
13880 * util/grub-emu.c (main): Call `grub_sfs_init' and
13881 `grub_sfs_fini'.
13882
13883 * include/grub/fs.h (grub_sfs_init): New prototype.
13884 (grub_sfs_fini): Likewise.
13885
57bdbde3 138862005-10-07 Marco Gerards <mgerards@xs4all.nl>
13887
13888 Add support for the AFFS filesystem.
13889
13890 * fs/affs.c: New file.
13891
13892 * DISTLIST: Added `fs/affs.c'.
13893
13894 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13895 (grub_probefs_SOURCES): Likewise.
13896 (grub_emu_SOURCES): Likewise.
13897 (pkgdata_MODULES): Add `affs.mod'.
13898 (affs_mod_SOURCES): New variable.
13899 (affs_mod_CFLAGS): Likewise.
13900 (affs_mod_LDFLAGS): Likewise.
13901
13902 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13903 (pkgdata_MODULES): Add `affs.mod'.
13904 (affs_mod_SOURCES): New variable.
13905 (affs_mod_CFLAGS): Likewise.
13906
13907 * util/grub-emu.c (main): Call `grub_affs_init' and
13908 `grub_affs_fini'.
13909
13910 * include/grub/fs.h (grub_affs_init): New prototype.
13911 (grub_affs_fini): Likewise.
13912
047b67e0 139132005-10-01 Marco Gerards <mgerards@xs4all.nl>
13914
13915 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13916
59b8208a 139172005-10-01 Marco Gerards <mgerards@xs4all.nl>
13918
13919 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13920 `-m32' to CFLAGS.
13921
13922 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13923 linking.
f19dbdb7 13924
59b8208a 13925 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13926 (COMMON_LDFLAGS): New variable.
13927 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13928 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13929 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13930 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13931 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13932 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13933 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13934 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13935 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13936 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13937 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13938 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13939 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13940 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13941 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13942 variables.
13943 (normal_mod_ASFLAGS): Add `-m32'.
13944
13945 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13946 (grub_host_size_t, grub_host_ssize_t): New types.
13947 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13948 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13949 `GRUB_HOST_SIZEOF_VOID_P'.
13950
13951 * include/grub/kernel.h (struct grub_module_header): Type of
13952 member offset changed to `grub_host_off_t'. Type of member size
13953 changed to `grub_host_size_t'.
13954 (struct grub_module_info): Type of member offset changed to
13955 `grub_host_off_t'. Type of member size changed to
13956 `grub_host_size_t'.
13957
b4093103 139582005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13959
13960 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 13961
b4093103 13962 * kern/i386/pc/startup.S (multiboot_header): New label.
13963 (multiboot_entry): Likewise.
13964 (multiboot_trampoline): Likewise.
13965
13966 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13967 Increased to 0x4A0.
13968
13969 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13970 put parentheses after a question mark.
13971 [!GRUB_UTIL] (my_mod): New variable.
13972
13973 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13974
b2499b29 139752005-09-28 Marco Gerards <mgerards@xs4all.nl>
13976
13977 Adds support for the XFS filesystem. Btrees are not supported
13978 yet.
13979
13980 * fs/xfs.c: New file.
13981
13982 * DISTLIST: Added `fs/xfs.c'.
13983
13984 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13985 (grub_probefs_SOURCES): Likewise.
13986 (grub_emu_SOURCES): Likewise.
13987 (pkgdata_MODULES): Add `xfs.mod'.
13988 (xfs_mod_SOURCES): New variable.
13989 (xfs_mod_CFLAGS): Likewise.
13990
13991 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13992 (pkgdata_MODULES): Add `xfs.mod'.
13993 (xfs_mod_SOURCES): New variable.
13994 (xfs_mod_CFLAGS): Likewise.
13995
13996 * util/grub-emu.c (main): Call `grub_xfs_init' and
13997 `grub_xfs_fini'.
13998
13999 * include/grub/fs.h (grub_xfs_init): New prototype.
14000 (grub_xfs_fini): Likewise.
14001
f19dbdb7 14002
83d37a62 140032005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14004
14005 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14006 color modes, allow greater than 16 colors to be configured as
14007 a default palette.
14008
47d2d65e 140092005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14010
14011 * normal/completion.c (complete_arguments): Add the qualifier
14012 const into OPTIONS.
14013
14014 From Omniflux <omniflux+lists@omniflux.com>:
14015 * include/grub/terminfo.h: New file.
14016 * include/grub/tparm.h: Likewise.
14017 * include/grub/i386/pc/serial.h: Likewise.
14018 * term/terminfo.c: Likewise.
14019 * term/tparm.c: Likewise.
14020 * term/i386/pc/serial.c: Likewise.
14021 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14022 serial.mod.
14023 (terminfo_mod_SOURCES): New variable.
14024 (terminfo_mod_CFLAGS): Likewise.
14025 (serial_mod_SOURCES): Likewise.
14026 (serial_mod_CFLAGS): Likewise.
14027
48b671ff 140282005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14029
14030 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14031 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14032 and kern/powerpc/ieee1275/cmain.c, respectively.
14033
14034 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14035 * kern/powerpc/ieee1275/crt0.S: ... here.
14036
14037 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14038 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 14039
48b671ff 14040 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14041 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14042 instead of boot/powerpc/ieee1275/crt0.S and
14043 boot/powerpc/ieee1275/cmain.c, respectively.
14044
14045 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14046 sectors. It was not used anyway.
14047
09fc77a7 140482005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14049
14050 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14051 `unused parameter' warning.
14052
003789c7 140532005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14054
14055 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14056 function.
14057 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14058 getcharwidth.
14059
67f44c86 140602005-08-28 Marco Gerards <metgerards@student.han.nl>
14061
14062 * include/grub/normal.h (enum grub_completion_type): Added
14063 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14064
14065 * normal/cmdline.c (print_completion): Handle
14066 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14067 * normal/menu_entry.c (store_completion): Likewise.
14068
14069 * normal/completion.c (complete_arguments): New function.
14070 (grub_normal_do_completion): Call `complete_arguments' when the
14071 current words start with a dash.
14072
0b5abe02 140732005-08-27 Marco Gerards <metgerards@student.han.nl>
14074
14075 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14076 `gzio.mod' instead of `io.mod').
14077
d9864ee1 140782005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14079
14080 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14081 (DISTDIRS): Added io and video.
14082 Rewrite the search routine to make an output consistently.
14083
14084 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14085 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14086 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14087 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14088 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14089 util/powerpc/ieee1275/misc.c.
f19dbdb7 14090
d9864ee1 14091 * include/grub/gzio.h: New file.
14092 * io/gzio.c: Likewise.
f19dbdb7 14093
d9864ee1 14094 * kern/file.c (grub_file_close): Call grub_device_close only if
14095 FILE->DEVICE is not NULL.
14096
14097 * include/grub/mm.h [!NULL] (NULL): New macro.
14098
14099 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14100
14101 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14102 (pkgdata_MODULES): Added gzio.mod.
14103 (gzio_mod_SOURCES): New variable.
14104 (gzio_mod_CFLAGS): Likewise.
14105
14106 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14107 (pkgdata_MODULES): Added gzio.mod.
14108 (gzio_mod_SOURCES): New variable.
14109 (gzio_mod_CFLAGS): Likewise.
14110
14111 * commands/cat.c: Include grub/gzio.h.
14112 (grub_cmd_cat): Use grub_gzfile_open instead of
14113 grub_file_open.
f19dbdb7 14114
d9864ee1 14115 * commands/cmp.c: Include grub/gzio.h.
14116 (grub_cmd_cmp): Use grub_gzfile_open instead of
14117 grub_file_open.
14118
14119 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14120 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14121 grub_file_open.
14122 (grub_rescue_cmd_module): Likewise.
14123
fa46f4b5 141242005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14125
14126 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14127 kern/sparc64/ieee1275/init.c because it contains _start.
14128 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14129
e9211b5d 141302005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14131
14132 * configure.ac: Add support for sparc64 host with ieee1275
14133 firmware.
14134 * configure: Generated from configure.ac.
14135 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14136 instead of int.
14137 (grub_ofdisk_read): Likewise.
14138 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14139 pointers as (void *) to remove a warning.
14140 (grub_ofdisk_close): Likewise.
14141 (grub_ofdisk_read): Likewise.
14142 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14143 returns, so make it return void to remove a warning.
14144 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14145 Corresponding prototype change.
14146 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14147 values, and cast the pointers as (void *) to remove a warning.
14148 (grub_mm_dump): Likewise.
14149 * conf/sparc64-ieee1275.mk: New file.
14150 * conf/sparc64-ieee1275.rmk: Likewise.
14151 * include/grub/sparc64/setjmp.h: Likewise.
14152 * include/grub/sparc64/types.h: Likewise.
14153 * include/grub/sparc64/ieee1275/console.h: Likewise.
14154 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14155 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14156 * include/grub/sparc64/ieee1275/time.h: Likewise.
14157 * kern/sparc64/cache.c: Likewise.
14158 * kern/sparc64/dl.c: Likewise.
14159 * kern/sparc64/ieee1275/init.c: Likewise.
14160 * kern/sparc64/ieee1275/openfw.c: Likewise.
14161
385c6a92 141622005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14163
14164 * util/console.c (grub_ncurses_putchar): If C is greater than
14165 0x7f, set C to a question mark.
14166 (grub_ncurses_getcharwidth): New function.
14167 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14168 getcharwidth.
14169
14170 * normal/menu.c (print_entry): Made aware of Unicode. First,
14171 convert TITLE to UCS-4, and predict the cursor position by
14172 grub_getcharwidth.
14173
14174 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14175 const to SRC.
14176 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14177
16ccb8b1 141782005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14179
14180 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14181 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14182 grub_strcat.
14183
14184 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14185 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14186 grub_strcpy and grub_strlen. Take it into account that a space
14187 character is inserted as a delimiter.
14188
6a85ce79 141892005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14190
14191 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 14192 invalid magic in the error.
6a85ce79 14193
14194 * commands/search.c: New file.
f19dbdb7 14195
6a85ce79 14196 * util/grub-emu.c (main): Call grub_search_init and
14197 grub_search_fini.
14198
14199 * kern/rescue.c (grub_rescue_print_disks): Removed.
14200 (grub_rescue_print_devices): New function.
14201 (grub_rescue_cmd_ls): Use grub_device_iterate with
14202 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14203 grub_rescue_print_disks.
14204
14205 * kern/partition.c (grub_partition_iterate): Return the result of
14206 PARTMAP->ITERATE instead of GRUB_ERRNO.
14207
14208 * kern/device.c: Include grub/partition.h.
14209 (grub_device_iterate): New function.
14210
14211 * include/grub/partition.h (grub_partition_iterate): Return int
14212 instead of grub_err_t.
14213
14214 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14215 prototype.
14216 [GRUB_UTIL] (grub_search_fini): Likewise.
14217
14218 * include/grub/device.h (grub_device_iterate): New prototype.
14219
14220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14221 commands/search.c.
14222 (pkgdata_MODULES): Added search.mod.
14223 (search_mod_SOURCES): New variable.
14224 (search_mod_CFLAGS): Likewise.
14225
14226 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14227 (pkgdata_MODULES): Added search.mod.
14228 (search_mod_SOURCES): New variable.
14229 (search_mod_CFLAGS): Likewise.
14230
14231 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14232 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14233 All callers changed.
14234
14235 * DISTLIST: Added commands/search.c.
14236
ef095434 142372005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14238
14239 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14240 conversion.
14241 (grub_getcharwidth): New function.
14242
14243 * kern/misc.c (grub_utf8_to_ucs4): New function.
14244
14245 * include/grub/term.h (struct grub_term): Added a new member
14246 "getcharwidth".
14247 (grub_getcharwidth): New prototype.
14248
14249 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14250
14251 * term/i386/pc/console.c (map_char): New function. Segregated from
14252 grub_console_putchar.
14253 (grub_console_putchar): Use map_char.
14254 (grub_console_getcharwidth): New function.
14255 (grub_console_term): Specified grub_console_getcharwidth as
14256 getcharwidth.
14257
14258 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14259 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14260
14261 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14262 GRUB_ERRNO.
14263 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14264 on grub_strtoul completely.
14265 (write_char): Declare local variables in the beginning of the
14266 function.
14267 (grub_vesafb_getcharwidth): New function.
14268 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14269 getcharwidth.
14270
1f0a95e4 142712005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14272
14273 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14274 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14275 commands/i386/pc/vbetest.c.
14276
14277 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14278 call grub_vbe_get_controller_info again, because the returned
14279 information is volatile.
14280 (grub_vbe_set_video_mode): Mostly rewritten.
14281 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14282 grub_vbe_status_t correctly.
14283 (grub_vbe_get_video_mode_info): Likewise.
14284 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14285 several if statements.
14286
14287 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14288 * commands/i386/pc/vbeinfo.c: ... this.
14289
14290 * commands/i386/pc/vbe_test.c: Renamed to ...
14291 * commands/i386/pc/vbetest.c: ... this.
14292
14293 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14294 ...
14295 (grub_cmd_vbeinfo): ... this. Save video modes before
14296 iterating. Skip a video mode, if it is not available, not enough
14297 information is given or it is monochrome. Show the memory
14298 model. Leave the interpretation of MODEVAR to grub_strtoul
14299 completely.
14300 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14301 (GRUB_MOD_FINI): Likewise.
14302
14303 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14304 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14305 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14306 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14307 grub_strtoul completely.
14308 (real2pm): Removed.
14309 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14310 (GRUB_MOD_FINI): Likewise.
14311
14312 * normal/misc.c: Include grub/mm.h.
14313
14314 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14315 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14316 (vbe_list_modes_mod_SOURCES): Removed.
14317 (vbe_list_modes_mod_CFLAGS): Likewise.
14318 (vbe_test_mod_SOURCES): Likewise.
14319 (vbe_test_mod_CFLAGS): Likewise.
14320 (vbeinfo_mod_SOURCES): New variable.
14321 (vbeinfo_mod_CFLAGS): Likewise.
14322 (vbetest_mod_SOURCES): Likewise.
14323 (vbetest_mod_CFLAGS): Likewise.
14324
992ffbbe 143252005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14326
14327 * normal/misc.c: New file.
14328
14329 * DISTLIST: Added normal/misc.c.
f19dbdb7 14330
992ffbbe 14331 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14332 DISK to HOOK. Call HOOK with DISK.
14333 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14334 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14335 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14336
14337 * normal/menu_entry.c (struct screen): Added a new member
14338 "completion_shown".
14339 (completion_buffer): New global variable.
14340 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14341 (store_completion): New function.
14342 (complete): Likewise.
14343 (clear_completions): Likewise.
14344 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14345 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14346 a tab, call complete.
14347
14348 * normal/completion.c (disk_dev): Removed.
14349 (print_simple_completion): Likewise.
14350 (print_partition_completion): Likewise.
14351 (print_func): New global variable.
14352 (add_completion): Do not take the arguments WHAT or PRINT any
14353 longer. Added a new argument TYPE. Instead of printing directly,
14354 call PRINT_FUNC if not NULL.
14355 All callers changed.
14356 (complete_device): Use a local variable DEV instead of
14357 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14358 (grub_normal_do_completion): Take a new argument HOOK. Do not
14359 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14360 empty string, return NULL instead.
14361 All callers changed.
14362
14363 * normal/cmdline.c (print_completion): New function.
14364
14365 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14366 to HOOK.
14367 All callers changed.
14368
14369 * kern/disk.c (grub_print_partinfo): Removed.
14370
14371 * include/grub/partition.h (struct grub_partition_map): Add a new
14372 argument DISK into HOOK of ITERATE.
14373 (grub_partition_iterate): Add a new argument DISK to HOOK.
14374
14375 * include/grub/normal.h (enum grub_completion_type): New enum.
14376 (grub_completion_type_t): New type.
14377 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14378 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14379 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14380 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14381 (grub_normal_do_completion): Added a new argument HOOK.
14382 (grub_normal_print_device_info): New prototype.
14383
14384 * include/grub/disk.h (grub_print_partinfo): Removed.
14385
14386 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14387 (normal_mod_SOURCES): Likewise.
14388 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14389 (normal_mod_SOURCES): Likewise.
14390
14391 * commands/ls.c (grub_ls_list_disks): Use
14392 grub_normal_print_device_info instead of grub_print_partinfo. Free
14393 PNAME.
14394 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14395 duplicating the code.
14396
0bd41162 143972005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14398
14399 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 14400 follow GCS more precisely.
14401 * commands/i386/pc/vbe_test.c: Likewise.
14402 * include/grub/i386/pc/vbe.h: Likewise.
14403 * term/i386/pc/vesafb.c: Likewise.
14404 * video/i386/pc/vbe.c: Likewise.
0bd41162 14405
6323696a 144062005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14407
14408 * DISTLIST: Added term/i386/pc/vesafb.c
14409 DISTLIST: Added video/i386/pc/vbe.c
14410 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14411 DISTLIST: Added commands/i386/pc/vbe_test.c.
14412 * commands/i386/pc/vbe_list_modes.c: New file.
14413 * commands/i386/pc/vbe_test.c: Likewise.
14414 * term/i386/pc/vesafb.c: Likewise.
14415 * video/i386/pc/vbe.c: Likewise.
14416 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14417 (grub_vbe_probe) Added prototype.
14418 (grub_vbe_set_video_mode) Likewise.
14419 (grub_vbe_get_video_mode) Likewise.
14420 (grub_vbe_get_video_mode_info) Likewise.
14421 (grub_vbe_set_pixel_rgb) Likewise.
14422 (grub_vbe_set_pixel_index) Likewise.
14423 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14424 (pkgdata_MODULES): Added vesafb.mod.
14425 (pkgdata_MODULES): Added vbe_list_modes.mod.
14426 (pkgdata_MODULES): Added vbe_test.mod.
14427 (vbe_mod_SOURCES): Added.
14428 (vbe_mod_CFLAGS): Likewise.
14429 (vesafb_mod_SOURCES): Likewise.
14430 (vesafb_mod_CFLAGS): Likewise.
14431 (vbe_list_modes_mod_SOURCES): Likewise.
14432 (vbe_list_modes_mod_CFLAGS): Likewise.
14433 (vbe_test_mod_SOURCES): Likewise.
14434 (vbe_test_mod_CFLAGS): Likewise.
14435
0a74e62f 144362005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14437
0a74e62f 14438 * normal/command.c (grub_command_execute): If INTERACTIVE is
14439 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14440 CMDLINE. Disable the pager if INTERACTIVE is true.
14441 All callers are changed.
14442
14443 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14444 before reading a config file.
14445 * normal/main.c (read_config_file): Even if a command is not
14446 found, register it if it is within an entry.
14447
14448 * util/grub-emu.c: Include sys/types.h and unistd.h.
14449 (options): Added --hold.
14450 (struct arguments): Added a new member "hold".
14451 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14452 missing.
14453 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14454 cleared by a debugger, if it is not zero.
14455
14456 * include/grub/normal.h (grub_command_execute): Add an argument
14457 INTERACTIVE.
14458
e51f85ae 144592005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14460
14461 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14462
e9c6f39b 144632005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14464
14465 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14466 program with another one, because the old one didn't detect a bug
14467 in gcc-3.4. Always use regparm 2, because the new test is still
14468 not enough for gcc-4.0. Someone must investigate a simple test
14469 case which detects a bug in gcc-4.0.
14470
8de3495c 144712005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14472
14473 * DISTLIST: Added normal/completion.c.
14474
14475 * normal/completion.c: New file.
f19dbdb7 14476
8de3495c 14477 * term/i386/pc/console.c (grub_console_getwh): New function.
14478 (grub_console_term): Assign grub_console_getwh to getwh.
14479
14480 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14481 function is defined in normal/completion.c as
14482 grub_normal_do_completion.
14483 (grub_cmdline_get): Use grub_normal_do_completion instead of
14484 grub_tab_complete.
14485
14486 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14487 returns non-zero, otherwise return 0.
14488 (grub_partition_iterate): First, probe the partition map. Then,
14489 call ITERATE only for this partition map.
14490
14491 * kern/misc.c (grub_strncmp): Rewritten.
14492
14493 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14494 returns non-zero. Otherwise return 0.
14495
14496 * include/grub/partition.h (grub_partition_map_iterate): Return
14497 int instead of void.
14498
14499 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14500
14501 * include/grub/misc.h (grub_strncmp): Change the type of N to
14502 grub_size_t.
14503
14504 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14505 of void.
14506
14507 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 14508 unsigned explicitly before comparing it with I.
8de3495c 14509
14510 * kern/main.c (grub_env_write_root): Add the attribute unused into
14511 VAR.
14512
14513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14514 normal/completion.c.
14515 (normal_mod_SOURCES): Likewise.
14516 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14517 (normal_mod_SOURCES): Likewise.
14518
14519 * normal/command.c (grub_iterate_commands): If ITERATE returns
14520 non-zero, return one immediately.
14521
e85e144b 145222005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14523
14524 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14525 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14526 descriptions.
14527 (grub_vbe_get_controller_info): New function.
14528 (grub_vbe_get_mode_info): Likewise.
14529 (grub_vbe_set_mode): Likewise.
14530 (grub_vbe_get_mode): Likewise.
14531 (grub_vbe_set_memory_window): Likewise.
14532 (grub_vbe_get_memory_window): Likewise.
14533 (grub_vbe_set_scanline_length): Likewise.
14534 (grub_vbe_get_scanline_length): Likewise.
14535 (grub_vbe_set_display_start): Likewise.
14536 (grub_vbe_get_display_start): Likewise.
14537 (grub_vbe_set_palette_data): Likewise.
14538 * include/grub/i386/pc/vbe.h: New file.
14539
c46153d2 145402005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14541
14542 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14543 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14544 * DISTLIST: Likewise.
14545 * kern/ieee1275/of.c: Moved to ...
14546 * kern/ieee1275/ieee1275.c: ... here.
14547
0cb90c45 145482005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14549
14550 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14551 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14552 Pass 0 as `end' parameter to grub_strtoul().
14553
a19fb360 145542005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14555
14556 * include/grub/powerpc/ieee1275/console.h: Do not include
14557 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14558 ifdef.
14559 (grub_console_cur_color): Remove i386-specific prototype.
14560 (grub_console_real_putchar): Likewise.
14561 (grub_console_checkkey): Likewise.
14562 (grub_console_getkey): Likewise.
14563 (grub_console_getxy): Likewise.
14564 (grub_console_gotoxy): Likewise.
14565 (grub_console_cls): Likewise.
14566 (grub_console_setcursor): Likewise.
14567 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14568 Include <grub/machine/console.h>.
14569 * term/ieee1275/ofconsole.c: Likewise.
14570
4ac9bd04 145712005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14572
14573 * Makefile.in (LIBLZO): New variable.
14574
14575 * configure.ac: Check for LZO version 2.
14576
14577 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14578 lzo/lzo1x.h instead of lzo1x.h.
14579
14580 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14581 of -llzo.
14582
14583 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14584 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14585
14586 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14587 copying the data from PARTITION to P.
14588
f4917dfd 145892005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14590
14591 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14592 negative, unload the module.
14593
14594 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14595 map is "pc_partition_map" but not "pc".
14596 (usage): Fix the description. The options are --boot-image and
14597 --core-image but not --boot-file or --core-file.
14598 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14599 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14600 DEFAULT_DIRECTORY.
14601
14602 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14603 --core-file. Specify INSTALL_DEVICE as an argument.
14604
14605 * util/console.c: Include config.h.
14606 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14607 [HAVE_NCURSES_H]: Include ncurses.h.
14608 [HAVE_CURSES_H]: Include curses.h.
14609 [!A_NORMAL] (A_NORMAL): Defined as zero.
14610 [!A_STANDOUT] (A_STANDOUT): Likewise.
14611
14612 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14613 -lncurses.
14614 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14615
14616 * configure.ac: Check for curses libraries and headers.
14617
14618 * Makefile.in (LIBCURSES): New variable.
14619
14620 * genmk.rb (Script::rule): Set the executable bits.
14621
14622 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14623 name of the PC partition map is "pc_partition_map" but not "pc".
14624
0e143073 146252005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14626
14627 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14628 (modules): Likewise.
14629 (usage): Added descriptions for --modules and --grub-probefs.
14630 Handle --modules and --grub-probefs. Save the arguments in MODULES
14631 and GRUB_PROBEFS, respectively.
14632 Auto-detect a filesystem module against GRUBDIR. If the result is
14633 empty and modules are not specified explicitly, abort the
14634 installation. Add the result to MODULES.
14635
14636 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14637 disk/powerpc/ieee1275/ofdisk.c,
14638 include/grub/powerpc/ieee1275/init.h and
14639 term/powerpc/ieee1275/ofconsole.c.
14640 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14641 term/ieee1275/ofconsole.c.
14642
14643 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14644
14645 * COPYING: Upgraded to the latest version. Only the address of the
14646 FSF office has changed.
f19dbdb7 14647
efd6e6d5 146482005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14649
14650 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14651 kern/ieee1275.c with kern/ieee1275/of.c.
14652
14653 * kern/ieee1275.c: Moved to ...
14654 * kern/ieee1275/of.c: ... here.
14655
8ceafda2 146562005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14657
14658 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 14659 readability.
8ceafda2 14660
14661 * config.guess: Updated to the latest version from gnulib.
14662 * config.sub: Likewise.
14663 * install.sh: Likewise.
14664 * mkinstalldirs: Likewise.
14665
14666 * include/grub/console.h: Removed. This file is arch-specific. Do
14667 not put this in include/grub.
14668
14669 * include/grub/i386/pc/console.h: Resurrected.
14670
14671 * util/console.c: Include grub/machine/console.h instead of
14672 grub/console.h.
14673 * util/grub-emu.c: Likewise.
14674
267f6cd9 146752005-08-04 Marco Gerards <metgerards@student.han.nl>
14676
14677 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14678 hardcoded value.
f19dbdb7 14679
267f6cd9 14680 From Vincent Pelletier <subdino2004@yahoo.fr>
14681 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14682 Redefined to use grub_getwh.
14683 (grub_term): New member named getwh.
14684 (grub_getwh): New prototype.
14685 * kern/term.c (grub_getwh): New function.
14686 * term/i386/pc/console.c (grub_console_getwh): New function.
14687 (grub_console_term): New member `getwh'.
14688 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14689 (grub_vga_term): New member `getwh'.
0b5abe02 14690 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 14691 grub_ssize_t.
14692 (grub_ofconsole_getw): New function.
14693 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14694 (grub_ofconsole_term): New field named getwh and new initial
14695 value.
14696
3be7266d 146972005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14698
14699 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14700 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14701 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14702 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14703 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14704 of <grub/machine/ieee1275.h>.
14705 * commands/ieee1275/reboot.c: Likewise.
14706 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14707 * kern/ieee1275.c: ... to here. All users updated. Change all
14708 parameter structs to use new type `grub_ieee1275_cell_t'.
14709 * term/powerpc/ieee1275/ofconsole.c: Move ...
14710 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14711 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14712 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14713 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14714 to return int.
14715 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14716 Remove unused prototypes. All users updated.
14717 * include/grub/powerpc/ieee1275/console.h: Removed.
14718 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14719 `grub_ieee1275_cell_t'.
14720 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14721 Cast comparisons with -1 to the correct type.
14722 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14723 type to match `grub_ieee1275_entry_fn'.
14724
8b5f3938 147252005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14726
14727 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14728
14729 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14730 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14731 partmap/sun.c.
14732 (grub_probefs_SOURCES): New variable.
14733
14734 * util/i386/pc/grub-probefs.c: New file.
14735
14736 * util/i386/pc/grub-setup.c (main): Call
14737 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14738 grub_hfs_init and grub_jfs_init to initialize the system. Call
14739 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14740 grub_pc_partition_map_fini to finish the system.
14741
ea409713 147422005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14743
14744 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14745 function.
14746 (grub_multiboot_load_elf32): Likewise.
14747 (grub_multiboot_is_elf64): Likewise.
14748 (grub_multiboot_load_elf64): Likewise.
14749 (grub_multiboot_load_elf): Likewise.
14750 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14751 an ELF32 or ELF64 file.
14752 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14753
14754 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14755 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14756 NULL before calling FS->LABEL.
14757 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14758 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14759 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14760 before calling FS->LABEL.
14761
141a288b 147622005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14763
14764 * util/i386/pc/grub-install.in (datadir): New variable.
14765 (libdir): Removed.
14766 (pkgdatadir): New variable.
14767 (pkglibdir): Removed.
14768
0d5f8a54 147692005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14770
14771 * DISTLIST: Added util/i386/pc/grub-install.in.
14772
14773 * util/i386/pc/grub-install.in: New file.
14774
14775 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14776 (grub_install_SOURCES): Likewise.
14777
14778 * genmk.rb: Added support for scripts.
14779 (Script): New class.
14780 (scripts): New variable.
14781
14782 * Makefile.in (install-local): Install sbin_SCRIPTS by
14783 INSTALL_SCRIPT.
14784 (uninstall): Remove sbin_SCRIPTS.
14785
14786 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14787 device, try to get a GRUB device by
14788 grub_util_biosdisk_get_grub_dev.
14789 Free DEST_DEV.
14790
14791 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14792 description for --device-map.
14793
5f968e1e 147942005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14795
14796 Change the semantics of variable hooks. They now return strings
14797 instead of error values.
f19dbdb7 14798
5f968e1e 14799 * util/i386/pc/grub-setup.c: Include grub/env.h.
14800 (setup): Use grub_device_set_root instead of grub_env_set.
14801
14802 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14803 grub_env_get instead of grub_device_set_root and
14804 grub_device_get_root, respectively.
14805
14806 * kern/main.c (grub_env_write_root): New function.
14807 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14808 grub_env_set instead of grub_device_set_root.
14809
14810 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14811 many variables.
14812 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14813 rather than calling ENV->WRITE_HOOK afterwards.
14814 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14815 passing a pointer of a pointer.
14816 (grub_register_variable_hook): Change the types of "read_hook" and
14817 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14818 respectively.
14819 Allocate the default empty string on the heap, because this string
14820 may be freed later.
14821
14822 * kern/device.c: Include grub/env.h.
14823 (grub_device_set_root): Removed.
14824 (grub_device_get_root): Likewise.
14825 (grub_device_open): Use grub_env_get instead of
14826 grub_device_get_root.
14827
14828 * include/grub/env.h (grub_env_read_hook_t): New type.
14829 (grub_env_write_hook_t): Likewise.
14830 (grub_env_var): Change the types of "read_hook" and "write_hook"
14831 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14832 (grub_register_variable_hook): Likewise.
14833
14834 * include/grub/device.h (grub_device_set_root): Removed.
14835 (grub_device_set_root): Likewise.
14836
14837 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14838 make sure that DIRNAME terminates with '/', so that
14839 grub_fat_find_dir will fail if PATH is not a directory.
14840
14841 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14842 from DIRNAME.
14843 Use the qualifier auto for print_files and print_files_long.
14844 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14845 as a regular file.
14846 Put a newline only if there is no error.
14847 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14848 used.
14849
896f0afd 148502005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14851
14852 * kern/partition.c (grub_partition_probe): Initialize PART to
14853 NULL. Otherwise, when no partition map is registered, this returns
14854 a garbage.
14855
b28b81b2 148562005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14857
14858 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14859 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14860 valid.
14861
5f3607e0 148622005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14863
14864 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14865 information on each device, if it does not have partitions. Print
14866 "Device" instead of "Disk", because this function is not specific
14867 to disk devices.
14868
14869 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14870 static to ensure that it is put on the memory rather than a
14871 register.
14872
502c87e8 148732005-07-17 Yoshinori Okuji <okuji@enbug.org>
14874
14875 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14876 (grub_cat_init): Likewise.
14877 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14878 (options): Likewise.
14879 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14880 (grub_configfile_init): Likewise.
14881 * font/manager.c (GRUB_MOD_INIT): Likewise.
14882 * commands/help.c (GRUB_MOD_INIT): Likewise.
14883 (grub_help_init): Likewise.
14884 * normal/command.c (grub_command_init): Likewise.
14885 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14886 * disk/loopback.c (grub_loop_init): Likewise.
14887 (GRUB_MOD_INIT): Likewise.
14888 * commands/ls.c (grub_ls_init): Likewise.
14889 (GRUB_MOD_INIT): Likewise.
14890 (options): Likewise.
14891 * commands/boot.c (grub_boot_init): Likewise.
14892 (GRUB_MOD_INIT): Likewise.
14893 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14894 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14895 (GRUB_MOD_INIT): Likewise.
14896 * commands/cmp.c (grub_cmp_init): Likewise.
14897 (GRUB_MOD_INIT): Likewise.
14898
14899 * normal/arg.c: Use <> instead of "" to include header files.
14900 (SHORT_ARG_HELP): New macro.
14901 (SHORT_ARG_USAGE): Likewise.
14902 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14903 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14904 descriptions.
14905 (find_short): Check if C is 'h' or 'u' explicitly.
14906 (grub_arg_show_help): Use space characters instead of tabs. Treat
14907 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14908 are shown with --help and --usage only if they are not used for
14909 the command itself.
14910 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14911 'h' and 'u'.
14912
14913 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14914 const into "longarg". Change the type of "shortarg" to int.
14915
f806d18e 149162005-07-17 Yoshinori Okuji <okuji@enbug.org>
14917
14918 * boot/i386/pc/boot.S (boot_drive_check): New label.
14919
14920 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14921 macro.
14922
14923 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14924 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14925
e293232b 149262005-07-17 Yoshinori Okuji <okuji@enbug.org>
14927
14928 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14929 When turning off Gate A20, skip the check and return immediately,
14930 because this is not fatal usually.
14931
ebedfd00 149322005-07-17 Yoshinori Okuji <okuji@enbug.org>
14933
14934 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14935 be 0x7C00 instead of 0x8000.
14936
14937 * boot/i386/pc/pxeboot.S: Rewritten.
14938
14939 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14940 EXT_C.
14941 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14942 result.
14943
654fc59f 149442005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14945
14946 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14947 robustness. This routine now supports a BIOS call and System
14948 Control Port A to modify the gate A20.
14949
14950 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14951 Increased to 0x440.
14952
09f9923f 149532005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14954
14955 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14956 device path and resulting ihandle.
14957 (grub_ofdisk_close): dprintf the ihandle being closed.
14958 (grub_ofdisk_read): dprintf function parameters.
14959 * kern/mm.c (grub_mm_init_region): Likewise.
14960 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14961 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14962 size, and boot arguments.
14963 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14964 before loading into memory.
14965 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14966 before loading into memory.
14967
7ef504d8 149682005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14969
14970 * kern/mm.c: Added much documentation.
14971 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14972 8, set to 5 instead of 8.
14973
e0f050c2 149742005-07-10 Yoshinori Okuji <okuji@enbug.org>
14975
14976 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14977
14978 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14979 (grub_mkdevicemap_SOURCES): New variable.
14980
14981 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14982 lib/device.c of GRUB Legacy.
14983
7224189a 149842005-07-10 Yoshinori Okuji <okuji@enbug.org>
14985
14986 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14987 instead of PATH is NULL.
14988
68c864eb 149892005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14990
14991 * commands/cmp.c (BUFFER_SIZE): New macro.
14992 (grub_cmd_cmp): Close the right file at the right time. Compare
14993 only data just read. Don't report files of different size as
14994 identical. Dynamically allocate buffers. Move variable
14995 declarations at the beginning of function.
14996
e6f3e614 149972005-07-09 Yoshinori Okuji <okuji@enbug.org>
14998
14999 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15000 reverse.
15001
f8f1559a 150022004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15003
15004 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15005 when backspace is pressed at beginning of line.
15006
39c9d41d 150072005-07-03 Yoshinori Okuji <okuji@enbug.org>
15008
15009 * DISTLIST: Added genfslist.sh.
15010
15011 * normal/main.c (fs_module_list): New variable.
15012 (autoload_fs_module): New function.
15013 (read_fs_list): Likewise.
15014 (grub_normal_execute): Call read_fs_list.
15015
15016 * kern/fs.c (grub_fs_autoload_hook): New variable.
15017 (grub_fs_probe): Added support for auto-loading.
15018
15019 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15020 (grub_fs_module_list_t): New type.
15021
15022 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15023 (grub_fs_autoload_hook): New prototype.
15024
15025 * genfslist.sh: New file.
f19dbdb7 15026
39c9d41d 15027 * genmk.rb: Added a rule to generate a filesystem list.
15028
121c1d83 150292005-06-30 Marco Gerards <metgerards@student.han.nl>
15030
15031 * configure.ac: Fix the test for cross-compiling.
15032
15033 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15034 define GRUB_UTIL anymore.
15035
15036 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15037 so this function works on other systems than just big endian.
15038 (load_modules): Likewise.
15039 (add_segments): Likewise.
15040
e75d76e1 150412005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15042
15043 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15044 contains `l' modifier, get a long from va_arg().
15045
50b5a0a7 150462005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15047
15048 * kern/mm.c (grub_free): If the next free block which is being
15049 merged is the first free block, set the first block to the block
15050 being freed.
15051 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15052
89371b20 150532005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15054
15055 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15056 `grub_ieee1275_chosen'.
15057
168d6e58 150582005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15059
15060 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15061 (grub_ieee1275_chosen): New variable.
15062 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15063 `chosen'.
15064 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15065 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15066 Rename first argument to `phandle' for consistency.
15067 (grub_ieee1275_get_property_length): Likewise.
15068 (grub_ieee1275_next_property): Likewise. Change type of first argument
15069 to grub_ieee1275_phandle_t.
15070 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15071 Move export next to declaration.
15072 (grub_ieee1275_chosen): New variable.
15073 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15074 Correct cosmetic typo.
15075 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15076 `grub_ieee1275_chosen'.
15077 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15078 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15079 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15080 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15081 `grub_ieee1275_chosen'.
15082
ca5baa3f 150832005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15084
15085 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15086 /chosen/bootargs.
15087 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15088 /chosen/bootargs as "variable=value" pairs.
15089
708b345f 150902005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15091
15092 * include/grub/misc.h (grub_dprintf): New macro.
15093 (grub_real_dprintf): New prototype.
15094 (grub_strword): Likewise.
15095 (grub_iswordseparator): Likewise.
15096 * kern/misc.c (grub_real_dprintf): New function.
15097 (grub_strword): Likewise.
15098 (grub_iswordseparator): Likewise.
15099
f4c5e67c 151002005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15101
15102 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15103 (roundup): Remove macro.
15104 (grub_ieee1275_flags): Make static.
15105 (grub_ieee1275_realmode): Remove.
15106 (grub_ieee1275_test_flag): New function.
15107 (grub_ieee1275_set_flag): Likewise.
15108 (find_options): Rename to `grub_ieee1275_find_options'; update
15109 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15110 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15111 (cmain): New prototype.
15112 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15113 `grub_ieee1275_flags' directly.
15114 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15115 machine/biosdisk.h.
15116 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15117 Don't include grub/machine/init.h.
15118 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15119 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15120 Remove prototype.
15121 (grub_ieee1275_realmode): Likewise.
15122 (grub_ieee1275_flag): New enum.
15123 (grub_ieee1275_test_flag): New prototype.
15124 (grub_ieee1275_set_flag): New prototype.
15125 * include/grub/powerpc/ieee1275/init.h: Remove file.
15126 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15127 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15128 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15129 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15130 comment.
15131 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15132 `grub_ieee1275_test_flag'.
15133 (grub_ieee1275_encode_devname): Likewise.
15134
ed16607e 151352005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15136
15137 * include/grub/powerpc/ieee1275/ieee1275.h
15138 (grub_ieee1275_encode_devname): New prototype.
15139 (grub_ieee1275_get_filename): Likewise.
15140 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15141 function.
15142 (grub_set_prefix): Likewise.
15143 (grub_machine_init): Call grub_set_prefix.
15144 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15145 (grub_parse_type): New enum.
15146 (grub_ieee1275_get_devargs): New function.
15147 (grub_ieee1275_get_devname): Likewise.
15148 (grub_ieee1275_parse_args): Likewise.
15149 (grub_ieee1275_get_filename): Likewise.
15150 (grub_ieee1275_encode_devname): Likewise.
15151
be369920 151522005-03-30 Marco Gerards <metgerards@student.han.nl>
15153
15154 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15155 `grub_loader_unset'.
15156
a5ce3a4a 151572005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15158
15159 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15160 instead of grub_ieee1275_interpret.
15161 (grub_halt_init): New function.
15162 (grub_halt_fini): Likewise.
15163 (GRUB_MOD_INIT): Correct message grammar.
15164 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15165 instead of grub_ieee1275_interpret.
15166 (grub_reboot_init): New function.
15167 (grub_reboot_fini): Likewise.
15168 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15169 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15170 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15171 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15172 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15173 function.
15174 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15175 Add prototype.
15176 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15177 prototype.
15178 (grub_halt): Likewise.
15179 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15180 (cmain): Remove __attribute__((unused)).
15181 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15182 (grub_heap_len): Likewise.
15183 (grub_machine_fini): New function.
15184 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15185 (grub_halt): Likewise.
15186 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15187 function.
15188 * util/powerpc/ieee1275/misc.c: New file.
15189
0058f771 151902005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15191
15192 * DISTLIST: New file.
15193 * gendistlist.sh: Likewise.
f19dbdb7 15194
0058f771 15195 * Makefile.in (COMMON_DISTFILES): Removed.
15196 (BOOT_DISTFILES): Likewise.
15197 (CONF_DISTFILES): Likewise.
15198 (DISK_DISTFILES): Likewise.
15199 (FS_DISTFILES): Likewise.
15200 (INCLUDE_DISTFILES): Likewise.
15201 (KERN_DISTFILES): Likewise.
15202 (LOADER_DISTFILES): Likewise.
15203 (TERM_DISTFILES): Likewise.
15204 (UTIL_DISTFILES): Likewise.
15205 (DISTFILES): Likewise.
15206 (uninstall): Uninstall files in $(pkgdata_DATA).
15207 (DISTLIST): New target.
15208 (distdir): Use the contents of the file DISTLIST to get a list of
15209 distributed files.
15210
46b3b8a5 152112005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15212
15213 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15214 descriptor. This is ported from GRUB Legacy.
15215
15216 * gencmdlist.sh: Added an extra semicolon to make it work with
15217 old sed versions. Reported by Robert Bihlmeyer
15218 <robbe@orcus.priv.at>.
15219
5822ff87 152202005-03-08 Yoshinori Okuji <okuji@enbug.org>
15221
15222 Automatic loading of commands is supported.
f19dbdb7 15223
5822ff87 15224 * normal/main.c (read_command_list): New function.
15225 (grub_normal_execute): Call read_command_list.
15226
15227 * normal/command.c (grub_register_command): Return zero or CMD.
15228 Allocate CMD->NAME from the heap.
15229 Initialize CMD->MODULE_NAME to zero.
15230 Find the same name as well. If the same command is found and it is
15231 a dummy command, overwrite members. If it is not a dummy command,
15232 return zero.
15233 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15234 (grub_command_find): If a dummy command is found, load a module
15235 and retry to find a command only once.
15236
15237 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15238 make sure that each command is loaded.
15239
15240 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15241 macro.
15242 (struct grub_command): Remove const from the member `name'.
15243 Add a new member `module_name'.
15244 (grub_register_command): Return grub_command_t.
15245
15246 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15247 sure that each command is loaded.
15248
15249 * genmk.rb (PModule::rule): Specify a module name without the
15250 suffix ".mod" to gencmdlist.sh.
15251
7b1f4b57 152522005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15253
15254 * gencmdlist.sh: New file.
f19dbdb7 15255
7b1f4b57 15256 * genmk.rb (PModule::rule): Generate a rule for a command list.
15257 Clean command.lst.
15258 Generate command.lst from $(COMMANDFILES).
15259
15260 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15261 (DATA): Added $(pkgdata_DATA).
15262 (install-local): Install files in $(pkgdata_DATA).
15263
062aaf39 152642005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15265
15266 * term/i386/pc/vga.c (debug_command): Removed.
15267 (GRUB_MOD_INIT): Do not register the command "debug".
15268
15269 From Hollis Blanchard:
15270 * commands/configfile.c: New file.
15271 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15272 commands/configfile.c.
15273 (pkgdata_MODULES): Added configfile.mod.
15274 (configfile_mod_SOURCES): New variable.
15275 (configfile_mod_CFLAGS): Likewise.
15276 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15277 commands/configfile.c.
15278 (pkgdata_MODULES): Added configfile.mod.
15279 (configfile_mod_SOURCES): New variable.
15280 (configfile_mod_CFLAGS): Likewise.
15281 * util/grub-emu.c (main): Call grub_configfile_init and
15282 grub_configfile_fini.
15283 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15284 prototype.
15285 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 15286
cee01aa6 152872005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15288
15289 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15290 address.
15291
15292 * commands/help.c (grub_cmd_help): Do not print newlines after
15293 the last command in print_command_help.
15294
93f3a1d8 152952005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15296
15297 * commands/default.h: New file.
15298 * commands/timeout.h: Likewise.
15299 * normal/context.c: Likewise.
f19dbdb7 15300
93f3a1d8 15301 * util/misc.c: Do not include sys/times.h.
15302 Include sys/time.h and grub/machine/time.h.
15303 (grub_get_rtc): Rewritten with gettimeofday.
15304
15305 * util/grub-emu.c (main): Call grub_default_init and
15306 grub_timeout_init before grub_normal_init, and call
15307 grub_timeout_fini and grub_default_fini after grub_main.
15308
15309 * util/console.c (grub_ncurses_checkkey): Return the read
15310 character or -1.
15311
15312 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15313 timeouts.
15314
15315 * normal/main.c (read_config_file): Push MENU. If this fails,
15316 print an error and wait for a user input.
15317 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15318 If a menu is empty or an error occurs, pop MENU.
15319 (grub_normal_execute): Pop and free MENU after grub_menu_run
15320 returns.
15321
15322 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15323
15324 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15325 include time.h.
15326 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15327 without GRUB_UTIL.
15328 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15329 time.h.
15330 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15331 without GRUB_UTIL.
15332
15333 * include/grub/normal.h (struct grub_menu_list): New struct.
15334 (grub_menu_list_t): New type.
15335 (struct grub_context): New struct.
15336 (grub_context_t): New type.
15337 (grub_register_command): Got rid of EXPORT_FUNC.
15338 (grub_unregister_command): Likewise.
15339 (grub_context_get): New prototype.
15340 (grub_context_get_current_menu): Likewise.
15341 (grub_context_push_menu): Likewise.
15342 (grub_context_pop_menu): Likewise.
15343 [GRUB_UTIL] (grub_default_init): Likewise.
15344 [GRUB_UTIL] (grub_default_fini): Likewise.
15345 [GRUB_UTIL] (grub_timeout_init): Likewise.
15346 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15347
15348 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15349 commands/timeout.c and normal/context.c.
15350 (pkgdata_MODULES): Added default.mod and timeout.mod.
15351 (normal_mod_SOURCES): Added normal/context.c.
15352 (default_mod_SOURCES): New variable.
15353 (default_mod_CFLAGS): Likewise.
15354 (timeout_mod_SOURCES): Likewise.
15355 (timeout_mod_CFLAGS): Likewise.
15356 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15357 conf/i386-pc.rmk.
15358 (pkgdata_MODULES): Added default.mod and timeout.mod.
15359 (normal_mod_SOURCES): Added normal/context.c.
15360 (default_mod_SOURCES): New variable.
15361 (default_mod_CFLAGS): Likewise.
15362 (timeout_mod_SOURCES): Likewise.
15363 (timeout_mod_CFLAGS): Likewise.
15364
15365 * Makefile.in (all-local): Added $(MKFILES).
15366
4ed2e1dd 153672005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15368
15369 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15370 (grub_emu_SOURCES): Likewise.
15371 (pkgdata_MODULES): Add `sun.mod'.
15372 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15373 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15374 `partmap/sun.c'.
15375 (pkgdata_MODULES): Add `sun.mod'.
15376 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15377 * include/grub/partition.h (grub_sun_partition_map_init): New
15378 prototype.
15379 (grub_sun_partition_map_fini): Likewise.
15380 * partmap/sun.c: New file.
15381 * util/grub-emu.c (main): Initialize and de-initialize the sun
15382 partitionmap support.
15383
4d4e372e 153842005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15385
15386 This implements an Emacs-like menu entry editor.
f19dbdb7 15387
4d4e372e 15388 * normal/menu_entry.c: New file.
f19dbdb7 15389
4d4e372e 15390 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15391 characters to ASCII.
15392 (saved_char): New variable.
15393 (grub_ncurses_checkkey): Rewritten completely.
15394 (grub_ncurses_getkey): Likewise.
15395 (grub_ncurses_init): Call raw instead of cbreak.
15396
15397 * normal/menu.c (print_entry): Do not put a space.
15398 (init_page): Renamed to ...
15399 (grub_menu_init_page): ... this. All callers changed.
15400 (edit_menu_entry): Removed.
15401 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15402
15403 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15404
15405 * kern/misc.c (grub_vprintf): Call grub_refresh.
15406
15407 * normal/menu.c (DISP_LEFT): Renamed to ...
15408 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15409 * normal/menu.c (DISP_UP): Renamed to ...
15410 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15411 * normal/menu.c (DISP_RIGHT): Renamed to ...
15412 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15413 * normal/menu.c (DISP_DOWN): Renamed to ...
15414 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15415 * normal/menu.c (DISP_HLINE): Renamed to ...
15416 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15417 * normal/menu.c (DISP_VLINE): Renamed to ...
15418 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15419 * normal/menu.c (DISP_UL): Renamed to ...
15420 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15421 * normal/menu.c (DISP_UR): Renamed to ...
15422 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15423 * normal/menu.c (DISP_LL): Renamed to ...
15424 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15425 * normal/menu.c (DISP_LR): Renamed to ...
15426 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15427 * normal/menu.c (TERM_WIDTH): Renamed to ...
15428 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15429 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15430 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15431 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15432 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15433 * normal/menu.c (TERM_MARGIN): Renamed to ...
15434 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15435 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15436 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15437 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15438 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15439 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15440 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15441 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15442 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15443 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15444 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15445 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15446 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15447 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15448 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15449 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15450 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15451 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15452 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15453 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15454 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15455 All callers changed.
15456
15457 * include/grub/normal.h: New prototype.
15458
15459 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15460 normal/menu_entry.c.
15461 (normal_mod_SOURCES): Likewise.
15462 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15463 (normal_mod_SOURCES): Likewise.
15464
e6b92c8a 154652005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15466
15467 * include/grub/normal.h (grub_halt_init): New prototype.
15468 (grub_halt_fini): Likewise.
15469 (grub_reboot_init): Likewise.
15470 (grub_reboot_fini): Likewise.
15471
15472 * util/grub-emu.c: Include signal.h.
15473 (main_env): New global variable.
15474 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15475 catch C-c.
15476 (grub_machine_fini): New function.
15477 (main): Call grub_halt_init and grub_reboot_init before
15478 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15479 Call setjmp with MAIN_ENV to go back afterwards.
15480 Call grub_machine_fini right before return.
15481
15482 * include/grub/util/misc.h: Include setjmp.h.
15483 (main_env): New prototype.
15484
15485 * include/grub/kernel.h (grub_machine_fini): New prototype.
15486 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15487 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15488
15489 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15490 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15491 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 15492
e6b92c8a 15493 * util/i386/pc/misc.c: New file.
f19dbdb7 15494
e6b92c8a 15495 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15496 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15497 commands/i386/pc/reboot.c.
15498
c642636f 154992005-02-14 Guillem Jover <guillem@hadrons.org>
15500
15501 * include/grub/dl.h (grub_dl_check_header): New prototype.
15502 (grub_arch_dl_check_header): Change return type to grub_err_t,
15503 remove size parameter and export function. Update all callers.
15504 * kern/dl.c (grub_dl_check_header): New function.
15505 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15506 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15507 are inside the core.
15508 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15509 independent ELF header checks.
15510 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15511 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15512 `grub_dl_check_header' instead of explicit checks. Check for the
15513 ELF type.
15514 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15515 `grub_dl_check_header' instead of explicit checks. Remove arch
15516 specific ELF header checks.
15517
e6b92c8a 15518 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15519 argument SIZE.
15520
5eabe94b 155212005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15522
15523 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15524 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15525
1b14a681 155262005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15527
15528 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 15529 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 15530 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 15531 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 15532 * partmap/amiga.c (amiga_partition_map_iterate): Return
15533 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15534 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15535
aca108aa 155362005-02-01 Guillem Jover <guillem@hadrons.org>
15537
15538 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15539 help info.
15540
c9f9c556 155412005-01-31 Marco Gerards <metgerards@student.han.nl>
15542
15543 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15544 Removed prototype.
15545 (grub_rescue_cmd_linux): New prototype.
15546 (grub_rescue_cmd_initrd): Likewise.
15547 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15548 `bi_rec'.
15549 (grub_linux_release_mem): Release the memory for the initrd.
15550 (grub_load_linux): Renamed from this...
15551 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15552 Changed `entry' not to be static. Loop over memory regions to
15553 find another one when the default fails.
15554 (grub_rescue_cmd_initrd): New function.
15555 (grub_linux_init): Remove function.
15556 (grub_linux_fini): Likewise.
15557 (GRUB_MOD_INIT): Register `initrd'.
15558 (GRUB_MOD_FINI): Unregister `initrd'.
15559 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15560 Function removed.
15561 (grub_linux_normal_fini): Likewise.
15562 (GRUB_MOD_INIT): Register `initrd'.
15563 (GRUB_MOD_FINI): Unregister `initrd'.
15564
990cf3aa 155652005-01-31 Marco Gerards <metgerards@student.han.nl>
15566
15567 * commands/help.c: New file.
15568 * normal/arg.c (show_help): Renamed to...
15569 (grub_arg_show_help): ... this.
15570 * commands/i386/pc/halt.c: New file.
15571 * commands/i386/pc/reboot.c: Likewise.
15572 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15573 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15574 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15575 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15576 variables.
15577 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15578 `commands/help.c'.
15579 (pkgdata_MODULES): Add `help.mod'.
15580 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15581 * grub/i386/pc/init.h (grub_reboot): New prototype.
15582 (grub_halt): Likewise.
15583 * include/grub/normal.h (grub_arg_show_help): New prototype.
15584 (grub_help_init): Likewise.
15585 (grub_help_fini): Likewise.
15586 * util/grub-emu.c (main): Initialize and deinitialize the help
15587 command.
15588
15589 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15590
15591 * normal/command.c (grub_command_init): Fixed the description of
15592 the `set' and `unset' commands.
15593
155942005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 15595
15596 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15597 function.
15598 * commands/ieee1275/halt.c: New file.
15599 * commands/ieee1275/reboot.c: Likewise.
15600 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15601 `__attribute__ ((unused))'. Some GCS related fixed.
15602 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15603 (grub_suspend_fini): Likewise.
15604 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15605 and `halt.mod'.
15606 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15607 (halt_mod_CFLAGS): New variables.
15608 * include/grub/powerpc/ieee1275/ieee1275.h
15609 (grub_ieee1275_interpret): New prototype.
15610
1ab09cc7 156112005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15612
15613 * include/grub/misc.h (memmove): New prototype.
15614 (memcpy): Likewise.
15615
8b8cbdb2 156162005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15617
15618 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15619 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15620
e3741a27 156212005-01-22 Marco Gerards <metgerards@student.han.nl>
15622
15623 * kern/misc.c (grub_strndup): Function rewritten.
15624
776bd780 156252005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15626
15627 * normal/menu.c (TERM_WIDTH): Macro redefined.
15628 (TERM_TOP_BORDER_Y): Likewise.
15629 (draw_border): Replaced while-loop by a for-loop. Make the number
15630 of lines consistent with the number of lines displayed in
15631 print_entries. Added a margin below the rectangle.
15632 (print_entry): Make the entry fit in the rectangle.
15633 (print_entries): Display the scroll arrows next to the right
15634 border.
15635
78026bce 156362005-01-21 Marco Gerards <metgerards@student.han.nl>
15637
15638 * fs/minix.c (grub_minix_find_file): Reserve more space for
15639 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15640 `grub_strncpy' to copy `path' into it.
15641
67bbaf0f 156422005-01-21 Marco Gerards <metgerards@student.han.nl>
15643
15644 Add the loopback device, a device via which files can be accessed
15645 as devices.
f19dbdb7 15646
67bbaf0f 15647 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15648 (pkgdata_MODULES): Add loopback.mod.
15649 (loopback_mod_SOURCES): New variable.
15650 (loopback_mod_CFLAGS): Likewise.
15651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15652 `disk/loopback.c'.
15653 (pkgdata_MODULES): Add loopback.mod.
15654 (loopback_mod_SOURCES): New variable.
15655 (loopback_mod_CFLAGS): Likewise.
15656 * disk/loopback.c: new file.
15657 * include/grub/normal.h (grub_loop_init): New prototype.
15658 (grub_loop_fini): New prototype.
15659 * util/grub-emu.c (main): Initialize and de-initialize loopback
15660 support.
15661 * include/grub/disk.h (grub_disk_dev_id): Add
15662 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15663
6f1c18bd 156642005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15665
15666 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15667 function.
15668 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15669 (suspend_mod_SOURCES): New variable.
15670 (suspend_mod_CFLAGS): Likewise.
15671 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15672 New prototype.
15673 * commands/ieee1275/suspend.c: New file.
15674
b38551da 156752005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15676
15677 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 15678 ((unused))' to `__attribute__ ((used))'.
b38551da 15679 (GRUB_MOD_FINI): Likewise.
15680 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15681 * genmk.rb (PModule): Assign space to common symbols when linking
15682 modules.
15683
777aff39 156842005-01-20 Marco Gerards <metgerards@student.han.nl>
15685
15686 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15687 `unsigned' arguments to `grub_size_t'.
15688 (grub_malloc): Likewise.
15689 (grub_realloc): Likewise.
15690 (grub_memalign): Likewise.
15691 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15692 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15693 * util/misc.c (grub_malloc): Likewise.
15694 (grub_realloc): Likewise.
15695 * kern/mm.c (get_header_from_pointer): Change the casts to
15696 `unsigned' into a cast to `grub_size_t'.
15697
15698 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15699 point to `currnode' when `currnode' is changed.
15700
15701 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15702 Schottelius <nico-linux@schottelius.org>.
15703
d0ff18e1 157042005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15705
15706 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15707 (note_path): Remove variable.
15708 (GRUB_IEEE1275_NOTE_NAME): New macro.
15709 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15710 (grub_ieee1275_note_hdr): New structure.
15711 (grub_ieee1275_note_desc): Likewise.
15712 (grub_ieee1275_note): Likewise.
15713 (load_note): Remove `dir' argument. All callers updated. Remove
15714 `note_img' and `path'. Do not load a file from `note_path'.
15715 Initialize a struct grub_ieee1275_note and write that to `out'.
15716 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15717
4ca7004c 157182005-01-05 Marco Gerards <metgerards@student.han.nl>
15719
15720 * util/misc.c (grub_util_read_image): Revert last change. It
15721 called `grub_util_read_at', which seeks from the beginning of the
15722 file.
15723
0b412211 157242005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15725
15726 * TODO: Add note about endianness in grub-mkimage.
15727 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15728 section.
15729 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15730 (grub_mkimage_SOURCES): New target.
15731 * include/grub/kernel.h (grub_start_addr): Remove variable.
15732 (grub_end_addr): Likewise.
15733 (grub_total_module_size): Likewise.
15734 (grub_kernel_image_size): Likewise.
15735 (GRUB_MODULE_MAGIC): New constant.
15736 (grub_module_info): New structure.
15737 (grub_arch_modules_addr): New prototype.
15738 (grub_get_end_addr): Remove prototype.
15739 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15740 * include/grub/powerpc/ieee1275/kernel.h: New file.
15741 * include/grub/util/misc.h (grub_util_get_fp_size): New
15742 prototype.
15743 (grub_util_read_at): Likewise.
15744 (grub_util_write_image_at): Likewise.
15745 * kern/main.c (grub_get_end_addr): Remove function.
15746 (grub_load_modules): Call grub_arch_modules_addr instead of using
15747 grub_end_addr. Look for a grub_module_info struct in memory. Use
15748 the grub_module_info fields instead of calling grub_get_end_addr
15749 as loop conditions. Move grub_add_unused_region code here.
15750 (grub_add_unused_region): Remove function.
15751 * kern/i386/pc/init.c: Include grub/cache.h.
15752 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15753 one call to add_mem_region.
15754 (grub_arch_modules_addr): New function.
15755 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15756 (grub_total_module_size): Likewise.
15757 Include grub/machine/kernel.h.
15758 (grub_arch_modules_addr): New function.
15759 * util/grub-emu.c (grub_end_addr): Remove variable.
15760 (grub_total_module_size): Likewise.
15761 (grub_arch_modules_addr): New function.
15762 * util/misc.c: Include unistd.h.
15763 (grub_util_get_fp_size): New function.
15764 (grub_util_read_at): Likewise.
15765 (grub_util_write_image_at): Likewise.
15766 (grub_util_read_image): Call grub_util_read_at.
15767 (grub_util_write_image): Call grub_util_write_image_at.
15768 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15769 additional memory in kernel_img for a struct grub_module_info.
15770 Fill in that grub_module_info.
15771 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15772
458786f8 157732005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15774
15775 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15776 New function.
15777 * include/grub/powerpc/ieee1275/ieee1275.h
15778 (grub_ieee1275_milliseconds): New prototype.
15779 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15780 Change to 1000.
15781 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15782 grub_ieee1275_milliseconds.
15783
ac507d1b 157842005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15785
15786 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15787 variable.
15788 (find_options): New function.
15789 (cmain): Call find_options.
15790 * include/grub/powerpc/ieee1275/ieee1275.h
15791 (grub_ieee1275_realmode): New extern variable.
15792 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15793 grub_map if grub_ieee1275_realmode is false.
15794
6b8fd1c4 157952004-12-29 Marco Gerards <metgerards@student.han.nl>
15796
15797 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15798 lines are inserted and make it work like readline. Reported by
15799 Vincent Pelletier <subdino2004@yahoo.fr>.
15800
8514a1e0 158012004-12-28 Marco Gerards <metgerards@student.han.nl>
15802
15803 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15804
15805 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15806 `kern/powerpc/cache.S'.
15807
924b6140 158082004-12-27 Marco Gerards <metgerards@student.han.nl>
15809
15810 * genmk.rb: Handle the `Program' class in the main loop. Written
15811 by Johan Rydberg <jrydberg@gnu.org>.
15812 (Program): New class.
15813 (programs): New variable.
15814 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15815 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15816 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15817 (help_arch): Function removed.
15818 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15819 `powerpc/libgcc.h' and `loader.h'.
15820 (pkgdata_PROGRAMS): New variable.
15821 (sbin_UTILITIES): Variable removed.
15822 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15823 (grubof_SOURCES): Variable re-defined so it only includes the
15824 core functionality.
15825 (grubof_CFLAGS): Remove `-DGRUBOF'.
15826 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15827 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15828 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15829 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15830 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15831 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15832 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15833 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15834 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15835 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15836 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15837 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15838 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15839 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15840 (pc_mod_CFLAGS): New variables.
15841 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15842 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15843 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15844 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15845 Moved from here...
15846 * include/grub/i386/pc/init.h (grub_os_area_addr)
15847 (rub_os_area_size): ... to here.
15848 * include/grub/powerpc/ieee1275/ieee1275.h
15849 (grub_ieee1275_entry_fn): Export symbol.
15850 * include/grub/powerpc/ieee1275/init.h: New file.
15851 * include/grub/powerpc/libgcc.h: Likewise.
15852 * include/grub/cache.h: Likewise.
15853 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15854 <hollis@penguinppc.org>.
15855 * kern/dl.c: Include <grub/cache.h>.
15856 (grub_dl_flush_cache): New function.
15857 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15858 for this module.
15859 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15860 (grub_console_init): Removed prototypes.
15861 (grub_machine_init): Don't initialize the modules anymore.
15862 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15863 static.
15864 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15865 Macro undef removed.
15866 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15867 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15868 relocation `R_PPC_REL32'. Return an error when the relocation is
15869 unknown.
15870 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15871 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15872 * util/misc.c (grub_arch_sync_caches): Likewise.
15873
e4b47e0c 158742004-12-19 Marco Gerards <metgerards@student.han.nl>
15875
15876 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15877 `symlist.c', add `grubof_symlist.c'.
15878 (symlist.c): Variable removed.
15879 (grubof_HEADERS): Variable added.
15880 (grubof_symlist.c): New target.
15881 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15882 `kernel_img_HEADERS'.
15883 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15884 * kern/powerpc/dl.c: New file.
15885 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15886 Function removed.
15887 (grub_arch_dl_relocate_symbols): Likewise.
15888 (grub_register_exported_symbols): Likewise.
15889
4ceb3636 158902004-12-13 Marco Gerards <metgerards@student.han.nl>
15891
15892 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15893 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15894 to fail instead. Reported by Vincent Pelletier
15895 <subdino2004@yahoo.fr>.
15896
15897 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15898 it is not allocated. Reported by Vincent Pelletier
15899 <subdino2004@yahoo.fr>.
15900
15901 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15902 output so the output looks better.
f19dbdb7 15903
3f1578fe 159042004-12-04 Marco Gerards <metgerards@student.han.nl>
15905
15906 Modulize the partition map support and add support for the amiga
15907 partition map.
f19dbdb7 15908
3f1578fe 15909 * commands/ls.c: Include <grub/partition.h> instead of
15910 <grub/machine/partition.h>.
15911 * kern/disk.c: Likewise.
15912 * kern/rescue.c: Likewise.
15913 * loader/i386/pc/chainloader.c: Likewise.
15914 * normal/cmdline.c: Likewise.
15915 * kern/powerpc/ieee1275/init.c: Likewise.
15916 (grub_machine_init): Call `grub_pc_partition_map_init',
15917 `grub_amiga_partition_map_init' and
15918 `grub_apple_partition_map_init'.
15919 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15920 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15921 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15922 `partition.h' and `pc_partition.h'.
15923 (grub_setup_SOURCES): Remove
15924 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15925 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15926 (grub_emu_SOURCES): Likewise.
15927 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15928 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15929 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15930 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15931 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15932 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15933 (grubof_SOURCES): Likewise.
15934 * disk/i386/pc/partition.c: File removed.
15935 * disk/powerpc/ieee1275/partition.c: Likewise.
15936 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15937 * include/grub/i386/pc/partition.h: Likewise.
15938 * kern/partition.c: New file.
15939 * partmap/amiga.c: Likewise.
15940 * partmap/apple.c: Likewise.
15941 * partmap/pc.c: Likewise.
15942 * include/grub/partition.h: Likewise..
15943 * include/grub/pc_partition.h: Likewise.
15944 * util/grub-emu.c: Include <grub/partition.h> instead of
15945 <grub/machine/partition.h>.
15946 (main): Call `grub_pc_partition_map_init',
15947 `grub_amiga_partition_map_init' and
15948 `grub_apple_partition_map_init' and deinitialize afterwards.
15949 * util/i386/pc/biosdisk.c: Include `#include
15950 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15951 `<grub/machine/partition.h>'.
15952 * util/i386/pc/grub-setup.c: Likewise.
15953 * util/i386/pc/biosdisk.c: Likewise.
15954 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15955 partition information in case of a PC partition.
15956 * util/i386/pc/grub-setup.c: Include `#include
15957 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15958 `<grub/machine/partition.h>'.
15959 (setup): Only access the PC specific partition information in case
15960 of a PC partition.
15961
0ef4ced9 159622004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15963
0ef4ced9 15964 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15965 (grub_longjmp): Likewise.
15966 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15967 20.
15968 * normal/powerpc/setjmp.S: New file.
15969 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15970 `normal/powerpc/setjmp.S'.
15971 (grubof_CFLAGS): Add `-DGRUBOF'.
15972 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15973 [GRUB_UTIL && !GRUBOF].
f19dbdb7 15974
19950e29 159752004-11-16 Marco Gerards <metgerards@student.han.nl>
15976
15977 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15978 property named `name'. Correctly handle the error returned by
15979 `grub_ieee1275_finddevice' if a device can not be opened.
15980
a2fea427 159812004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15982
15983 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15984 `actual' for negativity.
15985 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15986 kern/fshelp.c.
15987
41ea0ea3 159882004-11-01 Marco Gerards <metgerards@student.han.nl>
15989
15990 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15991 (PAGE_OFFSET): New macro.
15992 (CRTC_ADDR_PORT): Likewise.
15993 (CRTC_DATA_PORT): Likewise.
15994 (START_ADDR_HIGH_REGISTER): Likewise.
15995 (START_ADDR_LOW_REGISTER): Likewise.
15996 (GRAPHICS_ADDR_PORT): Likewise.
15997 (GRAPHICS_DATA_PORT): Likewise.
15998 (READ_MAP_REGISTER): Likewise.
15999 (INPUT_STATUS1_REGISTER): Likewise.
16000 (INPUT_STATUS1_VERTR_BIT): Likewise.
16001 (page): New variable.
16002 (wait_vretrace): New function.
16003 (set_read_map): Likewise.
16004 (set_start_address): Likewise.
16005 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16006 the right page.
16007 (check_vga_mem): Take the page into account.
16008 (write_char): Likewise.
16009 (write_cursor): Likewise.
16010 (scroll_up): Likewise. Copy the page to the page that is not
16011 shown and switch between both pages.
16012 (grub_vga_putchar): Fix off by one error.
16013 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16014 account.
16015
ad0bd20b 160162004-11-01 Marco Gerards <metgerards@student.han.nl>
16017
16018 Add support for iso9660 (including rockridge).
f19dbdb7 16019
ad0bd20b 16020 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16021 (iso9660_mod_SOURCES): New variable.
16022 (iso9660_mod_CFLAGS): Likewise.
16023 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16024 * include/grub/fs.h (grub_iso9660_init): New prototype.
16025 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16026 * fs/iso9660.c: New file.
16027
16028 * include/grub/misc.h (grub_strncat): New prototype.
16029 * kern/misc.c (grub_strncat): New function.
f19dbdb7 16030
ad0bd20b 16031 * fs/hfs.c (grub_hfs_mount): Translate the error
16032 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16033 * fs/jfs.c (grub_jfs_mount): Likewise.
16034 * fs/ufs.c (grub_ufs_mount): Likewise.
16035
a5477a59 160362004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16037
16038 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16039 which initialized BAT registers.
16040 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16041 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16042 Move from here...
16043 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16044 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16045 ... to here.
16046 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16047 (grub_mapclaim): Likewise.
16048 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16049 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16050 hand.
16051
9304c1f8 160522004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16053
16054 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16055 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16056 -ffreestanding and -msoft-float.
16057
86f4ae25 160582004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16059
16060 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16061 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16062 set in grub_ieee1275_flags.
16063
38912228 160642004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16065
16066 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16067 prototype.
16068 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16069 grub_console_init first.
16070 Change the memory range used for grub_ieee1275_claim and
16071 grub_mm_init_region.
16072 Print an error message if the claim fails.
16073 Include <grub/misc.h>.
16074
d1923dc8 160752004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16076
16077 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16078 Call grub_children_iterate for device nodes of type `scsi',
16079 `ide', or `ata'.
16080 (grub_ofdisk_open): Remove manual device alias resolution.
16081 Fix memory leak when device cannot be opened.
f19dbdb7 16082 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 16083 (grub_children_iterate): New prototype.
16084 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16085 New function.
16086 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16087 Return -1 if args.size was -1.
16088
4512e4f3 160892004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16090
16091 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16092 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16093 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16094 Open Firmware's memory for it; claim memory from _start to _end.
16095 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16096 (_end): New extern.
16097 (_start): Zero BSS from __bss_start to _end.
16098 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16099 New extern.
16100 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16101
4d61feb0 161022004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16103
ad0bd20b 16104 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16105 -1 if args.base was -1.
4d61feb0 16106
026fa2f9 161072004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16108
16109 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16110 escape sequence instead of a literal ^L. Also call
16111 grub_ofconsole_gotoxy.
16112
9f2220ef 161132004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16114
16115 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16116 void * arguments to grub_addr_t. All callers updated. Also make
16117 the `result' argument optional.
16118 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16119 All callers updated.
16120
8a572cd7 161212004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16122
16123 * commands/ls.c (grub_ls_list_files): Use the string following the
16124 initial ')', if present, as the filesystem path.
16125 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16126
16127 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16128
18aa81f2 161292004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16130
16131 Make the source code of the menu interface more readable.
f19dbdb7 16132
18aa81f2 16133 * normal/menu.c: Include grub/mm.h.
16134 (TERM_WIDTH): New macro.
16135 (TERM_HEIGHT): Likewise.
16136 (TERM_INFO_HEIGHT): Likewise.
16137 (TERM_MARGIN): Likewise.
16138 (TERM_SCROLL_WIDTH): Likewise.
16139 (TERM_TOP_BORDER_Y): Likewise.
16140 (TERM_LEFT_BORDER_X): Likewise.
16141 (TERM_BORDER_WIDTH): Likewise.
16142 (TERM_MESSAGE_HEIGHT): Likewise.
16143 (TERM_BORDER_HEIGHT): Likewise.
16144 (TERM_NUM_ENTRIES): Likewise.
16145 (TERM_FIRST_ENTRY_Y): Likewise.
16146 (TERM_ENTRY_WIDTH): Likewise.
16147 (TERM_CURSOR_X): Likewise.
16148 (draw_border): Use macros instead of magic numbers.
16149 (print_entry): Likewise.
16150 (print_entries): Likewise.
16151 (run_menu): Likewise. Also, handle the key 'e'.
16152 (run_menu_entry): Ignore empty command lines.
16153 (print_message): Added a new argument EDIT. If EDIT is true,
16154 print a different message.
16155 (init_page): Likewise.
16156 (edit_menu_entry): New function. Not implemented yet.
16157
b47efe30 161582004-09-17 Marco Gerards <metgerards@student.han.nl>
16159
16160 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16161 can be loaded from normal mode.
f19dbdb7 16162
b47efe30 16163 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16164 `multiboot.mod'.
16165 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16166 (multiboot_mod_CFLAGS): New variables.
16167 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 16168 * loader/i386/pc/multiboot_normal.c: Likewise.
16169
b47efe30 16170 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16171 attribute `unused'.
f19dbdb7 16172
b47efe30 16173 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16174 `fdiro' to read the mode information from instead of `diro'.
16175
16176 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16177 looking up a symlink.
16178
16179 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16180 macro.
16181 * normal/command.c (grub_command_execute): Don't parse the
16182 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16183 flags of the command.
16184
16185 * normal/menu.c (grub_menu_run): Fix typo.
16186
da75ac71 161872004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16188
16189 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16190
16191 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16192 `y + 1' instead of `y - 1'.
16193
16194 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 16195
062b24c2 161962004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16197
16198 From Hollis Blanchard <hollis@penguinppc.org>:
16199 * kern/misc.c (memmove): New alias for grub_memmove.
16200 (memcmp): New alias for grub_memcmp.
16201 (memset): New alias for grub_memset.
f19dbdb7 16202 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 16203 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 16204 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 16205 (grub_ieee1275_get_property): Likewise.
f19dbdb7 16206
8ddad845 162072004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16208
16209 Added normal mode command `chainloader' as module chain.mod, which
16210 depends on normal.mod and _chain.mod.
f19dbdb7 16211
8ddad845 16212 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16213 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16214 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16215 Deleted prototype.
16216 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16217 but arguments parsing moved to ...
16218 (grub_chainloader_cmd): ... here. New function.
16219 * include/grub/i386/pc/chainloader.h: New file.
16220 * loader/i386/pc/chainloader_normal.c: Likewise.
16221
2c1f4ce3 162222004-09-11 Marco Gerards <metgerards@student.han.nl>
16223
16224 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16225 (grub_mkimage_LDFLAGS): Likewise.
16226 (grub_emu_SOURCES): Likewise.
16227 (kernel_img_HEADERS): Added fshelp.h.
16228 * fs/ext2.c: Include <grub/fshelp.h>.
16229 (FILETYPE_REG): New macro.
16230 (FILETYPE_INO_REG): Likewise.
16231 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16232 Changed all users.
16233 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16234 all users.
16235 (grub_fshelp_node): New struct.
16236 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16237 to a pointer.
16238 (grub_ext2_get_file_block): Removed function.
16239 (grub_ext2_read_block): New function.
16240 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16241 This function was written.
16242 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16243 (grub_ext2_find_file): Removed function.
16244 (grub_ext2_read_symlink): New function.
16245 (grub_ext2_iterate_dir): Likewise.
16246 (grub_ext2_open): Rewritten.
16247 (grub_ext2_dir): Rewritten.
16248 * include/grub/fshelp.h: New file.
16249 * fs/fshelp.c: Likewise.
16250
3c52136a 162512004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16252
16253 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16254 (print_message): Add a missing newline.
16255 (run_menu): Added timeout support.
16256 (run_menu_entry): New local function.
16257 (grub_menu_run): Added support for booting.
16258
16259 * kern/loader.c (grub_loader_is_loaded): New function.
16260
16261 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16262 (grub_get_rtc): Exported.
16263
16264 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16265 (grub_get_rtc): Exported.
16266
16267 * include/grub/normal.h (struct grub_command_list): Remove
16268 constant from the member `command'.
16269
16270 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16271
16272 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16273
16274 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16275
aa033560 162762004-08-28 Marco Gerards <metgerards@student.han.nl>
16277
16278 Add support for the JFS filesystem.
16279
16280 * fs/jfs.c: New file.
16281 * include/grub/fs.h (grub_jfs_init): New prototype.
16282 (grub_jfs_fini): New prototype.
16283 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16284 (grub_emu_SOURCES): Likewise.
16285 (pkgdata_MODULES): Add jfs.mod.
16286 (jfs_mod_SOURCES): New variable.
16287 (jfs_mod_CFLAGS): Likewise.
16288 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16289 (grubof_SOURCES): Likewise.
16290 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16291
16292 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16293 endian to the host endian.
16294 (grub_fat_utf16_to_utf8): Move function from there...
16295 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 16296 the endianness of the source string anymore.
aa033560 16297 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16298
94bc45af 162992004-08-24 Marco Gerards <metgerards@student.han.nl>
16300
16301 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16302 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16303 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16304 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 16305
94bc45af 16306 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16307 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16308 for `node_found' and `it_dir'.
16309 (grub_hfs_dir): Add prototype for `dir_hook'.
16310
16311 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16312 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16313 and `indir32' to silence a gcc warning.
16314
16315 * include/grub/fs.h (grub_hfs_init): New prototype.
16316 (grub_hfs_fini): Likewise.
f19dbdb7 16317
16318
97543f08 163192004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16320
16321 Each disk device has its own id now. This is useful to make use
16322 of multiple disk devices.
f19dbdb7 16323
97543f08 16324 * include/grub/disk.h (grub_disk_dev_id): New enum.
16325 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16326 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16327
16328 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16329 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16330
16331 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16332 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16333
16334 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16335 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16336
16337 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16338 "id" which is used by the cache manager.
16339
16340 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16341 of just "GRUB".
16342
64372eb4 163432004-08-18 Marco Gerards <metgerards@student.han.nl>
16344
16345 * fs/hfs.c: New file.
16346 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16347 (grub_emu_SOURCES): Likewise.
16348 (pkgdata_MODULES): Add hfs.mod.
16349 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16350 (grubof_SOURCES): Likewise.
16351 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16352
16353 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16354 * kern/misc.c (grub_strncasecmp): Add function.
16355
cc61b58f 163562004-08-14 Marco Gerards <metgerards@student.han.nl>
16357
16358 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16359 with parentheses.
16360
16361 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16362 (grub_ext2_dir): In case the directory entry type is unknown, read
16363 it from the inode.
16364
0ef123f6 163652004-08-02 Peter Bruin <pjbruin@dds.nl>
16366
16367 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16368 grub_load_linux instead of grub_rescue_cmd_linux as second
16369 argument of grub_rescue_register_command.
16370
16371 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16372
a447c5df 163732004-07-27 Marco Gerards <metgerards@student.han.nl>
16374
16375 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16376 function.
16377 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16378 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16379 `loader/powerpc/ieee1275/linux.c',
16380 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16381 * include/grub/powerpc/ieee1275/ieee1275.h
16382 (grub_ieee1275_release): New prototype.
16383 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16384 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16385 normal, boot, linux and linux_normal.
16386 * loader/powerpc/ieee1275/linux.c: New file.
16387 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16388
5a9e3546 163892004-07-12 Marco Gerards <metgerards@student.han.nl>
16390
16391 * normal/arg.c (grub_arg_parse): Correct error handling after
16392 reallocating the argumentlist (check if `argl' is not null instead
16393 of checking if `args' is not null).
16394 * kern/mm.c (grub_realloc): Return the same pointer when using the
16395 same region, instead of returning the header address.
16396
e15199cb 163972004-07-11 Marco Gerards <metgerards@student.han.nl>
16398
16399 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16400 one block instead of two when looking for the initial partition.
16401 (grub_partition_probe): Initialize the local variable `p' with 0.
16402 Use base 10 for the grub_strtoul call.
16403 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16404 need for one local variable.
16405 (grub_strtoul): Don't add the new value to `num', instead of that
16406 just assign it.
16407
020616c2 164082004-07-11 Marco Gerards <metgerards@student.han.nl>
16409
16410 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16411 (pxeboot_img_SOURCES): New variable.
16412 (pxeboot_img_ASFLAGS): Likewise.
16413 (pxeboot_img_LDFLAGS): Likewise.
16414 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16415 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16416 <lode_leroy@hotmail.com>.
16417
6c51eb64 164182004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16419
16420 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16421 there was no input.
16422
cfb12aff 164232004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16424
16425 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16426 the history buffer logic.
16427
6eabba74 164282004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16429
16430 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16431 (FILETYPE_INO_SYMLINK): New macros.
16432 (grub_ext2_find_file): Check if the node is a directory using the
16433 inode stat information instead of using the filetype in the
16434 dirent. Exclude the first character of an absolute symlink.
16435 (grub_ext2_dir): Mask out the filetype part of the mode member of
16436 the inode.
16437
66e19ef8 164382004-05-24 Marco Gerards <metgerards@student.han.nl>
16439
16440 Add support for UFS version 1 and 2. Add support for the minix
16441 filesystem version 1 and 2, both the variants with 14 and 30 long
16442 filenames.
f19dbdb7 16443
66e19ef8 16444 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16445 fs/minix.c.
16446 (grub_emu_SOURCES): Likewise.
16447 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16448 (ufs_mod_SOURCES): New variable.
16449 (ufs_mod_CFLAGS): Likewise.
16450 (minix_mod_SOURCES): Likewise.
16451 (minix_mod_CFLAGS): Likewise.
16452 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16453 fs/minix.c.
16454 (grubof_SOURCES): Likewise.
16455 * fs/ufs.c: New file.
16456 * fs/minix.c: New file.
16457 * include/grub/fs.h (grub_ufs_init): New prototype.
16458 (grub_ufs_fini): Likewise.
16459 (grub_minix_init): Likewise.
16460 (grub_minix_fini): Likewise.
16461 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16462 minix fs.
16463
cc2e748a 164642004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16465
16466 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16467 commands/ls.c, commands/terminal.c, commands/boot.c,
16468 commands/cmp.c and commands/cat.c.
16469 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16470
16471 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16472 "env.h"
16473
4b13b216 164742004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16475
16476 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16477 and grub_, respectively. Because the conversion is trivial and
16478 mechanical, I omit the details here. Please refer to the CVS
16479 if you need more information.
16480
6a142551 164812004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16482
16483 * include/pupa: Renamed to ...
16484 * include/grub: ... this.
16485 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16486 * util/i386/pc/grub-mkimage.c: ... this.
16487 * util/i386/pc/pupa-setup.c: Renamed to ...
16488 * util/i386/pc/grub-setup.c: ... this.
16489 * util/pupa-emu.c: Renamed to ...
16490 * util/grub-emu.c: ... this.
16491
e56cdf21 164922004-03-29 Marco Gerards <metgerards@student.han.nl>
16493
16494 Add support for the newworld apple macintosh (PPC). This has been
16495 tested on the powerbook 2000 only. It only adds support for
16496 generic ieee1275 functions, console and disk support. This should
16497 be easy to port to other architectures with support for Open
16498 Firmware.
f19dbdb7 16499
e56cdf21 16500 * configure.ac: Accept the powerpc as host_cpu. In the case of
16501 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16502 specific tests are only executed while building for the i386.
16503 Inverse test for crosscompile.
16504 * genmk.rb (Utility): Allow assembler files.
16505 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16506 * conf/powerpc-ieee1275.rmk: New file.
16507 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16508 * disk/powerpc/ieee1275/partition.c: Likewise.
16509 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16510 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16511 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16512 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16513 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16514 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16515 * include/pupa/powerpc/ieee1275/loader.h
16516 * include/pupa/powerpc/setjmp.h: Likewise.
16517 * include/pupa/powerpc/types.h: Likewise.
16518 * kern/powerpc/ieee1275/init.c: Likewise.
16519 * kern/powerpc/ieee1275/openfw.c: Likewise.
16520 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16521
16522 These files were written by Johan Rydberg
16523 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 16524
e56cdf21 16525 * boot/powerpc/ieee1275/cmain.c: New file.
16526 * boot/powerpc/ieee1275/crt0.S: Likewise.
16527 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16528 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16529
8c8cc205 165302004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16531
16532 * Makefile.in: Update copyright.
16533 * genmodsrc.sh: Likewise.
16534 * gensymlist.sh: Likewise.
16535 * term/i386/pc/vga.c: Indent correctly.
16536
16537 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16538 bugreporting address.
16539 * util/i386/pc/pupa-setup.c (usage): Likewise,
16540 (main): Call pupa_ext2_init and pupa_ext2_fini.
16541
f19dbdb7 16542 * fs/fat.c (log2): Renamed to ...
8c8cc205 16543 (fat_log2): ... this.
16544 All callers changed.
16545 * kern/misc.c (memcpy): Alias to pupa_memmove.
16546 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16547 lvalue cast.
16548 * util/console.c (pupa_ncurses_fini): Return 0.
16549
16550 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16551 Move fail label here.
16552 [__GNU__]: Don't warn when using stat.
16553 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16554 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16555 long int. Use strtol instead of strtoul.
f19dbdb7 16556
db1771cf 165572004-03-14 Marco Gerards <metgerards@student.han.nl>
16558
16559 * commands/boot.c: New file.
16560 * commands/cat.c: Likewise.
16561 * commands/cmp.c: Likewise.
16562 * commands/ls.c: Likewise.
16563 * commands/terminal.c: Likewise.
16564 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16565 (pupa_register_command): Changed interface to match the new
16566 argument parser.
16567 (pupa_command_execute): Changed (almost rewritten) so it uses
16568 pupa_split_command. Added support for setting variables using the
16569 syntax `foo=bar'.
16570 (rescue_command): Changed to work with the new argument parser.
16571 (terminal_command): Moved from here to commands/terminal.c.
16572 (set_command): New function.
16573 (unset_command): New function.
16574 (insmod_command): New function.
16575 (rmmod_command): New function.
16576 (lsmod_command): New function.
16577 (pupa_command_init): Don't initialize the command terminal
16578 anymore. Initialize the commands set, unset, insmod, rmmod and
16579 lsmod.
16580 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16581 (kernel_img_HEADERS): Add arg.h and env.h.
16582 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16583 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16584 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16585 normal/arg.c.
16586 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16587 terminal.mod.
16588 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16589 (boot_mod_SOURCES): New variable.
16590 (terminal_mod_SOURCES): Likewise.
16591 (ls_mod_SOURCES): Likewise.
16592 (cmp_mod_SOURCES): Likewise.
16593 (cat_mod_SOURCES): Likewise.
16594
16595 * normal/arg.c: New file.
16596 * kern/env.c: Likewise.
16597 * include/pupa/arg.h: Likewise.
16598 * include/pupa/env.h: Likewise.
16599 * font/manager.c (font_command): Changed to match argument parsing
16600 interface changes.
16601 (PUPA_MOD_INIT): Likewise.
16602 * hello/hello.c (pupa_cmd_hello): Likewise.
16603 (PUPA_MOD_INIT): Likewise.
16604 * include/pupa/disk.h: Include <pupa/device.h>.
16605 (pupa_print_partinfo): New prototype.
16606 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16607 (pupa_dl_get_prefix): Likewise.
16608 * include/pupa/misc.h: Include <pupa/err.h>.
16609 (pupa_isgraph): New prototype.
16610 (pupa_isdigit): Likewise.
16611 (pupa_split_cmdline): Likewise.
16612 * include/pupa/normal.h: Include <pupa/arg.h>.
16613 (pupa_command): Changed the prototype of the member `func' to
16614 match the argument parsing interface. Added member `options'.
16615 (pupa_register_command): Updated to match function.
16616 (pupa_arg_parse): New prototype.
16617 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16618 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16619 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16620 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16621 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16622 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16623 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16624 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16625 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16626 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16627 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16628 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16629 * kern/disk.c: Include <pupa/file.h>.
16630 (pupa_print_partinfo): New function.
16631 * kern/dl.c: Include <pupa/env.h>.
16632 (pupa_dl_dir): Variable removed.
16633 (pupa_dl_load): Use the environment variable `prefix' instead of
16634 the variable pupa_dl_dir.
16635 (pupa_dl_set_prefix): Function removed.
16636 (pupa_dl_get_prefix): Likewise.
16637 * kern/i386/pc/init.c: Include <pupa/env.h>.
16638 (pupa_machine_init): Use the environment variable `prefix' instead of
16639 using pupa_dl_set_prefix to set the prefix.
16640 * kern/main.c: Include <pupa/env.h>.
16641 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16642 using pupa_dl_get_prefix to get the prefix.
16643 * kern/misc.c: Include <pupa/env.h>.
16644 (pupa_isdigit): New function.
16645 (pupa_isgraph): Likewise.
16646 (pupa_ftoa): Likewise.
16647 (pupa_vsprintf): Added support for printing values of the type
16648 `double'. Make it possible to format variable output when using
16649 formatting like `%1.2%f'.
16650 (pupa_split_cmdline): New function.
16651 * kern/rescue.c: Include <pupa/env.h>.
16652 (next_word): Removed function.
16653 (pupa_rescue_cmd_prefix): Likewise.
16654 (pupa_rescue_cmd_set): New function.
16655 (pupa_rescue_cmd_unset): New function.
16656 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16657 split the command line instead of splitting it here. Added
16658 support for setting variables using the syntax `foo=bar'. Don't
16659 initialize the prefix command anymore. Initialized the set and
16660 unset commands.
16661 * normal/cmdline.c: Include <pupa/env.h>.
16662 (pupa_tab_complete): Added prototypes for print_simple_completion,
16663 print_partition_completion, add_completion, iterate_commands,
16664 iterate_dev, iterate_part and iterate_dir. Moved code to print
16665 partition information from here to kern/disk.c.
fe6b695a 16666 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 16667 * normal/main.c: Include <pupa/env.h>.
16668 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16669 instead of using pupa_dl_get_prefix to get the prefix.
16670 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16671 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16672 warning.
16673 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16674 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16675 ((unused))' to silence a gcc warning.
16676 (pupa_vga_setcolor): Likewise.
16677 (debug_command): Changed to match argument parsing
16678 interface changes.
16679 * util/pupa-emu.c: Include <pupa/env.h>.
16680 (options): Added 0's for unused fields to silence a gcc warning.
16681 (argp): Likewise.
16682 (main): Use the environment variable `prefix' instead of using
16683 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16684 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16685 and terminal.
16686
16687 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16688 * util/misc.c: Include <malloc.h>.
16689 (pupa_malloc): Rewritten so errors are correctly reported.
16690 (pupa_realloc): Likewise.
16691 (pupa_memalign): Likewise.
16692 (pupa_mm_init_region): Declare unused variables with
16693 `__attribute__ ((unused))' to silence a gcc warning.
16694 * normal/i386/setjmp.S: Remove tab at the end of the file to
16695 silence a gcc warning.
16696 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16697 variables with `__attribute__ ((unused))' to silence a gcc
16698 warning.
16699 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16700 local variable i unsigned to silence a gcc warning.
16701
16702 * kern/term.c: Include <pupa/misc.h>.
16703 (pupa_more_lines): New variable.
16704 (pupa_more): Likewise.
16705 (pupa_putcode): When the pager is active pause at the end of every
16706 screen.
16707 (pupa_set_more): New function.
16708 * include/pupa/term.h (pupa_set_more): New prototype.
16709
16710
3b1139cb 167112004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16712
16713 Now this project is GRUB 2 rather than PUPA. The location of
16714 the CVS repository was moved to GRUB's.
f19dbdb7 16715
3b1139cb 16716 * configure.ac: Use bug-grub as the reporting address.
16717 Use GRUB instead of PUPA.
16718 Change the version number to 1.90.
16719
8367695c 167202004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16721
16722 * genkernsyms.sh: Updated copyright information.
16723 * genmk.rb: Likewise.
16724 * genmodsrc.sh: Likewise.
16725 * gensymlist.sh: Likewise.
16726 * boot/i386/pc/boot.S: Likewise.
16727 * boot/i386/pc/diskboot.S: Likewise.
16728 * disk/i386/pc/biosdisk.c: Likewise.
16729 * disk/i386/pc/partition.c: Likewise.
16730 * font/manager.c: Likewise.
16731 * fs/ext2.c: Likewise.
16732 * fs/fat.c: Likewise.
16733 * include/pupa/boot.h: Likewise.
16734 * include/pupa/device.h: Likewise.
16735 * include/pupa/disk.h: Likewise.
16736 * include/pupa/dl.h: Likewise.
16737 * include/pupa/elf.h: Likewise.
16738 * include/pupa/err.h: Likewise.
16739 * include/pupa/file.h: Likewise.
16740 * include/pupa/font.h: Likewise.
16741 * include/pupa/fs.h: Likewise.
16742 * include/pupa/kernel.h: Likewise.
16743 * include/pupa/loader.h: Likewise.
16744 * include/pupa/misc.h: Likewise.
16745 * include/pupa/mm.h: Likewise.
16746 * include/pupa/net.h: Likewise.
16747 * include/pupa/normal.h: Likewise.
16748 * include/pupa/rescue.h: Likewise.
16749 * include/pupa/setjmp.h: Likewise.
16750 * include/pupa/symbol.h: Likewise.
16751 * include/pupa/term.h: Likewise.
16752 * include/pupa/types.h: Likewise.
16753 * include/pupa/i386/setjmp.h: Likewise.
16754 * include/pupa/i386/types.h: Likewise.
16755 * include/pupa/i386/pc/biosdisk.h: Likewise.
16756 * include/pupa/i386/pc/boot.h: Likewise.
16757 * include/pupa/i386/pc/console.h: Likewise.
16758 * include/pupa/i386/pc/init.h: Likewise.
16759 * include/pupa/i386/pc/kernel.h: Likewise.
16760 * include/pupa/i386/pc/linux.h: Likewise.
16761 * include/pupa/i386/pc/loader.h: Likewise.
16762 * include/pupa/i386/pc/memory.h: Likewise.
16763 * include/pupa/i386/pc/multiboot.h: Likewise.
16764 * include/pupa/i386/pc/partition.h: Likewise.
16765 * include/pupa/i386/pc/time.h: Likewise.
16766 * include/pupa/i386/pc/vga.h: Likewise.
16767 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16768 * include/pupa/util/getroot.h: Likewise.
16769 * include/pupa/util/misc.h: Likewise.
16770 * include/pupa/util/resolve.h: Likewise.
16771 * kern/device.c: Likewise.
16772 * kern/disk.c: Likewise.
16773 * kern/dl.c: Likewise.
16774 * kern/err.c: Likewise.
16775 * kern/file.c: Likewise.
16776 * kern/fs.c: Likewise.
16777 * kern/loader.c: Likewise.
16778 * kern/main.c: Likewise.
16779 * kern/misc.c: Likewise.
16780 * kern/mm.c: Likewise.
16781 * kern/rescue.c: Likewise.
16782 * kern/term.c: Likewise.
16783 * kern/i386/dl.c: Likewise.
16784 * kern/i386/pc/init.c: Likewise.
16785 * kern/i386/pc/lzo1x.S: Likewise.
16786 * kern/i386/pc/startup.S: Likewise.
16787 * loader/i386/pc/chainloader.c: Likewise.
16788 * loader/i386/pc/linux.c: Likewise.
16789 * loader/i386/pc/multiboot.c: Likewise.
16790 * normal/cmdline.c: Likewise.
16791 * normal/command.c: Likewise.
16792 * normal/main.c: Likewise.
16793 * normal/menu.c: Likewise.
16794 * normal/i386/setjmp.S: Likewise.
16795 * term/i386/pc/console.c: Likewise.
16796 * term/i386/pc/vga.c: Likewise.
16797 * util/console.c: Likewise.
16798 * util/genmoddep.c: Likewise.
16799 * util/misc.c: Likewise.
16800 * util/pupa-emu.c: Likewise.
16801 * util/resolve.c: Likewise.
16802 * util/unifont2pff.rb: Likewise.
16803 * util/i386/pc/biosdisk.c: Likewise.
16804 * util/i386/pc/getroot.c: Likewise.
16805 * util/i386/pc/pupa-mkimage.c: Likewise.
16806 * util/i386/pc/pupa-setup.c: Likewise.
16807
e6eced71 168082004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16809
16810 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16811 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16812 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16813 reading and reset it after reading.
16814 (pupa_ext2_close): Return PUPA_ERR_NONE.
16815
16816 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16817 Correct value.
16818 (struct linux_kernel_header): Add kernel_version and
16819 initrd_addr_max.
16820 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16821 pupa_file_read succeeds.
16822 (pupa_rescue_cmd_initrd): Implement.
16823
5aded270 168242003-12-03 Marco Gerards <metgerards@student.han.nl>
16825
16826 * fs/ext2.c (pupa_ext2_label): New function.
16827 (pupa_ext2_fs): Added label.
16828 * fs/fat.c (pupa_fat_label): New function.
16829 (pupa_fat_fs): Added label.
16830 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16831
16832 * kern/misc.c (pupa_strndup): New function.
16833 * include/pupa/misc.h (pupa_strndup): New prototype.
16834
16835 * include/pupa/normal.h: Include <pupa/err.h>.
16836 (pupa_set_history): New prototype.
16837 (pupa_iterate_commands): New prototype.
16838 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16839 <pupa/disk.h>, <pupa/file.h>.
16840 (hist_size): New variable.
16841 (hist_lines): Likewise.
16842 (hist_end): Likewise.
16843 (hist_used): Likewise.
16844 (pupa_set_history): New function.
16845 (pupa_history_get): Likewise.
16846 (pupa_history_add): Likewise.
16847 (pupa_history_replace): Likewise.
16848 (pupa_tab_complete): Likewise.
16849 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16850 completion shows partitionnames while completing partitions, this
16851 feature was suggested by Jeff Bailey.
16852 * normal/command.c (pupa_iterate_commands): New function.
16853 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16854 (pupa_normal_init): Initialize history buffer.
16855 (PUPA_MOD_INIT): Likewise.
16856 (pupa_normal_fini): Free the history buffer.
16857 (PUPA_MOD_FINI): Likewise.
16858
16859 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16860 key.
16861
16862 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16863 * configure.ac [i386]: Check for regparam bug.
16864 (NESTED_FUNC_ATTR) [! i386]: Defined.
16865
1f7315a3 168662003-11-17 Marco Gerards <metgerards@student.han.nl>
16867
16868 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16869 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16870 (pupa_emu_SOURCES): New variable.
16871 (pupa_emu_LDFLAGS): Likewise.
16872 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16873 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16874 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16875 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16876 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16877 (pupa_jmp_buf): New typedef.
16878 (pupa_setjmp) [PUPA_UTIL]: New macro.
16879 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16880 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16881 (pupa_refresh): New prototype.
16882 * include/pupa/util/getroot.h: New file.
16883 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16884 it.
16885 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16886 (pupa_rescue_cmd_cat): Likewise.
16887 (pupa_rescue_cmd_ls): Likewise.
16888 (pupa_rescue_cmd_testload): Likewise.
16889 (pupa_rescue_cmd_lsmod): Likewise.
16890 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16891 * normal/menu.c (run_menu): Likewise.
16892 * kern/term.c (pupa_cls): Likewise.
16893 (pupa_refresh): New function.
16894 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16895 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16896 * util/console.c: New file.
f19dbdb7 16897
1f7315a3 16898 * util/i386/pc/getroot.c: New file.
16899 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16900 (pupa_putchar): New function.
16901 (pupa_refresh): Likewise.
16902 (xgetcwd): Function moved to ...
16903 (strip_extra_slashes): Likewise.
16904 (get_prefix): Likewise.
f19dbdb7 16905 * util/i386/pc/getroot.c: ... here.
1f7315a3 16906 (find_root_device): Function moved and renamed to...
16907 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16908 Changed all callers.
16909 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16910 and renamed to...
16911 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16912 Changed all callers.
16913 * util/misc.c (pupa_memalign): New function.
16914 (pupa_mm_init_region): Likewise.
16915 (pupa_register_exported_symbols): Likewise.
16916 (pupa_putchar): Function removed.
16917 * util/pupa-emu.c: New file.
16918
9a5c1ade 169192003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16920
16921 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16922 (_multiboot_mod_SOURCES): New variable.
16923 (_multiboot_mod_CFLAGS): Likewise.
16924 * loader/i386/pc/multiboot.c: New file.
16925 * include/pupa/i386/pc/multiboot.h: Likewise.
16926 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16927 (pupa_multiboot_real_boot): New function.
16928 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16929 (pupa_multiboot_real_boot): New prototype.
16930 (pupa_rescue_cmd_multiboot): Likewise
16931 (pupa_rescue_cmd_module): Likewise.
16932
16933 * kern/loader.c (pupa_loader_set): Continue when
16934 pupa_loader_unload_func() fails.
16935 (pupa_loader_unset): New function.
16936 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16937
16938 * kern/misc.c (pupa_stpcpy): New function.
16939 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16940
8e72a9c0 169412003-11-12 Marco Gerards <metgerards@student.han.nl>
16942
16943 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16944 for available extensions.
16945
16946 * include/pupa/i386/pc/time.h: New file.
16947 * kern/disk.c: Include <pupa/machine/time.h>.
16948 (PUPA_CACHE_TIMEOUT): New macro.
16949 (pupa_last_time): New variable.
16950 (pupa_disk_open): Flush the cache when there was a timeout.
16951 (pupa_disk_close): Reset the timer.
16952 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16953 pupa_currticks.
16954 * util/misc.c: Include <sys/times.h>
16955 (pupa_get_rtc): New function.
16956
c4adbd32 169572003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16958
16959 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16960 as blocks.
16961 (pupa_ext2_get_file_block): Use blocks member.
16962
16963 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16964 first block. Return -1 instead of pupa_errno on error.
16965
bfd30f06 169662003-10-27 Marco Gerards <metgerards@student.han.nl>
16967
16968 * README: In the pupa-mkimage example use _chain instead of chain
16969 and ext2 instead of fat.
16970 * TODO: Replace ext2fs with jfs as an example. Add an item for
16971 adding journal playback for ext2fs.
16972 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16973 (pkgdata_MODULES): Added ext2.mod.
16974 (ext2_mod_SOURCES): New variable.
16975 (ext2_mod_CFLAGS): Likewise.
16976 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16977 * include/pupa/misc.h (pupa_strncpy): New prototype.
16978 (pupa_strcat): Likewise.
16979 (pupa_strncmp): Likewise.
16980 * kern/misc.c (pupa_strcat): Enable function.
16981 (pupa_strncpy): New function.
16982 (pupa_strncmp): Likewise.
16983 * fs/ext2.c: New file.
f19dbdb7 16984
bfd30f06 16985 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16986 when the read failed before retrying.
16987 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16988 (_FILE_OFFSET_BITS): Likewise.
16989 * configure.ac: Added AC_SYS_LARGEFILE.
16990
98d15063 169912003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16992
16993 * genmk.rb (PModule#rule): Make sure to get only symbol names
16994 from the output of nm.
16995 Reported by Robert Millan <zeratul2@wanadoo.es>.
16996
18d9c7cd 169972003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16998
16999 I forgot to check in these changes for a long time. This adds
17000 incomplete support for VGA console, and this is still very
17001 buggy. Also, a lot of consideration is required for I18N,
17002 UNICODE, and VGA font issues. Therefore, assume that this is
17003 such that "better than nothing".
f19dbdb7 17004
18d9c7cd 17005 * font/manager.c: New file.
17006 * include/pupa/font.h: Likewise.
17007 * include/pupa/i386/pc/vga.h: Likewise.
17008 * term/i386/pc/vga.c: Likewise.
17009 * util/unifont2pff.rb: Likewise.
17010
17011 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17012 (pkgdata_MODULES): Added vga.mod and font.mod.
17013 (vga_mod_SOURCES): New variables.
17014 (vga_mod_CFLAGS): Likewise.
17015 (font_mod_SOURCES): Likewise.
17016 (font_mod_CFLAGS): Likewise.
17017
17018 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17019
17020 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 17021 (struct pupa_term): Added init and fini.
18d9c7cd 17022 Changed the argument of putchar to pupa_uint32_t.
17023
17024 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17025 (pupa_console_real_putchar): New prototype.
17026 (pupa_console_putchar): Removed.
17027 (pupa_console_checkkey): Exported.
17028 (pupa_console_getkey): Likewise.
17029
17030 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17031 characters.
17032
17033 * kern/term.c (pupa_term_set_current): Rewritten.
17034 (pupa_putchar): Likewise.
17035 (pupa_putcode): New function.
17036
17037 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17038 (pupa_console_real_putchar): ... this.
17039 (pupa_vga_set_mode): New function.
17040 (pupa_vga_get_font): Likewise.
17041
17042 * normal/command.c: Include pupa/term.h.
17043 (terminal_command): New function.
17044 (pupa_command_init): Register the command "terminal".
17045
17046 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17047 (DISP_UP): Likewise.
17048 (DISP_RIGHT): Likewise.
17049 (DISP_DOWN): Likewise.
17050 (DISP_HLINE): Likewise.
17051 (DISP_VLINE): Likewise.
17052 (DISP_UL): Likewise.
17053 (DISP_UR): Likewise.
17054 (DISP_LL): Likewise.
17055 (DISP_LR): Likewise.
17056
17057 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 17058
977329f5 170592003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17060
17061 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17062 FIX. Reverse the path_list.
17063
17064 * include/pupa/normal.h: Export pupa_register_command and
17065 pupa_unregister_command.
17066
17067 * hello/hello.c (pupa_cmd_hello): New module.
17068 * conf/i386-pc.rmk: Added hello.mod.
17069
1f5ab428 170702003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17071
17072 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 17073
1f5ab428 17074 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17075 (compress_kernel): New variable.
17076 (generate_image): Heavily modified to support compressing a
17077 large part of the core image.
17078
17079 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17080 leak.
17081 (pupa_util_load_image): New function.
17082
17083 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17084 (pupa_compressed_size): New variable.
17085 (codestart): Enable Gate A20 here.
17086 Decompress the compressed part of the core image.
17087 Rearrange the code to put functions and variables which are
17088 required for initialization in the non-compressed part.
17089 Include lzo1x.S.
17090
17091 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17092 here.
17093
17094 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17095
f19dbdb7 17096 * include/pupa/i386/pc/kernel.h
1f5ab428 17097 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17098 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17099 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17100 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17101 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17102
17103 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17104
17105 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17106 (Utility#rule): Likewise.
17107
17108 * configure.ac: Check if LZO is available.
17109
ce5bf700 171102003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17111
17112 * include/pupa/normal.h: New file.
17113 * include/pupa/setjmp.h: Likewise.
17114 * include/pupa/i386/setjmp.h: Likewise.
17115 * normal/cmdline.c: Likewise.
17116 * normal/command.c: Likewise.
17117 * normal/main.c: Likewise.
17118 * normal/menu.c: Likewise.
17119 * normal/i386/setjmp.S: Likewise.
f19dbdb7 17120
ce5bf700 17121 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17122 (pupa_rescue_cmd_initrd): Likewise.
17123
17124 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17125 Likewise.
17126
17127 * kern/i386/pc/startup.S (translation_table): New variable.
17128 (translate_keycode): New function.
17129 (pupa_console_getkey): Call translate_keycode.
17130
17131 * kern/rescue.c (attempt_normal_mode): New function.
17132 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17133 it failed, print a message.
17134
17135 * kern/mm.c (pupa_real_malloc): Print more information when a
17136 free magic is broken.
17137 (pupa_free): If the first free header is not free actually, set
17138 it to P.
17139
17140 * kern/main.c (pupa_load_normal_mode): Just load the module
17141 "normal".
17142 (pupa_main): Don't print the message
17143 "Entering into rescue mode..." here.
17144
17145 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17146 Declared.
17147 (pupa_rescue_cmd_initrd): Likewise.
17148 (pupa_rescue_cmd_initrd): Likewise.
17149
17150 * include/pupa/symbol.h (FUNCTION): Specify the type.
17151 (VARIABLE): Likewise.
17152
17153 * include/pupa/err.h (pupa_err_t): Added
17154 PUPA_ERR_UNKNOWN_COMMAND.
17155
17156 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17157 (pupa_dl_get_prefix): Likewise.
17158
17159 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17160 Added _chain.mod and _linux.mod instead of chain.mod and
17161 linux.mod.
17162 (chain_mod_SOURCES): Renamed to ...
17163 (_chain_mod_SOURCES): ... this.
17164 (chain_mod_CFLAGS): Renamed to ...
17165 (_chain_mod_CFLAGS): ... this.
17166 (linux_mod_SOURCES): Renamed to ...
17167 (_linux_mod_SOURCES): ... this.
17168 (linux_mod_CFLAGS): Renamed to ...
17169 (_linux_mod_CFLAGS): ... this.
17170 (normal_mod_SOURCES): New variable.
17171 (normal_mod_CFLAGS): Likewise.
17172 (normal_mod_ASFLAGS): Likewise.
17173
171742003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17175
17176 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17177 possible.
17178
fe6b695a 17179 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 17180 recursively.
17181 (pupa_dl_unref): Unrefer depending modules recursively.
17182 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17183 a module is unloaded before one depending on that module is
17184 unloaded.
17185 (pupa_dl_unload): Unload depending modules explicitly,
17186 if possible.
17187
c04da074 171882003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17189
17190 * include/pupa/i386/pc/linux.h: New file.
17191 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 17192
c04da074 17193 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17194 Removed.
17195 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17196 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17197 of PUPA_CHAINLOADER_BOOT_SECTOR.
17198
17199 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17200 (pupa_linux_prot_size): New variable.
17201 (pupa_linux_tmp_addr): Likewise.
17202 (pupa_linux_real_addr): Likewise.
17203 (pupa_linux_boot_zimage): New function.
17204 (pupa_linux_boot_bzimage): Likewise.
17205
17206 * kern/i386/pc/init.c (struct mem_region): New structure.
17207 (MAX_REGIONS): New macro.
17208 (mem_regions): New variable.
17209 (num_regions): Likewise.
17210 (pupa_os_area_addr): Likewise.
17211 (pupa_os_area_size): Likewise.
17212 (pupa_lower_mem): Likewise.
17213 (pupa_upper_mem): Likewise.
17214 (add_mem_region): New function.
17215 (compact_mem_regions): Likewise.
17216 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17217 the size of the conventional memory and that of so-called upper
17218 memory (before the first memory hole).
17219 Instead of adding each found region to free memory, use
17220 add_mem_region and add them after removing overlaps.
17221 Also, add only 1/4 of the upper memory to free memory. The rest
17222 is used for loading OS images. Maybe this is ad hoc, but this
17223 makes it much easier to relocate OS images when booting.
17224
17225 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17226 (pupa_enter_rescue_mode): Don't register initrd and module.
17227
17228 * kern/mm.c: Include pupa/dl.h.
17229
17230 * kern/main.c: Include pupa/file.h and pupa/device.h.
17231
17232 * kern/loader.c (pupa_loader_load_module_func): Removed.
17233 (pupa_loader_load_module): Likewise.
17234
17235 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17236 ``.o''.
17237
17238 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17239 (pupa_linux_tmp_addr): Likewise.
17240 (pupa_linux_real_addr): Likewise.
17241 (pupa_linux_boot_zimage): Likewise.
17242 (pupa_linux_boot_bzimage): Likewise.
17243
17244 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17245 (pupa_upper_mem): Likewise.
17246 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17247 module is too dangerous.
17248
17249 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17250 (pupa_os_area_size): Likewise.
17251 (pupa_loader_set): Remove the first argument. Loader doesn't
17252 manage modules or initrd any longer.
17253 (pupa_loader_load_module): Removed.
17254
17255 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17256 (linux_mod_SOURCES): New variable.
17257 (linux_mod_CFLAGS): Likewise.
17258
a13f9237 172592003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17260
17261 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17262 the length of a blocklist correctly.
17263
17264 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17265 Use ioctl only if the OS file is a block device.
17266 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17267 not very useful for normal files.
17268
17269 * kern/main.c (pupa_set_root_dev): New function.
17270 (pupa_load_normal_mode): Likewise.
17271 (pupa_main): Call those above.
17272
17273 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17274 pupa_uint16_t.
17275
17276 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17277
a5ffe966 172782003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17279
17280 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17281 (setup): Configure the installed partition information and the
17282 dl prefix.
17283
17284 * loader/i386/pc/chainloader.c (my_mod): New variable.
17285 (pupa_chainloader_unload): New function.
17286 (pupa_rescue_cmd_chainloader): Refer itself.
17287 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17288
17289 * kern/i386/pc/startup.S (install_partition): Removed.
17290 (version_string): Likewise.
17291 (config_file): Likewise.
17292 (pupa_install_dos_part): New variable.
17293 (pupa_install_bsd_part): Likewise.
17294 (pupa_prefix): Likewise.
17295 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17296
17297 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17298 and pupa/misc.h.
17299 (make_install_device): New function.
17300 (pupa_machine_init): Set the dl prefix.
17301
17302 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17303 (buf): Renamed to ...
17304 (linebuf): ... this.
17305 (pupa_rescue_cmd_prefix): New function.
17306 (pupa_rescue_cmd_insmod): Likewise.
17307 (pupa_rescue_cmd_rmmod): Likewise.
17308 (pupa_rescue_cmd_lsmod): Likewise.
17309 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17310 rmmod and lsmod.
17311
17312 * kern/mm.c (pupa_memalign): If failed even after invalidating
17313 disk caches, unload unneeded modules and retry.
17314
17315 * kern/misc.c (pupa_memmove): New function.
17316 (pupa_memcpy): Removed.
17317 (pupa_strcpy): New function.
17318 (pupa_itoa): Made static.
17319
17320 * kern/dl.c (pupa_dl_iterate): New function.
17321 (pupa_dl_ref): Likewise.
17322 (pupa_dl_unref): Likewise.
17323 (pupa_dl_unload): Return if succeeded or not.
17324 (pupa_dl_unload_unneeded): New function.
17325 (pupa_dl_unload_all): Likewise.
17326 (pupa_dl_init): Renamed to ...
17327 (pupa_dl_set_prefix): ... this.
17328 (pupa_dl_get_prefix): New function.
17329
17330 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17331 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17332 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17333 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17334 (pupa_install_dos_part): Declared.
17335 (pupa_install_bsd_part): Likewise.
17336 (pupa_prefix): Likewise.
17337 (pupa_boot_drive): Likewise.
17338
17339 * include/pupa/types.h: Fix a typo.
17340
17341 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17342 pupa_memmove.
17343 (pupa_memmove): Declared.
17344 (pupa_strcpy): Likewise.
17345
17346 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17347 pupa_mod_init takes one argument, its own module.
17348 (pupa_dl_unload_unneeded): Declared.
17349 (pupa_dl_unload_all): Likewise.
17350 (pupa_dl_ref): Likewise.
17351 (pupa_dl_unref): Likewise.
17352 (pupa_dl_iterate): Likewise.
17353 (pupa_dl_init): Renamed to ...
17354 (pupa_dl_set_prefix): ... this.
17355 (pupa_dl_get_prefix): Declared.
17356
17357 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 17358 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 17359 unloaded.
17360 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17361 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17362
17363 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17364 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17365
012d7999 173662003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17367
17368 * util/i386/pc/pupa-setup.c (setup): Define the internal
17369 function find_first_partition_start at the top level, because GCC
17370 3.0.x cannot compile internal functions in deeper scopes
17371 correctly.
17372 (find_root_device): Use lstat instead of stat.
17373 Don't follow symbolic links.
17374 Fix the path-constructing code.
17375
17376 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17377 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17378 by a BLKGETSIZE ioctl first, because block devices don't fill
17379 the member st_mode of the structure stat on Linux.
17380 [__linux__] (linux_find_partition): Use a temporary buffer
17381 REAL_DEV for the working space. Copy it to DEV before returning.
17382 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17383 buffer cache consistent.
17384 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17385 strncmp. The previous value was merely wrong.
17386 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17387
17388 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17389 FAT size is 12. The previous value was merely wrong.
17390
17391 * kern/main.c (pupa_main): Don't split the starting message from
17392 newlines.
17393
17394 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17395 LF, because BIOS goes crazy about character attributes in this
17396 case.
17397
1cc73a62 173982003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17399
17400 * include/i386/pc/util/biosdisk.h: New file.
17401 * util/i386/pc/biosdisk.c: Likewise.
17402 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 17403
1cc73a62 17404 * Makefile.in (INCLUDE_DISTFILES): Added
17405 include/pupa/i386/pc/util/biosdisk.h.
17406 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17407 directory util/i386/pc.
17408 (install-local): Added a rule for sbin_UTILITIES.
17409 (uninstall): Likewise.
17410
17411 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17412
17413 * util/misc.c (xrealloc): New function.
17414 (pupa_malloc): Likewise.
17415 (pupa_free): Likewise.
17416 (pupa_realloc): Likewise.
17417 (pupa_stop): Likewise.
17418 (pupa_putchar): Likewise.
17419
17420 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17421
17422 * include/pupa/util/misc.h (xrealloc): Declared.
17423
17424 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17425 macro.
17426 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17427 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17428
17429 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17430 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17431
17432 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17433 way should be implemented.
17434 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17435
17436 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17437 the size of NAME for safety.
17438 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17439 0x88.
17440
17441 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17442 (pupa_setup_SOURCES): Likewise.
17443
17444 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17445
08b70fe8 174462002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17447
17448 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17449 bunch of pushl's from pusha, because this destroys the return
17450 value.
17451
62ddcc8f 174522002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17453
17454 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17455 This means that any missing prototypes could be fatal. Also, you
17456 must take care when writing assembly code. See the comments at
17457 the beginning of startup.S, for more details.
f19dbdb7 17458
62ddcc8f 17459 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17460 compilation mechanism.
17461 (pupa_chainloader_real_boot): Likewise.
17462 (pupa_biosdisk_rw_int13_extensions): Likewise.
17463 (pupa_biosdisk_rw_standard): Likewise.
17464 (pupa_biosdisk_check_int13_extensions): Likewise.
17465 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17466 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17467 (pupa_get_memsize): Likewise.
17468 (pupa_get_mmap_entry): Likewise.
17469 (pupa_console_putchar): Likewise.
17470 (pupa_console_setcursor): Likewise.
17471 (pupa_getrtsecs): Use pushl instead of push.
17472
17473 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17474 memory instead of the stack for a mmap entry, because some
17475 BIOSes may ignore the maximum size and overflow.
17476
17477 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17478
17479 * genmk.rb (PModule#rule): Compile automatically generated
17480 sources with module-specific CFLAGS as well as other sources.
17481
9962ed99 174822002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17483
17484 * configure.ac: Check ld.
17485 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17486 respectively, before checking endianness and sizes.
17487
17488 * Makefile.in (LD): New variable.
f19dbdb7 17489
abdfc3c5 174902002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17491
17492 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17493
6a161fa9 174942002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17495
17496 * Changelog: New file.
17497