]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-06-11 Pavel Roskin <proski@gnu.org>
[grub2.git] / ChangeLog
CommitLineData
3a4575d4 12009-06-11 Pavel Roskin <proski@gnu.org>
2
ca0388f0 3 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
4 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
5 and update-grub_lib in two places.
6 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
7
e3b27c39 8 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
9 a compiler warning.
10
3a4575d4 11 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
12 `entry_lo' to fix variable shadowing.
13
af1f4f55 142009-06-11 Christian Franke <franke@computer.org>
15
16 * kern/misc.c (__enable_execute_stack): Add missing return type
17 to prevent gcc warning.
18
5225e649 192009-06-11 Felix Zielcke <fzielcke@z-51.de>
20
21 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
22
7d83bd47 232009-06-11 Pavel Roskin <proski@gnu.org>
24
c1cb63ba 25 * Makefile.in: Don't rely on any scripts being executable.
26 Always use $(SHELL) to run shell scripts.
27
7d83bd47 28 * configure.ac: Always define ___main if using -nostdlib. This
29 fixes tests on Cygwin.
30
948f48e7 312009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
32
33 UDF fix
34
7d83bd47 35 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 36 is in bytes and not in blocks
7d83bd47 37
8ada9bc1 382009-06-11 Pavel Roskin <proski@gnu.org>
39
40 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
41 warning.
42
25ad2323 432009-06-11 Felix Zielcke <fzielcke@z-51.de>
44
45 * util/grub.d/30_os-prober.in: Fix a comment. Source
46 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
47 to set the root device. Place drivemap command in the generated
48 chain entry.
49
e65acb0c 502009-06-11 Pavel Roskin <proski@gnu.org>
51
52 * configure.ac: Remove host_m32. Issues with 64-bit utilities
53 have long been resolved.
54
f285fe2d 552009-06-11 Colin Watson <cjwatson@ubuntu.com>
56
bd47b0b5 57 * util/grub.d/10_linux.in: Capitalise "Linux".
58
f285fe2d 59 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
60
a0c62e4e 612009-06-11 Pavel Roskin <proski@gnu.org>
62
b6783cb2 63 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
64 fix a gcc warning and ensure that the function won't ever exit.
65
dde032e8 66 * kern/i386/ieee1275/init.c: Add missing prototype for
67 grub_stop_floppy().
68
22cd079d 69 * loader/ieee1275/multiboot2.c [__i386__]: Include
70 grub/cpu/multiboot.h.
71
a0c62e4e 72 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
73 casts to short - they are not portable and cause warnings. Fix
74 use of uninitialized values in input_buf. Use ARRAY_SIZE.
75
63963d17 762009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
77
78 Drivemap fixes
79
80 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
81 new function
82 (grub_get_root_biosnumber_saved): new variable
83 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
84 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 85 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 86 %dx after the call if necessary
87 * conf/common.rmk (pkglib_MODULES): remove boot.mod
88 (boot_mod_SOURCES): remove
89 (boot_mod_CFLAGS): remove
90 (boot_mod_LDFLAGS): remove
91 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
92 (boot_mod_SOURCES): new variable
93 (boot_mod_CFLAGS): likewise
94 (boot_mod_LDFLAGS): likewise
95 * conf/i386-efi.rmk: likewise
96 * conf/i386-ieee1275.rmk: likewise
97 * conf/i386-pc.rmk: likewise
98 * conf/powerpc-ieee1275.rmk: likewise
99 * conf/sparc64-ieee1275.rmk: likewise
100 * conf/x86_64-efi.rmk: likewise
101 * include/grub/i386/pc/biosnum.h: new file
102 * lib/i386/pc/biosnum.c: likewise
103 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
104 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
105 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 106
25ad2323 107>>>>>>> .r2306
33abf7ae 1082009-06-10 Pavel Roskin <proski@gnu.org>
109
5ac35b35 110 * io/gzio.c (test_header): Don't reuse one buffer for all data.
111 Use separate variables. Read only the file size at the end, but
112 not the checksum that we don't use.
113
5c5215d5 114 * kern/file.c (grub_file_read): Use void pointer for the buffer.
115 Adjust all callers.
116
27d5fef7 117 * kern/ieee1275/openfw.c: Remove libc includes.
118 * kern/ieee1275/cmain.c: Likewise.
119 * include/grub/ieee1275/ieee1275.h: Likewise.
120
33abf7ae 121 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
122 compiler warnings.
123
d2d49665 1242009-06-10 Felix Zielcke <fzielcke@z-51.de>
125
126 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
127 `genparttoollist.sh'.
128 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
129 Add `*.sh' to the list find searches for and change `mdate.sh'
130 to `mdate-sh'.
131
fe052e37 1322009-06-10 Pavel Roskin <proski@gnu.org>
133
2763ac18 134 * include/grub/multiboot2.h: Provide compatibility defines for
135 multiboot2.h.
136 * include/multiboot2.h: Include stdint.h only if needed, using
137 angle brackets.
138 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
139 grub/multiboot2.h.
140 * loader/ieee1275/multiboot2.c: Likewise.
141 * loader/multiboot2.c: Likewise.
142 * loader/multiboot_loader.c: Likewise.
143
437e6adc 144 * configure.ac: Use -nostdlib when probing for the target. It
145 should not be required to have libc for the target.
146
06a6836c 147 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
148 they fail without libc headers for the target.
149 * include/grub/powerpc/libgcc.h: Use weak attribute for all
150 exports.
151 * include/grub/sparc64/libgcc.h: Likewise. Don't use
152 preprocessor conditionals.
153
fe052e37 154 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
155 build system doesn't need to be aware of the tar.c internals.
156
afd22553 1572009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 158
afd22553 159 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 160
6b787c4f 1612009-06-09 Robert Millan <rmh.grub@aybabtu.com>
162
163 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
164 disk limit to 26 for IDE, Virtio, Xen and SCSI.
165
1662009-06-09 Felix Zielcke <fzielcke@z-51.de>
167
168 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 169 aren't available if ata.mod gets used.
6b787c4f 170
473d1e45 1712009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 172
473d1e45 173 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 174 initialising controller.
473d1e45 175 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 176
255a27d4 1772009-06-08 Felix Zielcke <fzielcke@z-51.de>
178
179 * util/i386/pc/grub-install.in: Add a parameter --disk-module
180 to choose between ata and biosdisk module on i386-pc.
181
473d1e45 1822009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 183
d55842d8 184 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
185 Subclass and Programming Interface fields in terms of the 3 byte
186 Class Code register.
187 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
188
fa5db0b1 189 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
190 interface is OHCI. Add grub_dprintf for symmetry with
191 bus/usb/uhci.c.
192 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
193 interface is UHCI. Add interf variable for programming
194 interface. Print interface with class/subclass.
195
c0947beb 196 * bus/usb/ohci.c: Set interf with correct field.
197
69da8877 198 * bus/usb/uhci.c: Remove unneeded doubled lines.
199 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
200 Remove whitespace inside comment.
201
9e172e30 2022009-06-08 Robert Millan <rmh.grub@aybabtu.com>
203
204 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
205 as fallback an equivalent option without depth.
206
de65ee2b 2072009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
208
209 Not fail if unable to retrieve C/H/S on LBA disks
210
473d1e45 211 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 212 if unable to retrieve C/H/S on LBA disks
213
b57ea2c9 2142009-06-08 Pavel Roskin <proski@gnu.org>
215
216 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
217 about aliasing.
218
af361263 2192009-06-08 Felix Zielcke <fzielcke@z-51.de>
220
221 * Makefile.in (uninstall): Remove all $lib_DATA files.
222
4c9ec6b3 2232009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
224
225 Bugfix: install on partitionless device
226
227 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
228 is a whole disk
229
e76fc924 2302009-06-08 Felix Zielcke <fzielcke@z-51.de>
231
232 * Makefile.in (uninstall): Remove all $include_DATA files.
233
ba5a0d05 2342009-06-08 Felix Zielcke <fzielcke@z-51.de>
235
236 * commands/true.c: New file. Implement the true and false commands.
237 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
238 (true_mod_SOURCES): New variable.
239 (true_mod_CFLAGS): Likewise.
240 (true_mod_LDFLAGS): Likewise.
241
c8048e32 2422009-06-05 Colin D Bennett <colin@gibibit.com>
243
244 Optimized font character lookup using binary search instead of linear
245 search. Fonts now are required to have the character index ordered by
246 code point.
247
248 * font/font.c (load_font_index): Verify that fonts have ordered
249 character indices.
250 (find_glyph): Use binary search instead of linear search to find a
251 character in a font.
252
408305be 2532009-06-05 Michael Scherer <misc@mandriva.org>
254
255 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
256 uses case sensitive btree.
257 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
258 only for case insensitive filesystems.
259
8ee1e0d9 2602009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
261
262 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
263 * conf/common.rmk (search_mod_CFLAGS): likewise
264
a9966eb1 2652009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
266
473d1e45 267 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 268 compensate a compiler bug
269
9e7100fb 2702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
271
473d1e45 272 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 273 instead of '\b'
473d1e45 274
ede21d71 2752009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
276
277 Definitions for creating asm symbols with Apple's CC
278
279 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
280 [APPLE_CC] (VARIABLE): likewise
281
9dbf7653 2822009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
283
284 Disable lnxboot.img when compiled
285 with Apple's CC
286
287 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
288 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
289 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
290 [! APPLE_CC] (CODE_LENG): skip
291 [! APPLE_CC] (setup_sects): likewise
292 [! APPLE_CC]: skip filling
473d1e45 293
e93cdc3d 2942009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
295
296 Address in trampolines based on 32-bit registers when compiled
297 with Apple's CC
298
473d1e45 299 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 300 for addresses
301 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
302
6c688477 3032009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
304
305 Avoid aliases when compiling with Apple's CC for PCBIOS machine
306
307 * kern/misc.c [APPLE_CC] (memcpy): new function
308 [APPLE_CC] (memmove): likewise
309 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 310 (memcpy): define alias conditionally on !APPLE_CC
6c688477 311 (memset): likewise
312 (abort): likewise
313 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
314 APPLE_CC are defined
315 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
316 (grub_assert_fail): make prototype conditional
317
e37ffc5c 3182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
319
320 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
321
473d1e45 322 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
323 grub-macho2img
e37ffc5c 324 (CLEANFILES): add grub-macho2img
325 (grub_macho2img_SOURCES): new variable
326 * kern/i386/pc/startup.S (bss_start): new variable
327 (bss_end): likewise
328 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
329 * util/grub-macho2img.c: new file
330
cf00df31 3312009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
332
333 Use objconv when compiling with Apple's CC
334
335 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
336 (efiemu64.o): likewise
337 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
338 when compiling with Apple's CC
339 (efiemu64_s.o): likewise
340 * configure.ac: check for objconv when compiling with Apple's CC
341 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 342
d119a20c 3432009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
344
345 Define segment as well as section when compiling with
346 Apple's CC
347
348 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
349 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
350 (efiemu_convert_pointer): likewise
351 (efiemu_set_virtual_address_map): likewise
352 (efiemu_convert_pointer): likewise
353 (efiemu_getcrc32): likewise
354 (init_crc32_table): likewise
355 (reflect): likewise
356 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
357 (GRUB_MOD_DEP): likewise
473d1e45 358
c8600122 3592009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
360
361 Allow a compilation without -mcmodel=large
362
363 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
364 when compiled without -mcmodel=large
473d1e45 365 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 366 without -mcmodel=large
473d1e45 367 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 368 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 369
e8df1d4e 3702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
371
372 Remove nested functions in efiemu core
373
374 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 375
cc6c3ac1 3762009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
377
378 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
379
380 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
381 temporary storage
473d1e45 382 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
383 using Apple's CC
cc6c3ac1 384 (grub_cpu_is_tsc_supported): likewise
385 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 386
3e325901 3872009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
388
389 Absolute addressing through constant with Apple's cc
390
391 * kern/i386/pc/startup.S: Define necessary constants
392 and address through it when using ABS with Apple's CC
393 * boot/i386/pc/diskboot.S: likewise
394 * boot/i386/pc/boot.S: likewise
395 * boot/i386/pc/lnxboot.S: likewise
396 * boot/i386/pc/cdboot.S: likewise
397 * mmap/i386/pc/mmap_helper.S: likewise
398 * commands/i386/pc/drivemap_int13h.S: likewise
399
2b167a72 4002009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
401
402 Check if compiler is apple cc
403
404 * Makefile.in (ASFLAGS): new variable
405 (TARGET_ASFLAGS): likewise
406 (TARGET_MODULE_FORMAT): likewise
407 (TARGET_APPLE_CC): likewise
408 (OBJCONV): likewise
409 (TARGET_IMG_CFLAGS): likewise
410 (TARGET_CPPFLAGS): add includedir
411 * configure.ac: call grub_apple_cc and grub_apple_target_cc
412 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
413 Check for linker script only if compiler isn't Apple's CC
414 (TARGET_MODULE_FORMAT): set
415 (TARGET_APPLE_CC): likewise
416 (TARGET_ASFLAGS): likewise
417 (ASFLAGS): likewise
418 Check for objcopy only if compiler isn't Apple's CC
419 Check for BSS symbol only if compiler isn't Apple's CC
420 * genmk.rb: adapt nm options if we use Apple's utils
421 * aclocal.m4 (grub_apple_cc): new test
422 (grub_apple_target_cc): likewise
473d1e45 423
fb14123e 4242009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
425
426 Simplify sed expressions and improve awk
427
428 * Makefile.in (install-local): simplify sed expression
429 * gencmdlist.sh: likewise
430 * genmoddep.awk: avoid adding module as a dependency of itself
431
5b889789 4322009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
433
434 Add missing start symbols
435
436 * boot/i386/pc/boot.S: add start
fb14123e 437 * boot/i386/pc/pxeboot.S: likewise
473d1e45 438
fd2bf2e3 4392009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
440
441 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 442
443 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 444 (relocate_addresses): consider both r_addend and value at offset
445 (make_mods_section): zerofill modinfo and header
446 (convert_elf): write prefix here
473d1e45 447
5389763d 4482009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
449
450 Use .asciz instead of .string
451
452 * i386/pc/diskboot.S: use .asciz instead of .string
453 * i386/pc/boot.S: likewise
454 * include/grub/dl.h (GRUB_MOD_DEP): likewise
455 (GRUB_MOD_NAME): likewise
473d1e45 456
3eb5ed4e 4572009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
458
459 gfxpayload support
460
461 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
462 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
463 (grub_video_setup): remove
464 (grub_video_set_mode): new prototype
465 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
466 (vid_mode): remove
467 (linux_vesafb_res): compile only on PCBIOS
468 (grub_linux_boot): support gfxpayload
469 * loader/i386/pc/xnu.c (video_hook): new function
470 (grub_xnu_set_video): support gfxpayload
471 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
472 (DEFAULT_VIDEO_HEIGHT): likewise
473 (DEFAULT_VIDEO_FLAGS): likewise
474 (DEFAULT_VIDEO_MODE): new definition
475 (video_hook): new function
476 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 477 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 478 loading xnu
479 * video/video.c (grub_video_setup): removed
473d1e45 480 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 481 grub_video_setup
482
4b0e1143 4832009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
484
485 Avoid calling biosdisk in drivemap
486
487 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
488 (revparse_biosdisk): likewise
489 (list_mappings): derive name from id directly
490 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 491
fda6cb98 4922009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
493
494 Script fixes
495
496 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
497 (grub_lexer_param): add tokenonhold
498 (grub_script_create_cmdline): remove cmdline. All callers updated
499 (grub_script_function_create): make functionname
500 grub_script_arg. All callers updated
501 (grub_script_execute_argument_to_string): new prototype
502 * kern/parser.c (state_transitions): reorder
503 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 504 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 505 make global
506 (grub_script_execute_cmdline): use new format
507 * script/sh/function.c (grub_script_function_create): make functionname
508 grub_script_arg. All callers updated
473d1e45 509 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 510 (grub_script_yylex): remove
511 (grub_script_yylex2): renamed to ...
512 (grub_script_yylex): ...renamed
513 parse the expressions like a${b}c
514 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
515 (GRUB_PARSER_TOKEN_VAR): remove
516 (GRUB_PARSER_TOKEN_NAME): likewise
517 ("if"): declare as typeless
518 ("while"): likewise
519 ("function"): likewise
520 ("else"): likewise
521 ("then"): likewise
522 ("fi"): likewise
523 (text): remove
524 (argument): likewise
525 (script): accept empty scripts and make exit on error
526 (arguments): use GRUB_PARSER_TOKEN_ARG
527 (function): likewise
528 (command): move error handling to script
529 (menuentry): move grub_script_lexer_ref before
473d1e45 530 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 531 argument. All callers updated
532
f4448a07 5332009-06-04 Robert Millan <rmh.grub@aybabtu.com>
534
535 Prevent GRUB from probing floppies during boot.
536
537 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
538 * commands/search.c (options): Add --no-floppy.
539 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
540 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
541 --no-floppy when searching for UUIDs.
542
2bf5885a 5432009-06-04 Robert Millan <rmh.grub@aybabtu.com>
544
545 Simplify the code duplication in commands/search.c.
546
547 * commands/search.c (search_label, search_fs_uuid): Merge into ...
548 (search_fs): ... this. Update all users.
549
f6fd460a 5502009-06-03 Felix Zielcke <fzielcke@z-51.de>
551
552 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
553
cbb3c83e 5542009-05-28 Pavel Roskin <proski@gnu.org>
555
57788cfd 556 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
557 Remove the original symlink explicitly.
558
cbb3c83e 559 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
560 just one slash. That's how grub_fshelp_find_file() does it.
561
cd0d5e30 5622009-05-26 Pavel Roskin <proski@gnu.org>
563
f0f8bbe2 564 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
565 to `str'.
566
cd0d5e30 567 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
568 possibly unused.
569
8c2cab51 5702009-05-25 Christian Franke <franke@computer.org>
571
572 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
573 register.
574 (grub_atapi_identify): Add wait after drive select.
575 (grub_ata_identify): Do more strict status register check before
576 calling grub_atapi_identify (). Suppress error message if status
577 register is 0x00 after command failure. Add status register
578 check after PIO read to avoid bogus identify due to stuck DRQ.
579 Thanks to Pavel Roskin for testing.
580 (grub_device_initialize): Remove unsafe status register check.
581 Thanks to 'phcoder' for problem report and patch.
582 Prevent sign extension in debug message.
583
230c0ad6 5842009-05-23 Colin D Bennett <colin@gibibit.com>
585
586 Cleaned up `include/grub/normal.h'. Grouped prototypes by
587 definition file, and functions defined in `normal/menu.c' have had
588 their prototypes moved to `include/grub/menu.h' for consistency.
589
590 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
591 from normal.h.
592 (grub_menu_get_entry): Likewise.
593 (grub_menu_get_timeout): Likewise.
594 (grub_menu_set_timeout): Likewise.
595 (grub_menu_execute_entry): Likewise.
596 (grub_menu_execute_with_fallback): Likewise.
597 (grub_menu_entry_run): Likewise.
598
599 * include/grub/normal.h: Re-ordered and grouped function
600 prototypes by file that the function is defined in.
601 (grub_menu_execute_callback): Removed; moved to menu.h.
602 (grub_menu_get_entry): Likewise.
603 (grub_menu_get_timeout): Likewise.
604 (grub_menu_set_timeout): Likewise.
605 (grub_menu_execute_entry): Likewise.
606 (grub_menu_execute_with_fallback): Likewise.
607 (grub_menu_entry_run): Likewise.
608 (grub_menu_addentry): Renamed from this ...
609 (grub_normal_add_menu_entry): ... to this.
610
611 * normal/main.c (grub_menu_addentry): Renamed from this ...
612 (grub_normal_add_menu_entry): ... to this.
613
614 * script/sh/execute.c (grub_script_execute_menuentry): Update
615 reference to renamed grub_menu_addentry function.
616
861f03a5 6172009-05-23 Felix Zielcke <fzielcke@z-51.de>
618
619 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
620
96b1619a 6212009-05-22 Pavel Roskin <proski@gnu.org>
622
bf6a5fb2 623 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
624 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
625 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
626 compiling for the i386 targets, but not for the utilities.
627
96b1619a 628 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
629 to grub_uint8_t.
630 (grub_root_drive): Likewise.
631 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
632 remove alignment.
633 (grub_root_drive): Change size to byte.
634 (grub_start_addr): Remove.
635 (grub_end_addr): Likewise.
636 (grub_apm_bios_info): Likewise.
637
b729776b 6382009-05-21 Felix Zielcke <fzielcke@z-51.de>
639
640 * normal/i386: Remove.
641 * normal/powerpc: Likewise.
642 * normal/sparc64: Likewise.
643 * normal/x86_64: Likewise.
644
0a15ce80 6452009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
646
647 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 648 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 649 * loader/i386/xnu_helper.S: Likewise
d6da58e6 650
33db9015 6512009-05-18 Colin D Bennett <colin@gibibit.com>
652
d6da58e6 653 Display error messages when parsing a Lua statement fails.
654 Previously, executing a syntactically invalid statement like
655 ")foo" or "bar;" would silently fail.
33db9015 656
657 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 658 (grub_lua_parse_line): Improved reporting of Lua parser and
659 execution errors.
33db9015 660
46422c89 6612009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
662
663 Remove -Werror which causes build to fail on some systems
664
665 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
666 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
667 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 668
22f53a96 6692009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
670
671 trampoline for linux on 64-bit platform
672
18f547ad 673 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
674 loader/i386/efi/linux_trampoline.S
675 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 676 declaration
d6da58e6 677 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
678 here
22f53a96 679 * loader/i386/linux_trampoline.S: moved here
d6da58e6 680 * loader/i386/efi/linux.c (allocate_pages): reserve space for
681 trampoline
22f53a96 682 (jumpvector): removed
683 (grub_linux_trampoline_start): new declaration
684 (grub_linux_trampoline_end): likewise
685 (grub_linux_boot): use trampoline when on 64-bit platform
686 * loader/i386/linux.c: likewise
687
cb5a0f40 6882009-05-16 Pavel Roskin <proski@gnu.org>
689
690 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
691 const to avoid a warning.
692 (grub_lua_setenv): Likewise.
693 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
694 lmsg to fix a warning.
695
334f2c28 6962009-05-16 Felix Zielcke <fzielcke@z-51.de>
697
698 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 699 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
700 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
701 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
702 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
703 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
704 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
705 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 706
59e5d3ec 7072009-05-16 Felix Zielcke <fzielcke@z-51.de>
708
709 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
710
9d87a1ba 7112009-05-16 Bean <bean123ch@gmail.com>
712
713 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
714 (lua_mod_SOURCES): New variable.
715 (lua_mod_CFLAGS): Likewise.
716 (lua_mod_LDFLAGS): Likewise.
717
718 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
719 (setjmp_mod_SOURCES): New variable.
720 (setjmp_mod_CFLAGS): Likewise.
721 (setjmp_LDFLAGS): Likewise.
722
723 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
724 (setjmp_mod_SOURCES): New variable.
725 (setjmp_mod_CFLAGS): Likewise.
726 (setjmp_LDFLAGS): Likewise.
727
728 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
729 (setjmp_mod_SOURCES): New variable.
730 (setjmp_mod_CFLAGS): Likewise.
731 (setjmp_LDFLAGS): Likewise.
732
733 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
734 (setjmp_mod_SOURCES): New variable.
735 (setjmp_mod_CFLAGS): Likewise.
736 (setjmp_LDFLAGS): Likewise.
737
738 * normal/i386/setjmp.S: Moved from here ...
739 * lib/i386/setjmp.S: ... Moved here
740 * normal/x86_64/setjmp.S: Moved from here ...
741 * lib/x86_64/setjmp.S: ... Moved here
742 * normal/powerpc/setjmp.S: Moved from here ...
743 * lib/powerpc/setjmp.S: ... Moved here
744 * normal/sparc64/setjmp.S: Moved from here ...
745 * lib/sparc64/setjmp.S: ... Moved here
746
747 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
748 returns_twice in mingw.
749
750 * script/lua/grub_lib.c: New file.
751 * script/lua/grub_lib.h: Likewise.
752 * script/lua/grub_lua.h: Likewise.
753 * script/lua/grub_main.c: Likewise.
754 * script/lua/lapi.c: Likewise.
755 * script/lua/lapi.h: Likewise.
756 * script/lua/lauxlib.c: Likewise.
757 * script/lua/lauxlib.h: Likewise.
758 * script/lua/lbaselib.c: Likewise.
759 * script/lua/lcode.c: Likewise.
760 * script/lua/lcode.h: Likewise.
761 * script/lua/ldblib.c: Likewise.
762 * script/lua/ldebug.c: Likewise.
763 * script/lua/ldebug.h: Likewise.
764 * script/lua/ldo.c: Likewise.
765 * script/lua/ldo.h: Likewise.
766 * script/lua/ldump.c: Likewise.
767 * script/lua/lfunc.c: Likewise.
768 * script/lua/lfunc.h: Likewise.
769 * script/lua/lgc.c: Likewise.
770 * script/lua/lgc.h: Likewise.
771 * script/lua/linit.c: Likewise.
772 * script/lua/liolib.c: Likewise.
773 * script/lua/llex.c: Likewise.
774 * script/lua/llex.h: Likewise.
775 * script/lua/llimits.h: Likewise.
776 * script/lua/lmathlib.c: Likewise.
777 * script/lua/lmem.c: Likewise.
778 * script/lua/lmem.h: Likewise.
779 * script/lua/loadlib.c: Likewise.
780 * script/lua/lobject.c: Likewise.
781 * script/lua/lobject.h: Likewise.
782 * script/lua/lopcodes.c: Likewise.
783 * script/lua/lopcodes.h: Likewise.
784 * script/lua/loslib.c: Likewise.
785 * script/lua/lparser.c: Likewise.
786 * script/lua/lparser.h: Likewise.
787 * script/lua/lstate.c: Likewise.
788 * script/lua/lstate.h: Likewise.
789 * script/lua/lstring.c: Likewise.
790 * script/lua/lstring.h: Likewise.
791 * script/lua/lstrlib.c: Likewise.
792 * script/lua/ltable.c: Likewise.
793 * script/lua/ltable.h: Likewise.
794 * script/lua/ltablib.c: Likewise.
795 * script/lua/ltm.c: Likewise.
796 * script/lua/ltm.h: Likewise.
797 * script/lua/lua.h: Likewise.
798 * script/lua/luaconf.h: Likewise.
799 * script/lua/lualib.h: Likewise.
800 * script/lua/lundump.c: Likewise.
801 * script/lua/lundump.h: Likewise.
802 * script/lua/lvm.c: Likewise.
803 * script/lua/lvm.h: Likewise.
804 * script/lua/lzio.c: Likewise.
805 * script/lua/lzio.h: Likewise.
806
5e898c9d 8072009-05-16 Bean <bean123ch@gmail.com>
808
809 * include/grub/kernel.h (grub_module_header_types): Add type
810 OBJ_TYPE_CONFIG.
811
812 * kern/main.c (grub_load_config): New function.
813 (grub_main): Call grub_load_config to read boot config.
814
815 * grub-mkimage (generate_image): New parameter config_path.
816 (options): New option --config.
817 (main): Parse --config option, and pass it to generate_image.
818
cf353a47 8192009-05-14 Christian Franke <franke@computer.org>
820
821 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
822 This fixes build on Cygwin.
823
3834887f 8242009-05-14 Pavel Roskin <proski@gnu.org>
825
826 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
827 jump. This saves two bytes, so the typical case of 2 swapped
828 drives would fit 32 bytes.
829
8090fc01 8302009-05-13 Pavel Roskin <proski@gnu.org>
831
ac963883 832 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
833 grub_uint32_t to avoid a warning.
834
8090fc01 835 * loader/i386/linux.c (allocate_pages): When assigning
836 real_mode_mem, cast through grub_size_t to fix a warning. The
837 code already makes sure that the value would fit a pointer.
838 (grub_linux_setup_video): Cast render_target->data to
839 grub_size_t to fix a warning.
840
18f547ad 8412009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 842
843 * commands/i386/pc/drivemap.c: New file - implement drivemap
844 command.
845 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
846 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
847
6f6a8b28 8482009-05-13 Pavel Roskin <proski@gnu.org>
849
850 * util/i386/pc/grub-setup.c (setup): Remove unused variable
851 embedding_area_exists.
852
15fbf4c4 8532009-05-13 Robert Millan <rmh.grub@aybabtu.com>
854
855 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
856 it easier to understand / work with.
59978c8a 857 Improve warning messages for cases where there's no embedding area,
858 or when it is too small (or core.img too large).
15fbf4c4 859
238e871f 8602009-05-13 Pavel Roskin <proski@gnu.org>
861
0ab3a9a4 862 * loader/i386/pc/multiboot2.c: Add necessary includes for
863 grub_multiboot2_real_boot().
864
a2c8c5f8 865 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
866 PX record is always little-endian. We only need the lower 2
867 bytes of the mode.
868
faec96af 869 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
870 facilitate code reuse.
871 (grub_cpio_mount): Use "struct head", not a char buffer. This
872 fixes a warning reported by gcc 4.4.
873
238e871f 874 * kernel/disk.c (grub_disk_read): Use void pointer for the
875 buffer.
876 (grub_disk_write): Use const void pointer for the buffer.
877 Adjust all callers. Remove unnecessary casts.
878
901d2f0c 8792009-05-10 Robert Millan <rmh.grub@aybabtu.com>
880
881 * util/i386/pc/grub-install.in: Update copyright year.
882
18f547ad 8832009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 884
885 gptsync
886
887 * commands/gptsync.c: new file
888 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
889 (gptsync_mod_SOURCES): new variable
890 (gptsync_mod_CFLAGS): likewise
891 (gptsync_mod_LDFLAGS): likewise
18f547ad 892 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 893 new definition
894 (GRUB_PC_PARTITION_TYPE_HFS): likewise
895 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
896 * conf/i386-ieee1275.rmk: likewise
897 * conf/i386-pc.rmk: likewise
898 * conf/powerpc-ieee1275.rmk: likewise
899
b4ba690a 9002009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
901
902 Fixed grub-emu
903
904 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
905 (grub_dl_ref): likewise
906
317e1a44 9072009-05-08 Robert Millan <rmh.grub@aybabtu.com>
908
909 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
910 split in two functions (one for msdos and one for gpt).
911
041b8094 9122009-05-08 Pavel Roskin <proski@gnu.org>
913
752473c2 914 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
915 not modified.
916
041b8094 917 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
918 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
919 Initialize them with -1. Add sanity check for bad1. Eliminate
920 nerr variable.
921
172800ce 9222009-05-08 David S. Miller <davem@davemloft.net>
923
924 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
925
29aa5e81 9262009-05-06 Robert Millan <rmh.grub@aybabtu.com>
927
928 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 929 existence.
29aa5e81 930
96613b62 9312009-05-05 Felix Zielcke <fzielcke@z-51.de>
932
933 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 934 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 935
eef73c8a 9362009-05-05 David S. Miller <davem@davemloft.net>
937
938 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
939
119494b5 9402009-05-05 Pavel Roskin <proski@gnu.org>
941
942 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
943 of grub_dl_ref() and grub_dl_unref().
944 * commands/parttool.c: Remove preprocessor conditionals around
945 grub_dl_ref() and grub_dl_unref().
946 * fs/affs.c: Likewise.
947 * fs/afs.c: Likewise.
948 * fs/cpio.c: Likewise.
949 * fs/ext2.c: Likewise.
950 * fs/fat.c: Likewise.
951 * fs/hfs.c: Likewise.
952 * fs/hfsplus.c: Likewise.
953 * fs/iso9660.c: Likewise.
954 * fs/jfs.c: Likewise.
955 * fs/minix.c: Likewise.
956 * fs/ntfs.c: Likewise.
957 * fs/reiserfs.c: Likewise.
958 * fs/sfs.c: Likewise.
959 * fs/udf.c: Likewise.
960 * fs/ufs.c: Likewise.
961 * fs/xfs.c: Likewise.
962 * include/grub/dl.h: Likewise.
963 * loader/xnu.c: Likewise.
964
de5fd76e 9652009-05-04 Pavel Roskin <proski@gnu.org>
966
967 * commands/acpi.c: Remove unused variable my_mod.
968 * partmap/amiga.c: Likewise.
969 * partmap/apple.c: Likewise.
970 * partmap/gpt.c: Likewise.
971 * partmap/pc.c: Likewise.
972 * partmap/sun.c: Likewise.
973 * term/gfxterm.c: Likewise.
974 * term/i386/pc/vesafb.c: Likewise.
975 * term/i386/pc/vga.c: Likewise.
976
983598ad 9772009-05-04 David S. Miller <davem@davemloft.net>
978
979 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
980 pointer args to grub_ieee1275_get_property().
981
8aadec43 982 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
983
9554b15e 984 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
985 devices, and do not traverse down under controller nodes.
986
67e23c90 987 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
988 (grub_ofdisk_open): Use it to un-escape "," characters.
989 * kern/disk.c (find_part_sep): New.
990 (grub_disk_open): Use it to find the first non-escaped ','
991 character in the disk name.
992 * util/ieee1275/devicemap.c (escape_of_path): New.
993 (grub_util_emit_devicemap_entry): Use it.
994 * util/sparc64/ieee1275/grub-install.in: Update script to
995 strip partition specifiers properly by not triggering on
996 '\' escaped ',' characters.
997
74bfdd2f 9982009-05-04 Robert Millan <rmh.grub@aybabtu.com>
999
1000 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1001 to 0x300.
1002 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1003 resolutions.
1004 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1005 on documentation from Wikipedia).
1006
4241d2b1 10072009-05-04 Pavel Roskin <proski@gnu.org>
1008
1009 * disk/ata.c: Spelling fixes.
1010 * disk/raid.c: Likewise.
1011 * disk/usbms.c: Likewise.
1012 * disk/dmraid_nvidia.c: Likewise.
1013 * kern/ieee1275/openfw.c: Likewise.
1014 * kern/ieee1275/init.c: Likewise.
1015 * kern/ieee1275/cmain.c: Likewise.
1016 * boot/i386/pc/cdboot.S: Likewise.
1017 * video/readers/png.c: Likewise.
1018 * video/i386/pc/vbe.c: Likewise.
1019 * fs/udf.c: Likewise.
1020 * fs/hfs.c: Likewise.
1021 * fs/reiserfs.c: Likewise.
1022 * efiemu/runtime/efiemu.c: Likewise.
1023 * efiemu/main.c: Likewise.
1024 * efiemu/mm.c: Likewise.
1025 * include/grub/elf.h: Likewise.
1026 * include/grub/xnu.h: Likewise.
1027 * include/grub/usbdesc.h: Likewise.
1028 * include/grub/usb.h: Likewise.
1029 * include/grub/script_sh.h: Likewise.
1030 * include/grub/lib/LzmaEnc.h: Likewise.
1031 * include/grub/efiemu/efiemu.h: Likewise.
1032 * include/grub/command.h: Likewise.
1033 * normal/menu.c: Likewise.
1034 * normal/main.c: Likewise.
1035 * normal/datetime.c: Likewise.
1036 * bus/usb/uhci.c: Likewise.
1037 * mmap/i386/uppermem.c: Likewise.
1038 * mmap/mmap.c: Likewise.
1039 * commands/acpi.c: Likewise.
1040 * commands/test.c: Likewise.
1041 * partmap/apple.c: Likewise.
1042 * font/font.c: Likewise.
1043 * loader/sparc64/ieee1275/linux.c: Likewise.
1044 * loader/macho.c: Likewise.
1045 * loader/i386/bsd_trampoline.S: Likewise.
1046 * loader/i386/bsd.c: Likewise.
1047 * loader/xnu.c: Likewise.
1048 * term/i386/pc/vesafb.c: Likewise.
1049 * term/usb_keyboard.c: Likewise.
1050 * util/resolve.c: Likewise.
1051 * util/getroot.c: Likewise.
1052
0cfc0083 10532009-05-04 Felix Zielcke <fzielcke@z-51.de>
1054
1055 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1056
7c1d00cd 10572009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1058
1059 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1060 build error.
1061
b01f0548 10622009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1063
1064 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1065 parameter only available on BIOS.
1066
ecc3eb22 10672009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1068
1069 Removed wrong semicolon in declaration
1070
1071 * grub/misc.h (grub_dprintf): remove semicolon
1072
112972a9 10732009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1074
1075 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1076 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1077 is done by grub_cmd_linux() now).
1078 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1079 restore video to text mode.
1080 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1081 indicates lack of "vga=" parameter. "vga=0" is mapped to
1082 `GRUB_LINUX_VID_MODE_NORMAL'.
1083
afd5c115 10842009-05-04 Felix Zielcke <fzielcke@z-51.de>
1085
1086 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1087 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1088 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 1089 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 1090 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1091 `grub_script.tab.c'.
1092
1093 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1094 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1095 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1096 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1097 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1098
faa517ce 1099 * Makefile.in: Remove duplicated 2008 in Copyright line.
1100
ae0c0bdc 11012009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1102
473d1e45 1103 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 1104 unconditionally.
1105 * include/grub/util/misc.h (grub_util_warn): New declaration.
1106
1107 * util/i386/pc/grub-install.in: Understand --force and pass it down
1108 to grub-setup.
1109
1110 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1111 down to setup().
1112 (setup): Improve error messages and add warnings when requested to
1113 install in odd layouts. Refuse to install using blocklists unless
1114 --force was set.
1115
18f547ad 11162009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 1117
1118 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1119
6d260daa 11202009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1121
1122 Updated copyright year
1123
1124 * fs/hfsplus.c: updated copyright year
18f547ad 1125
69f853f8 11262009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1127
1128 HFS+ UUID
1129
18f547ad 1130 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 1131 in the space previously used by unused3
1132 (grub_hfsplus_uuid): new function
1133 (grub_hfsplus_fs): added uuid field
1134
4c402e73 11352009-05-03 Pavel Roskin <proski@gnu.org>
1136
1137 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1138 suppress warnings. It's no longer needed.
1139 * disk/host.c: Likewise.
1140 * disk/ata_pthru.c: Likewise.
1141 * disk/loopback.c: Likewise.
1142 * hook/datehook.c: Likewise.
1143 * parttool/pcpart.c: Likewise.
1144 * fs/i386/pc/pxe.c: Likewise.
1145 * fs/ntfscomp.c: Likewise.
1146 * efiemu/main.c: Likewise.
1147 * mmap/mmap.c: Likewise.
1148 * commands/crc.c: Likewise.
1149 * commands/hexdump.c: Likewise.
1150 * commands/hdparm.c: Likewise.
1151 * commands/acpi.c: Likewise.
1152 * commands/echo.c: Likewise.
1153 * commands/minicmd.c: Likewise.
1154 * commands/blocklist.c: Likewise.
1155 * commands/memrw.c: Likewise.
1156 * commands/loadenv.c: Likewise.
1157 * commands/usbtest.c: Likewise.
1158 * commands/lsmmap.c: Likewise.
1159 * commands/boot.c: Likewise.
1160 * commands/parttool.c: Likewise.
1161 * commands/configfile.c: Likewise.
1162 * commands/search.c: Likewise.
1163 * commands/ieee1275/suspend.c: Likewise.
1164 * commands/cat.c: Likewise.
1165 * commands/i386/pc/pxecmd.c: Likewise.
1166 * commands/i386/pc/play.c: Likewise.
1167 * commands/i386/pc/halt.c: Likewise.
1168 * commands/i386/pc/vbeinfo.c: Likewise.
1169 * commands/i386/pc/vbetest.c: Likewise.
1170 * commands/lspci.c: Likewise.
1171 * commands/date.c: Likewise.
1172 * commands/handler.c: Likewise.
1173 * commands/ls.c: Likewise.
1174 * commands/test.c: Likewise.
1175 * commands/cmp.c: Likewise.
1176 * commands/efi/loadbios.c: Likewise.
1177 * commands/efi/fixvideo.c: Likewise.
1178 * commands/halt.c: Likewise.
1179 * commands/help.c: Likewise.
1180 * commands/reboot.c: Likewise.
1181 * hello/hello.c: Likewise.
1182 * script/sh/main.c: Likewise.
1183 * loader/xnu.c: Likewise.
1184 * term/terminfo.c: Likewise.
1185 * term/i386/pc/serial.c: Likewise.
1186 * term/usb_keyboard.c: Likewise.
1187
515b5079 11882009-05-03 David S. Miller <davem@davemloft.net>
1189
1190 * normal/menu.c: Include grub/parser.h
1191
dfc31a22 11922009-05-03 Pavel Roskin <proski@gnu.org>
1193
2fee74f1 1194 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1195 not char*.
1196 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1197 Suggested by Javier Martín <lordhabbit@gmail.com>
1198
dfc31a22 1199 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1200 efiemu??.o doesn't exist.
1201 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1202 copying.
1203
18f547ad 12042009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 1205
1206 FreeBSD 64-bit support
1207
18f547ad 1208 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 1209 and loader/i386/bsd_trampoline.S
1210 (bsd_mod_ASFLAGS): new variable
1211 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1212 (FREEBSD_MODTYPE_KERNEL64): likewise
1213 (grub_bsd64_trampoline_start): likewise
1214 (grub_bsd64_trampoline_end): likewise
1215 (grub_bsd64_trampoline_selfjump): likewise
1216 (grub_bsd64_trampoline_gdt): likewise
1217 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1218 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1219 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1220 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 1221 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 1222 of "attrib" member
1223 * loader/i386/bsd_pagetable.c: new file
1224 * loader/i386/bsd_trampoline.S: likewise
1225 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1226 (ALIGN_VAR): likewise
1227 (entry_hi): new variable
1228 (kern_end_mdofs): likewise
1229 (is_64bit): likewise
1230 (grub_freebsd_add_meta): use ALIGN_VAR
1231 (grub_e820_mmap): new declaration
1232 (grub_freebsd_add_mmap): new function
1233 (grub_freebsd_add_meta_module): support 64 bit kernels
1234 (grub_freebsd_list_modules): use ALIGN_VAR
1235 (gdt_descriptor): new declaration
1236 (grub_freebsd_boot): support 64 bit kernels
1237 (grub_bsd_elf64_hook): new function
1238 (grub_bsd_load_elf): support elf64
1239
038c5720 12402009-05-03 Bean <bean123ch@gmail.com>
1241
1242 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1243 after we get the result of if statement.
1244
fc45fb58 12452009-05-03 Bean <bean123ch@gmail.com>
1246
1247 * Makefile.in (enable_efiemu): New variable.
1248
1249 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1250 set.
1251 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1252 path.
1253 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1254 path, add -mno-red-zone option.
1255 (efiemu64_s.o): Likewise.
1256 (efiemu64.o): Use macro $^ for source file.
1257
1258 * configure.ac (--enable-efiemu): New option.
1259
bbee0f2b 12602009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1261
1262 xnu support
1263
1264 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1265 (pkglib_MODULES): add xnu.mod
1266 (xnu_mod_SOURCES): new variable
1267 (xnu_mod_CFLAGS): likewise
1268 (xnu_mod_LDFLAGS): likewise
1269 (xnu_mod_ASFLAGS): likewise
1270 * conf/i386-pc.rmk: likewise
1271 * conf/x86_64-efi.rmk: likewise
7dd4a573 1272 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 1273 new declaration
1274 * include/grub/i386/macho.h: new file
1275 * include/grub/i386/xnu.h: likewise
1276 * include/grub/macho.h: likewise
1277 * include/grub/machoload.h: likewise
1278 * include/grub/x86_64/macho.h: likewise
1279 * include/grub/x86_64/xnu.h: likewise
1280 * include/grub/xnu.h: likewise
1281 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1282 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1283 * loader/i386/efi/xnu.c: new file
1284 * loader/i386/pc/xnu.c: likewise
1285 * loader/i386/xnu.c: likewise
1286 * loader/i386/xnu_helper.S: likewise
1287 * loader/macho.c: likewise
1288 * loader/xnu.c: likewise
1289 * loader/xnu_resume.c: likewise
1290 * util/grub-dumpdevtree: likewise
1291 * include/grub/i386/pit.h: include grub/err.h
1292 (grub_pit_wait): export
1293 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 1294
5caf964d 12952009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1296
1297 Efiemu
7dd4a573 1298
5caf964d 1299 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 1300 _linux_efi, linux_efi.
1301 new files in grub-emu
5caf964d 1302 new targets efiemu32.o and efiemu64.o
1303 * loader/linux_normal_efiemu.c: likewise
1304 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 1305 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 1306 files to copy
1307 * include/grub/autoefi.h: new file
7dd4a573 1308 * include/grub/i386/efiemu.h: likewise
5caf964d 1309 * include/grub/i386/pc/efiemu.h: likewise
1310 * include/grub/efi/api.h: add LL suffix when necessary
1311 new definitions relating to tables
1312 * include/grub/efiemu/efiemu.h: new file
1313 * include/grub/efiemu/runtime.h: likewise
1314 * efiemu/prepare.c: likewise
1315 * efiemu/loadcore_common.c: likewise
1316 * efiemu/loadcore64.c: likewise
1317 * efiemu/runtime/efiemu.sh: likewise
1318 * efiemu/runtime/efiemu.S: likewise
1319 * efiemu/runtime/efiemu.c: likewise
1320 * efiemu/runtime/config.h: likewise
1321 * efiemu/prepare32.c: likewise
1322 * efiemu/main.c: likewise
1323 * efiemu/modules/pnvram.c: likewise
1324 * efiemu/modules/i386: likewise
1325 * efiemu/modules/i386/pc: likewise
1326 * efiemu/modules/acpi.c: likewise
1327 * efiemu/i386/pc/cfgtables.c: likewise
1328 * efiemu/i386/loadcore64.c: likewise
1329 * efiemu/i386/loadcore32.c: likewise
1330 * efiemu/prepare64.c: likewise
1331 * efiemu/loadcore.c: likewise
1332 * efiemu/symbols.c: likewise
1333 * efiemu/mm.c: likewise
1334 * efiemu/loadcore32.c: likewise
7dd4a573 1335
13362009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 1337
1338 ACPI spoofing
1339
1340 * commands/acpi.c: new file
1341 * commands/i386/pc/acpi.c: likewise
1342 * commands/efi/acpi.c: likewise
1343 * include/grub/acpi.h: likewise
1344 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1345 (acpi_mod_SOURCES): new variable
1346 (acpi_mod_CFLAGS): likewise
1347 (acpi_mod_LDFLAGS): likewise
1348 * conf/i386-efi.rmk: likewise
1349 * conf/x86_64-efi.rmk: likewise
1350
7dd4a573 13512009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 1352
1353 Missing part from mmap patch
1354
1355 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1356 (grub_mmap_unregister)
1357 (grub_mmap_free_and_unregister): use grub_mmap_register
1358
7dd4a573 13592009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 1360
1361 Mmap services
1362
1363 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1364 * loader/i386/linux.c (find_mmap_size): likewise
1365 (allocate_pages): likewise
1366 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1367 (grub_fill_multiboot_mmap): likewise
1368 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1369 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1370 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1371 (OPENBSD_MMAP_RESERVED): likewise
1372 * include/grub/i386/pc/memory.h: include grub/memory.h
1373 (grub_lower_mem): removed
1374 (grub_upper_mem): likewise
1375 (GRUB_MACHINE_MEMORY_ACPI): new definition
1376 (GRUB_MACHINE_MEMORY_NVS): likewise
1377 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1378 (GRUB_MACHINE_MEMORY_HOLE): likewise
1379 (grub_machine_mmap_register): likewise
1380 (grub_machine_mmap_unregister): likewise
1381 (grub_machine_get_upper): likewise
1382 (grub_machine_get_lower): likewise
1383 (grub_machine_get_post64): likewise
1384 * include/grub/i386/efi/memory.h: new file
1385 * include/grub/x86_64/efi/memory.h: likewise
1386 * include/grub/efi/memory.h: likewise
1387 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1388 (mmap_mod_SOURCES): new variable
1389 (mmap_mod_LDFLAGS): likewise
1390 (mmap_mod_ASFLAGS): likewise
1391 * conf/i386-coreboot.rmk: likewise
1392 * conf/i386-ieee1275.rmk: likewise
1393 * conf/i386-efi.rmk: likewise
1394 * conf/x86_64-efi.rmk: likewise
1395 * include/grub/types.h (UINT_TO_PTR): new macro
1396 (PTR_TO_UINT32): likewise
1397 (PTR_TO_UINT64): likewise
1398 * include/grub/memory.h: new file
1399 * mmap/i386/pc/mmap.c: likewise
1400 * mmap/i386/pc/mmap_helper.S: likewise
1401 * mmap/i386/uppermem.c: likewise
1402 * mmap/mmap.c: likewise
1403 * mmap/efi/mmap.c: likewise
7dd4a573 1404 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 1405 grub_upper_mem
1406 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1407 (grub_upper_mem): likewise
1408 (grub_machine_init): don't use grub_upper_mem,
1409 make grub_lower_mem local
1410 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1411 grub_mmap_iterate and grub_mmap_get_upper
1412 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1413
d558e6b5 14142009-05-02 Bean <bean123ch@gmail.com>
1415
1416 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1417 script/sh/parser.y.
1418 (pkglib_MODULES): Add normal.mod and sh.mod.
1419 (normal_SOURCES): New variable.
1420 (normal_mod_CFLAGS): Likewise.
1421 (normal_mod_LDFLAGS): Likewise.
1422 (sh_mod_SOURCES): Likewise.
1423 (sh_mod_CFLAGS): Likewise.
1424 (sh_mod_LDFLAGS): Likewise.
1425
1426 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1427 script/sh/lexer.c_DEPENDENCIES.
1428 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1429 kern/rescue_reader.c and kern/rescue_parser.c.
1430 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1431 (grub_emu_SOURCES): Change source files.
1432 (pkglib_MODULES): Remove normal.mod.
1433 (normal_SOURCES): Removed.
1434 (normal_mod_CFLAGS): Likewise.
1435 (normal_mod_LDFLAGS): Likewise.
1436 * conf/i386-coreboot.rmk: Likewise.
1437 * conf/i386-efi.rmk: Likewise.
1438 * conf/i386-ieee1276.rmk: Likewise.
1439 * conf/powerpc-ieee1275.rmk: Likewise.
1440 * conf/sparc64-ieee1275.rmk: Likewise.
1441 * conf/x86_64-efi.rmk: Likewise.
1442
1443 * include/grub/command.h (grub_command_execute): New inline function.
1444
1445 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1446
1447 * include/grub/normal.h: Remove <grub/setjmp.h>.
1448 (grub_fs_module_list): Moved to normal/autofs.c.
1449 (grub_exit_env): Removed.
1450 (grub_command_execute): Likewise.
1451 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1452 parameter script.
1453 (read_command_list): New function declaration.
1454 (read_fs_list): Likewise.
1455
1456 * include/parser.h: Include <grub/reader.h>.
1457 (grub_parser_split_cmdline): Change type of getline parameter.
1458 (grub_parser): New structure.
1459 (grub_parser_class): New variable.
1460 (grub_parser_execute): New function declaration.
1461 (grub_register_rescue_parser): Likewise.
1462 (grub_parser_register): New inline function.
1463 (grub_parser_unregister): Likewise.
1464 (grub_parser_get_current): Likewise.
1465 (grub_parser_set_current): Likewise.
1466
1467 * include/grub/reader.h: New file.
1468 * kern/reader.c: Likewise.
1469 * kern/rescue_parser.c: Likewise.
1470 * kern/rescue_reader.c: Likewise.
1471 * normal/autofs.c: Likewise.
1472 * normal/dyncmd.c: Likewise.
1473
1474 * include/grub/rescue.h: Removed.
1475 * normal/command.h: Likewise.
1476
1477 * include/grub/script.h: Moved to ...
1478 * include/grub/script_sh.h: ... Moved here.
1479 * normal/execute.c: Moved to ...
1480 * script/sh/execute.c: ... Moved here.
1481 * normal/function.c: Moved to ...
1482 * script/sh/function.c: ... Moved here.
1483 * normal/lexer.c: Moved to ...
1484 * script/sh/lexer.c: ... Moved here.
1485 * normal/parser.y: Moved to ...
1486 * script/sh/parser.y: ... Moved here.
1487 * normal/script.c: Moved to ...
1488 * script/sh/script.c: ... Moved here.
1489
1490 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1491 <grub/reader.h>.
1492 (grub_exit_env): Removed.
1493 (fs_module_list): Moved to normal/autofs.c.
1494 (grub_file_getline): Don't handle comment here.
1495 (free_menu): Skip removed field entry->commands.
1496 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1497 script parameter.
1498 (read_config_file): Removed nested parameter, change getline function.
1499 (grub_enter_normal_mode): Removed.
1500 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1501 (read_command_list): Likewise.
1502 (autoload_fs_module): Moved to normal/autofs.c.
1503 (read_fs_list): Likewise.
1504 (reader_nested): New variable.
1505 (grub_normal_execute): Run parser.sh to switch to sh parser.
1506 (grub_cmd_rescue): Removed.
1507 (cmd_normal): Removed.
1508 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1509 rescue command.
1510 (grub_cmdline_run): New function.
1511 (grub_normal_reader_init): Likewise.
1512 (grub_normal_read_line): Likewise.
1513 (grub_env_write_pager): Likewise.
1514 (cmdline): New variable.
1515 (grub_normal_reader): Likewise.
1516 (GRUB_MOD_INIT): Register normal reader and set as current, register
1517 pager hook, register normal command with grub_register_command_prio,
1518 so that it won't show up in command.lst.
1519 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1520 grub_fs_autoload_hook.
1521
1522 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1523 (grub_menu_execute_entry): Replace grub_script_execute with
1524 grub_parser_execute, change parameter to grub_command_execute.
1525
1526 * normal/menu_text.c: Remove <grub/script.h>.
1527
1528 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1529 and <grub/parser.h>.
1530 (run): Change editor_getline to use new parser interface. Change
1531 parameter to grub_command_execute.
1532
1533 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1534 <grub/reader.h> and <grub/parser.h>.
1535 (grub_load_normal_mode): Execute normal command.
1536 (grub_main): Call grub_register_core_commands,
1537 grub_register_rescue_parser and grub_register_rescue_reader, use
1538 grub_reader_loop to enter input loop.
1539
7dd4a573 1540 * kern/parser.c (grub_parser_split_cmdline): Change type of
1541 getline parameter.
d558e6b5 1542 (grub_parser_class): New variable.
1543 (grub_parser_execute): New function.
1544
1545 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1546 * loader/multiboot2.c: Likewise.
1547 * loader/sparc64/ieee1275/linux.c: Likewise.
1548
1549 * util/grub-emu.c (read_command_list): New dummy function.
1550
18db813d 15512009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1552
1553 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1554 count to 16 for CCISS and IDA.
1555
6c67de15 15562009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1557
1558 * normal/menu_text.c (grub_wait_after_message): Print a newline
1559 after waiting for user input.
1560
1561 * loader/i386/linux.c: Include `<grub/normal.h>'.
1562 (grub_cmd_linux): Improve the error message about `ask' mode, by
1563 waiting for user input so it's not missed (we can do this, since
1564 user requested interaction).
1565
d9dc87b0 15662009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1567
1568 Added missing lst to grub-mkrescue
1569
1570 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1571 and ${input_dir}/parttool.lst
1572
ac8a2baa 15732009-04-30 David S. Miller <davem@davemloft.net>
1574
ad22a610 1575 * util/hostdisk.c (device_is_wholedisk): New function.
1576 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1577 zero only if device_is_wholedisk() returns true.
1578
6966215d 1579 * util/hostdisk.c (convert_system_partition_to_system_disk):
1580 Handle virtual disk devices named /dev/vdiskX as found on sparc
1581 and powerpc.
1582
ac8a2baa 1583 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1584 lettered partition specifier is found, convert to numbered.
1585
979b4fb4 15862009-04-29 David S. Miller <davem@davemloft.net>
1587
e2bf39b2 1588 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1589 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1590
3c64e104 1591 * normal/command.c: Add missing newline at end of file.
1592
979b4fb4 1593 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1594 warnings.
1595 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1596 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1597 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1598 ihandles have a 32-bit type but need to be stored in a "void *".
1599
136d9f82 16002009-04-28 Pavel Roskin <proski@gnu.org>
1601
9459c306 1602 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1603 not disk. Adjust all dependencies.
2e08a26a 1604 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 1605 grub_disk_close().
1606
136d9f82 1607 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1608 parent's partition, don't copy it by reference, as it gets freed
1609 on close.
1610
7dd4a573 16112009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 1612
1613 Preboot hooks support
1614
1615 * commands/boot.c (struct grub_preboot_t): new declaration
1616 (preboots_head): new variable
1617 (preboots_tail): likewise
1618 (grub_loader_register_preboot_hook): new function
1619 (grub_loader_unregister_preboot_hook): likewise
1620 (grub_loader_set): launch preboot hooks
1621 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1622 (grub_loader_register_preboot_hook): new declaration
1623 (grub_loader_unregister_preboot_hook): likewise
1624
5af922b5 16252009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1626
1627 Warning fix
1628
7dd4a573 1629 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 1630 calling grub_dprintf
1631
a5562c30 16322009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1633
1634 Bug and warning fixes
1635
7dd4a573 1636 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 1637 declaration
1638 * commands/test.c (test_parse): fixed bug with file tests and corrected
1639 declaration of find_file
1640
4006f85c 16412009-04-26 Pavel Roskin <proski@gnu.org>
1642
1643 * Makefile.in: Don't install empty manual pages if help2man is
1644 missing. Use help2man option for output, not shell redirection.
1645
5c77c3de 16462009-04-26 David S. Miller <davem@davemloft.net>
1647
1648 * util/grub-mkdevicemap.c (make_device_map): Add missing
1649 NESTED_FUNC_ATTR to process_device().
1650
033b10a8 16512009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1652
1653 Test command
1654
1655 * commands/test.c: rewritten to use bash-like test
1656
e4343593 16572009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1658
1659 Parttool autoloading and improvements
1660
7dd4a573 1661 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 1662 (parttool.lst): new target
1663 * genmk.rb: generate parttool-*
1664 (CLEANFILES): add #{parttool}
1665 (PARTTOOLFILES): new variable
1666 * genparttoollist.sh: new file
7dd4a573 1667 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 1668 (grub_pcpart_type): likewise
1669 * commands/parttool.c (helpmsg): new variable
1670 (grub_cmd_parttool): output help if not enough arguments are supplied
1671 autoload modules
1672 (GRUB_MOD_INIT(parttool)): use helpmsg
1673
0d312500 16742009-04-24 David S. Miller <davem@davemloft.net>
1675
7dd4a573 1676 Avoiding opening same device multiple times in device iterator.
0d312500 1677
1678 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 1679 and use it to build a list of partitions in iterate_disk() and
0d312500 1680 iterate_partition().
1681
ac20caff 1682 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1683 on disk->data.
1684
0dcf7495 1685 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1686 grub_devalias_iterate() result instead of unconditional 0.
1687 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1688 Also, capture hook return value, either directly or via
1689 grub_children_iterate(), and propagate to caller.
1690 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1691 grub_children_iterate): Return value is now 'int' instead of
1692 'grub_err_t'.
1693 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1694 like a proper iterator, stopping when hooks return non-zero.
1695 (grub_devalias_iterate): Likewise.
1696
c8c08833 16972009-04-23 David S. Miller <davem@davemloft.net>
1698
1699 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1700
f01005a8 17012009-04-22 David S. Miller <davem@davemloft.net>
1702
1703 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1704 is larger than address_cells, use that value for address_cells too.
1705
4e8269da 1706 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1707 IEEE1275_MAX_PATH_LEN): Define.
1708 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1709 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1710 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1711 'devtype'. Explicitly NULL terminate devalias expansion.
1712
a1447506 1713 * util/sparc64/ieee1275/misc.c: New file.
1714 * util/sparc64/ieee1275/grub-setup.c: New file.
1715 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1716 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1717 * util/sparc64/ieee1275/grub-install.in: New file.
1718 * util/ieee1275/ofpath.c: New file.
1719 * util/ieee1275/devicemap.c: New file.
1720 * util/devicemap.c: New file.
1721 * util/deviceiter.c: New file.
1722 * kern/sparc64/ieee1275/init.c: New file.
1723 * include/grub/util/ofpath.h: New file.
1724 * include/grub/util/deviceiter.h: New file.
1725 * util/grub-mkdevicemap.c: Include deviceiter.h.
1726 Implement using grub_util_emit_devicemap_entry and
1727 grub_util_iterate_devices.
1728 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1729 util/devicemap.c into grub-mkdevicemap
1730 * conf/i386-efi.rmk: Likewise.
1731 * conf/i386-ieee1275.rmk: Likewise.
1732 * conf/i386-pc.rmk: Likewise.
1733 * conf/powerpc-ieee1275.rmk: Likewise.
1734 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1735 images and installation utilities. Build kernel as image
1736 instead of as elf binary. Use common rules as much as possible.
1737
7dd4a573 17382009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 1739
1740 Correct GPT definition
1741
7dd4a573 1742 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 1743 of "attrib" member
1744
c6c5219f 17452009-04-19 Felix Zielcke <fzielcke@z-51.de>
1746
1747 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1748
0552ff9f 17492009-04-19 David S. Miller <davem@davemloft.net>
1750
1751 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1752 (grub_rescue_cmd_linux): Rename to...
1753 (grub_cmd_linux): and fix prototype.
1754 (grub_rescue_cmd_initrd): Rename to...
1755 (grub_cmd_initrd): and fix prototype.
1756 (cmd_linux, cmd_initrd): New.
1757 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1758 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1759
d1a282fc 17602009-04-17 Pavel Roskin <proski@gnu.org>
1761
07c5039f 1762 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1763 format.
1764 (grub_ohci_transfer): Likewise.
1765
b012002d 1766 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1767
1bc09c35 1768 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1769 return without a value. Fix inconsistent indentation.
1770
e0ff9126 1771 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1772 match struct grub_fs.
1773
d1a282fc 1774 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1775 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1776 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1777 * commands/lspci.c (grub_lspci_iter): Likewise.
1778
a96df3f2 17792009-04-16 Bean <bean123ch@gmail.com>
1780
1781 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1782 value.
1783
41bb0fe9 17842009-04-15 Pavel Roskin <proski@gnu.org>
1785
1786 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1787 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1788 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1789 definitions.
1790
596c6970 17912009-04-15 Felix Zielcke <fzielcke@z-51.de>
1792
1793 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 1794 that no multiple data or metadata areas are supported and `Unknown
596c6970 1795 metadata header'.
1796
7dd4a573 17972009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 1798
1799 Move loader out of the kernel
1800
1801 * kern/loader.c: moved to ...
1802 * commands/boot.c: ... moved here
1803 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1804 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1805 * include/grub/kernel.h (grub_machine_fini): export
1806 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1807 (grub_loader_set): likewise
1808 (grub_loader_unset): likewise
1809 (grub_loader_boot): likewise
1810 * conf/common.rmk: new module boot.mod
1811 (pkglib_MODULES): add boot.mod
1812 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1813 (grub_emu_SOURCES): likewise
1814 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1815 (grub_emu_SOURCES): likewise
1816 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1817 (grub_emu_SOURCES): likewise
1818 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1819 (grub_emu_SOURCES): likewise
1820 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1821 (grub_emu_SOURCES): likewise
7dd4a573 1822 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1823 (grub_emu_SOURCES): likewise
0d5d5653 1824 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 1825 (grub_emu_SOURCES): likewise
0d5d5653 1826
7dd4a573 18272009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 1828
1829 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 1830
5999d619 1831 * kern/misc.c (grub_itoa): Removed function
1832 (grub_ltoa): likewise
1833 (grub_vsprintf): use grub_lltoa
1834
7dd4a573 18352009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 1836
1837 Restore grub-emu
1838
1839 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1840 * conf/i386-coreboot.rmk: likewise
1841 * conf/i386-ieee1275.rmk: likewise
1842 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1843
20318222 18442009-04-15 Felix Zielcke <fzielcke@z-51.de>
1845
1846 * INSTALL: Add that `./autogen.sh' needs to be run before
1847 `./configure.'.
1848
d05f0df3 18492009-04-14 Bean <bean123ch@gmail.com>
1850
1851 * Makefile.in (pkglib_DATA): Add handler.lst.
1852 (handler.lst): New rule.
1853
1854 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1855 * conf/i386-coreboot.rmk: Likewise.
1856 * conf/i386-ieee1275.rmk: Likewise.
1857 * conf/i386-efi.rmk: Likewise.
1858 * conf/x86_64-efi.rmk: Likewise.
1859 * conf/powerpc-ieee1275.rmk: Likewise.
1860 * conf/sparc64-ieee1275.rmk: Likewise.
1861
1862 * genhandlerlist.sh: New file.
1863
1864 * genmk.rb: Add rules to generate handler.lst.
1865
1866 * include/grub/normal.h (grub_file_getline): New function definition.
1867 (read_handler_list): Likewise.
1868 (free_handler_list): Likewise.
1869
1870 * include/grub/term.h (grub_term_register_input): Add name parameter
1871 for auto generation of handler.lst.
1872 (grub_term_register_output): Likewise.
1873
1874 * normal/handler.c: New file.
1875
1876 * normal/main.c (get_line): Renamed to grub_file_getline.
1877 (read_config_file): Use the newly renamed grub_file_getline.
1878 (read_command_list): Likewise.
1879 (read_fs_list): Likewise.
1880 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1881 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1882
1883 * term/efi/console.c (grub_console_init): Add name parameter for auto
1884 generation of handler.lst.
1885 * term/gfxterm.c: Likewise.
1886 * term/i386/pc/at_keyboard.c: Likewise.
1887 * term/i386/pc/console.c: Likewise.
1888 * term/i386/pc/serial.c: Likewise.
1889 * term/i386/pc/vesafb.c: Likewise.
1890 * term/i386/pc/vga.c: Likewise.
1891 * term/i386/pc/vga_text.c: Likewise.
1892 * term/ieee1275/ofconsole.c: Likewise.
1893 * term/usb_keyboard.c: Likewise.
1894
33c846be 18952009-04-14 Bean <bean123ch@gmail.com>
1896
1897 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1898 properly with null character.
1899
4484e01e 19002009-04-14 Felix Zielcke <fzielcke@z-51.de>
1901
1902 * configure: Remove.
1903 * config.h.in: Likewise.
f93d668e 1904 * stamp-h.in: Likewise.
4484e01e 1905 * DISTLIST: Likewise.
1906 * conf/common.mk: Likewise.
1907 * conf/i386-coreboot.mk: Likewise.
1908 * conf/i386-efi.mk: Likewise.
1909 * conf/i386-ieee1275.mk: Likewise.
1910 * conf/i386.mk: Likewise.
1911 * conf/i386-pc.mk: Likewise.
1912 * conf/powerpc-ieee1275.mk: Likewise.
1913 * conf/sparc64-ieee1275.mk: Likewise.
1914 * conf/x86_64-efi.mk: Likewise.
1915
1916 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1917 develop on GRUB.
1918
7dd4a573 19192009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1920 David S. Miller <davem@davemloft.net>
1921
1922 * util/hostdisk.c (make_device_name): Fix buffer length
1923 calculations.
1924
e25b5a8c 19252009-04-14 Felix Zielcke <fzielcke@z-51.de>
1926
1927 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1928 <sys/param.h> and <sys/sysctl.h>.
1929 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1930 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1931 opening the device and reset them afterwards.
1932
1f1f580c 19332009-04-13 Pavel Roskin <proski@gnu.org>
1934
1935 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1936 Reported by John Stanley <jpsinthemix@verizon.net>
1937
7ebc2d6b 19382009-04-13 Robert Millan <rmh@aybabtu.com>
1939
1940 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1941 that name for menuentries when appropriate.
7ebc2d6b 1942
d8ba3667 19432009-04-13 Felix Zielcke <fzielcke@z-51.de>
1944
1945 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1946
cba416eb 19472009-04-13 Robert Millan <rmh@aybabtu.com>
1948
1949 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1950 to Linux, simply abort telling the user it's no longer supported.
1951
a547a745 19522009-04-13 Felix Zielcke <fzielcke@z-51.de>
1953
1954 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1955 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1956 `freebsd_loadenv' only when devices.hints exist.
1957
232a769c 19582009-04-13 Pavel Roskin <proski@gnu.org>
1959
1960 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1961
c3012039 19622009-04-13 Felix Zielcke <fzielcke@z-51.de>
1963
1964 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1965 partition number.
1966 (grub_drive): Likewise.
1967
234022fe 19682009-04-13 David S. Miller <davem@davemloft.net>
1969
1970 * kern/sparc64/ieee1275/ieee1275.c: New file.
1971 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1972 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1973 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1974 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1975 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1976 grub_ieee1275_alloc_physmem): Declare new exported functions.
1977
d8e1836c 1978 * include/grub/sparc64/ieee1275/loader.h: New file.
1979 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1980 * include/grub/sparc64/kernel.h: Likewise.
1981 * loader/sparc64/ieee1275/linux.c: Likewise.
1982
96bd81ec 1983 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1984 (grub_fstest_SOURCES): Likewise.
1985
6a4737e5 1986 * util/hostdisk.c (make_device_name): Do not make any assumptions
1987 about the length of drive names.
1988
1d7a72fd 1989 * kern/dl.c (grub_dl_load_file): Close file immediately when
1990 we are done using it.
1991
56bc2471 19922009-04-12 David S. Miller <davem@davemloft.net>
1993
1994 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1995 values. Noticed by Pavel Roskin.
1996
df38d0bb 1997 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1998 target compiler.
7dd4a573 1999
e382e93a 2000 * genmk.rb: Add more flexible image type specification, also
2001 pass --strip-unneeded to objcopy.
2002 * conf/i386-pc.rmk: Use *_FORMAT.
2003 * conf/i386-pc.mk: Rebuilt.
2004
f5dbbca9 2005 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2006 (OFDISK_HASH_SZ): Define.
2007 (ofdisk_hash): New hash table.
2008 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2009 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2010 instead of device phandle which is not unique.
2011
91c88b12 2012 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2013 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2014 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2015 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2016 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2017 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2018 GRUB_KERNEL_MACHINE_DATA_END): Define.
2019 (grub_kernel_image_size, grub_total_module_size): Declare.
2020
5b5d4aa5 20212009-04-12 Pavel Roskin <proski@gnu.org>
2022
7dd4a573 2023 * configure.ac: Change the logic when we check for target tools.
2024 Do it when the target is specified and it's different from the
2025 specified value of the host.
5b5d4aa5 2026
c91e1793 20272009-04-11 Felix Zielcke <fzielcke@z-51.de>
2028
2029 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2030 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2031 GNU/kFreeBSD. Check if a device is a character device. Use
2032 DIOCGMEDIASIZE to get the size.
2033 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2034 support for GNU/kFreeBSD.
2035 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2036 is a character device instead of a block device. Add support for
2037 FreeBSD device names.
2038
2039 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2040 is a character device instead of a block device.
2041
2042 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2043 is a character device instead of a block device.
2044
b1ac8644 20452009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2046
2047 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2048 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2049 FreeBSD. Check if a device is a character device. Use
2050 DIOCGMEDIASIZE to get the size.
2051 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2052 support for FreeBSD.
2053 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2054 is a character device instead of a block device. Add support for
2055 FreeBSD device names.
2056
2057 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2058 a character device instead of a block device.
2059 (grub_util_check_char_device): New function.
2060
2061 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2062 a character device instead of a block device.
2063
2064 * include/grub/util/getroot.h (grub_util_check_char_device): New
2065 prototype.
2066
a3f7515a 20672009-04-11 David S. Miller <davem@davemloft.net>
2068
2069 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2070 static libgcc.
2071 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2072 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2073 function, if present.
2074 (__bswapdi2): Likewise.
2075
0d44993d 2076 * include/grub/sparc64/ieee1275/boot.h: New file.
2077 * boot/sparc64/ieee1275/boot.S: Likewise.
2078 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2079
ed3d2bc2 2080 * kern/misc.c (grub_ltoa): New function.
2081 (grub_vsprintf): Use it to format 'long' integers.
2082
d3bfb59c 20832009-04-10 David S. Miller <davem@davemloft.net>
2084
2085 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2086 slots are of type grub_ieee1275_cell_t.
2087 (grub_nand_read): Likewise.
2088 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2089 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2090 macros are used to compare values in arg/ret block of the call.
2091 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2092 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2093 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2094 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2095 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2096 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2097 grub_ieee1275_close, grub_ieee1275_set_property,
2098 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2099 grub_ieee1275_cell_t.
2100 * kern/ieee1275/openfw.c (grub_map): Likewise.
2101 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2102 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2103
450e2238 2104 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2105 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2106 (grub_devalias_iterate): Likewise.
2107
7dd4a573 21082009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 2109
2110 UFS improvements
2111
2112 * fs/ufs.c (INODE_NBLOCKS): new definition
2113 (struct grub_ufs_dirent): added fields for non-BSD dirents
2114 (grub_ufs_get_file_block): fixed double indirect handling
2115 (grub_ufs_lookup_symlink): use more robust way to determine whether
2116 symlink is inline
2117 (grub_ufs_find_file): support for non-BSD dirents
2118 (grub_ufs_dir): support for non-BSD dirents
2119
e7e6862a 21202009-04-10 Bean <bean123ch@gnail.com>
2121
2122 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2123 attribute, otherwise the size would be wrong for i386 platform.
2124
2125 * include/grub/pci.h (grub_pci_read_word): New inline function.
2126 (grub_pci_read_byte): Likewise.
2127 (grub_pci_write): Likewise.
2128 (grub_pci_write_word): Likewise.
2129 (grub_pci_write_byte): Likewise.
2130
2131 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2132
2133 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2134 (find_framebuf): Scan pci to locate the frame buffer address.
2135
2136 * commands/efi/fixvideo.c: New file.
2137
2138 * commands/efi/loadbios.c: Likewise.
2139
2140 * commands/memrw.c: Likewise.
2141
2142 * util/grub-dumpbios.in: Likewise.
2143
2144 * conf/common.rmk (grub-dumpbios): New utility.
2145 (pkglib_MODULES): New module memrw.mod.
2146 (memrw_mod_SOURCE): New macro.
2147 (memrw_mod_CFLAGS): Likewise.
2148 (memrw_mod_LDFLAGS): Likewise.
2149
7dd4a573 2150 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2151 fixvideo.mod.
2152 (loadbios_mod_SOURCE): New macro.
2153 (loadbios_mod_CFLAGS): Likewise.
2154 (loadbios_mod_LDFLAGS): Likewise.
2155 (fixvideo_mod_SOURCE): Likewise.
2156 (fixvideo_mod_CFLAGS): Likewise.
2157 (fixvideo_mod_LDFLAGS): Likewise.
2158
7dd4a573 2159 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 2160 fixvideo.mod.
2161 (loadbios_mod_SOURCE): New macro.
2162 (loadbios_mod_CFLAGS): Likewise.
2163 (loadbios_mod_LDFLAGS): Likewise.
2164 (fixvideo_mod_SOURCE): Likewise.
2165 (fixvideo_mod_CFLAGS): Likewise.
2166 (fixvideo_mod_LDFLAGS): Likewise.
2167
af63ada2 21682009-04-08 Felix Zielcke <fzielcke@z-51.de>
2169
2170 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2171
c2cdde70 21722009-04-07 David S. Miller <davem@davemloft.net>
2173
2174 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2175 support for R_SPARC_OLO10 relocations. Fix compile warning for
2176 R_SPARC_WDISP30 case.
ea3f72cf 2177 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 2178
761319cf 21792009-04-06 Pavel Roskin <proski@gnu.org>
2180
1007d1f5 2181 * include/grub/misc.h (ARRAY_SIZE): New macro.
2182 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2183 New macro.
2184 * loader/i386/linux.c (allocate_pages): Use free_pages().
2185 (grub_linux_unload): Don't use free_pages().
2186 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2187 wrong index. Treat all other modes as text modes.
2188 (grub_cmd_linux): Initialize vid_mode unconditionally to
2189 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2190
761319cf 2191 * commands/help.c (print_command_help): Use cmd->prio, not
2192 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2193
ea761d40 21942009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 2195
ea761d40 2196 Parttool
2197
2198 * parttool/pcpart.c: new file
2199 * commands/parttool.c: likewise
2200 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2201 (parttool_mod_SOURCES): new variable
2202 (parttool_mod_CFLAGS): likewise
2203 (parttool_mod_LDFLAGS): likewise
2204 (pcpart_mod_SOURCES): likewise
2205 (pcpart_mod_CFLAGS): likewise
2206 (pcpart_mod_LDFLAGS): likewise
7dd4a573 2207 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 2208 and parttool/pcpart.c
2209 * conf/i386-efi.rmk: likewise
2210 * conf/i386-ieee1275.rmk: likewise
2211 * conf/i386-pc.rmk: likewise
2212 * conf/powerpc-ieee1275.rmk: likewise
2213 * conf/sparc64-ieee1275.rmk: likewise
2214 * conf/x86_64-ieee1275.rmk: likewise
2215
05aaebfb 22162009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2217
2218 Support for mtime and further expandability of dir command
2219
2220 * include/grub/lib/datetime.h: moved to ...
7dd4a573 2221 * include/grub/datetime.h: ... moved here and added
05aaebfb 2222 declaration of grub_unixtime2datetime. All users updated
7dd4a573 2223 * include/grub/fs.h: new syntax for dir and mtime functions in
2224 struct grub_fs
05aaebfb 2225 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2226 and GRUB_FSHELP_FLAGS_MASK
2227 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2228 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2229 (grub_ext2_mtime): new function
2230 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2231 (grub_hfsplus_mtime): new function
2232 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2233 (GRUB_UFS_ATTR_FILE): likewise
2234 (GRUB_UFS_ATTR_LNK): likewise
2235 (struct grub_ufs_sblock): new fields mtime
2236 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2237 all users updated
2238 (grub_ufs_dir): mtime support
2239 (grub_ufs_mtime): new function
2240 * fs/affs.c (grub_affs_dir): use new dir syntax
2241 * fs/afs.c (grub_afs_dir): likewise
2242 * fs/cpio.c (grub_cpio_dir): likewise
2243 * fs/fat.c (grub_fat_find_dir): likewise
2244 * fs/hfs.c (grub_hfs_dir): likewise
2245 * fs/iso9660.c (grub_iso9660_dir): likewise
2246 * fs/jfs.c (grub_jfs_dir): likewise
2247 * fs/minix.c (grub_minix_dir): likewise
2248 * fs/ntfs.c (grub_ntfs_dir): likewise
2249 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2250 * fs/sfs.c (grub_sfs_dir): likewise
2251 * fs/xfs.c (grub_xfs_dir): likewise
2252 * util/hostfs.c (grub_hostfs_dir): likewise
2253 * lib/datetime.c: moved to ...
2254 * normal/datetime.c: ... moved here
2255 (grub_unixtime2datetime): new function
2256 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 2257 * normal/completion.c (iterate_dir): use new dir syntax
2258 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 2259 last modification time of a volume
7dd4a573 2260 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 2261 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 2262 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 2263 (normal_mod_SOURCES): likewise
2264 (datetime_mod_SOURCES): Removed lib/datetime.c
2265 * conf/i386-efi.rmk: likewise
7dd4a573 2266 * conf/i386-ieee1275.rmk: likewise
05aaebfb 2267 * conf/i386-pc.rmk: likewise
2268 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 2269 * conf/sparc64-ieee1275.rmk: likewise
2270 * conf/x86_64-efi.rmk: likewise
05aaebfb 2271
8a7e1a14 22722009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2273
2274 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 2275
2276 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 2277 on grub_fat_find_dir
2278 (grub_fat_find_dir): use grub_fat_iterate_dir
2279 (grub_fat_label): likewise
2280
04186a9c 22812009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2282
7dd4a573 2283 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 2284 and command.h
2285 remove extraneous kernel_elf_HEADERS
2286
da4c0bb6 22872009-04-04 Bean <bean123ch@gnail.com>
2288
2289 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2290
2291 * util/misc.c: Likewise.
2292
54ad9555 22932009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2294
2295 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2296 instead of grub_printf.
2297
7a6bf9f2 22982009-04-03 Robert Millan <rmh@aybabtu.com>
2299
2300 * loader/i386/linux.c (grub_linux_setup_video): Fill
2301 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2302 values from `mode info' structure instead of hardcoded
2303 values.
2304
3fcc2083 23052009-04-01 Pavel Roskin <proski@gnu.org>
2306
2307 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2308 unused now.
2309 * genmk.rb: Likewise.
2310 * configure.ac: Likewise.
2311
5ec9740b 23122009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2313
2314 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2315 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2316
5270cec8 23172009-04-01 David S. Miller <davem@davemloft.net>
2318
2319 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 2320 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 2321 (grub_setjmp): Mark with 'returns_twice' attribute.
2322 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2323 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2324 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2325
9c3dd854 23262009-04-01 Robert Millan <rmh@aybabtu.com>
2327
2328 Reapply fix from 2008-07-28 which was accidentally reverted; also
2329 perform the same fix to a similar check in same function.
2330
2331 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2332 with the same number are found, just use issue a warning with
2333 grub_dprintf(), as this error has been reported to be non-fatal.
2334
0d818b7e 23352009-03-31 Pavel Roskin <proski@gnu.org>
2336
2337 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2338 for cross-compilation.
2339
95646d92 23402009-03-30 Robert Millan <rmh@aybabtu.com>
2341
2342 Fix i386-ieee1275 build.
2343
2344 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2345 Remove declaration.
2346
6a003ed1 23472009-03-30 Pavel Roskin <proski@gnu.org>
2348
2349 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2350 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2351 zero-terminated, rely only on the strlen value. Fix comparison
2352 of strings differing in length.
2353
92f33540 23542009-03-30 Robert Millan <rmh@aybabtu.com>
2355
2356 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2357 checking for abi version. Improve error messages on BIOS to notify
2358 user about `linux16' command.
2359
a8c48fd5 23602009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2361
f968172e 2362 Leak fixes
a8c48fd5 2363
f968172e 2364 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2365 in case of collision
2366 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 2367
9c323f09 23682009-03-29 Robert Millan <rmh@aybabtu.com>
2369
2370 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2371 set `vid_mode' accordingly.
2372 (grub_linux_boot): Process `vid_mode' and set video mode.
2373
ae68f423 23742009-03-29 Robert Millan <rmh@aybabtu.com>
2375
2376 * util/grub.d/10_linux.in (linux_entry): New function.
2377 Factorize generation of Linux boot entries.
2378
5709cfc4 23792009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2380
2381 Make the format of Environment Block plain text. The boot loader
2382 part is not tested well yet.
7dd4a573 2383
5709cfc4 2384 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2385 (buffer): Removed.
2386 (envblk): Likewise.
2387 (usage): Remove "info" and "clear". Add "unset". Update the
2388 description of "set", as this does not delete variables any
2389 longer.
2390 (create_envblk_file): Complete rewrite.
2391 (open_envblk_file): Likewise.
2392 (cmd_info): Removed.
2393 (cmd_list): Likewise.
2394 (cmd_set): Likewise.
2395 (cmd_clear): Likewise.
2396 (list_variables): New function.
2397 (write_envblk): Likewise.
2398 (set_variables): Likewise.
2399 (unset_variables): Likewise.
2400 (main): Complete rewrite.
2401
2402 * commands/loadenv.c (buffer): Removed.
2403 (envblk): Likewise.
2404 (open_envblk_file): New function.
2405 (read_envblk_file): Complete rewrite.
2406 (grub_cmd_load_env): Likewise.
2407 (grub_cmd_list_env): Likewise.
2408 (struct blocklist): New struct.
2409 (free_blocklists): New function.
2410 (check_blocklists): Likewise.
2411 (write_blocklists): Likewise.
2412 (grub_cmd_save_env): Complete rewrite.
2413
2414 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2415 a plain text signature.
2416 (GRUB_ENVBLK_MAXLEN): Removed.
2417 (struct grub_envblk): Complete rewrite.
2418 (grub_envblk_find): Removed.
2419 (grub_envblk_insert): Likewise.
2420 (grub_envblk_open): New prototype.
2421 (grub_envblk_set): Likewise.
2422 (grub_envblk_delete): Put const to VALUE.
2423 (grub_envblk_iterate): Put const to NAME and VALUE.
2424 (grub_envblk_close): New prototype.
2425 (grub_envblk_buffer): New inline function.
2426 (grub_envblk_size): Likewise.
2427
2428 * lib/envblk.c: Include grub/mm.h.
2429 (grub_env_find): Removed.
2430 (grub_envblk_open): New function.
2431 (grub_envblk_close): Likewise.
2432 (escaped_value_len): Likewise.
2433 (find_next_line): Likewise.
2434 (grub_envblk_insert): Removed.
2435 (grub_envblk_set): New function.
2436 (grub_envblk_delete): Complete rewrite.
2437 (grub_envblk_iterate): Likewise.
2438
a9368fd3 24392009-03-28 Robert Millan <rmh@aybabtu.com>
2440
2441 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2442 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2443 variables. Use 16-bit loader.
2444 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2445 loader.
2446 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2447 (grub_linux16_boot): ... this. Update all users.
2448 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2449 (grub_linux_boot): ... this. Update all users.
2450
2451 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2452 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2453 commands to `linux16' and `initrd16'.
2454 (GRUB_MOD_FINI(linux)): Rename to ...
2455 (GRUB_MOD_FINI(linux16)): ... this.
2456
e4dd5a7e 24572009-03-24 Pavel Roskin <proski@gnu.org>
2458
2459 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2460 not just for compilation.
2461
c04d6e05 24622009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2463
2464 Move multiboot helper out of kernel
2465
2466 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2467 `loader/i386/multiboot_helper.S'.
2468 * conf/i386-coreboot.rmk: Likewise
2469 * conf/i386-ieee1275.rmk: Likewise
2470
2471 * kern/i386/loader.S: Move multiboot helpers from here...
2472 * loader/i386/multiboot_helper.S: ...moved here
2473 * include/grub/i386/loader.h: Move declarations of multiboot
2474 helpers from here...
2475 * include/grub/i386/multiboot.h: ...moved here
2476 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2477
42a5b3fc 24782009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2479
2480 * kern/env.c (grub_env_context_open): Added an argument to specify
2481 whether a new context inherits exported variables from current
2482 one. This is useful when making a sandbox to interpret a config
2483 file.
2484 All callers updated.
2485
2486 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2487
b28bbc4e 24882009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2489
2490 * kern/env.c (grub_env_context_close): Fix memory leaks.
2491
f04f02e4 24922009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2493
2494 * normal/main.c (grub_normal_execute): Added an argument
2495 BATCH to specify if an interactive interface should be provided
2496 after reading a config file.
2497 All callers updated.
2498 (read_command_list): Prevent being executed twice.
2499 (read_fs_list): Likewise.
2500
42a5b3fc 2501 * include/grub/normal.h (grub_normal_execute): Updated the
2502 prototype.
f04f02e4 2503
41473ac2 25042009-03-22 Pavel Roskin <proski@gno.org>
2505
fbc00b0c 2506 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2507 _start.
2508 * kern/i386/pc/startup.S: Likewise.
2509 * kern/i386/efi/startup.S: Likewise.
2510 * kern/i386/ieee1275/startup.S: Likewise.
2511 * kern/i386/coreboot/startup.S: Likewise.
2512 * kern/x86_64/efi/startup.S: Likewise.
2513
41473ac2 2514 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2515 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2516 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2517
2274cc8f 25182009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2519
2520 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2521
2522 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2523 limit detection.
2524 Use vaddr of correct segment for entry_point.
2525
b1b797cb 25262009-03-21 Bean <bean123ch@gmail.com>
2527
2528 * commands/blocklist.c: Add include file <grub/command.h>, remove
2529 <grub/normal.h> and <grub/arg.h>.
2530 (grub_cmd_blocklist): Use the new command interface.
2531 (GRUB_MOD_INIT): Likewise.
2532 (GRUB_MOD_FINI): Likewise.
2533 * commands/boot.c: Likewise.
2534 * commands/cat.c: Likewise.
2535 * commands/cmp.c: Likewise.
2536 * commands/configfile.c: Likewise.
2537 * commands/crc.c: Likewise.
2538 * commands/echo.c: Likewise.
2539 * commands/halt.c: Likewise.
2540 * commands/handler.c: Likewise.
2541 * commands/hdparm.c: Likewise.
2542 * commands/help.c: Likewise.
2543 * commands/hexdump.c: Likewise.
2544 * commands/loadenv.c: Likewise.
2545 * commands/ls.c: Likewise.
2546 * commands/lsmmap.c: Likewise.
2547 * commands/lspci.c: Likewise.
2548 * commands/loadenv.c: Likewise.
2549 * commands/read.c: Likewise.
2550 * commands/reboot.c: Likewise.
2551 * commands/search.c: Likewise.
2552 * commands/sleep.c: Likewise.
2553 * commands/test.c: Likewise.
2554 * commands/usbtest.c: Likewise.
2555 * commands/videotest.c: Likewise.
2556 * commands/i386/cpuid.c: Likewise.
2557 * commands/i386/pc/halt.c: Likewise.
2558 * commands/i386/pc/play.c: Likewise.
2559 * commands/i386/pc/pxecmd.c: Likewise.
2560 * commands/i386/pc/vbeinfo.c: Likewise.
2561 * commands/i386/pc/vbetest.c: Likewise.
2562 * commands/ieee1275/suspend.c: Likewise.
2563 * disk/loopback.c: Likewise.
2564 * font/font_cmd.c: Likewise.
2565 * hello/hello.c: Likewise.
2566 * loader/efi/appleloader.c: Likewise.
2567 * loader/efi/chainloader.c: Likewise.
2568 * loader/i386/bsd.c: Likewise.
2569 * loader/i386/efi/linux.c: Likewise.
2570 * loader/i386/ieee1275/linux.c: Likewise.
2571 * loader/i386/linux.c: Likewise.
2572 * loader/i386/pc/chainloader.c: Likewise.
2573 * loader/i386/pc/linux.c: Likewise.
2574 * loader/powerpc/ieee1275/linux.c: Likewise.
2575 * loader/multiboot_loader.c: Likewise.
2576 * term/gfxterm.c: Likewise.
2577 * term/i386/pc/serial.c: Likewise.
2578 * term/terminfo.c: Likewise.
2579
2580 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2581 * term/i386/pc/vga.c: Likewise.
2582 * video/readers/jpeg.c: Likewise.
2583 * video/readers/png.c: Likewise.
2584 * video/readers/tga.c: Likewise.
2585
2586 * util/grub-fstest (cmd_loopback): Removed.
2587 (cmd_blocklist): Likewise.
2588 (cmd_ls): Likewise.
2589 (grub_register_command): Likewise.
2590 (grub_unregister_command): Likewise.
2591 (execute_command): Use grub_command_find to locate command and execute
2592 it.
2593
2594 * include/grub/efi/chainloader.h: Removed.
2595 * loader/efi/chainloader_normal.c: Likewise.
2596 * loader/i386/bsd_normal.c: Likewise.
2597 * loader/i386/pc/chainloader_normal.c: Likewise.
2598 * loader/i386/pc/multiboot_normal.c: Likewise.
2599 * loader/linux_normal.c: Likewise.
2600 * loader/multiboot_loader_normal.c: Likewise.
2601 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2602
2603 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2604 and grub_register_command_p1.
2605
2606 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2607 kern/command.c, lib/arg.c and commands/extcmd.c.
2608 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2609 (minicmd_mod_SOURCES): New variable.
2610 (minicmd_mod_CFLAGS): Likewise.
2611 (minicmd_mod_LDFLAGS): Likewise.
2612 (extcmd_mod_SOURCES): Likewise.
2613 (extcmd_mod_CFLAGS): Likewise.
2614 (extcmd_mod_LDFLAGS): Likewise.
2615 (boot_mod_SOURCES): Removed.
2616 (boot_mod_CFLAGS): Likewise.
2617 (boot_mod_LDFLAGS): Likewise.
2618
2619 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2620 kern/corecmd.c.
2621 (kernel_img_HEADERS): Add command.h.
2622 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2623 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2624 and lib/arg.c.
2625 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2626 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2627 remove the corresponding normal mode command.
2628 (normal_mod_SOURCES): Remove normal/arg.c.
2629 * conf/i386-coreboot.rmk: Likewise.
2630 * conf/i386-efi.rmk: Likewise.
2631 * conf/i386-ieee1275.rmk: Likewise.
2632 * conf/powerpc-ieee1275.rmk: Likewise.
2633 * conf/x86_64-efi.rmk: Likewise.
2634
2635 * include/grub/arg.h: Move from here ...
2636 * include/grub/lib/arg.h: ... to here.
2637
2638 * normal/arg.c: Move from here ...
2639 * lib/arg.c: ... to here.
2640
2641 * commands/extcmd.c: New file.
2642 * commands/minicmd.c: Likewise.
2643 * include/grub/command.h: Likewise.
2644 * include/grub/extcmd.h: Likewise.
2645 * kern/command.c: Likewise.
2646 * kern/corecmd.c: Likewise.
2647
2648 * kern/list.c (grub_list_iterate): Return int instead of void.
2649 (grub_list_insert): New function.
2650 (grub_prio_list_insert): Likewise.
2651
2652 * kern/rescue.c (grub_rescue_command): Removed.
2653 (grub_rescue_command_list): Likewise.
2654 (grub_rescue_register_command): Likewise.
2655 (grub_rescue_unregister_command): Likewise.
2656 (grub_rescue_cmd_boot): Move to minicmd.c
2657 (grub_rescue_cmd_help): Likewise.
2658 (grub_rescue_cmd_info): Likewise.
2659 (grub_rescue_cmd_boot): Likewise.
2660 (grub_rescue_cmd_testload): Likewise.
2661 (grub_rescue_cmd_dump): Likewise.
2662 (grub_rescue_cmd_rmmod): Likewise.
2663 (grub_rescue_cmd_lsmod): Likewise.
2664 (grub_rescue_cmd_exit): Likewise.
2665 (grub_rescue_print_devices): Moved to corecmd.c.
2666 (grub_rescue_print_files): Likewise.
2667 (grub_rescue_cmd_ls): Likewise.
2668 (grub_rescue_cmd_insmod): Likewise.
2669 (grub_rescue_cmd_set): Likewise.
2670 (grub_rescue_cmd_unset): Likewise.
7d074e3c 2671 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 2672 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 2673 commands, remove grub_rescue_register_command calls.
b1b797cb 2674
7d074e3c 2675 * normal/command.c (grub_register_command): Removed.
b1b797cb 2676 (grub_unregister_command): Likewise.
2677 (grub_command_find): Likewise.
2678 (grub_iterate_commands): Likewise.
2679 (rescue_command): Likewise.
2680 (export_command): Moved to corecmd.c.
2681 (set_command): Removed.
2682 (unset_command): Likewise.
2683 (insmod_command): Likewise.
2684 (rmmod_command): Likewise.
2685 (lsmod_command): Likewise.
2686 (grub_command_init): Likewise.
2687
2688 * normal/completion.c (iterate_command): Use cmd->prio to check for
2689 active command.
2690 (complete_arguments): Use grub_extcmd_t structure to find options.
2691 (grub_normal_do_completion): Change function grub_iterate_commands to
2692 grub_command_iterate.
2693
2694 * normal/execute.c (grub_script_execute_cmd): No need to parse
2695 argument here.
2696
2697 * normal/main.c (grub_dyncmd_dispatcher): New function.
2698 (read_command_list): Register unload commands as dyncmd.
2699 (grub_cmd_normal): Use new command interface, register rescue,
2700 unregister normal at entry, register normal, unregister rescue at exit.
2701
2702 * include/grub/list.h (grub_list_test_t): New type.
2703 (grub_list_iterate): Return int instead of void.
2704 (grub_list_insert): New function.
2705 (GRUB_AS_NAMED_LIST_P): New macro.
2706 (GRUB_AS_PRIO_LIST): Likewise.
2707 (GRUB_AS_PRIO_LIST_P): Likewise.
2708 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2709 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2710 (grub_prio_list): New structure.
2711 (grub_prio_list_insert): New function.
2712 (grub_prio_list_remove): New inline function.
2713
2714 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2715 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2716 (GRUB_COMMAND_FLAG_MENU): Likewise.
2717 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2718 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2719 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2720 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2721 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2722 (grub_command): Likewise.
2723 (grub_register_command): Likewise.
2724 (grub_command_find): Likewise.
2725 (grub_iterate_commands): Likewise.
2726 (grub_command_init): Likewise.
2727 (grub_arg_parse): Likewise.
2728 (grub_arg_show_help): Likewise.
2729
2730 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2731 (grub_rescue_unregister_command): Likewise.
2732
2733 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2734 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2735 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2736
2737 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2738 grub_rescue_cmd_initrd.
2739 * include/grub/i386/loader.h: Likewise.
2740 * include/grub/x86_64/loader.h: Likewise.
2741
2742 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2743
1f4147aa 27442009-03-21 Bean <bean123ch@gmail.com>
2745
2746 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2747 instead of stat in mingw environment.
2748
2749 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2750
2751 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2752
2753 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2754 AC_CONFIG_LINKS.
2755
2156d5ba 27562009-03-21 Bean <bean123ch@gmail.com>
2757
2758 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2759 out of range error.
2760
177b82ca 27612009-03-18 Michel Dänzer <michel@daenzer.net>
2762
2763 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2764 checking inode flags for EXT4_EXTENTS_FLAG.
2765
14aad807 27662009-03-18 Robert Millan <rmh@aybabtu.com>
2767
2768 * loader/i386/linux.c: Include `<grub/video.h>' and
2769 `<grub/i386/pc/vbe.h>'..
2770 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2771 (grub_linux32_boot): Attempt to configure video settings with
2772 grub_linux_setup_video().
2773 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2774 to avoid grub_console_fini() which would step out of graphical mode
2775 unconditionally.
2776
8cf83a27 27772009-03-14 Robert Millan <rmh@aybabtu.com>
2778
2779 Fix build on powerpc.
2780 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2781
40164e75 27822009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2783
2784 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2785 background image command.
2786
c58bc32a 27872009-03-12 Colin D Bennett <colin@gibibit.com>
2788
2789 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2790 (grub_gfxterm_putchar): Extract pairs of identical calls to
2791 draw_cursor out of conditional blocks.
2792
5415144a 27932009-03-11 Pavel Roskin <proski@gnu.org>
2794
2795 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2796 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2797
6394042e 27982009-03-11 Robert Millan <rmh@aybabtu.com>
2799
2800 * loader/i386/multiboot_elfxx.c
2801 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2802
b7b50e5f 28032009-03-11 Felix Zielcke <fzielcke@z-51.de>
2804
2805 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2806 `kern/handler.c'.
2807
1ca7fc96 28082009-03-11 Robert Millan <rmh@aybabtu.com>
2809
2810 * loader/i386/multiboot.c (code_size): New variable.
2811 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 2812 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 2813 4-byte alignment to MBI and others by increasing
7d074e3c 2814 `boot_loader_name_length' appropriately.
1ca7fc96 2815
2816 * loader/i386/multiboot_elfxx.c
2817 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2818
a83ea1d2 28192009-03-09 Felix Zielcke <fzielcke@z-51.de>
2820
2821 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2822 `fs/ext2.c'.
2823
aa9f3bff 28242009-03-08 Robert Millan <rmh@aybabtu.com>
2825
2826 Make loader/i386/linux.c usable on i386-pc again.
2827
2828 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2829 memory to heap.
2830 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2831 `#error' stanza.
2832
d8b3b60e 28332009-03-07 Bean <bean123ch@gmail.com>
2834
2835 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2836 allocation.
2837
b362c9e9 28382009-03-06 Robert Millan <rmh@aybabtu.com>
2839
2840 Fix display issue on terminals with screen size other than 80x25
2841 (e.g. gfxterm with resolution higher than 640x480).
2842
2843 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 2844 position relative to the center of the terminal instead of relying
b362c9e9 2845 on a hardcoded offset.
2846
9304eef1 28472009-03-04 Robert Millan <rmh@aybabtu.com>
2848
2849 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2850 installed.
2851
2852 * Makefile.in (host_kernel): New variable.
2853 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2854 scripts instead of just the windows one.
2855 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2856
eabc95fb 28572009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 2858
2859 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2860 `kern/handler.c'.
2861 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2862 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2863 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2864 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2865 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2866 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2867
ceb1223c 28682009-03-04 Felix Zielcke <fzielcke@z-51.de>
2869
2870 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2871 or if there's no space for the disk label and print the partition number on a
2872 invalid magic.
2873
4910684a 28742009-03-04 Felix Zielcke <fzielcke@z-51.de>
2875
2876 * util/misc.c: Include <time.h>.
2877 (grub_millisleep): New function.
2878
7e9ca17a 28792009-03-04 Bean <bean123ch@gmail.com>
2880
2881 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2882 another option -mno-red-zone.
2883
2884 * commands/handler.c: Change module description.
2885
2886 * kern/handler.c: Add missing space at the end of description line.
2887
2888 * kern/list.c: Likewise.
2889
f501677c 28902009-03-03 Robert Millan <rmh@aybabtu.com>
2891
2892 Move more components to the relocation area, and fix mbi pointer
2893 handling to use the destination rather than the origin (thanks to
2894 Vladimir Serbinenko for spotting).
2895
2896 * loader/i386/multiboot.c (mbi_dest): New variable.
2897 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2898 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2899 relocation area.
2900
9902d047 29012009-03-01 Bean <bean123ch@gmail.com>
2902
50fb7002 2903 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 2904 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2905 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2906 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2907
2908 * loader/i386/efi/linux.c (acpi_guid): New variable.
2909 (acpi_guid): Likewise.
2910 (EBDA_SEG_ADDR): New constant.
2911 (LOW_MEM_ADDR): Likewise.
2912 (FAKE_EBDA_SEG): Likewise.
2913 (fake_bios_data): New function.
2914 (grub_linux_boot): Call fake_bios_data.
2915
71b9f361 29162009-03-01 Bean <bean123ch@gmail.com>
2917
2918 * commands/terminal.c: Removed.
2919
2920 * commands/handler.c: New file.
2921
2922 * include/grub/list.h: Likewise.
2923
2924 * include/grub/handler.h: Likewise.
2925
2926 * kern/list.c: Likewise.
2927
2928 * kern/handler.c: Likewise.
2929
2930 * kern/term.h: Include header file <grub/handler.h>.
2931 (grub_term_input): Move next field to the beginning.
2932 (grub_term_output): Likewise.
2933 (grub_term_input_class): New variable.
2934 (grub_term_output_class): Likewise.
2935 (grub_term_register_input): Changed to inline function.
2936 (grub_term_register_output): Likewise.
2937 (grub_term_unregister_input): Likewise.
2938 (grub_term_unregister_output): Likewise.
2939 (grub_term_set_current_input): Likewise.
2940 (grub_term_set_current_output): Likewise.
2941 (grub_term_get_current_input): Likewise.
2942 (grub_term_get_current_output): Likewise.
2943 (grub_term_iterate_input): Removed.
2944 (grub_term_iterate_output): Likewise.
2945
2946 * kern/term.c (grub_term_list_input): Removed.
2947 (grub_term_list_output): Likewise.
2948 (grub_term_input_class): New variable.
2949 (grub_term_output_class): Likewise.
50fb7002 2950 (grub_cur_term_input): Change variable as macro.
71b9f361 2951 (grub_cur_term_output): Likewise.
2952 (grub_term_register_input): Removed.
2953 (grub_term_register_output): Likewise.
2954 (grub_term_unregister_input): Likewise.
2955 (grub_term_unregister_output): Likewise.
2956 (grub_term_set_current_input): Likewise.
2957 (grub_term_set_current_output): Likewise.
2958 (grub_term_iterate_input): Likewise.
2959 (grub_term_iterate_output): Likewise.
2960 (grub_term_get_current_input): Likewise.
2961 (grub_term_get_current_output): Likewise.
2962
2963 * util/grub-editenv.c: Include header file <grub/handler.h>.
2964 (grub_term_get_current_input): Removed.
2965 (grub_term_get_current_output): Likewise.
2966 (grub_term_input_class): New variable.
50fb7002 2967 (grub_term_output_class): Likewise.
71b9f361 2968
2969 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2970 (grub_term_get_current_output): Likewise.
2971 (grub_term_input_class): New variable.
50fb7002 2972 (grub_term_output_class): Likewise.
71b9f361 2973
2974 * util/grub-probe.c (grub_term_get_current_input): Removed.
2975 (grub_term_get_current_output): Likewise.
2976 (grub_term_input_class): New variable.
50fb7002 2977 (grub_term_output_class): Likewise.
71b9f361 2978
2979 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2980 (grub_term_get_current_output): Likewise.
2981 (grub_term_input_class): New variable.
50fb7002 2982 (grub_term_output_class): Likewise.
71b9f361 2983
2984 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2985 (terminal_mod_SOURCES): Likewise.
2986 (terminal_mod_CFLAGS): Likewise.
2987 (terminal_mod_LDFLAGS): Likewise.
2988
2989 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2990 handler.c.
2991 (kernel_img_SOURCES): Add list.c and handler.c.
2992 (kernel_img_HEADERS): Add list.h and handler.h.
2993
2994 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2995 handler.c.
2996 (kernel_mod_SOURCES): Add list.c and handler.c.
2997 (kernel_mod_HEADERS): Add list.h and handler.h.
2998
2999 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3000 handler.c.
3001 (kernel_elf_SOURCES): Add list.c and handler.c.
3002 (kernel_elf_HEADERS): Add list.h and handler.h.
3003
3004 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3005 handler.c.
3006 (kernel_elf_SOURCES): Add list.c and handler.c.
3007 (kernel_elf_HEADERS): Add list.h and handler.h.
3008
3009 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3010 handler.c.
3011 (kernel_mod_SOURCES): Add list.c and handler.c.
3012 (kernel_mod_HEADERS): Add list.h and handler.h.
3013
3014 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3015 handler.c.
3016 (kernel_elf_SOURCES): Add list.c and handler.c.
3017 (kernel_elf_HEADERS): Add list.h and handler.h.
3018
8a31787f 30192009-02-27 Robert Millan <rmh@aybabtu.com>
3020
3021 Factorize elf32 / elf64 code in Multiboot loader. This will
3022 prevent it from getting out of sync again.
3023
3024 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3025 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3026 grub_multiboot_load_elf64): Move from here ...
3027 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3028 grub_multiboot_load_elf): ... to here (new file).
3029
51cd3dfc 30302009-02-27 Robert Millan <rmh@aybabtu.com>
3031
3032 * util/grub.d/10_linux.in: Rename "single-user mode" to
3033 "recovery mode".
3034
6e8c9c3a 30352009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3036
3037 Don't leak in SCSI code.
3038 * disk/scsi.c (grub_scsi_close): free `scsi'.
3039
4b6bf4f9 30402009-02-27 Robert Millan <rmh@aybabtu.com>
3041
3042 * loader/i386/pc/multiboot.c: Move from here ...
3043 * loader/i386/multiboot.c: ... to here. Update all users.
3044
b9413424 30452009-02-27 Robert Millan <rmh@aybabtu.com>
3046
3047 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3048 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3049
50fb7002 30502009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 3051
3052 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3053 b-tree.
3054
8cc50345 30552009-02-27 Robert Millan <rmh@aybabtu.com>
3056
3057 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3058 `0x' qualifier as 0 when base is specified as parameter).
3059
6e09b8b7 30602009-02-24 Bean <bean123ch@gmail.com>
3061
3062 * configure.ac: Check for -mcmodel=large in x86_64 target.
3063
3064 * include/grub/efi/api.h (efi_call_10): New macro.
3065 (efi_wrap_10): New function.
3066
3067 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3068 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3069 (GRUB_PE32_REL_BASED_LOW): Likewise.
3070 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3071 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3072 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3073 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3074 (GRUB_PE32_REL_BASED_REL): Likewise.
3075 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3076 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3077 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3078
3079 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3080 issue.
3081
3082 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3083 (efi_wrap_10): New function.
3084
3085 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3086
3087 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3088 MB/MBP model (NV chipset).
3089 (devdata_devs): Add devpath_5 to the list.
3090
3091 * load/i386/efi/linux.c (video_base): Remove variable.
3092 (RGB_MASK): New macro.
3093 (RGB_MAGIC): Likewise.
3094 (LINE_MIN): Likewise.
3095 (LINE_MAX): Likewise.
3096 (FBTEST_STEP): Likewise.
3097 (FBTEST_COUNT): Likewise.
3098 (fb_list): New variable.
3099 (grub_find_video_card): Remove function.
3100 (find_framebuf): New function.
3101 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3102 line length.
3103
3104 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3105 problem for x86_64.
3106
74b21bee 31072009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3108
3109 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3110
3111 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3112 coding tool name.
3113
a455f472 31142009-02-22 Robert Millan <rmh@aybabtu.com>
3115
3116 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3117 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3118 in our relocation, instead of using it directly from heap. Also
3119 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3120
6374daf3 31212009-02-21 Robert Millan <rmh@aybabtu.com>
3122
3123 Implement USB keyboard support (based on patch by Marco Gerards)
3124
3125 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3126 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3127 (usb_keyboard_mod_LDFLAGS): New variables.
3128
3129 * term/usb_keyboard.c: New file.
3130
8fa4ea70 31312009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3132
3133 Corrected wrong declaration
3134
3135 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3136
353976ac 31372009-02-14 Christian Franke <franke@computer.org>
3138
3139 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3140 (grub_lspci_iter): Print class code and programming interface byte.
3141
6aa1169b 31422009-02-14 Christian Franke <franke@computer.org>
3143
3144 * gendistlist.sh: Ignore `.svn' directories.
3145
265372ca 31462009-02-14 Felix Zielcke <fzielcke@z-51.de>
3147
3148 * fs/fat.c: Add 2009 to Copyright line.
3149
9ff516f3 31502009-02-14 Christian Franke <franke@computer.org>
3151
3152 * commands/hdparm.c: New file. Provides `hdparm' command
3153 which sends ATA commands via grub_disk_ata_pass_through ().
3154
3155 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3156
3157 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3158 and <grub/cpu/io.h> to include/grub/ata.h.
3159 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3160 (GRUB_CDROM_SECTOR_SIZE): Remove.
3161 (GRUB_ATA_*): Move to include/grub/ata.h.
3162 (GRUB_ATAPI_*): Likewise.
3163 (enum grub_ata_commands): Likewise.
3164 (enum grub_ata_timeout_milliseconds): Likewise.
3165 (struct grub_ata_device): Likewise.
3166 (grub_ata_regset): Likewise.
3167 (grub_ata_regget): Likewise.
3168 (grub_ata_regset2): Likewise.
3169 (grub_ata_regget2): Likewise.
3170 (grub_ata_check_ready): Likewise.
3171 (grub_ata_wait_not_busy): Remove static, exported in
3172 include/grub/ata.h.
3173 (grub_ata_wait_drq): Likewise.
3174 (grub_ata_pio_read): Likewise.
3175
3176 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3177 function for hdparm.mod.
3178
3179 * include/grub/ata.h: New file, contains declarations from
3180 disk/ata.c.
3181 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3182
3183 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3184 (grub_disk_ata_pass_through): New exported variable.
3185
3186 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3187
772e23da 31882009-02-13 Colin D Bennett <colin@gibibit.com>
3189
3190 Support multiple fallback entries, and provide an API to support
3191 executing default+fallback menu entries. Renamed the `terminal' menu
3192 viewer to `text'.
3193
3194 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3195 variable declaration.
3196 (grub_menu_execute_callback): New structure declaration.
3197 (grub_menu_execute_callback_t): New typedef.
3198 (grub_menu_execute_with_fallback): New function declaration.
3199 (grub_menu_get_entry): Likewise.
3200 (grub_menu_get_timeout): Likewise.
3201 (grub_menu_set_timeout): Likewise.
3202
3203 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3204
3205 * normal/menu.c (grub_wait_after_message): Moved to
3206 `normal/menu_text.c'.
3207 (draw_border): Likewise.
3208 (print_message): Likewise.
3209 (print_entry): Likewise.
3210 (print_entries): Likewise.
3211 (grub_menu_init_page): Likewise.
3212 (get_entry_number): Likewise.
3213 (print_timeout): Likewise.
3214 (run_menu): Likewise.
3215 (grub_menu_execute_entry): Likewise.
3216 (show_text_menu): Likewise.
3217 (get_and_remove_first_entry_number): New function.
3218 (grub_menu_execute_with_fallback): Likewise.
3219 (get_entry): Renamed to ...
3220 (grub_menu_get_entry): .. this and made it global.
3221 (get_timeout): Renamed to ...
3222 (grub_menu_get_timeout): ... this and made it global.
3223 (set_timeout): Renamed to ...
3224 (grub_menu_set_timeout): ... this and made it global.
3225 (grub_normal_terminal_menu_viewer): Renamed to ...
3226 (grub_normal_text_menu_viewer): ... this.
3227
3228 * normal/menu_text.c: New file. Extracted text-menu-specific code
3229 from normal/menu.c.
3230
3231 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3232 (normal_mod_SOURCES): Likewise.
3233
3234 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3235 (normal_mod_SOURCES): Likewise.
3236
3237 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3238 (normal_mod_SOURCES): Likewise.
3239
3240 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3241 (normal_mod_SOURCES): Likewise.
3242
3243 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3244 (normal_mod_SOURCES): Likewise.
3245
3246 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3247 (normal_mod_SOURCES): Likewise.
3248
3249 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3250 (normal_mod_SOURCES): Likewise.
3251
16ac430e 32522009-02-11 Robert Millan <rmh@aybabtu.com>
3253
3254 * util/grub.d/00_header.in: Update old reference to `font' command.
3255
06ff20fc 32562009-02-10 Felix Zielcke <fzielcke@z-51.de>
3257
3258 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3259
3260 Based on patch from Javier Martín.
3261
96da9407 32622009-02-09 Felix Zielcke <fzielcke@z-51.de>
3263
3264 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 3265 to avoid false positives with FAT.
96da9407 3266 (grub_fstest_SOURCES): Likewise.
3267 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3268 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3270 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3271 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3272 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3273
6dca6fe4 32742009-02-09 Felix Zielcke <fzielcke@z-51.de>
3275
06ff20fc 3276 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 3277 bpb.version_specific.fat12_or_fat16.fstype and
3278 bpb.version_specific.fat32.fstype.
3279
2550c62f 32802009-02-08 Robert Millan <rmh@aybabtu.com>
3281
be110b30 3282 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 3283
56978920 32842009-02-08 Robert Millan <rmh@aybabtu.com>
3285
3286 * Makefile.in (host_os, host_cpu): New variables.
3287 (target_os): Remove. Update all users.
3288
d64399b5 32892009-02-08 Marco Gerards <marco@gnu.org>
3290
3291 * Makefile.in (enable_grub_emu_usb): New variable.
3292 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3293 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3294 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3295 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3296 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3297 `usbtest.mod' and `usbms.mod'.
3298 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3299 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3300 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3301 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3302 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3303 variables.
3304
3305 * disk/usbms.c: New file.
3306
3307 * include/grub/usb.h: Likewise.
3308
3309 * include/grub/usbtrans.h: Likewise.
3310
3311 * include/grub/usbdesc.h: Likewise.
3312
3313 * bus/usb/usbtrans.c: Likewise.
3314
3315 * bus/usb/ohci.c: Likewise.
3316
3317 * bus/usb/uhci.c: Likewise.
3318
3319 * bus/usb/usbhub.c: Likewise.
3320
3321 * bus/usb/usb.c: Likewise.
3322
3323 * commands/usbtest.c: Likewise.
3324
3325 * util/usb.c: Likewise.
50fb7002 3326
d64399b5 3327 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3328
3329 * configure.ac: Test for libusb presence.
50fb7002 3330
d64399b5 3331 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3332
2b40d6bb 33332009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3334
3335 * kern/mm.c: Add more comments.
3336
73a4ce81 33372009-02-08 Robert Millan <rmh@aybabtu.com>
3338
3339 Patch from Javier Martín.
3340 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3341 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3342
f821ce59 33432009-02-08 Robert Millan <rmh@aybabtu.com>
3344
3345 * fs/cpio.c: Split tar functionality to ...
3346 * fs/tar.c: ... here (new file). Update all users.
3347
aebfc4b0 33482009-02-07 Robert Millan <rmh@aybabtu.com>
3349
3350 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3351 backward-incompatible features.
3352
3353 Based on patch from Javier Martín, with some adjustments.
3354
50fb7002 33552009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 3356
3357 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3358
0bb5115e 33592009-02-07 Robert Millan <rmh@aybabtu.com>
3360
3361 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3362 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3363 after the RAID stuff.
3364
38a0f8e7 33652009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3366
50fb7002 3367 Fixes problem when running vbetest command as reported by
38a0f8e7 3368 Vladimir Serbinenko <phcoder@gmail.com>.
3369
3370 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3371
3143cc1c 33722009-02-04 Felix Zielcke <fzielcke@z-51.de>
3373
3374 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3375 /dev/md/NpN style mdraid devices.
3376
9cba6fce 33772009-02-03 Felix Zielcke <fzielcke@z-51.de>
3378
3379 * util/unifont2pff.rb: Remove.
3380
e507a2c1 33812009-02-03 Felix Zielcke <fzielcke@z-51.de>
3382
3383 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3384 `#'.
3385
d2c2b4cd 33862009-02-03 Felix Zielcke <fzielcke@z-51.de>
3387
3388 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3389 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3390 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3391 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3392 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3393 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3394 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3395
b4315fb0 33962009-02-02 Christian Franke <franke@computer.org>
3397
3398 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3399
de3aa260 34002009-02-01 Felix Zielcke <fzielcke@z-51.de>
3401
7c3ff286 3402 * INSTALL: Note that we now require at least autoconf 2.59 and
3403 that LZO is optional.
de3aa260 3404
825a182b 34052009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3406
3407 Base on patch on bug #24154 created by Tomas Tintera
3408 <trosos@seznam.cz>.
3409
3410 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3411
a69ef770 34122009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3413
7c3ff286 3414 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 3415 <bero@arklinux.org>.
3416
3417 * normal/parser.y (script_init): Add missing semicolon.
3418
6fa42fa6 34192009-01-31 Colin D Bennett <colin@gibibit.com>
3420
7c3ff286 3421 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 3422 (free_menu_entry_classes): Added.
3423 (grub_normal_menu_addentry): Added class property handling.
3424 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3425 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3426
3427 * normal/menu_viewer.c: New file.
3428
3429 * normal/menu.c (run_menu_entry): Renamed to ...
3430 (grub_menu_execute_entry): ... this and made it as global.
3431 (grub_menu_run): Renamed to ...
3432 (show_text_menu): ... this and made it local.
3433 (show_text_menu): Adapt to new function names.
3434 (grub_normal_terminal_menu_viewer): New global variable.
3435
3436 * include/grub/menu.h: New file.
3437
3438 * include/grub/menu_viewer.h: New file.
3439
3440 * include/grub/normal.h: Added include to grub/menu.h.
3441 (grub_menu_entry): Moved to include/grub/menu.h.
3442 (grub_menu_entry_t): Likewise.
3443 (grub_menu): Likewise.
3444 (grub_menu_t): Likewise.
3445 (grub_normal_terminal_menu_viewer): Added.
3446 (grub_menu_execute_entry): Likewise.
3447 (grub_menu_run): Removed.
3448
3449 * DISTLIST: Added include/grub/menu.h.
3450 Added include/grub/menu_viewer.h.
3451 Added normal/menu_viewer.c.
3452
34532009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3454
3455 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3456 arglist for menutitle arguments.
3457
3458 * normal/main.c (grub_normal_menu_addentry): Likewise.
3459
3460 * normal/parser.y (menuentry): Likewise.
3461
3462 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3463
3464 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3465 (grub_script_create_cmdmenu): Likewise.
3466
3467 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3468
3469 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3470 changes.
3471
3472 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3473
3474 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3475
3476 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3477
3478 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3479
3480 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3481
3482 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3483
56192c23 34842009-01-30 Christian Franke <franke@computer.org>
3485
3486 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3487 in option help text.
3488
d72521b3 34892009-01-27 Pavel Roskin <proski@gnu.org>
3490
3491 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3492
994b5e84 34932009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3494
3495 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3496
3497 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3498
3499 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3500 unregister function.
3501
6a7eab2c 35022009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3503
3504 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3505
3506 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3507
3508 * util/grub-mkfont.c (usage): Fix typo.
3509
3510 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3511
1806b56e 35122009-01-26 Daniel Mierswa <impulze@impulze.org>
3513
3fb18f09 3514 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3515
336e1fb9 3516 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3517
1806b56e 3518 * kern/misc.c (grub_strcasecmp): New function.
3519 (grub_strcasecmp): Use grub_size_t instead of int for length.
3520 Fix return value.
3521 * include/grub/misc.h: Update function prototypes.
3522
580b2a0f 35232009-01-26 Robert Millan <rmh@aybabtu.com>
3524
3525 * configure.ac: Fix cross-compilation check.
ef257b36 3526
d31c24f1 35272009-01-22 Christian Franke <franke@computer.org>
3528
3529 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3530 (precision) digit string. Allow `.format2' without `format1' (width).
3531 Limit input chars for `%s' output to `format2' if specified. This is
3532 compatible with standard printf ().
3533
3138b44c 35342009-01-22 Christian Franke <franke@computer.org>
3535
3536 * disk/ata.c (grub_ata_wait_status): Replace by ...
3537 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3538 other status bits may be invalid while BSY is asserted.
3539 (grub_ata_check_ready): New function.
3540 (grub_ata_cmd): Removed.
3541 (grub_ata_wait_drq): New function.
3542 (grub_ata_strncpy): Remove inline.
3543 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3544 and error check now done by grub_ata_wait_drq ().
3545 (grub_ata_pio_write): Likewise.
3546 (grub_atapi_identify): Set DEV before check for !BSY. Use
3547 grub_ata_wait_drq () to wait for data.
3548 (grub_ata_device_initialize): Add status register check to
3549 detect missing SATA slave devices. Add debug messages.
3550 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3551 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3552 transfer loop by grub_ata_pio_write ().
3553 (grub_ata_identify): Set DEV before check for !BSY. Use
3554 grub_ata_wait_drq () to wait for data.
ef257b36 3555 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 3556 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3557 read/write in one loop. Fix invalid command on write. Fix incomplete
3558 command on (size % batch) == 0. Add missing error check after write of
3559 last block. Add debug messages.
3560 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3561
59a64ef6 35622009-01-19 Christian Franke <franke@computer.org>
3563
3564 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3565 (GRUB_ATAPI_IREASON_*): Likewise.
3566 (grub_ata_pio_write): Fix timeout error return.
3567 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3568 (grub_atapi_wait_drq): New function.
3569 (grub_atapi_packet): New parameter `size'.
3570 Use grub_atapi_wait_drq () and direct write instead of
3571 grub_ata_pio_write ().
3572 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3573 reads the number of bytes requested by the device for each DRQ
3574 assertion.
3575 (grub_atapi_write): Remove old implementation, return not
3576 implemented instead.
3577
1cfe20b3 35782009-01-19 Christian Franke <franke@computer.org>
3579
3580 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3581 of 512 to calculate data size.
3582 (grub_scsi_read12): Likewise.
3583 (grub_scsi_write10): Likewise.
3584 (grub_scsi_write12): Likewise.
3585 (grub_scsi_read): Adjust size according to blocksize.
3586 Add checks for invalid blocksize and unaligned transfer.
3587
bee5fe5d 35882009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3589
3590 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3591
ef257b36 3592 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 3593 width glyphs.
3594
3e643f8c 35952009-01-19 Robert Millan <rmh@aybabtu.com>
3596
3597 * config.guess: Update to latest version from config git.
3598 * config.sub: Likewise.
3599
4fa80998 36002009-01-17 Felix Zielcke <fzielcke@z-51.de>
3601
3602 * Makefile.in: Change font compilation to use new grub-mkfont instead
3603 of java version.
3604
3605 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3606 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3607 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3608 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3609 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3610 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3611 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3612 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3613 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3614
7086085b 36152009-01-16 Christian Franke <franke@computer.org>
3616
3617 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3618 (enum grub_ata_timeout_milliseconds): New enum.
3619 (grub_ata_wait_status): Add parameter milliseconds.
3620 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3621 recovery from timed-out commands.
3622 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3623 return grub_errno instead of REG_ERROR.
3624 (grub_ata_pio_write): Add parameter milliseconds.
3625 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3626 Pass milliseconds to grub_ata_wait_status () and
3627 grub_ata_pio_read ().
3628 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3629 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3630 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3631 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3632 It is not suitable for device detection, because DEV bit is ignored,
3633 the command may run too long, and not all devices set the signature
3634 properly.
3635 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3636 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3637 Fix device selection, DEV bit must be set first to address the registers
3638 of the correct device.
3639 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3640 grub_ata_pio_read/write ().
3641 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3642 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3643
4a412913 36442009-01-13 Carles Pina i Estany <carles@pina.cat>
3645
3646 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3647
7795c55e 36482009-01-13 Bean <bean123ch@gmail.com>
d913988c 3649
3650 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3651
7795c55e 36522009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 3653
3654 * Makefile.in: (enable_grub_mkfont): New variable.
3655 (freetype_cflags): Likewise.
3656 (freetype_libs): Likewise.
3657
3658 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3659 (grub_mkfont_SOURCES): New variable.
3660 (grub_mkfont_CFLAGS): Likewise.
3661 (grub_mkfont_LDFLAGS): Likewise.
3662
3663 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3664 library if `--enable-grub-mkfont' is requested.
3665 (enable_grub_mkfont): New variable.
3666 (freetype_cflags): Likewise.
3667 (freetype_libs): Likewise.
3668
3669 * util/grub-mkfont.c: New file.
3670
093af1fe 36712009-01-12 Christian Franke <franke@computer.org>
3672
3673 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3674 mode check. Fix setting of compat_use[].
3675
f36cc108 36762009-01-10 Robert Millan <rmh@aybabtu.com>
3677
3678 Update a few copyright years which we forgot to do in 2008 (only for
3679 files whose changes made in 2008 were copyright-significant)
3680
3681 * Makefile.in: Add 2008 to Copyright line.
3682 * disk/ieee1275/ofdisk.c: Likewise.
3683 * disk/efi/efidisk.c: Likewise.
3684 * kern/dl.c: Likewise.
3685 * kern/sparc64/ieee1275/init.c: Likewise.
3686 * kern/mm.c: Likewise.
3687 * kern/efi/mm.c: Likewise.
3688 * boot/i386/pc/boot.S: Likewise.
3689 * genfslist.sh: Likewise.
3690 * fs/iso9660.c: Likewise.
3691 * fs/hfs.c: Likewise.
3692 * fs/jfs.c: Likewise.
3693 * fs/minix.c: Likewise.
3694 * fs/ufs.c: Likewise.
3695 * gensymlist.sh.in: Likewise.
3696 * genkernsyms.sh.in: Likewise.
3697 * include/grub/misc.h: Likewise.
3698 * include/grub/types.h: Likewise.
3699 * include/grub/symbol.h: Likewise.
3700 * include/grub/elf.h: Likewise.
3701 * include/grub/kernel.h: Likewise.
3702 * include/grub/disk.h: Likewise.
3703 * include/grub/dl.h: Likewise.
3704 * include/grub/i386/linux.h: Likewise.
3705 * include/grub/i386/pc/biosdisk.h: Likewise.
3706 * include/grub/efi/api.h: Likewise.
3707 * include/grub/efi/pe32.h: Likewise.
3708 * include/grub/util/misc.h: Likewise.
3709 * normal/execute.c: Likewise.
3710 * normal/arg.c: Likewise.
3711 * normal/completion.c: Likewise.
3712 * normal/lexer.c: Likewise.
3713 * normal/parser.y: Likewise.
3714 * normal/misc.c: Likewise.
3715 * commands/i386/pc/vbeinfo.c: Likewise.
3716 * commands/hexdump.c: Likewise.
3717 * commands/terminal.c: Likewise.
3718 * commands/ls.c: Likewise.
3719 * commands/help.c: Likewise.
3720 * partmap/pc.c: Likewise.
3721 * loader/efi/chainloader.c: Likewise.
3722 * loader/multiboot_loader.c: Likewise.
3723 * loader/i386/pc/multiboot2.c: Likewise.
3724 * term/efi/console.c: Likewise.
3725 * term/i386/pc/serial.c: Likewise.
3726 * util/lvm.c: Likewise.
3727 * util/console.c: Likewise.
3728 * util/i386/efi/grub-mkimage.c: Likewise.
3729 * util/raid.c: Likewise.
3730
7f02114b 37312009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3732
3733 * commands/videotest.c: Removed include to grub/machine/memory.h.
3734
3735 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3736 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3737 (video_mod_SOURCES): Removed.
3738 (video_mod_CFLAGS): Likewise.
3739 (video_mod_LDFLAGS): Likewise.
3740 (gfxterm_mod_SOURCES): Likewise.
3741 (gfxterm_mod_CFLAGS): Likewise.
3742 (gfxterm_mod_LDFLAGS): Likewise.
3743 (videotest_mod_SOURCES): Likewise.
3744 (videotest_mod_CFLAGS): Likewise.
3745 (videotest_mod_LDFLAGS): Likewise.
3746 (bitmap_mod_SOURCES): Likewise.
3747 (bitmap_mod_CFLAGS): Likewise.
3748 (bitmap_mod_LDFLAGS): Likewise.
3749 (tga_mod_SOURCES): Likewise.
3750 (tga_mod_CFLAGS): Likewise.
3751 (tga_mod_LDFLAGS): Likewise.
3752 (jpeg_mod_SOURCES): Likewise.
3753 (jpeg_mod_CFLAGS): Likewise.
3754 (jpeg_mod_LDFLAGS): Likewise.
3755 (png_mod_SOURCES): Likewise.
3756 (png_mod_CFLAGS): Likewise.
3757 (png_mod_LDFLAGS): Likewise.
3758
3759 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3760 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3761 (video_mod_SOURCES): Added.
3762 (video_mod_CFLAGS): Likewise.
3763 (video_mod_LDFLAGS): Likewise.
3764 (videotest_mod_SOURCES): Likewise.
3765 (videotest_mod_CFLAGS): Likewise.
3766 (videotest_mod_LDFLAGS): Likewise.
3767 (bitmap_mod_SOURCES): Likewise.
3768 (bitmap_mod_CFLAGS): Likewise.
3769 (bitmap_mod_LDFLAGS): Likewise.
3770 (tga_mod_SOURCES): Likewise.
3771 (tga_mod_CFLAGS): Likewise.
3772 (tga_mod_LDFLAGS): Likewise.
3773 (jpeg_mod_SOURCES): Likewise.
3774 (jpeg_mod_CFLAGS): Likewise.
3775 (jpeg_mod_LDFLAGS): Likewise.
3776 (png_mod_SOURCES): Likewise.
3777 (png_mod_CFLAGS): Likewise.
3778 (png_mod_LDFLAGS): Likewise.
3779 (gfxterm_mod_SOURCES): Likewise.
3780 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 3781 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 3782
3783 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3784 grub/machine/console.h.
3785
644fff97 37862009-01-04 Jerone Young <jerone@gmail.com>
3787
3788 Make on screen instructions clearer
3789
3790 Based on patch created by Jidanni <jidanni@jidanni.org>
3791
3792 * normal/menu.c: print clearer instructions on the screen
3793
1e901a75 37942009-01-02 Colin D Bennett <colin@gibibit.com>
3795
3796 New font engine.
34c44600 3797
1e901a75 3798 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3799 build system and fixed gfxterm.c to work with different sized fonts.
3800
3801 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 3802
1e901a75 3803 * configure: Re-generated.
34c44600 3804
1e901a75 3805 * DISTLIST: Removed font/manager.c.
3806 Added font/font.c.
3807 Added font/font_cmd.c.
34c44600 3808
1e901a75 3809 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3810 compilation.
34c44600 3811
1e901a75 3812 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 3813
3814 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 3815
3816 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 3817
1e901a75 3818 * normal/menu.c: Likewise.
34c44600 3819
1e901a75 3820 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3821 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 3822
1e901a75 3823 * include/grub/font.h: Replaced with new file.
34c44600 3824
1e901a75 3825 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3826 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3827 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3828 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3829 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 3830 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 3831 fg_red, fg_green, fg_blue, fg_alpha.
3832 (grub_video_adapter): Removed blit_glyph.
34c44600 3833 (grub_video_blit_glyph): Removed.
3834
1e901a75 3835 * font/manager.c: Removed file.
34c44600 3836
3837 * font/font.c: New file.
3838
1e901a75 3839 * font/font_cmd.c: Likewise.
34c44600 3840
1e901a75 3841 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 3842
1e901a75 3843 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3844 (grub_video_vbe_map_rgba): Likewise.
3845 (grub_video_vbe_unmap_color_int): Likewise.
3846 (grub_video_vbe_blit_glyph): Removed.
3847 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 3848
1e901a75 3849 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3850 (get_pixel): Likewise.
34c44600 3851 (set_pixel): Likewise.
3852
1e901a75 3853 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 3854
1e901a75 3855 * term/gfxterm.c: Adapted to new font engine.
34c44600 3856
1e901a75 3857 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 3858
1e901a75 3859 * term/i386/pc/vga.c: Likewise.
34c44600 3860
1e901a75 3861 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 3862
1e901a75 3863 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 3864
1e901a75 3865 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3866
1e901a75 3867 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3868
1e901a75 3869 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 3870
1e901a75 3871 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 3872
1e901a75 3873 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 3874
1e901a75 3875 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 3876
1e901a75 3877 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3878
3879 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 3880
1e901a75 3881 * util/grub-mkconfig_lib.in: Changed font extension.
3882
278922e8 38832008-12-28 Felix Zielcke <fzielcke@z-51.de>
3884
3885 * util/getroot.c (grub_util_get_grub_dev): Add support for
3886 /dev/md/dNNpNN style partitionable mdraid devices.
3887
3ced05cf 38882008-12-12 Alex Smith <alex@alex-smith.me.uk>
3889
3890 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3891 at a time limit of the PXE TFTP API correctly.
3892 (grub_pxefs_close): Likewise.
3893
7fd0ee30 38942008-11-29 Robert Millan <rmh@aybabtu.com>
3895
34c44600 3896 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 3897 grub_ata_device_initialize() calls.
3898
34c44600 38992008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 3900
3901 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3902 iteration failed.
3903 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3904
89313780 39052008-11-28 Robert Millan <rmh@aybabtu.com>
3906
3907 Fix build on powerpc-ieee1275. Based on patch created by
3908 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3909 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3910 `kern/ieee1275/mmap.c'.
3911 * include/grub/powerpc/ieee1275/memory.h: New file.
3912
15257703 3913 Provide grub-install on coreboot.
3914 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3915 (grub_install_SOURCES): New variable.
3916 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3917 usable on coreboot.
3918
9fc5388a 39192008-11-25 Felix Zielcke <fzielcke@z-51.de>
3920
3921 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3922 to `grub_term_input_t'.
3923 (grub_term_get_current_output): Change return type to
3924 `grub_term_output_t'.
3925
bc3a2f31 39262008-11-22 Robert Millan <rmh@aybabtu.com>
3927
34c44600 3928 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3929 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3930 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3931 grub_vga_text_cls().
3932
80fc88f2 3933 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3934 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3935
cbf36fd3 3936 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3937 to 0x200000 (avoids trouble with some OFW implementations, and matches
3938 with the one in Yaboot).
3939 Reported by Manoel Abranches
3940
73e8e268 39412008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3942
3943 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3944 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3945
73e8e268 3946 * util/grub-mkconfig_lib.in (grub_warn): New function.
3947 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3948 warnings, to obtain consistent formatting.
3949 * util/grub.d/00_header.in: Likewise.
3950 * util/update-grub_lib.in: Likewise.
3951
e94045a1 3952 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3953 Move comment text to `#error' stanza.
e94045a1 3954
79d29fd7 3955 Harmonize ieee1275's grub_available_iterate() with the generic
3956 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3957 build problem on i386-ieee1275):
3958 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3959 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3960 parameter `type'. Update all users of this function.
3961 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3962 `kern/ieee1275/mmap.c'.
3963 * kern/ieee1275/init.c
3964 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3965 with ...
3966 (grub_machine_mmap_iterate): ... this.
3967 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3968 return type to `grub_err_t'. Update all implementations of this
3969 function prototype.
3970 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3971 Likewise.
3972
60d6b16e 3973 Add `lsmmap' command (lists firmware-provided memory map):
3974 * commands/lsmmap.c: New file.
3975 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3976 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3977 variables.
3978 * conf/powerpc-ieee1275.rmk: Likewise.
3979 * conf/i386-coreboot.rmk: Likewise.
3980 * conf/i386-ieee1275.rmk: Likewise.
3981
ebaaf49b 39822008-11-19 Robert Millan <rmh@aybabtu.com>
3983
3984 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3985 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3986 constraints to initrd allocation (based on code from
3987 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3988 for Linux to find it.
ebaaf49b 3989
dfab719f 39902008-11-14 Robert Millan <rmh@aybabtu.com>
3991
3992 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3993 order to cope with duplicate slashes.
3994
10fc3eb9 39952008-11-14 Robert Millan <rmh@aybabtu.com>
3996
3997 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3998 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3999 don't want to mess with lower memory, because it is used in the Linux
4000 loader.
4001
4002 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 4003 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 4004 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4005 is in our heap (probably as a result of it being corrupted during
2f2a3442 4006 decompression). Add #error instance with comment to explain why this
4007 loader isn't currently usable on PC/BIOS.
10fc3eb9 4008
e2e07847 40092008-11-14 Robert Millan <rmh@aybabtu.com>
4010
4011 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 4012 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 4013
fe8e8d69 40142008-11-12 Robert Millan <rmh@aybabtu.com>
4015
4016 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4017
4018 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4019 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4020 from here ...
4021 * include/grub/i386/pc/memory.h: ... to here.
4022
976b07d0 40232008-11-12 Robert Millan <rmh@aybabtu.com>
4024
4025 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4026 split).
4027
4028 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4029 (grub_console_cur_color, grub_console_real_putchar)
4030 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4031 (grub_console_setcolorstate, grub_console_setcolor)
4032 (grub_console_getcolor): Move from here ...
4033 * include/grub/i386/vga_common.h: ... to here (new file).
4034
4035 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4036 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4037 `<grub/i386/io.h>'.
4038 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4039 `<grub/i386/vga_common.h>'.
4040
76679cd3 40412008-11-12 Robert Millan <rmh@aybabtu.com>
4042
4043 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4044 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4045 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4046 variables.
4047 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4048 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4049
4050 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4051 grub_console_init() with call to grub_vga_text_init().
4052 (grub_machine_fini): Replace call to
4053 grub_console_fini() with call to grub_vga_text_fini() and
4054 grub_at_keyboard_fini().
4055
4056 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4057 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4058 (grub_console_setcolorstate, grub_console_setcolor)
4059 (grub_console_getcolor): New function prototypes.
4060
4061 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4062 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4063 (grub_vga_text_setcursor): Static-ize.
4064 (grub_vga_text_term): New structure.
4065 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4066
4067 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4068 (grub_console_cur_color, grub_console_standard_color)
4069 (grub_console_normal_color, grub_console_highlight_color)
4070 (map_char, grub_console_putchar, grub_console_getcharwidth)
4071 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4072 (grub_console_getcolor): Move from here ...
4073 * term/i386/vga_common.c: ... to here (same function names).
4074
95b841d3 40752008-11-12 Robert Millan <rmh@aybabtu.com>
4076
4077 Use newly-added Multiboot support in coreboot.
4078
4079 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4080 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4081
4082 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4083 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4084 (codestart): Store the MBI in `startup_multiboot_info' when we're
4085 being loaded using Multiboot.
4086
4087 * kern/i386/coreboot/init.c (grub_machine_init): Move
4088 grub_at_keyboard_init() call to beginning of function (useful for
4089 debugging). Call grub_machine_mmap_init() before attempting to use
4090 grub_machine_mmap_iterate().
4091 (grub_lower_mem, grub_upper_mem): Move from here ...
4092 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4093 here (new file).
4094
4095 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4096 function prototype.
4097
761ca975 40982008-11-12 Robert Millan <rmh@aybabtu.com>
4099
4100 Fix a regression introduced by the at_keyboard.mod split. Because
4101 some terminals are default on some platforms and non-default on
4102 others, the first terminal being registered determines which is
4103 going to be default.
4104
4105 * kern/term.c (grub_term_register_input): If this is the first
4106 terminal being registered, set it as the current one.
4107 (grub_term_register_output): Likewise.
4108
4109 * term/efi/console.c (grub_console_init): Do not call
4110 grub_term_set_current_output() or grub_term_set_current_input().
4111 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4112 * term/i386/pc/console.c (grub_console_init): Likewise.
4113 (grub_console_fini): Do not call grub_term_set_current_input()
4114 (but leave grub_term_set_current_output() to restore text mode).
4115
6c529df7 41162008-11-10 Robert Millan <rmh@aybabtu.com>
4117
4118 * util/grub.d/00_header.in: Add backward compatibility check for
4119 versions of terminal.mod that don't understand `terminal_input' or
4120 `terminal_output'.
4121
132e4113 41222008-11-09 Robert Millan <rmh@aybabtu.com>
4123
4124 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4125 `terminal_input' / `terminal_output', not `terminal'.
4126
ac293d50 41272008-11-08 Robert Millan <rmh@aybabtu.com>
4128
4129 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 4130 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 4131
0025933a 41322008-11-08 Robert Millan <rmh@aybabtu.com>
4133
4134 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 4135 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 4136 members. Update all users.
4137 * util/console.c (grub_ncurses_term): Split in ...
4138 (grub_ncurses_term_input): ... this, and ...
4139 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 4140 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 4141
37c86336 41422008-11-08 Robert Millan <rmh@aybabtu.com>
4143
4144 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4145 (PKGDATA): Add $(pkgdata_SRCDIR).
4146 (pkglib_BUILDDIR): New variable.
4147 (pkgdata_SRCDIR): New variable.
4148 (build_env.mk): New target.
4149 (include_DATA): New variable.
4150 (install-local): Install $(include_DATA) files in $(includedir).
4151
b6c15a2d 41522008-11-07 Pavel Roskin <proski@gnu.org>
4153
d99d46f1 4154 * gendistlist.sh: Use C locale for sorting to ensure consistent
4155 output on all systems.
4156
b6c15a2d 4157 * util/grub.d/00_header.in: Remove incorrect space before
4158 "serial".
4159
c32ee8c9 41602008-11-07 Robert Millan <rmh@aybabtu.com>
4161
4162 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4163 per specification.
4164 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4165 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4166 (based on find_multi_boot1_header).
4167 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4168 using find_multi_boot2_header(), and abort if neither Multiboot or
4169 Multiboot headers were found.
4170
651c29b7 41712008-11-07 Robert Millan <rmh@aybabtu.com>
4172
4173 Modularize at_keyboard.mod:
4174
4175 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4176 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4177 (at_keyboard_mod_LDFLAGS): New variables.
4178
4179 Actual terminal split:
4180
4181 * include/grub/term.h (struct grub_term): Split in ...
4182 (struct grub_term_input): ... this, and ...
4183 (struct grub_term_output): ... this. Update all users.
4184 (grub_term_set_current): Split in ...
4185 (grub_term_set_current_input): ... this, and ...
4186 (grub_term_set_current_output): ... this.
4187 (grub_term_get_current): Split in ...
4188 (grub_term_get_current_input): ... this, and ...
4189 (grub_term_get_current_output): ... this.
4190 (grub_term_register): Split in ...
4191 (grub_term_register_input): ... this, and ...
4192 (grub_term_register_output): ... this.
4193 (grub_term_unregister): Split in ...
4194 (grub_term_unregister_input): ... this, and ...
4195 (grub_term_unregister_output): ... this.
4196 (grub_term_iterate): Split in ...
4197 (grub_term_iterate_input): ... this, and ...
4198 (grub_term_iterate_output): ... this.
4199
4200 * kern/term.c (grub_term_list): Split in ...
4201 (grub_term_list_input): ... this, and ...
4202 (grub_term_list_output): ... this. Update all users.
4203 (grub_cur_term): Split in ...
4204 (grub_cur_term_input): ... this, and ...
4205 (grub_cur_term_output): ... this. Update all users.
4206 (grub_term_set_current): Split in ...
4207 (grub_term_set_current_input): ... this, and ...
4208 (grub_term_set_current_output): ... this.
4209 (grub_term_get_current): Split in ...
4210 (grub_term_get_current_input): ... this, and ...
4211 (grub_term_get_current_output): ... this.
4212 (grub_term_register): Split in ...
4213 (grub_term_register_input): ... this, and ...
4214 (grub_term_register_output): ... this.
4215 (grub_term_unregister): Split in ...
4216 (grub_term_unregister_input): ... this, and ...
4217 (grub_term_unregister_output): ... this.
4218 (grub_term_iterate): Split in ...
4219 (grub_term_iterate_input): ... this, and ...
4220 (grub_term_iterate_output): ... this.
4221
4222 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4223 a check for input and one for output (and only attempt to get keys
4224 from user when input works).
4225
4226 * util/grub-probe.c (grub_term_get_current): Split in ...
4227 (grub_term_get_current_input): ... this, and ...
4228 (grub_term_get_current_output): ... this.
4229 * util/grub-fstest.c: Likewise.
4230 * util/i386/pc/grub-setup.c: Likewise.
4231 * util/grub-editenv.c: Likewise.
4232
4233 Portability adjustments:
4234
4235 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4236 `term/i386/pc/at_keyboard.c'.
4237 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4238 grub_keyboard_controller_init() (now handled by terminal .init).
4239 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4240 grub_at_keyboard_init().
4241 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4242 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4243 at_keyboard.mod via input terminal interface).
4244 * include/grub/i386/coreboot/console.h: Convert into a stub for
4245 `<grub/i386/pc/console.h>'.
4246
4247 Migrate full terminals to new API:
4248
4249 * term/efi/console.c (grub_console_term): Split into ...
4250 (grub_console_term_input): ... this, and ...
4251 (grub_console_term_output): ... this. Update all users.
4252 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4253 (grub_ofconsole_init): Split into ...
4254 (grub_ofconsole_init_input): ... this, and ...
4255 (grub_ofconsole_init_output): ... this.
4256 (grub_ofconsole_term): Split into ...
4257 (grub_ofconsole_term_input): ... this, and ...
4258 (grub_ofconsole_term_output): ... this. Update all users.
4259 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4260 (grub_serial_term_input): ... this, and ...
4261 (grub_serial_term_output): ... this. Update all users.
4262 * term/i386/pc/console.c (grub_console_term): Split into ...
4263 (grub_console_term_input): ... this, and ...
4264 (grub_console_term_output): ... this. Update all users.
4265 (grub_console_term_input): Only enable it on PC/BIOS platform.
4266 (grub_console_init): Remove grub_keyboard_controller_init() call.
4267
4268 Migrate input terminals to new API:
4269
4270 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4271 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4272 i386-specific anyway).
4273 (grub_console_checkkey): Rename to ...
4274 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4275 users.
4276 (grub_keyboard_controller_orig): New variable.
4277 (grub_console_getkey): Rename to ...
4278 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4279 users.
4280 (grub_keyboard_controller_init): Static-ize. Save original
4281 controller value so that it can be restored ...
4282 (grub_keyboard_controller_fini): ... here (new function).
4283 (grub_at_keyboard_term): New structure.
4284 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4285 functions.
4286
4287 Migrate output terminals to new API:
4288
4289 * term/i386/pc/vga.c (grub_vga_term): Change type to
4290 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4291 members. Update all users.
4292 * term/gfxterm.c (grub_video_term): Change type to
4293 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4294 members. Update all users.
4295 * include/grub/i386/pc/console.h (grub_console_checkkey)
4296 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4297 etc).
4298
4299 Migrate `terminal' command and userland tools to new API:
4300
4301 * commands/terminal.c (grub_cmd_terminal): Split into ...
4302 (grub_cmd_terminal_input): ... this, and ...
4303 (grub_cmd_terminal_output): ... this.
4304 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4305 `terminal_input' and `terminal_output'.
4306 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4307 `terminal_input' / `terminal_output' API.
4308 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4309 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4310 provided ${GRUB_TERMINAL}, convert it).
4311
96e5d876 43122008-11-04 Robert Millan <rmh@aybabtu.com>
4313
4314 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4315 for FreeBSD.
4316 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4317
556f3775 43182008-11-03 Bean <bean123ch@gmail.com>
4319
4320 * kern/elf.c (grub_elf32_load): Revert to previous code.
4321 (grub_elf64_load): Likewise.
4322
4323 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4324
926b9823 43252008-11-01 Robert Millan <rmh@aybabtu.com>
4326
4327 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4328 (TARGET_CPPFLAGS): Likewise.
4329 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4330
1432e958 43312008-11-01 Carles Pina i Estany <carles@pina.cat>
4332
4333 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4334
dba3f844 43352008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 4336
4337 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4338 addition of objects until the code is not going to be able to fail.
4339
dba3f844 43402008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 4341
4342 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4343 (add a missing NULL check, and correct them by moving the pointer
4344 operations after the actual check).
4345
7ab28c21 43462008-10-29 Robert Millan <rmh@aybabtu.com>
4347
4348 * util/i386/pc/grub-install.in: Handle empty string as output from
4349 make_system_path_relative_to_its_root().
4350
1b7748eb 43512008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4352
4353 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4354 circular metadata worst case scenario. If the metadata is circular
4355 then copy the wrap in place.
4356 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4357 project lib/format_text/layout.h
4358 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4359
c9618ab2 43602008-10-03 Felix Zielcke <fzielcke@z-51.de>
4361
7a36edca 4362 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 4363
bf981c62 43642008-10-03 Felix Zielcke <fzielcke@z-51.de>
4365
4366 * util/update-grub_lib.in: Mention filename in warning message.
4367
6d994591 43682008-09-29 Felix Zielcke <fzielcke@z-51.de>
4369
4370 * NEWS: Update for rename of update-grub to grub-mkconfig.
4371
18ade780 43722008-09-29 Felix Zielcke <fzielcke@z-51.de>
4373
4374 * util/update-grub_lib.in: Copy to ...
4375 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 4376 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 4377 * util/update-grub.in: Rename to ...
4378 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4379 option. Add `--output' option to allow users to specify the generated
4380 configuration file. Default to stdout.
4381 (update_grub_dir): Rename to ...
4382 (grub_mkconfig_dir): ... this.
4383 (grub_cfg): Default to an empty string.
4384 * conf/common.rmk (update-grub): Rename to ...
4385 (grub-mkconfig): ... this.
4386 (update-grub_lib): Copy to ...
4387 (grub-mkconfig_lib): ... this.
4388 (update-grub_SCRIPTS): Copy to ...
4389 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4390 (update-grub_DATA): Rename to ...
4391 (grub-mkconfig_DATA): ... this.
4392
556ce6ac 43932008-09-28 Robert Millan <rmh@aybabtu.com>
4394
4395 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4396 to `modified'. Add the real `created' field.
4397 (grub_iso9660_uuid): Use `modified' rather than `created' for
4398 constructing the UUID.
4399
44002008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 4401
4402 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4403 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4404
92274e85 44052008-09-28 Bean <bean123ch@gmail.com>
4406
4407 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4408 Thanks to Christian Franke for finding this bug.
4409
add6f17a 44102008-09-25 Robert Millan <rmh@aybabtu.com>
4411
4412 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4413 instances of grub_util_get_disk_name() (see previous commit).
4414
d2a367b8 44152008-09-25 Robert Millan <rmh@aybabtu.com>
4416
4417 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4418 `util/i386/get_disk_name.c'.
4419 * conf/i386-efi.rmk: Likewise.
4420 * conf/x86_64-efi.rmk: Likewise.
4421 * conf/i386-coreboot.rmk: Likewise.
4422 * conf/i386-ieee1275.rmk: Likewise.
4423 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4424 `util/ieee1275/get_disk_name.c'.
4425 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4426 * util/ieee1275/get_disk_name.c: Remove file.
4427 * util/i386/get_disk_name.c: Remove file.
4428 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4429 "hd%d" for device.map entries, rather than using
4430 grub_util_get_disk_name().
4431
81a06771 44322008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 4433
4434 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4435 warning.
4436 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4437
5a004279 44382008-09-24 Carles Pina i Estany <carles@pina.cat>
4439
4440 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4441 Changed to 0x5100.
4442 (GRUB_TERM_PPAGE): Changed to 0x4900.
4443
397093d3 44442008-09-24 Robert Millan <rmh@aybabtu.com>
4445
4446 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4447 macros (they were i386-pc specific).
4448 * include/grub/sparc64/ieee1275/console.h: Likewise.
4449 * include/grub/efi/console.h: Likewise.
4450
a91b6c7c 44512008-09-22 Bean <bean123ch@gmail.com>
4452
4453 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4454 resident and in attribute list.
4455
4456 * include/grub/ntfs.h (BMP_LEN): Removed.
4457
c40fd116 44582008-09-22 Bean <bean123ch@gmail.com>
4459
81a06771 4460 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 4461 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4462
4463 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4464 error occurs, as grub_disk_open will call grub_disk_close, which will
4465 call p->close (scsi).
4466
81a06771 44672008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 4468
4469 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4470 (AC_PREREQ): Bumped to 2.59.
4471 (AC_TRY_COMPILE): Replace obsolete macro with ...
4472 (AC_COMPILE_IFELSE): ... this.
4473 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4474 (AC_LINK_IFELSE): ... this.
4475
5dc43410 44762008-09-21 Felix Zielcke <fzielcke@z-51.de>
4477
4478 * autogen.sh: Add a call to `gendistlist.sh'.
4479
9035dce4 44802008-09-19 Christian Franke <franke@computer.org>
4481
4482 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4483 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4484 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4485 Export __enable_execute_stack() to modules.
4486 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4487 New function.
4488
7fd75377 44892008-09-09 Felix Zielcke <fzielcke@z-51.de>
4490
040030b3 4491 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4492 Sort the list.
4493
44942008-09-09 Felix Zielcke <fzielcke@z-51.de>
4495
4496 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 4497 #include <grub/util/hostdisk.h>.
4498
89d5ffcf 44992008-09-08 Robert Millan <rmh@aybabtu.com>
4500
4501 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4502 segments when their filesz is zero (grub_file_read() interprets
81a06771 4503 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 4504 Use `lowest_segment' rather than 0 for calculating the current
4505 segment load address.
4506
40da438f 45072008-09-08 Robert Millan <rmh@aybabtu.com>
4508
4509 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4510 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4511 clobbered useful information.
4512
ddbf5556 45132008-09-08 Robert Millan <rmh@aybabtu.com>
4514
4515 * include/grub/util/biosdisk.h: Move to ...
4516 * include/grub/util/hostdisk.h: ... here. Update all users.
4517 * util/biosdisk.c: Move to ...
4518 * util/hostdisk.c: ... here. Update all users.
4519
783d0f48 45202008-09-07 Robert Millan <rmh@aybabtu.com>
4521
4522 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4523 variables.
4524 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4525 and length can be stored directly in the `mbi->mmap_addr' and
4526 `mbi->mmap_length' struct fields.
4527
548e2ea5 45282008-09-07 Robert Millan <rmh@aybabtu.com>
4529
4530 * conf/i386.rmk: New file. Provides declaration for building
4531 `cpuid.mod'.
4532 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4533 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4534 variables.
4535 Include `conf/i386.mk'.
4536 * conf/i386-efi.rmk: Likewise.
4537 * conf/x86_64-efi.rmk: Likewise.
4538 * conf/i386-coreboot.rmk: Likewise.
4539 * conf/i386-ieee1275.rmk: Likewise.
4540
0ea85a37 45412008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4542
4543 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4544 Adds optimization support for BGR based modes.
4545
4546 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4547 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4548 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4549 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4550 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4551 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4552 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4553 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4554 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4555 (grub_video_i386_vbeblit_index_index): Likewise.
4556 (grub_video_i386_vbeblit_replace_directN): Added.
4557 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4558 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4559 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4560 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4561 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4562 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 4563 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 4564 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4565 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4566 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4567 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4568 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4569 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4570
4571 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4572 (grub_video_i386_vbefill_R8G8B8): Likewise.
4573 (grub_video_i386_vbefill_index): Likewise.
4574 (grub_video_i386_vbefill_direct32): Added.
4575 (grub_video_i386_vbefill_direct24): Likewise.
4576 (grub_video_i386_vbefill_direct16): Likewise.
4577 (grub_video_i386_vbefill_direct8): Likewise.
4578
81a06771 4579 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 4580 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4581 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4582 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4583 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4584 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 4585
0ea85a37 4586 * video/video.c (grub_video_get_blit_format): Updated to use new
4587 blit formats. Added handling for 16 bit color modes.
81a06771 4588
4589 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 4590 fillers.
4591 (common_blitter): Updated to use new blitters.
4592
4593 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4594 Removed.
4595 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4596 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4597 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4598 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4599 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4600 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4601 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4602 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4603 (grub_video_i386_vbeblit_index_index): Likewise.
4604 (grub_video_i386_vbeblit_replace_directN): Added.
4605 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4606 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4607 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4608 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4609 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4610 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4611 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4612 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4613 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4614 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4615 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4616 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4617 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 4618
0ea85a37 4619 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4620 (grub_video_i386_vbefill_R8G8B8): Likewise.
4621 (grub_video_i386_vbefill_index): Likewise.
4622 (grub_video_i386_vbefill_direct32): Added.
4623 (grub_video_i386_vbefill_direct24): Likewise.
4624 (grub_video_i386_vbefill_direct16): Likewise.
4625 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 4626
0ea85a37 4627 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4628 types.
81a06771 4629
0ea85a37 4630 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4631 types.
81a06771 4632
0ea85a37 4633 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4634 blitter types.
81a06771 4635
0ea85a37 4636 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4637 types.
4638
e8a83df6 46392008-09-06 Felix Zielcke <fzielcke@z-51.de>
4640
4641 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4642 RAID level 1.
4643
6bcd8ee5 46442008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 4645
6bcd8ee5 4646 * fs/iso9660.c (grub_iso9660_date): New structure.
4647 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4648 (grub_iso9660_uuid): New function.
c375ae58 4649
59261157 46502008-09-05 Bean <bean123ch@gmail.com>
4651
4652 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4653
4654 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4655 insensitive bit for names in Win32 and Win32 & DOS namespace.
4656
4657 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4658
4659 * include/grub/types.h (LONG_MAX): Likewise.
4660
58b6645a 46612008-09-04 Felix Zielcke <fzielcke@z-51.de>
4662
4ee55921 4663 * util/getroot.c: Include <config.h>.
4664 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4665 add support for /dev/md/N devices and handle LVM double dash escaping.
4666
46672008-09-04 Felix Zielcke <fzielcke@z-51.de>
4668
4669 * config.guess: Update to latest version from config git.
4670 * config.sub: Likewise.
58b6645a 4671
9124f65d 46722008-09-03 Robert Millan <rmh@aybabtu.com>
4673
4674 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4675 `disk->total_sectors'.
4676
81a06771 46772008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 4678
4679 * include/grub/normal.h: Fixed incorrect comment for
4680 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4681
81a06771 46822008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 4683
4684 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4685 values with defines.
4686
4687 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4688 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4689 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4690 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4691 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4692 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4693 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4694 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4695 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4696 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4697 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4698 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4699 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4700 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4701 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4702 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4703 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4704 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4705 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4706
93d5cbf8 47072008-08-31 Robert Millan <rmh@aybabtu.com>
4708
4709 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4710 declaration.
4711 (grub_multiboot): Fix a few warnings.
4712
21751d50 47132008-08-31 Robert Millan <rmh@aybabtu.com>
4714
4715 * loader/i386/pc/multiboot.c: Update comment not to say that
4716 boot_device support is unimplemented.
4717
e27a75c5 47182008-08-31 Robert Millan <rmh@aybabtu.com>
4719
4720 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4721 or memory map support are unimplemented.
4722
81a06771 47232008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 4724
4725 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4726
81a06771 47272008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 4728
4729 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4730 total video memory in 'vbeinfo' output; show color format details for
4731 each video mode.
4732
7c5d8d95 47332008-08-30 Pavel Roskin <proski@gnu.org>
4734
4735 * util/genmoddep.c: Remove for real this time.
4736 * DISTLIST: Remove util/genmoddep.c.
4737
4cebd25a 47382008-08-30 Robert Millan <rmh@aybabtu.com>
4739
4740 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4741 as required by Multiboot spec (it was already 4-byte aligned, but
4742 only by chance).
4743
b497a269 47442008-08-29 Pavel Roskin <proski@gnu.org>
4745
e3925185 4746 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4747 * kern/powerpc/ieee1275/startup.S: ... this.
4748 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4749 * DISTLIST: Likewise.
4750
b497a269 4751 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4752 grub/cpu/kernel.h. Add start label for consistency with other
4753 platforms. Add grub_prefix immediately after start. Add jump
4754 to the code after grub_prefix.
4755 * include/grub/powerpc/kernel.h: Provide valid values for
4756 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4757
6e5a42fe 47582008-08-29 Bean <bean123ch@gmail.com>
4759
4760 * configure.ac: Change host_os to cygwin for mingw.
4761 (asprintf): New check for function.
4762
4763 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4764 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4765
4766 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 4767 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 4768 sync, sleep and grub_util_get_disk_size for mingw.
4769
4770 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4771 to get size in mingw.
4772 (open_device): Use flag O_BINARY if it's defined.
4773 (find_root_device): Add dummy code for mingw.
4774
4775 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4776 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4777 (get_scsi_disk_name): Return 0 for mingw.
4778
4779 * util/hostfs.c: #include <grub/util/misc.h>.
4780 (grub_hostfs_open): Use "rb" flag to open file, use
4781 grub_util_get_disk_size to get disk size for mingw.
4782
4783 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4784 (asprintf): New function if HAVE_ASPRINTF is not set.
4785 (sync): New function for mingw.
4786 (sleep): Likewise.
4787 (grub_util_get_disk_size): Likewise.
4788
ab3f2673 47892008-08-28 Pavel Roskin <proski@gnu.org>
4790
4791 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4792 kern/time.c.
4793
1c282483 47942008-08-28 Robert Millan <rmh@aybabtu.com>
4795
4796 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4797
678e849c 47982008-08-28 Robert Millan <rmh@aybabtu.com>
4799
4800 Change find_grub_drive() syntax so it doesn't prevent it from
4801 detecting NULL names as errors.
4802
4803 * util/biosdisk.c (find_grub_drive): Move free slot search code
4804 from here ...
4805 (find_free_slot): ... to here.
4806 (read_device_map): Use find_free_slot() to search for free slots.
4807
965c75ca 48082008-08-27 Marco Gerards <marco@gnu.org>
4809
4810 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4811 (scsi_mod_SOURCES): New variable.
4812 (scsi_mod_CFLAGS): Likewise
4813 (scsi_mod_LDFLAGS): Likewise.
4814
4815 * disk/scsi.c: New file.
4816
4817 * include/grub/scsi.h: Likewise.
4818
4819 * include/grub/scsicmd.h: Likewise.
4820
4821 * disk/ata.c: Include <grub/scsi.h>.
4822 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4823 instead.
4824 (grub_ata_iterate): Skip ATAPI devices.
4825 (grub_ata_open): Only handle ATAPI devices.
4826 (struct grub_atapi_read): Removed.
4827 (grub_atapi_readsector): Likewise.
4828 (grub_ata_read): No longer handle ATAPI devices.
4829 (grub_ata_write): Likewise.
4830 (grub_atapi_iterate): New function.
4831 (grub_atapi_read): Likewise.
4832 (grub_atapi_write): Likewise.
4833 (grub_atapi_open): Likewise.
4834 (grub_atapi_close): Likewise.
4835 (grub_atapi_dev): New variable.
4836 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4837 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4838
4839 * include/grub/disk.h (enum grub_disk_dev_id): Add
4840 `GRUB_DISK_DEVICE_SCSI_ID'.
4841
c07ae501 48422008-08-26 Robert Millan <rmh@aybabtu.com>
4843
4844 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4845 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4846 descriptive.
4847
5ed20adc 48482008-08-23 Bean <bean123ch@gmail.com>
4849
4850 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4851 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4852 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4853 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4854 dm_nv.mod.
4855 (raid5rec_mod_SOURCES): New macro.
4856 (raid5rec_mod_CFLAGS): Likewise.
4857 (raid5rec_mod_LDFLAGS): Likewise.
4858 (raid6rec_mod_SOURCES): Likewise.
4859 (raid6rec_mod_CFLAGS): Likewise.
4860 (raid6rec_mod_LDFLAGS): Likewise.
4861 (mdraid_mod_SOURCES): Likewise.
4862 (mdraid_mod_CFLAGS): Likewise.
4863 (mdraid_mod_LDFLAGS): Likewise.
4864 (dm_nv_mod_SOURCES): Likewise.
4865 (dm_nv_mod_CFLAGS): Likewise.
4866 (dm_nv_mod_LDFLAGS): Likewise.
4867
4868 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4869 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4870 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4871
4872 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4873 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4874
4875 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4876
4877 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4878
4879 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4880
4881 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4882
4883 * disk/raid5_recover.c: New file.
4884
4885 * disk/raid6_recover.c: Likewise.
4886
4887 * disk/mdraid_linux.c: Likewise.
4888
4889 * disk/dmraid_nvidia.c: Likewise.
4890
4891 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4892 ULONG_MAX.
4893
4894 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4895 calculate the size of raid device.
4896 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4897 different layout of raid5.
4898 (grub_raid_scan_device): Remove code specific to mdraid.
4899 (grub_raid_list): New variable.
4900 (free_array): New function.
4901 (grub_raid_register): Likewise.
4902 (grub_raid_unregister): Likewise.
4903 (grub_raid_rescan): Likewise.
4904 (GRUB_MOD_INIT): Don't iterate device here.
4905 (GRUB_MOD_FINI): Use free_array to release resource.
4906
4907 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4908 (grub_raid5_recover_func_t): New function variable type.
4909 (grub_raid6_recover_func_t): Likewise.
4910 (grub_raid5_recover_func): New variable.
4911 (grub_raid6_recover_func): Likewise.
4912 (grub_raid_register): New function.
4913 (grub_raid_unregister): Likewise.
4914 (grub_raid_rescan): Likewise.
4915 (grub_raid_block_xor): Likewise.
4916
4917 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4918 (CMD_CRC): New macro.
4919 (part): Removed.
4920 (read_file): Handle device as well as file.
4921 (cmd_crc): New function.
4922 (fstest): Handle multiple disks.
4923 (options): Remove part, raw and long, add root and diskcount.
4924 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4925 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4926 add handling for the new options, support multiple disks.
4927
4928 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4929
29c18915 49302008-08-23 Bean <bean123ch@gmail.com>
4931
4932 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4933
4934 * genfslist.sh: Ignore kernel.mod.
4935
4936 * genpartmaplist.sh: Likewise.
4937
8415f261 49382008-08-23 Robert Millan <rmh@aybabtu.com>
4939
4940 * util/getroot.c (find_root_device): Skip anything that starts with
4941 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4942
d5a7dc5b 49432008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4944
d5a7dc5b 4945 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4946 * util/grub.d/00_header.in: Allow the administrator to change default
4947 gfxmode via ${GRUB_GFXMODE}.
4948
380cfbb4 49492008-08-21 Felix Zielcke <fzielcke@z-51.de>
4950
4951 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4952
c9baafe7 49532008-08-21 Robert Millan <rmh@aybabtu.com>
4954
4955 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4956 loader.
4957 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4958 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4959
e290bef2 49602008-08-20 Carles Pina i Estany <carles@pina.cat>
4961
4962 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4963 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4964
f9dbfc96 49652008-08-19 Robert Millan <rmh@aybabtu.com>
4966
4967 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4968 (struct grub_virtual_screen): Remove `cursor_color'.
4969 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4970 initialization.
4971 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4972
dd6bd6ab 49732008-08-18 Robert Millan <rmh@aybabtu.com>
4974
4975 Unify (identical) linux_normal.c files.
4976 * loader/i386/efi/linux_normal.c: Move from here ...
4977 * loader/linux_normal.c: ... to here. Update all users.
4978 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4979 * loader/i386/ieee1275/linux_normal.c: Likewise.
4980
7f42f83e 49812008-08-18 Robert Millan <rmh@aybabtu.com>
4982
4983 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4984 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4985 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4986 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4987 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4988 New macros.
4989 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4990 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4991 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4992 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4993 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4994 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4995 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4996 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4997 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4998 portably using grub_getxy().
4999 Replace `-EFI' with `-bzImage' in boot message.
5000
38487ddb 50012008-08-17 Robert Millan <rmh@aybabtu.com>
5002
5003 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5004
deceb3ec 50052008-08-17 Robert Millan <rmh@aybabtu.com>
5006
5007 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5008
5009 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5010 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5011 (grub_machine_mmap_iterate): New function declaration.
5012 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5013 structure.
5014 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5015 macros.
5016
5017 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5018 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5019 Move e820 parsing from here ...
5020 * kern/i386/pc/mmap.c: New file.
5021 (grub_machine_mmap_iterate): ... to here.
5022
5023 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5024 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5025 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5026 (grub_available_iterate): Redeclare to return `void', and redeclare
5027 its hook to use grub_uint64_t as addr and size parameters, and rename
5028 to ...
5029 (grub_machine_mmap_iterate): ... this. Update all users.
5030
5031 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5032 to make it more readable. Rename to ...
5033 (grub_machine_mmap_iterate): ... this.
5034
5035 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5036 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5037 (grub_multiboot): Allocate an extra region after the payload, and fill
5038 it with a Multiboot memory map. Adjust a.out loader to calculate size
5039 with the extra space.
5040 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5041 with the extra space.
5042
f8aa0f43 50432008-08-17 Carles Pina i Estany <carles@pina.cat>
5044
9807deb9 5045 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 5046
605f5bb6 50472008-08-17 Felix Zielcke <fzielcke@z-51.de>
5048
5049 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5050 mdate-sh to the list `find' searches for.
5051 * DISTLIST: Regenerated.
5052
210db6c6 50532008-08-16 Felix Zielcke <fzielcke@z-51.de>
5054
5055 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5056 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 5057 genmoddep.awk, gensymlist.sh.in.
5058 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 5059 * DISTLIST: Regenerated.
48cdbfd4 5060 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 5061
1082b929 50622008-08-16 Robert Millan <rmh@aybabtu.com>
5063
5064 * disk/raid.c (grub_raid_init): Handle/report errors set by
5065 grub_device_iterate().
5066 * disk/lvm.c (grub_lvm_init): Likewise.
5067
42ce5170 50682008-08-15 Bean <bean123ch@gmail.com>
5069
5070 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5071 and datehook.mod.
5072 (datetime_mod_SOURCES): New macro.
5073 (datetime_mod_CFLAGS): Likewise.
5074 (datetime_mod_LDFLAGS): Likewise.
5075 (date_mod_SOURCES): Likewise.
5076 (date_mod_CFLAGS): Likewise.
5077 (date_mod_LDFLAGS): Likewise.
5078 (datehook_mod_SOURCES): Likewise.
5079 (datehook_mod_CFLAGS): Likewise.
5080 (datehook_mod_LDFLAGS): Likewise.
5081
5082 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5083 and datehook.mod.
5084 (datetime_mod_SOURCES): New macro.
5085 (datetime_mod_CFLAGS): Likewise.
5086 (datetime_mod_LDFLAGS): Likewise.
5087 (date_mod_SOURCES): Likewise.
5088 (date_mod_CFLAGS): Likewise.
5089 (date_mod_LDFLAGS): Likewise.
5090 (datehook_mod_SOURCES): Likewise.
5091 (datehook_mod_CFLAGS): Likewise.
5092 (datehook_mod_LDFLAGS): Likewise.
5093
5094 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5095 and datehook.mod.
5096 (datetime_mod_SOURCES): New macro.
5097 (datetime_mod_CFLAGS): Likewise.
5098 (datetime_mod_LDFLAGS): Likewise.
5099 (date_mod_SOURCES): Likewise.
5100 (date_mod_CFLAGS): Likewise.
5101 (date_mod_LDFLAGS): Likewise.
5102 (datehook_mod_SOURCES): Likewise.
5103 (datehook_mod_CFLAGS): Likewise.
5104 (datehook_mod_LDFLAGS): Likewise.
5105
5106 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5107 and datehook.mod.
5108 (datetime_mod_SOURCES): New macro.
5109 (datetime_mod_CFLAGS): Likewise.
5110 (datetime_mod_LDFLAGS): Likewise.
5111 (date_mod_SOURCES): Likewise.
5112 (date_mod_CFLAGS): Likewise.
5113 (date_mod_LDFLAGS): Likewise.
5114 (datehook_mod_SOURCES): Likewise.
5115 (datehook_mod_CFLAGS): Likewise.
5116 (datehook_mod_LDFLAGS): Likewise.
5117
5118 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5119 and datehook.mod.
5120 (datetime_mod_SOURCES): New macro.
5121 (datetime_mod_CFLAGS): Likewise.
5122 (datetime_mod_LDFLAGS): Likewise.
5123 (date_mod_SOURCES): Likewise.
5124 (date_mod_CFLAGS): Likewise.
5125 (date_mod_LDFLAGS): Likewise.
5126 (datehook_mod_SOURCES): Likewise.
5127 (datehook_mod_CFLAGS): Likewise.
5128 (datehook_mod_LDFLAGS): Likewise.
5129
5130 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5131
5132 * commands/date.c: New file.
5133
5134 * hook/datehook.c: Likewise.
5135
5136 * include/grub/lib/datetime.h: Likewise.
5137
5138 * include/grub/i386/cmos.h: Likewise.
5139
5140 * lib/datetime.c: Likewise.
5141
5142 * lib/i386/datetime.c: Likewise.
5143
5144 * lib/efi/datetime.c: Likewise.
5145
0e9242da 51462008-08-14 Robert Millan <rmh@aybabtu.com>
5147
5148 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5149 (grub_mkelfimage_SOURCES): New variable.
5150 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5151
5152 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5153 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5154 * conf/powerpc-ieee1275.rmk: Likewise.
5155 * conf/i386-ieee1275.rmk: Likewise.
5156
5157 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5158 * kern/i386/coreboot/init.c: Likewise.
5159
5160 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5161 with `<grub/cpu/kernel.h>'.
5162 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5163 to ...
5164 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5165 * kern/i386/coreboot/startup.S: Likewise.
5166
5167 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5168 (GRUB_MOD_GAP): Remove.
5169 * include/grub/powerpc/kernel.h: New file.
5170 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5171 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5172 * include/grub/i386/kernel.h: New file.
5173 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5174 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5175 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5176
5177 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5178 `grub-mkelfimage'.
5179 Use --directory when invoking grub_mkimage.
5180
5181 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5182 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5183 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5184 and GRUB_KERNEL_CPU_PREFIX.
5185
b86408f8 51862008-08-14 Felix Zielcke <fzielcke@z-51.de>
5187
d5e619ca 5188 * include/grub/err.h (grub_err_printf): New function prototype.
5189 * util/misc.c (grub_err_printf): New function.
5190 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5191 grub_printf.
5192 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 5193
7161f0e0 51942008-08-13 Robert Millan <rmh@aybabtu.com>
5195
5196 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5197
a1967522 51982008-08-13 Robert Millan <rmh@aybabtu.com>
5199
5200 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5201 boot entry.
5202
371458b5 52032008-08-12 Robert Millan <rmh@aybabtu.com>
5204
5205 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5206 of the relocation code from here ...
5207 (grub_multiboot): ... to here.
5208 (forward_relocator, backward_relocator): Move from here ...
5209 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5210 (grub_multiboot_backward_relocator): ... to here.
5211 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5212 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5213 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5214 (grub_multiboot_forward_relocator_end)
5215 (grub_multiboot_backward_relocator)
5216 (grub_multiboot_backward_relocator_end): New variables.
5217
05f9452b 52182008-08-12 Bean <bean123ch@gmail.com>
5219
5220 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5221
20024ab0 52222008-08-11 Robert Millan <rmh@aybabtu.com>
5223
5224 * kern/i386/linuxbios/startup.S: Move from here ...
5225 * kern/i386/coreboot/startup.S: ... to here.
5226
5227 * kern/i386/linuxbios/init.c: Move from here ...
5228 * kern/i386/coreboot/init.c: ... to here.
5229
5230 * kern/i386/linuxbios/table.c: Move from here ...
5231 * kern/i386/coreboot/mmap.c: ... to here.
5232
5233 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5234
e352e9cd 52352008-08-11 Robert Millan <rmh@aybabtu.com>
5236
5237 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5238 errors. Leave it to the upper layer to handle them.
5239
2d05bc6a 52402008-08-09 Christian Franke <franke@computer.org>
5241
5242 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5243 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5244 Install `grub.d/10_windows' only on Cygwin.
5245 * configure.ac: Add subst of `target_os'.
5246 Check `target_os' also before setting TARGET_OBJ2ELF.
5247 Add `--enable-grub-pe2elf'.
5248
042bd419 52492008-08-08 Robert Millan <rmh@aybabtu.com>
5250
5251 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5252 (grub_last_time): Change type to grub_uint64_t.
5253 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5254 (grub_disk_close): Likewise.
5255
5256 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5257 (run_menu): Migrate code from to using grub_get_time_ms().
5258
5259 * util/misc.c (grub_get_time_ms): New function.
5260
7f280db5 52612008-08-08 Marco Gerards <marco@gnu.org>
5262
5263 * disk/ata.c (grub_ata_regget): Change return type to
5264 `grub_uint8_t'.
5265 (grub_ata_regget2): Likewise.
5266 (grub_ata_wait_status): New function.
5267 (grub_ata_wait_busy): Removed function, updated all users to use
5268 `grub_ata_wait_status'.
5269 (grub_ata_wait_drq): Likewise.
5270 (grub_ata_cmd): New function.
5271 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5272 error handling.
5273 (grub_ata_pio_write): Add error handling.
5274 (grub_atapi_identify): Likewise.
5275 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5276 handling.
5277 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5278 handling. Actually use the detected registers. Reorder the
5279 detection logic such that it is easier to read.
5280 (grub_ata_pciinit): Do not assign the same ID to each controller.
5281 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5282 handling.
5283 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5284
5285 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5286
1fbc5e66 52872008-08-08 Marco Gerards <marco@gnu.org>
5288
5289 * NEWS: Update.
5290
819ce6c0 52912008-08-07 Bean <bean123ch@gmail.com>
5292
5293 * include/grub/x86_64/pci.h: New file.
5294
5c41d44d 52952008-08-07 Christian Franke <franke@computer.org>
5296
5297 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5298 (TIMER2_GATE): Likewise.
5299 (grub_pit_wait): Add enable/disable of the timer2 gate
5300 bit of port 0x61. This fixes a possible infinite loop.
5301
5ebc275d 53022008-08-07 Bean <bean123ch@gmail.com>
5303
5304 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5305 kern/i386/tsc.c and kern/i386/pit.c.
5306
5307 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5308 x86_64 platform.
5309
5310 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5311 <grub/i386/tsc.h>.
5312
5313 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5314
e383b3d0 53152008-08-07 Bean <bean123ch@gmail.com>
5316
5317 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5318
5319 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5320
5321 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5322 multiple inclusion. Add #include <grub/types.h>.
5323
1cbb58ac 53242008-08-06 Christian Franke <franke@computer.org>
5325
5326 * conf/common.rmk: Build and install `10_windows'.
5327 * util/grub.d/10_windows.in: New script.
5328
337f5a1e 53292008-08-06 Pavel Roskin <proski@gnu.org>
5330
5331 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5332
057bc4ac 53332008-08-06 Robert Millan <rmh@aybabtu.com>
5334
5335 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5336 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5337
2b99f123 53382008-08-06 Bean <bean123ch@gmail.com>
5339
5340 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5341 (grub_pxefs_fs_int): Remove dummy definition.
5342 (grub_pxefs_open): Use data->block_size to store the current block
5343 size setting.
5344 (grub_pxefs_read): Use block size stored in data->block_size. As the
5345 value of grub_pxe_blksize can be changed after the file is opened.
5346
9f0234cb 53472008-08-06 Bean <bean123ch@gmail.com>
5348
5349 * fs/i386/pc/pxe.c (curr_file): new variable.
5350 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5351 require the dummy internal file system anymore.
5352 (grub_pxefs_read): Removed.
5353 (grub_pxefs_close): Likewise.
5354 (grub_pxefs_fs_int): Likewise.
5355 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5356 connection when we switch file.
5357 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5358
a55d42e0 53592008-08-06 Robert Millan <rmh@aybabtu.com>
5360
5361 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5362 `halt.mod'.
5363 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5364 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5365
5366 * kern/i386/halt.c: New file.
5367 * kern/i386/reboot.c: Likewise.
5368 * include/grub/i386/reboot.h: Likewise.
5369 * include/grub/i386/halt.h: Likewise.
5370
5371 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5372 Include `<grub/cpu/halt.h>'.
5373 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5374 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5375
5376 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5377 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5378 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5379 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5380 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5381 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5382 from here ...
5383 * include/grub/i386/at_keyboard.h: ... to here.
5384
24371d26 53852008-08-05 Robert Millan <rmh@aybabtu.com>
5386
5387 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5388 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5389 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5390 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5391 `kern/generic/millisleep.c'.
5392
5393 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5394 instead of grub_get_rtc().
5395 (grub_tsc_init): Initialize `tsc_boot_time'.
5396
5397 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5398 (grub_machine_init): Use grub_tsc_init() rather than
5399 installing an RTC-based handler via grub_install_get_time_ms().
5400
5401 * kern/i386/pit.c: New file.
5402 * include/grub/i386/pit.h: Likewise.
5403
9e7007b3 54042008-08-05 Bean <bean123ch@gmail.com>
5405
5406 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5407
5408 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5409 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5410 (pxe_mod_SOURCES): New macro.
5411 (pxe_mod_CFLAGS): Likewise.
5412 (pxe_mod_LDFLAGS): Likewise.
5413 (pxecmd_mod_SOURCES): Likewise.
5414 (pxecmd_mod_CFLAGS): Likewise.
5415 (pxecmd_mod_LDFLAGS): Likewise.
5416
5417 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5418 (grub_pxe_call): Likewise.
5419
5420 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5421
5422 * commands/i386/pc/pxecmd.c: New file.
5423
9f0234cb 5424 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 5425
5426 * include/grub/i386/pc/pxe.h: Likewise.
5427
6977d49f 54282008-08-05 Bean <bean123ch@gmail.com>
5429
5430 * util/console.c (grub_console_cur_color): New variable.
5431 (grub_console_standard_color): Likewise.
5432 (grub_console_normal_color): Likewise.
5433 (grub_console_highlight_color): Likewise.
5434 (color_map): Likewise.
5435 (use_color): Likewise.
5436 (NUM_COLORS): New macro.
5437 (grub_ncurses_setcolorstate): Handle color properly.
5438 (grub_ncurses_setcolor): Don't change color here, just remember the
5439 settings, color will be set in grub_ncurses_setcolorstate.
5440 (grub_ncurses_getcolor): New function.
5441 (grub_ncurses_init): Initialize color pairs.
5442 (grub_ncurses_term): New member grub_ncurses_getcolor.
5443
9c2ff3ee 54442008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 5445
9c2ff3ee 5446 High resolution timer support. Implemented for x86 CPUs using TSC.
5447 Extracted generic grub_millisleep() so it's linked in only as needed.
5448 This requires a Pentium compatible CPU; if the RDTSC instruction is
5449 not supported, then it falls back on the generic grub_get_time_ms()
5450 implementation that uses the machine's RTC.
5451
5452 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5453 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5454 `kern/generic/millisleep.c'.
5455
5456 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5457 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5458
5459 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5460 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5461
5462 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5463
5464 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5465 `kern/generic/millisleep.c'.
5466
5467 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5468
5469 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5470
5471 * kern/generic/rtc_get_time_ms.c: New file.
5472
5473 * kern/generic/millisleep.c: New file.
337f5a1e 5474
9c2ff3ee 5475 * kern/misc.c: Don't include
5476 <kern/time.h> anymore.
5477 (grub_millisleep_generic): Removed.
5478
5479 * commands/sleep.c (grub_interruptible_millisleep): Uses
5480 grub_get_time_ms() instead of grub_get_rtc().
5481
5482 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5483 function.
5484 (grub_cpu_is_cpuid_supported): New inline function.
5485 (grub_cpu_is_tsc_supported): New inline function.
5486 (grub_tsc_init): New function prototype.
5487 (grub_tsc_get_time_ms): New function prototype.
5488
5489 * kern/i386/tsc.c (grub_get_time_ms): New file.
5490
5491 * include/grub/time.h: Include <grub/types.h.
5492 (grub_millisleep_generic): Removed.
5493 (grub_get_time_ms): New prototype.
5494 (grub_install_get_time_ms): New prototype.
5495 (grub_rtc_get_time_ms): New prototype.
5496
5497 * kern/time.c (grub_get_time_ms): New function.
5498 (grub_install_get_time_ms): New function.
5499
5500 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5501 <grub/time.h> anymore.
5502 (grub_millisleep): Removed.
5503 (grub_machine_init): Call grub_tsc_init.
5504
5505 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5506 get_time_ms() implementation.
5507
5508 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5509 (ieee1275_get_time_ms): New function.
5510 (grub_machine_init): Install get_time_ms() implementation.
5511
5512 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5513 (grub_machine_init): Call grub_tsc_init().
5514 (grub_millisleep): Removed.
bf06a93f 5515
9c2ff3ee 5516 * kern/ieee1275/init.c (grub_millisleep): Removed.
5517 (grub_machine_init): Install ieee1275_get_time_ms()
5518 implementation.
5519 (ieee1275_get_time_ms): New function.
5520 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5521 real work.
5522
9ec92aaf 55232008-08-05 Marco Gerards <marco@gnu.org>
5524
5525 * disk/ata.c: Include <grub/pci.h>.
5526 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5527 (grub_ata_initialize): Rewritten.
5528 (grub_ata_device_initialize): New function.
5529
8d23f507 55302008-08-04 Pavel Roskin <proski@gnu.org>
5531
5532 * kern/main.c: Include grub/mm.h.
5533
5e15ee3d 55342008-08-04 Robert Millan <rmh@aybabtu.com>
5535
5536 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5537 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5538 corruption problem).
5539
a9053f8f 55402008-08-04 Robert Millan <rmh@aybabtu.com>
5541
5542 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5543 warnings introduced in my last commit.
5544
dd19c7d7 55452008-08-03 Robert Millan <rmh@aybabtu.com>
5546
5547 Make PCI available on all i386 architectures.
5548
5549 * include/grub/i386/pc/pci.h: Move from here ...
5550 * include/grub/i386/pci.h: ... to here.
5551
5552 * include/grub/i386/pc/pci.h: Remove.
5553 * include/grub/i386/efi/pci.h: Remove.
5554 * include/grub/x86_64/efi/pci.h: Remove.
5555
5556 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5557 `<grub/cpu/pci.h>'.
5558
5559 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5560 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5561 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5562
5563 * conf/i386-ieee1275.rmk: Likewise.
5564
e14a6184 55652008-08-03 Robert Millan <rmh@aybabtu.com>
5566
5567 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5568 (grub_console_setcursor): Make it possible to set cursor off.
5569
52768e37 55702008-08-03 Robert Millan <rmh@aybabtu.com>
5571
5572 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5573 of modules instead of assuming which platform provides what.
5574 * util/update-grub.in: Likewise.
5575
2d52f57f 55762008-08-03 Robert Millan <rmh@aybabtu.com>
5577
5578 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5579 instead of `grub_install_dos_part' to determine whether a drive needs
5580 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 5581 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 5582
2a5cd121 55832008-08-02 Robert Millan <rmh@aybabtu.com>
5584
5585 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5586
93808428 55872008-08-02 Robert Millan <rmh@aybabtu.com>
5588
5589 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5590 of informational grub_dprintf() calls.
5591
3bd0a12a 55922008-08-02 Robert Millan <rmh@aybabtu.com>
5593
5594 * disk/memdisk.c (memdisk_size): Don't initialize.
5595 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5596
5597 * include/grub/i386/pc/kernel.h
5598 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5599 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5600 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5601 (grub_arch_memdisk_size): Remove.
5602
5603 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5604 field (was only used to transfer a constant). Add `type' field to
5605 support multiple module types.
5606 (grub_module_iterate): New function.
5607
5608 * kern/device.c (grub_device_open): Do not hide error messages
5609 when grub_disk_open() fails. Use grub_print_error() instead.
5610
5611 * kern/i386/pc/init.c (grub_arch_modules_addr)
5612 (grub_arch_memdisk_size): Remove functions.
5613 (grub_arch_modules_addr): Return the module address in high memory
5614 (now that it isn't copied anymore).
5615
5616 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5617 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5618 decompression routine (grub_total_module_size already includes that
5619 now). Don't copy modules back to low memory.
5620
5621 * kern/main.c: Include `<grub/mm.h>'.
5622 (grub_load_modules): Split out (and use) ...
5623 (grub_module_iterate): ... this function, which iterates through
5624 module objects and runs a hook.
5625 Comment out grub_mm_init_region() call, as it would cause non-ELF
5626 modules to be overwritten.
5627
5628 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5629 the memdisk image in its own region, make it part of the module list.
5630 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5631 (main): Parse --memdisk|-m option, and pass user-provided path as
5632 parameter to generate_image().
5633 (add_segments): Pass `memdisk_path' down to load_modules().
5634 (load_modules): Embed memdisk image in module section when requested.
5635 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5636 `header.type' instead of `header.offset'.
5637
5638 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5639 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5640 (memdisk_mod_LDFLAGS): New variables.
5641 * conf/i386-coreboot.rmk: Likewise.
5642 * conf/i386-ieee1275.rmk: Likewise.
5643
a927cc73 56442008-08-02 Robert Millan <rmh@aybabtu.com>
5645
5646 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5647 (backward_relocator): New variables. Used to allocate and relocate
5648 the payload, respectively.
5649 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 5650 address, install the appropriate relocator code in each bound of
a927cc73 5651 the payload, and set the entry point such that
5652 grub_multiboot_real_boot() will jump to one of them.
5653
5654 * kern/i386/loader.S (grub_multiboot_payload_size)
5655 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5656 (grub_multiboot_payload_entry_offset): New variables.
5657 (grub_multiboot_real_boot): Set cpu context to what the relocator
5658 expects, and jump to the relocator instead of the payload.
5659
5660 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5661 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5662 (grub_multiboot_payload_entry_offset): Export.
5663
b15d8a0c 56642008-08-01 Bean <bean123ch@gmail.com>
5665
5666 * normal/menu_entry.c (editor_getline): Don't return the original
5667 string as result, as it will be released by lexer once it has done
5668 using it.
5669
cdfb3d22 56702008-08-01 Robert Millan <rmh@aybabtu.com>
5671
5672 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5673 within menuentries, not before them.
5674 util/grub.d/10_hurd.in: Likewise.
5675
9175e93d 56762008-08-01 Bean <bean123ch@gmail.com>
5677
5678 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5679 (bufio_mod_SOURCES): New macro.
5680 (bufio_mod_CFLAGS): Likewise.
5681 (bufio_mod_LDFLAGS): Likewise.
5682
5683 * include/grub/bufio.h: New file.
5684
5685 * io/bufio.c: Likewise.
5686
5687 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5688 (grub_video_reader_png): Use grub_buffile_open to open file.
5689
5690 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5691 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5692
5693 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5694 (grub_video_reader_tga): Use grub_buffile_open to open file.
5695
5696 * font/manager.c: Include <grub/bufio.h>.
5697 (add_font): Use grub_buffile_open to open file.
5698
3d8383e7 56992008-07-31 Robert Millan <rmh@aybabtu.com>
5700
5701 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5702 ELF segments, use a macro for arbitrarily accessing any of them instead
5703 of preparing a pointer that allows access to one at a time.
5704 (grub_multiboot_load_elf64): Likewise.
5705
16e641b6 57062008-07-31 Bean <bean123ch@gmail.com>
5707
5708 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5709 GRUB_KERNEL_MACHINE_DATA_END.
5710
59198b72 57112008-07-30 Robert Millan <rmh@aybabtu.com>
5712
5713 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5714 Increase from 0x50 to 0x60.
5715 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5716 use UUIDs to identify the root drive for them. If that's not
5717 possible, abort.
5718 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5719 check, for cross-disk installs.
5720
ae88bca3 57212008-07-30 Robert Millan <rmh@aybabtu.com>
5722
5723 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5724 is non-empty, use it to set the `prefix' environment variable instead
5725 of the usual approach.
5726 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5727 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5728 environment variable instead of dummy make_install_device().
5729
5730 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5731 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 5732 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 5733
5734 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5735 New variable reference.
5736 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5737 New macro. Defines offset of `grub_prefix' within startup.S (relative
5738 to `start').
5739 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5740 section within startup.S (relative to `start').
5741 * include/grub/i386/coreboot/kernel.h: Likewise.
5742
5743 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5744 Overwrite grub_prefix with its contents, at the beginning of the
5745 first segment.
5746 (main): Understand -p|--prefix.
5747
14f41dd1 57482008-07-30 Robert Millan <rmh@aybabtu.com>
5749
5750 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5751
4ca049a3 57522008-07-30 Robert Millan <rmh@aybabtu.com>
5753
5754 * term/i386/pc/vga_text.c (grub_console_cls): Use
5755 grub_console_gotoxy() to go back to beginning of the screen.
5756 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5757
2921d337 57582008-07-29 Christian Franke <franke@computer.org>
5759
5760 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5761 Add conversion of emulated mount points on Cygwin.
5762
b609876d 57632008-07-29 Christian Franke <franke@computer.org>
5764
5765 * util/update-grub.in: Add a check for admin
5766 group on Cygwin.
5767 Remove old `grub.cfg.new' before creation.
5768 Add `-f' to `mv' to handle the different filesystem
5769 semantics of Windows.
5770
e93e4679 57712008-07-29 Bean <bean123ch@gmail.com>
5772
5773 * normal/main.c (get_line): Fix buffer overflow bug.
5774
41694fd0 57752008-07-28 Robert Millan <rmh@aybabtu.com>
5776
5777 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5778 (struct grub_apple_header): New struct. Describes the layout of
5779 the partmap header.
5780 (apple_partition_map_iterate): Check the header magic as well as the
5781 partition magic (which was already being checked).
5782
cfd0b4e6 57832008-07-28 Pavel Roskin <proski@gnu.org>
5784
5785 * genmk.rb: Add a warning to the beginning of the output that
5786 it's a generated file and should not be edited.
5787
93cce016 57882008-07-28 Robert Millan <rmh@aybabtu.com>
5789
5790 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5791 with the same number are found, just use issue a warning with
5792 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 5793
cd1df915 57942008-07-27 Robert Millan <rmh@aybabtu.com>
5795
5796 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5797 information.
5798
b70a8427 57992008-07-27 Bean <bean123ch@gmail.com>
5800
5801 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5802 (grub_fat_find_dir): Ignore case when comparing filename.
5803
8f5e379f 58042008-07-27 Bean <bean123ch@gmail.com>
5805
5806 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5807 smallino, as it's more descriptive, and i8count can be confused with
5808 the other field count.
5809 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5810 inode type.
5811
a85cd5a0 58122008-07-27 Bean <bean123ch@gmail.com>
5813
5814 * commands/crc.c: New file.
5815
5816 * lib/crc.c: Likewise.
5817
5818 * include/grub/lib/crc.h: Likewise.
5819
5820 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5821
5822 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5823 (hexdump): Move this function to ...
5824
5825 * lib/hexdump.c: ... here.
5826
5827 * include/grub/hexdump.h: Renamed to ...
5828
5829 * include/grub/lib/hexdump.h: ... this.
5830
5831 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5832
5833 * util/grub-editenv.c: Likewise.
5834
5835 * include/envblk.h: Renamed to ...
5836
5837 * include/lib/envblk.h: ... this.
5838
5839 * util/envblk.c: Renamed to ...
5840
5841 * lib/envblk.c: ... this.
5842
5843 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5844 lib/hexdump.c.
5845 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5846 (pkglib_MODULES): Add crc.mod.
5847 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5848 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5849 (crc_mod_SOURCES): New macro.
5850 (crc_mod_CFLAGS): Likewise.
5851 (crc_mod_LDFLAGS): Likewise.
5852
5853 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5854
5855 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5856
5857 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5858
5859 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5860
5861 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5862
c298def0 58632008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 5864
5865 * commands/help.c: Include <grub/term.h>.
5866 (TERM_WIDTH): Removed. Updated all users.
5867
cc349fb3 58682008-07-27 Pavel Roskin <proski@gnu.org>
5869
5870 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5871 spurious warnings about a comment within a comment.
5872
9051607e 58732008-07-25 Robert Millan <rmh@aybabtu.com>
5874
5875 * util/getroot.c (find_root_device): Skip devices that match
5876 /dev/dm-[0-9]. This lets the real device be found for any type of
5877 abstraction (LVM, EVMS, RAID..).
5878 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5879 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5880 device is found first, find_root_device() will now skip it.
5881
01453bfc 58822008-07-24 Pavel Roskin <proski@gnu.org>
5883
5884 * include/grub/types.h: Use __builtin_bswap32() and
5885 __builtin_bswap64() with gcc 4.3 and newer.
5886
6af9849f 58872008-07-24 Christian Franke <franke@computer.org>
5888
3a0fa256 5889 * util/i386/pc/grub-install.in: If `--debug' is specified,
5890 pass `--verbose' to grub-setup.
5891 Abort script if make_system_path_relative_to_its_root() fails.
5892
7810e747 58932008-07-24 Bean <bean123ch@gmail.com>
5894
5895 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5896 variable `target_platform' should be `platform'.
5897
42290e17 58982008-07-24 Bean <bean123ch@gmail.com>
5899
51cc5193 5900 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 5901 (grub_png_init_fixed_block): New function.
5902 (grub_png_decode_image_data): Handle fixed huffman code compression.
5903
2a8a80e4 59042008-07-24 Bean <bean123ch@gmail.com>
5905
5906 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5907 (grub_pe2elf_SOURCES): New macro.
5908 (CLEANFILES): Add grub-pe2elf.
5909
5910 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5911 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5912 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5913 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5914 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5915 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5916 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5917 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5918 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5919 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5920 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5921 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5922 (GRUB_PE32_DT_FUNCTION): Likewise.
5923 (GRUB_PE32_REL_I386_DIR32): Likewise.
5924 (GRUB_PE32_REL_I386_REL32): Likewise.
5925 (grub_pe32_symbol): New structure.
5926 (grub_pe32_reloc): Likewise.
5927
5928 * util/grub-pe2elf.c: New file.
5929
5930 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5931 start symbol in non pc platform.
5932
5933 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5934
5935 The following patches are from Christian Franke.
5936
5937 * include/grub/dl.h: Remove .previous, gas supports this only
5938 for ELF format.
5939
5940 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5941 Remove .type, gas supports this only for ELF format.
5942
5943 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5944 nullbytes in symbol table. This fixes an infinite loop if table is
5945 zero filled.
5946
5947 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5948 TARGET_IMG_LDFLAGS and EXEEXT.
5949
5950 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5951 TARGET_IMG_LDFLAGS_AC.
5952 (grub_CHECK_STACK_ARG_PROBE): New function.
5953
5954 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5955
5956 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5957
5958 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5959 to set TARGET_IMG_LD* accordingly.
5960 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5961 Add call to grub_CHECK_STACK_ARG_PROBE.
5962 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5963
5964 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5965
5966 * genmk.rb: Add EXEEXT to CLEANFILES.
5967
12ccdb75 59682008-07-23 Robert Millan <rmh@aybabtu.com>
5969
5970 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5971 define the codes for arrows and lines used for the menu).
5972 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5973 as well.
5974
5975 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5976 fonts, because the latter are too slow.
5977
18eeaf04 59782008-07-21 Bean <bean123ch@gmail.com>
5979
5980 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5981 a20. Run keyboard test last, as it will cause macbook to halt.
5982
b095e2ad 59832008-07-18 Pavel Roskin <proski@gnu.org>
5984
5985 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5986 load foreign architecture modules correctly anyway. Keep
5987 support for loading host architecture modules, whether we
5988 compile them or not.
5989
737feb35 59902008-07-17 Pavel Roskin <proski@gnu.org>
5991
3f4ce737 5992 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5993 change target_cpu. The compiler default can mismatch target_cpu
5994 in any case.
5995
4ad2d049 5996 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5997 * kern/efi/efi.c: Likewise.
5998
f6130a12 5999 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6000 target compiler is functional.
6001 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6002 are set up.
6003
58393a2d 6004 * configure.ac: Default to efi platform for x86_64-apple. Allow
6005 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6006 adjustments from the rest, only do them if target is not
6007 explicitly given. Merge other adjustments with the final sanity
6008 check. Remove an extraneous check for supported CPU. Be
6009 specific which CPU and which platform is not supported.
6010
737feb35 6011 * configure.ac: Default to pc platform for x86_64.
6012
546f966a 60132008-07-17 Robert Millan <rmh@aybabtu.com>
6014
6015 Partial LinuxBIOS -> Coreboot rename.
6016
6017 * conf/i386-linuxbios.rmk: Renamed to ...
6018 * conf/i386-coreboot.rmk: ... this.
6019 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6020 * configure.ac: Accept "coreboot" as input platform (but maintain
6021 compatibility with "linuxbios").
6022 * include/grub/i386/linuxbios: Renamed to ...
6023 * include/grub/i386/coreboot: ... this.
6024
20011694 60252008-07-17 Bean <bean123ch@gmail.com>
6026
6027 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 6028 (appleldr_mod_SOURCE): New variable.
20011694 6029 (appleldr_mod_CFLAGS): Likewise.
6030 (appleldr_mod_LDFLAGS): Likewise.
6031 (pci_mod_SOURCES): Likewise.
6032 (pci_mod_CFLAGS): Likewise.
6033 (pci_mod_LDFLAGS): Likewise.
6034 (lspci_mod_SOURCES): Likewise.
6035 (lspci_mod_CFLAGS): Likewise.
6036 (lspci_mod_LDFLAGS): Likewise.
6037
6038 * conf/x86_64-efi.rmk: New file.
6039
6040 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6041 macro.
6042 (grub_efidisk_write): Likewise.
6043
6044 * include/efi/api.h (efi_call_0): New macro.
6045 (efi_call_1): Likewise.
6046 (efi_call_2): Likewise.
6047 (efi_call_3): Likewise.
6048 (efi_call_4): Likewise.
6049 (efi_call_5): Likewise.
6050 (efi_call_6): Likewise.
6051
6052 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6053 grub_rescue_cmd_chainloader.
6054
6055 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6056 (grub_pe32_optional_header): Change some fields based on i386 or
6057 x86_64 platform.
6058 (GRUB_PE32_PE32_MAGIC): Likewise.
6059
6060 * include/grub/efi/uga_draw.h: New file.
6061
6062 * include/grub/elf.h (STN_ABS): New constant.
6063 (R_X86_64_NONE): Relocation constant for x86_64.
6064 (R_X86_64_64): Likewise.
6065 (R_X86_64_PC32): Likewise.
6066 (R_X86_64_GOT32): Likewise.
6067 (R_X86_64_PLT32): Likewise.
6068 (R_X86_64_COPY): Likewise.
6069 (R_X86_64_GLOB_DAT): Likewise.
6070 (R_X86_64_JUMP_SLOT): Likewise.
6071 (R_X86_64_RELATIVE): Likewise.
6072 (R_X86_64_GOTPCREL): Likewise.
6073 (R_X86_64_32): Likewise.
6074 (R_X86_64_32S): Likewise.
6075 (R_X86_64_16): Likewise.
6076 (R_X86_64_PC16): Likewise.
6077 (R_X86_64_8): Likewise.
6078 (R_X86_64_PC8): Likewise.
6079
6080 * include/grub/i386/efi/pci.h: New file.
6081
6082 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6083 Change it value based on platform.
6084 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6085 (GRUB_E820_RAM): Likewise.
6086 (GRUB_E820_RESERVED): Likewise.
6087 (GRUB_E820_ACPI): Likewise.
6088 (GRUB_E820_NVS): Likewise.
6089 (GRUB_E820_EXEC_CODE): Likewise.
6090 (GRUB_E820_MAX_ENTRY): Likewise.
6091 (grub_e820_mmap): New structure.
6092 (linux_kernel_header): Change the efi field according to different
6093 kernel version, also field from linux_kernel_header.
6094
6095 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6096
6097 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6098 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6099 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6100 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6101 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6102 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6103 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6104 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6105 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6106 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6107
6108 * include/grub/x86_64/efi/kernel.h: New file.
6109
6110 * include/grub/x86_64/efi/loader.h: Likewise.
6111
6112 * include/grub/x86_64/efi/machine.h: Likewise.
6113
6114 * include/grub/x86_64/efi/pci.h: Likewise.
6115
6116 * include/grub/x86_64/efi/time.h: Likewise.
6117
6118 * include/grub/x86_64/linux.h: Likewise.
6119
6120 * include/grub/x86_64/setjmp.h: Likewise.
6121
6122 * include/grub/x86_64/time.h: Likewise.
6123
6124 * include/grub/x86_64/types.h: Likewise.
6125
6126 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6127 GRUB_TARGET_SIZEOF_VOID_P.
6128
6129 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6130 (grub_efi_locate_handle): Likewise.
6131 (grub_efi_open_protocol): Likewise.
6132 (grub_efi_set_text_mode): Likewise.
6133 (grub_efi_stall): Likewise.
6134 (grub_exit): Likewise.
6135 (grub_reboot): Likewise.
6136 (grub_halt): Likewise.
6137 (grub_efi_exit_boot_services): Likewise.
6138 (grub_get_rtc): Likewise.
6139
6140 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6141 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6142 (grub_efi_allocate_pages): Wrap efi calls.
6143 (grub_efi_free_pages): Wrap efi calls.
6144 (grub_efi_get_memory_map): Wrap efi calls.
6145
6146 * kern/x86_64/dl.c: New file.
6147
6148 * kern/x86_64/efi/callwrap.S: Likewise.
6149
6150 * kern/x86_64/efi/startup.S: Likewise.
6151
6152 * loader/efi/appleloader.c: Likewise.
6153
6154 * loader/efi/chainloader.c (cmdline): New variable.
6155 (grub_chainloader_unload): Wrap efi calls.
6156 (grub_chainloader_boot): Likewise.
6157 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6158 command line.
6159
6160 * loader/efi/chainloader_normal.c (chainloader_command):
6161 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6162 command line.
6163
6164 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6165 method.
6166 (grub_e820_add_region): New function.
6167 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6168 booting.
6169 (grub_find_video_card): New function.
6170 (grub_linux_setup_video): New function.
6171 (grub_rescue_cmd_linux): Probe for video information.
6172
6173 * normal/x86_64/setjmp.S: New file.
6174
6175 * term/efi/console.c (map_char): New function.
6176 (grub_console_putchar): Map unicode char.
6177 (grub_console_checkkey): Wrap efi calls.
6178 (grub_console_getkey): Likewise.
6179 (grub_console_getwh): Likewise.
6180 (grub_console_gotoxy): Likewise.
6181 (grub_console_cls): Likewise.
6182 (grub_console_setcolorstate): Likewise.
6183 (grub_console_setcursor): Likewise.
6184
6185 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6186
59652a20 61872008-07-16 Pavel Roskin <proski@gnu.org>
6188
ef294055 6189 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6190 format strings.
6191
59652a20 6192 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6193 pointer, not an integer. This fixes a warning and prevents
6194 precision loss on 64-bit systems.
6195 (relocate_addresses): Remove unneeded cast.
6196
afc3b5d7 61972008-07-15 Pavel Roskin <proski@gnu.org>
6198
506b2b3e 6199 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6200
62ead89c 6201 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6202
c4cd51d7 6203 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6204 Fix comparison between signed and unsigned.
6205
0d3d8f28 6206 * include/grub/i386/ieee1275/console.h: Declare
6207 grub_console_init() and grub_console_fini().
6208
8804b286 6209 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6210 It's empty and unused.
6211
ee01cf35 6212 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6213 beginning to avoid warnings with some compilers.
6214
afc3b5d7 6215 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6216 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6217
e4e8eaa5 62182008-07-14 Pavel Roskin <proski@gnu.org>
6219
407aceb4 6220 * kern/env.c (grub_register_variable_hook): Don't copy empty
6221 string, it leaks memory. Pass "" to grub_env_set(), it should
6222 handle constant strings.
6223
e4e8eaa5 6224 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6225 * commands/cmp.c (grub_cmd_cmp): Likewise.
6226 * kern/dl.c (grub_dl_flush_cache): Likewise.
6227 (grub_dl_load_core): Likewise.
6228 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6229 (grub_elf64_load_phdrs): Likewise.
6230
d4e2dad3 62312008-07-13 Pavel Roskin <proski@gnu.org>
6232
6233 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6234 between signed and unsigned.
6235 (LzmaEnc_Finish): Fix warning about an unused parameter.
6236
aa24b516 62372008-07-13 Bean <bean123ch@gmail.com>
6238
6239 * Makefile.in (enable_lzo): New rule.
6240
6241 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6242
6243 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6244
6245 * boot/i386/pc/lnxboot.S: #include <config.h>.
6246
6247 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 6248 its value according to the compression algorithm used, lzo or lzma.
aa24b516 6249
6250 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6251 compression algorithm according to configure macro.
6252
6253 * kern/i386/pc/startup.S (codestart): Likewise.
6254
6255 * kern/i386/pc/lzma_decode.S: New file.
6256
6257 * include/grub/lib/LzFind.h: Likewise.
6258
6259 * include/grub/lib/LzHash.h: Likewise.
6260
6261 * include/grub/lib/LzmaDec.h: Likewise.
6262
6263 * include/grub/lib/LzmaEnc.h: Likewise.
6264
6265 * include/grub/lib/LzmaTypes.h: Likewise.
6266
6267 * lib/LzFind.c: Likewise.
6268
6269 * lib/LzmaDec.c: Likewise.
6270
6271 * lib/LzmaEnc.c: Likewise.
6272
4ae821ac 62732008-07-13 Bean <bean123ch@gmail.com>
6274
6275 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6276 (grub_ext4_extent_header): New structure.
6277 (grub_ext4_extent): Likewise.
6278 (grub_ext4_extent_idx): Likewise.
6279 (grub_ext4_find_leaf): New function.
6280 (grub_ext2_read_block): Handle extents.
6281
9a745147 62822008-07-12 Robert Millan <rmh@aybabtu.com>
6283
6284 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6285
d49a4cf6 62862008-07-11 Robert Millan <rmh@aybabtu.com>
6287
6288 * util/grub.d/40_custom.in: New file. Example on how to add custom
6289 entries to /etc/grub.d.
6290 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6291 40_custom (implicitly, by merging all the grub.d rules).
6292
947414b4 62932008-07-11 Pavel Roskin <proski@gnu.org>
6294
0059cf6f 6295 * commands/read.c (grub_getline): Fix invalid memory access.
6296 Don't add newline to the variable value.
6297
947414b4 6298 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6299 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6300 (serial_hw_get_port): Check validity of the port number.
6301 (grub_cmd_serial): Check return value of serial_hw_get_port().
6302
62a02d00 63032008-07-07 Pavel Roskin <proski@gnu.org>
6304
6305 * boot/i386/pc/diskboot.S (notification_string): Replace
6306 "Loading kernel" with just "loading". This is shorter, less
6307 confusing and saves a few bytes for possible future changes.
6308
3e5581b0 63092008-07-05 Pavel Roskin <proski@gnu.org>
6310
ea387a48 6311 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6312 size for ATAPI devices, they are undefined. Output sector
6313 number in decimal form.
6314
3e5581b0 6315 * disk/ata.c: Use named constants for status bits.
6316
fdecb8fd 63172008-07-04 Pavel Roskin <proski@gnu.org>
6318
bcd35b90 6319 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6320 grub_addr_t before casting it to the void pointer to fix a
6321 warning. Non-addressable regions are discarded earlier.
6322 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6323 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6324 (check_signature): Don't shadow table_header.
6325 (grub_linuxbios_table_iterate): Cast numeric constants to
6326 grub_linuxbios_table_header_t.
6327 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6328 grub_stop().
6329
af58ab3d 6330 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6331 prevent warnings.
6332
1759aa57 6333 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6334 pointer, which can cause warnings. Support 64-bit addresses.
6335
fdecb8fd 6336 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6337 of sizeof(long). This fixes PowerPC image generation on x86_64.
6338
8516d2a8 63392008-07-04 Robert Millan <rmh@aybabtu.com>
6340
6341 This fixes a performance issue when pc & gpt partmap iterators
6342 didn't abort iteration even after our hook found what it was
fe987087 6343 looking for (often causing expensive probes of non-existent drives).
8516d2a8 6344
6345 Some callers relied on previous buggy behaviour, since they would
34c44600 6346 raise an error when their own hooks caused early abortion of its
8516d2a8 6347 iteration.
6348
6349 * kern/device.c (grub_device_open): Improve error message.
6350 * disk/lvm.c (grub_lvm_open): Likewise.
6351 * disk/raid.c (grub_raid_open): Likewise.
6352
6353 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6354 when hook requests it, independently of grub_errno.
6355 (pc_partition_map_probe): Do not fail when find_func() caused
6356 early abortion of pc_partition_map_iterate().
6357
6358 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6359 when hook requests it, independently of grub_errno.
6360 (gpt_partition_map_probe): Do not fail when find_func() caused
6361 early abortion of gpt_partition_map_iterate().
6362
6363 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6364 when hook requests it, independently of grub_errno. Do not fail when
6365 part_map_iterate_hook() caused early abortion of p->iterate().
6366
6367 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6368 when grub_partition_iterate() returned with non-zero.
6369
277d0de9 63702008-07-03 Pavel Roskin <proski@gnu.org>
6371
6372 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6373 like we do in grub_ata_pio_read().
6374 (grub_ata_readwrite): Always write individual sectors. Fix the
6375 sector count for the remainder.
6376 (grub_ata_write): Enable writing to ATA devices. Correctly
6377 report error for ATAPI devices.
6378
d4c9b428 63792008-07-02 Pavel Roskin <proski@gnu.org>
6380
e43fc690 6381 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6382 warning.
6383
f707af42 6384 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6385 for every read sector, we already increment it for the whole
6386 batch. This fixes reading more than 256 sectors at once.
6387
11e16b15 6388 * util/grub-editenv.c (cmd_info): Cast argument to long
6389 explicitly. ptrdiff_t reduces to int on i386.
6390
cbabfdd4 6391 * util/grub-editenv.c (main): Be specific which parameter is
6392 missing.
6393
b8fbce0a 6394 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6395 (memdisk): Make memdisk_orig_addr a pointer.
6396
c9c8e606 6397 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6398 for file offsets, use grub_off_t instead. Fix printf format
6399 warnings.
6400
ca62e598 6401 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6402 there. Real unexpected warnings should not drown in the noise
6403 about known problems.
6404
ce8d1766 6405 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6406 grub_disk_addr_t for memory addresses.
6407
00c7a56a 6408 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6409 explicitly to fix a warning.
6410
08d3ef09 6411 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6412
cb71ba20 6413 * Makefile.in (MODULE_LDFLAGS): New variable.
6414 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6415 the linker accepts --build-id=none.
6416 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6417 MODULE_LDFLAGS.
6418 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6419
d4c9b428 6420 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6421 those in Linux XFS code. Provide a way to access 64-bit parent
6422 inode.
6423 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6424 the end of struct grub_xfs_dir_header.
6425
d4156eee 64262008-07-02 Bean <bean123ch@gmail.com>
6427
6428 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6429 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6430 and GRUB_IEEE1275_FLAG_NO_ANSI.
6431
6432 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6433 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6434 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6435
6436 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6437 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6438
6439 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6440 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6441
6442 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6443 esc sequence on non ANSI terminal.
6444 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6445
6446 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6447 beginning of file.
6448
2270f77b 64492008-07-02 Bean <bean123ch@gmail.com>
6450
6451 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6452 (grub_editenv_SOURCES): New variable.
6453 (pkglib_MODULES): Add loadenv.mod.
6454 (loadenv_mod_SOURCES): New variable.
6455 (loadenv_mod_CFLAGS): Likewise.
6456 (loadenv_mod_LDFLAGS): Likewise.
6457
6458 * include/grub/envblk.h: New file.
6459
6460 * util/envblk.c: New file.
6461
6462 * util/grub-editenv.c: New file.
6463
6464 * commands/loadenv.c: New file.
6465
0e9e51ec 64662008-07-01 Pavel Roskin <proski@gnu.org>
6467
d89b7634 6468 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6469 not unsigned char. This fixes warnings and is consistent with
6470 other tags.
6471
bf1835b1 6472 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6473
8222a04b 6474 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6475
6a42d99d 6476 * term/tparm.c (analyze): Always set *popcount.
6477
10b159d1 6478 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6479 cast to fix a warning.
6480
b8789f6c 6481 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6482 cast to suppress a warning.
6483
29d7e38a 6484 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6485 grub_fshelp_read_file() expects.
6486
f341f669 6487 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6488 write uuid as a 32-bit value in CPU byte order, so declare and
6489 use it as such.
6490
0e9e51ec 6491 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6492 long if the format specifier expects it.
6493 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6494 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6495 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6496 long to fix a warning.
6497 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6498 grub_dprintf() arguments to fix warnings.
6499
3aefa857 65002008-06-30 Pavel Roskin <proski@gnu.org>
6501
56c7668b 6502 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6503 install_bsd_part immediately before core.img is embedded or
6504 modified on disk. This fixes core.img verification if core.img
6505 cannot be embedded.
6506
3aefa857 6507 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6508 core_path to calculate the blocklist.
6509 Patch from Javier Martín <lordhabbit@gmail.com>
6510
5444088d 65112008-06-29 Robert Millan <rmh@aybabtu.com>
6512
6513 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6514 block to disk block.
6515 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6516 Patch from Niels Böhm <bitbucket@arcor.de>
6517
674835c8 65182008-06-29 Robert Millan <rmh@aybabtu.com>
6519
6520 * util/update-grub_lib.in (font_path): Search for fonts in
6521 /boot/grub first, which is more likely to be readable (we aren't
6522 deciding where fonts live, just looking for them).
6523
f527dbc8 65242008-06-26 Pavel Roskin <proski@gnu.org>
6525
6c2d8df6 6526 * util/biosdisk.c (read_device_map): Don't leave dead map
6527 entries for devices failing stat() check.
6528
f527dbc8 6529 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6530 core_path_dev for the core.img path on the target device.
6531
aebe3d13 65322008-06-26 Robert Millan <rmh@aybabtu.com>
6533
6534 * disk/fs_uuid.c: New file.
6535 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6536 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6537 (fs_uuid_mod_LDFLAGS): New variables.
6538 * include/grub/disk.h (grub_disk_dev_id): Add
6539 `GRUB_DISK_DEVICE_UUID_ID'.
6540 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6541 implement iterate().
6542
37aaf354 65432008-06-26 Robert Millan <rmh@aybabtu.com>
6544
6545 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6546 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6547 Linux image includes no initrd.
6548
25ff262a 65492008-06-21 Javier Martín <lordhabbit@gmail.com>
6550
6551 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6552 call to resolve the core image location that effectively appended the
6553 name twice.
6554
76a2bd44 65552008-06-21 Robert Millan <rmh@aybabtu.com>
6556
6557 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6558 call from here ...
6559
6560 * util/grub.d/10_hurd.in: ... to here ...
6561 * util/grub.d/10_linux.in: ... and here.
6562
650e1c79 65632008-06-19 Robert Millan <rmh@aybabtu.com>
6564
fe987087 6565 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 6566 after it has been set by grub_machine_set_prefix().
6567
6ce63911 65682008-06-19 Robert Millan <rmh@aybabtu.com>
6569
6570 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6571 search result when not saving to variable, not the other way around.
6572 When saving to variable, abort iteration as soon as a match is found.
6573
73940cec 65742008-06-19 Robert Millan <rmh@aybabtu.com>
6575
6576 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6577 check for partition that provides /boot/grub. Its logic is flawed,
6578 as it prevents prepare_grub_to_access_device() from being called
6579 multiple times.
6580
3c62a39d 65812008-06-19 Robert Millan <rmh@aybabtu.com>
6582
6583 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6584 "insmod" command directly when abstraction modules are needed,
fe987087 6585 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 6586 since it had already been processed).
6587
47395a42 65882008-06-19 Pavel Roskin <proski@gnu.org>
6589
6590 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6591 changed. This is needed in case GRUB_LIBDIR changes.
6592 * conf/i386-ieee1275.rmk: Likewise.
6593 * conf/i386-linuxbios.rmk: Likewise.
6594 * conf/i386-pc.rmk: Likewise.
6595 * conf/powerpc-ieee1275.rmk: Likewise.
6596
a145ac2d 65972008-06-18 Pavel Roskin <proski@gnu.org>
6598
6599 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6600 kernel_elf_symlist.c to symlist.c for consistency with other
6601 architectures. Update all users.
6602 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6603
7847c51e 66042008-06-18 Robert Millan <rmh@aybabtu.com>
6605
6606 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6607 it in prefix.
6608
6609 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6610 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6611 a RAID device, run setup() for all members independently on whether
6612 LVM abstraction is being used.
6613 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6614 If grub-mkimage has set `*install_dos_part == -2', don't override this
6615 value.
6616 Perform *install_dos_part adjustments independently on whether
6617 we're embedding or not.
6618 Clarify error message when image is too big for embedding.
6619 Remove duplicate *install_dos_part stanza.
6620
b23e5644 66212008-06-17 Robert Millan <rmh@aybabtu.com>
6622
6623 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6624 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6625 variables.
6626 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6627 values in grub_ofconsole_normal_color and
6628 grub_ofconsole_highlight_color (they're not directly related to
6629 background and foreground).
6630 (grub_ofconsole_setcolorstate): Extract background and foreground
6631 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6632
0aac2f79 66332008-06-17 Robert Millan <rmh@aybabtu.com>
6634
6635 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6636 /boot/grub for the check in last commit, not /boot (they could be
6637 different partitions).
6638
3cca7ef3 66392008-06-16 Robert Millan <rmh@aybabtu.com>
6640
6641 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6642 asked to setup access for the same partition that provides /boot,
6643 don't bother using UUIDs since our root already has the value we
6644 want.
6645
347396d8 66462008-06-16 Robert Millan <rmh@aybabtu.com>
6647
6648 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6649 I2O devices.
6650 Patch from Sven Mueller <sven@debian.org>.
6651
991477f8 66522008-06-16 Robert Millan <rmh@aybabtu.com>
6653
6654 * util/update-grub.in: Check for $EUID instead of $UID.
6655 Reported by Vincent Zweije.
6656
d31a32a1 66572008-06-16 Bean <bean123ch@gmail.com>
6658
fe987087 6659 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 6660 (grub_ext2_read_block): Likewise.
6661 (grub_ext2_read_inode): Likewise.
6662 (grub_ext2_mount): Likewise.
6663 (grub_ext2_close): Likewise.
6664 (grub_ext3_get_journal): Removed.
6665
fe987087 6666 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 6667 (grub_reiserfs_read_symlink): Likewise.
6668 (grub_reiserfs_mount): Likewise.
6669 (grub_reiserfs_open): Likewise.
6670 (grub_reiserfs_read): Likewise.
6671 (grub_reiserfs_close): Likewise.
6672 (grub_reiserfs_get_journal): Removed.
6673
6674 * fs/fshelp.c (grub_fshelp_read): Removed.
6675 (grub_fshelp_map_block): Likewise.
6676
6677 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6678 (grub_fshelp_journal): Likewise.
6679 (grub_fshelp_read): Likewise.
6680 (grub_fshelp_map_block): Likewise.
6681
3540a760 66822008-06-16 Pavel Roskin <proski@gnu.org>
6683
6684 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6685 floating point anymore.
6686 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6687
95614c84 66882008-06-15 Pavel Roskin <proski@gnu.org>
6689
6690 * commands/ls.c (grub_ls_list_files): Use integer calculations
6691 for human readable format, avoid floating point use.
6692 * kern/misc.c (grub_ftoa): Remove.
6693 (grub_vsprintf): Remove floating point support.
6694
50465dd6 66952008-06-15 Robert Millan <rmh@aybabtu.com>
6696
fe6b695a 6697 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 6698 devices.
6699 Reported by Max Vozeler.
6700
a9207284 67012008-06-15 Robert Millan <rmh@aybabtu.com>
6702
6703 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6704 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6705 skipped later.
6706 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6707 the beginning of the prefix.
6708
6709 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6710 It is assumed that if we have a memdisk, grub-mkimage has set
6711 grub_prefix to include the "(memdisk)" drive in it.
6712
a7cbd45a 67132008-06-15 Robert Millan <rmh@aybabtu.com>
6714
6715 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6716 Initialize keyboard controller after registering the terminal, so that
6717 grub_printf() can be called from grub_keyboard_controller_init().
6718
21cf716a 67192008-06-15 Robert Millan <rmh@aybabtu.com>
6720
6721 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6722 extent-btree which is written as big endian on disk.
6723 Reported by Alain Greppin <al@chilibi.org>.
6724
23a64d8e 67252008-06-14 Robert Millan <rmh@aybabtu.com>
6726
6727 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6728 * util/i386/pc/grub-install.in (modules): Likewise.
6729
d687651c 67302008-06-13 Pavel Roskin <proski@gnu.org>
6731
6732 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6733
dfe9ddd4 67342008-06-13 Bean <bean123ch@gmail.com>
6735
6736 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6737
6738 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6739
6740 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6741 to indicate sparse block.
6742
16ae7781 67432008-06-12 Pavel Roskin <proski@gnu.org>
6744
e6d1a308 6745 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6746 number, grub_fshelp_read() does it for us.
6747
16ae7781 6748 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6749 linear disk read with journal translation.
6750 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6751 * include/grub/fshelp.h: Declare grub_fshelp_read().
6752
40fd3a2b 67532008-06-09 Pavel Roskin <proski@gnu.org>
6754
6755 * fs/minix.c (grub_minix_mount): Handle error reading
6756 superblock.
6757
f5679726 67582008-06-08 Robert Millan <rmh@aybabtu.com>
6759
6760 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6761 don't append the RAID prefix afterwards.
6762 Reported by Clint Adams.
6763
ce525529 67642008-06-08 Robert Millan <rmh@aybabtu.com>
6765
6766 Based on description from Pavel:
6767 * kern/disk.c (grub_disk_check_range): Rename to ...
6768 (grub_disk_adjust_range): ... this. Add a comment explaining the
6769 tasks performed by this function.
6770
ad4936a0 67712008-06-08 Robert Millan <rmh@aybabtu.com>
6772
6773 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6774 `num_serial' (for consistency with other variables).
6775 (struct grub_ntfs_data): Add `uuid' member.
6776 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6777 (grub_ntfs_uuid): New function.
6778 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6779
dc20b0f9 67802008-06-07 Pavel Roskin <proski@gnu.org>
6781
6782 * util/biosdisk.c (open_device): Revert last change to the
6783 function, it broke installation. The sector needs to be
6784 different dependent on which device is opened.
6785
c5e3cfba 67862008-06-06 Robert Millan <rmh@aybabtu.com>
6787
6788 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6789 rest of GRUB, and breakage doesn't happen if its value were modified.
6790
6791 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6792 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6793 a constant (same value).
6794 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6795 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6796
26a1f8c4 67972008-06-06 Robert Millan <rmh@aybabtu.com>
6798
6799 * util/biosdisk.c (open_device): Do not modify sector offset when
6800 accessing a partition. kern/disk.c already handles this for us.
6801
25d6b327 68022008-06-06 Robert Millan <rmh@aybabtu.com>
6803
6804 * util/grub-emu.c (grub_machine_init): Move code in this function from
6805 here ...
6806 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6807 segfault in case grub_printf() is called).
6808
6809 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6810 grub_probe. Update all users not to explicitly add it again.
6811 (grub_device): New variable; contains corresponding device for grubdir.
6812 (fs_module, partmap_module, devabstraction_module): Pass
6813 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6814 every time.
6815
9ece62fb 68162008-06-05 Robert Millan <rmh@aybabtu.com>
6817
6818 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6819 is found, print it (same layout as with labels).
6820
1ad36d37 68212008-06-04 Robert Millan <rmh@aybabtu.com>
6822
6823 * util/biosdisk.c (get_drive): Rename to ...
6824 (find_grub_drive): ... this. Update all users.
6825
6826 (get_os_disk): Rename to ...
6827 (convert_system_partition_to_system_disk): ... this. Update all users.
6828
6829 (find_drive): Rename to ...
6830 (find_system_device): ... this. Update all users.
6831
e6a30859 68322008-06-04 Robert Millan <rmh@aybabtu.com>
6833
6834 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6835 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6836 (make_device_map): Likewise.
6837
00c108a4 68382008-06-01 Robert Millan <rmh@aybabtu.com>
6839
6840 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6841 before dereferencing it.
6842
6843 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6844 union with fat12/fat16-specific ones. Add some new fields, including
6845 `num_serial' for both versions.
6846 (struct grub_fat_data): Add `uuid' member.
6847 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6848 names. Initialize `data->uuid' using `num_serial'.
6849 (grub_fat_uuid): New function.
6850 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6851
6852 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6853 (grub_reiserfs_uuid): New function.
6854 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6855 member.
6856
6857 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6858 (grub_xfs_uuid): New function.
6859 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6860
1385c5bb 68612008-06-01 Robert Millan <rmh@aybabtu.com>
6862
6863 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6864 code that is backward compatible with pre-uuid search command.
6865
c682dfd7 68662008-05-31 Robert Millan <rmh@aybabtu.com>
6867
6868 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6869 floppies after everything else, to ensure floppy drive isn't accessed
6870 unnecessarily (patch from Bean).
6871
b7db5d47 68722008-05-31 Robert Millan <rmh@aybabtu.com>
6873
6874 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6875 not print device names when we were asked to set a variable.
6876
6e037aa9 68772008-05-31 Robert Millan <rmh@aybabtu.com>
6878
6879 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6880 using "cursor-on" and "cursor-off" commands (understood at least by
6881 the Open Firmware flavour on OLPC).
6882
41305bc8 68832008-05-31 Michael Gorven <michael@gorven.za.net>
6884
6885 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6886 on and off sequences.
6887
69ba137e 68882008-05-31 Robert Millan <rmh@aybabtu.com>
6889
6890 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6891 * util/update-grub.in: Likewise.
6892
520ae21b 68932008-05-30 Pavel Roskin <proski@gnu.org>
6894
6895 * util/biosdisk.c (linux_find_partition): Simplify logic and
6896 make the code more universal. Keep special processing for
6897 devfs, but use a simple rule for all other devices. If the
6898 device ends with a number, append 'p' and the partition number.
6899 Otherwise, append only the partition number.
6900
5786569b 69012008-05-30 Robert Millan <rmh@aybabtu.com>
6902
6903 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6904 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6905 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6906 the `root' parameter to Linux.
6907
51500452 69082008-05-30 Robert Millan <rmh@aybabtu.com>
6909
6910 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6911 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6912 --fs_uuid with --fs-uuid.
6913 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6914 all filesystems support them).
6915
811d3878 69162008-05-30 Robert Millan <rmh@aybabtu.com>
6917
6918 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6919 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6920
cab63c95 69212008-05-30 Robert Millan <rmh@aybabtu.com>
6922
6923 * util/grub.d/00_header.in: Remove obsolete comment referencing
6924 convert_system_path_to_grub_path().
6925 * util/update-grub.in: Likewise.
6926 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6927 (convert_system_path_to_grub_path): Add a warning message explaining
6928 that this function is deprecated. Rely on is_path_readable_by_grub()
6929 for the readability checks.
6930 (font_path): Use is_path_readable_by_grub() for the readability
6931 check rather than convert_system_path_to_grub_path().
6932
972e2f7a 69332008-05-30 Robert Millan <rmh@aybabtu.com>
6934
6935 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6936 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6937 converting it first.
6938 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6939 grub.cfg for access to font file, and afterwards call it again to set
6940 the root device.
6941
62191274 69422008-05-30 Robert Millan <rmh@aybabtu.com>
6943
6944 * commands/search.c (options): Add --fs_uuid option.
6945 (search_fs_uuid): New function.
6946 (grub_cmd_search): Fix --set argument passing.
6947 Use search_fs_uuid() when requested via --fs_uuid.
6948 (grub_search_init): Update help message.
6949 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6950 and redeclare it as an array of 16-bit words.
6951 (grub_ext2_uuid): New function.
6952 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6953 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6954 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6955 (GRUB_DEVICE_BOOT_UUID): New variables.
6956 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6957 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6958 whenever possible.
6959 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6960 just assume `root' variable has the right value.
6961 * util/grub.d/10_linux.in: Likewise.
6962 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6963 via PRINT_FS_UUID.
6964 (main): Recognise `-t fs_uuid' argument.
6965
01b73ec8 69662008-05-30 Robert Millan <rmh@aybabtu.com>
6967
6968 * util/biosdisk.c (map): Redefine structure to hold information
6969 about GRUB drive name.
fe6b695a 6970 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6971 drive names.
6972 (call_hook): Remove.
6973 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6974 member. Assume drive has partitions.
6975 (grub_util_biosdisk_open): Access device names via `.device' struct
6976 member.
6977 (open_device): Likewise.
6978 (find_drive): Likewise.
6979 (read_device_map): Adjust map[] usage to match the new struct
6980 definition. Don't check for duplicates (still possible, but not cheap
6981 anymore).
6982 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6983 (make_device_name): Remove assumption of BIOS-like drive names.
6984
22f16596 69852008-05-30 Pavel Roskin <proski@gnu.org>
6986
6987 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6988 compiling execute.c doesn't need grub_script.tab.h anymore.
6989 (normal/command.c_DEPENDENCIES): Likewise.
6990 (normal/function.c_DEPENDENCIES): Likewise.
6991 * conf/i386-ieee1275.rmk: Likewise.
6992 * conf/i386-linuxbios.rmk: Likewise.
6993 * conf/i386-pc.rmk: Likewise.
6994 * conf/powerpc-ieee1275.rmk: Likewise.
6995 * conf/sparc64-ieee1275.rmk: Likewise.
6996
528ad8f2 69972008-05-29 Pavel Roskin <proski@gnu.org>
6998
d1dff95d 6999 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7000 when scanning metadata for volume group name.
7001
528ad8f2 7002 * include/grub/script.h: Don't include grub_script.tab.h. It's
7003 a generated file, which may only be included from the files with
7004 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7005 use union YYSTYPE, as the later allows forward declaration.
7006 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7007
47248e08 70082008-05-29 Robert Millan <rmh@aybabtu.com>
7009
7010 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7011 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7012 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7013 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7014 scan codes.
7015
ee632529 70162008-05-29 Robert Millan <rmh@aybabtu.com>
7017
7018 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7019 control key combinations.
7020
eee96e08 70212008-05-29 Robert Millan <rmh@aybabtu.com>
7022
7023 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7024 * util/ieee1275/grub-install.in: ... to here.
7025 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7026 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7027 (grub_install_SOURCES): Likewise.
7028
da9a6a94 70292008-05-29 Robert Millan <rmh@aybabtu.com>
7030
7031 * fs/affs.c: Update copyright year.
7032 * fs/ext2.c: Likewise.
7033 * fs/fshelp.c: Likewise.
7034 * fs/hfsplus.c: Likewise.
7035 * fs/ntfs.c: Likewise.
7036 * fs/xfs.c: Likewise.
7037 * include/grub/fshelp.h: Likewise.
7038 * util/grub-mkdevicemap.c: Likewise.
7039
12e65f3a 70402008-05-28 Robert Millan <rmh@aybabtu.com>
7041
7042 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7043 might need to be fatfs to support some firmware implementations
7044 (e.g. OFW or EFI).
7045
23023641 70462008-05-28 Robert Millan <rmh@aybabtu.com>
7047
7048 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7049 devices.
7050 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7051 (make_device_map): Likewise.
7052
887d2619 70532008-05-20 Bean <bean123ch@gmail.com>
7054
7055 * fs/fshelp.c (grub_fshelp_map_block): New function.
7056 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7057 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7058
7059 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7060 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7061 (grub_fshelp_journal): New structure.
7062 (grub_fshelp_map_block): New function prototype.
7063 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7064 (grub_fshelp_map_block): Likewise.
7065
7066 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7067 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7068 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7069 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7070 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7071 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7072 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7073 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7074 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7075 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7076 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7077 (grub_ext2_sblock): New members for journal support.
7078 (grub_ext3_journal_header): New structure.
7079 (grub_ext3_journal_revoke_header): Likewise.
7080 (grub_ext3_journal_block_tag): Likewise.
7081 (grub_ext3_journal_sblock): Likewise.
7082 (grub_fshelp_node): New members logfile and journal.
7083 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7084 grub_fshelp_map_block to get real block number.
7085 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7086 number.
7087 (grub_ext2_read_inode): Likewise.
7088 (grub_ext3_get_journal): New function.
7089 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7090 (grub_ext2_close): Release memory used by journal.
7091
7092 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7093 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7094 (grub_reiserfs_transaction_header): Renamed to
7095 grub_reiserfs_description_block, replace field data with real_blocks.
7096 (grub_reiserfs_commit_block): New structure.
7097 (grub_reiserfs_data): New member journal.
7098 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7099 number.
7100 (grub_reiserfs_read_symlink): Likewise.
7101 (grub_reiserfs_iterate_dir): Likewise.
7102 (grub_reiserfs_open): Likewise.
7103 (grub_reiserfs_read): Likewise.
7104 (grub_reiserfs_get_journal): New function.
7105 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7106 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7107 using grub_reiserfs_get_journal.
7108 (grub_reiserfs_close): Release memory used by journal.
7109
7110 * fs/affs.c (grub_affs_read_block): Change block type to
7111 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7112
7113 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7114
7115 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7116
7117 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7118
7119 * fs/udf.c (grub_udf_read_block): Change block type to
7120 grub_disk_addr_t. Use type cast to avoid warning.
7121
7122 * fs/xfs.c (grub_xfs_read_block): Likewise.
7123
b7c6bed5 71242008-05-16 Christian Franke <franke@computer.org>
7125
7126 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7127 to ensure that break with ESC will always work.
7128 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7129 Remove ESC from keyboard queue.
7130
eedf167f 71312008-05-16 Christian Franke <franke@computer.org>
7132
7133 * util/biosdisk.c: [__CYGWIN__] Add includes.
7134 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7135 (get_os_disk): Move variable declarations to OS specific
7136 parts to avoid warning.
7137 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7138 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7139 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7140 Cygwin.
7141 * util/getroot.c: [__CYGWIN__] Add includes.
7142 (strip_extra_slashes): Fix "/" case.
7143 [__CYGWIN__] (get_win32_path): New function.
7144 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7145 [__CYGWIN__] (find_root_device): Disable.
7146 [__CYGWIN__] (get_bootsec_serial): New function.
7147 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7148 [__linux__] (grub_guess_root_device): Add early returns to simplify
7149 structure.
7150 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7151 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7152 check for Linux only.
7153
a079699e 71542008-05-15 Bean <bean123ch@gmail.com>
7155
7156 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7157 keyboard hang problem in apple's intel mac.
7158
1cf4059a 71592008-05-09 Robert Millan <rmh@aybabtu.com>
7160
7161 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7162 devices.
7163 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7164 (make_device_map): Likewise.
7165 Reported by Aurelien Jarno <aurel32@debian.org>
7166
ed759390 71672008-05-07 Ian Campbell <ijc@hellion.org.uk>
7168
7169 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7170 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7171 (make_device_map): Output entries for xvd type disks.
7172
b56c4eaa 71732008-05-07 Robert Millan <rmh@aybabtu.com>
7174
7175 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7176 devices.
7177 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7178 (make_device_map): Likewise.
7179 Reported by Roland Dreier <rdreier@cisco.com>
7180
7f8866ed 71812008-05-07 Robert Millan <rmh@aybabtu.com>
7182
7183 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7184 grub_strstr() call. Correct a few mistakes in failure path handling.
7185
b0346e0f 71862008-05-06 Robert Millan <rmh@aybabtu.com>
7187
7188 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7189 Do not print a trailing slash (therefore, the root directory is an
7190 empty string).
7191 (convert_system_path_to_grub_path): Do not remove trailing slash
7192 from make_system_path_relative_to_its_root() output.
7193
7194 * util/i386/pc/grub-install.in: Add trailing slash to output from
7195 make_system_path_relative_to_its_root().
7196
6cf12cbd 71972008-05-06 Robert Millan <rmh@aybabtu.com>
7198
7199 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7200 ensures that output lines aren't intermangled with those sent to
7201 stderr (via grub_util_info()).
7202 * util/grub-probe.c (grub_refresh): Likewise.
7203 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7204
0fbb3117 72052008-05-05 Christian Franke <franke@computer.org>
7206
7207 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7208 Add Cygwin device names.
7209 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7210 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7211 (check_device): Return error instead of success on empty name.
7212 (make_device_map): Move label inside linux specific code to
7213 prevent compiler warning.
7214
8124cdb7 72152008-04-30 Robert Millan <rmh@aybabtu.com>
7216
7217 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7218 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7219 first boot option.
7220 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7221
094c01d0 72222008-04-29 Robert Millan <rmh@aybabtu.com>
7223
7224 * docs/grub.cfg: New file (example GRUB configuration).
7225
f4b1fc02 72262008-04-26 Robert Millan <rmh@aybabtu.com>
7227
329ce2a5 7228 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7229 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7230 and `disk/ieee1275/nand.c'.
f4b1fc02 7231
25f16ec1 72322008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 7233
25f16ec1 7234 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7235 i386-linuxbios.
7236
7237 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7238 change the buffer size to 4096 for cdrom device.
7239
7240 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7241 and nand.mod.
7242 (_linux_mod_SOURCES): New variable.
7243 (_linux_mod_CFLAGS): Likewise.
7244 (_linux_mod_LDFLAGS): Likewise.
7245 (linux_mod_SOURCES): Likewise.
7246 (linux_mod_CFLAGS): Likewise.
7247 (linux_mod_LDFLAGS): Likewise.
7248 (nand_mod_SOURCES): Likewise.
7249 (nand_mod_CFLAGS): Likewise.
7250 (nand_mod_LDFLAGS): Likewise.
7251
7252 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7253 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7254 type property. (nand device in olpc don't have this property)
7255
7256 * include/grub/disk.h (grub_disk_dev_id): New macro
7257 GRUB_DISK_DEVICE_NAND_ID.
7258
7259 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7260 function prototype.
7261 (grub_rescue_cmd_initrd): Likewise.
7262
7263 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7264 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7265 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 7266
25f16ec1 7267 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7268 GRUB_MACHINE_IEEE1275 is defined.
7269
7270 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7271 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7272
7273 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7274 on nested function heap_init.
7275 (grub_upper_mem): New variable for i386-ieee1275.
7276 (grub_get_extended_memory): New function for i386-ieee1275.
7277 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7278
7279 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7280 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7281 property.
f19dbdb7 7282
25f16ec1 7283 * loader/i386/ieee1275/linux.c: New file.
7284
7285 * loader/i386/ieee1275/linux_normal.c: New file.
7286
7287 * disk/ieee1275/nand.c: New file.
7288
e89d61e9 72892008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7290
7291 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7292 value.
7293 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7294
602566f6 72952008-04-18 Robert Millan <rmh@aybabtu.com>
7296
7297 Restructures early code path on ieee1275 to unify grub_main() as
7298 the first C function that is executed in every platform.
7299
7300 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7301 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7302 cmain().
7303 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7304 * kern/ieee1275/cmain.c (cmain): Rename to ...
7305 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7306 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7307 at the beginning.
7308
57490c2b 73092008-04-18 Robert Millan <rmh@aybabtu.com>
7310
7311 * util/update-grub.in: Fix syntax error when setting
7312 `GRUB_PRELOAD_MODULES'.
7313 Reported by Stephane Chazelas <stephane@artesyncp.com>
7314
1977517d 73152008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7316
7317 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7318 section into account, newer toolchains generate unique build ids
7319 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 7320 we want build ids to be preserved
1977517d 7321 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7322 far from other sections don't cause the raw binary images grow
7323 size
7324
bfb1f1a2 73252008-04-15 Robert Millan <rmh@aybabtu.com>
7326
7327 * disk/lvm.c: Update copyright year.
7328 * kern/misc.c: Likewise.
7329
01979850 73302008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7331
7332 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 7333 there is no memory left for physical volume name.
01979850 7334
0a1150e2 73352008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7336
7337 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7338 volume name mapping to support bigger than 9 character names properly.
7339
82ead3fe 73402008-04-13 Robert Millan <rmh@aybabtu.com>
7341
7342 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7343 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7344
e54a72f5 73452008-04-13 Christian Franke <franke@computer.org>
7346
7347 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7348 to create a floppy emulation boot CD when non emulation mode
7349 does not work.
7350 Enable Joliet CD filesystem extension.
7351
9fe86034 73522008-04-13 Robert Millan <rmh@aybabtu.com>
7353
7354 * kern/misc.c (grub_strncat): Fix off-by-one error.
7355 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7356
7357 * kern/env.c (grub_env_context_close): Clear current context, not
7358 previous one.
7359 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7360
7361 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7362
7ceeee39 73632008-04-13 Robert Millan <rmh@aybabtu.com>
7364
7365 Improve robustness when handling LVM.
7366
7367 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 7368 (and leave `*p' unmodified).
7ceeee39 7369 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7370 through it.
7371 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7372 iterating through it.
7373 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7374 through it.
fe6b695a 7375 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 7376 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7377 Don't assume `vg->pvs != NULL' when iterating through it.
7378
58cd3d85 73792008-04-13 Robert Millan <rmh@aybabtu.com>
7380
7381 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7382 * genmk.rb (partmap): New variable.
7383 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7384 (#{partmap}): New target rule.
7385 * genpartmaplist.sh: New file.
7386 * Makefile.in (pkglib_DATA): Add partmap.lst.
7387 (partmap.lst): New target rule.
7388 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7389 modules (including all partition maps), instead of preloading them.
7390
78b51059 73912007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7392
7393 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7394 `linux-boot-prober' (if installed) to detect other operating
7395 systems which are installed on the computer and add them to
7396 the boot menu.
7397 * conf/common.rmk: Build and install 30_os-prober.
7398
a91627b4 73992008-04-12 Robert Millan <rmh@aybabtu.com>
7400
7401 * kern/powerpc/ieee1275/init.c: Move from here ...
7402 * kern/ieee1275/init.c: ... to here. Update all users.
7403
7404 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7405 * kern/ieee1275/cmain.c: ... to here. Update all users.
7406
7407 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7408 * kern/ieee1275/openfw.c: ... to here. Update all users.
7409
7410 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7411 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7412
322562ea 74132008-04-10 Pavel Roskin <proski@gnu.org>
7414
7415 * configure.ac: Always use "_cv_" in cache variables for
7416 compatibility with Autoconf 2.62.
7417
a02a73c5 74182008-04-07 Robert Millan <rmh@aybabtu.com>
7419
7420 Revert grub/machine/init.h addition by Pavel (since it breaks on
7421 i386-ieee1275 and others):
7422 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7423 * util/powerpc/ieee1275/misc.c: Likewise.
7424
25c024b1 74252008-04-07 Robert Millan <rmh@aybabtu.com>
7426
7427 * util/grub-probe.c (probe): Improve error message.
7428
3cbd2f98 74292008-04-07 Robert Millan <rmh@aybabtu.com>
7430
7431 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7432 (this prevents the presence of a bogus entry from ruining the whole
7433 thing).
7434
87a297bf 74352008-04-06 Pavel Roskin <proski@gnu.org>
7436
36747a62 7437 * util/biosdisk.c: Include grub/util/biosdisk.h.
7438 * util/grub-fstest.c (execute_command): Make static.
7439 * util/grub-mkdevicemap.c (check_device): Likewise.
7440 * util/i386/pc/misc.c: Include grub/machine/init.h.
7441 * util/powerpc/ieee1275/misc.c: Likewise.
7442 * util/lvm.c: Include grub/util/lvm.h.
7443 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7444 grub/cache.h.
7445 * util/raid.c: Include grub/util/raid.h.
7446 (grub_util_getdiskname): Make static.
7447
87a297bf 7448 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7449 grub_hostfs_fini(), as they are called from grub_init_all() and
7450 grub_fini_all() respectively. This fixes an infinite loop in
7451 grub-fstest due to double registration of hostfs.
7452 Reported by Christian Franke <Christian.Franke@t-online.de>
7453
f6ce7629 74542008-04-05 Pavel Roskin <proski@gnu.org>
7455
7456 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7457 all 8 functions. Otherwise, probe function 0 only.
7458
070e49e4 74592008-04-04 Pavel Roskin <proski@gnu.org>
7460
8b088a4c 7461 * commands/lspci.c (grub_lspci_iter): Print the bus number
7462 correctly.
7463
4f657021 7464 * commands/lspci.c (grub_pci_classes): Fix typos.
7465 (grub_lspci_iter): Don't print func twice. Print vendor ID
7466 before device ID, as it's normally done.
7467
070e49e4 7468 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7469 Fix signedness warnings.
7470 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7471 Likewise.
7472 * util/ieee1275/get_disk_name.c: Include config.h so that
7473 _GNU_SOURCE is defined and getline() is declared. Mark an
7474 unused argument as such. Fix a signedness warning.
7475
ba7328dc 74762008-04-02 Pavel Roskin <proski@gnu.org>
7477
26887f22 7478 * genkernsyms.sh.in: Use more robust assignments for CC and
7479 srcdir. Quote srcdir.
7480 * gensymlist.sh.in: Likewise. Assert at the compile time that
7481 the symbol table is not empty.
7482
ba7328dc 7483 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7484 * fs/cpio.c (grub_cpio_read): Likewise.
7485
0f582c6b 74862008-04-01 Pavel Roskin <proski@gnu.org>
7487
4b6e1995 7488 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7489 * disk/host.c (grub_host_open): Likewise.
7490 * disk/loopback.c (grub_loopback_open): Likewise.
7491 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7492 disk->id as in disk/host.c, not a multi-character constant.
7493
828a2768 7494 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7495 later is obsolete, potentially dangerous and sets a bad example.
7496 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7497 * util/misc.c (grub_util_get_image_size): Likewise.
7498
2bb4fb47 7499 * disk/loopback.c (options): Improve help for "--partitions".
7500
0f582c6b 7501 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7502 options to align them with the short options, e.g. "echo -e".
7503
a33224e0 75042008-03-31 Bean <bean123ch@gmail.com>
7505
7506 * video/reader/png.c (grub_png_data): New member is_16bit and
7507 image_data.
7508 (grub_png_decode_image_header): Detect 16 bit png image.
7509 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7510 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7511 (grub_video_reader_png): Release memory occupied by image_data.
7512
7513 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7514 4096 bytes.
7515 (grub_nfs_mount): Skip the test for sector per cluster.
7516
7517 * include/grub/ntfs.h (MAX_SPC): Removed.
7518
86cb4f54 75192008-03-31 Bean <bean123ch@gmail.com>
7520
7521 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7522 (grub_probe_SOURCES): Add fs/afs.c.
7523 (grub_fstest_SOURCES): Likewise.
7524 (afs_mod_SOURCES): New variable.
7525 (afs_mod_CFLAGS): Likewise.
7526 (afs_mod_LDFLAGS): Likewise.
7527
7528 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7529 (grub_emu_SOURCES): Likewise.
7530
7531 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7532
7533 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7534
7535 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7536
7537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7538
7539 * fs/afs.c: New file.
7540
17c74c21 75412008-03-30 Pavel Roskin <proski@gnu.org>
7542
4cb68e89 7543 * disk/host.c: Include grub/misc.h to fix a warning.
7544 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7545 warnings about implicit declarations.
7546
8790bb04 7547 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7548 variable.
7549 * include/grub/i386/loader.h: Change declaration of
7550 grub_linux_boot() to match what grub_loader_set() expects.
7551 * util/getroot.c (grub_guess_root_device): Return const char* to
7552 fix a warning.
7553 * util/grub-probe.c (probe): Fix a warning about uninitialized
7554 abstraction_name variable.
7555 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7556 second argument as unused to fix a warning.
7557
9a3f3296 7558 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7559 missing grub_error() call.
7560
0ecef90d 7561 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7562 2.60 and newer uses it to define datadir.
7563
0bf6d401 7564 * commands/sleep.c: Fix warning about implicit declaration.
7565 * disk/memdisk.c: Likewise.
7566 * loader/aout.c: Likewise.
7567 * loader/i386/bsd_normal.c: Likewise.
7568 * util/grub-probe.c: Likewise.
7569
7cdacf97 7570 * commands/i386/cpuid.c (has_longmode): Make static.
7571 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7572 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7573
17c74c21 7574 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7575 GDT. This is more robust, as %ds can change.
7576 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7577 calling real_to_prot().
7578 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7579
80a3e68b 75802008-03-28 Pavel Roskin <proski@gnu.org>
7581
7582 * kern/i386/pc/startup.S: Assert that uncompressed functions
7583 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7584 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7585 code, as they push parts of the code (error handlers) beyond
7586 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7587 code as correctness and size.
7588
77bcd272 75892008-03-28 Pavel Roskin <proski@gnu.org>
7590
7591 * kern/i386/pc/startup.S
7592 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7593 data block address to the real mode, keep offset minimal. This
7594 works around a bug in AWARD BIOS on old Athlon systems, which
7595 makes CD detection hang.
7596
c5dfd43b 75972008-03-26 Pavel Roskin <proski@gnu.org>
7598
7599 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7600 const.
7601 * include/grub/normal.h: Add grub_parse_color_name_pair()
7602 declaration.
7603
bf962df2 76042008-03-24 Bean <bean123ch@gmail.com>
7605
7606 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7607 (cd_count): Removed.
7608 (cd_drive): New variable.
7609 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7610 (grub_biosdisk_call_hook): Likewise.
7611 (grub_biosdisk_iterate): Change cdrom detection method.
7612 (grub_biosdisk_open): Replace cd_start with cd_drive.
7613 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7614 detect cdrom device.
7615
7616 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7617 Removed.
7618 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7619 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7620 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7621 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7622 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7623 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7624 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7625 (grub_biosdisk_cdrp): New structure.
7626 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7627
7628 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7629
7630 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7631 device.
7632
7633 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7634 New function.
7635
68e7fc7a 76362008-03-20 Robert Millan <rmh@aybabtu.com>
7637
7638 Remove 2 TiB limit in ata.mod.
7639 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7640 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7641 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7642 grub_uint64_t instead of grub_uint32_t.
7643
38ad2cf5 76442008-03-05 Bean <bean123ch@gmail.com>
7645
7646 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7647 (grub_multiboot): Set boot device.
7648
7649 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7650
2b89344e 76512008-03-02 Bean <bean123ch@gmail.com>
7652
7653 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7654 symlink_buffer.
7655
87a95d1f 76562008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7657
7658 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7659 texinfo.tex.
7660
7661 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7662 modified.
7663
7664 * docs/fdl.texi: New file.
f19dbdb7 7665
87a95d1f 7666 * docs/mdate-sh: New file. Copied from gnulib.
7667 * docs/texinfo.tex: Likewise.
7668
7669 * config.guess: Updated from gnulib.
7670 * install-sh: Likewise.
7671
7dc15d8e 76722008-02-28 Robert Millan <rmh@aybabtu.com>
7673
7674 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7675 (aout_mod_SOURCES): New variable.
7676 (aout_mod_CFLAGS): Likewise.
7677 (aout_mod_LDFLAGS): Likewise.
7678
7679 * conf/i386-ieee1275.rmk: Likewise.
7680
b00ab696 76812008-02-28 Robert Millan <rmh@aybabtu.com>
7682
7683 * util/update-grub.in: Reorganise terminal validity check. Accept
7684 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7685 Based on suggestion by Franklin PIAT.
7686
79ca2d78 76872008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7688
7689 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7690 function.
7691 * util/getroot.c (grub_util_check_block_device): New function that
7692 returns the given argument if it is a block device and returns NULL else.
7693 * util/grub-probe.c (argument_is_device): New variable.
7694 (probe): Promote device_name from a variable to an argument. Receive
7695 device_name from grub_util_check_block_device() if path is NULL and from
7696 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 7697 (options): Introduce new parameter '-d, --device'.
79ca2d78 7698 (main): Add description of the new parameter to the help screen.
7699 Rename path variable to argument. Set argument_is_device if the '-d'
7700 option is given. Pass argument to probe() depending on
7701 argument_is_device.
7702
0d16e571 77032008-02-24 Bean <bean123ch@gmail.com>
7704
7705 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7706 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7707 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7708 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7709 (GRUB_ISO9660_VOLDESC_END): Likewise.
7710 (grub_iso9660_primary_voldesc): New member escape.
7711 (grub_iso9660_data): New member joliet.
7712 (grub_iso9660_convert_string): New function.
7713 (grub_iso9660_mount): Detect joliet extension.
7714 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7715 (grub_iso9660_iso9660_label): Likewise.
7716
7717 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7718 (grub_setup_SOURCES): Add fs/udf.c.
7719 (grub_fstest_SOURCES): Likewise.
7720 (udf_mod_SOURCES): New variable.
7721 (udf_mod_CFLAGS): Likewise.
7722 (udf_mod_LDFLAGS): Likewise.
7723
7724 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7725 (grub_emu_SOURCES): Likewise.
7726
7727 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7728
7729 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7730
7731 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7732
7733 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7734
7735 * fs/udf.c: New file.
7736
8a594a17 77372008-02-24 Robert Millan <rmh@aybabtu.com>
7738
7739 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7740 (normal/lexer.c_DEPENDENCIES): New variables.
7741 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7742 (normal/lexer.c_DEPENDENCIES): Likewise.
7743 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7744 (normal/lexer.c_DEPENDENCIES): Likewise.
7745 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7746 (normal/lexer.c_DEPENDENCIES): Likewise.
7747 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7748 (normal/lexer.c_DEPENDENCIES): Likewise.
7749 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7750 (normal/lexer.c_DEPENDENCIES): Likewise.
7751
2dc33c03 77522008-02-23 Robert Millan <rmh@aybabtu.com>
7753
7754 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7755 since they were intended to be in hex. This didn't break previously
7756 because of a bug in gpt_partition_map_iterate() (see below).
7757
7758 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7759 when checking the validity of GPT header.
7760 Remove `partno', since it always provides the same information as `i'.
7761
f6f4cfb0 77622008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7763
7764 * include/grub/efi/time.h: Fix a wrong comment.
7765
79ff665f 77662008-02-19 Pavel Roskin <proski@gnu.org>
7767
7768 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7769 message.
7770
d38e24c2 77712008-02-19 Bean <bean123ch@gmail.com>
7772
7773 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7774 (aout_mod_SOURCES): New variable.
7775 (aout_mod_CFLAGS): Likewise.
7776 (aout_mod_LDFLAGS): Likewise.
7777 (_bsd_mod_SOURCES): New variable.
7778 (_bsd_mod_CFLAGS): Likewise.
7779 (_bsd_mod_LDFLAGS): Likewise.
7780 (bsd_mod_SOURCES): New variable.
7781 (bsd_mod_CFLAGS): Likewise.
7782 (bsd_mod_LDFLAGS): Likewise.
7783
7784 * include/grub/aout.h: New file.
7785
7786 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7787
7788 * include/grub/i386/bsd.h: New file.
7789
7790 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7791 to make it public.
7792
7793 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7794 function is called, so that it's possible to change it inside the hook.
7795 (grub_elf64_load): Likewise.
7796 (grub_elf_file): Don't close the file if elf header is not found.
7797 (grub_elf_close): Close the file if grub_elf_file fails (The new
7798 grub_elf_file won't close it).
7799 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7800 (grub_elf64_size): Likewise.
7801
7802 * kern/i386/loader.S (grub_unix_real_boot): New function.
7803
7804 * loader/aout.c: New file.
7805
7806 * loader/i386/bsd.c: New file.
7807
7808 * loader/i386/bsd_normal.c: New file.
7809
7810 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7811
7812 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 7813 can test other formats.
d38e24c2 7814
b93bdb0f 78152008-02-19 Robert Millan <rmh@aybabtu.com>
7816
7817 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7818 (grub_gpt_partition_type_empty): Redefine with macro from
7819 `<grub/gpt_partition.h>'.
7820 (gpt_partition_map_iterate): Adjust partition type comparison.
7821
7822 Export `entry' as partmap-specific `part.data' struct.
7823 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7824
7825 * include/grub/gpt_partition.h (grub_gpt_header)
7826 (grub_gpt_partentry): ... to here (new file).
7827
7828 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7829
7830 (grub_gpt_partition_type_bios_boot): New const variable, defined
7831 with macro from `<grub/gpt_partition.h>'.
7832
7833 (setup): Replace `first_start' with `embed_region', which keeps
7834 track of the embed region (and is partmap-agnostic).
7835
7836 Replace find_first_partition_start() with find_usable_region(),
7837 which finds a usable region for embedding using partmap-specific
7838 knowledge (supports PC/MSDOS and GPT).
7839
7840 Fix all assumptions that the embed region start at sector 1, using
7841 `embed_region.start' from now on. Similarly, use `embed_region.end'
7842 rather than `first_start' to calculate available size.
7843
7844 In grub_util_info() message, replace "into after the MBR" with an
7845 indication of the specific sector our embed region starts at.
7846
66cb40f6 78472008-02-19 Robert Millan <rmh@aybabtu.com>
7848
7849 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7850 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7851 `commands/reboot.c'.
7852 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7853 (halt_mod_SOURCES): Likewise.
7854 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7855 (halt_mod_SOURCES): Likewise.
7856
b7202015 78572008-02-17 Christian Franke <franke@computer.org>
7858
7859 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7860
32b0fc49 78612008-02-17 Robert Millan <rmh@aybabtu.com>
7862
7863 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7864 set `first_start' to 0 for non-PC/MSDOS partition maps.
7865
aca63502 78662008-02-16 Robert Millan <rmh@aybabtu.com>
7867
7868 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7869 do not assume partition map is PC/MSDOS before performing checks that
7870 are specific to that layout.
7871
0de8be86 78722008-02-13 Robert Millan <rmh@aybabtu.com>
7873
7874 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7875 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7876 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7877
c3db8364 78782008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7879
7880 * configure.ac: Only a cosmetic change on the handling of
7881 -fno-stack-protector.
7882
f714229e 78832008-02-12 Alexandre Boeglin <alex@boeglin.org>
7884
c3db8364 7885 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7886 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7887 reboot.c.
f714229e 7888 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7889 (halt_mod_SOURCES): New variable.
7890 (halt_mod_CFLAGS): Likewise.
7891 (halt_mod_LDFLAGS): Likewise.
7892 (reboot_mod_SOURCES): Likewise.
7893 (reboot_mod_CFLAGS): Likewise.
7894 (reboot_mod_LDFLAGS): Likewise.
7895
c3db8364 7896 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7897 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7898 reboot.c.
f714229e 7899 (halt_mod_SOURCES): Likewise.
7900 (reboot_mod_SOURCES): Likewise.
7901
c3db8364 7902 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7903 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 7904 (reboot_mod_SOURCES): Likewise.
7905
7906 * commands/i386/pc/reboot.c: merge this file ...
7907
7908 * commands/ieee1275/reboot.c: ... and this file ...
7909
7910 * commands/reboot.c: ... to this file.
c3db8364 7911 Add some precompiler directive to include the correct header for
7912 each machine.
f714229e 7913
7914 * commands/ieee1275/halt.c: move this file ...
7915
7916 * commands/halt.c: ... to here.
c3db8364 7917 Add some precompiler directive to include the correct header for
7918 each machine.
f714229e 7919
7920 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7921 (grub_halt): Likewise.
7922
7923 * kern/efi/efi.c (grub_reboot): New function.
7924 (grub_halt): Likewise.
7925
c74493e0 79262008-02-12 Robert Millan <rmh@aybabtu.com>
7927
7928 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7929 /dev (like it is done for /dev/mapper). This doesn't provide support
7930 for EVMS, but at least it is now easy to identify the problem when it
7931 arises.
7932
d0db4b04 79332008-02-11 Robert Millan <rmh@aybabtu.com>
7934
7935 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7936 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7937 comparing it with -1, not 0.
7938
bf748642 79392008-02-10 Robert Millan <rmh@aybabtu.com>
7940
7941 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7942 `disk/lvm.c'.
7943 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7944 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7945
7946 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7947 `disk/lvm.c' to the end of the list.
7948 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7949 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7950
b5db202a 79512008-02-10 Robert Millan <rmh@aybabtu.com>
7952
7953 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7954 grub_print_error() instead. This will let user know why we're entering
7955 rescue mode.
7956 Based on suggestions from Sam Morris.
7957
83abee31 79582008-02-10 Alexandre Boeglin <alex@boeglin.org>
7959
7960 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7961 on remaining N args, instead of "--" arg N times.
7962
78d5a08b 79632008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7964
7965 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7966 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7967 pattern for unknown glyphs.
7968
68807e5f 79692008-02-09 Robert Millan <rmh@aybabtu.com>
7970
7971 * configure.ac: Probe for `help2man'.
7972 * Makefile.in (builddir): New variable.
7973 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7974 or otherwise add a few flags/options to it.
7975 (install-local): For every executable utility or script that is
7976 installed, invoke $(HELP2MAN) to install a manpage based on --help
7977 output.
7978
7979 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7980 that it doesn't prevent --help from working in build tree.
7981
7982 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7983 with `bug-grub@gnu.org'.
7984 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7985 * util/update-grub.in (usage): New function.
7986 Implement proper argument check, with support for --help and --version
7987 (as well as existing -y).
7988
79892008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7990
7991 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7992 avoid overwriting previous output.
7993 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7994
c1962162 79952008-02-09 Robert Millan <rmh@aybabtu.com>
7996
7997 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7998 drawing the menu.
7999
3dac2e3f 80002008-02-09 Robert Millan <rmh@aybabtu.com>
8001
8002 * commands/sleep.c: New file.
8003 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8004 (sleep_mod_SOURCES): New variable.
8005 (sleep_mod_CFLAGS): Likewise.
8006 (sleep_mod_LDFLAGS): Likewise.
8007
7a634e08 80082008-02-09 Robert Millan <rmh@aybabtu.com>
8009
8010 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8011 situations in which we can deduce the RAID size and the superblock
8012 doesn't match it.
8013
b92f0c18 80142008-02-09 Robert Millan <rmh@aybabtu.com>
8015
8016 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8017 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8018 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8019
8020 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8021 and return a grub_diskmemberlist_t composed of physical array members.
8022 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8023
8024 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8025 prototype.
8026 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8027 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8028 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8029
8030 * util/grub-probe.c (probe): Move partmap probing code from here ...
8031 (probe_partmap): ... to here.
8032 (probe): Use probe_partmap() once for the disk we're probing, and
8033 additionally, when such disk contains a memberlist() struct member,
8034 once for each disk that is contained in the structure returned by
8035 memberlist().
8036
91a4bf68 80372008-02-09 Robert Millan <rmh@aybabtu.com>
8038
8039 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8040 environment variable to 'all' in order to obtain debug output from
8041 non-util/ code.
8042 * util/i386/pc/grub-setup.c (main): Likewise.
8043
a96f9caa 80442008-02-08 Robert Millan <rmh@aybabtu.com>
8045
8046 * disk/raid.c (grub_raid_scan_device): Check for
8047 `array->device[sb.this_disk.number]' rather than for
8048 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 8049 guaranteed to be accessible.
a96f9caa 8050
b37a9222 80512008-02-08 Robert Millan <rmh@aybabtu.com>
8052
8053 * disk/raid.c: Update copyright.
8054 * fs/cpio.c: Likewise.
8055 * include/grub/raid.h: Likewise.
8056 * loader/i386/pc/multiboot.c: Likewise.
8057 * util/hostfs.c: Likewise.
8058
5626aee1 80592008-02-08 Robert Millan <rmh@aybabtu.com>
8060
8061 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8062 to a grub_disk_t array.
8063 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8064 `device[x]'.
8065 (grub_raid_scan_device): Replace `device[x].name' accesses with
8066 `device[x]->name'. Simplify initialization of `array->device[x]'.
8067
554f0187 80682008-02-08 Robert Millan <rmh@aybabtu.com>
8069
8070 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8071 grub_dprintf() calls.
8072 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8073 error message.
8074
1ec8425d 80752008-02-07 Christian Franke <franke@computer.org>
8076
8077 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8078 instead of fseek and ftell to support large files.
8079 (grub_hostfs_read): Likewise.
8080
f2156fda 80812008-02-07 Robert Millan <rmh@aybabtu.com>
8082
8083 Patch from Jeroen Dekkers.
8084 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 8085 failure, since successfully reading all array members might not be
f2156fda 8086 required.
8087
9216e0e7 80882008-02-06 Robert Millan <rmh@aybabtu.com>
8089
8090 * util/grub-probe.c (probe): Simplify partmap probing (with the
8091 assumption that the first word up to the underscore equals to
8092 the module name).
8093
b0dfd29a 80942008-02-06 Christian Franke <franke@computer.org>
8095
8096 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8097 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8098 last block of a cpio or tar stream.
8099 Check for "TRAILER!!!" instead of any empty data
8100 block to detect last block of a cpio stream.
8101 (grub_cpio_dir): Fix constness of variable np.
8102 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8103 cpio or tar trailer is detected. This fixes a crash
8104 on open of a non existing file.
8105
c32865bf 81062008-02-05 Bean <bean123ch@gmail.com>
8107
8108 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8109 address of entry.
8110 (grub_multiboot_load_elf64): Likewise.
8111 (grub_multiboot): Initialize mbi structure.
8112
8113 * util/grub-fstest.c: Don't include unused header file script.h.
8114
fe6b695a 8115 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 8116 of file.
8117 (grub_fstest_SOURCES): Likewise.
8118
409480b7 81192008-02-05 Robert Millan <rmh@aybabtu.com>
8120
8121 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8122 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8123 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8124 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8125
8126 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8127 (translation_table): Replace hardcoded values with macros
8128 provided by `<grub/term.h>'.
8129
8130 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8131 (keyboard_map): Correct/add a few values, with macros provided
8132 by `<grub/term.h>'.
8133 (keyboard_map_shift): Zero values that don't differ from their
8134 `keyboard_map' equivalents.
8135 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8136 Discard the second scan code that is always sent by Caps lock.
8137 Only use `keyboard_map_shift' when it provides a non-zero value,
8138 otherwise fallback to `keyboard_map'.
8139
99fadbaa 81402008-02-04 Bean <bean123ch@gmail.com>
8141
8142 * Makefile.in (enable_grub_fstest): New variable.
8143
8144 * conf/common.rmk (grub_fstest_init.lst): New rule.
8145 (grub_fstest_init.h): Likewise.
8146 (grub_fstest_init.c): Likewise.
8147 (util/grub-fstest.c_DEPENDENCIES): New variable.
8148 (grub_fstest_SOURCES): Likewise.
8149
8150 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8151
8152 * util/grub-fstest.c: New file.
8153
bf567c50 81542008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8155
8156 Make grub-setup handle a separate root device.
f19dbdb7 8157
bf567c50 8158 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8159 so that the root device can be compared with the destination
8160 device.
8161 When embedding the core image, if the root and destination devices
8162 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8163 0xFF.
8164 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 8165
9be6b98b 81662008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8167
8168 Add support for having a grub directory in a different drive. This
8169 is still only the data handling part.
f19dbdb7 8170
9be6b98b 8171 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8172 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8173 (grub_root_drive): New variable.
8174
8175 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8176 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8177 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8178 as it was.
8179
8180 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8181
8182 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8183 macro.
8184 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8185
8186 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8187 is bogus, because PXE booting does not specify any drive
8188 correctly.
8189
8190 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8191 am not sure if this is really correct.
8192
8193 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8194 is always identical to the boot drive when booting from a CD.
8195
8196 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8197 longer.
8198 (root_drive): New variable.
8199 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8200 (setup_sectors): Push %dx right after popping it, because %dh will
8201 be modified later.
8202 (copy_buffer): Restore %dx.
8203
e0ca0677 82042008-02-03 Robert Millan <rmh@aybabtu.com>
8205
8206 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8207 use `cdboot.img' for cdrom images.
8208
3b3f6629 82092008-02-03 Robert Millan <rmh@aybabtu.com>
8210
8211 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8212 only setup gfxterm when `font' command has succeeded.
8213
d42b3672 82142008-02-03 Robert Millan <rmh@aybabtu.com>
8215
8216 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8217 (grub_rescue_cmd_multiboot_loader)
8218 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8219
fa370ea6 82202008-02-03 Pavel Roskin <proski@gnu.org>
8221
e0c5dacb 8222 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 8223 %edx and %esi from stack only after grub_gate_a20() is called.
8224 grub_gate_a20() clobbers %edx.
8225
f2a76e1d 82262008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8227
8228 * configure.ac (AC_INIT): Bumped to 1.96.
8229
8230 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8231 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8232 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8233 video/readers/png.c.
8234
90fd32d1 82352008-02-03 Bean <bean123ch@gmail.com>
9be665dd 8236
8237 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8238 (cdboot_img_SOURCES): New variable.
8239 (cdboot_img_ASFLAGS): New variable.
8240 (cdboot_img_LDFLAGS): New variable.
8241
8242 * boot/i386/pc/cdboot.S: New file.
8243
8244 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8245 (cd_count): Likewise.
8246 (grub_biosdisk_get_drive): Add support for cd device.
8247 (grub_biosdisk_call_hook): Likewise.
8248 (grub_biosdisk_iterate): Likewise.
8249 (grub_biosdisk_open): Likewise.
8250 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8251 (grub_biosdisk_rw): Support reading from cd device.
8252 (GRUB_MOD_INIT): Iterate cd devices.
8253
8254 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8255 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8256 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8257
8258 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8259
4020aa53 82602008-02-02 Robert Millan <rmh@aybabtu.com>
8261
8262 * commands/read.c: New file.
8263 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8264 (read_mod_SOURCES): New variable.
8265 (read_mod_CFLAGS): Likewise.
8266 (read_mod_LDFLAGS): Likewise.
8267
e03a1132 82682008-02-02 Robert Millan <rmh@aybabtu.com>
8269
8270 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8271 determining whether menu has to be displayed.
8272
58c69220 82732008-02-02 Marco Gerards <marco@gnu.org>
8274
8275 * bus/pci.c: New file.
8276
8277 * include/grub/pci.h: Likewise.
8278
8279 * include/grub/i386/pc/pci.h: Likewise.
8280
8281 * commands/lspci.c: Likewise.
8282
8283 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8284 `lspci.mod'.
8285 (pci_mod_SOURCES): New variable.
8286 (pci_mod_CFLAGS): Likewise.
8287 (pci_mod_LDFLAGS): Likewise.
8288 (lspci_mod_SOURCES): Likewise.
8289 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 8290 (lspci_mod_LDFLAGS): Likewise.
58c69220 8291
c004e1b4 82922008-02-02 Bean <bean123ch@gmail.com>
8293
8294 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8295 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8296
8297 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8298 (grub_xfs_btree_node): New structure.
8299 (grub_xfs_btree_root): New structure.
8300 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8301 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8302 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8303 (GRUB_XFS_EXTENT_SIZE): Likewise.
8304 (grub_xfs_read_block): Support btree format type.
8305 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8306 Use directory block as basic unit.
8307
8308 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8309
8310 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8311 __attribute__ ((__regparm__ (1))).
8312
f95562bf 83132008-02-01 Robert Millan <rmh@aybabtu.com>
8314
8315 Correct a mistake in previous commit.
8316
8317 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8318 top.
8319 (normal/command.c_DEPENDENCIES): New variable.
8320
7d31f41f 83212008-02-01 Robert Millan <rmh@aybabtu.com>
8322
8323 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8324 top.
8325 (normal/command.c_DEPENDENCIES): New variable.
8326 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8327 * conf/i386-ieee1275.rmk: Likewise.
8328 * conf/i386-linuxbios.rmk: Likewise.
8329 * conf/i386-pc.rmk: Likewise.
8330 * conf/sparc64-ieee1275.rmk: Likewise.
8331 * conf/powerpc-ieee1275.rmk: Likewise.
8332 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8333
8334 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8335
60b6be74 83362008-02-01 Robert Millan <rmh@aybabtu.com>
8337
8338 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8339 call at beginning of function.
8340
078522ab 83412008-01-31 Pavel Roskin <proski@gnu.org>
8342
8343 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 8344 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8345 (grub_mkrescue_SOURCES): Likewise.
078522ab 8346 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8347
ccaa8a5f 83482008-01-30 Robert Millan <rmh@aybabtu.com>
8349
8350 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8351 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8352 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8353 (grub_probe_SOURCES): ... to here.
8354
8355 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8356 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8357 * conf/i386-ieee1275.rmk: Likewise.
8358 * conf/i386-linuxbios.rmk: Likewise.
8359 * conf/powerpc-ieee1275.rmk: Likewise.
8360
ae5a9cd7 83612008-01-30 Tristan Gingold <gingold@free.fr>
8362
8363 * kern/rescue.c: Silently accept empty lines.
8364
70bc2ef2 83652008-01-29 Bean <bean123ch@gmail.com>
8366
8367 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8368 (real_code_2): Code cleanup and change comment style.
8369 (move_memory): Avoid using 32-bit address mode.
8370
6a4d50ea 83712008-01-29 Bean <bean123ch@gmail.com>
8372
8373 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8374 (png_mod_SOURCES): New variable.
8375 (png_mod_CFLAGS): Likewise.
8376 (png_mod_LDFLAGS): Likewise.
8377
8378 * video/readers/png.c: New file.
8379
11cc30ac 83802008-01-28 Robert Millan <rmh@aybabtu.com>
8381
8382 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8383 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8384 `ifndef GRUB_MOD_GAP' hack.
8385 * util/elf/grub-mkimage.c (add_segments): Likewise.
8386
3abc589f 83872008-01-27 Robert Millan <rmh@aybabtu.com>
8388
8389 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8390 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 8391 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 8392
e1907778 83932008-01-27 Robert Millan <rmh@aybabtu.com>
8394
8395 Get grub-emu to build again (including parallel builds).
8396
8397 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8398 Split into ...
8399 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8400 (normal/execute.c_DEPENDENCIES): ... this, ...
8401 (grub-emu_DEPENDENCIES): ... and this.
8402
8403 * conf/i386-efi.rmk: Likewise.
8404 * conf/i386-linuxbios.rmk: Likewise.
8405 * conf/i386-ieee1275.rmk: Likewise.
8406 * conf/powerpc-ieee1275.rmk: Likewise.
8407 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8408
2216b101 84092008-01-27 Robert Millan <rmh@aybabtu.com>
8410
8411 * NEWS: Add a few items.
8412
f75172d9 84132008-01-27 Robert Millan <rmh@aybabtu.com>
8414
8415 Fix parallel builds with grub-emu. Based on earlier commit for
8416 grub-probe and grub-setup.
8417
8418 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8419 (util/grub-emu.c_DEPENDENCIES): ... this.
8420 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8421 (util/grub-emu.c_DEPENDENCIES): ... this.
8422 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8423 (util/grub-emu.c_DEPENDENCIES): ... this.
8424 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8425 (util/grub-emu.c_DEPENDENCIES): ... this.
8426 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8427 (util/grub-emu.c_DEPENDENCIES): ... this.
8428
3f51de77 84292008-01-27 Pavel Roskin <proski@gnu.org>
8430
8431 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8432 to create a gap between _end and the modules added to the image
8433 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8434 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8435 * util/elf/grub-mkimage.c (add_segments): Likewise.
8436
2033f53e 84372008-01-26 Pavel Roskin <proski@gnu.org>
8438
8439 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8440 just return an error.
8441
22da1f6f 84422008-01-26 Bean <bean123ch@gmail.com>
8443
8444 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8445 (grub_reiserfs_get_item): Save offset of the next item.
8446 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8447
2a9525e6 84482008-01-25 Robert Millan <rmh@aybabtu.com>
8449
8450 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8451 make all filesystem sources appear together (possibly fixing omissions
8452 while at it).
8453 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8454 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8455 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8456 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8457
8458 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8459 add `kern/file.c'.
8460 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8461 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8462 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8463 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8464
8465 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8466 (probe): Add a sanity check to make sure of our ability to read
8467 requested files when probing for filesystem type.
8468
8469 * genmk.rb: Update copyright year (2007).
8470
8471 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8472 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8473 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8474 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8475 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8476 : Remove function prototypes.
8477
b95f71b5 84782008-01-25 Robert Millan <rmh@aybabtu.com>
8479
8480 Revert my previous commits (based on wrong assumption of how grub_errno
8481 works).
8482
fe6b695a 8483 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 8484 * kern/file.c (grub_file_open): Likewise.
8485
d08bbb49 84862008-01-24 Pavel Roskin <proski@gnu.org>
8487
8488 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8489 that hang if GRUB tries to setup colors.
8490 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8491 colors for firmwares that don't support it.
8492 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8493 Recognize Open Hack'Ware, set flags to work around its
8494 limitations.
8495
605e36ed 84962008-01-24 Robert Millan <rmh@aybabtu.com>
8497
8498 * kern/file.c (grub_file_open): Do not account previous failures of
8499 unrelated functions when grub_errno is checked for.
8500 Reported by Oleg Strikov.
8501
bac332a1 85022008-01-24 Bean <bean123ch@gmail.com>
8503
8504 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8505 (grub_ufs_sblock): New member volume name.
8506 (grub_ufs_find_file): Fix string copy bug.
8507 (grub_ufs_label): Implement this function properly.
8508
8509 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8510 (grub_hfs_iterate_records): Use the correct file number for extents
8511 and catalog file. Fix problem in next index calculation.
8512 (grub_hfs_find_node): Replace recursive function call with loop.
8513 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8514
15c80c09 85152008-01-23 Robert Millan <rmh@aybabtu.com>
8516
8517 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8518 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8519 (grub_multiboot2_real_boot): New function prototype.
8520
8521 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8522 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8523
8524 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8525 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8526
305338fd 85272008-01-23 Robert Millan <rmh@aybabtu.com>
8528
8529 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8530 #ifdef'ed out grub_printf().
8531
3ea52685 85322008-01-23 Robert Millan <rmh@aybabtu.com>
8533
8534 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8535 grub_dprintf calls, since they make "debug=all" mode unusable.
8536 (grub_console_checkkey): Likewise.
8537
5882ae4b 85382008-01-23 Robert Millan <rmh@aybabtu.com>
8539
8540 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8541 `term/i386/pc/at_keyboard.c'.
8542 (pkglib_MODULES): Add `serial.mod'.
8543 (serial_mod_SOURCES): New variable.
8544 (serial_mod_CFLAGS): Likewise.
8545 (serial_mod_LDFLAGS): Likewise.
8546
8547 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8548 `<grub/powerpc/ieee1275/console.h>'.
8549 (grub_keyboard_controller_init): New function prototype.
8550 (grub_console_checkkey): Likewise.
8551 (grub_console_getkey): Likewise.
8552
8553 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8554 keyboard on i386.
8555
8556 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8557 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8558
06ab5303 85592008-01-23 Robert Millan <rmh@aybabtu.com>
8560
8561 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8562 present, "(memdisk)/boot/grub" becomes the default prefix.
8563
8564 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8565 a memdisk tarball with all the modules. Add --overlay=DIR option that
8566 allows users to overlay additional files into the image.
8567
dbb475a4 85682008-01-23 Robert Millan <rmh@aybabtu.com>
8569
8570 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8571 and `machine/memory.h'.
8572 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8573 (_multiboot_mod_SOURCES): New variable.
8574 (_multiboot_mod_CFLAGS): Likewise.
8575 (_multiboot_mod_LDFLAGS): Likewise.
8576 (multiboot_mod_SOURCES): Likewise.
8577 (multiboot_mod_CFLAGS): Likewise.
8578 (multiboot_mod_LDFLAGS): Likewise.
8579
8580 * include/grub/i386/ieee1275/loader.h: New file.
8581
8582 * include/grub/i386/ieee1275/machine.h: Likewise.
8583
8584 * include/grub/i386/ieee1275/memory.h: Likewise.
8585
8586 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8587 variable declaration.
8588 (grub_os_area_size): Likewise.
8589
8590 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8591 (grub_lower_mem, grub_upper_mem): New variables.
8592 (grub_stop_floppy): New function (just to make
8593 grub_multiboot2_real_boot() happy).
8594
8595 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8596 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8597 (grub_stop): New function.
8598 Include `"../realmode.S"' and `"../loader.S"'.
8599
8600 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8601 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8602
8603 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8604 rely on grub_multiboot2_real_boot() for final boot.
8605
25638629 86062008-01-22 Robert Millan <rmh@aybabtu.com>
8607
8608 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8609 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8610 device that doesn't look like an SD card.
8611 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8612 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8613 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8614 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8615 found.
8616
9dad816d 86172008-01-22 Robert Millan <rmh@aybabtu.com>
8618
8619 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8620 avoid claiming over our own code.
8621
34842f2d 86222008-01-22 Bean <bean123ch@gmail.com>
8623
8624 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8625 (jpeg_mod_SOURCES): New variable.
8626 (jpeg_mod_CFLAGS): Likewise.
8627 (jpeg_mod_LDFLAGS): Likewise.
8628
8629 * video/readers/jpeg.c : New file.
8630
44023a28 86312008-01-22 Bean <bean123ch@gmail.com>
8632
8633 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8634 there are no more items.
8635
bc2d8ac6 86362008-01-21 Robert Millan <rmh@aybabtu.com>
8637
8638 * kern/mm.c (grub_mm_init_region): Improve debug message.
8639
261bd4bc 86402008-01-21 Robert Millan <rmh@aybabtu.com>
8641
8642 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8643 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8644 address.
8645 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8646 a C macro.
8647 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8648 Indicates start of upper memory.
8649 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8650 (generate_image): Abort when image size is big enough to corrupt
8651 upper memory.
8652
8653 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8654 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8655 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8656 instead of hardcoding 0xA0000.
8657 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8658 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8659 instead of hardcoding 0xA0000.
8660
f970b55e 86612008-01-21 Robert Millan <rmh@aybabtu.com>
8662
8663 * disk/memdisk.c (memdisk_size): New variable.
8664 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8665 `memdisk_size'.
8666 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8667 image to dynamic memory.
8668 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8669 `memdisk_size'. Free memdisk block.
8670
1a8b0526 86712008-01-21 Robert Millan <rmh@aybabtu.com>
8672
8673 Fix detection of very small filesystems (like tar).
8674
8675 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8676 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8677 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8678 a problem with this disk).
8679
6e9b4aab 86802008-01-21 Robert Millan <rmh@aybabtu.com>
8681
8682 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8683 on grub_biosdisk_rw_standard() error.
8684
0d8837b2 86852008-01-21 Robert Millan <rmh@aybabtu.com>
8686
8687 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8688 recent changes.
8689 * kern/elf.c: Likewise.
8690 * kern/ieee1275/ieee1275.c: Likewise.
8691 * kern/powerpc/ieee1275/openfw.c: Likewise.
8692 * term/ieee1275/ofconsole.c: Likewise.
8693
ffd36e34 86942008-01-21 Robert Millan <rmh@aybabtu.com>
8695
8696 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8697
3f0093d0 8698 * include/grub/kernel.h (grub_arch_memdisk_addr)
8699 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 8700
3f0093d0 8701 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8702 (grub_arch_memdisk_size): ... to here.
ffd36e34 8703
6c391b21 87042008-01-21 Robert Millan <rmh@aybabtu.com>
8705
8706 Mostly based on bugfix from Bean.
8707
8708 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8709 attribute with hook() parameter.
8710 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8711 declaration.
8712 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8713 attribute with hook() parameter.
8714 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8715 declaration.
8716
55a581dc 87172008-01-21 Robert Millan <rmh@aybabtu.com>
8718
8719 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8720 (pkglib_MODULES): Add `memdisk.mod'.
8721 (memdisk_mod_SOURCES): New variable.
8722 (memdisk_mod_CFLAGS): Likewise.
8723 (memdisk_mod_LDFLAGS): Likewise.
8724
8725 * disk/memdisk.c: New file.
8726
8727 * include/grub/disk.h (grub_disk_dev_id): Add
8728 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8729
8730 * include/grub/i386/pc/kernel.h
8731 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8732 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8733 (grub_kernel_image_size): New variable declaration.
8734 (grub_total_module_size): Likewise.
8735 (grub_memdisk_image_size): Likewise.
8736
8737 * include/grub/i386/pc/memory.h
8738 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8739
8740 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8741 (grub_arch_memdisk_addr): New variable declaration.
8742 (grub_arch_memdisk_size): Likewise.
8743
8744 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8745 (grub_arch_memdisk_size): Likewise.
8746
8747 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8748 (codestart): Replace hardcoded `0x100000' with
8749 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8750
8751 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8752 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8753 not NULL, append the contents of the file it refers to, at the end of
8754 the compressed kernel image. Initialize `grub_memdisk_image_size'
8755 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8756 (options): Add "memdisk"|'m' option.
8757 (main): Parse --memdisk|-m option, and pass user-provided path as
8758 parameter to generate_image().
8759
3d7f54c9 87602008-01-20 Robert Millan <rmh@aybabtu.com>
8761
8762 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8763 grub_dprintf() calls from here ...
8764 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8765
0bf74728 87662008-01-20 Robert Millan <rmh@aybabtu.com>
8767
8768 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8769
8770 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8771 declaration.
8772 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8773 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8774 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 8775 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 8776 property).
8777 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8778 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8779
33bf70a7 87802008-01-19 Robert Millan <rmh@aybabtu.com>
8781
fe6b695a 8782 Get rid of confusing function (superseded by
33bf70a7 8783 `grub_ieee1275_get_integer_property')
8784 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8785 prototype.
8786 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8787 function.
8788 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8789 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 8790 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 8791
e2da7d26 87922008-01-19 Robert Millan <rmh@aybabtu.com>
8793
8794 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8795 command after "shut-down", since implementations differ on which
8796 the command for halt is.
8797
59f1fd8d 87982008-01-19 Robert Millan <rmh@aybabtu.com>
8799
8800 * include/grub/i386/linuxbios/console.h: Add header protection.
8801 (grub_keyboard_controller_init): New function prototype.
8802 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8803 (KEYBOARD_COMMAND_READ): Likewise.
8804 (KEYBOARD_COMMAND_WRITE): Likewise.
8805 (KEYBOARD_SCANCODE_SET1): Likewise.
8806 (grub_keyboard_controller_write): New function.
8807 (grub_keyboard_controller_read): Likewise.
8808 (grub_keyboard_controller_init): Likewise.
8809
8810 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8811 (grub_console_init): On coreboot/LinuxBIOS, call
8812 grub_keyboard_controller_init().
8813
5f5a7c15 88142008-01-19 Robert Millan <rmh@aybabtu.com>
8815
8816 PowerPC changes provided by Pavel Roskin.
8817
8818 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8819 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8820 don't rely on cmain() doing it.
8821 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8822 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8823
1210e168 88242008-01-16 Robert Millan <rmh@aybabtu.com>
8825
8826 * include/grub/i386/linuxbios/memory.h
8827 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8828 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8829 receive `table_header' as argument. Instead, probe for it in the
8830 known memory ranges where it can be present.
8831 (grub_available_iterate): Do not pass a fixed `table_header' address
8832 to grub_linuxbios_table_iterate().
8833
3d04eab8 88342008-01-15 Robert Millan <rmh@aybabtu.com>
8835
8836 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8837 * conf/i386-ieee1275.rmk: New file.
8838 * include/grub/i386/ieee1275/console.h: Likewise.
8839 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8840 * include/grub/i386/ieee1275/kernel.h: Likewise.
8841 * include/grub/i386/ieee1275/time.h: Likewise.
8842 * kern/i386/ieee1275/init.c: Likewise.
8843 * kern/i386/ieee1275/startup.S: Likewise.
8844
d1bc1b73 88452008-01-15 Robert Millan <rmh@aybabtu.com>
8846
8847 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8848 when pointers are 32-bit (but still do set it to one when they are
8849 64-bit).
8850
66a65807 88512008-01-15 Robert Millan <rmh@aybabtu.com>
8852
8853 * include/grub/ieee1275/ieee1275.h
8854 (grub_ieee1275_get_integer_property): New function prototype.
8855
8856 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8857 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 8858 grub_ieee1275_get_property() to handle endianness.
66a65807 8859
8860 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8861 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 8862 where appropriate.
66a65807 8863 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8864 (grub_map): Likewise.
8865 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8866
a83ccafd 88672008-01-15 Bean <bean123ch@gmail.com>
8868
8869 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8870 (grub_script_execute_cmdline): Reset grub_errno.
8871
8872 * normal/main.c (read_config_file): Reset grub_errno.
8873
8874 * normal/parse.y (script_init): New.
8875 (script): Move function and menuentry here.
8876 (delimiter): New.
8877 (command): Add delimiter at the end of command.
8878 (commands): Adjust to match the new command.
8879 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 8880 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 8881 (if): Use the new commands.
8882
8883 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8884
df6ecfc6 88852008-01-15 Robert Millan <rmh@aybabtu.com>
8886
8887 * normal/menu.c (run_menu): Move timeout message from here ...
8888 (print_timeout): ... to here.
8889 (run_menu): Use print_timeout() once during initial draw to print
8890 the whole message, and again in every clock tick to update only
8891 the number of seconds.
8892
87ae25eb 88932008-01-15 Robert Millan <rmh@aybabtu.com>
8894
8895 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8896 actual size of `available' from grub_ieee1275_get_property(), and
8897 restrict parsing to that bound.
8898
47bf09a4 88992008-01-15 Christian Franke <franke@computer.org>
8900
8901 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8902 (argp_program_version): Remove variable.
8903 (argp_program_bug_address): Likewise.
8904 (options): Convert from struct argp_option to struct option.
8905 (struct arguments): Remove.
8906 (parse_opt): Remove.
8907 (usage): New function.
8908 (main): Replace struct args members by simple variables.
8909 Replace argp_parse() by getopt_long().
8910 Add switch to evaluate options.
8911 Add missing "(...)" around root_dev in prefix string.
8912
c86f1469 89132008-01-14 Robert Millan <rmh@aybabtu.com>
8914
8915 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8916 for grub_ieee1275_exit(), in order to improve portability.
8917
e622c559 89182008-01-14 Robert Millan <rmh@aybabtu.com>
8919
8920 * util/grub.d/10_linux.in (prefix): Define.
8921 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8922
44cb1ec8 89232008-01-13 Pavel Roskin <proski@gnu.org>
8924
8925 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8926 grub_errno if no errors have been detected.
8927
1eb8c802 89282008-01-12 Robert Millan <rmh@aybabtu.com>
8929
8930 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8931 (grub_util_get_dev_abstraction): New function prototype.
8932
8933 * util/getroot.c: Include `<grub/util/getroot.h>'
8934 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8935 (grub_util_get_dev_abstraction): ... here (new function).
8936
8937 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8938 `PRINT_ABSTRACTION'.
8939 (probe): Probe for abstraction type when requested.
8940 (main): Understand `--target=abstraction'.
8941
8942 * util/i386/efi/grub-install.in: Add abstraction module to core
8943 image when it is found to be necessary.
8944 * util/i386/pc/grub-install.in: Likewise.
8945 * util/powerpc/ieee1275/grub-install.in: Likewise.
8946
8947 * util/update-grub_lib.in (font_path): Return system path without
8948 converting to GRUB path.
8949 * util/update-grub.in: Convert system path returned by font_path()
8950 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8951 abstraction module is needed for loading fonts (if any). Export
8952 that as `GRUB_PRELOAD_MODULES'.
8953 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8954 insmod commands).
8955
52bd3de9 89562008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8957
8958 Remove some unused code from reiserfs.
f19dbdb7 8959
52bd3de9 8960 * fs/reiserfs.c (struct grub_reiserfs_key)
8961 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8962 (struct grub_reiserfs_node_body): Removed.
8963 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8964 Likewise.
8965 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8966 Likewise.
8967 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8968 Likewise.
8969 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8970 Likewise.
8971 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8972 Likewise.
8973 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8974 Likewise.
8975 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8976 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8977 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8978
2f80039d 89792008-01-10 Robert Millan <rmh@aybabtu.com>
8980
8981 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8982 Determines if a file is garbage left by packaging systems, etc.
8983 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8984 for processing /etc/grub.d scripts.
8985 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8986 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8987 as a condition for processing Linux images.
8988
87888032 89892008-01-10 Pavel Roskin <proski@gnu.org>
8990
8991 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8992 to compile reiserfs.c on PowerPC.
8993
7e54fced 89942008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8995
8996 * kern/device.c (grub_device_iterate): Do not abort device iteration
8997 when one of the devices cannot be opened.
8998 * kern/disk.c (grub_disk_open): Do not account previous failures of
8999 unrelated functions when grub_errno is checked for.
9000
5aa541e6 90012008-01-08 Robert Millan <rmh@aybabtu.com>
9002
9003 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9004 `! grub_linux_is_bzimage', change order of address comparison to make
9005 it more intuitive, and improve "too big zImage" error message.
9006
7076340d 90072008-01-08 Robert Millan <rmh@aybabtu.com>
9008
9009 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9010 `$(update-grub_DATA)'.
9011 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9012 targets.
9013
9ca70333 90142008-01-07 Robert Millan <rmh@aybabtu.com>
9015
9016 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9017 which instruction is modified by grub-setup during installation
9018 (since it wasn't obvious by only looking at this file).
9019
38ccf575 90202008-01-07 Robert Millan <rmh@aybabtu.com>
9021
9022 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9023 listing actual TODO items.
9024
f5db4291 90252008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9026
868967cf 9027 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9028 correctly.
9029 (grub_reiserfs_get_key_offset): Likewise.
9030 (grub_reiserfs_set_key_offset): Likewise.
9031 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 9032 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 9033
9034 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9035 better to remove the bitfield version completely.
f19dbdb7 9036
868967cf 90372008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9038
f5db4291 9039 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9040 allocated from the heap, due to the fshelp implementation.
9041 (grub_reiserfs_dir): Free NODE, due to the same reason.
9042
492e6d9d 90432008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9044
9045 Mostly from Vincent Pelletier:
f19dbdb7 9046
492e6d9d 9047 * fs/reiserfs.c: New file.
f19dbdb7 9048
492e6d9d 9049 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9050 (reiserfs_mod_SOURCES): New variable.
9051 (reiserfs_mod_CFLAGS): Likewise.
9052 (reiserfs_mod_LDFLAGS): Likewise.
9053
9054 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9055 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9056 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9057 normal/color.c.
9058
9ce3e7c1 90592008-01-06 Robert Millan <rmh@aybabtu.com>
9060
9061 * normal/color.c: Remove `<grub/env.h>'.
9062
f3b58148 90632008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9064
9065 * include/grub/normal.h: Include <grub/env.h>.
9066
7ac3bcfa 90672008-01-05 Robert Millan <rmh@aybabtu.com>
9068
9069 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9070 usage example with `(hd0,1)'.
fb358190 9071 Reported by Samuel Thibault.
7ac3bcfa 9072
c8ee99d7 90732008-01-05 Robert Millan <rmh@aybabtu.com>
9074
9075 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9076 (grub_linux_boot_zimage): Rename to ...
9077 (grub_linux_boot): ... this.
9078 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9079 (grub_linux_boot_zimage): Conditionalize zImage copy.
9080
9081 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9082 (grub_linux_boot_bzimage): Remove prototype.
9083 (grub_linux_boot_zimage): Rename to ...
9084 (grub_linux_boot): ... this.
9085
9086 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9087 (grub_linux_boot): Remove function.
9088
0ece25b1 90892008-01-05 Robert Millan <rmh@aybabtu.com>
9090
9091 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9092 (grub_env_write_color_highlight): Likewise.
9093 (grub_wait_after_message): Likewise.
9094
9095 * normal/color.c: New file.
9096
9097 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9098 (normal_mod_DEPENDENCIES): Likewise.
9099
9100 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9101 (normal_mod_DEPENDENCIES): Likewise.
9102
9103 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9104 (normal_mod_DEPENDENCIES): Likewise.
9105
9106 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9107 (normal_mod_DEPENDENCIES): Likewise.
9108
9109 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9110 for waiting after a message is printed.
9111 * normal/main.c (read_config_file): Likewise.
9112 (grub_normal_init): Register grub_env_write_color_normal() and
9113 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9114 `color_highlight' variables as global.
9115
9116 * normal/menu.c (grub_wait_after_message): New function.
9117 (grub_color_menu_normal): New variable. Replaces ...
9118 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9119 (grub_color_menu_highlight): New variable. Replaces ...
9120 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9121 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9122 `GRUB_TERM_COLOR_STANDARD'.
9123 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9124 `normal_code' and `highlight_code' to `old_color_normal' and
9125 `old_color_highlight', respectively.
9126 (grub_menu_init_page): Update colors when drawing the menu, based on
9127 `menu_color_normal' and `menu_color_highlight' variables.
9128 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9129 a message is printed.
9130
182dd4e5 91312008-01-05 Robert Millan <rmh@aybabtu.com>
9132
9133 * kern/env.c (grub_env_context_open): Propagate hooks for global
9134 variables to new context.
9135
9136 * kern/main.c (grub_set_root_dev): Export `root' variable.
9137
ddf8f6ad 91382008-01-05 Robert Millan <rmh@aybabtu.com>
9139
9140 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 9141 discs unconditionally, since udev and others have options to provide
ddf8f6ad 9142 them.
9143
d8b43d9b 91442008-01-05 Robert Millan <rmh@aybabtu.com>
9145
9146 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9147
2bff2de3 91482008-01-04 Christian Franke <franke@computer.org>
9149
9150 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9151 of eisa_mmap.
9152
97eab917 91532008-01-03 Pavel Roskin <proski@gnu.org>
9154
9155 * kern/i386/linuxbios/init.c: Put "void" to all function
9156 declarations with no arguments.
9157 * kern/powerpc/ieee1275/init.c: Likewise.
9158 * term/i386/pc/at_keyboard.c: Likewise.
9159 * term/i386/pc/vga_text.c: Likewise.
9160 * util/grub-mkdevicemap.c: Likewise.
9161
b9416d00 91622008-01-02 Robert Millan <rmh@aybabtu.com>
9163
9164 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9165 message when loaded image is out of bounds.
9166 (grub_multiboot_load_elf64): Likewise.
9167
92695df9 91682008-01-02 Pavel Roskin <proski@gnu.org>
9169
9170 * util/grub.d/10_linux.in: Try version without ".old" when
9171 looking for initrd. It's better to use initrd from the newer
9172 kernel of the same version than no initrd at all.
9173
d98d9cad 91742008-01-01 Robert Millan <rmh@aybabtu.com>
9175
9176 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9177
dbfdce36 91782008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9179
f19dbdb7 9180 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 9181 grub_video_get_active_render_target.
9182 (grub_video_adapter): Added unmap_color and get_active_render_target.
9183
f19dbdb7 9184 * video/video.c: Added grub_video_unmap_color and
dbfdce36 9185 grub_video_get_active_render_target.
9186 (grub_video_get_info): Changed method to accept NULL pointer as an
9187 argument to allow detection of active video adapter.
9188
9189 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9190 grub_video_vbe_unmap_color_int.
9191 Added grub_video_vbe_unmap_color and
9192 grub_video_vbe_get_active_render_target.
9193 (grub_video_vbe_adapter): Added unmap_color and
9194 get_active_render_target.
9195
f19dbdb7 9196 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 9197 with grub_video_vbe_unmap_color_int.
9198
9199 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9200 (DEFAULT_NORMAL_COLOR): Likewise.
9201 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9202 (DEFAULT_FG_COLOR): Removed.
9203 (DEFAULT_BG_COLOR): Likewise.
9204 (DEFAULT_CURSOR_COLOR): Changed value.
9205 (grub_virtual_screen): Added standard_color_setting,
9206 normal_color_setting, highlight_color_setting and term_color.
9207 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9208 (bitmap_width): Added.
9209 (bitmap_height): Likewise.
9210 (bitmap): Likewise.
9211 (set_term_color): Likewise.
9212 (grub_virtual_screen_setup): Changed to use new terminal coloring
9213 settings.
9214 (grub_gfxterm_init): Added init for bitmap.
9215 (grub_gfxterm_fini): Added destroy for bitmap.
9216 (redraw_screen_rect): Updated to use background bitmap and new
9217 terminal coloring.
9218 (scroll_up): Added optimization for case when there is no bitmap.
9219 (grub_gfxterm_cls): Fixed to use correct background color.
9220 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9221 coloring.
9222 (grub_virtual_screen_setcolor): Likewise.
9223 (grub_virtual_screen_getcolor): Added.
9224 (grub_gfxterm_background_image_cmd): Likewise.
9225 (grub_video_term): Added setcolor and getcolor.
9226 (MOD_INIT): Added registration of background_image command.
9227 (MOD_TERM): Added unregistration for background_image command.
9228
c3c20931 92292007-12-30 Pavel Roskin <proski@gnu.org>
9230
9231 * loader/multiboot_loader.c: Fix multiboot command
9232 unregistration. Fix all typos in the word "multiboot".
9233
df266716 92342007-12-29 Pavel Roskin <proski@gnu.org>
94239199 9235
9236 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9237 support for initrd names used in Fedora.
9238
fc6e896c 92392007-12-26 Bean <bean123ch@gmail.com>
9240
9241 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9242 (cpio_mod_SOURCES): New variable.
9243 (cpio_mod_CFLAGS): Likewise.
9244 (cpio_mod_LDFLAGS): Likewise.
9245
9246 * fs/cpio.c: New file.
9247
9248 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9249
9250 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9251
9252 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9253
9254 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9255
533110ad 92562007-12-25 Robert Millan <rmh@aybabtu.com>
9257
9258 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9259 (grub_getcolor): New function.
9260
9261 * kern/term.c (grub_getcolor): New function.
9262 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9263 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9264 (print_entry): Set normal and highlight colors to
9265 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9266 respectively, before printing and restore them to old
9267 values afterwards.
9268 (grub_menu_init_page): Likewise. Fill an additional colored space
9269 that would otherwise be left blank.
9270
9271 * term/efi/console.c (grub_console_getcolor): New function.
9272 (struct grub_console_term.getcolor): New variable.
9273 * term/i386/pc/console.c (grub_console_getcolor): New function.
9274 (struct grub_console_term.getcolor): New variable.
9275 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9276 (struct grub_console_term.getcolor): New variable.
9277
9278 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9279 (struct grub_console_term.setcolor): Remove variable.
9280 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9281 (struct grub_console_term.setcolor): Remove variable.
9282 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9283 (struct grub_console_term.setcolor): Remove variable.
9284 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9285 (struct grub_console_term.setcolor): Remove variable.
9286
4931827f 92872007-12-25 Robert Millan <rmh@aybabtu.com>
9288
9289 * configure.ac: Search for possible unifont.hex locations, and
9290 define UNIFONT_HEX if found.
9291
9292 * Makefile.in (UNIFONT_HEX): Define variable.
9293 (DATA): Rename to ...
9294 (PKGLIB): ... this. Update all users.
9295 (PKGDATA): New variable.
9296 (pkgdata_IMAGES): Rename to ...
9297 (pkglib_IMAGES): ... this. Update all users.
9298 (pkgdata_MODULES): Rename to ...
9299 (pkglib_MODULES): ... this. Update all users.
9300 (pkgdata_PROGRAMS): Rename to ...
9301 (pkglib_PROGRAMS): ... this. Update all users.
9302 (pkgdata_DATA): Rename to ...
9303 (pkglib_DATA): ... this. Update all users.
9304 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9305 (unicode.pff, ascii.pff): New rules.
9306 (all-local): Add `$(PKGDATA)' dependency.
9307 (install-local): Process `$(PKGDATA)'.
9308
9309 * util/update-grub_lib.in (font_path): Search for *.pff files in
9310 a few more locations, including `${pkgdata}'.
9311
57e57e31 93122007-12-23 Robert Millan <rmh@aybabtu.com>
9313
9314 Patch from Bean <bean123ch@gmail.com>:
9315 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9316 `size'.
9317
4bc72aa9 93182007-12-21 Bean <bean123ch@gmail.com>
9319
9320 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9321 (ntfscomp_mod_SOURCES): New variable.
9322 (ntfscomp_mod_CFLAGS): Likewise.
9323 (ntfscomp_mod_LDFLAGS): Likewise.
9324
9325 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9326 (grub_probe_SOURCES): Likewise.
9327 (grub_emu_SOURCES): Likewise.
9328
9329 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9330 (grub_emu_SOURCES): Likewise.
9331
9332 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9333 (grub_emu_SOURCES): Likewise.
9334
9335 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9336 (grub_emu_SOURCES): Likewise.
9337
9338 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9339 (read_run_list): Renamed to grub_ntfs_read_run_list.
9340 (decomp_nextvcn): Moved to ntfscomp.c.
9341 (decomp_getch): Likewise.
9342 (decomp_get16): Likewise.
9343 (decomp_block): Likewise.
9344 (read_block): Likewise.
9345 (read_data): Partially moved to ntfscomp.c.
9346 (fixup): Change unsigned to grub_uint16_t.
9347 (read_mft): Change unsigned long to grub_uint32_t.
9348 (read_attr): Likewise.
9349 (read_data): Likewise.
9350 (read_run_data): Likewise.
9351 (read_run_list): Likewise.
9352 (read_mft): Likewise.
9353
9354 * fs/ntfscomp.c: New file.
9355
9356 * include/grub/ntfs.h: New file.
9357
af680a87 93582007-12-16 Robert Millan <rmh@aybabtu.com>
9359
9360 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9361 IDE disk check, since Linux is known to support 20 IDE disks.
9362 Reported by Colin Watson.
9363
84be7599 93642007-12-15 Bean <bean123ch@gmail.com>
9365
9366 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9367 (lnxboot_img_SOURCES): New variable.
9368 (lnxboot_img_ASFLAGS): Likewise.
9369 (lnxboot_img_LDFLAGS): Likewise.
9370
9371 * boot/i386/pc/lnxboot.S: New file.
9372
6af9db01 93732007-11-24 Pavel Roskin <proski@gnu.org>
9374
9375 * configure.ac: Test if '--build-id=none' is supported by the
9376 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9377 objcopy to generate incorrect binary files (binutils
9378 2.17.50.0.18-1 as shipped by Fedora 8).
9379 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9380 linking, so that build ID doesn't break the test.
9381
7361cfe6 93822007-11-24 Pavel Roskin <proski@gnu.org>
9383
9384 * include/grub/i386/time.h: use "void" in the argument list
9385 of grub_cpu_idle().
9386 * include/grub/powerpc/time.h: Likewise.
9387 * include/grub/sparc64/time.h: Likewise.
9388
1593e10c 93892007-11-18 Christian Franke <franke@computer.org>
9390
9391 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9392 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9393 This fixes the problem that function keys did not work in grub-emu.
9394
3b8db1a8 93952007-11-18 Christian Franke <franke@computer.org>
9396
9397 * disk/host.c (grub_host_open): Remove attribute unused from
9398 name parameter. Add check for "host". This fixes the problem
9399 that grub-emu does not find partitions.
9400
2e29408d 94012007-11-18 Christian Franke <franke@computer.org>
9402
9403 * util/hostfs.c (is_dir): New function.
9404 (grub_hostfs_dir): Handle missing dirent.d_type case.
9405 (grub_hostfs_read): Add missing fseek().
9406 (grub_hostfs_label): Clear label pointer. This fixes a crash
9407 of grub-emu on "ls (host)".
9408
398cd047 94092007-11-18 Christian Franke <franke@computer.org>
9410
9411 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9412 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9413 to 64 bit boundary by default.
9414
c405c391 94152007-11-18 Bean <bean123ch@gmail.com>
9416
9417 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9418 (hexdump_mod_SOURCES): New variable.
9419 (hexdump_mod_CFLAGS): Likewise.
9420 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 9421
c405c391 9422 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9423
9424 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9425
9426 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9427
9428 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9429
9430 * include/grub/hexdump.h: New file.
9431
9432 * commands/hexdump.c: New file.
9433
5cced7fd 94342007-11-10 Robert Millan <rmh@aybabtu.com>
9435
9436 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9437 in grub_outb() calls.
9438 (beep_on): Likewise.
9439
8b714eb0 94402007-11-10 Christian Franke <franke@computer.org>
9441
9442 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9443 (grub_menu_run): Likewise.
9444
ce0f1839 94452007-11-10 Robert Millan <rmh@aybabtu.com>
9446
9447 * include/grub/i386/efi/machine.h: New file.
9448 * include/grub/i386/linuxbios/machine.h: Likewise.
9449 * include/grub/i386/pc/machine.h: Likewise.
9450 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9451 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9452
9453 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9454 (serial_hw_io_addr): New variable.
9455 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9456 instead of `(unsigned short *) 0x400'.
9457
270c237d 94582007-11-10 Bean <bean123ch@gmail.com>
9459
9460 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9461
a87783bf 94622007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9463
9464 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9465 (vga_mod_SOURCES): Added.
9466 (vga_mod_CFLAGS): Likewise.
9467 (vga_mod_LDFLAGS): Likewise.
9468
9469 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9470 grub_outb() calls.
9471 (set_map_mask): Likewise.
9472 (set_read_map): Likewise.
9473 (set_read_address): Likewise.
9474 (vga_font): Removed variable.
9475 (get_vga_glyph): Removed function.
9476 (invalidate_char): Likewise.
9477 (write_char): Changed to use grub_font_get_glyph() for font
9478 information.
9479 (grub_vga_putchar): Likewise.
9480 (grub_vga_getcharwidth): Likewise.
9481
6433b448 94822007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9483
9484 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9485 flags.
9486 (pxeboot_img_LDFLAGS): Likewise.
9487 (diskboot_img_LDFLAGS): Likewise.
9488 (kernel_img_LDFLAGS): Likewise.
9489
49178511 94902007-11-06 Robert Millan <rmh@aybabtu.com>
9491
9492 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9493 in grub_outb() calls.
9494 (serial_hw_init): Likewise.
9495
53b052de 94962007-11-05 Robert Millan <rmh@aybabtu.com>
9497
9498 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9499 spaces. Skip non-regular files.
9500
5ab33bba 95012007-11-05 Robert Millan <rmh@aybabtu.com>
9502
9503 * kern/disk.c (grub_disk_firmware_fini)
9504 (grub_disk_firmware_is_tainted): New variables.
9505
9506 * include/grub/disk.h (grub_disk_firmware_fini)
9507 (grub_disk_firmware_is_tainted): Likewise.
9508
9509 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9510 (grub_disk_biosdisk_fini): ... to here.
9511 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9512 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9513 is set. Register grub_disk_biosdisk_fini() in
9514 `grub_disk_firmware_fini'.
9515
9516 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9517 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9518 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9519 to finish existing firmware disk interface.
9520
9521 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9522 (ata_mod_SOURCES): New variable.
9523 (ata_mod_CFLAGS): Likewise.
9524 (ata_mod_LDFLAGS): Likewise.
9525
0149ab7c 95262007-11-05 Robert Millan <rmh@aybabtu.com>
9527
9528 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9529 (grub_ata_wait): Reimplement using grub_millisleep().
9530
9531 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9532 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9533
be7ac41e 95342007-11-03 Marco Gerards <marco@gnu.org>
9535
9536 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9537 (CRTC_ADDR_PORT): New macro.
9538 (CRTC_DATA_PORT): Likewise.
9539 (CRTC_CURSOR): Likewise.
9540 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9541 (CRTC_CURSOR_ADDR_LOW): Likewise.
9542 (update_cursor): New function.
9543 (grub_console_real_putchar): Call `update_cursor'.
9544 (grub_console_gotoxy): Likewise.
9545 (grub_console_cls): Set the default color when clearing the
9546 screen.
9547 (grub_console_setcursor): Implemented.
9548
bb06ab2e 95492007-11-03 Marco Gerards <marco@gnu.org>
9550
9551 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9552 become activate.
9553 (grub_ata_pio_write): Likewise.
9554
9555 (grub_atapi_identify): Wait after issuing an ATA command.
9556 (grub_atapi_packet): Likewise.
9557 (grub_ata_identify): Likewise.
9558 (grub_ata_readwrite): Likewise.
9559
cf8f780b 95602007-11-03 Marco Gerards <marco@gnu.org>
9561
9562 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9563 (grub_ata_pio_write): Likewise.
9564 (grub_ata_readwrite): Use `grub_error', instead of
9565 returning `grub_errno'.
9566
ed649e54 95672007-11-03 Marco Gerards <marco@gnu.org>
9568
9569 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9570 grub_ata_pio_write once for every single sector, instead of for
9571 multiple sectors.
9572
ca25d8f0 95732007-10-31 Robert Millan <rmh@aybabtu.com>
9574
9575 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9576
9577 * conf/i386-linuxbios.rmk: New file.
9578
9579 * kern/i386/pc/hardware.c: Likewise.
9580 * term/i386/pc/at_keyboard.c: Likewise.
9581 * term/i386/pc/vga_text.c: Likewise.
9582
9583 * include/grub/i386/linuxbios/boot.h: Likewise.
9584 * include/grub/i386/linuxbios/console.h: Likewise.
9585 * include/grub/i386/linuxbios/init.h: Likewise.
9586 * include/grub/i386/linuxbios/kernel.h: Likewise.
9587 * include/grub/i386/linuxbios/loader.h: Likewise.
9588 * include/grub/i386/linuxbios/memory.h: Likewise.
9589 * include/grub/i386/linuxbios/serial.h: Likewise.
9590 * include/grub/i386/linuxbios/time.h: Likewise.
9591
9592 * kern/i386/linuxbios/init.c: Likewise.
9593 * kern/i386/linuxbios/startup.S: Likewise.
9594 * kern/i386/linuxbios/table.c: Likewise.
9595
e911ecc1 95962007-10-31 Marco Gerards <marco@gnu.org>
9597
9598 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9599 (ata_mod_SOURCES): New variable.
9600 (ata_mod_CFLAGS): Likewise.
9601 (ata_mod_LDFLAGS): Likewise.
9602
9603 * disk/ata.c: New file.
9604
9605 * include/grub/disk.h (grub_disk_dev_id): Add
9606 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 9607
7f66d0e0 96082007-10-31 Robert Millan <rmh@aybabtu.com>
9609
9610 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9611 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9612
9613 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9614 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9615
9616 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9617 `<grub/types.h>'.
9618
9619 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9620
5cd7dd46 96212007-10-27 Robert Millan <rmh@aybabtu.com>
9622
3236ca65 9623 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 9624
2ebfc90f 96252007-10-22 Robert Millan <rmh@aybabtu.com>
9626
9627 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9628 `"../realmode.S"'.
9629 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9630
73fcb0f3 96312007-10-22 Robert Millan <rmh@aybabtu.com>
9632
9633 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9634 (pkgdata_MODULES): Add `biosdisk.mod'.
9635 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9636 variables.
9637
9638 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9639 (grub_biosdisk_init): Replace with ...
9640 (GRUB_MOD_INIT(biosdisk)): ... this.
9641 (grub_biosdisk_fini): Replace with ...
9642 (GRUB_MOD_FINI(biosdisk)): ... this.
9643
9644 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9645 (grub_machine_init): Remove call to grub_biosdisk_init().
9646 (grub_machine_fini): Remove call to grub_machine_fini().
9647
9648 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9649
3381d274 96502007-10-22 Robert Millan <rmh@aybabtu.com>
9651
9652 * include/grub/time.h: New file.
9653 * include/grub/i386/time.h: Likewise.
9654 * include/grub/powerpc/time.h: Likewise.
9655 * include/grub/sparc64/time.h: Likewise.
9656
9657 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9658 instances to ...
9659 (KERNEL_MACHINE_TIME_HEADER): ... this.
9660 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9661 instances to ...
9662 (KERNEL_MACHINE_TIME_HEADER): ... this.
9663 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9664 instances to ...
9665 (KERNEL_MACHINE_TIME_HEADER): ... this.
9666
9667 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9668 (grub_millisleep): New function.
9669 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9670 (grub_millisleep): New function.
9671 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9672 Remove `grub/machine/time.h' include.
9673 (grub_millisleep): New function.
9674 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9675 Remove `grub/machine/time.h' include.
9676 (grub_millisleep): New function.
9677
9678 * include/grub/misc.h (grub_div_roundup): New function.
9679
9680 * kern/misc.c: Include `<grub/time.h>'.
9681 (grub_millisleep_generic): New function.
9682
9683 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9684 Add `time.h'.
9685 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9686 Add `time.h'.
9687 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9688 `machine/time.h'. Add `time.h'.
9689 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9690
a39a0312 96912007-10-21 Robert Millan <rmh@aybabtu.com>
9692
9693 * include/grub/misc.h (grub_max): New function.
9694
2aad70e2 96952007-10-21 Robert Millan <rmh@aybabtu.com>
9696
9697 * util/misc.c (grub_util_info): Call fflush() before returning.
9698
54b71c4b 96992007-10-20 Robert Millan <rmh@aybabtu.com>
9700
9701 * genmk.rb (Image): Copy `extra_flags' from here ...
9702 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9703
9704 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9705 to `argc' and `args' arguments.
9706
a979f513 97072007-10-17 Robert Millan <rmh@aybabtu.com>
9708
9709 * kern/i386/loader.S: New file.
9710
9711 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9712 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9713 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9714 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9715 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9716 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9717 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9718 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9719 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9720 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9721 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9722 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9723 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9724 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9725
9726 * kern/i386/realmode.S: New file.
9727
9728 * kern/i386/pc/startup.S (protstack): Moved from here ...
9729 * kern/i386/realmode.S (protstack)... to here.
9730 * kern/i386/pc/startup.S (gdt): Moved from here ...
9731 * kern/i386/realmode.S (gdt)... to here.
9732 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9733 * kern/i386/realmode.S (prot_to_real)... to here.
9734
9735 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9736 `kern/i386/realmode.S'.
9737
825fc8fd 97382007-10-17 Robert Millan <rmh@aybabtu.com>
9739
9740 * include/grub/i386/loader.h: New file.
9741
9742 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9743 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9744 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9745 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9746 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9747 * include/grub/i386/loader.h (grub_linux_prot_size)
9748 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9749 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9750 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9751 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9752
9753 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9754
e179b2f4 97552007-10-15 Robert Millan <rmh@aybabtu.com>
9756
9757 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9758 filesystem when dev->disk is unset.
9759 Do probe for filesystem even when dev->disk->has_partitions is set.
9760 In case a filesystem is found, always report it.
9761 In case it isn't, if dev->disk->has_partitions is set, report that
9762 a partition table was found instead of reporting that no filesystem
9763 could be identified.
9764
5db82af6 97652007-10-12 Robert Millan <rmh@aybabtu.com>
9766
9767 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9768 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9769
68f6ac74 9770 * include/grub/types.h (grub_host_to_target16): New macro.
9771 (grub_host_to_target32): Likewise.
9772 (grub_host_to_target64): Likewise.
9773 (grub_target_to_host16): Likewise.
9774 (grub_target_to_host32): Likewise.
9775 (grub_target_to_host64): Likewise.
5db82af6 9776
9777 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9778 Renamed from to ...
9779 (GRUB_MOD_ALIGN): ...this. Update all users.
9780
68f6ac74 9781 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9782 grub_host_to_target32.
9783 Replace grub_be_to_cpu32 with grub_target_to_host32.
9784 (load_modules): Likewise.
9785 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9786 Replace grub_be_to_cpu32 with grub_target_to_host32.
9787 Replace grub_cpu_to_be16 with grub_host_to_target16.
9788 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 9789
3cf497cc 97902007-10-12 Robert Millan <rmh@aybabtu.com>
9791
9792 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9793 * util/elf/grub-mkimage.c: ... here.
9794
9795 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9796 `util/powerpc/ieee1275/grub-mkimage.c'.
9797
c8cc3692 97982007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 9799
c8cc3692 9800 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9801 and make it easier to figure out.
9802 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9803 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9804 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9805 leave us with less than HEAP_MIN_SIZE total heap.
9806 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 9807
5c58b791 98082007-10-03 Robert Millan <rmh@aybabtu.com>
9809
9810 * include/grub/i386/io.h: New file.
9811 * commands/i386/pc/play.c (inb): Removed.
9812 (outb): Removed.
9813 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9814 with grub_outb().
afcd2ef8 9815 * term/i386/pc/serial.c (inb): Removed.
9816 (outb): Removed.
9817 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9818 with grub_outb().
9819 * term/i386/pc/vga.c (inb): Removed.
9820 (outb): Removed.
9821 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9822 with grub_outb().
5c58b791 9823
1a477ed6 98242007-10-02 Robert Millan <rmh@aybabtu.com>
9825
9826 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9827 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9828 Reported by Marcin Kurek.
9829
6b5d80fa 98302007-09-07 Robert Millan <rmh@aybabtu.com>
9831
9832 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9833 SmartFirmware version updates (as released by Sven Luther), and avoid
9834 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9835 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9836 known broken.
9837
5618afbf 98382007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9839
9840 From Hitoshi Ozeki:
9841 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9842 when merging two regions.
9843
6139dcd9 98442007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9845
508e39ee 9846 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9847 * normal/completion.c (grub_normal_do_completion): Likewise.
9848 Reported by Hitoshi Ozeki.
9849
98502007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9851
6139dcd9 9852 Do not use devices at boot in chainloading.
f19dbdb7 9853
6139dcd9 9854 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9855 (boot_part_addr): Likewise.
9856 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9857 with BOOT_DRIVE and BOOT_PART_ADDR.
9858 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9859 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9860
38da6516 98612007-08-29 Robert Millan <rmh@aybabtu.com>
9862
9863 Patch from Simon Peter <dn.tlp@gmx.net>:
9864 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9865 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9866 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9867 util/i386/pc/grub-setup.c_DEPENDENCIES.
9868 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9869 util/grub-probe.c_DEPENDENCIES.
9870 * conf/powerpc-ieee1275.rmk: Likewise.
9871
29d0928c 98722007-08-28 Robert Millan <rmh@aybabtu.com>
9873
9874 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9875 to tell grub-mkdevicemap how to name devices.
9876 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9877 feature).
9878
9879 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9880 util/i386/get_disk_name.c.
9881 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9882 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9883 util/ieee1275/get_disk_name.c.
9884
9885 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9886
9887 * DISTLIST: Add util/i386/get_disk_name.c and
9888 util/ieee1275/get_disk_name.c.
9889
9890 * util/grub-mkdevicemap.c: Replace device naming logic with
9891 grub_util_get_disk_name() calls.
9892
5a0d3cca 98932007-08-20 Robert Millan <rmh@aybabtu.com>
9894
9895 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9896 (so that it works for both plural and singular quantities).
9897
8b72db2f 98982007-08-05 Robert Millan <rmh@aybabtu.com>
9899
9900 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9901 so that [xz] isn't taken into account when determining order.
9902
352466bf 99032007-08-02 Marco Gerards <marco@gnu.org>
9904
9905 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9906 `include/multiboot2.h', `include/grub/elfload.h',
9907 `include/multiboot.h', `include/grub/multiboot.h',
9908 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9909 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9910 `kern/elf.c', `loader/multiboot_loader.c',
9911 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9912 `loader/i386/pc/multiboot2.c',
9913 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9914 `util/i386/pc/grub-mkrescue.in'. Remove
9915 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9916 `include/grub/i386/pc/util/biosdisk.h' and
9917 `include/grub/powerpc/ieee1275/multiboot.h'.
9918
8f096014 99192007-08-02 Bean <bean123ch@gmail.com>
9920
9921 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9922 (ntfs_mod_SOURCES): New variable.
9923 (ntfs_mod_CFLAGS): Likewise.
9924 (ntfs_mod_LDFLAGS): Likewise.
9925
9926 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9927 (grub_probe_SOURCES): Likewise.
9928 (grub_emu_SOURCES): Likewise.
9929
9930 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9931 (grub_emu_SOURCES): Likewise.
9932
9933 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9934 (grub_emu_SOURCES): Likewise.
f19dbdb7 9935
8f096014 9936 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9937
9938 * fs/ntfs.c: New file.
9939
9959f7db 99402007-08-02 Bean <bean123ch@gmail.com>
9941
9942 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9943
9944 * file.h (grub_file): Likewise.
9945
9946 * fshelp.h (grub_fshelp_read_file): Likewise.
9947
9948 * util/i386/pc/grub-setup.c (setup): Likewise.
9949 (save_first_sector): Likewise.
9950 (save_blocklists): Likewise.
f19dbdb7 9951
9959f7db 9952 * fs/affs.c (grub_affs_read_file): Likewise.
9953
9954 * fs/ext2.c (grub_ext2_read_file): Likewise.
9955
9956 * fs/fat.c (grub_fat_read_data): Likewise.
9957
9958 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9959
9960 * fs/hfs.c (grub_hfs_read_file): Likewise.
9961
9962 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9963
9964 * fs/jfs.c (grub_jfs_read_file): Likewise.
9965
9966 * fs/minix.c (grub_minix_read_file): Likewise.
9967
9968 * fs/sfs.c (grub_sfs_read_file): Likewise.
9969
9970 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9971
9959f7db 9972 * fs/xfs.c (grub_xfs_read_file): Likewise.
9973
9974 * command/blocklist.c (read_blocklist): Likewise.
9975 (print_blocklist): Likewise.
9976
0a203f83 99772007-08-02 Marco Gerards <marco@gnu.org>
9978
9979 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9980 `util/hostfs.c'.
9981
9982 * disk/host.c: New file.
9983
9984 * util/hostfs.c: Likewise.
9985
9986 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9987 return `GRUB_ERR_BAD_FS'.
9988 * fs/sfs.c (grub_sfs_mount): Likewise.
9989 * fs/xfs.c (grub_xfs_mount): Likewise.
9990
9991 * include/grub/disk.h (enum grub_disk_dev_id): Add
9992 `GRUB_DISK_DEVICE_HOST_ID'.
9993
9994 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9995
e5dfe777 99962007-07-24 Jerone Young <jerone@gmail.com>
9997
f19dbdb7 9998 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9999 modules for compilation.
10000 * conf/powerpc-ieee1275.rmk: Likewise.
10001
10002 * include/multiboot.h: Move multiboot definitions to one file. Rename
10003 many definitions to not get grub specific.
10004 * include/multiboot2.h: Create header with multiboot 2 definitions.
10005 * include/grub/multiboot.h: Header for grub specific function
10006 prototypes and definitions.
10007 * include/grub/multiboot2.h: Likewise.
10008 * include/grub/multiboot_loader.h: Likewise.
10009 * include/grub/i386/pc/multiboot.h: Removed.
10010 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10011
10012 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10013 and 2 to allow for one multiboot and module commands.
10014 * loader/multiboot2.c: Add multiboot2 functionality.
10015 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10016 and definition names.
10017 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10018 2 functions.
10019 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10020 ieee1275 specific multiboot2 code.
10021
10022 * kern/i386/pc/startup.S: Change headers and definition names for
10023 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10024
daf0f0ba 100252007-07-22 Robert Millan <rmh@aybabtu.com>
10026
10027 * geninitheader.sh: Process file specified in first parameter rather
10028 than hardcoding grub_modules_init.lst.
fe6b695a 10029 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 10030 than hardcoding grub_modules_init.h.
10031
10032 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10033 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10034 grub_probe_init.[ch] and grub_setup_init.[ch].
10035
10036 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10037 grub_modules_init.h with grub_emu_init.h.
10038 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10039 grub_probe_init.[ch] files.
10040 * conf/i386-efi.rmk: Likewise.
10041 * conf/i386-pc.rmk: Likewise.
10042 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10043 grub_setup_init.[ch] files.
10044
10045 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10046 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10047 to initialize modules rather than a list of hardcoded functions.
10048 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10049 grub_init_all() to initialize modules rather than a list of hardcoded
10050 functions.
10051
54cdc1cc 100522007-07-22 Robert Millan <rmh@aybabtu.com>
10053
10054 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10055 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10056
ad0686cc 100572007-07-22 Robert Millan <rmh@aybabtu.com>
10058
10059 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10060 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10061 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10062 flag when running on SmartFirmware.
10063 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10064 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10065 was set.
10066
10067 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10068 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10069 rather than decreasing it.
10070
10071 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10072 there's not enough space to do it, fail in the same way as when it
10073 can't be done because there are no partitions.
10074
10075 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10076 when nvsetenv failed.
10077
969c02ec 100782007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10079
10080 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10081 because this rule is automatically generated.
10082 (grub-mkrescue): Removed for the same reason as above.
10083
5a79f472 100842007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10085
10086 Migrate to GNU General Public License Version 3.
f19dbdb7 10087
5a79f472 10088 * COPYING: Replaced with the plain text version of GPLv3.
10089
10090 * config.guess: Updated from gnulib.
10091 * config.sub: Likewise.
10092
10093 * geninit.sh: Output a GPLv3 copyright notice.
10094 * geninitheader.sh: Likewise.
10095 * genmodsrc.sh: Likewise.
10096 * gensymlist.sh.in: Likewise.
10097
10098 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10099 * boot/i386/pc/diskboot.S: Likewise.
10100 * boot/i386/pc/pxeboot.S: Likewise.
10101 * commands/blocklist.c: Likewise.
10102 * commands/boot.c: Likewise.
10103 * commands/cat.c: Likewise.
10104 * commands/cmp.c: Likewise.
10105 * commands/configfile.c: Likewise.
10106 * commands/echo.c: Likewise.
10107 * commands/help.c: Likewise.
10108 * commands/ls.c: Likewise.
10109 * commands/search.c: Likewise.
10110 * commands/terminal.c: Likewise.
10111 * commands/test.c: Likewise.
10112 * commands/videotest.c: Likewise.
10113 * commands/i386/cpuid.c: Likewise.
10114 * commands/i386/pc/halt.c: Likewise.
10115 * commands/i386/pc/play.c: Likewise.
10116 * commands/i386/pc/reboot.c: Likewise.
10117 * commands/i386/pc/vbeinfo.c: Likewise.
10118 * commands/i386/pc/vbetest.c: Likewise.
10119 * commands/ieee1275/halt.c: Likewise.
10120 * commands/ieee1275/reboot.c: Likewise.
10121 * commands/ieee1275/suspend.c: Likewise.
10122 * disk/loopback.c: Likewise.
10123 * disk/lvm.c: Likewise.
10124 * disk/raid.c: Likewise.
10125 * disk/efi/efidisk.c: Likewise.
10126 * disk/i386/pc/biosdisk.c: Likewise.
10127 * disk/ieee1275/ofdisk.c: Likewise.
10128 * font/manager.c: Likewise.
10129 * fs/affs.c: Likewise.
10130 * fs/ext2.c: Likewise.
10131 * fs/fat.c: Likewise.
10132 * fs/fshelp.c: Likewise.
10133 * fs/hfs.c: Likewise.
10134 * fs/hfsplus.c: Likewise.
10135 * fs/iso9660.c: Likewise.
10136 * fs/jfs.c: Likewise.
10137 * fs/minix.c: Likewise.
10138 * fs/sfs.c: Likewise.
10139 * fs/ufs.c: Likewise.
10140 * fs/xfs.c: Likewise.
10141 * hello/hello.c: Likewise.
10142 * include/grub/acorn_filecore.h: Likewise.
10143 * include/grub/arg.h: Likewise.
10144 * include/grub/bitmap.h: Likewise.
10145 * include/grub/boot.h: Likewise.
10146 * include/grub/cache.h: Likewise.
10147 * include/grub/device.h: Likewise.
10148 * include/grub/disk.h: Likewise.
10149 * include/grub/dl.h: Likewise.
10150 * include/grub/elfload.h: Likewise.
10151 * include/grub/env.h: Likewise.
10152 * include/grub/err.h: Likewise.
10153 * include/grub/file.h: Likewise.
10154 * include/grub/font.h: Likewise.
10155 * include/grub/fs.h: Likewise.
10156 * include/grub/fshelp.h: Likewise.
10157 * include/grub/gzio.h: Likewise.
10158 * include/grub/hfs.h: Likewise.
10159 * include/grub/kernel.h: Likewise.
10160 * include/grub/loader.h: Likewise.
10161 * include/grub/lvm.h: Likewise.
10162 * include/grub/misc.h: Likewise.
10163 * include/grub/mm.h: Likewise.
10164 * include/grub/net.h: Likewise.
10165 * include/grub/normal.h: Likewise.
10166 * include/grub/parser.h: Likewise.
10167 * include/grub/partition.h: Likewise.
10168 * include/grub/pc_partition.h: Likewise.
10169 * include/grub/raid.h: Likewise.
10170 * include/grub/rescue.h: Likewise.
10171 * include/grub/script.h: Likewise.
10172 * include/grub/setjmp.h: Likewise.
10173 * include/grub/symbol.h: Likewise.
10174 * include/grub/term.h: Likewise.
10175 * include/grub/terminfo.h: Likewise.
10176 * include/grub/tparm.h: Likewise.
10177 * include/grub/types.h: Likewise.
10178 * include/grub/video.h: Likewise.
10179 * include/grub/efi/api.h: Likewise.
10180 * include/grub/efi/chainloader.h: Likewise.
10181 * include/grub/efi/console.h: Likewise.
10182 * include/grub/efi/console_control.h: Likewise.
10183 * include/grub/efi/disk.h: Likewise.
10184 * include/grub/efi/efi.h: Likewise.
10185 * include/grub/efi/pe32.h: Likewise.
10186 * include/grub/efi/time.h: Likewise.
10187 * include/grub/i386/linux.h: Likewise.
10188 * include/grub/i386/setjmp.h: Likewise.
10189 * include/grub/i386/types.h: Likewise.
10190 * include/grub/i386/efi/kernel.h: Likewise.
10191 * include/grub/i386/efi/loader.h: Likewise.
10192 * include/grub/i386/efi/time.h: Likewise.
10193 * include/grub/i386/pc/biosdisk.h: Likewise.
10194 * include/grub/i386/pc/boot.h: Likewise.
10195 * include/grub/i386/pc/chainloader.h: Likewise.
10196 * include/grub/i386/pc/console.h: Likewise.
10197 * include/grub/i386/pc/init.h: Likewise.
10198 * include/grub/i386/pc/kernel.h: Likewise.
10199 * include/grub/i386/pc/loader.h: Likewise.
10200 * include/grub/i386/pc/memory.h: Likewise.
10201 * include/grub/i386/pc/multiboot.h: Likewise.
10202 * include/grub/i386/pc/serial.h: Likewise.
10203 * include/grub/i386/pc/time.h: Likewise.
10204 * include/grub/i386/pc/vbe.h: Likewise.
10205 * include/grub/i386/pc/vbeblit.h: Likewise.
10206 * include/grub/i386/pc/vbefill.h: Likewise.
10207 * include/grub/i386/pc/vbeutil.h: Likewise.
10208 * include/grub/i386/pc/vga.h: Likewise.
10209 * include/grub/ieee1275/ieee1275.h: Likewise.
10210 * include/grub/ieee1275/ofdisk.h: Likewise.
10211 * include/grub/powerpc/libgcc.h: Likewise.
10212 * include/grub/powerpc/setjmp.h: Likewise.
10213 * include/grub/powerpc/types.h: Likewise.
10214 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10215 * include/grub/powerpc/ieee1275/console.h: Likewise.
10216 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10217 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10218 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10219 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10220 * include/grub/powerpc/ieee1275/time.h: Likewise.
10221 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10222 * include/grub/sparc64/libgcc.h: Likewise.
10223 * include/grub/sparc64/setjmp.h: Likewise.
10224 * include/grub/sparc64/types.h: Likewise.
10225 * include/grub/sparc64/ieee1275/console.h: Likewise.
10226 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10227 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10228 * include/grub/sparc64/ieee1275/time.h: Likewise.
10229 * include/grub/util/biosdisk.h: Likewise.
10230 * include/grub/util/getroot.h: Likewise.
10231 * include/grub/util/lvm.h: Likewise.
10232 * include/grub/util/misc.h: Likewise.
10233 * include/grub/util/raid.h: Likewise.
10234 * include/grub/util/resolve.h: Likewise.
10235 * io/gzio.c: Likewise.
10236 * kern/device.c: Likewise.
10237 * kern/disk.c: Likewise.
10238 * kern/dl.c: Likewise.
10239 * kern/elf.c: Likewise.
10240 * kern/env.c: Likewise.
10241 * kern/err.c: Likewise.
10242 * kern/file.c: Likewise.
10243 * kern/fs.c: Likewise.
10244 * kern/loader.c: Likewise.
10245 * kern/main.c: Likewise.
10246 * kern/misc.c: Likewise.
10247 * kern/mm.c: Likewise.
10248 * kern/parser.c: Likewise.
10249 * kern/partition.c: Likewise.
10250 * kern/rescue.c: Likewise.
10251 * kern/term.c: Likewise.
10252 * kern/efi/efi.c: Likewise.
10253 * kern/efi/init.c: Likewise.
10254 * kern/efi/mm.c: Likewise.
10255 * kern/i386/dl.c: Likewise.
10256 * kern/i386/efi/init.c: Likewise.
10257 * kern/i386/efi/startup.S: Likewise.
10258 * kern/i386/pc/init.c: Likewise.
10259 * kern/i386/pc/lzo1x.S: Likewise.
10260 * kern/i386/pc/startup.S: Likewise.
10261 * kern/ieee1275/ieee1275.c: Likewise.
10262 * kern/powerpc/cache.S: Likewise.
10263 * kern/powerpc/dl.c: Likewise.
10264 * kern/powerpc/ieee1275/cmain.c: Likewise.
10265 * kern/powerpc/ieee1275/crt0.S: Likewise.
10266 * kern/powerpc/ieee1275/init.c: Likewise.
10267 * kern/powerpc/ieee1275/openfw.c: Likewise.
10268 * kern/sparc64/cache.S: Likewise.
10269 * kern/sparc64/dl.c: Likewise.
10270 * kern/sparc64/ieee1275/init.c: Likewise.
10271 * kern/sparc64/ieee1275/openfw.c: Likewise.
10272 * loader/efi/chainloader.c: Likewise.
10273 * loader/efi/chainloader_normal.c: Likewise.
10274 * loader/i386/efi/linux.c: Likewise.
10275 * loader/i386/efi/linux_normal.c: Likewise.
10276 * loader/i386/pc/chainloader.c: Likewise.
10277 * loader/i386/pc/chainloader_normal.c: Likewise.
10278 * loader/i386/pc/linux.c: Likewise.
10279 * loader/i386/pc/linux_normal.c: Likewise.
10280 * loader/i386/pc/multiboot.c: Likewise.
10281 * loader/i386/pc/multiboot_normal.c: Likewise.
10282 * loader/powerpc/ieee1275/linux.c: Likewise.
10283 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10284 * normal/arg.c: Likewise.
10285 * normal/cmdline.c: Likewise.
10286 * normal/command.c: Likewise.
10287 * normal/completion.c: Likewise.
10288 * normal/execute.c: Likewise.
10289 * normal/function.c: Likewise.
10290 * normal/lexer.c: Likewise.
10291 * normal/main.c: Likewise.
10292 * normal/menu.c: Likewise.
10293 * normal/menu_entry.c: Likewise.
10294 * normal/misc.c: Likewise.
10295 * normal/parser.y: Likewise.
10296 * normal/script.c: Likewise.
10297 * normal/i386/setjmp.S: Likewise.
10298 * normal/powerpc/setjmp.S: Likewise.
10299 * normal/sparc64/setjmp.S: Likewise.
10300 * partmap/acorn.c: Likewise.
10301 * partmap/amiga.c: Likewise.
10302 * partmap/apple.c: Likewise.
10303 * partmap/gpt.c: Likewise.
10304 * partmap/pc.c: Likewise.
10305 * partmap/sun.c: Likewise.
10306 * term/gfxterm.c: Likewise.
10307 * term/terminfo.c: Likewise.
10308 * term/efi/console.c: Likewise.
10309 * term/i386/pc/console.c: Likewise.
10310 * term/i386/pc/serial.c: Likewise.
10311 * term/i386/pc/vesafb.c: Likewise.
10312 * term/i386/pc/vga.c: Likewise.
10313 * term/ieee1275/ofconsole.c: Likewise.
10314 * util/biosdisk.c: Likewise.
10315 * util/console.c: Likewise.
10316 * util/genmoddep.c: Likewise.
10317 * util/getroot.c: Likewise.
10318 * util/grub-emu.c: Likewise.
10319 * util/grub-mkdevicemap.c: Likewise.
10320 * util/grub-probe.c: Likewise.
10321 * util/lvm.c: Likewise.
10322 * util/misc.c: Likewise.
10323 * util/raid.c: Likewise.
10324 * util/resolve.c: Likewise.
10325 * util/update-grub.in: Likewise.
10326 * util/update-grub_lib.in: Likewise.
10327 * util/grub.d/00_header.in: Likewise.
10328 * util/grub.d/10_hurd.in: Likewise.
10329 * util/grub.d/10_linux.in: Likewise.
10330 * util/i386/efi/grub-install.in: Likewise.
10331 * util/i386/efi/grub-mkimage.c: Likewise.
10332 * util/i386/pc/grub-install.in: Likewise.
10333 * util/i386/pc/grub-mkimage.c: Likewise.
10334 * util/i386/pc/grub-mkrescue.in: Likewise.
10335 * util/i386/pc/grub-setup.c: Likewise.
10336 * util/i386/pc/misc.c: Likewise.
10337 * util/powerpc/ieee1275/grub-install.in: Likewise.
10338 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10339 * util/powerpc/ieee1275/misc.c: Likewise.
10340 * video/bitmap.c: Likewise.
10341 * video/video.c: Likewise.
10342 * video/i386/pc/vbe.c: Likewise.
10343 * video/i386/pc/vbeblit.c: Likewise.
10344 * video/i386/pc/vbefill.c: Likewise.
10345 * video/i386/pc/vbeutil.c: Likewise.
10346 * video/readers/tga.c: Likewise.
10347
3572d015 103482007-07-02 Robert Millan <rmh@aybabtu.com>
10349
10350 * conf/i386-efi.rmk: Replace obsolete reference to
10351 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10352 with util/getroot.c.
10353 * conf/powerpc-ieee1275.rmk: Likewise.
10354 * conf/sparc64-ieee1275.rmk: Likewise.
10355
10356 * util/grub-emu.c (main): Fix unchecked pointer handling.
10357
2c2a681b 103582007-07-02 Robert Millan <rmh@aybabtu.com>
10359
10360 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10361 invocation to fail, in order to support partition-less media.
10362
10363 * util/i386/pc/grub-install.in: Likewise.
10364
10365 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10366 which fs or partmap modules are needed (akin to its sister scripts).
10367
10368 Also use grub-probe to get rid of unportable /proc/mounts check.
10369
10370 Print the same informational message that the other scripts do, before
fe6b695a 10371 exiting.
2c2a681b 10372
6193defe 103732007-06-23 Robert Millan <rmh@aybabtu.com>
10374
fe6b695a 10375 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 10376 a font file can be found and, if so, echo the GRUB path to it.
10377
10378 * util/update-grub.in: Handle multiple terminals depending on user
10379 input, platform availability and font file presence. Propagate
10380 variables of our findings to /etc/grub.d/ children.
10381
10382 * util/grub.d/00_header.in: Handle multiple terminals, based on
10383 environment setup by update-grub.
10384
eface1dc 103852007-06-23 Robert Millan <rmh@aybabtu.com>
10386
ba50d28f 10387 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 10388
bf697e28 103892007-06-21 Robert Millan <rmh@aybabtu.com>
10390
10391 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10392 indicate end of data section in kernel image.
10393 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10394 GRUB_KERNEL_MACHINE_DATA_END.
10395
10396 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10397 space for it.
10398 * kern/i386/efi/startup.S: Likewise.
10399
10400 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10401 during image generation. Implement --prefix option to override this
10402 patch.
10403 * util/i386/efi/grub-mkimage.c: Likewise.
10404
10405 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10406 code to make path relative to its root into a separate function.
10407
10408 * util/i386/pc/grub-install.in: Use newly provided
10409 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10410 pass the result to grub-install --prefix.
10411
baa574b4 104122007-06-13 Robert Millan <rmh@aybabtu.com>
10413
10414 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10415 DEFAULT_DEVICE_MAP.
10416 * util/grub-emu.c: Use above definitions from misc.h instead of
10417 defining them.
10418 * util/grub-mkdevicemap.c: Likewise.
10419 * util/i386/pc/grub-setup.c: Likewise.
10420 * util/grub-probe.c: Likewise.
10421 (probe): Abort with grub_util_error() when either
10422 grub_guess_root_device or grub_util_get_grub_dev fails.
10423
0215dcbf 104242007-06-12 Robert Millan <rmh@aybabtu.com>
10425
10426 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10427 "pager" assignment.
10428 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10429 "pcdata".
10430 * util/grub-probe.c (probe): Likewise for "drive_name".
10431
8af2ab7b 104322007-06-11 Robert Millan <rmh@aybabtu.com>
10433
10434 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10435 not just the cdrom one.
10436
59d31694 104372007-06-11 Robert Millan <rmh@aybabtu.com>
10438
10439 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10440 Add --pkglibdir=DIR option to override pkglibdir.
10441 Mention --image-type=TYPE in help output.
10442 Fix --grub-mkimage (it was a no-op).
fe6b695a 10443 Abort gracefully when no parameter is given.
59d31694 10444
7ee367e4 104452007-06-11 Robert Millan <rmh@aybabtu.com>
10446
10447 * util/i386/pc/grub-mkrescue.in: New file.
10448 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10449 * Makefile.in: Handle bin_SCRIPTS.
10450
29b0ed46 104512007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10452
10453 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10454 list of video modes.
10455
c0f90770 104562007-06-06 Robert Millan <rmh@aybabtu.com>
10457
10458 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10459 file doesn't exist, or if it is in a filesystem grub can't read.
10460
10461 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10462 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10463 header comment to fit in 80 columns when the variables are resolved.
10464
10465 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10466 could be identified by update-grub. Remove redundant check for
fe6b695a 10467 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 10468 handles that).
10469
fb36dc26 104702007-06-04 Robert Millan <rmh@aybabtu.com>
10471
10472 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10473
10474 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10475
10476 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10477
0c68c93e 104782007-06-04 Robert Millan <rmh@aybabtu.com>
10479
10480 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10481
10482 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10483 grub_apple_partition_map_fini.
10484
10485 * util/biosdisk.c
10486 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10487 to access >2 TiB disks).
10488
10489 Print disk->total_sectors with %llu instead of %lu, since this
10490 variable is always 64-bit (prevents wrong disk size from being displayed
10491 on either >2 TiB disk or big-endian CPU).
10492
10493 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10494 into a generic case that supports all (sane) partition maps.
10495
10496 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10497 breaks big-endian.
10498
10499 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10500 and grub_apple_partition_map_fini() after that.
10501
0f23eb74 105022007-06-01 Robert Millan <rmh@aybabtu.com>
10503
10504 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10505
10506 * util/grub.d/00_header.in: Only enable gfxterm when
10507 convert_system_path_to_grub_path() succeeds.
10508
42c71976 105092007-05-20 Robert Millan <rmh@aybabtu.com>
10510
10511 * util/update-grub_lib.in: New file.
10512 * DISTLIST: Add update-grub_lib.in.
10513 * conf/common.rmk: Generate update-grub_lib and install it in
10514 $(lib_DATA).
10515 * Makefile.in: Add install routine for $(lib_DATA).
10516
10517 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10518 function provided by update-grub_lib to support arbitrary paths of
10519 unifont.pff.
10520 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10521 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10522
5beb2291 105232007-05-19 Robert Millan <rmh@aybabtu.com>
10524
10525 * commands/i386/cpuid.c: New module.
10526 * DISTLIST: Add it.
10527 * conf/i386-efi.rmk: Enable cpuid.mod.
10528 * conf/i386-pc.rmk: Likewise.
10529
7262eca1 105302007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10531
10532 * kern/disk.c (grub_disk_read): Check return value of
10533 grub_realloc().
10534
260ba823 105352007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10536
10537 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10538 arrays.
10539 * disk/raid.c (grub_raid_open): Likewise.
10540
1ecb6cf2 105412007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10542
10543 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10544 stack instead of on the heap.
10545
10546 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10547 before doing a read on it.
10548
10549 * configure.ac: Only use -fno-stack-protector for the target
10550 environment.
f19dbdb7 10551
21c8cbb1 105522007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10553
10554 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10555 __attribute_ ((unused)) to mode_type argument.
10556
10557 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 10558
21c8cbb1 10559 * kern/misc.c (memcmp): Fix prototype.
10560
10561 * include/grub/partition.h [GRUB_UTIL]
10562 (grub_gpt_partition_map_init): Add prototype.
10563 (grub_gpt_partition_map_fini): Likewise.
10564
10565 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10566 at the right place.
10567
10568 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10569 (grub_fat_read_data): Likewise.
10570 (grub_fat_find_dir): Likewise.
10571
10572 * font/manager.c (find_glyph): Make table a const.
10573 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 10574
849d55d3 105752007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10576
10577 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10578 code, first search for device in /dev/mapper, then in /dev.
10579 (grub_util_get_grub_dev): New function.
10580 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10581 prototype.
10582 * util/grub-probe.c (probe): Remove check for RAID, call
10583 grub_util_get_grub_dev() instead of
10584 grub_util_biosdisk_get_grub_dev().
10585 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10586 grub_util_biosdisk_get_grub_dev().
10587 * util/i386/pc/grub-setup.c (main): Likewise.
10588
8fff7c2f 105892007-05-16 Robert Millan <rmh@aybabtu.com>
10590
10591 * DISTLIST: Update for the latest changes.
10592 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10593 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10594 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10595 grub/util/biosdisk.h.
10596 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10597 grub/util/biosdisk.h.
10598
48e12b52 105992007-05-16 Robert Millan <rmh@aybabtu.com>
10600
10601 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10602
46b9d128 106032007-05-16 Robert Millan <rmh@aybabtu.com>
10604
10605 * util/i386/efi/grub-install.in: New.
10606 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10607 newly added grub-install.
10608 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10609 include.
10610 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10611 grub/util/biosdisk.h.
10612 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10613 grub/util/biosdisk.h.
10614
2d1a40a9 106152007-05-16 Robert Millan <rmh@aybabtu.com>
10616
10617 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10618 * include/grub/util/biosdisk.h: ... here.
10619 * util/i386/pc/biosdisk.c: Moved to ...
10620 * util/biosdisk.c: ... here.
10621 * util/i386/pc/getroot.c: Moved to ...
10622 * util/getroot.c: ... here.
10623 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10624 * util/grub-mkdevicemap.c: ... here.
10625 * util/i386/pc/grub-probe.c: Moved to ...
10626 * util/grub-probe.c: ... here.
10627
9e26e3bc 106282007-05-15 Robert Millan <rmh@aybabtu.com>
10629
10630 * util/update-grub.in: Remove duplicated line in grub.cfg header
10631 message.
10632
57f96397 106332007-05-13 Robert Millan <rmh@aybabtu.com>
10634
10635 * util/update-grub.in: Fix a few assumptions about the devices holding
10636 /, /boot and /boot/grub being the same.
10637 * util/grub.d/00_header.in: Likewise.
10638 * util/grub.d/10_hurd.in: Likewise.
10639 * util/grub.d/10_linux.in: Likewise.
10640
10641 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10642 patterns. Use that to define the `.old' suffix as older than `'.
10643
10644 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10645
10646 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10647 the grub.cfg header message.
10648
2e610d62 106492007-05-11 Robert Millan <rmh@aybabtu.com>
10650
10651 * util/update-grub.in: Create device.map if it doesn't already exist,
10652 before attempting to run grub-probe.
10653 Check for grub-probe and grub-mkdevicemap with the same code
10654 grub-install is using.
10655 Remove test mode.
10656
3f6a10ef 106572007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10658
10659 * Makefile.in: Add the datarootdir autoconf variable.
10660
02e7b75e 106612007-05-09 Robert Millan <rmh@aybabtu.com>
10662
10663 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 10664 fail gracefully if dev->disk->partition == NULL.
02e7b75e 10665
75f396cc 106662007-05-07 Robert Millan <rmh@aybabtu.com>
10667
10668 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10669 determine partition map module.
10670 * util/i386/pc/grub-install.in: Use this feature to decide which
10671 partition module to load, instead of hardcoding pc and gpt.
10672
da65cb36 106732007-05-07 Robert Millan <rmh@aybabtu.com>
10674
10675 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10676 source directory differs from build directory.
10677
b57d6a91 106782007-05-05 Robert Millan <rmh@aybabtu.com>
10679
10680 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10681 initialisation.
10682
509d00f1 106832007-05-05 Robert Millan <rmh@aybabtu.com>
10684
10685 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10686
c48f23ef 106872007-05-05 Robert Millan <rmh@aybabtu.com>
10688
10689 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10690 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10691
20b97658 106922007-05-05 Robert Millan <rmh@aybabtu.com>
10693
10694 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10695 (grub_probe_SOURCES): Likewise.
10696 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10697 GPT and initialize dos_part and bsd_part accordingly.
10698 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10699 install_bsd_part.
10700 (main): Activate gpt module for use during partition identification,
10701 and deactivate it afterwards.
10702 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10703 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10704 partition identification, and deactivate it afterwards.
10705
99123174 107062007-05-05 Robert Millan <rmh@aybabtu.com>
10707
10708 * term/i386/pc/console.c (grub_console_fini): Call
10709 grub_term_set_current() before grub_term_unregister().
10710
ebd97f6e 107112007-05-04 Robert Millan <rmh@aybabtu.com>
10712
10713 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10714 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10715 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10716 and update-grub_DATA.
10717 * conf/common.rmk: Build and install update-grub components.
10718 * conf/common.mk: Regenerate.
10719 * util/update-grub.in: New. Core of update-grub.
10720 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10721 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10722 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10723 * util/grub.d/README: New. Document grub.d directory layout.
10724
b06a264d 107252007-05-01 Robert Millan <rmh@aybabtu.com>
10726
10727 * util/grub-emu.c: Move initialization functions
10728 grub_util_biosdisk_init() and grub_init_all() before
10729 grub_util_biosdisk_get_grub_dev(), which relies on them.
10730
41f0050e 107312007-04-19 Robert Millan <rmh@aybabtu.com>
10732
10733 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10734 it is used later.
10735
04582bb3 107362007-04-18 Jerone Young <jerone@gmail.com>
10737
f19dbdb7 10738 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 10739 stanza.
10740
08db4632 107412007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 10742
08db4632 10743 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10744 continue on and look for device node with real device name.
10745
801b76be 107462007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 10747
fe6b695a 10748 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 10749 ability.
10750 * Makefile.in: Add autoconf package transformation code.
10751 * util/i386/pc/grub-install.in: Likewise.
10752 * util/powerpc/ieee1275/grub-install.in: Likewise.
10753
6795c4e1 107542007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10755
10756 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10757 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10758 (EXT2_REVISION): Likewise.
10759 (EXT2_INODE_SIZE): Likewise.
10760 (struct grub_ext2_block_group): Added a missing member
10761 "used_dirs".
10762 (grub_ext2_read_inode): Divide by the inode size in a superblock
10763 instead of 128 to obtain INODES_PER_BLOCK.
10764 Use the macro EXT2_INODE_SIZE instead of directly using
10765 SBLOCK->INODE_SIZE.
10766
d70af616 107672007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10768
10769 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10770 superblock instead of the structure size to compute an
10771 offset. This fixes the problem that GRUB could not read a
10772 filesystem when inode size is different from 128-byte.
10773
3b801603 107742007-03-05 Marco Gerards <marco@gnu.org>
10775
10776 * normal/main.c (read_config_file): When "menu" is not set, create
10777 an initial context.
10778
4785bfe4 107792007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10780
10781 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10782 (HEAP_LIMIT): New macro.
10783 (grub_claim_heap): Claim memory up to `heaplimit'.
10784
a0cbb023 107852007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10786
10787 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10788 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10789 (_start): Likewise.
10790 (grub_arch_modules_addr): Return address after `_end'.
10791 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10792 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10793 (add_segments): Calculate `_end' from phdr size and location.
10794 (ALIGN_UP): Moved to ...
10795 * include/grub/misc.h: here.
10796 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10797 New macro.
10798 (GRUB_IEEE1275_MODULE_BASE): Removed.
10799
fd7d8eba 108002007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10801
10802 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10803 loop boundary.
10804
9b09e6fc 108052007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10806
10807 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10808 All users updated.
10809 (grub_elf64_load_hook_t): Likewise.
10810 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10811 debug output.
10812
3ce27299 108132007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10814
10815 * kern/mm.c: Update copyright.
10816 (grub_mm_debug): Correct syntax error.
10817 (grub_mm_dump_free): New function.
10818 (grub_debug_free): Call `grub_free'.
10819 * include/grub/mm.h: Update copyright.
10820 (grub_mm_dump_free): Add declaration.
10821
077d5fee 108222007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10823
10824 * include/grub/ieee1275/ieee1275.h: Update copyright.
10825 * kern/powerpc/ieee1275/init.c: Likewise.
10826 * kern/powerpc/ieee1275/openfw.c: Likewise.
10827
10828 * loader/powerpc/ieee1275/linux.c: Likewise.
10829 * include/grub/elfload.h: Likewise.
10830 * kern/elf.c: Likewise.
10831 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10832 callers.
10833 (grub_elf64_load): Likewise.
10834 (grub_elf32_load_segment): Move to a nested function.
10835 (grub_elf64_load_segment): Likewise.
10836
dc946850 108372007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10838
10839 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10840 prototype.
10841 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10842 (grub_heap_len): Likewise.
10843 (HEAP_SIZE): New macro.
10844 (grub_claim_heap): New function.
10845 (grub_machine_init): Don't claim heap directly. Call
10846 `grub_claim_heap'.
10847 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10848 (grub_available_iterate): New function.
10849
baa2a121 108502007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10851
10852 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10853 * configure.ac: Use it for testing the HOST and TARGET compilers.
10854
4fe9862e 108552006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10856
10857 * Makefile.in (enable_grub_emu): New variable.
10858 * configure.ac (--enable-grub-emu): New option.
10859 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10860 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10861 * conf/i386-pc.rmk: Likewise.
10862 * conf/powerpc-ieee1275.rmk: Likewise.
10863 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10864
a8aa5762 108652006-12-12 Marco Gerards <marco@gnu.org>
10866
10867 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10868
10869 * kern/env.c (grub_env_unset): Don't free the member `value' when
10870 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10871 pointer.
10872
10873 * normal/main.c (current_menu): Removed.
10874 (free_menu): Unset the `menu' environment variable.
10875 (grub_normal_menu_addentry): Make use of the environment variable
10876 `menu', instead of using the global `current_menu'. Allocate
10877 memory for the sourcecode of this entry.
10878 (read_config_file): New argument `nested', changed all callers.
10879 Only in the case of a new context, initialize a new menu. Set the
10880 `menu' environment variable.
10881 (grub_normal_execute): Don't set and unset the environment
10882 variable `menu' here anymore. Only free the menu when leaving the
10883 context.
10884
10885 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10886 leak.
10887
957b3a3e 108882006-12-11 Marco Gerards <marco@gnu.org>
10889
10890 * normal/menu_entry.c (run): Fix off by one bug so the last line
10891 is executed. Move the loader check to outside the loop.
10892
ef875714 108932006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10894
10895 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10896
4e739985 108972006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10898
10899 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10900 the number of sectors. Reported by Andrey Shuvikov
10901 <mr_hyro@yahoo.com>.
f19dbdb7 10902
790707f2 109032006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10904
10905 * kern/disk.c (grub_disk_read): When there is a read error, always
10906 try to read only the necessary data.
f19dbdb7 10907
790707f2 10908 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10909 disk/raid.c.
10910 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10911 prototype.
10912 [GRUB_UTIL] (grub_raid_fini): Likewise.
10913 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10914 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10915 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10916 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10917 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10918 and grub_raid_fini().
f19dbdb7 10919
03e58196 109202006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10921
10922 * include/grub/types.h (__unused): Rename to UNUSED.
10923 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10924 (grub_elf64_size): Likewise.
f19dbdb7 10925
ae4f23bf 109262006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10927
10928 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10929 grub_error_push and grub_error_pop in the error-handling path.
10930 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10931 length.
10932
2166cc83 109332006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10934
10935 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10936 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10937 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10938 (kernel_elf_SOURCES): Likewise.
10939 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10940 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10941 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10942 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10943 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10944 (elf_mod_SOURCES): New variable.
10945 (elf_mod_CFLAGS): Likewise.
10946 (elf_mod_LDFLAGS): Likewise.
10947 * include/grub/types.h (__unused): New macro.
10948 * include/grub/elfload.h: New file.
10949 * kern/elf.c: Likewise.
10950 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10951 (ELF32_LOADMASK): New macro.
10952 (ELF64_LOADMASK): Likewise.
10953 (vmlinux): Removed.
10954 (grub_linux_load32): New function.
10955 (grub_linux_load64): Likewise.
10956 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10957 Use grub_elf_t instead of grub_file_t.
10958
a09d5aa5 109592006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10960
10961 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10962 `catch_result' to struct set_color_args.
10963
d976fc51 109642006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10965
10966 * normal/menu.c: Include grub/script.h.
10967 * normal/menu_entry.c: Likewise.
10968 * include/grub/normal.h: Do not include grub/script.h.
10969
67507549 109702006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10971
10972 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10973
69203a99 109742006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10975
10976 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10977 disk.
10978 (grub_disk_close): Print debug messages when closing a disk.
10979 (grub_disk_read): Print debug messages when disk read fails.
10980 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10981 filesystem type.
10982 * kern/partition.c: Include misc.h.
10983 (grub_partition_iterate): Print debug messages when detecting
10984 partition type.
10985
e2b8278c 109862006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10987
10988 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10989 is negative.
10990 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10991
97b2f2ff 109922006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10993
10994 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10995 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10996
6555d655 109972006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10998
10999 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11000 instead of sizeof(lv). Patch by Michael Guntsche.
11001
4d42b77f 110022006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11003
11004 * disk/lvm.c: Rename VGS to VG_LIST.
11005 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11006 (grub_lvm_open): Likewise.
11007 Thanks to Michael Guntsche for finding this bug.
11008
5d74d927 110092006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11010
11011 * configure.ac (AC_INIT): Bumped to 1.95.
11012
a1bb27e4 110132006-10-14 Robert Millan <rmh@aybabtu.com>
11014
11015 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11016 with "/dev/.static/dev/md".
11017
e0994b8b 110182006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11019
11020 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11021 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11022 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11023 DRIVE_NAME are always freed.
11024
11025 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11026 DOS_PART, as a DOS partition is counted from one instead of zero
11027 now. Reported by Robert Millan.
11028
ddd5cee9 110292006-10-14 Robert Millan <rmh@aybabtu.com>
11030
11031 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11032 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11033 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11034 string returned by grub_guess_root_device.
11035 * util/i386/pc/grub-setup.c: Likewise.
11036 * util/i386/pc/grub-probefs.c: Likewise.
11037
11038 * util/i386/pc/grub-probefs.c: Rename to ...
11039 * util/i386/pc/grub-probe.c: ... this.
11040 * DISTLIST: Remove grub-probefs, add grub-probe.
11041 * conf/i386-efi.rmk: Likewise.
11042 * conf/i386-pc.rmk: Likewise.
11043 * util/i386/pc/grub-install.in: Likewise.
11044
11045 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11046 choose which information we want to print.
11047
2b002173 110482006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11049
11050 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11051 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11052 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11053 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11054 video/readers/tga.c and video/i386/pc/vbeutil.c.
11055
110562006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11057
11058 Added support for RAID and LVM.
f19dbdb7 11059
2b002173 11060 * disk/lvm.c: New file.
11061 * disk/raid.c: Likewise.
11062 * include/grub/lvm.h: Likewise.
f19dbdb7 11063 * include/grub/raid.h: Likewise.
2b002173 11064 * include/grub/util/lvm.h: Likewise.
11065 * include/grub/util/raid.h: Likewise.
11066 * util/lvm.c: Likewise.
11067 * util/raid.c: Likewise.
11068
11069 * include/grub/disk.h (grub_disk_dev_id): Add
11070 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11071 (grub_disk_get_size): New prototype.
11072 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11073 returns a partition.
11074 (grub_disk_get_size): New function.
f19dbdb7 11075
2b002173 11076 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11077 verbatim if grub_install_dos_part is -2.
11078
11079 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11080 and LVM devices.
11081
11082 * util/i386/pc/grub-setup.c (setup): New argument
11083 MUST_EMBED. Force embedding of GRUB when the argument is
11084 true. Close FILE before returning.
11085 (main): Add support for RAID and LVM.
f19dbdb7 11086
2b002173 11087 * conf/common.rmk: Add RAID and LVM modules.
11088 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11089 util/lvm.c.
11090 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11091
11092 * kern/misc.c (grub_strstr): New function.
11093 * include/grub/misc.h (grub_strstr): New prototype.
11094
050548d0 110952006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11096
11097 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11098
da849d2d 110992006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11100
11101 * kern/misc.c (grub_strtoull): Guess the base only if not
11102 specified.
11103
97b2f2ff 111042006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 11105
11106 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11107 PowerMac support.
11108
97b2f2ff 111092006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 11110
11111 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11112
11113 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11114 Remove `flags' argument. All callers changed.
11115 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11116 (IEEE1275_IHANDLE_INVALID): New variable.
11117 (IEEE1275_CELL_INVALID): New variable.
11118 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11119 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11120 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11121 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11122 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11123 codes from Open Firmware. All callers updated.
11124 (grub_ieee1275_next_property): Directly return Open Firmware return
11125 code.
11126 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11127 Standardize error checking from `grub_ieee1275_get_property'.
11128 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11129 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11130
97b2f2ff 111312006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 11132
11133 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11134 `instance_to_package_args' to `instance_to_path_args'.
11135
11136 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11137 `grub_ieee1275_chosen'.
11138
11139 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11140 `grub_ieee1275_interpret'.
11141
97b2f2ff 111422006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 11143
11144 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11145
97b2f2ff 111462006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 11147
11148 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11149 (__cmpdi): Likewise.
11150
11151 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11152 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11153 `grub_ssize_t'.
11154
02bb8acc 11155 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 11156
11157 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11158 to type `grub_ssize_t'.
11159 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11160
7f9a8531 111612006-09-22 Marco Gerards <marco@gnu.org>
11162
11163 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11164 newlines.
11165
b5ef1102 111662006-09-22 Marco Gerards <marco@gnu.org>
11167
11168 * commands/echo.c: New file.
11169
11170 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11171
11172 * conf/common.rmk (echo_mod_SOURCES): New variable.
11173 (echo_mod_CFLAGS): Likewise.
11174 (echo_mod_LDFLAGS): Likewise.
11175
2cff3677 111762006-09-22 Marco Gerards <marco@gnu.org>
11177
11178 * normal/main.c (get_line): Malloc memory instead of using
11179 preallocated memory. Removed the arguments `cmdline' and
11180 `max_len'. Updated all callers.
11181
6ba4688b 111822006-09-22 Marco Gerards <marco@gnu.org>
11183
11184 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11185 (normal_mod_DEPENDENCIES): Likewise.
11186
11187 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11188 (normal_mod_DEPENDENCIES): Likewise.
11189
11190 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11191
e02ac02c 111922006-09-22 Johan Rydberg <jrydberg@gnu.org>
11193
11194 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11195 programs.
11196 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11197 (normal_mod_DEPENDENCIES): Likewise.
11198 * conf/i386-pc.mk: Regenerate.
11199 * conf/i386-efi.mk: Likewise
11200 * conf/common.mk: Likewise.
11201 * conf/powerpc-ieee1275.mk: Likewise.
11202 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11203
8d252e44 112042006-09-22 Robert Millan <rmh@aybabtu.com>
11205
11206 Sync with i386 version.
11207 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11208 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11209
209bf7ac 112102006-09-21 Robert Millan <rmh@aybabtu.com>
11211
11212 Import from GRUB Legacy (lib/device.c):
11213 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11214 (init_device_map) [__linux__]: Add support for I2O devices.
11215
6b146090 112162006-09-14 Marco Gerards <marco@gnu.org>
11217
11218 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11219 `-melf_i386'.
11220
e38600a8 112212006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 11222
11223 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11224 /boot/grub/*.lst.
78fa1790 11225
2952da5d 11226 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 11227
2952da5d 11228 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11229 before adding it to device.map.
11230
01b82a64 112312006-08-15 Johan Rydberg <jrydberg@gnu.org>
11232
fe6b695a 11233 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 11234 compiles a file; using the -MD option.
11235 * conf/common.mk: Regenerate.
11236 * conf/i386-pc.mk: Likewise.
11237 * conf/i386-efi.mk: Likewise.
11238 * conf/powerpc-ieee1275.mk: Likewise.
11239 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 11240
1064790d 112412006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11242
11243 Move the prototypes of grub_setjmp and grub_longjmp to
11244 cpu/setjmp.h, so that each architecture may specify different
11245 attributes.
f19dbdb7 11246
1064790d 11247 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11248 (grub_longjmp): Likewise.
11249 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11250 (grub_longjmp): Likewise.
11251 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11252 (grub_longjmp): Likewise.
11253
11254 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11255 [!GRUB_UTIL] (grub_longjmp): Removed.
11256
29dda3ed 112572006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11258
11259 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11260 "color!" method does not return any value.
11261
ad2a06ed 112622006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11263
11264 * include/grub/bitmap.h: New file.
11265
11266 * include/grub/i386/pc/vbeutil.h: Likewise.
11267
11268 * video/bitmap.c: Likewise.
11269
11270 * video/readers/tga.c: Likewise.
11271
11272 * video/i386/pc/vbeutil.c: Likewise.
11273
11274 * commands/videotest.c: Code cleanup and updated to reflect to new
11275 video API.
11276
11277 * term/gfxterm.c: Likewise.
11278
11279 * video/video.c: Likewise.
11280
11281 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11282 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11283 (bitmap_mod_SOURCES): New entry.
11284 (bitmap_mod_CFLAGS): Likewise.
11285 (bitmap_mod_LDFLAGS): Likewise.
11286 (tga_mod_SOURCES): Likewise.
11287 (tga_mod_CFLAGS): Likewise.
11288 (tga_mod_LDFLAGS): Likewise.
11289
11290 * include/grub/video.h (grub_video_blit_operators): New enum type.
11291 (grub_video_render_target): Changed as forward declaration and moved
11292 actual definition to be video driver specific.
11293 (grub_video_adapter.blit_bitmap): Added blitting operator.
11294 (grub_video_adapter.blit_render_target): Likewise.
11295 (grub_video_blit_bitmap): Likewise.
11296 (grub_video_blit_render_target): Likewise.
11297
11298 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11299 driver specific render target definition.
11300 (grub_video_vbe_map_rgba): Added driver internal helper.
11301 (grub_video_vbe_unmap_color): Updated to use
11302 grub_video_i386_vbeblit_info.
11303 (grub_video_vbe_get_video_ptr): Likewise.
11304
11305 * include/grub/i386/pc/vbeblit.h
11306 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11307 grub_video_i386_vbeblit_info.
11308 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11309 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11310 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11311 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11312 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11313 (grub_video_i386_vbeblit_index_index): Likewise.
11314 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11315 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11316 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11317 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11318 operator.
11319 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11320 operator.
11321
11322 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11323 include/grub/i386/pc/vbeblit.h.
11324
11325 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11326 Updated to use grub_video_i386_vbeblit_info.
11327 (grub_video_i386_vbefill_R8G8B8): Likewise.
11328 (grub_video_i386_vbefill_index): Likewise.
11329 (grub_video_i386_vbefill): Added generic filler.
11330
11331 * video/i386/pc/vbefill.c: Updated to reflect changes on
11332 include/grub/i386/pc/vbefill.h.
11333
11334 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11335 grub_video_i386_vbeblit_info.
11336 (grub_video_vbe_unmap_color): Likewise.
11337 (grub_video_vbe_blit_glyph): Likewise.
11338 (grub_video_vbe_scroll): Likewise.
11339 (grub_video_vbe_draw_pixel): Removed function.
11340 (grub_video_vbe_get_pixel): Likewise.
11341 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11342 updated code to use it.
11343 (common_blitter): Added common blitter for render target and bitmap.
11344 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11345 (grub_video_vbe_blit_render_target): Likewise.
11346
bc8c036d 113472006-07-30 Johan Rydberg <jrydberg@gnu.org>
11348
11349 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11350 is in text mode if there is no console control protocol instance
11351 available.
11352
684a8eff 113532006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11354
11355 * include/grub/video.h: Code cleanup.
11356
11357 * include/grub/i386/pc/vbe.h: Likewise.
11358
11359 * video/i386/pc/vbe.c: Likewise.
11360
11361 * video/i386/pc/vbeblit.c: Likewise.
11362
11363 * video/i386/pc/vbefill.c: Likewise.
11364
11365 * video/video.c: Likewise. Also added more comments.
11366
5915059b 113672006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11368
11369 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11370 (struct grub_biosdisk_dap): Likewise.
11371
11372 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11373 linkage settings for all functions.
11374
90ce5d56 113752006-07-12 Marco Gerards <marco@gnu.org>
11376
11377 * configure.ac (--enable-mm-debug): Fix typo.
11378
11379 * genkernsyms.sh.in: Use proper quoting for `CC'.
11380
43e7f879 113812006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11382
11383 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11384 (normal_mod_ASFLAGS): Remove "-m32".
11385
4889bdec 113862006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11387
11388 * util/misc.c: Include config.h.
11389 [!HAVE_MEMALIGN]: Do not include malloc.h.
11390 (grub_memalign): Use posix_memalign, if present. Then, use
11391 memalign, if present. Otherwise, emit an error.
11392
11393 * util/grub-emu.c: Do not include malloc.h.
11394
11395 * include/grub/util/misc.h: Include unistd.h. This is required for
11396 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11397 D. Eades III <hde@foobar-qux.org>.
11398
11399 * configure.ac (AC_GNU_SOURCE): Added.
11400 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11401 type.
11402
fd39d4da 114032006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11404
11405 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11406 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11407
b786f3b5 114082006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11409
11410 * include/grub/types.h (grub_host_addr_t): Rename to
11411 grub_target_addr_t.
11412 (grub_host_off_t): Rename to grub_target_off_t.
11413 (grub_host_size_t): Rename to grub_target_size_t.
11414 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11415 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11416
11417 * include/grub/kernel.h (struct grub_module_header): Change type
11418 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11419 (grub_module_info): Likewise.
f19dbdb7 11420
051988bb 114212006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11422
11423 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11424 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11425 Velazquez <jesus.velazquez@gmail.com>.
11426
deae281b 114272006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11428
11429 Count partitions from 1 instead of 0 in the string representation
11430 of partitions. Still use 0-based internally.
f19dbdb7 11431
deae281b 11432 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11433 (sun_partition_map_iterate): Use grub_partition_t instead of
11434 struct grub_partition *. Cast DESC->START_CYLINDER to
11435 grub_uint64_t after converting the endian.
11436 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11437 (sun_partition_map_get_name): Add 1 to P->INDEX.
11438
11439 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11440 PCDATA->DOS_PART.
11441 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11442
11443 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11444 zero instead of one.
11445 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11446 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11447
11448 * partmap/apple.c (apple_partition_map_iterate): Change the type
11449 of POS to unsigned.
11450 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11451 (apple_partition_map_get_name): Add 1 into P->INDEX.
11452
11453 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11454 of POS to unsigned.
11455 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11456 calculate the offset of a partition.
11457 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11458 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11459
11460 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11461 SECTOR to grub_disk_addr_t.
11462 (acorn_partition_map_iterate): Likewise.
11463 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11464 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11465 top.
11466 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11467
11468 * kern/i386/pc/init.c (make_install_device): Add 1 into
11469 GRUB_INSTALL_DOS_PART.
11470
11471 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11472 conditional.
11473
524a1e6a 114742006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11475
11476 Clean up the code to support 64-bit addressing in disks and
11477 files. This change is not enough for filesystems yet.
f19dbdb7 11478
524a1e6a 11479 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11480 type of "start" to grub_uint64_t.
11481 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11482 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11483 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11484 convert addresses.
11485
11486 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11487 to grub_disk_addr_t.
11488
11489 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11490 string.
11491
11492 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11493
11494 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11495 to char *.
11496
11497 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11498
11499 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11500
11501 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11502
11503 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11504 to grub_off_t, to detect an error from grub_file_seek.
11505 (grub_multiboot_load_elf32): Likewise.
11506
11507 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11508 maximum unsigned long value when an overflow is detected.
11509 (grub_strtoull): New function.
11510 (grub_divmod64): Likewise.
11511 (grub_lltoa): use grub_divmod64.
11512
11513 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11514 grub_disk_addr_t.
11515 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11516 the pointer to next character. Use grub_strtoull instead of
11517 grub_strtoul.
11518 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11519 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11520 respectively.
11521
fe6b695a 11522 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 11523 return value is signed.
11524 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11525 test if OFFSET is less than zero, as OFFSET is unsigned now.
11526
11527 * kern/disk.c (struct grub_disk_cache): Change the type of
11528 "sector" to grub_disk_addr_t.
11529 (grub_disk_cache_get_index): Change the type of SECTOR to
11530 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11531 unsigned after shifting.
11532 (grub_disk_cache_invalidate): Change the type of SECTOR to
11533 grub_disk_addr_t.
11534 (grub_disk_cache_unlock): Likewise.
11535 (grub_disk_cache_store): Likewise.
11536 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11537 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11538 grub_disk_addr_t and grub_uint64_t, respectively.
11539 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11540 body, as the value of OFFSET is tweaked by
11541 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11542 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11543 respectively.
11544 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11545 body, as the value of OFFSET is tweaked by
11546 grub_disk_check_range. Change the types of LEN and N to
11547 grub_size_t.
11548
11549 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11550 and "saved_offset" to grub_off_t.
11551 (test_header): Cast BUF to char *.
11552 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11553 to char *.
11554 (grub_gzio_read): Change the types of OFFSET and SIZE to
11555 grub_off_t and grub_size_t, respectively.
11556
11557 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11558 Removed.
11559 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11560 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11561 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11562 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11563 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11564
11565 * include/grub/types.h (grub_off_t): Unconditionally set to
11566 grub_uint64_t.
11567 (grub_disk_addr_t): Changed to grub_uint64_t.
11568
11569 * include/grub/partition.h (struct grub_partition): Change the
11570 types of "start", "len" and "offset" to grub_disk_addr_t,
11571 grub_uint64_t and grub_disk_addr_t, respectively.
11572 (grub_partition_get_start): Return grub_disk_addr_t.
11573 (grub_partition_get_len): Return grub_uint64_t.
11574
11575 * include/grub/misc.h (grub_strtoull): New prototype.
11576 (grub_divmod64): Likewise.
11577
11578 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11579 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11580 grub_off_t, respectively.
11581 All callers and references changed.
11582
11583 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11584 grub_size_t in "read".
11585 All callers and references changed.
11586
11587 * include/grub/file.h (struct grub_file): Change the types of
11588 "offset" and "size" to grub_off_t and grub_off_t,
11589 respectively. Change the type of SECTOR to grub_disk_addr_t in
11590 "read_hook".
11591 (grub_file_read): Change the type of LEN to grub_size_t.
11592 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11593 grub_off_t.
11594 (grub_file_size): Return grub_off_t.
11595 (grub_file_tell): Likewise.
11596 All callers and references changed.
11597
11598 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11599 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11600 "write".
11601 (struct grub_disk): Change the type of "total_sectors" to
11602 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 11603 "read_hook".
524a1e6a 11604 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11605 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11606 (grub_disk_write): Likewise.
11607 All callers and references changed.
11608
11609 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11610 char * for grub_strncmp to silence gcc.
11611 (grub_iso9660_mount): Likewise.
11612 (grub_iso9660_mount): Likewise.
11613 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11614 return statement.
11615 (grub_iso9660_iterate_dir): Likewise.
11616 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11617
11618 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11619 LEN to grub_disk_addr_t and grub_size_t, respectively.
11620
11621 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11622
11623 * fs/jfs.c (grub_jfs_read_file): Likewise.
11624
11625 * fs/minix.c (grub_jfs_read_file): Likewise.
11626
11627 * fs/sfs.c (grub_jfs_read_file): Likewise.
11628
11629 * fs/ufs.c (grub_jfs_read_file): Likewise.
11630
11631 * fs/xfs.c (grub_jfs_read_file): Likewise.
11632
11633 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11634 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11635 respectively.
11636
11637 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11638 BLKNR to -1 instead of returning GRUB_ERRNO.
11639 (grub_ext2_read_file): Change the types of SECTOR and
11640 LEN to grub_disk_addr_t and grub_size_t, respectively.
11641
11642 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11643 LEN to grub_disk_addr_t and grub_size_t, respectively.
11644
11645 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11646 grub_file_read.
11647
11648 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11649 string. Do not cast SECTOR explicitly.
11650
11651 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11652 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11653 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11654 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11655 over 2TB and LBA mode is not supported, raise an error.
11656 (get_safe_sectors): New function.
11657 (grub_biosdisk_read): Use get_safe_sectors.
11658 (grub_biosdisk_write): Likewise.
11659
11660 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11661 (grub_efidisk_write): Likewise.
11662
11663 * disk/loopback.c (delete_loopback): Cosmetic changes.
11664 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11665 correctly.
11666 (grub_loopback_open): Likewise.
11667 (grub_loopback_read): Likewise. Also, change the type of POS to
11668 grub_off_t, and fix the usage of grub_memset.
11669
11670 * commands/i386/pc/play.c: Include grub/machine/time.h.
11671
11672 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11673 print FILE->SIZE.
11674
11675 * commands/configfile.c: Include grub/env.h.
11676
11677 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11678 GRUB_ERRNO directly instead. Change the type of POS to
11679 grub_off_t. Follow the coding standard.
11680
11681 * commands/blocklist.c: Include grub/partition.h.
11682 (grub_cmd_blocklist): Return an error if the underlying device is
11683 not a disk. Take the starting sector of a partition into account,
11684 if a partition is used.
11685
11686 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11687 a length field.
11688 (lba_mode): Support 64-bit addresses.
11689 (chs_mode): Likewise.
11690 (copy_buffer): Adapted to the new offsets of a length field and a
11691 segment field.
11692 (blocklist_default_start): Allocate 64-bit space.
11693
11694 * boot/i386/pc/boot.S (force_lba): Removed.
11695 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 11696 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 11697 space.
11698 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11699 is useless.
11700 (lba_mode): Refactored to support a 64-bit address. More size
11701 optimization.
11702 (setup_sectors): Likewise.
11703
53af98ad 117042006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11705
11706 * DISTLIST: Added include/grub/i386/linux.h. Removed
11707 include/grub/i386/pc/linux.h
11708
11709 * configure.ac (AC_INIT): Bumped to 1.94.
11710
11711 * config.guess: Updated from gnulib.
11712 * config.sub: Likewise.
11713 * install-sh: Likewise.
11714 * mkinstalldirs: Likewise.
11715
b4c1940a 117162006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11717
11718 * conf/common.rmk (grub_modules_init.lst): Depended on
11719 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11720 MODSRCFILES.
11721
11722 * genmk.rb (PModule::rule): Reverted the previous change.
11723
cfca1cfd 117242006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11725
11726 * conf/common.rmk (grub_modules_init.lst): Depends on
11727 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11728 that the target does not exist before producing.
11729 (grub_modules_init.h): Remove the target before generating.
11730 (grub_emu_init.c): Likewise.
11731
11732 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11733
aa6d7826 117342006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11735
11736 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11737 for the target-specific tests. Make sure that we also have the
11738 up-to-date target variables for those tests.
11739
26c607b9 117402006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11741
11742 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11743 (PModule::rule): Likewise.
11744
0162321a 117452006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11746
11747 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11748 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11749 target-specific flags should be prefixed.
11750 (PModule::rule): Likewise.
11751
6c826348 117522006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11753
11754 * configure.ac (CMP): Check if cmp is available explicitly.
11755
b977bf01 117562006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11757
11758 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11759 (target_cpu): New variable.
11760 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 11761
b977bf01 11762 * util/i386/pc/grub-install.in (host_cpu): Removed.
11763 (target_cpu): New variable.
11764 (pkglibdir): Use target_cpu instead of host_cpu.
11765
11766 * util/genmoddep.c: Removed.
f19dbdb7 11767
b977bf01 11768 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11769 instead of GRUB_HOST_SIZEOF_VOID_P.
11770 * kern/dl.c: Likewise.
11771
11772 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11773 ...
11774 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11775 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11776 (GRUB_TARGET_SIZEOF_LONG): ... this.
11777 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11778 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11779 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11780 to ...
11781 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11782 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11783 (GRUB_TARGET_SIZEOF_LONG): ... this.
11784 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11785 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11786 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11787 to ...
11788 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11789 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11790 (GRUB_TARGET_SIZEOF_LONG): ... this.
11791 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11792 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11793
11794 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11795 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11796 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11797 instead of GRUB_HOST_SIZEOF_LONG.
11798 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11799 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11800 GRUB_CPU_WORDS_BIGENDIAN.
11801 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11802 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11803 grub_host_ssize_t.
11804
11805 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11806 (genmoddep_SOURCES): Likewise.
11807 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11808 (genmoddep_SOURCES): Likewise.
11809 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11810 (genmoddep_SOURCES): Likewise.
11811 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11812 Likewise.
11813 (genmoddep_SOURCES): Likewise.
11814
11815 * genmoddep.awk: New file.
11816
11817 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11818 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11819 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11820 (PModule::rule): Likewise.
11821 (Program::rule): Likewise.
11822 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11823 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11824 respectively.
11825
11826 * configure.ac: Rewritten intensively to use host and target
11827 instead of build and host, respectively.
11828
11829 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11830 (host_cpu): Removed.
11831 (target_cpu): New variable.
11832 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11833 (BUILD_CC): Removed.
11834 (BUILD_CFLAGS): Likewise.
11835 (BUILD_CPPFLAGS): Likewise.
11836 (TARGET_CC): New variable.
11837 (TARGET_CFLAGS): Likewise.
11838 (TARGET_CPPFLAGS): Likewise.
11839 (TARGET_LDFLAGS): Likewise.
11840 (AWK): Likewise.
11841 (include): Use target_cpu instead of host_cpu.
11842 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 11843
b977bf01 11844 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11845
f09771a1 118462006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11847
11848 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11849 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11850 field 'false' to 'exec_on_false'.
11851 (grub_script_create_cmdif): Renamed argument names to reflect above
11852 changes.
11853
11854 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11855
11856 * normal/script.c (grub_script_create_cmdif): Likewise.
11857
118f4fb3 118582006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11859
11860 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11861 top.
11862 (grub_hfsplus_btree_recptr): Likewise.
11863 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11864 FILEBLOCK both to pass a block number and store next block
11865 number.
11866 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11867 overflow file correctly. Specify errors appropriately, because
11868 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11869 grub_hfsplus_btree_recptr to get the pointer to a found key.
11870 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11871 is found.
11872
11873 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11874 linux.mod.
11875 (_linux_mod_SOURCES): New variable.
11876 (_linux_mod_CFLAGS): Likewise.
11877 (_linux_mod_LDFLAGS): Likewise.
11878 (linux_mod_SOURCES): Likewise.
11879 (linux_mod_CFLAGS): Likewise.
11880 (linux_mod_LDFLAGS): Likewise.
11881
11882 * DISTLIST: Added loader/i386/efi/linux.c,
11883 loader/i386/efi/linux_normal.c and
11884 include/grub/i386/efi/loader.h.
11885
11886 * loader/i386/efi/linux.c: New file.
11887 * loader/i386/efi/linux_normal.c: Likewise.
11888 * include/grub/i386/efi/loader.h: Likewise.
11889
89a7d726 118902006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11891
11892 * commands/blocklist.c: New file.
11893
11894 * DISTLIST: Added commands/blocklist.c.
11895
11896 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 11897 color for the background, and a darker color for the foreground.
89a7d726 11898 (grub_console_checkkey): Return READ_KEY.
11899 (grub_console_cls): Set the background to
11900 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11901
11902 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11903
11904 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11905 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11906
11907 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11908 prototype.
11909
11910 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11911 BG. The spec is wrong again.
11912
11913 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11914 prototype.
11915 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11916
11917 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11918 commands/blocklist.c.
11919 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11920
89a7d726 11921 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11922 (blocklist_mod_SOURCES): New variable.
11923 (blocklist_mod_CFLAGS): Likewise.
11924 (blocklist_mod_LDFLAGS): Likewise.
11925
75c8f258 119262006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11927
11928 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11929 duplication.
11930 (lba_mode): Use %eax more intensively to reduce the code size.
11931
da2eb181 119322006-05-20 Marco Gerards <marco@gnu.org>
11933
11934 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11935
11936 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11937 for `menuentry'.
11938 (script): Accept leading newlines.
11939 (newlines): New rule to describe 0 or more newlines.
11940 (commands): Accept `command' with trailing newline. Fixed the
11941 order in which arguments were passed to `grub_script_add_cmd'.
11942 Accept commands separated by newlines.
11943 (function): Changed to accept newlines.
11944 (menuentry) Rewritten.
11945
11946 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11947 front of the list, instead of to the end.
11948
577b4050 119492006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11950
11951 * util/i386/pc/grub-install.in (bindir): New variable.
11952 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11953 Shaver <lbgwjl@gmail.com>.
11954
0d6e1189 119552006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11956
11957 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11958 grub/machine/linux.h
11959 * loader/i386/pc/linux.c: Likewise.
11960
11961 * include/grub/i386/pc/linux.h: Moved to ...
11962 * include/grub/i386/linux.h: ... here.
11963
11964 * include/grub/i386/linux.h (struct linux_kernel_params): New
11965 struct.
f19dbdb7 11966
31b86e9f 119672006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11968
11969 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11970 checking.
11971 (grub_video_vbe_blit_glyph): Likewise.
11972 (grub_video_vbe_blit_bitmap): Likewise.
11973 (grub_video_vbe_blit_render_target): Likewise.
11974
83b984de 119752006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11976
11977 * configure.ac (--with-platform): Properly quote the square
11978 brackets.
11979
5f0413bd 119802006-05-08 Marco Gerards <marco@gnu.org>
11981
11982 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11983 this...
11984 (kernel_elf_HEADERS): ...to this. Updated all users.
11985 (grubof_symlist.c): Renamed from this...
11986 (kernel_elf_symlist.c): ...to this. Updated all users.
11987 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11988 (grubof_SOURCES): Renamed from this...
11989 (kernel_elf_SOURCES): ...to this.
11990 (grubof_HEADERS): Renamed from this...
11991 (kernel_elf_HEADERS): ...to this.
11992 (grubof_CFLAGS): Renamed from this...
11993 (kernel_elf_CFLAGS): ...to this.
11994 (grubof_ASFLAGS): Renamed from this...
11995 (kernel_elf_ASFLAGS): ...to this.
11996 (grubof_LDFLAGS): Renamed from this...
11997 (kernel_elf_LDFLAGS): ...to this.
11998
11999 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12000 this...
12001 (kernel_elf_HEADERS): ...to this. Updated all users.
12002 (grubof_symlist.c): Renamed from this...
12003 (kernel_elf_symlist.c): ...to this. Updated all users.
12004 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12005 (grubof_SOURCES): Renamed from this...
12006 (kernel_elf_SOURCES): ...to this.
12007 (grubof_HEADERS): Renamed from this...
12008 (kernel_elf_HEADERS): ...to this.
12009 (grubof_CFLAGS): Renamed from this...
12010 (kernel_elf_CFLAGS): ...to this.
12011 (grubof_ASFLAGS): Renamed from this...
12012 (kernel_elf_ASFLAGS): ...to this.
12013 (grubof_LDFLAGS): Renamed from this...
12014 (kernel_elf_LDFLAGS): ...to this.
12015
12016 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12017 `kernel.elf' instead of `grubof'.
12018
05568c2e 120192006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12020
12021 Add --with-platform to configure. Use pkglibdir instead of
12022 pkgdatadir. This is reported by Roger Leigh.
12023
12024 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12025 (host_vendor): Likewise.
12026 (host_os): Likewise.
12027 (pkgdatadir): Likewise.
12028 (platform): New variable.
12029 (pkglibdir): Likewise.
12030 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 12031
05568c2e 12032 * util/i386/pc/grub-install.in (datadir): Removed.
12033 (host_vendor): Likewise.
12034 (host_os): Likewise.
12035 (pkgdatadir): Likewise.
12036 (platform): New variable.
12037 (pkglibdir): Likewise.
12038 Use PKGLIBDIR instead of PKGDATADIR.
12039
12040 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12041 instead of GRUB_DATADIR.
12042 (main): Likewise.
12043 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12044 (main): Likewise.
12045 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12046 (main): Likewise.
12047
12048 * configure.ac (--with-platform): New option.
12049 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12050
12051 * Makefile.in: Include a makefile based on PLATFORM instead of
12052 HOST_VENDOR.
12053 (pkgdatadir): Not appended by the machine type.
12054 (pkglibdir): Appended by the machine type.
12055 (host_vendor): Removed.
12056 (platform): New variable.
12057 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12058 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12059 (uninstall): Likewise.
12060
4e93851c 120612006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12062
12063 Use the environment context in the menu. Remove the commands
12064 "default" and "timeout", and use variables instead.
f19dbdb7 12065
4e93851c 12066 * normal/menu.c: Include grub/env.h.
12067 (print_entry): Cast TITLE to silence gcc.
12068 (get_timeout): New function.
12069 (set_timeout): Likewise.
12070 (get_entry_number): Likewise.
12071 (run_menu): Use a default entry, a fallback entry and a timeout
12072 in the environment variables "default", "fallback" and
12073 "timeout". Also, tweak the default entry if it is not within the
12074 current menu entries.
12075 (grub_menu_run): Use a fallback entry in the environment variable
12076 "fallback".
12077
12078 * normal/main.c (read_config_file): Do not initialize
12079 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12080 NEWMENU->TIMEOUT.
12081 (grub_normal_execute): Use a data slot to store the menu.
12082
12083 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12084 fallback_entry and timeout.
12085 (struct grub_menu_list): Removed.
12086 (grub_menu_list_t): Likewise.
12087 (struct grub_context): Likewise.
12088 (grub_context_t): Likewise.
12089 (grub_context_get): Likewise.
12090 (grub_context_get_current_menu): Likewise.
12091 (grub_context_push_menu): Likewise.
12092 (grub_context_pop_menu): Likewise.
12093 (grub_default_init): Likewise.
12094 (grub_default_fini): Likewise.
12095 (grub_timeout_init): Likewise.
12096 (grub_timeout_fini): Likewise.
12097
12098 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12099 and timeout.mod.
12100 (normal_mod_SOURCES): Removed normal/context.c.
12101
12102 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12103 commands/default.c, commands/timeout.c and normal/context.c.
12104 (normal_mod_SOURCES): Removed normal/context.c.
12105
12106 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12107 commands/timeout.c and normal/context.c.
12108 (normal_mod_SOURCES): Removed normal/context.c.
12109
12110 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12111 commands/default.c, commands/timeout.c and normal/context.c.
12112 (normal_mod_SOURCES): Removed normal/context.c.
12113
12114 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12115 timeout.mod.
12116 (default_mod_SOURCES): Removed.
12117 (default_mod_CFLAGS): Likewise.
12118 (default_mod_LDFLAGS): Likewise.
12119 (timeout_mod_SOURCES): Removed.
12120 (timeout_mod_CFLAGS): Likewise.
12121 (timeout_mod_LDFLAGS): Likewise.
12122
12123 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12124 normal/context.c.
12125
12126 * commands/default.c: Removed.
12127 * commands/timeout.c: Likewise.
12128 * normal/context.c: Likewise.
12129
1eb9cc1d 121302006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12131
12132 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12133
385bd9c1 121342006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12135
12136 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12137 "next" to "prev" for readability.
12138 (struct grub_env_sorted_var): New struct.
12139 (grub_env_context): Renamed to ...
12140 (initial_context): ... this.
12141 (grub_env_var_context): Renamed to ...
12142 (current_context): ... this.
12143 (grub_env_find): Look only at CURRENT_CONTEXT.
12144 (grub_env_context_open): Rewritten to copy exported variables from
12145 previous context.
12146 (grub_env_context_close): Rewritten according to the new
12147 scheme. Also, add an assertion to prevent the initial context from
12148 removed.
12149 (grub_env_insert): Removed the code for the sorted list.
12150 (grub_env_remove): Likewise.
12151 (grub_env_export): Simply mark the variable with
12152 GRUB_ENV_VAR_GLOBAL.
12153 (grub_env_set): A cosmetic change for naming consistency.
12154 (grub_env_get): Likewise.
12155 (grub_env_unset): Likewise.
12156 (grub_env_iterate): Rewritten to sort variables within this
12157 function.
12158 (grub_register_variable_hook): Fixed for naming consistency. Call
12159 grub_env_find again, only if NAME is not found at the first time.
12160 (mangle_data_slot_name): New function.
12161 (grub_env_set_data_slot): Likewise.
12162 (grub_env_get_data_slot): Likewise.
12163 (grub_env_unset_data_slot): Likewise.
12164
12165 * include/grub/env.h (grub_env_var_type): New enum.
12166 (GRUB_ENV_VAR_LOCAL): New constant.
12167 (GRUB_ENV_VAR_GLOBAL): Likewise.
12168 (GRUB_ENV_VAR_DATA): Likewise.
12169 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12170 "type".
12171 (grub_env_set): Replace VAR with NAME for consistency.
12172 (grub_register_variable_hook): Likewise.
12173 (grub_env_export): Specify the name of the argument.
12174 (grub_env_set_data_slot): New prototype.
12175 (grub_env_get_data_slot): Likewise.
12176 (grub_env_unset_data_slot): Likewise.
12177
7f362539 121782006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12179
12180 Extend the loader so that GRUB can accept a loader which comes
12181 back to GRUB when a loaded image exits. Also, this change adds
12182 support for a chainloader on EFI.
f19dbdb7 12183
7f362539 12184 * term/efi/console.c: Include grub/misc.h.
12185 (grub_console_checkkey): Display a scan code on the top for
12186 debugging. This will be removed once the EFI port gets stable.
12187 Correct the scan code mapping.
12188
12189 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12190 allocate memory from larger regions, in order to reduce the number
12191 of allocated regions. Otherwise, the MacOSX loader panics.
12192 (filter_memory_map): Avoid less than 1MB for compatibility with
12193 other loaders.
12194 (add_memory_regions): Allocate from the tail of a region, if
12195 possible, to avoid allocating a region near to 1MB, for the MacOSX
12196 loader.
12197
12198 * kern/efi/init.c (grub_efi_set_prefix): Specify
12199 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12200
12201 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12202 argument IMAGE_HANDLE and specify it to get a loaded image.
12203 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12204 grub_efi_get_loaded_image.
fe6b695a 12205 (grub_efi_get_filename): Divide the length by the size of
7f362539 12206 grub_efi_char16_t.
12207 (grub_efi_get_device_path): New function.
12208 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12209 the length by the size of grub_efi_char16_t for a file path device
12210 path node.
12211
12212 * kern/loader.c (grub_loader_noreturn): New variable.
12213 (grub_loader_set): Accept a new argument NORETURN. Set
12214 GRUB_LOADER_NORETURN to NORETURN.
12215 All callers changed.
12216 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12217 grub_machine_fini.
12218
12219 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12220 prototype.
12221 (grub_efi_get_loaded_image): Take an argument to specify an image
12222 handle.
12223
12224 * include/grub/loader.h (grub_loader_set): Added one more argument
12225 NORETURN.
12226
12227 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12228 instead of grub_efi_open_protocol.
12229 (grub_efidisk_get_device_name): Likewise.
12230 (grub_efidisk_close): Print a newline.
12231 (grub_efidisk_get_device_handle): Fixed to use
12232 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12233 GRUB_EFI_DEVICE_PATH_TYPE.
12234
12235 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12236 * kern/efi/efi.c (device_path_guid): ... here.
12237
12238 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12239 chain.mod.
12240 (kernel_mod_HEADERS): Added efi/disk.h.
12241 (_chain_mod_SOURCES): New variable.
12242 (_chain_mod_CFLAGS): Likewise.
12243 (_chain_mod_LDFLAGS): Likewise.
12244 (chain_mod_SOURCES): Likewise.
12245 (chain_mod_CFLAGS): Likewise.
12246 (chain_mod_LDFLAGS): Likewise.
12247
12248 * DISTLIST: Added include/grub/efi/chainloader.h,
12249 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12250
12251 * include/grub/efi/chainloader.h: New file.
12252 * loader/efi/chainloader.c: Likewise.
12253 * loader/efi/chainloader_normal.c: Likewise.
12254
c0111d6e 122552006-04-30 Marco Gerards <marco@gnu.org>
12256
12257 * commands/configfile.c (grub_cmd_source): New function.
12258 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12259 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12260
df5341da 122612006-04-30 Marco Gerards <marco@gnu.org>
12262
12263 * normal/execute.c (grub_script_execute_cmd): Change the return
12264 type to `grub_err_t'. Correctly return the error.
12265 (grub_script_execute_cmdline): In case a command line is not a
12266 command or a function, try to interpret it as an assignment.
12267
f85934bd 122682006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12269
12270 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12271 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12272 skip a node whose name is obviously invalid as UTF-16,
12273 i.e. contains a NUL character. Stop the iteration when the last
12274 directory entry is found. Instead of using the return value of
12275 grub_hfsplus_btree_iterate_node, store the value in RET and use
12276 it, because the iterator can be stopped by the last directory
12277 entry.
12278
8f8a2cf8 122792006-04-30 Marco Gerards <marco@gnu.org>
12280
12281 * include/grub/env.h (grub_env_export): New prototype. Reported
12282 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12283
a27e84ce 122842006-04-30 Marco Gerards <marco@gnu.org>
12285
12286 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12287 size of the extents in a catalog file record.
12288
eaef0553 122892006-04-29 Marco Gerards <marco@gnu.org>
12290
12291 * commands/configfile.c (grub_cmd_configfile): Execute the
12292 configfile within its own context.
12293
12294 * include/grub/env.h (grub_env_context_open): New prototype.
12295 (grub_env_context_close): Likewise.
12296
12297 * kern/env.c (grub_env): Removed.
12298 (grub_env_sorted): Likewise.
12299 (grub_env_context): New variable.
12300 (grub_env_var_context): Likewise.
12301 (grub_env_find): Search both the active context and the global
12302 context.
12303 (grub_env_context_open): New function.
12304 (grub_env_context_close): Likewise.
12305 (grub_env_insert): Likewise.
12306 (grub_env_remove): Likewise.
12307 (grub_env_export): Likewise.
12308 (grub_env_set): Changed to use helper functions to avoid code
12309 duplication.
12310 (grub_env_iterate): Rewritten so both the current context and the
12311 global context are being used.
12312
12313 * normal/command.c (export_command): New function.
12314 (grub_command_init): Register the `export' function.
12315
7b455f4d 123162006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12317
12318 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12319 explicitly to suppress gcc's warnings.
12320 * fs/fat.c (grub_fat_find_dir): Likewise.
12321 (grub_fat_label): Likewise.
12322 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12323 (grub_xfs_mount): Likewise.
12324 (grub_xfs_label): Likewise.
12325 * fs/affs.c (grub_affs_mount): Likewise.
12326 (grub_affs_label): Likewise.
12327 (grub_affs_iterate_dir): Likewise.
12328 * fs/sfs.c (grub_sfs_mount): Likewise.
12329 (grub_sfs_iterate_dir): Likewise.
12330 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12331 * fs/hfs.c (grub_hfs_mount): Likewise.
12332 (grub_hfs_cmp_catkeys): Likewise.
12333 (grub_hfs_find_dir): Likewise.
12334 (grub_hfs_dir): Likewise.
12335 (grub_hfs_label): Likewise.
12336 * fs/jfs.c (grub_jfs_mount): Likewise.
12337 (grub_jfs_opendir): Likewise.
12338 (grub_jfs_getent): Likewise.
12339 (grub_jfs_lookup_symlink): Likewise.
12340 (grub_jfs_label): Likewise.
12341 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12342 (grub_hfsplus_iterate_dir): Likewise.
12343 (grub_hfsplus_btree_iterate_node): Made static.
12344
12345 * util/grub-emu.c (prefix): New variable.
12346 (grub_machine_set_prefix): New function.
12347 (main): Do not set the environment variable "prefix" here. Only
12348 set PREFIX, which is used later by grub_machine_set_prefix.
12349
12350 * include/grub/video.h: Do not include grub/symbol.h.
12351 (grub_video_register): Not exported. This symbol is not defined in
12352 the kernel.
12353 (grub_video_unregister): Likewise.
12354 (grub_video_iterate): Likewise.
12355 (grub_video_setup): Likewise.
12356 (grub_video_restore): Likewise.
12357 (grub_video_get_info): Likewise.
12358 (grub_video_get_blit_format): Likewise.
12359 (grub_video_set_palette): Likewise.
12360 (grub_video_get_palette): Likewise.
12361 (grub_video_set_viewport): Likewise.
12362 (grub_video_get_viewport): Likewise.
12363 (grub_video_map_color): Likewise.
12364 (grub_video_map_rgb): Likewise.
12365 (grub_video_map_rgba): Likewise.
12366 (grub_video_fill_rect): Likewise.
12367 (grub_video_blit_glyph): Likewise.
12368 (grub_video_blit_bitmap): Likewise.
12369 (grub_video_blit_render_target): Likewise.
12370 (grub_video_scroll): Likewise.
12371 (grub_video_swap_buffers): Likewise.
12372 (grub_video_create_render_target): Likewise.
12373 (grub_video_delete_render_target): Likewise.
12374 (grub_video_set_active_render_target): Likewise.
12375
12376 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12377 Undefined.
12378 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12379
12380 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12381 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12382 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12383 instead of $(srcdir)/genkernsyms.sh.
12384
12385 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12386 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12387 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12388 instead of $(srcdir)/genkernsyms.sh.
12389
12390 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12391 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12392 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12393 instead of $(srcdir)/genkernsyms.sh.
12394
12395 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12396 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12397 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12398 instead of $(srcdir)/genkernsyms.sh.
12399
12400 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12401 genkernsyms.sh.
12402
12403 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12404 genkernsyms.sh.
12405 (gensymlist.sh): New target.
12406 (genkernsyms.sh): Likewise.
12407
12408 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12409 genkernsyms.sh.in and gensymlist.sh.in.
12410
12411 * genkernsyms.sh: Removed.
12412 * gensymlist.sh: Likewise.
f19dbdb7 12413
7b455f4d 12414 * genkernsyms.sh.in: New file.
12415 * gensymlist.sh.in: Likewise.
12416
1885bb27 124172006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12418
12419 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12420 clobber "prefix", since we may have already set it manually.
12421
71538dff 124222006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12423
12424 * kern/misc.c (abort): New alias for grub_abort.
12425
2965c7cc 124262006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12427
12428 A new machine-specific function "grub_machine_set_prefix" is
12429 defined. This is called after loading modules, so that a prefix
12430 initialization can use modules. Also, this change adds an
12431 intensive debugging feature for the memory manager via the
12432 configure option "--enable-mm-debug".
f19dbdb7 12433
2965c7cc 12434 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12435 PART.LEN.
12436
12437 * kern/sparc64/ieee1275/init.c (abort): Removed.
12438 (grub_stop): Likewise.
12439 (grub_exit): New function.
12440 (grub_set_prefix): Renamed to ...
12441 (grub_machine_set_prefix): ... this.
12442 (grub_machine_init): Do not call grub_set_prefix.
12443
12444 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12445 (grub_machine_set_prefix): ... this.
12446 (grub_machine_init): Do not call grub_set_prefix.
12447
12448 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12449 (grub_machine_init): Do not set the prefix here.
12450
12451 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12452
12453 * kern/efi/init.c: Include grub/mm.h.
12454 (grub_efi_set_prefix): New function.
12455
12456 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12457 (grub_efi_get_filename): New function.
12458 (grub_print_device_path): Renamed to ...
12459 (grub_efi_print_device_path): ... this.
12460
12461 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12462 [MM_DEBUG] (grub_realloc): Likewise.
12463 [MM_DEBUG] (grub_free): Likewise.
12464 [MM_DEBUG] (grub_memalign): Likewise.
12465 [MM_DEBUG] (grub_mm_debug): New variable.
12466 [MM_DEBUG] (grub_debug_malloc): New function.
12467 [MM_DEBUG] (grub_debug_free): New function.
12468 [MM_DEBUG] (grub_debug_realloc): New function.
12469 [MM_DEBUG] (grub_debug_memalign): New function.
12470
12471 * kern/misc.c (grub_abort): Print a newline to distinguish
12472 the message.
12473
12474 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12475 grub_set_root_dev after loading modules. This is necessary when
12476 setting a prefix depends on modules.
12477
12478 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12479 (grub_efi_print_device_path): ... this.
12480 (grub_efi_get_filename): New prototype.
12481 (grub_efi_set_prefix): Likewise.
12482
12483 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12484 and grub/disk.h.
12485 (grub_efidisk_get_device_handle): New prototype.
12486 (grub_efidisk_get_device_name): Likewise.
12487
12488 * include/grub/mm.h: Include config.h.
12489 (MM_DEBUG): Removed.
12490 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12491 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12492 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12493 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12494 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12495 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12496 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12497 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12498 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12499
12500 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12501
12502 * disk/efi/efidisk.c: Include grub/partition.h.
12503 (iterate_child_devices): New function.
12504 (add_device): First, compare only last device path nodes, so that
12505 devices are sorted by the types.
12506 (grub_efidisk_get_device_handle): New function.
12507 (grub_efidisk_get_device_name): Likewise.
12508
12509 * configure.ac (--enable-mm-debug): New option to enable the
12510 memory manager debugging feature. This makes the binary much
12511 bigger, so is disabled by default.
12512
9cacaa17 125132006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12514
12515 Use grub_abort instead of grub_stop, and grub_exit must be
12516 define in each architecture now. Also, this change adds support
12517 for EFI disks.
f19dbdb7 12518
9cacaa17 12519 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12520 (grub_getkey): New function.
12521 (grub_term_get_current): Likewise.
12522
12523 * util/i386/pc/grub-setup.c: Include grub/term.h.
12524 (grub_getkey): New function.
12525 (grub_term_get_current): Likewise.
12526
12527 * util/misc.c (grub_stop): Renamed to ...
12528 (grub_exit): ... this.
12529
12530 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12531 (grub_exit): ... this.
12532 (grub_machine_init): Use grub_abort instead of abort.
12533 (grub_stop): Removed.
12534
12535 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12536 abort.
12537
12538 * kern/i386/pc/startup.S (grub_exit): New function.
12539 (cold_reboot): New label.
12540
12541 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12542 (grub_efi_init): Call grub_efidisk_init.
12543 (grub_efi_fini): Call grub_efidisk_fini.
12544
12545 * kern/efi/efi.c: Include grub/mm.h.
12546 (grub_efi_console_control_guid): Renamed to ...
12547 (console_control_guid): ... this.
12548 (grub_efi_loaded_image_guid): Renamed to ...
12549 (loaded_image_guid): ... this.
12550 (grub_efi_locate_handle): New function.
12551 (grub_efi_open_protocol): Likewise.
12552 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12553 GRUB_EFI_CONSOLE_CONTROL_GUID.
12554 (grub_efi_exit): Removed.
12555 (grub_stop): Likewise.
12556 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12557 (grub_exit): New function.
12558 (grub_print_device_path): Likewise.
12559
12560 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12561 (grub_enter_rescue_mode): Register "exit".
12562
12563 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12564 (grub_abort): New function.
12565
12566 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12567
12568 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12569
12570 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12571
12572 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12573 (grub_print_device_path): New prototype.
12574 (grub_efi_locate_handle): Likewise.
12575 (grub_efi_open_protocol): Likewise.
12576
12577 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12578 * disk/efi/efidisk.c: Likewise.
12579
12580 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12581
12582 * include/grub/efi/console_control.h
12583 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12584
12585 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12586 last 8 bytes as an array.
12587 (GRUB_EFI_DISK_IO_GUID): New macro.
12588 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12589 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12590 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12591 grub_uint8_t.
12592 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12593 (struct grub_efi_device_path): Rename the member "sub_type" to
12594 "subtype".
12595 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12596 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12597 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12598 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12599 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12600 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12601 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12602 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12603 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12604 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12605 (struct grub_efi_pci_device_path): New structure.
12606 (grub_efi_pci_device_path_t): New type.
12607 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12608 (struct grub_efi_pccard_device_path): New structure.
12609 (grub_efi_pccard_device_path_t): New type.
12610 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12611 (struct grub_efi_memory_mapped_device_path): New structure.
12612 (grub_efi_memory_mapped_device_path_t): New type.
12613 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12614 (struct grub_efi_vendor_device_path): New structure.
12615 (grub_efi_vendor_device_path_t): New type.
12616 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12617 (struct grub_efi_controller_device_path): New structure.
12618 (grub_efi_controller_device_path_t): New type.
12619 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12620 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12621 (struct grub_efi_acpi_device_path): New structure.
12622 (grub_efi_acpi_device_path_t): New type.
12623 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12624 (struct grub_efi_expanded_acpi_device_path): New structure.
12625 (grub_efi_expanded_acpi_device_path_t): New type.
12626 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12627 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12628 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12629 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12630 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12631 (struct grub_efi_atapi_device_path): New structure.
12632 (grub_efi_atapi_device_path_t): New type.
12633 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12634 (struct grub_efi_fibre_channel_device_path): New structure.
12635 (grub_efi_fibre_channel_device_path_t): New type.
12636 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12637 (struct grub_efi_1394_device_path): New structure.
12638 (grub_efi_1394_device_path_t): New type.
12639 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12640 (struct grub_efi_usb_device_path): New structure.
12641 (grub_efi_usb_device_path_t): New type.
12642 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12643 (struct grub_efi_usb_class_device_path): New structure.
12644 (grub_efi_usb_class_device_path_t): New type.
12645 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12646 (struct grub_efi_i2o_device_path): New structure.
12647 (grub_efi_i2o_device_path_t): New type.
12648 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12649 (struct grub_efi_mac_address_device_path): New structure.
12650 (grub_efi_mac_address_device_path_t): New type.
12651 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12652 (struct grub_efi_ipv4_device_path): New structure.
12653 (grub_efi_ipv4_device_path_t): New type.
12654 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12655 (struct grub_efi_ipv6_device_path): New structure.
12656 (grub_efi_ipv6_device_path_t): New type.
12657 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12658 (struct grub_efi_infiniband_device_path): New structure.
12659 (grub_efi_infiniband_device_path_t): New type.
12660 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12661 (struct grub_efi_uart_device_path): New structure.
12662 (grub_efi_uart_device_path_t): New type.
12663 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12664 (struct grub_efi_vendor_messaging_device_path): New structure.
12665 (grub_efi_vendor_messaging_device_path_t): New type.
12666 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12667 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12668 (struct grub_efi_hard_drive_device_path): New structure.
12669 (grub_efi_hard_drive_device_path_t): New type.
12670 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12671 (struct grub_efi_cdrom_device_path): New structure.
12672 (grub_efi_cdrom_device_path_t): New type.
12673 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12674 (struct grub_efi_vendor_media_device_path): New structure.
12675 (grub_efi_vendor_media_device_path_t): New type.
12676 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12677 (struct grub_efi_file_path_device_path): New structure.
12678 (grub_efi_file_path_device_path_t): New type.
12679 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12680 (struct grub_efi_protocol_device_path): New structure.
12681 (grub_efi_protocol_device_path_t): New type.
12682 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12683 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12684 (struct grub_efi_bios_device_path): New structure.
12685 (grub_efi_bios_device_path_t): New type.
12686 (struct grub_efi_disk_io): New structure.
12687 (grub_efi_disk_io_t): New type.
12688 (struct grub_efi_block_io_media): New structure.
12689 (grub_efi_block_io_media_t): New type.
12690 (struct grub_efi_block_io): New structure.
12691 (grub_efi_block_io_t): New type.
12692
12693 * include/grub/misc.h (grub_stop): Removed.
12694 (grub_exit): New prototype.
12695 (grub_abort): Likewise.
12696
12697 * include/grub/disk.h (enum grub_disk_dev_id): Added
12698 GRUB_DISK_DEVICE_EFIDISK_ID.
12699
12700 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12701 disk/efi/efidisk.c.
12702 (kernel_syms.lst): Remove the target if an error occurs.
12703
49986a9f 127042006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12705
12706 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12707 as it was simply too buggy.
12708
970d3b8a 127092006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12710
12711 * kern/misc.c (grub_lltoa): New function.
12712 (grub_vsprintf): Added support for the long long suffix,
12713 i.e. "ll".
12714
ff04ec24 127152006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12716
12717 * Makefile.in (LDFLAGS): Add variable.
12718 (LD): Remove variable.
12719 * configure.ac: Add -m32 to LDFLAGS.
12720 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12721 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12722 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12723 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12724 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12725 variables.
12726 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12727 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12728 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12729
37e5e1a4 127302006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12731
12732 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12733 length for unknown glyph.
12734
c352d8dd 127352006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12736
2eab1c0d 12737 Add support for pre-loaded modules into the EFI port.
f19dbdb7 12738
2eab1c0d 12739 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12740 completely. Accept one more argument DIR. The caller has changed.
12741
12742 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12743
12744 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12745 (grub_efi_loaded_image_guid): New variable.
12746 (grub_efi_get_loaded_image): New function.
12747 (grub_arch_modules_addr): Likewise.
12748
12749 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12750 prototype.
12751
12752 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12753 (struct grub_efi_loaded_image): New structure.
12754 (grub_efi_loaded_image_t): New type.
12755
127562006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12757
c352d8dd 12758 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12759 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12760 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12761
6d01d6b4 127622006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12763
12764 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12765
976a4ea0 127662006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12767
12768 * DISTLIST: Added include/grub/efi/console.h,
12769 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12770 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12771
12772 * include/grub/efi/console.h: New file.
12773 * include/grub/efi/time.h: Likewise.
12774 * include/grub/i386/efi/kernel.h: Likewise.
12775 * kern/efi/init.c: Likewise.
12776 * kern/efi/mm.c: Likewise.
12777 * term/efi/console.c: Likewise.
f19dbdb7 12778
976a4ea0 12779 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12780 (grub_stop): Removed.
12781 (grub_get_rtc): Likewise.
12782 (grub_machine_init): Simply call grub_efi_init.
12783 (grub_machine_fini): Call grub_efi_fini.
12784
12785 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12786 (grub_efi_output_string): Removed.
12787 (grub_efi_stall): New function.
12788 (grub_stop): Likewise.
12789 (grub_get_rtc): Likewise.
12790
12791 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12792 (grub_efi_stall): New prototype.
12793 (grub_efi_allocate_pages): Likewise.
12794 (grub_efi_free_pages): Likewise.
12795 (grub_efi_get_memory_map): Likewise.
12796 (grub_efi_mm_init): Likewise.
12797 (grub_efi_mm_fini): Likewise.
12798 (grub_efi_init): Likewise.
12799 (grub_efi_fini): Likewise.
12800
12801 * include/grub/i386/efi/time.h: Do not include
12802 grub/symbol.h. Include grub/efi/time.h.
12803 (GRUB_TICKS_PER_SECOND): Removed.
12804 (grub_get_rtc): Likewise.
12805
12806 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12807 Added padding. The EFI spec is buggy.
12808 (GRUB_EFI_BLACK): New macro.
12809 (GRUB_EFI_BLUE): Likewise.
12810 (GRUB_EFI_GREEN): Likewise.
12811 (GRUB_EFI_CYAN): Likewise.
12812 (GRUB_EFI_RED): Likewise.
12813 (GRUB_EFI_MAGENTA): Likewise.
12814 (GRUB_EFI_BROWN): Likewise.
12815 (GRUB_EFI_LIGHTGRAY): Likewise.
12816 (GRUB_EFI_BRIGHT): Likewise.
12817 (GRUB_EFI_DARKGRAY): Likewise.
12818 (GRUB_EFI_LIGHTBLUE): Likewise.
12819 (GRUB_EFI_LIGHTGREEN): Likewise.
12820 (GRUB_EFI_LIGHTCYAN): Likewise.
12821 (GRUB_EFI_LIGHTRED): Likewise.
12822 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12823 (GRUB_EFI_YELLOW): Likewise.
12824 (GRUB_EFI_WHITE): Likewise.
12825 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12826 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12827 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12828 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12829 (GRUB_EFI_BACKGROUND_RED): Likewise.
12830 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12831 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12832 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12833 (GRUB_EFI_TEXT_ATTR): Likewise.
12834
12835 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12836 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12837 (kernel_mod_HEADERS): Added efi/time.h.
12838
83709125 128392006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12840
12841 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12842 include/grub/efi/api.h, include/grub/efi/console_control.h,
12843 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12844 include/grub/i386/efi/time.h, kern/efi/efi.c,
12845 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12846 and util/i386/efi/grub-mkimage.c.
12847
12848 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12849
12850 * genmk.rb (PModule#rule): Do not export symbols if
12851 #{prefix}_EXPORTS is set to "no".
12852
12853 * conf/i386-efi.mk: New file.
12854 * conf/i386-efi.rmk: Likewise.
12855 * include/grub/efi/api.h: Likewise.
12856 * include/grub/efi/console_control.h: Likewise.
12857 * include/grub/efi/efi.h: Likewise.
12858 * include/grub/efi/pe32.h: Likewise.
12859 * include/grub/i386/efi/time.h: Likewise.
12860 * kern/efi/efi.c: Likewise.
12861 * kern/i386/efi/init.c: Likewise.
12862 * kern/i386/efi/startup.S: Likewise.
12863 * util/i386/efi/grub-mkimage.c: Likewise.
12864
128652006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 12866
12867 * include/grub/script.h: Include <grub/parser.h> and
12868 "grub_script.tab.h".
12869 (struct grub_lexer_param): New struct.
12870 (struct grub_parser_param): Likewise.
12871 (grub_script_create_arglist): Pass the state in an argument.
12872 (grub_script_add_arglist): Likewise.
12873 (grub_script_create_cmdline): Likewise.
12874 (grub_script_create_cmdblock): Likewise.
12875 (grub_script_create_cmdif): Likewise.
12876 (grub_script_create_cmdmenu): Likewise.
12877 (grub_script_add_cmd): Likewise.
12878 (grub_script_arg_add): Likewise.
12879 (grub_script_lexer_ref): Likewise.
12880 (grub_script_lexer_deref): Likewise.
12881 (grub_script_lexer_record_start): Likewise.
12882 (grub_script_lexer_record_stop): Likewise.
12883 (grub_script_mem_record): Likewise.
12884 (grub_script_mem_record_stop): Likewise.
12885 (grub_script_malloc): Likewise.
12886 (grub_script_yylex): Likewise.
12887 (grub_script_yyparse): Likewise.
12888 (grub_script_yyerror): Likewise.
12889 (grub_script_yylex): Likewise.
12890 (grub_script_lexer_init): Return the state.
12891
12892 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12893 (grub_script_lexer_done): Likewise.
12894 (grub_script_lexer_getline): Likewise.
12895 (grub_script_lexer_refs): Likewise.
12896 (script): Likewise.
12897 (newscript): Likewise.
12898 (record): Likewise.
12899 (recording): Likewise.
12900 (recordpos): Likewise.
12901 (recordlen): Likewise.
12902 (grub_script_lexer_init): Return the state instead of setting
12903 global variables.
12904 (grub_script_lexer_ref): Use the newly added argument for state
12905 instead of globals.
12906 (grub_script_lexer_deref): Likewise.
12907 (grub_script_lexer_record_start): Likewise.
12908 (grub_script_lexer_record_stop): Likewise.
12909 (recordchar): Likewise.
12910 (nextchar): Likewise.
12911 (grub_script_yylex2): Likewise.
12912 (grub_script_yylex): Likewise.
12913 (grub_script_yyerror): Likewise.
12914
12915 * normal/parser.y (func_mem): Removed variable.
12916 (menu_entry): Likewise.
12917 (err): Likewise.
12918 (%lex-param): New parser option.
12919 (%parse-param): Likewise.
12920 (script): Always return the AST.
12921 (argument): Pass the state around.
12922 (arguments): Likewise.
12923 (grubcmd): Likewise.
12924 (commands): Likewise.
12925 (function): Likewise.
12926 (menuentry): Likewise.
12927 (if_statement): Likewise.
12928 (if): Likewise.
12929
12930 * normal/script.c (grub_script_memused): Removed variable.
12931 (grub_script_parsed): Likewise.
12932 (grub_script_malloc): Added a state argument. Use that instead of
12933 global variables.
12934 (grub_script_mem_record): Likewise.
12935 (grub_script_mem_record_stop): Likewise.
12936 (grub_script_arg_add): Likewise.
12937 (grub_script_add_arglist): Likewise.
12938 (grub_script_create_cmdline): Likewise.
12939 (grub_script_create_cmdif): Likewise.
12940 (grub_script_create_cmdmenu): Likewise.
12941 (grub_script_add_cmd): Likewise.
12942 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12943
e2a8c904 129442006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12945
12946 * normal/command.c (grub_command_init): Remove the title command.
12947
12948 * normal/lexer.c (grub_script_yylex): Renamed from this...
12949 (grub_script_yylex2): ... to this.
12950 (grub_script_yylex): New function. Temporary
12951 introduced to filter some tokens.
12952 (grub_script_yyerror): Print a newline.
12953
12954 * normal/main.c (read_config_file): Output information about the
12955 lines that contain errors. Wait for a key after all lines have
12956 been processed. Don't return an empty menu.
12957
12958 * normal/parser.y (func_mem): Don't initialize.
12959 (menu_entry): Likewise.
12960 (err): New variable.
12961 (script): Don't return anything when an error was encountered.
12962 (ws, returns): Removed rules.
12963 (argument): Disabled concatenated variable support.
12964 (arguments): Remove explicit separators.
12965 (grubcmd): Likewise.
12966 (function): Likewise.
12967 (menuentry): Likewise.
12968 (if): Likewise.
12969 (commands): Likewise. Add error handling.
12970
12971 * normal/script.c (grub_script_create_cmdline): If
12972 `grub_script_parsed' is 0, assume the parser encountered an error.
12973
c9a86192 129742006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12975
12976 * configure.ac: Add support for EFI. Fix the typo
12977 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12978
70f3b243 129792006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12980
12981 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12982 foreign multibyte characters should be shown correctly.
12983
65f201ad 129842006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12985
12986 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12987 calculation.
12988 (read_config_file): Made it to close file before returning.
12989
b4b93674 129902006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12991
12992 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12993 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12994 video/i386/pc/vbefill.c.
12995
12996 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12997 video/i386/pc/vbefill.c.
12998
12999 * include/grub/video.h (grub_video_blit_format): New enum.
13000 (grub_video_mode_info): Added new member blit_format.
13001 (grub_video_get_blit_format): New function prototype.
13002
13003 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13004 function prototype.
13005 (grub_video_vbe_map_rgb): Likewise.
13006 (grub_video_vbe_unmap_color): Likewise.
13007
13008 * include/grub/i386/pc/vbeblit.h: New file.
13009
13010 * include/grub/i386/pc/vbefill.h: New file.
13011
13012 * video/video.c (grub_video_get_blit_format): New function.
13013 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13014 (grub_video_vbe_map_rgb): Likewise.
13015 (grub_video_vbe_unmap_color): Likewise.
13016
13017 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13018 optimized fills.
13019 (grub_video_vbe_blit_render_target): Changed to use more optimized
13020 blits.
13021 (grub_video_vbe_setup): Added detection for optimized settings.
13022 (grub_video_vbe_create_render_target): Likewise.
13023
13024 * video/i386/pc/vbeblit.c: New file.
13025
13026 * video/i386/pc/vbefill.c: New file.
13027
c2379b9c 130282006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13029
13030 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13031 here...
13032
13033 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13034 parsing to support both hex and dec ranges. If filename was missing
13035 show usage information.
13036
bd0d7896 130372006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13038
13039 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13040 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13041
13042 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13043 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13044 (video_mod_SOURCES): Added.
13045 (video_mod_CFLAGS): Likewise.
13046 (video_mod_LDFLAGS): Likewise.
13047 (gfxterm_mod_SOURCES): Likewise.
13048 (gfxterm_mod_CFLAGS): Likewise.
13049 (gfxterm_mod_LDFLAGS): Likewise.
13050 (videotest_mod_SOURCES): Likewise.
13051 (videotest_mod_CFLAGS): Likewise.
13052 (videotest_mod_LDFLAGS): Likewise.
13053 (vesafb_mod_SOURCES): Removed.
13054 (vesafb_mod_CFLAGS): Likewise.
13055 (vesafb_mod_LDFLAGS): Likewise.
13056 (vga_mod_SOURCES): Likewise.
13057 (vga_mod_CFLAGS): Likewise.
13058 (vga_mod_LDFLAGS): Likewise.
13059
13060 * commands/videotest.c: New file.
13061
13062 * font/manager.c (fill_with_default_glyph): Modified to use
13063 grub_font_glyph.
13064 (grub_font_get_glyph): Likewise.
13065 (fontmanager): Renamed from this...
13066 (font_manager): ... to this.
13067
13068 * include/grub/font.h (grub_font_glyph): Added new structure.
13069 (grub_font_get_glyph): Modified to use grub_font_glyph.
13070
13071 * include/grub/misc.h (grub_abs): Added as inline function.
13072
13073 * include/grub/video.h: New file.
13074
13075 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13076 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13077 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13078 (grub_vbe_get_controller_info): Renamed from this...
13079 (grub_vbe_bios_get_controller_info): ... to this.
13080 (grub_vbe_get_mode_info): Renamed from this...
13081 (grub_vbe_bios_get_mode_info): ... to this.
13082 (grub_vbe_set_mode): Renamed from this...
13083 (grub_vbe_bios_set_mode): ... to this.
13084 (grub_vbe_get_mode): Renamed from this...
13085 (grub_vbe_bios_get_mode): ... to this.
13086 (grub_vbe_set_memory_window): Renamed from this...
13087 (grub_vbe_bios_set_memory_window): ... to this.
13088 (grub_vbe_get_memory_window): Renamed from this...
13089 (grub_vbe_bios_get_memory_window): ... to this.
13090 (grub_vbe_set_scanline_length): Renamed from this...
13091 (grub_vbe_set_scanline_length): ... to this.
13092 (grub_vbe_get_scanline_length): Renamed from this...
13093 (grub_vbe_bios_get_scanline_length): ... to this.
13094 (grub_vbe_set_display_start): Renamed from this...
13095 (grub_vbe_bios_set_display_start): ... to this.
13096 (grub_vbe_get_display_start): Renamed from this...
13097 (grub_vbe_bios_get_display_start): ... to this.
13098 (grub_vbe_set_palette_data): Renamed from this...
13099 (grub_vbe_bios_set_palette_data): ... to this.
13100 (grub_vbe_set_pixel_rgb): Removed.
13101 (grub_vbe_set_pixel_index): Likewise.
13102
13103 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13104 from this...
13105 (grub_vbe_bios_get_controller_info): ... to this.
13106 (grub_vbe_get_mode_info): Renamed from this...
13107 (grub_vbe_bios_get_mode_info): ... to this.
13108 (grub_vbe_set_mode): Renamed from this...
13109 (grub_vbe_bios_set_mode): ... to this.
13110 (grub_vbe_get_mode): Renamed from this...
13111 (grub_vbe_bios_get_mode): ... to this.
13112 (grub_vbe_set_memory_window): Renamed from this...
13113 (grub_vbe_bios_set_memory_window): ... to this.
13114 (grub_vbe_get_memory_window): Renamed from this...
13115 (grub_vbe_bios_get_memory_window): ... to this.
13116 (grub_vbe_set_scanline_length): Renamed from this...
13117 (grub_vbe_set_scanline_length): ... to this.
13118 (grub_vbe_get_scanline_length): Renamed from this...
13119 (grub_vbe_bios_get_scanline_length): ... to this.
13120 (grub_vbe_set_display_start): Renamed from this...
13121 (grub_vbe_bios_set_display_start): ... to this.
13122 (grub_vbe_get_display_start): Renamed from this...
13123 (grub_vbe_bios_get_display_start): ... to this.
13124 (grub_vbe_set_palette_data): Renamed from this...
13125 (grub_vbe_bios_set_palette_data): ... to this.
13126 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13127 getting corrupted after calling it. Added more pushes and pops.
13128 (grub_vbe_bios_set_mode): Likewise.
13129 (grub_vbe_bios_get_mode): Likewise.
13130 (grub_vbe_bios_get_memory_window): Likewise.
13131 (grub_vbe_bios_set_scanline_length): Likewise.
13132 (grub_vbe_bios_get_scanline_length): Likewise.
13133 (grub_vbe_bios_get_display_start): Likewise.
13134 (grub_vbe_bios_set_palette_data): Likewise.
13135
13136 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13137 (cl_insert): Likewise.
13138 (cl_delete): Likewise.
13139
13140 * term/gfxterm.c: New file.
13141
13142 * term/i386/pc/vesafb.c: Removed file.
13143
13144 * video/video.c: New file.
13145
13146 * video/i386/pc/vbe.c (real2pm): Added new function.
13147 (grub_video_vbe_draw_pixel): Likewise.
13148 (grub_video_vbe_get_video_ptr): Likewise.
13149 (grub_video_vbe_get_pixel): Likewise
13150 (grub_video_vbe_init): Likewise.
13151 (grub_video_vbe_fini): Likewise.
13152 (grub_video_vbe_setup): Likewise.
13153 (grub_video_vbe_get_info): Likewise.
13154 (grub_video_vbe_set_palette): Likewise.
13155 (grub_video_vbe_get_palette): Likewise.
13156 (grub_video_vbe_set_viewport): Likewise.
13157 (grub_video_vbe_get_viewport): Likewise.
13158 (grub_video_vbe_map_color): Likewise.
13159 (grub_video_vbe_map_rgb): Likewise.
13160 (grub_video_vbe_map_rgba): Likewise.
13161 (grub_video_vbe_unmap_color): Likewise.
13162 (grub_video_vbe_fill_rect): Likewise.
13163 (grub_video_vbe_blit_glyph): Likewise.
13164 (grub_video_vbe_blit_bitmap): Likewise.
13165 (grub_video_vbe_blit_render_target): Likewise.
13166 (grub_video_vbe_scroll): Likewise.
13167 (grub_video_vbe_swap_buffers): Likewise.
13168 (grub_video_vbe_create_render_target): Likewise.
13169 (grub_video_vbe_delete_render_target): Likewise.
13170 (grub_video_vbe_set_active_render_target): Likewise.
13171 (grub_vbe_set_pixel_rgb): Remove function.
13172 (grub_vbe_set_pixel_index): Likewise.
13173 (index_color_mode): Remove static variable.
13174 (active_mode): Likewise.
13175 (framebuffer): Likewise.
13176 (bytes_per_scan_line): Likewise.
13177 (grub_video_vbe_adapter): Added new static variable.
13178 (framebuffer): Likewise.
13179 (render_target): Likewise.
13180 (initial_mode): Likewise.
13181 (mode_in_use): Likewise.
13182 (mode_list): Likewise.
13183
5f97350b 131842006-03-10 Marco Gerards <marco@gnu.org>
13185
13186 * configure.ac (AC_INIT): Bumped to 1.93.
13187
13188 * DISTLIST: Added `include/grub/hfs.h'.
13189
a3c5c6f8 131902006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13191
13192 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13193 18H, which might help the BIOS falling back to next boot media.
13194
6de53d26 131952006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13196
13197 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13198 Poe Chen <poe.poechen@gmail.com>.
13199
77c4a393 132002006-01-17 Marco Gerards <marco@gnu.org>
13201
13202 * include/grub/normal.h: Include <grub/script.h>.
13203 (grub_command_list): Removed struct.
13204 (grub_command_list_t): Removed type.
13205 (grub_menu_entry): Remove members `num' and `command_list'. Add
13206 members `commands' and `sourcecode'.
13207 * include/grub/script.h: Add inclusion guards.
13208 (grub_script_cmd_menuentry): New struct.
13209 (grub_script_execute_menuentry): New prototype.
13210 (grub_script_lexer_record_start): Likewise.
13211 (grub_script_lexer_record_stop): Likewise.
13212 * normal/execute.c (grub_script_execute_menuentry): New function.
13213 * normal/lexer.c (record, recording, recordpos, recordlen): New
13214 variables.
13215 (grub_script_lexer_record_start): New function.
13216 (grub_script_lexer_record_stop): Likewise.
13217 (recordchar): Likewise.
13218 (nextchar): Likewise.
13219 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13220 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13221 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13222 (current_menu): New variable.
13223 (free_menu): Mainly rewritten.
13224 (grub_normal_menu_addentry): New function.
13225 (read_config_file): Rewritten.
13226 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 13227 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 13228 the menu entry.
13229 (run): Mainly rewritten.
13230 * normal/parser.y (menu_entry): New variable.
13231 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13232 (menuentry): New rule.
13233 (command): Add `menuentry'.
13234 (if_statement): Allow additional returns before `fi'.
13235 * normal/script.c (grub_script_create_cmdmenu): New function.
13236
144f1f98 132372006-01-03 Marco Gerards <marco@gnu.org>
13238
13239 * INSTALL: GNU Bison is required.
13240 * configure.ac: Rewritten the test to detect Bison.
13241 * Makefile.in (YACC): New variable. Reported by Xun Sun
13242 <xun.sun.cn@gmail.com>.
13243
af4b2d89 132442006-01-03 Marco Gerards <marco@gnu.org>
13245
13246 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13247 the HFS+ filesystem to filesystem blocks.
13248 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13249 GCC warning is silenced.
13250
15643b71 132512006-01-03 Marco Gerards <marco@gnu.org>
13252
13253 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13254 read from disk from big endian to host byte order.
13255
00905879 132562006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13257
13258 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13259 documentation.
13260 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13261 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13262 embedded HFS+ filesystem.
13263 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13264 (grub_hfs_sblock): Move from here...
13265 * include/grub/hfs.h: To here... New file.
13266 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13267 documentation.
13268 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13269 New macros.
13270 (grub_hfsplus_volheader): Change type of member `magic' to
13271 `grub_uint16_t'.
13272 (grub_hfsplus_data): Add new member `embedded_offset'.
13273 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13274 returned block.
13275 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13276 Calculate the offset.
13277
8899bc3e 132782005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13279
13280 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13281 Removed.
13282 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13283
ae8c0277 132842005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13285
13286 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13287 ENV->NAME is NULL after allocating ENV->VALUE.
13288
07084456 132892005-12-25 Marco Gerards <marco@gnu.org>
13290
13291 * kern/env.c (grub_env_set): Rewritten the error handling code.
13292
4750f5f1 132932005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13294
13295 * geninit.sh: Made more robust, and more portable.
13296
50214199 132972005-12-25 Marco Gerards <marco@gnu.org>
13298
13299 Add support for Apple HFS+ filesystems.
f19dbdb7 13300
50214199 13301 * fs/hfsplus.c: New file.
13302
13303 * DISTLIST: Added `fs/hfsplus.c'.
13304
13305 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13306 (hfsplus_mod_SOURCES): New variable.
13307 (hfsplus_mod_CFLAGS): Likewise.
13308 (hfsplus_mod_LDFLAGS): Likewise.
13309 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13310 (grub_setup_SOURCES): Likewise.
13311 (grub_mkdevicemap_SOURCES): Likewise.
13312 (grub_emu_SOURCES): Likewise.
13313 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13314
13315 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13316
13317 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13318
befaed6c 133192005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13320
13321 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13322 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13323 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13324 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13325 normal/lexer.c, normal/parser.y, normal/script.c, and
13326 partmap/gpt.c.
13327 Removed kern/sparc64/cache.c.
13328
13329 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13330 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13331 grub_emu_init.c.
13332
13333 * configure.ac (AC_INIT): Bumped to 1.92.
13334
6a124103 133352005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13336
13337 * kern/err.c (grub_error_push): Added new function to support error
13338 stacks.
13339 (grub_error_pop): Likewise.
13340 (grub_error_stack_items): New local variable to support error stacks.
13341 (grub_error_stack_pos): Likewise.
13342 (grub_error_stack_assert): Likewise.
13343 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13344 stack depth.
13345 (grub_print_error): Added support to print errors from error stack.
13346
13347 * include/grub/err.h (grub_error_push): Added function prototype.
13348 (grub_error_pop): Likewise.
13349
be973c1b 133502005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13351
13352 * configure.ac: Accept `powerpc64' as host_cpu.
13353 (amd64): Rename to `biarch32'.
13354
13355 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13356 non-cacheline-aligned addresses.
13357
13358 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13359 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13360 if `size' is non-zero.
13361
b04216ab 133622005-12-03 Marco Gerards <mgerards@xs4all.nl>
13363
13364 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13365 and `cd' to make sure the filename is not prefixed with a
13366 directory name.
13367 (pkgdata_MODULES): Add `gpt.mod'.
13368 (gpt_mod_SOURCES): New variable.
13369 (gpt_mod_CFLAGS): Likewise.
13370 (gpt_mod_LDFLAGS): Likewise.
13371
13372 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13373
13374 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13375 New macro.
13376
13377 * partmap/gpt.c: New file.
13378
13379 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13380 GPT partition map is detected.
13381
41730ed9 133822005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13383
13384 * commands/i386/pc/play.c: New file.
13385 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13386 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13387 macros.
f19dbdb7 13388
95dc3643 133892005-11-27 Marco Gerards <mgerards@xs4all.nl>
13390
13391 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13392 ((unused))' to silence gcc warning.
13393
1569ec51 133942005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13395
13396 * configure.ac: Correct `AC_PROG_YACC' test.
13397
9abde152 133982005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13399
13400 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13401 check before installing files.
13402
44b83271 134032005-11-22 Mike Small <smallm@panix.com>
13404
13405 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13406 number regex so multidigit numbers are recognized correctly.
13407
134082005-11-22 Mike Small <smallm@panix.com>
13409
13410 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13411 debugging message before attempting to claim memory.
13412 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13413 multiple addresses in case of failure.
13414
9c12956b 134152005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13416
13417 * term/tparm.c (get_space): Remove empty `if' statement.
13418
13419 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13420
13421 * kern/parser.c (check_varstate): Rename `state' to 's'.
13422
aeaf81d9 134232005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13424
13425 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13426 variable definitions to the beginning of each function. Sort stack
13427 variables by size.
13428 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13429 `buf' argument to `char *'.
13430
79bbb63f 134312005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13432
13433 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13434 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13435 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 13436 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13437 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13438 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13439 configfile.mod, search.mod, gzio.mod and test.mod.
13440 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13441 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13442 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13443 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13444 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13445 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13446 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13447 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13448 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13449 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13450 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13451 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13452 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13453 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13454 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13455 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13456 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13457 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13458 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13459 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13460 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13461 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13462 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13463
13464 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13465 `grep --include'.
13466 (pkgdata_MODULES): Add test.mod.
13467
233b1628 134682005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13469
13470 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13471 appending to variables with "+=".
13472 (PModule): Use full pathname to generate *.lst filenames.
13473
13474 * Makefile.in: Fixed list rules moved from genmk.rb.
13475 (.DELETE_ON_ERROR): New special target.
13476 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13477
13478 * conf/i386-pc.rmk: Include conf/common.mk.
13479 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 13480 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 13481 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13482 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13483 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13484 configfile.mod, search.mod, gzio.mod and test.mod.
13485 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13486 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13487 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13488 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13489 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13490 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13491 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13492 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13493 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13494 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13495 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13496 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13497 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13498 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13499 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13500 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13501 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13502 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13503 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13504 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13505 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13506 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13507 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13508 here...
13509 * conf/common.rmk: ... to here. New file.
13510
13511 * conf/common.mk: New file.
13512
16f820c8 135132005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13514
13515 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13516 (grub_script.tab.c): ... here.
13517
13518 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13519 (grub_script.tab.c): ... here.
13520
13521 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13522 (grub_script.tab.c): ... here.
13523
13524 * normal/command.c (grub_command_find): Fixed a memory leak of
13525 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13526
63ba1554 135272005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13528
13529 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13530 "@" which marks the start of a comment on ARM.
13531 (VARIABLE): Likewise.
13532
7f67dc13 135332005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13534
79bbb63f 13535 Add support for Linux/ADFS partition tables.
7f67dc13 13536
13537 * partmap/acorn.c: New file.
13538
13539 * include/grub/acorn_filecore.h: Likewise.
13540
13541 * DISTLIST: Added `partmap/acorn.c' and
13542 `include/grub/acorn_filecore.h'.
f19dbdb7 13543
7f67dc13 13544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13545 `partmap/acorn.c'.
13546 (pkgdata_MODULES): Add `acorn.mod'.
13547 (acorn_mod_SOURCES): New variable.
13548 (acorn_mod_CFLAGS): Likewise.
13549
13550 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13551 `partmap/acorn.c'.
13552 (pkgdata_MODULES): Add `acorn.mod'.
13553 (acorn_mod_SOURCES): New variable.
13554 (acorn_mod_CFLAGS): Likewise.
13555
13556 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13557 (pkgdata_MODULES): Add `acorn.mod'.
13558 (acorn_mod_SOURCES): New variable.
13559 (acorn_mod_CFLAGS): Likewise.
13560 (acorn_mod_LDFLAGS): Likewise.
13561
13562 * include/types.h (grub_disk_addr_t): New typedef.
13563
6d099807 135642005-11-13 Marco Gerards <mgerards@xs4all.nl>
13565
13566 * geninit.sh: New file.
13567
13568 * geninitheader.sh: Likewise.
13569
13570 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13571 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13572 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13573 * commands/configfile.c (grub_configfile_init)
13574 (grub_configfile_fini): Likewise.
13575 * commands/default.c (grub_default_init, grub_default_fini):
13576 Likewise.
13577 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13578 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13579 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13580 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13581 Likewise.
13582 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13583 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13584 Likewise.
13585 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 13586 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 13587 Likewise.
13588 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13589 Likewise.
fe6b695a 13590 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 13591 Likewise.
13592 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13593 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13594 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13595 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13596 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13597 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13598 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13599 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13600 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13601 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13602 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13603 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13604 * partmap/amiga.c (grub_amiga_partition_map_init)
13605 (grub_amiga_partition_map_fini): Likewise.
13606 * partmap/apple.c (grub_apple_partition_map_init)
13607 (grub_apple_partition_map_fini): Likewise.
13608 * partmap/pc.c (grub_pc_partition_map_init)
13609 (grub_pc_partition_map_fini): Likewise.
13610 * partmap/sun.c (grub_sun_partition_map_init,
13611 grub_sun_partition_map_fini): Likewise.
13612 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13613 Likewise.
13614
13615 * util/grub-emu.c: Include <grub_modules_init.h>.
13616 (main): Don't initialize and de-initialize any modules directly,
13617 use `grub_init_all' and `grub_fini_all' instead.
13618
13619 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13620 `grub_vesafb_mod_init'.
13621 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13622 all users.
13623 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13624 `grub_vga_mod_init'. Updated all users.
13625 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 13626
6d099807 13627 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13628 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13629 rules.
13630
13631 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13632 Generate a function to initialize the module in utilities.
13633 Updated all callers.
13634 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13635 initialize the module in utilities. Updated all callers.
13636
9046bcf0 136372005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13638
13639 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13640 escape sequence and a literal ^L to clear the screen.
13641
13642 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13643 when returning from Open Firmware.
13644
d13ea639 136452005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13646
13647 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13648 (grub_ofconsole_height): Likewise.
13649 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13650 manually insert a '\n'.
13651 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13652 `grub_ofconsole_height'. Return early if these are already set.
13653
a8fcf206 136542005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13655
13656 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13657 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13658 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13659 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13660 and `normal/script.c'.
13661 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13662 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13663 (test_mod_SOURCES): New variable.
13664 (test_mod_CFLAGS): Likewise.
13665 (test_mod_LDFLAGS): Likewise.
13666 (pkgdata_MODULES): Add `test.mod'.
13667 (grub_script.tab.c): New rule.
13668 (grub_script.tab.h): Likewise.
13669
b6b32745 136702005-11-07 Marco Gerards <mgerards@xs4all.nl>
13671
13672 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13673 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13674 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13675 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13676 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13677 (test_mod_SOURCES): New variable.
13678 (test_mod_CFLAGS): Likewise.
13679 (pkgdata_MODULES): Add `test.mod'.
13680 (grub_script.tab.c): New rule.
13681 (grub_script.tab.h): Likewise.
13682
daac212a 136832005-11-06 Marco Gerards <mgerards@xs4all.nl>
13684
13685 Add initial scripting support.
13686
13687 * commands/test.c: New file.
13688 * include/grub/script.h: Likewise.
13689 * normal/execute.c: Likewise.
13690 * normal/function.c: Likewise.
13691 * normal/lexer.c: Likewise.
13692 * normal/parser.y: Likewise.
13693 * normal/script.c: Likewise.
13694
13695 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 13696
daac212a 13697 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13698 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13699 `normal/function.c' and `normal/script.c'.
13700 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13701 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 13702 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13703 variables.
daac212a 13704 (pkgdata_MODULES): Add `test.mod'.
13705 (grub_script.tab.c): New rule.
13706 (grub_script.tab.h): Likewise.
13707
13708 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13709
13710 * include/grub/normal.h (grub_test_init): New prototype.
13711 (grub_test_fini): Likewise.
f19dbdb7 13712
daac212a 13713 * normal/command.c: Include <grub/script.h>.
13714 (grub_command_execute): Rewritten.
f19dbdb7 13715
daac212a 13716 * util/grub-emu.c (main): Call `grub_test_init' and
13717 `grub_test_fini'.
13718
77500b2b 137192005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13720
13721 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13722 to 0.
13723 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13724 there are no pending characters.
13725
e45deb9e 137262005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13727
13728 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13729 `grub_strndup' to drop device arguments. Replace unnecessary
13730 `grub_strndup' with `grub_strdup'.
13731
4ce32619 137322005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13733
13734 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13735 `debug' environment variable has been set.
13736
137372005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13738
4ce32619 13739 * Makefile.in (install-local): Use $(DATA).
13740 (uninstall): Likewise.
13741 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13742 (sbin_UTILITIES): ... to here.
13743 (sbin_SCRIPTS): New variable.
13744 (grub_install_SOURCES): New variable.
13745 * util/powerpc/ieee1275/grub-install.in: New file.
13746 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13747 variable.
13748 (add_segments): Call `grub_util_get_path'.
13749
25fe6f03 137502005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13751
13752 From Timothy Baldwin:
13753 * commands/ls.c (grub_ls_list_files): Close FILE with
13754 grub_file_close.
13755 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13756
04ccf3ec 137572005-10-24 Marco Gerards <mgerards@xs4all.nl>
13758
13759 * include/grub/parser.h: New file.
13760
13761 * kern/parser.c: Likewise.
13762
13763 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13764 (grub_setup_SOURCES): Likewise.
13765 (grub_probefs_SOURCES): Likewise.
13766 (grub_emu_SOURCES): Likewise.
13767 (kernel_img_HEADERS): Add `parser.h'.
13768
13769 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13770 (grub_emu_SOURCES): Add `kern/parser.c'.
13771 (grubof_SOURCES): Likewise.
13772
13773 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13774 (grubof_SOURCES): Add `kern/parser.c'.
13775
13776 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13777
13778 * kern/misc.c (grub_split_cmdline): Removed function.
13779
13780 * kern/rescue.c: Include <grub/parser.h>.
13781 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13782 of `grub_split_cmdline'.
13783
13784 * normal/command.c: Include <grub/parser.h>.
13785 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13786 of `grub_split_cmdline'.
13787
13788 * normal/completion.c: Include <grub/parser.h>.
13789 (cmdline_state): New variable.
13790 (iterate_dir): End the filename with a quote depending on the
13791 command line state.
13792 (get_state): new function.
13793 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13794 split the arguments and determine the current argument. When the
13795 argument string is not quoted, escape all spaces.
13796
6d8f4b0e 137972005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13798
13799 * normal/sparc64/setjmp.S: New file.
13800
15cf03ed 138012005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13802
13803 * include/grub/sparc64/libgcc.h: New file.
13804 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13805 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13806 normal/sparc64/setjmp.c.
13807
03e8661a 138082005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13809
13810 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13811 * kern/sparc64/cache.S: New file.
13812 * kern/sparc64/cache.c: Removed.
13813 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13814 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13815 -mtune=ultrasparc.
13816 (COMMON_LDFLAGS): Add -melf64_sparc.
13817 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13818 (grubof_SOURCES): Use cache.S instead of cache.c.
13819 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13820 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13821 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13822 commented though.
13823 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13824 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13825 (linux_mod_CFLAGS): Commented out.
13826 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13827 out because module isn't built.
13828 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13829 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13830 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13831 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13832 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13833 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13834 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13835 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13836 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13837 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13838 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13839 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13840 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13841 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13842
34eeec8a 138432005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13844
13845 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13846 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13847 longer, because HFS should not be used on PC.
13848
708367a3 138492005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13850
13851 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13852 consistently within the loop.
13853
6fa1251a 138542005-10-15 Marco Gerards <mgerards@xs4all.nl>
13855
13856 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13857 directory can not be read.
13858
4801580b 138592005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13860
13861 * configure.ac (AC_INIT): Increase the version number to 1.91.
13862
13863 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13864 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13865 term/i386/pc/serial.c.
13866
219ad426 138672005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13868
13869 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13870 file size must be permitted.
13871
13872 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13873 between %ah and %al.
13874
688e5699 138752005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13876
13877 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13878 grub_uint64_t.
13879 Call the hook with a NUL-terminated filename.
13880 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13881 grub_cpu_to_be32.
13882
13883 * kern/term.c (cursor_state): New variable.
13884 (grub_term_set_current): Reset the cursor state on a new
13885 terminal.
13886 (grub_setcursor): Rewritten to use CURSOR_STATE.
13887 (grub_getcursor): New function.
13888
13889 * include/grub/term.h (grub_getcursor): New prototype.
13890
13891 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13892 integers on ARM. Reported by Timothy Baldwin
13893 <T.E.Baldwin99@members.leeds.ac.uk>.
13894
bb34586c 138952005-10-11 Marco Gerards <mgerards@xs4all.nl>
13896
13897 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13898 allocated.
13899 (grub_sfs_dir): Likewise.
13900
9a909877 139012005-10-09 Marco Gerards <mgerards@xs4all.nl>
13902
13903 Add support for the SFS filesystem.
13904
13905 * fs/sfs.c: New file.
13906
13907 * DISTLIST: Added `fs/sfs.c'.
13908
13909 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13910 (grub_probefs_SOURCES): Likewise.
13911 (grub_emu_SOURCES): Likewise.
13912 (pkgdata_MODULES): Add `sfs.mod'.
13913 (sfs_mod_SOURCES): New variable.
13914 (sfs_mod_CFLAGS): Likewise.
13915 (sfs_mod_LDFLAGS): Likewise.
13916
13917 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13918 (pkgdata_MODULES): Add `sfs.mod'.
13919 (sfs_mod_SOURCES): New variable.
13920 (sfs_mod_CFLAGS): Likewise.
13921
13922 * util/grub-emu.c (main): Call `grub_sfs_init' and
13923 `grub_sfs_fini'.
13924
13925 * include/grub/fs.h (grub_sfs_init): New prototype.
13926 (grub_sfs_fini): Likewise.
13927
57bdbde3 139282005-10-07 Marco Gerards <mgerards@xs4all.nl>
13929
13930 Add support for the AFFS filesystem.
13931
13932 * fs/affs.c: New file.
13933
13934 * DISTLIST: Added `fs/affs.c'.
13935
13936 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13937 (grub_probefs_SOURCES): Likewise.
13938 (grub_emu_SOURCES): Likewise.
13939 (pkgdata_MODULES): Add `affs.mod'.
13940 (affs_mod_SOURCES): New variable.
13941 (affs_mod_CFLAGS): Likewise.
13942 (affs_mod_LDFLAGS): Likewise.
13943
13944 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13945 (pkgdata_MODULES): Add `affs.mod'.
13946 (affs_mod_SOURCES): New variable.
13947 (affs_mod_CFLAGS): Likewise.
13948
13949 * util/grub-emu.c (main): Call `grub_affs_init' and
13950 `grub_affs_fini'.
13951
13952 * include/grub/fs.h (grub_affs_init): New prototype.
13953 (grub_affs_fini): Likewise.
13954
047b67e0 139552005-10-01 Marco Gerards <mgerards@xs4all.nl>
13956
13957 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13958
59b8208a 139592005-10-01 Marco Gerards <mgerards@xs4all.nl>
13960
13961 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13962 `-m32' to CFLAGS.
13963
13964 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13965 linking.
f19dbdb7 13966
59b8208a 13967 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13968 (COMMON_LDFLAGS): New variable.
13969 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13970 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13971 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13972 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13973 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13974 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13975 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13976 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13977 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13978 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13979 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13980 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13981 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13982 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13983 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13984 variables.
13985 (normal_mod_ASFLAGS): Add `-m32'.
13986
13987 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13988 (grub_host_size_t, grub_host_ssize_t): New types.
13989 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13990 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13991 `GRUB_HOST_SIZEOF_VOID_P'.
13992
13993 * include/grub/kernel.h (struct grub_module_header): Type of
13994 member offset changed to `grub_host_off_t'. Type of member size
13995 changed to `grub_host_size_t'.
13996 (struct grub_module_info): Type of member offset changed to
13997 `grub_host_off_t'. Type of member size changed to
13998 `grub_host_size_t'.
13999
b4093103 140002005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14001
14002 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 14003
b4093103 14004 * kern/i386/pc/startup.S (multiboot_header): New label.
14005 (multiboot_entry): Likewise.
14006 (multiboot_trampoline): Likewise.
14007
14008 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14009 Increased to 0x4A0.
14010
14011 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14012 put parentheses after a question mark.
14013 [!GRUB_UTIL] (my_mod): New variable.
14014
14015 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14016
b2499b29 140172005-09-28 Marco Gerards <mgerards@xs4all.nl>
14018
14019 Adds support for the XFS filesystem. Btrees are not supported
14020 yet.
14021
14022 * fs/xfs.c: New file.
14023
14024 * DISTLIST: Added `fs/xfs.c'.
14025
14026 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14027 (grub_probefs_SOURCES): Likewise.
14028 (grub_emu_SOURCES): Likewise.
14029 (pkgdata_MODULES): Add `xfs.mod'.
14030 (xfs_mod_SOURCES): New variable.
14031 (xfs_mod_CFLAGS): Likewise.
14032
14033 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14034 (pkgdata_MODULES): Add `xfs.mod'.
14035 (xfs_mod_SOURCES): New variable.
14036 (xfs_mod_CFLAGS): Likewise.
14037
14038 * util/grub-emu.c (main): Call `grub_xfs_init' and
14039 `grub_xfs_fini'.
14040
14041 * include/grub/fs.h (grub_xfs_init): New prototype.
14042 (grub_xfs_fini): Likewise.
14043
f19dbdb7 14044
83d37a62 140452005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14046
14047 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14048 color modes, allow greater than 16 colors to be configured as
14049 a default palette.
14050
47d2d65e 140512005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14052
14053 * normal/completion.c (complete_arguments): Add the qualifier
14054 const into OPTIONS.
14055
14056 From Omniflux <omniflux+lists@omniflux.com>:
14057 * include/grub/terminfo.h: New file.
14058 * include/grub/tparm.h: Likewise.
14059 * include/grub/i386/pc/serial.h: Likewise.
14060 * term/terminfo.c: Likewise.
14061 * term/tparm.c: Likewise.
14062 * term/i386/pc/serial.c: Likewise.
14063 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14064 serial.mod.
14065 (terminfo_mod_SOURCES): New variable.
14066 (terminfo_mod_CFLAGS): Likewise.
14067 (serial_mod_SOURCES): Likewise.
14068 (serial_mod_CFLAGS): Likewise.
14069
48b671ff 140702005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14071
14072 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14073 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14074 and kern/powerpc/ieee1275/cmain.c, respectively.
14075
14076 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14077 * kern/powerpc/ieee1275/crt0.S: ... here.
14078
14079 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14080 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 14081
48b671ff 14082 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14083 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14084 instead of boot/powerpc/ieee1275/crt0.S and
14085 boot/powerpc/ieee1275/cmain.c, respectively.
14086
14087 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14088 sectors. It was not used anyway.
14089
09fc77a7 140902005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14091
14092 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14093 `unused parameter' warning.
14094
003789c7 140952005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14096
14097 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14098 function.
14099 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14100 getcharwidth.
14101
67f44c86 141022005-08-28 Marco Gerards <metgerards@student.han.nl>
14103
14104 * include/grub/normal.h (enum grub_completion_type): Added
14105 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14106
14107 * normal/cmdline.c (print_completion): Handle
14108 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14109 * normal/menu_entry.c (store_completion): Likewise.
14110
14111 * normal/completion.c (complete_arguments): New function.
14112 (grub_normal_do_completion): Call `complete_arguments' when the
14113 current words start with a dash.
14114
0b5abe02 141152005-08-27 Marco Gerards <metgerards@student.han.nl>
14116
14117 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14118 `gzio.mod' instead of `io.mod').
14119
d9864ee1 141202005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14121
14122 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14123 (DISTDIRS): Added io and video.
14124 Rewrite the search routine to make an output consistently.
14125
14126 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14127 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14128 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14129 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14130 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14131 util/powerpc/ieee1275/misc.c.
f19dbdb7 14132
d9864ee1 14133 * include/grub/gzio.h: New file.
14134 * io/gzio.c: Likewise.
f19dbdb7 14135
d9864ee1 14136 * kern/file.c (grub_file_close): Call grub_device_close only if
14137 FILE->DEVICE is not NULL.
14138
14139 * include/grub/mm.h [!NULL] (NULL): New macro.
14140
14141 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14142
14143 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14144 (pkgdata_MODULES): Added gzio.mod.
14145 (gzio_mod_SOURCES): New variable.
14146 (gzio_mod_CFLAGS): Likewise.
14147
14148 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14149 (pkgdata_MODULES): Added gzio.mod.
14150 (gzio_mod_SOURCES): New variable.
14151 (gzio_mod_CFLAGS): Likewise.
14152
14153 * commands/cat.c: Include grub/gzio.h.
14154 (grub_cmd_cat): Use grub_gzfile_open instead of
14155 grub_file_open.
f19dbdb7 14156
d9864ee1 14157 * commands/cmp.c: Include grub/gzio.h.
14158 (grub_cmd_cmp): Use grub_gzfile_open instead of
14159 grub_file_open.
14160
14161 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14162 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14163 grub_file_open.
14164 (grub_rescue_cmd_module): Likewise.
14165
fa46f4b5 141662005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14167
14168 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14169 kern/sparc64/ieee1275/init.c because it contains _start.
14170 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14171
e9211b5d 141722005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14173
14174 * configure.ac: Add support for sparc64 host with ieee1275
14175 firmware.
14176 * configure: Generated from configure.ac.
14177 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14178 instead of int.
14179 (grub_ofdisk_read): Likewise.
14180 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14181 pointers as (void *) to remove a warning.
14182 (grub_ofdisk_close): Likewise.
14183 (grub_ofdisk_read): Likewise.
14184 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14185 returns, so make it return void to remove a warning.
14186 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14187 Corresponding prototype change.
14188 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14189 values, and cast the pointers as (void *) to remove a warning.
14190 (grub_mm_dump): Likewise.
14191 * conf/sparc64-ieee1275.mk: New file.
14192 * conf/sparc64-ieee1275.rmk: Likewise.
14193 * include/grub/sparc64/setjmp.h: Likewise.
14194 * include/grub/sparc64/types.h: Likewise.
14195 * include/grub/sparc64/ieee1275/console.h: Likewise.
14196 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14197 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14198 * include/grub/sparc64/ieee1275/time.h: Likewise.
14199 * kern/sparc64/cache.c: Likewise.
14200 * kern/sparc64/dl.c: Likewise.
14201 * kern/sparc64/ieee1275/init.c: Likewise.
14202 * kern/sparc64/ieee1275/openfw.c: Likewise.
14203
385c6a92 142042005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14205
14206 * util/console.c (grub_ncurses_putchar): If C is greater than
14207 0x7f, set C to a question mark.
14208 (grub_ncurses_getcharwidth): New function.
14209 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14210 getcharwidth.
14211
14212 * normal/menu.c (print_entry): Made aware of Unicode. First,
14213 convert TITLE to UCS-4, and predict the cursor position by
14214 grub_getcharwidth.
14215
14216 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14217 const to SRC.
14218 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14219
16ccb8b1 142202005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14221
14222 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14223 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14224 grub_strcat.
14225
14226 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14227 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14228 grub_strcpy and grub_strlen. Take it into account that a space
14229 character is inserted as a delimiter.
14230
6a85ce79 142312005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14232
14233 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 14234 invalid magic in the error.
6a85ce79 14235
14236 * commands/search.c: New file.
f19dbdb7 14237
6a85ce79 14238 * util/grub-emu.c (main): Call grub_search_init and
14239 grub_search_fini.
14240
14241 * kern/rescue.c (grub_rescue_print_disks): Removed.
14242 (grub_rescue_print_devices): New function.
14243 (grub_rescue_cmd_ls): Use grub_device_iterate with
14244 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14245 grub_rescue_print_disks.
14246
14247 * kern/partition.c (grub_partition_iterate): Return the result of
14248 PARTMAP->ITERATE instead of GRUB_ERRNO.
14249
14250 * kern/device.c: Include grub/partition.h.
14251 (grub_device_iterate): New function.
14252
14253 * include/grub/partition.h (grub_partition_iterate): Return int
14254 instead of grub_err_t.
14255
14256 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14257 prototype.
14258 [GRUB_UTIL] (grub_search_fini): Likewise.
14259
14260 * include/grub/device.h (grub_device_iterate): New prototype.
14261
14262 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14263 commands/search.c.
14264 (pkgdata_MODULES): Added search.mod.
14265 (search_mod_SOURCES): New variable.
14266 (search_mod_CFLAGS): Likewise.
14267
14268 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14269 (pkgdata_MODULES): Added search.mod.
14270 (search_mod_SOURCES): New variable.
14271 (search_mod_CFLAGS): Likewise.
14272
14273 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14274 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14275 All callers changed.
14276
14277 * DISTLIST: Added commands/search.c.
14278
ef095434 142792005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14280
14281 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14282 conversion.
14283 (grub_getcharwidth): New function.
14284
14285 * kern/misc.c (grub_utf8_to_ucs4): New function.
14286
14287 * include/grub/term.h (struct grub_term): Added a new member
14288 "getcharwidth".
14289 (grub_getcharwidth): New prototype.
14290
14291 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14292
14293 * term/i386/pc/console.c (map_char): New function. Segregated from
14294 grub_console_putchar.
14295 (grub_console_putchar): Use map_char.
14296 (grub_console_getcharwidth): New function.
14297 (grub_console_term): Specified grub_console_getcharwidth as
14298 getcharwidth.
14299
14300 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14301 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14302
14303 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14304 GRUB_ERRNO.
14305 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14306 on grub_strtoul completely.
14307 (write_char): Declare local variables in the beginning of the
14308 function.
14309 (grub_vesafb_getcharwidth): New function.
14310 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14311 getcharwidth.
14312
1f0a95e4 143132005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14314
14315 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14316 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14317 commands/i386/pc/vbetest.c.
14318
14319 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14320 call grub_vbe_get_controller_info again, because the returned
14321 information is volatile.
14322 (grub_vbe_set_video_mode): Mostly rewritten.
14323 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14324 grub_vbe_status_t correctly.
14325 (grub_vbe_get_video_mode_info): Likewise.
14326 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14327 several if statements.
14328
14329 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14330 * commands/i386/pc/vbeinfo.c: ... this.
14331
14332 * commands/i386/pc/vbe_test.c: Renamed to ...
14333 * commands/i386/pc/vbetest.c: ... this.
14334
14335 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14336 ...
14337 (grub_cmd_vbeinfo): ... this. Save video modes before
14338 iterating. Skip a video mode, if it is not available, not enough
14339 information is given or it is monochrome. Show the memory
14340 model. Leave the interpretation of MODEVAR to grub_strtoul
14341 completely.
14342 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14343 (GRUB_MOD_FINI): Likewise.
14344
14345 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14346 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14347 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14348 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14349 grub_strtoul completely.
14350 (real2pm): Removed.
14351 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14352 (GRUB_MOD_FINI): Likewise.
14353
14354 * normal/misc.c: Include grub/mm.h.
14355
14356 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14357 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14358 (vbe_list_modes_mod_SOURCES): Removed.
14359 (vbe_list_modes_mod_CFLAGS): Likewise.
14360 (vbe_test_mod_SOURCES): Likewise.
14361 (vbe_test_mod_CFLAGS): Likewise.
14362 (vbeinfo_mod_SOURCES): New variable.
14363 (vbeinfo_mod_CFLAGS): Likewise.
14364 (vbetest_mod_SOURCES): Likewise.
14365 (vbetest_mod_CFLAGS): Likewise.
14366
992ffbbe 143672005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14368
14369 * normal/misc.c: New file.
14370
14371 * DISTLIST: Added normal/misc.c.
f19dbdb7 14372
992ffbbe 14373 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14374 DISK to HOOK. Call HOOK with DISK.
14375 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14376 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14377 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14378
14379 * normal/menu_entry.c (struct screen): Added a new member
14380 "completion_shown".
14381 (completion_buffer): New global variable.
14382 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14383 (store_completion): New function.
14384 (complete): Likewise.
14385 (clear_completions): Likewise.
14386 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14387 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14388 a tab, call complete.
14389
14390 * normal/completion.c (disk_dev): Removed.
14391 (print_simple_completion): Likewise.
14392 (print_partition_completion): Likewise.
14393 (print_func): New global variable.
14394 (add_completion): Do not take the arguments WHAT or PRINT any
14395 longer. Added a new argument TYPE. Instead of printing directly,
14396 call PRINT_FUNC if not NULL.
14397 All callers changed.
14398 (complete_device): Use a local variable DEV instead of
14399 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14400 (grub_normal_do_completion): Take a new argument HOOK. Do not
14401 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14402 empty string, return NULL instead.
14403 All callers changed.
14404
14405 * normal/cmdline.c (print_completion): New function.
14406
14407 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14408 to HOOK.
14409 All callers changed.
14410
14411 * kern/disk.c (grub_print_partinfo): Removed.
14412
14413 * include/grub/partition.h (struct grub_partition_map): Add a new
14414 argument DISK into HOOK of ITERATE.
14415 (grub_partition_iterate): Add a new argument DISK to HOOK.
14416
14417 * include/grub/normal.h (enum grub_completion_type): New enum.
14418 (grub_completion_type_t): New type.
14419 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14420 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14421 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14422 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14423 (grub_normal_do_completion): Added a new argument HOOK.
14424 (grub_normal_print_device_info): New prototype.
14425
14426 * include/grub/disk.h (grub_print_partinfo): Removed.
14427
14428 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14429 (normal_mod_SOURCES): Likewise.
14430 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14431 (normal_mod_SOURCES): Likewise.
14432
14433 * commands/ls.c (grub_ls_list_disks): Use
14434 grub_normal_print_device_info instead of grub_print_partinfo. Free
14435 PNAME.
14436 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14437 duplicating the code.
14438
0bd41162 144392005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14440
14441 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 14442 follow GCS more precisely.
14443 * commands/i386/pc/vbe_test.c: Likewise.
14444 * include/grub/i386/pc/vbe.h: Likewise.
14445 * term/i386/pc/vesafb.c: Likewise.
14446 * video/i386/pc/vbe.c: Likewise.
0bd41162 14447
6323696a 144482005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14449
14450 * DISTLIST: Added term/i386/pc/vesafb.c
14451 DISTLIST: Added video/i386/pc/vbe.c
14452 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14453 DISTLIST: Added commands/i386/pc/vbe_test.c.
14454 * commands/i386/pc/vbe_list_modes.c: New file.
14455 * commands/i386/pc/vbe_test.c: Likewise.
14456 * term/i386/pc/vesafb.c: Likewise.
14457 * video/i386/pc/vbe.c: Likewise.
14458 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14459 (grub_vbe_probe) Added prototype.
14460 (grub_vbe_set_video_mode) Likewise.
14461 (grub_vbe_get_video_mode) Likewise.
14462 (grub_vbe_get_video_mode_info) Likewise.
14463 (grub_vbe_set_pixel_rgb) Likewise.
14464 (grub_vbe_set_pixel_index) Likewise.
14465 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14466 (pkgdata_MODULES): Added vesafb.mod.
14467 (pkgdata_MODULES): Added vbe_list_modes.mod.
14468 (pkgdata_MODULES): Added vbe_test.mod.
14469 (vbe_mod_SOURCES): Added.
14470 (vbe_mod_CFLAGS): Likewise.
14471 (vesafb_mod_SOURCES): Likewise.
14472 (vesafb_mod_CFLAGS): Likewise.
14473 (vbe_list_modes_mod_SOURCES): Likewise.
14474 (vbe_list_modes_mod_CFLAGS): Likewise.
14475 (vbe_test_mod_SOURCES): Likewise.
14476 (vbe_test_mod_CFLAGS): Likewise.
14477
0a74e62f 144782005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14479
0a74e62f 14480 * normal/command.c (grub_command_execute): If INTERACTIVE is
14481 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14482 CMDLINE. Disable the pager if INTERACTIVE is true.
14483 All callers are changed.
14484
14485 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14486 before reading a config file.
14487 * normal/main.c (read_config_file): Even if a command is not
14488 found, register it if it is within an entry.
14489
14490 * util/grub-emu.c: Include sys/types.h and unistd.h.
14491 (options): Added --hold.
14492 (struct arguments): Added a new member "hold".
14493 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14494 missing.
14495 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14496 cleared by a debugger, if it is not zero.
14497
14498 * include/grub/normal.h (grub_command_execute): Add an argument
14499 INTERACTIVE.
14500
e51f85ae 145012005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14502
14503 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14504
e9c6f39b 145052005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14506
14507 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14508 program with another one, because the old one didn't detect a bug
14509 in gcc-3.4. Always use regparm 2, because the new test is still
14510 not enough for gcc-4.0. Someone must investigate a simple test
14511 case which detects a bug in gcc-4.0.
14512
8de3495c 145132005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14514
14515 * DISTLIST: Added normal/completion.c.
14516
14517 * normal/completion.c: New file.
f19dbdb7 14518
8de3495c 14519 * term/i386/pc/console.c (grub_console_getwh): New function.
14520 (grub_console_term): Assign grub_console_getwh to getwh.
14521
14522 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14523 function is defined in normal/completion.c as
14524 grub_normal_do_completion.
14525 (grub_cmdline_get): Use grub_normal_do_completion instead of
14526 grub_tab_complete.
14527
14528 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14529 returns non-zero, otherwise return 0.
14530 (grub_partition_iterate): First, probe the partition map. Then,
14531 call ITERATE only for this partition map.
14532
14533 * kern/misc.c (grub_strncmp): Rewritten.
14534
14535 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14536 returns non-zero. Otherwise return 0.
14537
14538 * include/grub/partition.h (grub_partition_map_iterate): Return
14539 int instead of void.
14540
14541 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14542
14543 * include/grub/misc.h (grub_strncmp): Change the type of N to
14544 grub_size_t.
14545
14546 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14547 of void.
14548
14549 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 14550 unsigned explicitly before comparing it with I.
8de3495c 14551
14552 * kern/main.c (grub_env_write_root): Add the attribute unused into
14553 VAR.
14554
14555 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14556 normal/completion.c.
14557 (normal_mod_SOURCES): Likewise.
14558 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14559 (normal_mod_SOURCES): Likewise.
14560
14561 * normal/command.c (grub_iterate_commands): If ITERATE returns
14562 non-zero, return one immediately.
14563
e85e144b 145642005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14565
14566 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14567 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14568 descriptions.
14569 (grub_vbe_get_controller_info): New function.
14570 (grub_vbe_get_mode_info): Likewise.
14571 (grub_vbe_set_mode): Likewise.
14572 (grub_vbe_get_mode): Likewise.
14573 (grub_vbe_set_memory_window): Likewise.
14574 (grub_vbe_get_memory_window): Likewise.
14575 (grub_vbe_set_scanline_length): Likewise.
14576 (grub_vbe_get_scanline_length): Likewise.
14577 (grub_vbe_set_display_start): Likewise.
14578 (grub_vbe_get_display_start): Likewise.
14579 (grub_vbe_set_palette_data): Likewise.
14580 * include/grub/i386/pc/vbe.h: New file.
14581
c46153d2 145822005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14583
14584 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14585 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14586 * DISTLIST: Likewise.
14587 * kern/ieee1275/of.c: Moved to ...
14588 * kern/ieee1275/ieee1275.c: ... here.
14589
0cb90c45 145902005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14591
14592 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14593 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14594 Pass 0 as `end' parameter to grub_strtoul().
14595
a19fb360 145962005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14597
14598 * include/grub/powerpc/ieee1275/console.h: Do not include
14599 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14600 ifdef.
14601 (grub_console_cur_color): Remove i386-specific prototype.
14602 (grub_console_real_putchar): Likewise.
14603 (grub_console_checkkey): Likewise.
14604 (grub_console_getkey): Likewise.
14605 (grub_console_getxy): Likewise.
14606 (grub_console_gotoxy): Likewise.
14607 (grub_console_cls): Likewise.
14608 (grub_console_setcursor): Likewise.
14609 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14610 Include <grub/machine/console.h>.
14611 * term/ieee1275/ofconsole.c: Likewise.
14612
4ac9bd04 146132005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14614
14615 * Makefile.in (LIBLZO): New variable.
14616
14617 * configure.ac: Check for LZO version 2.
14618
14619 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14620 lzo/lzo1x.h instead of lzo1x.h.
14621
14622 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14623 of -llzo.
14624
14625 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14626 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14627
14628 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14629 copying the data from PARTITION to P.
14630
f4917dfd 146312005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14632
14633 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14634 negative, unload the module.
14635
14636 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14637 map is "pc_partition_map" but not "pc".
14638 (usage): Fix the description. The options are --boot-image and
14639 --core-image but not --boot-file or --core-file.
14640 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14641 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14642 DEFAULT_DIRECTORY.
14643
14644 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14645 --core-file. Specify INSTALL_DEVICE as an argument.
14646
14647 * util/console.c: Include config.h.
14648 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14649 [HAVE_NCURSES_H]: Include ncurses.h.
14650 [HAVE_CURSES_H]: Include curses.h.
14651 [!A_NORMAL] (A_NORMAL): Defined as zero.
14652 [!A_STANDOUT] (A_STANDOUT): Likewise.
14653
14654 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14655 -lncurses.
14656 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14657
14658 * configure.ac: Check for curses libraries and headers.
14659
14660 * Makefile.in (LIBCURSES): New variable.
14661
14662 * genmk.rb (Script::rule): Set the executable bits.
14663
14664 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14665 name of the PC partition map is "pc_partition_map" but not "pc".
14666
0e143073 146672005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14668
14669 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14670 (modules): Likewise.
14671 (usage): Added descriptions for --modules and --grub-probefs.
14672 Handle --modules and --grub-probefs. Save the arguments in MODULES
14673 and GRUB_PROBEFS, respectively.
14674 Auto-detect a filesystem module against GRUBDIR. If the result is
14675 empty and modules are not specified explicitly, abort the
14676 installation. Add the result to MODULES.
14677
14678 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14679 disk/powerpc/ieee1275/ofdisk.c,
14680 include/grub/powerpc/ieee1275/init.h and
14681 term/powerpc/ieee1275/ofconsole.c.
14682 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14683 term/ieee1275/ofconsole.c.
14684
14685 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14686
14687 * COPYING: Upgraded to the latest version. Only the address of the
14688 FSF office has changed.
f19dbdb7 14689
efd6e6d5 146902005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14691
14692 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14693 kern/ieee1275.c with kern/ieee1275/of.c.
14694
14695 * kern/ieee1275.c: Moved to ...
14696 * kern/ieee1275/of.c: ... here.
14697
8ceafda2 146982005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14699
14700 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 14701 readability.
8ceafda2 14702
14703 * config.guess: Updated to the latest version from gnulib.
14704 * config.sub: Likewise.
14705 * install.sh: Likewise.
14706 * mkinstalldirs: Likewise.
14707
14708 * include/grub/console.h: Removed. This file is arch-specific. Do
14709 not put this in include/grub.
14710
14711 * include/grub/i386/pc/console.h: Resurrected.
14712
14713 * util/console.c: Include grub/machine/console.h instead of
14714 grub/console.h.
14715 * util/grub-emu.c: Likewise.
14716
267f6cd9 147172005-08-04 Marco Gerards <metgerards@student.han.nl>
14718
14719 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14720 hardcoded value.
f19dbdb7 14721
267f6cd9 14722 From Vincent Pelletier <subdino2004@yahoo.fr>
14723 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14724 Redefined to use grub_getwh.
14725 (grub_term): New member named getwh.
14726 (grub_getwh): New prototype.
14727 * kern/term.c (grub_getwh): New function.
14728 * term/i386/pc/console.c (grub_console_getwh): New function.
14729 (grub_console_term): New member `getwh'.
14730 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14731 (grub_vga_term): New member `getwh'.
0b5abe02 14732 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 14733 grub_ssize_t.
14734 (grub_ofconsole_getw): New function.
14735 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14736 (grub_ofconsole_term): New field named getwh and new initial
14737 value.
14738
3be7266d 147392005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14740
14741 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14742 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14743 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14744 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14745 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14746 of <grub/machine/ieee1275.h>.
14747 * commands/ieee1275/reboot.c: Likewise.
14748 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14749 * kern/ieee1275.c: ... to here. All users updated. Change all
14750 parameter structs to use new type `grub_ieee1275_cell_t'.
14751 * term/powerpc/ieee1275/ofconsole.c: Move ...
14752 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14753 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14754 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14755 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14756 to return int.
14757 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14758 Remove unused prototypes. All users updated.
14759 * include/grub/powerpc/ieee1275/console.h: Removed.
14760 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14761 `grub_ieee1275_cell_t'.
14762 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14763 Cast comparisons with -1 to the correct type.
14764 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14765 type to match `grub_ieee1275_entry_fn'.
14766
8b5f3938 147672005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14768
14769 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14770
14771 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14772 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14773 partmap/sun.c.
14774 (grub_probefs_SOURCES): New variable.
14775
14776 * util/i386/pc/grub-probefs.c: New file.
14777
14778 * util/i386/pc/grub-setup.c (main): Call
14779 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14780 grub_hfs_init and grub_jfs_init to initialize the system. Call
14781 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14782 grub_pc_partition_map_fini to finish the system.
14783
ea409713 147842005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14785
14786 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14787 function.
14788 (grub_multiboot_load_elf32): Likewise.
14789 (grub_multiboot_is_elf64): Likewise.
14790 (grub_multiboot_load_elf64): Likewise.
14791 (grub_multiboot_load_elf): Likewise.
14792 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14793 an ELF32 or ELF64 file.
14794 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14795
14796 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14797 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14798 NULL before calling FS->LABEL.
14799 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14800 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14801 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14802 before calling FS->LABEL.
14803
141a288b 148042005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14805
14806 * util/i386/pc/grub-install.in (datadir): New variable.
14807 (libdir): Removed.
14808 (pkgdatadir): New variable.
14809 (pkglibdir): Removed.
14810
0d5f8a54 148112005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14812
14813 * DISTLIST: Added util/i386/pc/grub-install.in.
14814
14815 * util/i386/pc/grub-install.in: New file.
14816
14817 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14818 (grub_install_SOURCES): Likewise.
14819
14820 * genmk.rb: Added support for scripts.
14821 (Script): New class.
14822 (scripts): New variable.
14823
14824 * Makefile.in (install-local): Install sbin_SCRIPTS by
14825 INSTALL_SCRIPT.
14826 (uninstall): Remove sbin_SCRIPTS.
14827
14828 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14829 device, try to get a GRUB device by
14830 grub_util_biosdisk_get_grub_dev.
14831 Free DEST_DEV.
14832
14833 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14834 description for --device-map.
14835
5f968e1e 148362005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14837
14838 Change the semantics of variable hooks. They now return strings
14839 instead of error values.
f19dbdb7 14840
5f968e1e 14841 * util/i386/pc/grub-setup.c: Include grub/env.h.
14842 (setup): Use grub_device_set_root instead of grub_env_set.
14843
14844 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14845 grub_env_get instead of grub_device_set_root and
14846 grub_device_get_root, respectively.
14847
14848 * kern/main.c (grub_env_write_root): New function.
14849 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14850 grub_env_set instead of grub_device_set_root.
14851
14852 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14853 many variables.
14854 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14855 rather than calling ENV->WRITE_HOOK afterwards.
14856 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14857 passing a pointer of a pointer.
14858 (grub_register_variable_hook): Change the types of "read_hook" and
14859 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14860 respectively.
14861 Allocate the default empty string on the heap, because this string
14862 may be freed later.
14863
14864 * kern/device.c: Include grub/env.h.
14865 (grub_device_set_root): Removed.
14866 (grub_device_get_root): Likewise.
14867 (grub_device_open): Use grub_env_get instead of
14868 grub_device_get_root.
14869
14870 * include/grub/env.h (grub_env_read_hook_t): New type.
14871 (grub_env_write_hook_t): Likewise.
14872 (grub_env_var): Change the types of "read_hook" and "write_hook"
14873 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14874 (grub_register_variable_hook): Likewise.
14875
14876 * include/grub/device.h (grub_device_set_root): Removed.
14877 (grub_device_set_root): Likewise.
14878
14879 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14880 make sure that DIRNAME terminates with '/', so that
14881 grub_fat_find_dir will fail if PATH is not a directory.
14882
14883 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14884 from DIRNAME.
14885 Use the qualifier auto for print_files and print_files_long.
14886 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14887 as a regular file.
14888 Put a newline only if there is no error.
14889 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14890 used.
14891
896f0afd 148922005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14893
14894 * kern/partition.c (grub_partition_probe): Initialize PART to
14895 NULL. Otherwise, when no partition map is registered, this returns
14896 a garbage.
14897
b28b81b2 148982005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14899
14900 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14901 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14902 valid.
14903
5f3607e0 149042005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14905
14906 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14907 information on each device, if it does not have partitions. Print
14908 "Device" instead of "Disk", because this function is not specific
14909 to disk devices.
14910
14911 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14912 static to ensure that it is put on the memory rather than a
14913 register.
14914
502c87e8 149152005-07-17 Yoshinori Okuji <okuji@enbug.org>
14916
14917 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14918 (grub_cat_init): Likewise.
14919 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14920 (options): Likewise.
14921 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14922 (grub_configfile_init): Likewise.
14923 * font/manager.c (GRUB_MOD_INIT): Likewise.
14924 * commands/help.c (GRUB_MOD_INIT): Likewise.
14925 (grub_help_init): Likewise.
14926 * normal/command.c (grub_command_init): Likewise.
14927 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14928 * disk/loopback.c (grub_loop_init): Likewise.
14929 (GRUB_MOD_INIT): Likewise.
14930 * commands/ls.c (grub_ls_init): Likewise.
14931 (GRUB_MOD_INIT): Likewise.
14932 (options): Likewise.
14933 * commands/boot.c (grub_boot_init): Likewise.
14934 (GRUB_MOD_INIT): Likewise.
14935 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14936 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14937 (GRUB_MOD_INIT): Likewise.
14938 * commands/cmp.c (grub_cmp_init): Likewise.
14939 (GRUB_MOD_INIT): Likewise.
14940
14941 * normal/arg.c: Use <> instead of "" to include header files.
14942 (SHORT_ARG_HELP): New macro.
14943 (SHORT_ARG_USAGE): Likewise.
14944 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14945 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14946 descriptions.
14947 (find_short): Check if C is 'h' or 'u' explicitly.
14948 (grub_arg_show_help): Use space characters instead of tabs. Treat
14949 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14950 are shown with --help and --usage only if they are not used for
14951 the command itself.
14952 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14953 'h' and 'u'.
14954
14955 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14956 const into "longarg". Change the type of "shortarg" to int.
14957
f806d18e 149582005-07-17 Yoshinori Okuji <okuji@enbug.org>
14959
14960 * boot/i386/pc/boot.S (boot_drive_check): New label.
14961
14962 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14963 macro.
14964
14965 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14966 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14967
e293232b 149682005-07-17 Yoshinori Okuji <okuji@enbug.org>
14969
14970 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14971 When turning off Gate A20, skip the check and return immediately,
14972 because this is not fatal usually.
14973
ebedfd00 149742005-07-17 Yoshinori Okuji <okuji@enbug.org>
14975
14976 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14977 be 0x7C00 instead of 0x8000.
14978
14979 * boot/i386/pc/pxeboot.S: Rewritten.
14980
14981 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14982 EXT_C.
14983 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14984 result.
14985
654fc59f 149862005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14987
14988 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14989 robustness. This routine now supports a BIOS call and System
14990 Control Port A to modify the gate A20.
14991
14992 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14993 Increased to 0x440.
14994
09f9923f 149952005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14996
14997 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14998 device path and resulting ihandle.
14999 (grub_ofdisk_close): dprintf the ihandle being closed.
15000 (grub_ofdisk_read): dprintf function parameters.
15001 * kern/mm.c (grub_mm_init_region): Likewise.
15002 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15003 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15004 size, and boot arguments.
15005 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15006 before loading into memory.
15007 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15008 before loading into memory.
15009
7ef504d8 150102005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15011
15012 * kern/mm.c: Added much documentation.
15013 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15014 8, set to 5 instead of 8.
15015
e0f050c2 150162005-07-10 Yoshinori Okuji <okuji@enbug.org>
15017
15018 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15019
15020 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15021 (grub_mkdevicemap_SOURCES): New variable.
15022
15023 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15024 lib/device.c of GRUB Legacy.
15025
7224189a 150262005-07-10 Yoshinori Okuji <okuji@enbug.org>
15027
15028 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15029 instead of PATH is NULL.
15030
68c864eb 150312005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15032
15033 * commands/cmp.c (BUFFER_SIZE): New macro.
15034 (grub_cmd_cmp): Close the right file at the right time. Compare
15035 only data just read. Don't report files of different size as
15036 identical. Dynamically allocate buffers. Move variable
15037 declarations at the beginning of function.
15038
e6f3e614 150392005-07-09 Yoshinori Okuji <okuji@enbug.org>
15040
15041 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15042 reverse.
15043
f8f1559a 150442004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15045
15046 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15047 when backspace is pressed at beginning of line.
15048
39c9d41d 150492005-07-03 Yoshinori Okuji <okuji@enbug.org>
15050
15051 * DISTLIST: Added genfslist.sh.
15052
15053 * normal/main.c (fs_module_list): New variable.
15054 (autoload_fs_module): New function.
15055 (read_fs_list): Likewise.
15056 (grub_normal_execute): Call read_fs_list.
15057
15058 * kern/fs.c (grub_fs_autoload_hook): New variable.
15059 (grub_fs_probe): Added support for auto-loading.
15060
15061 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15062 (grub_fs_module_list_t): New type.
15063
15064 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15065 (grub_fs_autoload_hook): New prototype.
15066
15067 * genfslist.sh: New file.
f19dbdb7 15068
39c9d41d 15069 * genmk.rb: Added a rule to generate a filesystem list.
15070
121c1d83 150712005-06-30 Marco Gerards <metgerards@student.han.nl>
15072
15073 * configure.ac: Fix the test for cross-compiling.
15074
15075 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15076 define GRUB_UTIL anymore.
15077
15078 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15079 so this function works on other systems than just big endian.
15080 (load_modules): Likewise.
15081 (add_segments): Likewise.
15082
e75d76e1 150832005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15084
15085 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15086 contains `l' modifier, get a long from va_arg().
15087
50b5a0a7 150882005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15089
15090 * kern/mm.c (grub_free): If the next free block which is being
15091 merged is the first free block, set the first block to the block
15092 being freed.
15093 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15094
89371b20 150952005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15096
15097 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15098 `grub_ieee1275_chosen'.
15099
168d6e58 151002005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15101
15102 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15103 (grub_ieee1275_chosen): New variable.
15104 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15105 `chosen'.
15106 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15107 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15108 Rename first argument to `phandle' for consistency.
15109 (grub_ieee1275_get_property_length): Likewise.
15110 (grub_ieee1275_next_property): Likewise. Change type of first argument
15111 to grub_ieee1275_phandle_t.
15112 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15113 Move export next to declaration.
15114 (grub_ieee1275_chosen): New variable.
15115 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15116 Correct cosmetic typo.
15117 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15118 `grub_ieee1275_chosen'.
15119 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15120 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15121 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15122 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15123 `grub_ieee1275_chosen'.
15124
ca5baa3f 151252005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15126
15127 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15128 /chosen/bootargs.
15129 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15130 /chosen/bootargs as "variable=value" pairs.
15131
708b345f 151322005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15133
15134 * include/grub/misc.h (grub_dprintf): New macro.
15135 (grub_real_dprintf): New prototype.
15136 (grub_strword): Likewise.
15137 (grub_iswordseparator): Likewise.
15138 * kern/misc.c (grub_real_dprintf): New function.
15139 (grub_strword): Likewise.
15140 (grub_iswordseparator): Likewise.
15141
f4c5e67c 151422005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15143
15144 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15145 (roundup): Remove macro.
15146 (grub_ieee1275_flags): Make static.
15147 (grub_ieee1275_realmode): Remove.
15148 (grub_ieee1275_test_flag): New function.
15149 (grub_ieee1275_set_flag): Likewise.
15150 (find_options): Rename to `grub_ieee1275_find_options'; update
15151 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15152 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15153 (cmain): New prototype.
15154 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15155 `grub_ieee1275_flags' directly.
15156 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15157 machine/biosdisk.h.
15158 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15159 Don't include grub/machine/init.h.
15160 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15161 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15162 Remove prototype.
15163 (grub_ieee1275_realmode): Likewise.
15164 (grub_ieee1275_flag): New enum.
15165 (grub_ieee1275_test_flag): New prototype.
15166 (grub_ieee1275_set_flag): New prototype.
15167 * include/grub/powerpc/ieee1275/init.h: Remove file.
15168 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15169 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15170 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15171 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15172 comment.
15173 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15174 `grub_ieee1275_test_flag'.
15175 (grub_ieee1275_encode_devname): Likewise.
15176
ed16607e 151772005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15178
15179 * include/grub/powerpc/ieee1275/ieee1275.h
15180 (grub_ieee1275_encode_devname): New prototype.
15181 (grub_ieee1275_get_filename): Likewise.
15182 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15183 function.
15184 (grub_set_prefix): Likewise.
15185 (grub_machine_init): Call grub_set_prefix.
15186 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15187 (grub_parse_type): New enum.
15188 (grub_ieee1275_get_devargs): New function.
15189 (grub_ieee1275_get_devname): Likewise.
15190 (grub_ieee1275_parse_args): Likewise.
15191 (grub_ieee1275_get_filename): Likewise.
15192 (grub_ieee1275_encode_devname): Likewise.
15193
be369920 151942005-03-30 Marco Gerards <metgerards@student.han.nl>
15195
15196 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15197 `grub_loader_unset'.
15198
a5ce3a4a 151992005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15200
15201 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15202 instead of grub_ieee1275_interpret.
15203 (grub_halt_init): New function.
15204 (grub_halt_fini): Likewise.
15205 (GRUB_MOD_INIT): Correct message grammar.
15206 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15207 instead of grub_ieee1275_interpret.
15208 (grub_reboot_init): New function.
15209 (grub_reboot_fini): Likewise.
15210 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15211 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15212 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15213 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15214 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15215 function.
15216 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15217 Add prototype.
15218 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15219 prototype.
15220 (grub_halt): Likewise.
15221 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15222 (cmain): Remove __attribute__((unused)).
15223 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15224 (grub_heap_len): Likewise.
15225 (grub_machine_fini): New function.
15226 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15227 (grub_halt): Likewise.
15228 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15229 function.
15230 * util/powerpc/ieee1275/misc.c: New file.
15231
0058f771 152322005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15233
15234 * DISTLIST: New file.
15235 * gendistlist.sh: Likewise.
f19dbdb7 15236
0058f771 15237 * Makefile.in (COMMON_DISTFILES): Removed.
15238 (BOOT_DISTFILES): Likewise.
15239 (CONF_DISTFILES): Likewise.
15240 (DISK_DISTFILES): Likewise.
15241 (FS_DISTFILES): Likewise.
15242 (INCLUDE_DISTFILES): Likewise.
15243 (KERN_DISTFILES): Likewise.
15244 (LOADER_DISTFILES): Likewise.
15245 (TERM_DISTFILES): Likewise.
15246 (UTIL_DISTFILES): Likewise.
15247 (DISTFILES): Likewise.
15248 (uninstall): Uninstall files in $(pkgdata_DATA).
15249 (DISTLIST): New target.
15250 (distdir): Use the contents of the file DISTLIST to get a list of
15251 distributed files.
15252
46b3b8a5 152532005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15254
15255 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15256 descriptor. This is ported from GRUB Legacy.
15257
15258 * gencmdlist.sh: Added an extra semicolon to make it work with
15259 old sed versions. Reported by Robert Bihlmeyer
15260 <robbe@orcus.priv.at>.
15261
5822ff87 152622005-03-08 Yoshinori Okuji <okuji@enbug.org>
15263
15264 Automatic loading of commands is supported.
f19dbdb7 15265
5822ff87 15266 * normal/main.c (read_command_list): New function.
15267 (grub_normal_execute): Call read_command_list.
15268
15269 * normal/command.c (grub_register_command): Return zero or CMD.
15270 Allocate CMD->NAME from the heap.
15271 Initialize CMD->MODULE_NAME to zero.
15272 Find the same name as well. If the same command is found and it is
15273 a dummy command, overwrite members. If it is not a dummy command,
15274 return zero.
15275 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15276 (grub_command_find): If a dummy command is found, load a module
15277 and retry to find a command only once.
15278
15279 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15280 make sure that each command is loaded.
15281
15282 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15283 macro.
15284 (struct grub_command): Remove const from the member `name'.
15285 Add a new member `module_name'.
15286 (grub_register_command): Return grub_command_t.
15287
15288 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15289 sure that each command is loaded.
15290
15291 * genmk.rb (PModule::rule): Specify a module name without the
15292 suffix ".mod" to gencmdlist.sh.
15293
7b1f4b57 152942005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15295
15296 * gencmdlist.sh: New file.
f19dbdb7 15297
7b1f4b57 15298 * genmk.rb (PModule::rule): Generate a rule for a command list.
15299 Clean command.lst.
15300 Generate command.lst from $(COMMANDFILES).
15301
15302 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15303 (DATA): Added $(pkgdata_DATA).
15304 (install-local): Install files in $(pkgdata_DATA).
15305
062aaf39 153062005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15307
15308 * term/i386/pc/vga.c (debug_command): Removed.
15309 (GRUB_MOD_INIT): Do not register the command "debug".
15310
15311 From Hollis Blanchard:
15312 * commands/configfile.c: New file.
15313 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15314 commands/configfile.c.
15315 (pkgdata_MODULES): Added configfile.mod.
15316 (configfile_mod_SOURCES): New variable.
15317 (configfile_mod_CFLAGS): Likewise.
15318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15319 commands/configfile.c.
15320 (pkgdata_MODULES): Added configfile.mod.
15321 (configfile_mod_SOURCES): New variable.
15322 (configfile_mod_CFLAGS): Likewise.
15323 * util/grub-emu.c (main): Call grub_configfile_init and
15324 grub_configfile_fini.
15325 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15326 prototype.
15327 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 15328
cee01aa6 153292005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15330
15331 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15332 address.
15333
15334 * commands/help.c (grub_cmd_help): Do not print newlines after
15335 the last command in print_command_help.
15336
93f3a1d8 153372005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15338
15339 * commands/default.h: New file.
15340 * commands/timeout.h: Likewise.
15341 * normal/context.c: Likewise.
f19dbdb7 15342
93f3a1d8 15343 * util/misc.c: Do not include sys/times.h.
15344 Include sys/time.h and grub/machine/time.h.
15345 (grub_get_rtc): Rewritten with gettimeofday.
15346
15347 * util/grub-emu.c (main): Call grub_default_init and
15348 grub_timeout_init before grub_normal_init, and call
15349 grub_timeout_fini and grub_default_fini after grub_main.
15350
15351 * util/console.c (grub_ncurses_checkkey): Return the read
15352 character or -1.
15353
15354 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15355 timeouts.
15356
15357 * normal/main.c (read_config_file): Push MENU. If this fails,
15358 print an error and wait for a user input.
15359 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15360 If a menu is empty or an error occurs, pop MENU.
15361 (grub_normal_execute): Pop and free MENU after grub_menu_run
15362 returns.
15363
15364 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15365
15366 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15367 include time.h.
15368 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15369 without GRUB_UTIL.
15370 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15371 time.h.
15372 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15373 without GRUB_UTIL.
15374
15375 * include/grub/normal.h (struct grub_menu_list): New struct.
15376 (grub_menu_list_t): New type.
15377 (struct grub_context): New struct.
15378 (grub_context_t): New type.
15379 (grub_register_command): Got rid of EXPORT_FUNC.
15380 (grub_unregister_command): Likewise.
15381 (grub_context_get): New prototype.
15382 (grub_context_get_current_menu): Likewise.
15383 (grub_context_push_menu): Likewise.
15384 (grub_context_pop_menu): Likewise.
15385 [GRUB_UTIL] (grub_default_init): Likewise.
15386 [GRUB_UTIL] (grub_default_fini): Likewise.
15387 [GRUB_UTIL] (grub_timeout_init): Likewise.
15388 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15389
15390 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15391 commands/timeout.c and normal/context.c.
15392 (pkgdata_MODULES): Added default.mod and timeout.mod.
15393 (normal_mod_SOURCES): Added normal/context.c.
15394 (default_mod_SOURCES): New variable.
15395 (default_mod_CFLAGS): Likewise.
15396 (timeout_mod_SOURCES): Likewise.
15397 (timeout_mod_CFLAGS): Likewise.
15398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15399 conf/i386-pc.rmk.
15400 (pkgdata_MODULES): Added default.mod and timeout.mod.
15401 (normal_mod_SOURCES): Added normal/context.c.
15402 (default_mod_SOURCES): New variable.
15403 (default_mod_CFLAGS): Likewise.
15404 (timeout_mod_SOURCES): Likewise.
15405 (timeout_mod_CFLAGS): Likewise.
15406
15407 * Makefile.in (all-local): Added $(MKFILES).
15408
4ed2e1dd 154092005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15410
15411 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15412 (grub_emu_SOURCES): Likewise.
15413 (pkgdata_MODULES): Add `sun.mod'.
15414 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15415 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15416 `partmap/sun.c'.
15417 (pkgdata_MODULES): Add `sun.mod'.
15418 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15419 * include/grub/partition.h (grub_sun_partition_map_init): New
15420 prototype.
15421 (grub_sun_partition_map_fini): Likewise.
15422 * partmap/sun.c: New file.
15423 * util/grub-emu.c (main): Initialize and de-initialize the sun
15424 partitionmap support.
15425
4d4e372e 154262005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15427
15428 This implements an Emacs-like menu entry editor.
f19dbdb7 15429
4d4e372e 15430 * normal/menu_entry.c: New file.
f19dbdb7 15431
4d4e372e 15432 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15433 characters to ASCII.
15434 (saved_char): New variable.
15435 (grub_ncurses_checkkey): Rewritten completely.
15436 (grub_ncurses_getkey): Likewise.
15437 (grub_ncurses_init): Call raw instead of cbreak.
15438
15439 * normal/menu.c (print_entry): Do not put a space.
15440 (init_page): Renamed to ...
15441 (grub_menu_init_page): ... this. All callers changed.
15442 (edit_menu_entry): Removed.
15443 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15444
15445 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15446
15447 * kern/misc.c (grub_vprintf): Call grub_refresh.
15448
15449 * normal/menu.c (DISP_LEFT): Renamed to ...
15450 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15451 * normal/menu.c (DISP_UP): Renamed to ...
15452 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15453 * normal/menu.c (DISP_RIGHT): Renamed to ...
15454 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15455 * normal/menu.c (DISP_DOWN): Renamed to ...
15456 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15457 * normal/menu.c (DISP_HLINE): Renamed to ...
15458 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15459 * normal/menu.c (DISP_VLINE): Renamed to ...
15460 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15461 * normal/menu.c (DISP_UL): Renamed to ...
15462 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15463 * normal/menu.c (DISP_UR): Renamed to ...
15464 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15465 * normal/menu.c (DISP_LL): Renamed to ...
15466 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15467 * normal/menu.c (DISP_LR): Renamed to ...
15468 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15469 * normal/menu.c (TERM_WIDTH): Renamed to ...
15470 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15471 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15472 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15473 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15474 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15475 * normal/menu.c (TERM_MARGIN): Renamed to ...
15476 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15477 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15478 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15479 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15480 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15481 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15482 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15483 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15484 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15485 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15486 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15487 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15488 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15489 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15490 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15491 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15492 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15493 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15494 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15495 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15496 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15497 All callers changed.
15498
15499 * include/grub/normal.h: New prototype.
15500
15501 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15502 normal/menu_entry.c.
15503 (normal_mod_SOURCES): Likewise.
15504 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15505 (normal_mod_SOURCES): Likewise.
15506
e6b92c8a 155072005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15508
15509 * include/grub/normal.h (grub_halt_init): New prototype.
15510 (grub_halt_fini): Likewise.
15511 (grub_reboot_init): Likewise.
15512 (grub_reboot_fini): Likewise.
15513
15514 * util/grub-emu.c: Include signal.h.
15515 (main_env): New global variable.
15516 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15517 catch C-c.
15518 (grub_machine_fini): New function.
15519 (main): Call grub_halt_init and grub_reboot_init before
15520 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15521 Call setjmp with MAIN_ENV to go back afterwards.
15522 Call grub_machine_fini right before return.
15523
15524 * include/grub/util/misc.h: Include setjmp.h.
15525 (main_env): New prototype.
15526
15527 * include/grub/kernel.h (grub_machine_fini): New prototype.
15528 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15529 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15530
15531 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15532 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15533 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 15534
e6b92c8a 15535 * util/i386/pc/misc.c: New file.
f19dbdb7 15536
e6b92c8a 15537 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15538 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15539 commands/i386/pc/reboot.c.
15540
c642636f 155412005-02-14 Guillem Jover <guillem@hadrons.org>
15542
15543 * include/grub/dl.h (grub_dl_check_header): New prototype.
15544 (grub_arch_dl_check_header): Change return type to grub_err_t,
15545 remove size parameter and export function. Update all callers.
15546 * kern/dl.c (grub_dl_check_header): New function.
15547 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15548 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15549 are inside the core.
15550 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15551 independent ELF header checks.
15552 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15553 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15554 `grub_dl_check_header' instead of explicit checks. Check for the
15555 ELF type.
15556 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15557 `grub_dl_check_header' instead of explicit checks. Remove arch
15558 specific ELF header checks.
15559
e6b92c8a 15560 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15561 argument SIZE.
15562
5eabe94b 155632005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15564
15565 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15566 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15567
1b14a681 155682005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15569
15570 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 15571 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 15572 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 15573 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 15574 * partmap/amiga.c (amiga_partition_map_iterate): Return
15575 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15576 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15577
aca108aa 155782005-02-01 Guillem Jover <guillem@hadrons.org>
15579
15580 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15581 help info.
15582
c9f9c556 155832005-01-31 Marco Gerards <metgerards@student.han.nl>
15584
15585 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15586 Removed prototype.
15587 (grub_rescue_cmd_linux): New prototype.
15588 (grub_rescue_cmd_initrd): Likewise.
15589 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15590 `bi_rec'.
15591 (grub_linux_release_mem): Release the memory for the initrd.
15592 (grub_load_linux): Renamed from this...
15593 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15594 Changed `entry' not to be static. Loop over memory regions to
15595 find another one when the default fails.
15596 (grub_rescue_cmd_initrd): New function.
15597 (grub_linux_init): Remove function.
15598 (grub_linux_fini): Likewise.
15599 (GRUB_MOD_INIT): Register `initrd'.
15600 (GRUB_MOD_FINI): Unregister `initrd'.
15601 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15602 Function removed.
15603 (grub_linux_normal_fini): Likewise.
15604 (GRUB_MOD_INIT): Register `initrd'.
15605 (GRUB_MOD_FINI): Unregister `initrd'.
15606
990cf3aa 156072005-01-31 Marco Gerards <metgerards@student.han.nl>
15608
15609 * commands/help.c: New file.
15610 * normal/arg.c (show_help): Renamed to...
15611 (grub_arg_show_help): ... this.
15612 * commands/i386/pc/halt.c: New file.
15613 * commands/i386/pc/reboot.c: Likewise.
15614 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15615 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15616 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15617 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15618 variables.
15619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15620 `commands/help.c'.
15621 (pkgdata_MODULES): Add `help.mod'.
15622 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15623 * grub/i386/pc/init.h (grub_reboot): New prototype.
15624 (grub_halt): Likewise.
15625 * include/grub/normal.h (grub_arg_show_help): New prototype.
15626 (grub_help_init): Likewise.
15627 (grub_help_fini): Likewise.
15628 * util/grub-emu.c (main): Initialize and deinitialize the help
15629 command.
15630
15631 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15632
15633 * normal/command.c (grub_command_init): Fixed the description of
15634 the `set' and `unset' commands.
15635
156362005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 15637
15638 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15639 function.
15640 * commands/ieee1275/halt.c: New file.
15641 * commands/ieee1275/reboot.c: Likewise.
15642 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15643 `__attribute__ ((unused))'. Some GCS related fixed.
15644 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15645 (grub_suspend_fini): Likewise.
15646 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15647 and `halt.mod'.
15648 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15649 (halt_mod_CFLAGS): New variables.
15650 * include/grub/powerpc/ieee1275/ieee1275.h
15651 (grub_ieee1275_interpret): New prototype.
15652
1ab09cc7 156532005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15654
15655 * include/grub/misc.h (memmove): New prototype.
15656 (memcpy): Likewise.
15657
8b8cbdb2 156582005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15659
15660 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15661 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15662
e3741a27 156632005-01-22 Marco Gerards <metgerards@student.han.nl>
15664
15665 * kern/misc.c (grub_strndup): Function rewritten.
15666
776bd780 156672005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15668
15669 * normal/menu.c (TERM_WIDTH): Macro redefined.
15670 (TERM_TOP_BORDER_Y): Likewise.
15671 (draw_border): Replaced while-loop by a for-loop. Make the number
15672 of lines consistent with the number of lines displayed in
15673 print_entries. Added a margin below the rectangle.
15674 (print_entry): Make the entry fit in the rectangle.
15675 (print_entries): Display the scroll arrows next to the right
15676 border.
15677
78026bce 156782005-01-21 Marco Gerards <metgerards@student.han.nl>
15679
15680 * fs/minix.c (grub_minix_find_file): Reserve more space for
15681 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15682 `grub_strncpy' to copy `path' into it.
15683
67bbaf0f 156842005-01-21 Marco Gerards <metgerards@student.han.nl>
15685
15686 Add the loopback device, a device via which files can be accessed
15687 as devices.
f19dbdb7 15688
67bbaf0f 15689 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15690 (pkgdata_MODULES): Add loopback.mod.
15691 (loopback_mod_SOURCES): New variable.
15692 (loopback_mod_CFLAGS): Likewise.
15693 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15694 `disk/loopback.c'.
15695 (pkgdata_MODULES): Add loopback.mod.
15696 (loopback_mod_SOURCES): New variable.
15697 (loopback_mod_CFLAGS): Likewise.
15698 * disk/loopback.c: new file.
15699 * include/grub/normal.h (grub_loop_init): New prototype.
15700 (grub_loop_fini): New prototype.
15701 * util/grub-emu.c (main): Initialize and de-initialize loopback
15702 support.
15703 * include/grub/disk.h (grub_disk_dev_id): Add
15704 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15705
6f1c18bd 157062005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15707
15708 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15709 function.
15710 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15711 (suspend_mod_SOURCES): New variable.
15712 (suspend_mod_CFLAGS): Likewise.
15713 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15714 New prototype.
15715 * commands/ieee1275/suspend.c: New file.
15716
b38551da 157172005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15718
15719 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 15720 ((unused))' to `__attribute__ ((used))'.
b38551da 15721 (GRUB_MOD_FINI): Likewise.
15722 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15723 * genmk.rb (PModule): Assign space to common symbols when linking
15724 modules.
15725
777aff39 157262005-01-20 Marco Gerards <metgerards@student.han.nl>
15727
15728 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15729 `unsigned' arguments to `grub_size_t'.
15730 (grub_malloc): Likewise.
15731 (grub_realloc): Likewise.
15732 (grub_memalign): Likewise.
15733 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15734 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15735 * util/misc.c (grub_malloc): Likewise.
15736 (grub_realloc): Likewise.
15737 * kern/mm.c (get_header_from_pointer): Change the casts to
15738 `unsigned' into a cast to `grub_size_t'.
15739
15740 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15741 point to `currnode' when `currnode' is changed.
15742
15743 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15744 Schottelius <nico-linux@schottelius.org>.
15745
d0ff18e1 157462005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15747
15748 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15749 (note_path): Remove variable.
15750 (GRUB_IEEE1275_NOTE_NAME): New macro.
15751 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15752 (grub_ieee1275_note_hdr): New structure.
15753 (grub_ieee1275_note_desc): Likewise.
15754 (grub_ieee1275_note): Likewise.
15755 (load_note): Remove `dir' argument. All callers updated. Remove
15756 `note_img' and `path'. Do not load a file from `note_path'.
15757 Initialize a struct grub_ieee1275_note and write that to `out'.
15758 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15759
4ca7004c 157602005-01-05 Marco Gerards <metgerards@student.han.nl>
15761
15762 * util/misc.c (grub_util_read_image): Revert last change. It
15763 called `grub_util_read_at', which seeks from the beginning of the
15764 file.
15765
0b412211 157662005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15767
15768 * TODO: Add note about endianness in grub-mkimage.
15769 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15770 section.
15771 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15772 (grub_mkimage_SOURCES): New target.
15773 * include/grub/kernel.h (grub_start_addr): Remove variable.
15774 (grub_end_addr): Likewise.
15775 (grub_total_module_size): Likewise.
15776 (grub_kernel_image_size): Likewise.
15777 (GRUB_MODULE_MAGIC): New constant.
15778 (grub_module_info): New structure.
15779 (grub_arch_modules_addr): New prototype.
15780 (grub_get_end_addr): Remove prototype.
15781 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15782 * include/grub/powerpc/ieee1275/kernel.h: New file.
15783 * include/grub/util/misc.h (grub_util_get_fp_size): New
15784 prototype.
15785 (grub_util_read_at): Likewise.
15786 (grub_util_write_image_at): Likewise.
15787 * kern/main.c (grub_get_end_addr): Remove function.
15788 (grub_load_modules): Call grub_arch_modules_addr instead of using
15789 grub_end_addr. Look for a grub_module_info struct in memory. Use
15790 the grub_module_info fields instead of calling grub_get_end_addr
15791 as loop conditions. Move grub_add_unused_region code here.
15792 (grub_add_unused_region): Remove function.
15793 * kern/i386/pc/init.c: Include grub/cache.h.
15794 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15795 one call to add_mem_region.
15796 (grub_arch_modules_addr): New function.
15797 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15798 (grub_total_module_size): Likewise.
15799 Include grub/machine/kernel.h.
15800 (grub_arch_modules_addr): New function.
15801 * util/grub-emu.c (grub_end_addr): Remove variable.
15802 (grub_total_module_size): Likewise.
15803 (grub_arch_modules_addr): New function.
15804 * util/misc.c: Include unistd.h.
15805 (grub_util_get_fp_size): New function.
15806 (grub_util_read_at): Likewise.
15807 (grub_util_write_image_at): Likewise.
15808 (grub_util_read_image): Call grub_util_read_at.
15809 (grub_util_write_image): Call grub_util_write_image_at.
15810 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15811 additional memory in kernel_img for a struct grub_module_info.
15812 Fill in that grub_module_info.
15813 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15814
458786f8 158152005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15816
15817 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15818 New function.
15819 * include/grub/powerpc/ieee1275/ieee1275.h
15820 (grub_ieee1275_milliseconds): New prototype.
15821 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15822 Change to 1000.
15823 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15824 grub_ieee1275_milliseconds.
15825
ac507d1b 158262005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15827
15828 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15829 variable.
15830 (find_options): New function.
15831 (cmain): Call find_options.
15832 * include/grub/powerpc/ieee1275/ieee1275.h
15833 (grub_ieee1275_realmode): New extern variable.
15834 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15835 grub_map if grub_ieee1275_realmode is false.
15836
6b8fd1c4 158372004-12-29 Marco Gerards <metgerards@student.han.nl>
15838
15839 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15840 lines are inserted and make it work like readline. Reported by
15841 Vincent Pelletier <subdino2004@yahoo.fr>.
15842
8514a1e0 158432004-12-28 Marco Gerards <metgerards@student.han.nl>
15844
15845 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15846
15847 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15848 `kern/powerpc/cache.S'.
15849
924b6140 158502004-12-27 Marco Gerards <metgerards@student.han.nl>
15851
15852 * genmk.rb: Handle the `Program' class in the main loop. Written
15853 by Johan Rydberg <jrydberg@gnu.org>.
15854 (Program): New class.
15855 (programs): New variable.
15856 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15857 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15858 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15859 (help_arch): Function removed.
15860 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15861 `powerpc/libgcc.h' and `loader.h'.
15862 (pkgdata_PROGRAMS): New variable.
15863 (sbin_UTILITIES): Variable removed.
15864 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15865 (grubof_SOURCES): Variable re-defined so it only includes the
15866 core functionality.
15867 (grubof_CFLAGS): Remove `-DGRUBOF'.
15868 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15869 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15870 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15871 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15872 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15873 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15874 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15875 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15876 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15877 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15878 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15879 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15880 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15881 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15882 (pc_mod_CFLAGS): New variables.
15883 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15884 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15885 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15886 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15887 Moved from here...
15888 * include/grub/i386/pc/init.h (grub_os_area_addr)
15889 (rub_os_area_size): ... to here.
15890 * include/grub/powerpc/ieee1275/ieee1275.h
15891 (grub_ieee1275_entry_fn): Export symbol.
15892 * include/grub/powerpc/ieee1275/init.h: New file.
15893 * include/grub/powerpc/libgcc.h: Likewise.
15894 * include/grub/cache.h: Likewise.
15895 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15896 <hollis@penguinppc.org>.
15897 * kern/dl.c: Include <grub/cache.h>.
15898 (grub_dl_flush_cache): New function.
15899 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15900 for this module.
15901 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15902 (grub_console_init): Removed prototypes.
15903 (grub_machine_init): Don't initialize the modules anymore.
15904 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15905 static.
15906 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15907 Macro undef removed.
15908 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15909 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15910 relocation `R_PPC_REL32'. Return an error when the relocation is
15911 unknown.
15912 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15913 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15914 * util/misc.c (grub_arch_sync_caches): Likewise.
15915
e4b47e0c 159162004-12-19 Marco Gerards <metgerards@student.han.nl>
15917
15918 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15919 `symlist.c', add `grubof_symlist.c'.
15920 (symlist.c): Variable removed.
15921 (grubof_HEADERS): Variable added.
15922 (grubof_symlist.c): New target.
15923 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15924 `kernel_img_HEADERS'.
15925 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15926 * kern/powerpc/dl.c: New file.
15927 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15928 Function removed.
15929 (grub_arch_dl_relocate_symbols): Likewise.
15930 (grub_register_exported_symbols): Likewise.
15931
4ceb3636 159322004-12-13 Marco Gerards <metgerards@student.han.nl>
15933
15934 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15935 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15936 to fail instead. Reported by Vincent Pelletier
15937 <subdino2004@yahoo.fr>.
15938
15939 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15940 it is not allocated. Reported by Vincent Pelletier
15941 <subdino2004@yahoo.fr>.
15942
15943 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15944 output so the output looks better.
f19dbdb7 15945
3f1578fe 159462004-12-04 Marco Gerards <metgerards@student.han.nl>
15947
15948 Modulize the partition map support and add support for the amiga
15949 partition map.
f19dbdb7 15950
3f1578fe 15951 * commands/ls.c: Include <grub/partition.h> instead of
15952 <grub/machine/partition.h>.
15953 * kern/disk.c: Likewise.
15954 * kern/rescue.c: Likewise.
15955 * loader/i386/pc/chainloader.c: Likewise.
15956 * normal/cmdline.c: Likewise.
15957 * kern/powerpc/ieee1275/init.c: Likewise.
15958 (grub_machine_init): Call `grub_pc_partition_map_init',
15959 `grub_amiga_partition_map_init' and
15960 `grub_apple_partition_map_init'.
15961 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15962 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15963 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15964 `partition.h' and `pc_partition.h'.
15965 (grub_setup_SOURCES): Remove
15966 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15967 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15968 (grub_emu_SOURCES): Likewise.
15969 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15970 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15971 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15972 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15973 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15974 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15975 (grubof_SOURCES): Likewise.
15976 * disk/i386/pc/partition.c: File removed.
15977 * disk/powerpc/ieee1275/partition.c: Likewise.
15978 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15979 * include/grub/i386/pc/partition.h: Likewise.
15980 * kern/partition.c: New file.
15981 * partmap/amiga.c: Likewise.
15982 * partmap/apple.c: Likewise.
15983 * partmap/pc.c: Likewise.
15984 * include/grub/partition.h: Likewise..
15985 * include/grub/pc_partition.h: Likewise.
15986 * util/grub-emu.c: Include <grub/partition.h> instead of
15987 <grub/machine/partition.h>.
15988 (main): Call `grub_pc_partition_map_init',
15989 `grub_amiga_partition_map_init' and
15990 `grub_apple_partition_map_init' and deinitialize afterwards.
15991 * util/i386/pc/biosdisk.c: Include `#include
15992 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15993 `<grub/machine/partition.h>'.
15994 * util/i386/pc/grub-setup.c: Likewise.
15995 * util/i386/pc/biosdisk.c: Likewise.
15996 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15997 partition information in case of a PC partition.
15998 * util/i386/pc/grub-setup.c: Include `#include
15999 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16000 `<grub/machine/partition.h>'.
16001 (setup): Only access the PC specific partition information in case
16002 of a PC partition.
16003
0ef4ced9 160042004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 16005
0ef4ced9 16006 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16007 (grub_longjmp): Likewise.
16008 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16009 20.
16010 * normal/powerpc/setjmp.S: New file.
16011 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16012 `normal/powerpc/setjmp.S'.
16013 (grubof_CFLAGS): Add `-DGRUBOF'.
16014 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16015 [GRUB_UTIL && !GRUBOF].
f19dbdb7 16016
19950e29 160172004-11-16 Marco Gerards <metgerards@student.han.nl>
16018
16019 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16020 property named `name'. Correctly handle the error returned by
16021 `grub_ieee1275_finddevice' if a device can not be opened.
16022
a2fea427 160232004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16024
16025 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16026 `actual' for negativity.
16027 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16028 kern/fshelp.c.
16029
41ea0ea3 160302004-11-01 Marco Gerards <metgerards@student.han.nl>
16031
16032 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16033 (PAGE_OFFSET): New macro.
16034 (CRTC_ADDR_PORT): Likewise.
16035 (CRTC_DATA_PORT): Likewise.
16036 (START_ADDR_HIGH_REGISTER): Likewise.
16037 (START_ADDR_LOW_REGISTER): Likewise.
16038 (GRAPHICS_ADDR_PORT): Likewise.
16039 (GRAPHICS_DATA_PORT): Likewise.
16040 (READ_MAP_REGISTER): Likewise.
16041 (INPUT_STATUS1_REGISTER): Likewise.
16042 (INPUT_STATUS1_VERTR_BIT): Likewise.
16043 (page): New variable.
16044 (wait_vretrace): New function.
16045 (set_read_map): Likewise.
16046 (set_start_address): Likewise.
16047 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16048 the right page.
16049 (check_vga_mem): Take the page into account.
16050 (write_char): Likewise.
16051 (write_cursor): Likewise.
16052 (scroll_up): Likewise. Copy the page to the page that is not
16053 shown and switch between both pages.
16054 (grub_vga_putchar): Fix off by one error.
16055 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16056 account.
16057
ad0bd20b 160582004-11-01 Marco Gerards <metgerards@student.han.nl>
16059
16060 Add support for iso9660 (including rockridge).
f19dbdb7 16061
ad0bd20b 16062 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16063 (iso9660_mod_SOURCES): New variable.
16064 (iso9660_mod_CFLAGS): Likewise.
16065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16066 * include/grub/fs.h (grub_iso9660_init): New prototype.
16067 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16068 * fs/iso9660.c: New file.
16069
16070 * include/grub/misc.h (grub_strncat): New prototype.
16071 * kern/misc.c (grub_strncat): New function.
f19dbdb7 16072
ad0bd20b 16073 * fs/hfs.c (grub_hfs_mount): Translate the error
16074 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16075 * fs/jfs.c (grub_jfs_mount): Likewise.
16076 * fs/ufs.c (grub_ufs_mount): Likewise.
16077
a5477a59 160782004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16079
16080 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16081 which initialized BAT registers.
16082 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16083 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16084 Move from here...
16085 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16086 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16087 ... to here.
16088 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16089 (grub_mapclaim): Likewise.
16090 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16091 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16092 hand.
16093
9304c1f8 160942004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16095
16096 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16097 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16098 -ffreestanding and -msoft-float.
16099
86f4ae25 161002004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16101
16102 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16103 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16104 set in grub_ieee1275_flags.
16105
38912228 161062004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16107
16108 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16109 prototype.
16110 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16111 grub_console_init first.
16112 Change the memory range used for grub_ieee1275_claim and
16113 grub_mm_init_region.
16114 Print an error message if the claim fails.
16115 Include <grub/misc.h>.
16116
d1923dc8 161172004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16118
16119 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16120 Call grub_children_iterate for device nodes of type `scsi',
16121 `ide', or `ata'.
16122 (grub_ofdisk_open): Remove manual device alias resolution.
16123 Fix memory leak when device cannot be opened.
f19dbdb7 16124 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 16125 (grub_children_iterate): New prototype.
16126 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16127 New function.
16128 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16129 Return -1 if args.size was -1.
16130
4512e4f3 161312004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16132
16133 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16134 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16135 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16136 Open Firmware's memory for it; claim memory from _start to _end.
16137 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16138 (_end): New extern.
16139 (_start): Zero BSS from __bss_start to _end.
16140 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16141 New extern.
16142 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16143
4d61feb0 161442004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16145
ad0bd20b 16146 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16147 -1 if args.base was -1.
4d61feb0 16148
026fa2f9 161492004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16150
16151 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16152 escape sequence instead of a literal ^L. Also call
16153 grub_ofconsole_gotoxy.
16154
9f2220ef 161552004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16156
16157 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16158 void * arguments to grub_addr_t. All callers updated. Also make
16159 the `result' argument optional.
16160 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16161 All callers updated.
16162
8a572cd7 161632004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16164
16165 * commands/ls.c (grub_ls_list_files): Use the string following the
16166 initial ')', if present, as the filesystem path.
16167 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16168
16169 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16170
18aa81f2 161712004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16172
16173 Make the source code of the menu interface more readable.
f19dbdb7 16174
18aa81f2 16175 * normal/menu.c: Include grub/mm.h.
16176 (TERM_WIDTH): New macro.
16177 (TERM_HEIGHT): Likewise.
16178 (TERM_INFO_HEIGHT): Likewise.
16179 (TERM_MARGIN): Likewise.
16180 (TERM_SCROLL_WIDTH): Likewise.
16181 (TERM_TOP_BORDER_Y): Likewise.
16182 (TERM_LEFT_BORDER_X): Likewise.
16183 (TERM_BORDER_WIDTH): Likewise.
16184 (TERM_MESSAGE_HEIGHT): Likewise.
16185 (TERM_BORDER_HEIGHT): Likewise.
16186 (TERM_NUM_ENTRIES): Likewise.
16187 (TERM_FIRST_ENTRY_Y): Likewise.
16188 (TERM_ENTRY_WIDTH): Likewise.
16189 (TERM_CURSOR_X): Likewise.
16190 (draw_border): Use macros instead of magic numbers.
16191 (print_entry): Likewise.
16192 (print_entries): Likewise.
16193 (run_menu): Likewise. Also, handle the key 'e'.
16194 (run_menu_entry): Ignore empty command lines.
16195 (print_message): Added a new argument EDIT. If EDIT is true,
16196 print a different message.
16197 (init_page): Likewise.
16198 (edit_menu_entry): New function. Not implemented yet.
16199
b47efe30 162002004-09-17 Marco Gerards <metgerards@student.han.nl>
16201
16202 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16203 can be loaded from normal mode.
f19dbdb7 16204
b47efe30 16205 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16206 `multiboot.mod'.
16207 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16208 (multiboot_mod_CFLAGS): New variables.
16209 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 16210 * loader/i386/pc/multiboot_normal.c: Likewise.
16211
b47efe30 16212 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16213 attribute `unused'.
f19dbdb7 16214
b47efe30 16215 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16216 `fdiro' to read the mode information from instead of `diro'.
16217
16218 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16219 looking up a symlink.
16220
16221 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16222 macro.
16223 * normal/command.c (grub_command_execute): Don't parse the
16224 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16225 flags of the command.
16226
16227 * normal/menu.c (grub_menu_run): Fix typo.
16228
da75ac71 162292004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16230
16231 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16232
16233 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16234 `y + 1' instead of `y - 1'.
16235
16236 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 16237
062b24c2 162382004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16239
16240 From Hollis Blanchard <hollis@penguinppc.org>:
16241 * kern/misc.c (memmove): New alias for grub_memmove.
16242 (memcmp): New alias for grub_memcmp.
16243 (memset): New alias for grub_memset.
f19dbdb7 16244 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 16245 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 16246 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 16247 (grub_ieee1275_get_property): Likewise.
f19dbdb7 16248
8ddad845 162492004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16250
16251 Added normal mode command `chainloader' as module chain.mod, which
16252 depends on normal.mod and _chain.mod.
f19dbdb7 16253
8ddad845 16254 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16255 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16256 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16257 Deleted prototype.
16258 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16259 but arguments parsing moved to ...
16260 (grub_chainloader_cmd): ... here. New function.
16261 * include/grub/i386/pc/chainloader.h: New file.
16262 * loader/i386/pc/chainloader_normal.c: Likewise.
16263
2c1f4ce3 162642004-09-11 Marco Gerards <metgerards@student.han.nl>
16265
16266 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16267 (grub_mkimage_LDFLAGS): Likewise.
16268 (grub_emu_SOURCES): Likewise.
16269 (kernel_img_HEADERS): Added fshelp.h.
16270 * fs/ext2.c: Include <grub/fshelp.h>.
16271 (FILETYPE_REG): New macro.
16272 (FILETYPE_INO_REG): Likewise.
16273 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16274 Changed all users.
16275 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16276 all users.
16277 (grub_fshelp_node): New struct.
16278 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16279 to a pointer.
16280 (grub_ext2_get_file_block): Removed function.
16281 (grub_ext2_read_block): New function.
16282 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16283 This function was written.
16284 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16285 (grub_ext2_find_file): Removed function.
16286 (grub_ext2_read_symlink): New function.
16287 (grub_ext2_iterate_dir): Likewise.
16288 (grub_ext2_open): Rewritten.
16289 (grub_ext2_dir): Rewritten.
16290 * include/grub/fshelp.h: New file.
16291 * fs/fshelp.c: Likewise.
16292
3c52136a 162932004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16294
16295 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16296 (print_message): Add a missing newline.
16297 (run_menu): Added timeout support.
16298 (run_menu_entry): New local function.
16299 (grub_menu_run): Added support for booting.
16300
16301 * kern/loader.c (grub_loader_is_loaded): New function.
16302
16303 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16304 (grub_get_rtc): Exported.
16305
16306 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16307 (grub_get_rtc): Exported.
16308
16309 * include/grub/normal.h (struct grub_command_list): Remove
16310 constant from the member `command'.
16311
16312 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16313
16314 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16315
16316 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16317
aa033560 163182004-08-28 Marco Gerards <metgerards@student.han.nl>
16319
16320 Add support for the JFS filesystem.
16321
16322 * fs/jfs.c: New file.
16323 * include/grub/fs.h (grub_jfs_init): New prototype.
16324 (grub_jfs_fini): New prototype.
16325 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16326 (grub_emu_SOURCES): Likewise.
16327 (pkgdata_MODULES): Add jfs.mod.
16328 (jfs_mod_SOURCES): New variable.
16329 (jfs_mod_CFLAGS): Likewise.
16330 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16331 (grubof_SOURCES): Likewise.
16332 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16333
16334 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16335 endian to the host endian.
16336 (grub_fat_utf16_to_utf8): Move function from there...
16337 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 16338 the endianness of the source string anymore.
aa033560 16339 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16340
94bc45af 163412004-08-24 Marco Gerards <metgerards@student.han.nl>
16342
16343 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16344 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16345 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16346 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 16347
94bc45af 16348 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16349 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16350 for `node_found' and `it_dir'.
16351 (grub_hfs_dir): Add prototype for `dir_hook'.
16352
16353 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16354 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16355 and `indir32' to silence a gcc warning.
16356
16357 * include/grub/fs.h (grub_hfs_init): New prototype.
16358 (grub_hfs_fini): Likewise.
f19dbdb7 16359
16360
97543f08 163612004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16362
16363 Each disk device has its own id now. This is useful to make use
16364 of multiple disk devices.
f19dbdb7 16365
97543f08 16366 * include/grub/disk.h (grub_disk_dev_id): New enum.
16367 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16368 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16369
16370 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16371 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16372
16373 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16374 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16375
16376 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16377 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16378
16379 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16380 "id" which is used by the cache manager.
16381
16382 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16383 of just "GRUB".
16384
64372eb4 163852004-08-18 Marco Gerards <metgerards@student.han.nl>
16386
16387 * fs/hfs.c: New file.
16388 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16389 (grub_emu_SOURCES): Likewise.
16390 (pkgdata_MODULES): Add hfs.mod.
16391 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16392 (grubof_SOURCES): Likewise.
16393 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16394
16395 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16396 * kern/misc.c (grub_strncasecmp): Add function.
16397
cc61b58f 163982004-08-14 Marco Gerards <metgerards@student.han.nl>
16399
16400 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16401 with parentheses.
16402
16403 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16404 (grub_ext2_dir): In case the directory entry type is unknown, read
16405 it from the inode.
16406
0ef123f6 164072004-08-02 Peter Bruin <pjbruin@dds.nl>
16408
16409 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16410 grub_load_linux instead of grub_rescue_cmd_linux as second
16411 argument of grub_rescue_register_command.
16412
16413 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16414
a447c5df 164152004-07-27 Marco Gerards <metgerards@student.han.nl>
16416
16417 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16418 function.
16419 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16420 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16421 `loader/powerpc/ieee1275/linux.c',
16422 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16423 * include/grub/powerpc/ieee1275/ieee1275.h
16424 (grub_ieee1275_release): New prototype.
16425 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16426 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16427 normal, boot, linux and linux_normal.
16428 * loader/powerpc/ieee1275/linux.c: New file.
16429 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16430
5a9e3546 164312004-07-12 Marco Gerards <metgerards@student.han.nl>
16432
16433 * normal/arg.c (grub_arg_parse): Correct error handling after
16434 reallocating the argumentlist (check if `argl' is not null instead
16435 of checking if `args' is not null).
16436 * kern/mm.c (grub_realloc): Return the same pointer when using the
16437 same region, instead of returning the header address.
16438
e15199cb 164392004-07-11 Marco Gerards <metgerards@student.han.nl>
16440
16441 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16442 one block instead of two when looking for the initial partition.
16443 (grub_partition_probe): Initialize the local variable `p' with 0.
16444 Use base 10 for the grub_strtoul call.
16445 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16446 need for one local variable.
16447 (grub_strtoul): Don't add the new value to `num', instead of that
16448 just assign it.
16449
020616c2 164502004-07-11 Marco Gerards <metgerards@student.han.nl>
16451
16452 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16453 (pxeboot_img_SOURCES): New variable.
16454 (pxeboot_img_ASFLAGS): Likewise.
16455 (pxeboot_img_LDFLAGS): Likewise.
16456 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16457 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16458 <lode_leroy@hotmail.com>.
16459
6c51eb64 164602004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16461
16462 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16463 there was no input.
16464
cfb12aff 164652004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16466
16467 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16468 the history buffer logic.
16469
6eabba74 164702004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16471
16472 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16473 (FILETYPE_INO_SYMLINK): New macros.
16474 (grub_ext2_find_file): Check if the node is a directory using the
16475 inode stat information instead of using the filetype in the
16476 dirent. Exclude the first character of an absolute symlink.
16477 (grub_ext2_dir): Mask out the filetype part of the mode member of
16478 the inode.
16479
66e19ef8 164802004-05-24 Marco Gerards <metgerards@student.han.nl>
16481
16482 Add support for UFS version 1 and 2. Add support for the minix
16483 filesystem version 1 and 2, both the variants with 14 and 30 long
16484 filenames.
f19dbdb7 16485
66e19ef8 16486 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16487 fs/minix.c.
16488 (grub_emu_SOURCES): Likewise.
16489 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16490 (ufs_mod_SOURCES): New variable.
16491 (ufs_mod_CFLAGS): Likewise.
16492 (minix_mod_SOURCES): Likewise.
16493 (minix_mod_CFLAGS): Likewise.
16494 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16495 fs/minix.c.
16496 (grubof_SOURCES): Likewise.
16497 * fs/ufs.c: New file.
16498 * fs/minix.c: New file.
16499 * include/grub/fs.h (grub_ufs_init): New prototype.
16500 (grub_ufs_fini): Likewise.
16501 (grub_minix_init): Likewise.
16502 (grub_minix_fini): Likewise.
16503 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16504 minix fs.
16505
cc2e748a 165062004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16507
16508 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16509 commands/ls.c, commands/terminal.c, commands/boot.c,
16510 commands/cmp.c and commands/cat.c.
16511 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16512
16513 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16514 "env.h"
16515
4b13b216 165162004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16517
16518 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16519 and grub_, respectively. Because the conversion is trivial and
16520 mechanical, I omit the details here. Please refer to the CVS
16521 if you need more information.
16522
6a142551 165232004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16524
16525 * include/pupa: Renamed to ...
16526 * include/grub: ... this.
16527 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16528 * util/i386/pc/grub-mkimage.c: ... this.
16529 * util/i386/pc/pupa-setup.c: Renamed to ...
16530 * util/i386/pc/grub-setup.c: ... this.
16531 * util/pupa-emu.c: Renamed to ...
16532 * util/grub-emu.c: ... this.
16533
e56cdf21 165342004-03-29 Marco Gerards <metgerards@student.han.nl>
16535
16536 Add support for the newworld apple macintosh (PPC). This has been
16537 tested on the powerbook 2000 only. It only adds support for
16538 generic ieee1275 functions, console and disk support. This should
16539 be easy to port to other architectures with support for Open
16540 Firmware.
f19dbdb7 16541
e56cdf21 16542 * configure.ac: Accept the powerpc as host_cpu. In the case of
16543 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16544 specific tests are only executed while building for the i386.
16545 Inverse test for crosscompile.
16546 * genmk.rb (Utility): Allow assembler files.
16547 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16548 * conf/powerpc-ieee1275.rmk: New file.
16549 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16550 * disk/powerpc/ieee1275/partition.c: Likewise.
16551 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16552 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16553 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16554 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16555 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16556 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16557 * include/pupa/powerpc/ieee1275/loader.h
16558 * include/pupa/powerpc/setjmp.h: Likewise.
16559 * include/pupa/powerpc/types.h: Likewise.
16560 * kern/powerpc/ieee1275/init.c: Likewise.
16561 * kern/powerpc/ieee1275/openfw.c: Likewise.
16562 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16563
16564 These files were written by Johan Rydberg
16565 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 16566
e56cdf21 16567 * boot/powerpc/ieee1275/cmain.c: New file.
16568 * boot/powerpc/ieee1275/crt0.S: Likewise.
16569 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16570 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16571
8c8cc205 165722004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16573
16574 * Makefile.in: Update copyright.
16575 * genmodsrc.sh: Likewise.
16576 * gensymlist.sh: Likewise.
16577 * term/i386/pc/vga.c: Indent correctly.
16578
16579 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16580 bugreporting address.
16581 * util/i386/pc/pupa-setup.c (usage): Likewise,
16582 (main): Call pupa_ext2_init and pupa_ext2_fini.
16583
f19dbdb7 16584 * fs/fat.c (log2): Renamed to ...
8c8cc205 16585 (fat_log2): ... this.
16586 All callers changed.
16587 * kern/misc.c (memcpy): Alias to pupa_memmove.
16588 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16589 lvalue cast.
16590 * util/console.c (pupa_ncurses_fini): Return 0.
16591
16592 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16593 Move fail label here.
16594 [__GNU__]: Don't warn when using stat.
16595 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16596 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16597 long int. Use strtol instead of strtoul.
f19dbdb7 16598
db1771cf 165992004-03-14 Marco Gerards <metgerards@student.han.nl>
16600
16601 * commands/boot.c: New file.
16602 * commands/cat.c: Likewise.
16603 * commands/cmp.c: Likewise.
16604 * commands/ls.c: Likewise.
16605 * commands/terminal.c: Likewise.
16606 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16607 (pupa_register_command): Changed interface to match the new
16608 argument parser.
16609 (pupa_command_execute): Changed (almost rewritten) so it uses
16610 pupa_split_command. Added support for setting variables using the
16611 syntax `foo=bar'.
16612 (rescue_command): Changed to work with the new argument parser.
16613 (terminal_command): Moved from here to commands/terminal.c.
16614 (set_command): New function.
16615 (unset_command): New function.
16616 (insmod_command): New function.
16617 (rmmod_command): New function.
16618 (lsmod_command): New function.
16619 (pupa_command_init): Don't initialize the command terminal
16620 anymore. Initialize the commands set, unset, insmod, rmmod and
16621 lsmod.
16622 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16623 (kernel_img_HEADERS): Add arg.h and env.h.
16624 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16625 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16626 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16627 normal/arg.c.
16628 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16629 terminal.mod.
16630 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16631 (boot_mod_SOURCES): New variable.
16632 (terminal_mod_SOURCES): Likewise.
16633 (ls_mod_SOURCES): Likewise.
16634 (cmp_mod_SOURCES): Likewise.
16635 (cat_mod_SOURCES): Likewise.
16636
16637 * normal/arg.c: New file.
16638 * kern/env.c: Likewise.
16639 * include/pupa/arg.h: Likewise.
16640 * include/pupa/env.h: Likewise.
16641 * font/manager.c (font_command): Changed to match argument parsing
16642 interface changes.
16643 (PUPA_MOD_INIT): Likewise.
16644 * hello/hello.c (pupa_cmd_hello): Likewise.
16645 (PUPA_MOD_INIT): Likewise.
16646 * include/pupa/disk.h: Include <pupa/device.h>.
16647 (pupa_print_partinfo): New prototype.
16648 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16649 (pupa_dl_get_prefix): Likewise.
16650 * include/pupa/misc.h: Include <pupa/err.h>.
16651 (pupa_isgraph): New prototype.
16652 (pupa_isdigit): Likewise.
16653 (pupa_split_cmdline): Likewise.
16654 * include/pupa/normal.h: Include <pupa/arg.h>.
16655 (pupa_command): Changed the prototype of the member `func' to
16656 match the argument parsing interface. Added member `options'.
16657 (pupa_register_command): Updated to match function.
16658 (pupa_arg_parse): New prototype.
16659 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16660 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16661 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16662 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16663 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16664 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16665 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16666 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16667 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16668 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16669 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16670 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16671 * kern/disk.c: Include <pupa/file.h>.
16672 (pupa_print_partinfo): New function.
16673 * kern/dl.c: Include <pupa/env.h>.
16674 (pupa_dl_dir): Variable removed.
16675 (pupa_dl_load): Use the environment variable `prefix' instead of
16676 the variable pupa_dl_dir.
16677 (pupa_dl_set_prefix): Function removed.
16678 (pupa_dl_get_prefix): Likewise.
16679 * kern/i386/pc/init.c: Include <pupa/env.h>.
16680 (pupa_machine_init): Use the environment variable `prefix' instead of
16681 using pupa_dl_set_prefix to set the prefix.
16682 * kern/main.c: Include <pupa/env.h>.
16683 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16684 using pupa_dl_get_prefix to get the prefix.
16685 * kern/misc.c: Include <pupa/env.h>.
16686 (pupa_isdigit): New function.
16687 (pupa_isgraph): Likewise.
16688 (pupa_ftoa): Likewise.
16689 (pupa_vsprintf): Added support for printing values of the type
16690 `double'. Make it possible to format variable output when using
16691 formatting like `%1.2%f'.
16692 (pupa_split_cmdline): New function.
16693 * kern/rescue.c: Include <pupa/env.h>.
16694 (next_word): Removed function.
16695 (pupa_rescue_cmd_prefix): Likewise.
16696 (pupa_rescue_cmd_set): New function.
16697 (pupa_rescue_cmd_unset): New function.
16698 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16699 split the command line instead of splitting it here. Added
16700 support for setting variables using the syntax `foo=bar'. Don't
16701 initialize the prefix command anymore. Initialized the set and
16702 unset commands.
16703 * normal/cmdline.c: Include <pupa/env.h>.
16704 (pupa_tab_complete): Added prototypes for print_simple_completion,
16705 print_partition_completion, add_completion, iterate_commands,
16706 iterate_dev, iterate_part and iterate_dir. Moved code to print
16707 partition information from here to kern/disk.c.
fe6b695a 16708 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 16709 * normal/main.c: Include <pupa/env.h>.
16710 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16711 instead of using pupa_dl_get_prefix to get the prefix.
16712 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16713 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16714 warning.
16715 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16716 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16717 ((unused))' to silence a gcc warning.
16718 (pupa_vga_setcolor): Likewise.
16719 (debug_command): Changed to match argument parsing
16720 interface changes.
16721 * util/pupa-emu.c: Include <pupa/env.h>.
16722 (options): Added 0's for unused fields to silence a gcc warning.
16723 (argp): Likewise.
16724 (main): Use the environment variable `prefix' instead of using
16725 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16726 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16727 and terminal.
16728
16729 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16730 * util/misc.c: Include <malloc.h>.
16731 (pupa_malloc): Rewritten so errors are correctly reported.
16732 (pupa_realloc): Likewise.
16733 (pupa_memalign): Likewise.
16734 (pupa_mm_init_region): Declare unused variables with
16735 `__attribute__ ((unused))' to silence a gcc warning.
16736 * normal/i386/setjmp.S: Remove tab at the end of the file to
16737 silence a gcc warning.
16738 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16739 variables with `__attribute__ ((unused))' to silence a gcc
16740 warning.
16741 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16742 local variable i unsigned to silence a gcc warning.
16743
16744 * kern/term.c: Include <pupa/misc.h>.
16745 (pupa_more_lines): New variable.
16746 (pupa_more): Likewise.
16747 (pupa_putcode): When the pager is active pause at the end of every
16748 screen.
16749 (pupa_set_more): New function.
16750 * include/pupa/term.h (pupa_set_more): New prototype.
16751
16752
3b1139cb 167532004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16754
16755 Now this project is GRUB 2 rather than PUPA. The location of
16756 the CVS repository was moved to GRUB's.
f19dbdb7 16757
3b1139cb 16758 * configure.ac: Use bug-grub as the reporting address.
16759 Use GRUB instead of PUPA.
16760 Change the version number to 1.90.
16761
8367695c 167622004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16763
16764 * genkernsyms.sh: Updated copyright information.
16765 * genmk.rb: Likewise.
16766 * genmodsrc.sh: Likewise.
16767 * gensymlist.sh: Likewise.
16768 * boot/i386/pc/boot.S: Likewise.
16769 * boot/i386/pc/diskboot.S: Likewise.
16770 * disk/i386/pc/biosdisk.c: Likewise.
16771 * disk/i386/pc/partition.c: Likewise.
16772 * font/manager.c: Likewise.
16773 * fs/ext2.c: Likewise.
16774 * fs/fat.c: Likewise.
16775 * include/pupa/boot.h: Likewise.
16776 * include/pupa/device.h: Likewise.
16777 * include/pupa/disk.h: Likewise.
16778 * include/pupa/dl.h: Likewise.
16779 * include/pupa/elf.h: Likewise.
16780 * include/pupa/err.h: Likewise.
16781 * include/pupa/file.h: Likewise.
16782 * include/pupa/font.h: Likewise.
16783 * include/pupa/fs.h: Likewise.
16784 * include/pupa/kernel.h: Likewise.
16785 * include/pupa/loader.h: Likewise.
16786 * include/pupa/misc.h: Likewise.
16787 * include/pupa/mm.h: Likewise.
16788 * include/pupa/net.h: Likewise.
16789 * include/pupa/normal.h: Likewise.
16790 * include/pupa/rescue.h: Likewise.
16791 * include/pupa/setjmp.h: Likewise.
16792 * include/pupa/symbol.h: Likewise.
16793 * include/pupa/term.h: Likewise.
16794 * include/pupa/types.h: Likewise.
16795 * include/pupa/i386/setjmp.h: Likewise.
16796 * include/pupa/i386/types.h: Likewise.
16797 * include/pupa/i386/pc/biosdisk.h: Likewise.
16798 * include/pupa/i386/pc/boot.h: Likewise.
16799 * include/pupa/i386/pc/console.h: Likewise.
16800 * include/pupa/i386/pc/init.h: Likewise.
16801 * include/pupa/i386/pc/kernel.h: Likewise.
16802 * include/pupa/i386/pc/linux.h: Likewise.
16803 * include/pupa/i386/pc/loader.h: Likewise.
16804 * include/pupa/i386/pc/memory.h: Likewise.
16805 * include/pupa/i386/pc/multiboot.h: Likewise.
16806 * include/pupa/i386/pc/partition.h: Likewise.
16807 * include/pupa/i386/pc/time.h: Likewise.
16808 * include/pupa/i386/pc/vga.h: Likewise.
16809 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16810 * include/pupa/util/getroot.h: Likewise.
16811 * include/pupa/util/misc.h: Likewise.
16812 * include/pupa/util/resolve.h: Likewise.
16813 * kern/device.c: Likewise.
16814 * kern/disk.c: Likewise.
16815 * kern/dl.c: Likewise.
16816 * kern/err.c: Likewise.
16817 * kern/file.c: Likewise.
16818 * kern/fs.c: Likewise.
16819 * kern/loader.c: Likewise.
16820 * kern/main.c: Likewise.
16821 * kern/misc.c: Likewise.
16822 * kern/mm.c: Likewise.
16823 * kern/rescue.c: Likewise.
16824 * kern/term.c: Likewise.
16825 * kern/i386/dl.c: Likewise.
16826 * kern/i386/pc/init.c: Likewise.
16827 * kern/i386/pc/lzo1x.S: Likewise.
16828 * kern/i386/pc/startup.S: Likewise.
16829 * loader/i386/pc/chainloader.c: Likewise.
16830 * loader/i386/pc/linux.c: Likewise.
16831 * loader/i386/pc/multiboot.c: Likewise.
16832 * normal/cmdline.c: Likewise.
16833 * normal/command.c: Likewise.
16834 * normal/main.c: Likewise.
16835 * normal/menu.c: Likewise.
16836 * normal/i386/setjmp.S: Likewise.
16837 * term/i386/pc/console.c: Likewise.
16838 * term/i386/pc/vga.c: Likewise.
16839 * util/console.c: Likewise.
16840 * util/genmoddep.c: Likewise.
16841 * util/misc.c: Likewise.
16842 * util/pupa-emu.c: Likewise.
16843 * util/resolve.c: Likewise.
16844 * util/unifont2pff.rb: Likewise.
16845 * util/i386/pc/biosdisk.c: Likewise.
16846 * util/i386/pc/getroot.c: Likewise.
16847 * util/i386/pc/pupa-mkimage.c: Likewise.
16848 * util/i386/pc/pupa-setup.c: Likewise.
16849
e6eced71 168502004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16851
16852 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16853 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16854 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16855 reading and reset it after reading.
16856 (pupa_ext2_close): Return PUPA_ERR_NONE.
16857
16858 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16859 Correct value.
16860 (struct linux_kernel_header): Add kernel_version and
16861 initrd_addr_max.
16862 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16863 pupa_file_read succeeds.
16864 (pupa_rescue_cmd_initrd): Implement.
16865
5aded270 168662003-12-03 Marco Gerards <metgerards@student.han.nl>
16867
16868 * fs/ext2.c (pupa_ext2_label): New function.
16869 (pupa_ext2_fs): Added label.
16870 * fs/fat.c (pupa_fat_label): New function.
16871 (pupa_fat_fs): Added label.
16872 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16873
16874 * kern/misc.c (pupa_strndup): New function.
16875 * include/pupa/misc.h (pupa_strndup): New prototype.
16876
16877 * include/pupa/normal.h: Include <pupa/err.h>.
16878 (pupa_set_history): New prototype.
16879 (pupa_iterate_commands): New prototype.
16880 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16881 <pupa/disk.h>, <pupa/file.h>.
16882 (hist_size): New variable.
16883 (hist_lines): Likewise.
16884 (hist_end): Likewise.
16885 (hist_used): Likewise.
16886 (pupa_set_history): New function.
16887 (pupa_history_get): Likewise.
16888 (pupa_history_add): Likewise.
16889 (pupa_history_replace): Likewise.
16890 (pupa_tab_complete): Likewise.
16891 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16892 completion shows partitionnames while completing partitions, this
16893 feature was suggested by Jeff Bailey.
16894 * normal/command.c (pupa_iterate_commands): New function.
16895 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16896 (pupa_normal_init): Initialize history buffer.
16897 (PUPA_MOD_INIT): Likewise.
16898 (pupa_normal_fini): Free the history buffer.
16899 (PUPA_MOD_FINI): Likewise.
16900
16901 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16902 key.
16903
16904 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16905 * configure.ac [i386]: Check for regparam bug.
16906 (NESTED_FUNC_ATTR) [! i386]: Defined.
16907
1f7315a3 169082003-11-17 Marco Gerards <metgerards@student.han.nl>
16909
16910 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16911 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16912 (pupa_emu_SOURCES): New variable.
16913 (pupa_emu_LDFLAGS): Likewise.
16914 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16915 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16916 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16917 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16918 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16919 (pupa_jmp_buf): New typedef.
16920 (pupa_setjmp) [PUPA_UTIL]: New macro.
16921 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16922 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16923 (pupa_refresh): New prototype.
16924 * include/pupa/util/getroot.h: New file.
16925 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16926 it.
16927 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16928 (pupa_rescue_cmd_cat): Likewise.
16929 (pupa_rescue_cmd_ls): Likewise.
16930 (pupa_rescue_cmd_testload): Likewise.
16931 (pupa_rescue_cmd_lsmod): Likewise.
16932 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16933 * normal/menu.c (run_menu): Likewise.
16934 * kern/term.c (pupa_cls): Likewise.
16935 (pupa_refresh): New function.
16936 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16937 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16938 * util/console.c: New file.
f19dbdb7 16939
1f7315a3 16940 * util/i386/pc/getroot.c: New file.
16941 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16942 (pupa_putchar): New function.
16943 (pupa_refresh): Likewise.
16944 (xgetcwd): Function moved to ...
16945 (strip_extra_slashes): Likewise.
16946 (get_prefix): Likewise.
f19dbdb7 16947 * util/i386/pc/getroot.c: ... here.
1f7315a3 16948 (find_root_device): Function moved and renamed to...
16949 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16950 Changed all callers.
16951 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16952 and renamed to...
16953 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16954 Changed all callers.
16955 * util/misc.c (pupa_memalign): New function.
16956 (pupa_mm_init_region): Likewise.
16957 (pupa_register_exported_symbols): Likewise.
16958 (pupa_putchar): Function removed.
16959 * util/pupa-emu.c: New file.
16960
9a5c1ade 169612003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16962
16963 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16964 (_multiboot_mod_SOURCES): New variable.
16965 (_multiboot_mod_CFLAGS): Likewise.
16966 * loader/i386/pc/multiboot.c: New file.
16967 * include/pupa/i386/pc/multiboot.h: Likewise.
16968 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16969 (pupa_multiboot_real_boot): New function.
16970 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16971 (pupa_multiboot_real_boot): New prototype.
16972 (pupa_rescue_cmd_multiboot): Likewise
16973 (pupa_rescue_cmd_module): Likewise.
16974
16975 * kern/loader.c (pupa_loader_set): Continue when
16976 pupa_loader_unload_func() fails.
16977 (pupa_loader_unset): New function.
16978 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16979
16980 * kern/misc.c (pupa_stpcpy): New function.
16981 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16982
8e72a9c0 169832003-11-12 Marco Gerards <metgerards@student.han.nl>
16984
16985 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16986 for available extensions.
16987
16988 * include/pupa/i386/pc/time.h: New file.
16989 * kern/disk.c: Include <pupa/machine/time.h>.
16990 (PUPA_CACHE_TIMEOUT): New macro.
16991 (pupa_last_time): New variable.
16992 (pupa_disk_open): Flush the cache when there was a timeout.
16993 (pupa_disk_close): Reset the timer.
16994 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16995 pupa_currticks.
16996 * util/misc.c: Include <sys/times.h>
16997 (pupa_get_rtc): New function.
16998
c4adbd32 169992003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17000
17001 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17002 as blocks.
17003 (pupa_ext2_get_file_block): Use blocks member.
17004
17005 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17006 first block. Return -1 instead of pupa_errno on error.
17007
bfd30f06 170082003-10-27 Marco Gerards <metgerards@student.han.nl>
17009
17010 * README: In the pupa-mkimage example use _chain instead of chain
17011 and ext2 instead of fat.
17012 * TODO: Replace ext2fs with jfs as an example. Add an item for
17013 adding journal playback for ext2fs.
17014 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17015 (pkgdata_MODULES): Added ext2.mod.
17016 (ext2_mod_SOURCES): New variable.
17017 (ext2_mod_CFLAGS): Likewise.
17018 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17019 * include/pupa/misc.h (pupa_strncpy): New prototype.
17020 (pupa_strcat): Likewise.
17021 (pupa_strncmp): Likewise.
17022 * kern/misc.c (pupa_strcat): Enable function.
17023 (pupa_strncpy): New function.
17024 (pupa_strncmp): Likewise.
17025 * fs/ext2.c: New file.
f19dbdb7 17026
bfd30f06 17027 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17028 when the read failed before retrying.
17029 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17030 (_FILE_OFFSET_BITS): Likewise.
17031 * configure.ac: Added AC_SYS_LARGEFILE.
17032
98d15063 170332003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17034
17035 * genmk.rb (PModule#rule): Make sure to get only symbol names
17036 from the output of nm.
17037 Reported by Robert Millan <zeratul2@wanadoo.es>.
17038
18d9c7cd 170392003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17040
17041 I forgot to check in these changes for a long time. This adds
17042 incomplete support for VGA console, and this is still very
17043 buggy. Also, a lot of consideration is required for I18N,
17044 UNICODE, and VGA font issues. Therefore, assume that this is
17045 such that "better than nothing".
f19dbdb7 17046
18d9c7cd 17047 * font/manager.c: New file.
17048 * include/pupa/font.h: Likewise.
17049 * include/pupa/i386/pc/vga.h: Likewise.
17050 * term/i386/pc/vga.c: Likewise.
17051 * util/unifont2pff.rb: Likewise.
17052
17053 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17054 (pkgdata_MODULES): Added vga.mod and font.mod.
17055 (vga_mod_SOURCES): New variables.
17056 (vga_mod_CFLAGS): Likewise.
17057 (font_mod_SOURCES): Likewise.
17058 (font_mod_CFLAGS): Likewise.
17059
17060 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17061
17062 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 17063 (struct pupa_term): Added init and fini.
18d9c7cd 17064 Changed the argument of putchar to pupa_uint32_t.
17065
17066 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17067 (pupa_console_real_putchar): New prototype.
17068 (pupa_console_putchar): Removed.
17069 (pupa_console_checkkey): Exported.
17070 (pupa_console_getkey): Likewise.
17071
17072 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17073 characters.
17074
17075 * kern/term.c (pupa_term_set_current): Rewritten.
17076 (pupa_putchar): Likewise.
17077 (pupa_putcode): New function.
17078
17079 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17080 (pupa_console_real_putchar): ... this.
17081 (pupa_vga_set_mode): New function.
17082 (pupa_vga_get_font): Likewise.
17083
17084 * normal/command.c: Include pupa/term.h.
17085 (terminal_command): New function.
17086 (pupa_command_init): Register the command "terminal".
17087
17088 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17089 (DISP_UP): Likewise.
17090 (DISP_RIGHT): Likewise.
17091 (DISP_DOWN): Likewise.
17092 (DISP_HLINE): Likewise.
17093 (DISP_VLINE): Likewise.
17094 (DISP_UL): Likewise.
17095 (DISP_UR): Likewise.
17096 (DISP_LL): Likewise.
17097 (DISP_LR): Likewise.
17098
17099 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 17100
977329f5 171012003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17102
17103 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17104 FIX. Reverse the path_list.
17105
17106 * include/pupa/normal.h: Export pupa_register_command and
17107 pupa_unregister_command.
17108
17109 * hello/hello.c (pupa_cmd_hello): New module.
17110 * conf/i386-pc.rmk: Added hello.mod.
17111
1f5ab428 171122003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17113
17114 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 17115
1f5ab428 17116 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17117 (compress_kernel): New variable.
17118 (generate_image): Heavily modified to support compressing a
17119 large part of the core image.
17120
17121 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17122 leak.
17123 (pupa_util_load_image): New function.
17124
17125 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17126 (pupa_compressed_size): New variable.
17127 (codestart): Enable Gate A20 here.
17128 Decompress the compressed part of the core image.
17129 Rearrange the code to put functions and variables which are
17130 required for initialization in the non-compressed part.
17131 Include lzo1x.S.
17132
17133 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17134 here.
17135
17136 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17137
f19dbdb7 17138 * include/pupa/i386/pc/kernel.h
1f5ab428 17139 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17140 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17141 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17142 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17143 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17144
17145 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17146
17147 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17148 (Utility#rule): Likewise.
17149
17150 * configure.ac: Check if LZO is available.
17151
ce5bf700 171522003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17153
17154 * include/pupa/normal.h: New file.
17155 * include/pupa/setjmp.h: Likewise.
17156 * include/pupa/i386/setjmp.h: Likewise.
17157 * normal/cmdline.c: Likewise.
17158 * normal/command.c: Likewise.
17159 * normal/main.c: Likewise.
17160 * normal/menu.c: Likewise.
17161 * normal/i386/setjmp.S: Likewise.
f19dbdb7 17162
ce5bf700 17163 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17164 (pupa_rescue_cmd_initrd): Likewise.
17165
17166 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17167 Likewise.
17168
17169 * kern/i386/pc/startup.S (translation_table): New variable.
17170 (translate_keycode): New function.
17171 (pupa_console_getkey): Call translate_keycode.
17172
17173 * kern/rescue.c (attempt_normal_mode): New function.
17174 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17175 it failed, print a message.
17176
17177 * kern/mm.c (pupa_real_malloc): Print more information when a
17178 free magic is broken.
17179 (pupa_free): If the first free header is not free actually, set
17180 it to P.
17181
17182 * kern/main.c (pupa_load_normal_mode): Just load the module
17183 "normal".
17184 (pupa_main): Don't print the message
17185 "Entering into rescue mode..." here.
17186
17187 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17188 Declared.
17189 (pupa_rescue_cmd_initrd): Likewise.
17190 (pupa_rescue_cmd_initrd): Likewise.
17191
17192 * include/pupa/symbol.h (FUNCTION): Specify the type.
17193 (VARIABLE): Likewise.
17194
17195 * include/pupa/err.h (pupa_err_t): Added
17196 PUPA_ERR_UNKNOWN_COMMAND.
17197
17198 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17199 (pupa_dl_get_prefix): Likewise.
17200
17201 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17202 Added _chain.mod and _linux.mod instead of chain.mod and
17203 linux.mod.
17204 (chain_mod_SOURCES): Renamed to ...
17205 (_chain_mod_SOURCES): ... this.
17206 (chain_mod_CFLAGS): Renamed to ...
17207 (_chain_mod_CFLAGS): ... this.
17208 (linux_mod_SOURCES): Renamed to ...
17209 (_linux_mod_SOURCES): ... this.
17210 (linux_mod_CFLAGS): Renamed to ...
17211 (_linux_mod_CFLAGS): ... this.
17212 (normal_mod_SOURCES): New variable.
17213 (normal_mod_CFLAGS): Likewise.
17214 (normal_mod_ASFLAGS): Likewise.
17215
172162003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17217
17218 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17219 possible.
17220
fe6b695a 17221 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 17222 recursively.
17223 (pupa_dl_unref): Unrefer depending modules recursively.
17224 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17225 a module is unloaded before one depending on that module is
17226 unloaded.
17227 (pupa_dl_unload): Unload depending modules explicitly,
17228 if possible.
17229
c04da074 172302003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17231
17232 * include/pupa/i386/pc/linux.h: New file.
17233 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 17234
c04da074 17235 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17236 Removed.
17237 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17238 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17239 of PUPA_CHAINLOADER_BOOT_SECTOR.
17240
17241 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17242 (pupa_linux_prot_size): New variable.
17243 (pupa_linux_tmp_addr): Likewise.
17244 (pupa_linux_real_addr): Likewise.
17245 (pupa_linux_boot_zimage): New function.
17246 (pupa_linux_boot_bzimage): Likewise.
17247
17248 * kern/i386/pc/init.c (struct mem_region): New structure.
17249 (MAX_REGIONS): New macro.
17250 (mem_regions): New variable.
17251 (num_regions): Likewise.
17252 (pupa_os_area_addr): Likewise.
17253 (pupa_os_area_size): Likewise.
17254 (pupa_lower_mem): Likewise.
17255 (pupa_upper_mem): Likewise.
17256 (add_mem_region): New function.
17257 (compact_mem_regions): Likewise.
17258 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17259 the size of the conventional memory and that of so-called upper
17260 memory (before the first memory hole).
17261 Instead of adding each found region to free memory, use
17262 add_mem_region and add them after removing overlaps.
17263 Also, add only 1/4 of the upper memory to free memory. The rest
17264 is used for loading OS images. Maybe this is ad hoc, but this
17265 makes it much easier to relocate OS images when booting.
17266
17267 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17268 (pupa_enter_rescue_mode): Don't register initrd and module.
17269
17270 * kern/mm.c: Include pupa/dl.h.
17271
17272 * kern/main.c: Include pupa/file.h and pupa/device.h.
17273
17274 * kern/loader.c (pupa_loader_load_module_func): Removed.
17275 (pupa_loader_load_module): Likewise.
17276
17277 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17278 ``.o''.
17279
17280 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17281 (pupa_linux_tmp_addr): Likewise.
17282 (pupa_linux_real_addr): Likewise.
17283 (pupa_linux_boot_zimage): Likewise.
17284 (pupa_linux_boot_bzimage): Likewise.
17285
17286 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17287 (pupa_upper_mem): Likewise.
17288 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17289 module is too dangerous.
17290
17291 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17292 (pupa_os_area_size): Likewise.
17293 (pupa_loader_set): Remove the first argument. Loader doesn't
17294 manage modules or initrd any longer.
17295 (pupa_loader_load_module): Removed.
17296
17297 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17298 (linux_mod_SOURCES): New variable.
17299 (linux_mod_CFLAGS): Likewise.
17300
a13f9237 173012003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17302
17303 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17304 the length of a blocklist correctly.
17305
17306 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17307 Use ioctl only if the OS file is a block device.
17308 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17309 not very useful for normal files.
17310
17311 * kern/main.c (pupa_set_root_dev): New function.
17312 (pupa_load_normal_mode): Likewise.
17313 (pupa_main): Call those above.
17314
17315 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17316 pupa_uint16_t.
17317
17318 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17319
a5ffe966 173202003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17321
17322 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17323 (setup): Configure the installed partition information and the
17324 dl prefix.
17325
17326 * loader/i386/pc/chainloader.c (my_mod): New variable.
17327 (pupa_chainloader_unload): New function.
17328 (pupa_rescue_cmd_chainloader): Refer itself.
17329 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17330
17331 * kern/i386/pc/startup.S (install_partition): Removed.
17332 (version_string): Likewise.
17333 (config_file): Likewise.
17334 (pupa_install_dos_part): New variable.
17335 (pupa_install_bsd_part): Likewise.
17336 (pupa_prefix): Likewise.
17337 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17338
17339 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17340 and pupa/misc.h.
17341 (make_install_device): New function.
17342 (pupa_machine_init): Set the dl prefix.
17343
17344 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17345 (buf): Renamed to ...
17346 (linebuf): ... this.
17347 (pupa_rescue_cmd_prefix): New function.
17348 (pupa_rescue_cmd_insmod): Likewise.
17349 (pupa_rescue_cmd_rmmod): Likewise.
17350 (pupa_rescue_cmd_lsmod): Likewise.
17351 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17352 rmmod and lsmod.
17353
17354 * kern/mm.c (pupa_memalign): If failed even after invalidating
17355 disk caches, unload unneeded modules and retry.
17356
17357 * kern/misc.c (pupa_memmove): New function.
17358 (pupa_memcpy): Removed.
17359 (pupa_strcpy): New function.
17360 (pupa_itoa): Made static.
17361
17362 * kern/dl.c (pupa_dl_iterate): New function.
17363 (pupa_dl_ref): Likewise.
17364 (pupa_dl_unref): Likewise.
17365 (pupa_dl_unload): Return if succeeded or not.
17366 (pupa_dl_unload_unneeded): New function.
17367 (pupa_dl_unload_all): Likewise.
17368 (pupa_dl_init): Renamed to ...
17369 (pupa_dl_set_prefix): ... this.
17370 (pupa_dl_get_prefix): New function.
17371
17372 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17373 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17374 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17375 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17376 (pupa_install_dos_part): Declared.
17377 (pupa_install_bsd_part): Likewise.
17378 (pupa_prefix): Likewise.
17379 (pupa_boot_drive): Likewise.
17380
17381 * include/pupa/types.h: Fix a typo.
17382
17383 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17384 pupa_memmove.
17385 (pupa_memmove): Declared.
17386 (pupa_strcpy): Likewise.
17387
17388 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17389 pupa_mod_init takes one argument, its own module.
17390 (pupa_dl_unload_unneeded): Declared.
17391 (pupa_dl_unload_all): Likewise.
17392 (pupa_dl_ref): Likewise.
17393 (pupa_dl_unref): Likewise.
17394 (pupa_dl_iterate): Likewise.
17395 (pupa_dl_init): Renamed to ...
17396 (pupa_dl_set_prefix): ... this.
17397 (pupa_dl_get_prefix): Declared.
17398
17399 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 17400 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 17401 unloaded.
17402 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17403 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17404
17405 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17406 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17407
012d7999 174082003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17409
17410 * util/i386/pc/pupa-setup.c (setup): Define the internal
17411 function find_first_partition_start at the top level, because GCC
17412 3.0.x cannot compile internal functions in deeper scopes
17413 correctly.
17414 (find_root_device): Use lstat instead of stat.
17415 Don't follow symbolic links.
17416 Fix the path-constructing code.
17417
17418 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17419 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17420 by a BLKGETSIZE ioctl first, because block devices don't fill
17421 the member st_mode of the structure stat on Linux.
17422 [__linux__] (linux_find_partition): Use a temporary buffer
17423 REAL_DEV for the working space. Copy it to DEV before returning.
17424 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17425 buffer cache consistent.
17426 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17427 strncmp. The previous value was merely wrong.
17428 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17429
17430 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17431 FAT size is 12. The previous value was merely wrong.
17432
17433 * kern/main.c (pupa_main): Don't split the starting message from
17434 newlines.
17435
17436 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17437 LF, because BIOS goes crazy about character attributes in this
17438 case.
17439
1cc73a62 174402003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17441
17442 * include/i386/pc/util/biosdisk.h: New file.
17443 * util/i386/pc/biosdisk.c: Likewise.
17444 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 17445
1cc73a62 17446 * Makefile.in (INCLUDE_DISTFILES): Added
17447 include/pupa/i386/pc/util/biosdisk.h.
17448 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17449 directory util/i386/pc.
17450 (install-local): Added a rule for sbin_UTILITIES.
17451 (uninstall): Likewise.
17452
17453 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17454
17455 * util/misc.c (xrealloc): New function.
17456 (pupa_malloc): Likewise.
17457 (pupa_free): Likewise.
17458 (pupa_realloc): Likewise.
17459 (pupa_stop): Likewise.
17460 (pupa_putchar): Likewise.
17461
17462 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17463
17464 * include/pupa/util/misc.h (xrealloc): Declared.
17465
17466 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17467 macro.
17468 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17469 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17470
17471 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17472 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17473
17474 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17475 way should be implemented.
17476 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17477
17478 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17479 the size of NAME for safety.
17480 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17481 0x88.
17482
17483 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17484 (pupa_setup_SOURCES): Likewise.
17485
17486 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17487
08b70fe8 174882002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17489
17490 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17491 bunch of pushl's from pusha, because this destroys the return
17492 value.
17493
62ddcc8f 174942002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17495
17496 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17497 This means that any missing prototypes could be fatal. Also, you
17498 must take care when writing assembly code. See the comments at
17499 the beginning of startup.S, for more details.
f19dbdb7 17500
62ddcc8f 17501 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17502 compilation mechanism.
17503 (pupa_chainloader_real_boot): Likewise.
17504 (pupa_biosdisk_rw_int13_extensions): Likewise.
17505 (pupa_biosdisk_rw_standard): Likewise.
17506 (pupa_biosdisk_check_int13_extensions): Likewise.
17507 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17508 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17509 (pupa_get_memsize): Likewise.
17510 (pupa_get_mmap_entry): Likewise.
17511 (pupa_console_putchar): Likewise.
17512 (pupa_console_setcursor): Likewise.
17513 (pupa_getrtsecs): Use pushl instead of push.
17514
17515 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17516 memory instead of the stack for a mmap entry, because some
17517 BIOSes may ignore the maximum size and overflow.
17518
17519 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17520
17521 * genmk.rb (PModule#rule): Compile automatically generated
17522 sources with module-specific CFLAGS as well as other sources.
17523
9962ed99 175242002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17525
17526 * configure.ac: Check ld.
17527 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17528 respectively, before checking endianness and sizes.
17529
17530 * Makefile.in (LD): New variable.
f19dbdb7 17531
abdfc3c5 175322002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17533
17534 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17535
6a161fa9 175362002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17537
17538 * Changelog: New file.
17539