1 2008-06-15 Robert Millan <rmh@aybabtu.com>
3 * util/grub.d/10_linux.in: Use the underliing device for loop-AES
5 Reported by Max Vozeler.
7 2008-06-15 Robert Millan <rmh@aybabtu.com>
9 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
10 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
12 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
13 the beginning of the prefix.
15 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
16 It is assumed that if we have a memdisk, grub-mkimage has set
17 grub_prefix to include the "(memdisk)" drive in it.
19 2008-06-15 Robert Millan <rmh@aybabtu.com>
21 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
22 Initialize keyboard controller after registering the terminal, so that
23 grub_printf() can be called from grub_keyboard_controller_init().
25 2008-06-15 Robert Millan <rmh@aybabtu.com>
27 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
28 extent-btree which is written as big endian on disk.
29 Reported by Alain Greppin <al@chilibi.org>.
31 2008-06-14 Robert Millan <rmh@aybabtu.com>
33 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
34 * util/i386/pc/grub-install.in (modules): Likewise.
36 2008-06-13 Pavel Roskin <proski@gnu.org>
38 * commands/ls.c (grub_ls_list_files): Fix format warnings.
40 2008-06-13 Bean <bean123ch@gmail.com>
42 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
44 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
46 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
47 to indicate sparse block.
49 2008-06-12 Pavel Roskin <proski@gnu.org>
51 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
52 number, grub_fshelp_read() does it for us.
54 * fs/fshelp.c (grub_fshelp_read): New function. Implement
55 linear disk read with journal translation.
56 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
57 * include/grub/fshelp.h: Declare grub_fshelp_read().
59 2008-06-09 Pavel Roskin <proski@gnu.org>
61 * fs/minix.c (grub_minix_mount): Handle error reading
64 2008-06-08 Robert Millan <rmh@aybabtu.com>
66 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
67 don't append the RAID prefix afterwards.
68 Reported by Clint Adams.
70 2008-06-08 Robert Millan <rmh@aybabtu.com>
72 Based on description from Pavel:
73 * kern/disk.c (grub_disk_check_range): Rename to ...
74 (grub_disk_adjust_range): ... this. Add a comment explaining the
75 tasks performed by this function.
77 2008-06-08 Robert Millan <rmh@aybabtu.com>
79 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
80 `num_serial' (for consistency with other variables).
81 (struct grub_ntfs_data): Add `uuid' member.
82 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
83 (grub_ntfs_uuid): New function.
84 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
86 2008-06-07 Pavel Roskin <proski@gnu.org>
88 * util/biosdisk.c (open_device): Revert last change to the
89 function, it broke installation. The sector needs to be
90 different dependent on which device is opened.
92 2008-06-06 Robert Millan <rmh@aybabtu.com>
94 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
95 rest of GRUB, and breakage doesn't happen if its value were modified.
97 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
98 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
99 a constant (same value).
100 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
101 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
103 2008-06-06 Robert Millan <rmh@aybabtu.com>
105 * util/biosdisk.c (open_device): Do not modify sector offset when
106 accessing a partition. kern/disk.c already handles this for us.
108 2008-06-06 Robert Millan <rmh@aybabtu.com>
110 * util/grub-emu.c (grub_machine_init): Move code in this function from
112 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
113 segfault in case grub_printf() is called).
115 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
116 grub_probe. Update all users not to explicitly add it again.
117 (grub_device): New variable; contains corresponding device for grubdir.
118 (fs_module, partmap_module, devabstraction_module): Pass
119 `--device ${grub_device}' to grub_probe to avoid traversing /dev
122 2008-06-05 Robert Millan <rmh@aybabtu.com>
124 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
125 is found, print it (same layout as with labels).
127 2008-06-04 Robert Millan <rmh@aybabtu.com>
129 * util/biosdisk.c (get_drive): Rename to ...
130 (find_grub_drive): ... this. Update all users.
132 (get_os_disk): Rename to ...
133 (convert_system_partition_to_system_disk): ... this. Update all users.
135 (find_drive): Rename to ...
136 (find_system_device): ... this. Update all users.
138 2008-06-04 Robert Millan <rmh@aybabtu.com>
140 * util/biosdisk.c (get_os_disk): Handle IDA devices.
141 * util/grub-mkdevicemap.c (get_mmc_disk_name)
142 (make_device_map): Likewise.
144 2008-06-01 Robert Millan <rmh@aybabtu.com>
146 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
147 before dereferencing it.
149 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
150 union with fat12/fat16-specific ones. Add some new fields, including
151 `num_serial' for both versions.
152 (struct grub_fat_data): Add `uuid' member.
153 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
154 names. Initialize `data->uuid' using `num_serial'.
155 (grub_fat_uuid): New function.
156 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
158 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
159 (grub_reiserfs_uuid): New function.
160 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
163 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
164 (grub_xfs_uuid): New function.
165 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
167 2008-06-01 Robert Millan <rmh@aybabtu.com>
169 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
170 code that is backward compatible with pre-uuid search command.
172 2008-05-31 Robert Millan <rmh@aybabtu.com>
174 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
175 floppies after everything else, to ensure floppy drive isn't accessed
176 unnecessarily (patch from Bean).
178 2008-05-31 Robert Millan <rmh@aybabtu.com>
180 * commands/search.c (search_label, search_fs_uuid, search_file): Do
181 not print device names when we were asked to set a variable.
183 2008-05-31 Robert Millan <rmh@aybabtu.com>
185 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
186 using "cursor-on" and "cursor-off" commands (understood at least by
187 the Open Firmware flavour on OLPC).
189 2008-05-31 Michael Gorven <michael@gorven.za.net>
191 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
192 on and off sequences.
194 2008-05-31 Robert Millan <rmh@aybabtu.com>
196 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
197 * util/update-grub.in: Likewise.
199 2008-05-30 Pavel Roskin <proski@gnu.org>
201 * util/biosdisk.c (linux_find_partition): Simplify logic and
202 make the code more universal. Keep special processing for
203 devfs, but use a simple rule for all other devices. If the
204 device ends with a number, append 'p' and the partition number.
205 Otherwise, append only the partition number.
207 2008-05-30 Robert Millan <rmh@aybabtu.com>
209 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
210 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
211 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
212 the `root' parameter to Linux.
214 2008-05-30 Robert Millan <rmh@aybabtu.com>
216 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
217 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
218 --fs_uuid with --fs-uuid.
219 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
220 all filesystems support them).
222 2008-05-30 Robert Millan <rmh@aybabtu.com>
224 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
225 grub_printf() flags, since we're printing in units of 2 bytes.
227 2008-05-30 Robert Millan <rmh@aybabtu.com>
229 * util/grub.d/00_header.in: Remove obsolete comment referencing
230 convert_system_path_to_grub_path().
231 * util/update-grub.in: Likewise.
232 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
233 (convert_system_path_to_grub_path): Add a warning message explaining
234 that this function is deprecated. Rely on is_path_readable_by_grub()
235 for the readability checks.
236 (font_path): Use is_path_readable_by_grub() for the readability
237 check rather than convert_system_path_to_grub_path().
239 2008-05-30 Robert Millan <rmh@aybabtu.com>
241 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
242 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
244 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
245 grub.cfg for access to font file, and afterwards call it again to set
248 2008-05-30 Robert Millan <rmh@aybabtu.com>
250 * commands/search.c (options): Add --fs_uuid option.
251 (search_fs_uuid): New function.
252 (grub_cmd_search): Fix --set argument passing.
253 Use search_fs_uuid() when requested via --fs_uuid.
254 (grub_search_init): Update help message.
255 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
256 and redeclare it as an array of 16-bit words.
257 (grub_ext2_uuid): New function.
258 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
259 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
260 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
261 (GRUB_DEVICE_BOOT_UUID): New variables.
262 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
263 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
265 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
266 just assume `root' variable has the right value.
267 * util/grub.d/10_linux.in: Likewise.
268 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
270 (main): Recognise `-t fs_uuid' argument.
272 2008-05-30 Robert Millan <rmh@aybabtu.com>
274 * util/biosdisk.c (map): Redefine structure to hold information
275 about GRUB drive name.
276 (get_drive): Reimplement without assuming (and verifiing) BIOS-like
279 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
280 member. Assume drive has partitions.
281 (grub_util_biosdisk_open): Access device names via `.device' struct
283 (open_device): Likewise.
284 (find_drive): Likewise.
285 (read_device_map): Adjust map[] usage to match the new struct
286 definition. Don't check for duplicates (still possible, but not cheap
288 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
289 (make_device_name): Remove assumption of BIOS-like drive names.
291 2008-05-30 Pavel Roskin <proski@gnu.org>
293 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
294 compiling execute.c doesn't need grub_script.tab.h anymore.
295 (normal/command.c_DEPENDENCIES): Likewise.
296 (normal/function.c_DEPENDENCIES): Likewise.
297 * conf/i386-ieee1275.rmk: Likewise.
298 * conf/i386-linuxbios.rmk: Likewise.
299 * conf/i386-pc.rmk: Likewise.
300 * conf/powerpc-ieee1275.rmk: Likewise.
301 * conf/sparc64-ieee1275.rmk: Likewise.
303 2008-05-29 Pavel Roskin <proski@gnu.org>
305 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
306 when scanning metadata for volume group name.
308 * include/grub/script.h: Don't include grub_script.tab.h. It's
309 a generated file, which may only be included from the files with
310 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
311 use union YYSTYPE, as the later allows forward declaration.
312 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
314 2008-05-29 Robert Millan <rmh@aybabtu.com>
316 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
317 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
318 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
319 (grub_console_checkkey): Add grub_dprintf() call to report unknown
322 2008-05-29 Robert Millan <rmh@aybabtu.com>
324 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
325 control key combinations.
327 2008-05-29 Robert Millan <rmh@aybabtu.com>
329 * util/powerpc/ieee1275/grub-install.in: Move from here ...
330 * util/ieee1275/grub-install.in: ... to here.
331 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
332 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
333 (grub_install_SOURCES): Likewise.
335 2008-05-29 Robert Millan <rmh@aybabtu.com>
337 * fs/affs.c: Update copyright year.
338 * fs/ext2.c: Likewise.
339 * fs/fshelp.c: Likewise.
340 * fs/hfsplus.c: Likewise.
341 * fs/ntfs.c: Likewise.
342 * fs/xfs.c: Likewise.
343 * include/grub/fshelp.h: Likewise.
344 * util/grub-mkdevicemap.c: Likewise.
346 2008-05-28 Robert Millan <rmh@aybabtu.com>
348 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
349 might need to be fatfs to support some firmware implementations
352 2008-05-28 Robert Millan <rmh@aybabtu.com>
354 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
356 * util/grub-mkdevicemap.c (get_mmc_disk_name)
357 (make_device_map): Likewise.
359 2008-05-20 Bean <bean123ch@gmail.com>
361 * fs/fshelp.c (grub_fshelp_map_block): New function.
362 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
363 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
365 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
366 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
367 (grub_fshelp_journal): New structure.
368 (grub_fshelp_map_block): New function prototype.
369 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
370 (grub_fshelp_map_block): Likewise.
372 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
373 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
374 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
375 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
376 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
377 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
378 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
379 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
380 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
381 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
382 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
383 (grub_ext2_sblock): New members for journal support.
384 (grub_ext3_journal_header): New structure.
385 (grub_ext3_journal_revoke_header): Likewise.
386 (grub_ext3_journal_block_tag): Likewise.
387 (grub_ext3_journal_sblock): Likewise.
388 (grub_fshelp_node): New members logfile and journal.
389 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
390 grub_fshelp_map_block to get real block number.
391 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
393 (grub_ext2_read_inode): Likewise.
394 (grub_ext3_get_journal): New function.
395 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
396 (grub_ext2_close): Release memory used by journal.
398 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
399 (REISERFS_MAGIC_DESC_BLOCK): New macro.
400 (grub_reiserfs_transaction_header): Renamed to
401 grub_reiserfs_description_block, replace field data with real_blocks.
402 (grub_reiserfs_commit_block): New structure.
403 (grub_reiserfs_data): New member journal.
404 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
406 (grub_reiserfs_read_symlink): Likewise.
407 (grub_reiserfs_iterate_dir): Likewise.
408 (grub_reiserfs_open): Likewise.
409 (grub_reiserfs_read): Likewise.
410 (grub_reiserfs_get_journal): New function.
411 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
412 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
413 using grub_reiserfs_get_journal.
414 (grub_reiserfs_close): Release memory used by journal.
416 * fs/affs.c (grub_affs_read_block): Change block type to
417 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
419 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
421 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
423 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
425 * fs/udf.c (grub_udf_read_block): Change block type to
426 grub_disk_addr_t. Use type cast to avoid warning.
428 * fs/xfs.c (grub_xfs_read_block): Likewise.
430 2008-05-16 Christian Franke <franke@computer.org>
432 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
433 to ensure that break with ESC will always work.
434 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
435 Remove ESC from keyboard queue.
437 2008-05-16 Christian Franke <franke@computer.org>
439 * util/biosdisk.c: [__CYGWIN__] Add includes.
440 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
441 (get_os_disk): Move variable declarations to OS specific
442 parts to avoid warning.
443 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
444 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
445 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
447 * util/getroot.c: [__CYGWIN__] Add includes.
448 (strip_extra_slashes): Fix "/" case.
449 [__CYGWIN__] (get_win32_path): New function.
450 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
451 [__CYGWIN__] (find_root_device): Disable.
452 [__CYGWIN__] (get_bootsec_serial): New function.
453 [__CYGWIN__] (find_cygwin_root_device): Likewise.
454 [__linux__] (grub_guess_root_device): Add early returns to simplify
456 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
457 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
458 check for Linux only.
460 2008-05-15 Bean <bean123ch@gmail.com>
462 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
463 keyboard hang problem in apple's intel mac.
465 2008-05-09 Robert Millan <rmh@aybabtu.com>
467 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
469 * util/grub-mkdevicemap.c (get_virtio_disk_name)
470 (make_device_map): Likewise.
471 Reported by Aurelien Jarno <aurel32@debian.org>
473 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
475 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
476 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
477 (make_device_map): Output entries for xvd type disks.
479 2008-05-07 Robert Millan <rmh@aybabtu.com>
481 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
483 * util/grub-mkdevicemap.c (get_cciss_disk_name)
484 (make_device_map): Likewise.
485 Reported by Roland Dreier <rdreier@cisco.com>
487 2008-05-07 Robert Millan <rmh@aybabtu.com>
489 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
490 grub_strstr() call. Correct a few mistakes in failure path handling.
492 2008-05-06 Robert Millan <rmh@aybabtu.com>
494 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
495 Do not print a trailing slash (therefore, the root directory is an
497 (convert_system_path_to_grub_path): Do not remove trailing slash
498 from make_system_path_relative_to_its_root() output.
500 * util/i386/pc/grub-install.in: Add trailing slash to output from
501 make_system_path_relative_to_its_root().
503 2008-05-06 Robert Millan <rmh@aybabtu.com>
505 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
506 ensures that output lines aren't intermangled with those sent to
507 stderr (via grub_util_info()).
508 * util/grub-probe.c (grub_refresh): Likewise.
509 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
511 2008-05-05 Christian Franke <franke@computer.org>
513 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
514 Add Cygwin device names.
515 (get_ide_disk_name) [__CYGWIN__]: Likewise.
516 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
517 (check_device): Return error instead of success on empty name.
518 (make_device_map): Move label inside linux specific code to
519 prevent compiler warning.
521 2008-04-30 Robert Millan <rmh@aybabtu.com>
523 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
524 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
526 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
528 2008-04-29 Robert Millan <rmh@aybabtu.com>
530 * docs/grub.cfg: New file (example GRUB configuration).
532 2008-04-26 Robert Millan <rmh@aybabtu.com>
534 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
535 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
536 and `disk/ieee1275/nand.c'.
538 2008-04-25 Bean <bean123ch@gmail.com>
540 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
543 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
544 change the buffer size to 4096 for cdrom device.
546 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
548 (_linux_mod_SOURCES): New variable.
549 (_linux_mod_CFLAGS): Likewise.
550 (_linux_mod_LDFLAGS): Likewise.
551 (linux_mod_SOURCES): Likewise.
552 (linux_mod_CFLAGS): Likewise.
553 (linux_mod_LDFLAGS): Likewise.
554 (nand_mod_SOURCES): Likewise.
555 (nand_mod_CFLAGS): Likewise.
556 (nand_mod_LDFLAGS): Likewise.
558 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
559 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
560 type property. (nand device in olpc don't have this property)
562 * include/grub/disk.h (grub_disk_dev_id): New macro
563 GRUB_DISK_DEVICE_NAND_ID.
565 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
567 (grub_rescue_cmd_initrd): Likewise.
569 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
570 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
571 ofw_cif_handler and ofw_idt, adjust padding number.
573 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
574 GRUB_MACHINE_IEEE1275 is defined.
576 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
577 Use NESTED_FUNC_ATTR attribute on the hook parameter.
579 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
580 on nested function heap_init.
581 (grub_upper_mem): New variable for i386-ieee1275.
582 (grub_get_extended_memory): New function for i386-ieee1275.
583 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
585 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
586 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
589 * loader/i386/ieee1275/linux.c: New file.
591 * loader/i386/ieee1275/linux_normal.c: New file.
593 * disk/ieee1275/nand.c: New file.
595 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
597 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
599 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
601 2008-04-18 Robert Millan <rmh@aybabtu.com>
603 Restructures early code path on ieee1275 to unify grub_main() as
604 the first C function that is executed in every platform.
606 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
607 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
609 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
610 * kern/ieee1275/cmain.c (cmain): Rename to ...
611 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
612 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
615 2008-04-18 Robert Millan <rmh@aybabtu.com>
617 * util/update-grub.in: Fix syntax error when setting
618 `GRUB_PRELOAD_MODULES'.
619 Reported by Stephane Chazelas <stephane@artesyncp.com>
621 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
623 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
624 section into account, newer toolchains generate unique build ids
625 * configure.ac: remove the test for --build-id=none acceptance,
626 we want build ids to be preserved
627 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
628 far from other sections don't cause the raw binary images grow
631 2008-04-15 Robert Millan <rmh@aybabtu.com>
633 * disk/lvm.c: Update copyright year.
634 * kern/misc.c: Likewise.
636 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
638 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
639 there is no memory left for physical volume name.
641 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
643 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
644 volume name mapping to support bigger than 9 character names properly.
646 2008-04-13 Robert Millan <rmh@aybabtu.com>
648 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
649 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
651 2008-04-13 Christian Franke <franke@computer.org>
653 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
654 to create a floppy emulation boot CD when non emulation mode
656 Enable Joliet CD filesystem extension.
658 2008-04-13 Robert Millan <rmh@aybabtu.com>
660 * kern/misc.c (grub_strncat): Fix off-by-one error.
661 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
663 * kern/env.c (grub_env_context_close): Clear current context, not
665 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
667 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
669 2008-04-13 Robert Millan <rmh@aybabtu.com>
671 Improve robustness when handling LVM.
673 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
674 (and leave `*p' unmodified).
675 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
677 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
678 iterating through it.
679 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
681 (grub_lvm_scan_device): Check the return value (and fail gracefuly
682 when due) on each grub_lvm_getvalue() or grub_strstr() call.
683 Don't assume `vg->pvs != NULL' when iterating through it.
685 2008-04-13 Robert Millan <rmh@aybabtu.com>
687 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
688 * genmk.rb (partmap): New variable.
689 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
690 (#{partmap}): New target rule.
691 * genpartmaplist.sh: New file.
692 * Makefile.in (pkglib_DATA): Add partmap.lst.
693 (partmap.lst): New target rule.
694 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
695 modules (including all partition maps), instead of preloading them.
697 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
699 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
700 `linux-boot-prober' (if installed) to detect other operating
701 systems which are installed on the computer and add them to
703 * conf/common.rmk: Build and install 30_os-prober.
705 2008-04-12 Robert Millan <rmh@aybabtu.com>
707 * kern/powerpc/ieee1275/init.c: Move from here ...
708 * kern/ieee1275/init.c: ... to here. Update all users.
710 * kern/powerpc/ieee1275/cmain.c: Move from here ...
711 * kern/ieee1275/cmain.c: ... to here. Update all users.
713 * kern/powerpc/ieee1275/openfw.c: Move from here ...
714 * kern/ieee1275/openfw.c: ... to here. Update all users.
716 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
717 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
719 2008-04-10 Pavel Roskin <proski@gnu.org>
721 * configure.ac: Always use "_cv_" in cache variables for
722 compatibility with Autoconf 2.62.
724 2008-04-07 Robert Millan <rmh@aybabtu.com>
726 Revert grub/machine/init.h addition by Pavel (since it breaks on
727 i386-ieee1275 and others):
728 * util/i386/pc/misc.c: Remove grub/machine/init.h.
729 * util/powerpc/ieee1275/misc.c: Likewise.
731 2008-04-07 Robert Millan <rmh@aybabtu.com>
733 * util/grub-probe.c (probe): Improve error message.
735 2008-04-07 Robert Millan <rmh@aybabtu.com>
737 * util/biosdisk.c (read_device_map): Skip devices that don't exist
738 (this prevents the presence of a bogus entry from ruining the whole
741 2008-04-06 Pavel Roskin <proski@gnu.org>
743 * util/biosdisk.c: Include grub/util/biosdisk.h.
744 * util/grub-fstest.c (execute_command): Make static.
745 * util/grub-mkdevicemap.c (check_device): Likewise.
746 * util/i386/pc/misc.c: Include grub/machine/init.h.
747 * util/powerpc/ieee1275/misc.c: Likewise.
748 * util/lvm.c: Include grub/util/lvm.h.
749 * util/misc.c: Include grub/kernel.h, grub/misc.h and
751 * util/raid.c: Include grub/util/raid.h.
752 (grub_util_getdiskname): Make static.
754 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
755 grub_hostfs_fini(), as they are called from grub_init_all() and
756 grub_fini_all() respectively. This fixes an infinite loop in
757 grub-fstest due to double registration of hostfs.
758 Reported by Christian Franke <Christian.Franke@t-online.de>
760 2008-04-05 Pavel Roskin <proski@gnu.org>
762 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
763 all 8 functions. Otherwise, probe function 0 only.
765 2008-04-04 Pavel Roskin <proski@gnu.org>
767 * commands/lspci.c (grub_lspci_iter): Print the bus number
770 * commands/lspci.c (grub_pci_classes): Fix typos.
771 (grub_lspci_iter): Don't print func twice. Print vendor ID
772 before device ID, as it's normally done.
774 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
775 Fix signedness warnings.
776 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
778 * util/ieee1275/get_disk_name.c: Include config.h so that
779 _GNU_SOURCE is defined and getline() is declared. Mark an
780 unused argument as such. Fix a signedness warning.
782 2008-04-02 Pavel Roskin <proski@gnu.org>
784 * genkernsyms.sh.in: Use more robust assignments for CC and
785 srcdir. Quote srcdir.
786 * gensymlist.sh.in: Likewise. Assert at the compile time that
787 the symbol table is not empty.
789 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
790 * fs/cpio.c (grub_cpio_read): Likewise.
792 2008-04-01 Pavel Roskin <proski@gnu.org>
794 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
795 * disk/host.c (grub_host_open): Likewise.
796 * disk/loopback.c (grub_loopback_open): Likewise.
797 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
798 disk->id as in disk/host.c, not a multi-character constant.
800 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
801 later is obsolete, potentially dangerous and sets a bad example.
802 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
803 * util/misc.c (grub_util_get_image_size): Likewise.
805 * disk/loopback.c (options): Improve help for "--partitions".
807 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
808 options to align them with the short options, e.g. "echo -e".
810 2008-03-31 Bean <bean123ch@gmail.com>
812 * video/reader/png.c (grub_png_data): New member is_16bit and
814 (grub_png_decode_image_header): Detect 16 bit png image.
815 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
816 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
817 (grub_video_reader_png): Release memory occupied by image_data.
819 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
821 (grub_nfs_mount): Skip the test for sector per cluster.
823 * include/grub/ntfs.h (MAX_SPC): Removed.
825 2008-03-31 Bean <bean123ch@gmail.com>
827 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
828 (grub_probe_SOURCES): Add fs/afs.c.
829 (grub_fstest_SOURCES): Likewise.
830 (afs_mod_SOURCES): New variable.
831 (afs_mod_CFLAGS): Likewise.
832 (afs_mod_LDFLAGS): Likewise.
834 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
835 (grub_emu_SOURCES): Likewise.
837 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
839 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
841 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
843 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
845 * fs/afs.c: New file.
847 2008-03-30 Pavel Roskin <proski@gnu.org>
849 * disk/host.c: Include grub/misc.h to fix a warning.
850 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
851 warnings about implicit declarations.
853 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
855 * include/grub/i386/loader.h: Change declaration of
856 grub_linux_boot() to match what grub_loader_set() expects.
857 * util/getroot.c (grub_guess_root_device): Return const char* to
859 * util/grub-probe.c (probe): Fix a warning about uninitialized
860 abstraction_name variable.
861 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
862 second argument as unused to fix a warning.
864 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
865 missing grub_error() call.
867 * util/update-grub_lib.in: Define datarootdir, since Autoconf
868 2.60 and newer uses it to define datadir.
870 * commands/sleep.c: Fix warning about implicit declaration.
871 * disk/memdisk.c: Likewise.
872 * loader/aout.c: Likewise.
873 * loader/i386/bsd_normal.c: Likewise.
874 * util/grub-probe.c: Likewise.
876 * commands/i386/cpuid.c (has_longmode): Make static.
877 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
878 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
880 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
881 GDT. This is more robust, as %ds can change.
882 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
883 calling real_to_prot().
884 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
886 2008-03-28 Pavel Roskin <proski@gnu.org>
888 * kern/i386/pc/startup.S: Assert that uncompressed functions
889 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
890 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
891 code, as they push parts of the code (error handlers) beyond
892 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
893 code as correctness and size.
895 2008-03-28 Pavel Roskin <proski@gnu.org>
897 * kern/i386/pc/startup.S
898 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
899 data block address to the real mode, keep offset minimal. This
900 works around a bug in AWARD BIOS on old Athlon systems, which
901 makes CD detection hang.
903 2008-03-26 Pavel Roskin <proski@gnu.org>
905 * normal/color.c (grub_parse_color_name_pair): Make `name' a
907 * include/grub/normal.h: Add grub_parse_color_name_pair()
910 2008-03-24 Bean <bean123ch@gmail.com>
912 * disk/i386/pc/biosdisk.c (cd_start): Removed.
914 (cd_drive): New variable.
915 (grub_biosdisk_get_drive): Don't check for (cdN) device.
916 (grub_biosdisk_call_hook): Likewise.
917 (grub_biosdisk_iterate): Change cdrom detection method.
918 (grub_biosdisk_open): Replace cd_start with cd_drive.
919 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
922 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
924 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
925 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
926 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
927 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
928 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
929 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
930 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
931 (grub_biosdisk_cdrp): New structure.
932 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
934 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
936 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
939 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
942 2008-03-20 Robert Millan <rmh@aybabtu.com>
944 Remove 2 TiB limit in ata.mod.
945 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
946 (grub_ata_dumpinfo): Print sector count with 0x%llx.
947 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
948 grub_uint64_t instead of grub_uint32_t.
950 2008-03-05 Bean <bean123ch@gmail.com>
952 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
953 (grub_multiboot): Set boot device.
955 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
957 2008-03-02 Bean <bean123ch@gmail.com>
959 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
962 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
964 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
967 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
970 * docs/fdl.texi: New file.
972 * docs/mdate-sh: New file. Copied from gnulib.
973 * docs/texinfo.tex: Likewise.
975 * config.guess: Updated from gnulib.
976 * install-sh: Likewise.
978 2008-02-28 Robert Millan <rmh@aybabtu.com>
980 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
981 (aout_mod_SOURCES): New variable.
982 (aout_mod_CFLAGS): Likewise.
983 (aout_mod_LDFLAGS): Likewise.
985 * conf/i386-ieee1275.rmk: Likewise.
987 2008-02-28 Robert Millan <rmh@aybabtu.com>
989 * util/update-grub.in: Reorganise terminal validity check. Accept
990 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
991 Based on suggestion by Franklin PIAT.
993 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
995 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
997 * util/getroot.c (grub_util_check_block_device): New function that
998 returns the given argument if it is a block device and returns NULL else.
999 * util/grub-probe.c (argument_is_device): New variable.
1000 (probe): Promote device_name from a variable to an argument. Receive
1001 device_name from grub_util_check_block_device() if path is NULL and from
1002 grub_guess_root_device() else. Do not free() device_name anymore.
1003 (options): Introduce new parameter '-d, --device'.
1004 (main): Add description of the new parameter to the help screen.
1005 Rename path variable to argument. Set argument_is_device if the '-d'
1006 option is given. Pass argument to probe() depending on
1009 2008-02-24 Bean <bean123ch@gmail.com>
1011 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
1012 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
1013 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
1014 (GRUB_ISO9660_VOLDESC_PART): Likewise.
1015 (GRUB_ISO9660_VOLDESC_END): Likewise.
1016 (grub_iso9660_primary_voldesc): New member escape.
1017 (grub_iso9660_data): New member joliet.
1018 (grub_iso9660_convert_string): New function.
1019 (grub_iso9660_mount): Detect joliet extension.
1020 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
1021 (grub_iso9660_iso9660_label): Likewise.
1023 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
1024 (grub_setup_SOURCES): Add fs/udf.c.
1025 (grub_fstest_SOURCES): Likewise.
1026 (udf_mod_SOURCES): New variable.
1027 (udf_mod_CFLAGS): Likewise.
1028 (udf_mod_LDFLAGS): Likewise.
1030 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
1031 (grub_emu_SOURCES): Likewise.
1033 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1035 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1037 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1039 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1041 * fs/udf.c: New file.
1043 2008-02-24 Robert Millan <rmh@aybabtu.com>
1045 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
1046 (normal/lexer.c_DEPENDENCIES): New variables.
1047 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1048 (normal/lexer.c_DEPENDENCIES): Likewise.
1049 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
1050 (normal/lexer.c_DEPENDENCIES): Likewise.
1051 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
1052 (normal/lexer.c_DEPENDENCIES): Likewise.
1053 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1054 (normal/lexer.c_DEPENDENCIES): Likewise.
1055 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1056 (normal/lexer.c_DEPENDENCIES): Likewise.
1058 2008-02-23 Robert Millan <rmh@aybabtu.com>
1060 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
1061 since they were intended to be in hex. This didn't break previously
1062 because of a bug in gpt_partition_map_iterate() (see below).
1064 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
1065 when checking the validity of GPT header.
1066 Remove `partno', since it always provides the same information as `i'.
1068 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
1070 * include/grub/efi/time.h: Fix a wrong comment.
1072 2008-02-19 Pavel Roskin <proski@gnu.org>
1074 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
1077 2008-02-19 Bean <bean123ch@gmail.com>
1079 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
1080 (aout_mod_SOURCES): New variable.
1081 (aout_mod_CFLAGS): Likewise.
1082 (aout_mod_LDFLAGS): Likewise.
1083 (_bsd_mod_SOURCES): New variable.
1084 (_bsd_mod_CFLAGS): Likewise.
1085 (_bsd_mod_LDFLAGS): Likewise.
1086 (bsd_mod_SOURCES): New variable.
1087 (bsd_mod_CFLAGS): Likewise.
1088 (bsd_mod_LDFLAGS): Likewise.
1090 * include/grub/aout.h: New file.
1092 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
1094 * include/grub/i386/bsd.h: New file.
1096 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
1099 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
1100 function is called, so that it's possible to change it inside the hook.
1101 (grub_elf64_load): Likewise.
1102 (grub_elf_file): Don't close the file if elf header is not found.
1103 (grub_elf_close): Close the file if grub_elf_file fails (The new
1104 grub_elf_file won't close it).
1105 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
1106 (grub_elf64_size): Likewise.
1108 * kern/i386/loader.S (grub_unix_real_boot): New function.
1110 * loader/aout.c: New file.
1112 * loader/i386/bsd.c: New file.
1114 * loader/i386/bsd_normal.c: New file.
1116 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
1118 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
1119 can test othe formats.
1121 2008-02-19 Robert Millan <rmh@aybabtu.com>
1123 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
1124 (grub_gpt_partition_type_empty): Redefine with macro from
1125 `<grub/gpt_partition.h>'.
1126 (gpt_partition_map_iterate): Adjust partition type comparison.
1128 Export `entry' as partmap-specific `part.data' struct.
1129 (grub_gpt_header, grub_gpt_partentry): Move from here ...
1131 * include/grub/gpt_partition.h (grub_gpt_header)
1132 (grub_gpt_partentry): ... to here (new file).
1134 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
1136 (grub_gpt_partition_type_bios_boot): New const variable, defined
1137 with macro from `<grub/gpt_partition.h>'.
1139 (setup): Replace `first_start' with `embed_region', which keeps
1140 track of the embed region (and is partmap-agnostic).
1142 Replace find_first_partition_start() with find_usable_region(),
1143 which finds a usable region for embedding using partmap-specific
1144 knowledge (supports PC/MSDOS and GPT).
1146 Fix all assumptions that the embed region start at sector 1, using
1147 `embed_region.start' from now on. Similarly, use `embed_region.end'
1148 rather than `first_start' to calculate available size.
1150 In grub_util_info() message, replace "into after the MBR" with an
1151 indication of the specific sector our embed region starts at.
1153 2008-02-19 Robert Millan <rmh@aybabtu.com>
1155 * DISTLIST: Replace `commands/ieee1275/halt.c' and
1156 `commands/ieee1275/reboot.c' with `commands/halt.c' and
1157 `commands/reboot.c'.
1158 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1159 (halt_mod_SOURCES): Likewise.
1160 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1161 (halt_mod_SOURCES): Likewise.
1163 2008-02-17 Christian Franke <franke@computer.org>
1165 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
1167 2008-02-17 Robert Millan <rmh@aybabtu.com>
1169 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1170 set `first_start' to 0 for non-PC/MSDOS partition maps.
1172 2008-02-16 Robert Millan <rmh@aybabtu.com>
1174 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1175 do not assume partition map is PC/MSDOS before performing checks that
1176 are specific to that layout.
1178 2008-02-13 Robert Millan <rmh@aybabtu.com>
1180 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
1181 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
1182 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
1184 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
1186 * configure.ac: Only a cosmetic change on the handling of
1187 -fno-stack-protector.
1189 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
1191 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
1192 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
1194 (grub_install_SOURCES): Add halt.mod and reboot.mod.
1195 (halt_mod_SOURCES): New variable.
1196 (halt_mod_CFLAGS): Likewise.
1197 (halt_mod_LDFLAGS): Likewise.
1198 (reboot_mod_SOURCES): Likewise.
1199 (reboot_mod_CFLAGS): Likewise.
1200 (reboot_mod_LDFLAGS): Likewise.
1202 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
1203 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
1205 (halt_mod_SOURCES): Likewise.
1206 (reboot_mod_SOURCES): Likewise.
1208 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
1209 commands/i386/pc/reboot.c by commands/reboot.c.
1210 (reboot_mod_SOURCES): Likewise.
1212 * commands/i386/pc/reboot.c: merge this file ...
1214 * commands/ieee1275/reboot.c: ... and this file ...
1216 * commands/reboot.c: ... to this file.
1217 Add some precompiler directive to include the correct header for
1220 * commands/ieee1275/halt.c: move this file ...
1222 * commands/halt.c: ... to here.
1223 Add some precompiler directive to include the correct header for
1226 * include/grub/efi/efi.h (grub_reboot): New function declaration.
1227 (grub_halt): Likewise.
1229 * kern/efi/efi.c (grub_reboot): New function.
1230 (grub_halt): Likewise.
1232 2008-02-12 Robert Millan <rmh@aybabtu.com>
1234 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
1235 /dev (like it is done for /dev/mapper). This doesn't provide support
1236 for EVMS, but at least it is now easy to identify the problem when it
1239 2008-02-11 Robert Millan <rmh@aybabtu.com>
1241 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
1242 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
1243 comparing it with -1, not 0.
1245 2008-02-10 Robert Millan <rmh@aybabtu.com>
1247 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
1249 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1250 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
1252 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
1253 `disk/lvm.c' to the end of the list.
1254 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1255 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1257 2008-02-10 Robert Millan <rmh@aybabtu.com>
1259 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
1260 grub_print_error() instead. This will let user know why we're entering
1262 Based on suggestions from Sam Morris.
1264 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
1266 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
1267 on remaining N args, instead of "--" arg N times.
1269 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
1271 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
1272 (fill_with_default_glyph): Changed to use unknown_glyph for fill
1273 pattern for unknown glyphs.
1275 2008-02-09 Robert Millan <rmh@aybabtu.com>
1277 * configure.ac: Probe for `help2man'.
1278 * Makefile.in (builddir): New variable.
1279 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
1280 or otherwise add a few flags/options to it.
1281 (install-local): For every executable utility or script that is
1282 installed, invoke $(HELP2MAN) to install a manpage based on --help
1285 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
1286 that it doesn't prevent --help from working in build tree.
1288 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
1289 with `bug-grub@gnu.org'.
1290 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
1291 * util/update-grub.in (usage): New function.
1292 Implement proper argument check, with support for --help and --version
1293 (as well as existing -y).
1295 2008-02-09 Christian Franke <franke@computer.org>
1297 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
1298 avoid overwriting previous output.
1299 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
1301 2008-02-09 Robert Millan <rmh@aybabtu.com>
1303 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
1306 2008-02-09 Robert Millan <rmh@aybabtu.com>
1308 * commands/sleep.c: New file.
1309 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
1310 (sleep_mod_SOURCES): New variable.
1311 (sleep_mod_CFLAGS): Likewise.
1312 (sleep_mod_LDFLAGS): Likewise.
1314 2008-02-09 Robert Millan <rmh@aybabtu.com>
1316 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
1317 situations in which we can deduce the RAID size and the superblock
1320 2008-02-09 Robert Millan <rmh@aybabtu.com>
1322 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
1323 and return a grub_diskmemberlist_t composed of LVM physical volumes.
1324 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
1326 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
1327 and return a grub_diskmemberlist_t composed of physical array members.
1328 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
1330 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
1332 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
1333 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
1334 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
1336 * util/grub-probe.c (probe): Move partmap probing code from here ...
1337 (probe_partmap): ... to here.
1338 (probe): Use probe_partmap() once for the disk we're probing, and
1339 additionally, when such disk contains a memberlist() struct member,
1340 once for each disk that is contained in the structure returned by
1343 2008-02-09 Robert Millan <rmh@aybabtu.com>
1345 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
1346 environment variable to 'all' in order to obtain debug output from
1348 * util/i386/pc/grub-setup.c (main): Likewise.
1350 2008-02-08 Robert Millan <rmh@aybabtu.com>
1352 * disk/raid.c (grub_raid_scan_device): Check for
1353 `array->device[sb.this_disk.number]' rather than for
1354 `array->device[sb.this_disk.number]->name', since the latter is not
1355 garanteed to be accessible.
1357 2008-02-08 Robert Millan <rmh@aybabtu.com>
1359 * disk/raid.c: Update copyright.
1360 * fs/cpio.c: Likewise.
1361 * include/grub/raid.h: Likewise.
1362 * loader/i386/pc/multiboot.c: Likewise.
1363 * util/hostfs.c: Likewise.
1365 2008-02-08 Robert Millan <rmh@aybabtu.com>
1367 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
1368 to a grub_disk_t array.
1369 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
1371 (grub_raid_scan_device): Replace `device[x].name' accesses with
1372 `device[x]->name'. Simplify initialization of `array->device[x]'.
1374 2008-02-08 Robert Millan <rmh@aybabtu.com>
1376 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
1377 grub_dprintf() calls.
1378 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
1381 2008-02-07 Christian Franke <franke@computer.org>
1383 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
1384 instead of fseek and ftell to support large files.
1385 (grub_hostfs_read): Likewise.
1387 2008-02-07 Robert Millan <rmh@aybabtu.com>
1389 Patch from Jeroen Dekkers.
1390 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
1391 failure, since succesfuly reading all array members might not be
1394 2008-02-06 Robert Millan <rmh@aybabtu.com>
1396 * util/grub-probe.c (probe): Simplify partmap probing (with the
1397 assumption that the first word up to the underscore equals to
1400 2008-02-06 Christian Franke <franke@computer.org>
1402 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
1403 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
1404 last block of a cpio or tar stream.
1405 Check for "TRAILER!!!" instead of any empty data
1406 block to detect last block of a cpio stream.
1407 (grub_cpio_dir): Fix constness of variable np.
1408 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
1409 cpio or tar trailer is detected. This fixes a crash
1410 on open of a non existing file.
1412 2008-02-05 Bean <bean123ch@gmail.com>
1414 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
1416 (grub_multiboot_load_elf64): Likewise.
1417 (grub_multiboot): Initialize mbi structure.
1419 * util/grub-fstest.c: Don't include unused header file script.h.
1421 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
1423 (grub_fstest_SOURCES): Likewise.
1425 2008-02-05 Robert Millan <rmh@aybabtu.com>
1427 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
1428 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
1429 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
1430 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
1432 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
1433 (translation_table): Replace hardcoded values with macros
1434 provided by `<grub/term.h>'.
1436 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
1437 (keyboard_map): Correct/add a few values, with macros provided
1439 (keyboard_map_shift): Zero values that don't differ from their
1440 `keyboard_map' equivalents.
1441 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
1442 Discard the second scan code that is always sent by Caps lock.
1443 Only use `keyboard_map_shift' when it provides a non-zero value,
1444 otherwise fallback to `keyboard_map'.
1446 2008-02-04 Bean <bean123ch@gmail.com>
1448 * Makefile.in (enable_grub_fstest): New variable.
1450 * conf/common.rmk (grub_fstest_init.lst): New rule.
1451 (grub_fstest_init.h): Likewise.
1452 (grub_fstest_init.c): Likewise.
1453 (util/grub-fstest.c_DEPENDENCIES): New variable.
1454 (grub_fstest_SOURCES): Likewise.
1456 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
1458 * util/grub-fstest.c: New file.
1460 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1462 Make grub-setup handle a separate root device.
1464 * util/i386/pc/grub-setup.c (setup): Always open the root device,
1465 so that the root device can be compared with the destination
1467 When embedding the core image, if the root and destination devices
1468 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
1470 When not embedding, set ROOT_DRIVE to 0xFF.
1472 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1474 Add support for having a grub directory in a different drive. This
1475 is still only the data handling part.
1477 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
1478 (codestart): Save %dh in GRUB_ROOT_DRIVE.
1479 (grub_root_drive): New variable.
1481 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
1482 instead of GRUB_BOOT_DRIVE to construct a device name. Set
1483 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
1486 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
1488 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
1490 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
1492 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
1493 is bogus, because PXE booting does not specify any drive
1496 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
1497 am not sure if this is really correct.
1499 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
1500 is always identical to the boot drive when booting from a CD.
1502 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
1504 (root_drive): New variable.
1505 (real_start): Unconditionally set %dh to ROOT_DRIVE.
1506 (setup_sectors): Push %dx right after popping it, because %dh will
1508 (copy_buffer): Restore %dx.
1510 2008-02-03 Robert Millan <rmh@aybabtu.com>
1512 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
1513 use `cdboot.img' for cdrom images.
1515 2008-02-03 Robert Millan <rmh@aybabtu.com>
1517 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
1518 only setup gfxterm when `font' command has succeeded.
1520 2008-02-03 Robert Millan <rmh@aybabtu.com>
1522 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
1523 (grub_rescue_cmd_multiboot_loader)
1524 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
1526 2008-02-03 Pavel Roskin <proski@gnu.org>
1528 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
1529 %edx and %esi from stack only after grub_gate_a20() is called.
1530 grub_gate_a20() clobbers %edx.
1532 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1534 * configure.ac (AC_INIT): Bumped to 1.96.
1536 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
1537 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
1538 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
1539 video/readers/png.c.
1541 2008-02-03 Bean <bean123ch@gmail.com>
1543 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
1544 (cdboot_img_SOURCES): New variable.
1545 (cdboot_img_ASFLAGS): New variable.
1546 (cdboot_img_LDFLAGS): New variable.
1548 * boot/i386/pc/cdboot.S: New file.
1550 * disk/i386/pc/biosdisk.c (cd_start): New variable.
1551 (cd_count): Likewise.
1552 (grub_biosdisk_get_drive): Add support for cd device.
1553 (grub_biosdisk_call_hook): Likewise.
1554 (grub_biosdisk_iterate): Likewise.
1555 (grub_biosdisk_open): Likewise.
1556 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
1557 (grub_biosdisk_rw): Support reading from cd device.
1558 (GRUB_MOD_INIT): Iterate cd devices.
1560 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
1561 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
1562 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
1564 * kern/i386/pc/init.c (make_install_device): Check for cd device.
1566 2008-02-02 Robert Millan <rmh@aybabtu.com>
1568 * commands/read.c: New file.
1569 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
1570 (read_mod_SOURCES): New variable.
1571 (read_mod_CFLAGS): Likewise.
1572 (read_mod_LDFLAGS): Likewise.
1574 2008-02-02 Robert Millan <rmh@aybabtu.com>
1576 * normal/main.c (grub_normal_execute): Check for `menu->size' when
1577 determining whether menu has to be displayed.
1579 2008-02-02 Marco Gerards <marco@gnu.org>
1581 * bus/pci.c: New file.
1583 * include/grub/pci.h: Likewise.
1585 * include/grub/i386/pc/pci.h: Likewise.
1587 * commands/lspci.c: Likewise.
1589 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
1591 (pci_mod_SOURCES): New variable.
1592 (pci_mod_CFLAGS): Likewise.
1593 (pci_mod_LDFLAGS): Likewise.
1594 (lspci_mod_SOURCES): Likewise.
1595 (lspci_mod_CFLAGS): Likewise.
1596 (lspci_mod_LDFLAGS): Likewise.
1598 2008-02-02 Bean <bean123ch@gmail.com>
1600 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
1601 (grub_ufs_get_file_block): Fix indirect block calculation problem.
1603 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
1604 (grub_xfs_btree_node): New structure.
1605 (grub_xfs_btree_root): New structure.
1606 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
1607 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
1608 (GRUB_XFS_EXTENT_BLOCK): Likewise.
1609 (GRUB_XFS_EXTENT_SIZE): Likewise.
1610 (grub_xfs_read_block): Support btree format type.
1611 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
1612 Use directory block as basic unit.
1614 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
1616 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
1617 __attribute__ ((__regparm__ (1))).
1619 2008-02-01 Robert Millan <rmh@aybabtu.com>
1621 Correct a mistake in previous commit.
1623 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
1625 (normal/command.c_DEPENDENCIES): New variable.
1627 2008-02-01 Robert Millan <rmh@aybabtu.com>
1629 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
1631 (normal/command.c_DEPENDENCIES): New variable.
1632 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
1633 * conf/i386-ieee1275.rmk: Likewise.
1634 * conf/i386-linuxbios.rmk: Likewise.
1635 * conf/i386-pc.rmk: Likewise.
1636 * conf/sparc64-ieee1275.rmk: Likewise.
1637 * conf/powerpc-ieee1275.rmk: Likewise.
1638 (grub_emu_SOURCES): Add `fs/fshelp.c'.
1640 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
1642 2008-02-01 Robert Millan <rmh@aybabtu.com>
1644 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
1645 call at beginning of function.
1647 2008-01-31 Pavel Roskin <proski@gnu.org>
1649 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
1650 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
1651 (grub_mkrescue_SOURCES): Likewise.
1652 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
1654 2008-01-30 Robert Millan <rmh@aybabtu.com>
1656 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
1657 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
1658 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
1659 (grub_probe_SOURCES): ... to here.
1661 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
1662 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
1663 * conf/i386-ieee1275.rmk: Likewise.
1664 * conf/i386-linuxbios.rmk: Likewise.
1665 * conf/powerpc-ieee1275.rmk: Likewise.
1667 2008-01-30 Tristan Gingold <gingold@free.fr>
1669 * kern/rescue.c: Silently accept empty lines.
1671 2008-01-29 Bean <bean123ch@gmail.com>
1673 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
1674 (real_code_2): Code cleanup and change comment style.
1675 (move_memory): Avoid using 32-bit address mode.
1677 2008-01-29 Bean <bean123ch@gmail.com>
1679 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
1680 (png_mod_SOURCES): New variable.
1681 (png_mod_CFLAGS): Likewise.
1682 (png_mod_LDFLAGS): Likewise.
1684 * video/readers/png.c: New file.
1686 2008-01-28 Robert Millan <rmh@aybabtu.com>
1688 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
1689 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
1690 `ifndef GRUB_MOD_GAP' hack.
1691 * util/elf/grub-mkimage.c (add_segments): Likewise.
1693 2008-01-27 Robert Millan <rmh@aybabtu.com>
1695 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
1696 `GRUB_MOD_GAP' for platforms in which it's not defined.
1697 * util/elf/grub-mkimage.c (add_segments): Likewise.
1699 2008-01-27 Robert Millan <rmh@aybabtu.com>
1701 Get grub-emu to build again (including parallel builds).
1703 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
1705 (util/grub-emu.c_DEPENDENCIES): ... this, ...
1706 (normal/execute.c_DEPENDENCIES): ... this, ...
1707 (grub-emu_DEPENDENCIES): ... and this.
1709 * conf/i386-efi.rmk: Likewise.
1710 * conf/i386-linuxbios.rmk: Likewise.
1711 * conf/i386-ieee1275.rmk: Likewise.
1712 * conf/powerpc-ieee1275.rmk: Likewise.
1713 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
1715 2008-01-27 Robert Millan <rmh@aybabtu.com>
1717 * NEWS: Add a few items.
1719 2008-01-27 Robert Millan <rmh@aybabtu.com>
1721 Fix parallel builds with grub-emu. Based on earlier commit for
1722 grub-probe and grub-setup.
1724 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1725 (util/grub-emu.c_DEPENDENCIES): ... this.
1726 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1727 (util/grub-emu.c_DEPENDENCIES): ... this.
1728 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1729 (util/grub-emu.c_DEPENDENCIES): ... this.
1730 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1731 (util/grub-emu.c_DEPENDENCIES): ... this.
1732 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1733 (util/grub-emu.c_DEPENDENCIES): ... this.
1735 2008-01-27 Pavel Roskin <proski@gnu.org>
1737 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
1738 to create a gap between _end and the modules added to the image
1739 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
1740 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
1741 * util/elf/grub-mkimage.c (add_segments): Likewise.
1743 2008-01-26 Pavel Roskin <proski@gnu.org>
1745 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
1746 just return an error.
1748 2008-01-26 Bean <bean123ch@gmail.com>
1750 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
1751 (grub_reiserfs_get_item): Save offset of the next item.
1752 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
1754 2008-01-25 Robert Millan <rmh@aybabtu.com>
1756 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
1757 make all filesystem sources appear together (possibly fixing omissions
1759 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1760 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1761 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1762 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1764 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
1766 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
1767 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1768 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
1769 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1771 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
1772 (probe): Add a sanity check to make sure of our ability to read
1773 requested files when probing for filesystem type.
1775 * genmk.rb: Update copyright year (2007).
1777 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
1778 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
1779 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
1780 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
1781 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
1782 : Remove function prototypes.
1784 2008-01-25 Robert Millan <rmh@aybabtu.com>
1786 Revert my previous commits (based on wrong assumption of how grub_errno
1789 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
1790 * kern/file.c (grub_file_open): Likewise.
1792 2008-01-24 Pavel Roskin <proski@gnu.org>
1794 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
1795 that hang if GRUB tries to setup colors.
1796 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
1797 colors for firmwares that don't support it.
1798 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
1799 Recognize Open Hack'Ware, set flags to work around its
1802 2008-01-24 Robert Millan <rmh@aybabtu.com>
1804 * kern/file.c (grub_file_open): Do not account previous failures of
1805 unrelated functions when grub_errno is checked for.
1806 Reported by Oleg Strikov.
1808 2008-01-24 Bean <bean123ch@gmail.com>
1810 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
1811 (grub_ufs_sblock): New member volume name.
1812 (grub_ufs_find_file): Fix string copy bug.
1813 (grub_ufs_label): Implement this function properly.
1815 * fs/hfs.c (grub_hfs_cnid_type): New enum.
1816 (grub_hfs_iterate_records): Use the correct file number for extents
1817 and catalog file. Fix problem in next index calculation.
1818 (grub_hfs_find_node): Replace recursive function call with loop.
1819 (grub_hfs_iterate_dir): Replace recursive function call with loop.
1821 2008-01-23 Robert Millan <rmh@aybabtu.com>
1823 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
1824 `<grub/symbol.h>' and `<grub/multiboot.h>'.
1825 (grub_multiboot2_real_boot): New function prototype.
1827 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
1828 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
1830 * kern/i386/ieee1275/init.c (grub_os_area_addr)
1831 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
1833 2008-01-23 Robert Millan <rmh@aybabtu.com>
1835 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
1836 #ifdef'ed out grub_printf().
1838 2008-01-23 Robert Millan <rmh@aybabtu.com>
1840 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
1841 grub_dprintf calls, since they make "debug=all" mode unusable.
1842 (grub_console_checkkey): Likewise.
1844 2008-01-23 Robert Millan <rmh@aybabtu.com>
1846 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1847 `term/i386/pc/at_keyboard.c'.
1848 (pkglib_MODULES): Add `serial.mod'.
1849 (serial_mod_SOURCES): New variable.
1850 (serial_mod_CFLAGS): Likewise.
1851 (serial_mod_LDFLAGS): Likewise.
1853 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
1854 `<grub/powerpc/ieee1275/console.h>'.
1855 (grub_keyboard_controller_init): New function prototype.
1856 (grub_console_checkkey): Likewise.
1857 (grub_console_getkey): Likewise.
1859 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
1862 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
1863 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
1865 2008-01-23 Robert Millan <rmh@aybabtu.com>
1867 * kern/i386/pc/init.c (make_install_device): When memdisk image is
1868 present, "(memdisk)/boot/grub" becomes the default prefix.
1870 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
1871 a memdisk tarball with all the modules. Add --overlay=DIR option that
1872 allows users to overlay additional files into the image.
1874 2008-01-23 Robert Millan <rmh@aybabtu.com>
1876 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1877 and `machine/memory.h'.
1878 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1879 (_multiboot_mod_SOURCES): New variable.
1880 (_multiboot_mod_CFLAGS): Likewise.
1881 (_multiboot_mod_LDFLAGS): Likewise.
1882 (multiboot_mod_SOURCES): Likewise.
1883 (multiboot_mod_CFLAGS): Likewise.
1884 (multiboot_mod_LDFLAGS): Likewise.
1886 * include/grub/i386/ieee1275/loader.h: New file.
1888 * include/grub/i386/ieee1275/machine.h: Likewise.
1890 * include/grub/i386/ieee1275/memory.h: Likewise.
1892 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1893 variable declaration.
1894 (grub_os_area_size): Likewise.
1896 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1897 (grub_lower_mem, grub_upper_mem): New variables.
1898 (grub_stop_floppy): New function (just to make
1899 grub_multiboot2_real_boot() happy).
1901 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1902 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1903 (grub_stop): New function.
1904 Include `"../realmode.S"' and `"../loader.S"'.
1906 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1907 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1909 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1910 rely on grub_multiboot2_real_boot() for final boot.
1912 2008-01-22 Robert Millan <rmh@aybabtu.com>
1914 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1915 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1916 device that doesn't look like an SD card.
1917 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1918 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1919 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1920 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1923 2008-01-22 Robert Millan <rmh@aybabtu.com>
1925 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1926 avoid claiming over our own code.
1928 2008-01-22 Bean <bean123ch@gmail.com>
1930 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1931 (jpeg_mod_SOURCES): New variable.
1932 (jpeg_mod_CFLAGS): Likewise.
1933 (jpeg_mod_LDFLAGS): Likewise.
1935 * video/readers/jpeg.c : New file.
1937 2008-01-22 Bean <bean123ch@gmail.com>
1939 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1940 there are no more items.
1942 2008-01-21 Robert Millan <rmh@aybabtu.com>
1944 * kern/mm.c (grub_mm_init_region): Improve debug message.
1946 2008-01-21 Robert Millan <rmh@aybabtu.com>
1948 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1949 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1951 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1953 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1954 Indicates start of upper memory.
1955 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1956 (generate_image): Abort when image size is big enough to corrupt
1959 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1960 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1961 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1962 instead of hardcoding 0xA0000.
1963 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1964 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1965 instead of hardcoding 0xA0000.
1967 2008-01-21 Robert Millan <rmh@aybabtu.com>
1969 * disk/memdisk.c (memdisk_size): New variable.
1970 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1972 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
1973 image to dynamic memory.
1974 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1975 `memdisk_size'. Free memdisk block.
1977 2008-01-21 Robert Millan <rmh@aybabtu.com>
1979 Fix detection of very small filesystems (like tar).
1981 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1982 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1983 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1984 a problem with this disk).
1986 2008-01-21 Robert Millan <rmh@aybabtu.com>
1988 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1989 on grub_biosdisk_rw_standard() error.
1991 2008-01-21 Robert Millan <rmh@aybabtu.com>
1993 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1995 * kern/elf.c: Likewise.
1996 * kern/ieee1275/ieee1275.c: Likewise.
1997 * kern/powerpc/ieee1275/openfw.c: Likewise.
1998 * term/ieee1275/ofconsole.c: Likewise.
2000 2008-01-21 Robert Millan <rmh@aybabtu.com>
2002 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
2004 * include/grub/kernel.h (grub_arch_memdisk_addr)
2005 (grub_arch_memdisk_size): Moved from here ...
2007 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
2008 (grub_arch_memdisk_size): ... to here.
2010 2008-01-21 Robert Millan <rmh@aybabtu.com>
2012 Mostly based on bugfix from Bean.
2014 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
2015 attribute with hook() parameter.
2016 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
2018 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
2019 attribute with hook() parameter.
2020 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
2023 2008-01-21 Robert Millan <rmh@aybabtu.com>
2025 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
2026 (pkglib_MODULES): Add `memdisk.mod'.
2027 (memdisk_mod_SOURCES): New variable.
2028 (memdisk_mod_CFLAGS): Likewise.
2029 (memdisk_mod_LDFLAGS): Likewise.
2031 * disk/memdisk.c: New file.
2033 * include/grub/disk.h (grub_disk_dev_id): Add
2034 `GRUB_DISK_DEVICE_MEMDISK_ID'.
2036 * include/grub/i386/pc/kernel.h
2037 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
2038 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
2039 (grub_kernel_image_size): New variable declaration.
2040 (grub_total_module_size): Likewise.
2041 (grub_memdisk_image_size): Likewise.
2043 * include/grub/i386/pc/memory.h
2044 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
2046 * include/grub/kernel.h: Include `<grub/symbol.h>'.
2047 (grub_arch_memdisk_addr): New variable declaration.
2048 (grub_arch_memdisk_size): Likewise.
2050 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
2051 (grub_arch_memdisk_size): Likewise.
2053 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
2054 (codestart): Replace hardcoded `0x100000' with
2055 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
2057 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
2058 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
2059 not NULL, append the contents of the file it refers to, at the end of
2060 the compressed kernel image. Initialize `grub_memdisk_image_size'
2061 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
2062 (options): Add "memdisk"|'m' option.
2063 (main): Parse --memdisk|-m option, and pass user-provided path as
2064 parameter to generate_image().
2066 2008-01-20 Robert Millan <rmh@aybabtu.com>
2068 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
2069 grub_dprintf() calls from here ...
2070 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
2072 2008-01-20 Robert Millan <rmh@aybabtu.com>
2074 Fix detection of "real mode" when /options/real-mode? doesn't exist.
2076 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
2078 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
2079 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
2080 `GRUB_IEEE1275_FLAG_REAL_MODE'.
2081 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
2083 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
2084 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
2086 2008-01-19 Robert Millan <rmh@aybabtu.com>
2088 Get rid of confusing function (superceeded by
2089 `grub_ieee1275_get_integer_property')
2090 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
2092 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
2094 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
2095 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
2096 in native endianess from grub_ieee1275_get_integer_property().
2098 2008-01-19 Robert Millan <rmh@aybabtu.com>
2100 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
2101 command after "shut-down", since implementations differ on which
2102 the command for halt is.
2104 2008-01-19 Robert Millan <rmh@aybabtu.com>
2106 * include/grub/i386/linuxbios/console.h: Add header protection.
2107 (grub_keyboard_controller_init): New function prototype.
2108 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
2109 (KEYBOARD_COMMAND_READ): Likewise.
2110 (KEYBOARD_COMMAND_WRITE): Likewise.
2111 (KEYBOARD_SCANCODE_SET1): Likewise.
2112 (grub_keyboard_controller_write): New function.
2113 (grub_keyboard_controller_read): Likewise.
2114 (grub_keyboard_controller_init): Likewise.
2116 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
2117 (grub_console_init): On coreboot/LinuxBIOS, call
2118 grub_keyboard_controller_init().
2120 2008-01-19 Robert Millan <rmh@aybabtu.com>
2122 PowerPC changes provided by Pavel Roskin.
2124 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
2125 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
2126 don't rely on cmain() doing it.
2127 * kern/i386/ieee1275/startup.S (_start): Store %eax in
2128 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
2130 2008-01-16 Robert Millan <rmh@aybabtu.com>
2132 * include/grub/i386/linuxbios/memory.h
2133 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
2134 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
2135 receive `table_header' as argument. Instead, probe for it in the
2136 known memory ranges where it can be present.
2137 (grub_available_iterate): Do not pass a fixed `table_header' address
2138 to grub_linuxbios_table_iterate().
2140 2008-01-15 Robert Millan <rmh@aybabtu.com>
2142 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
2143 * conf/i386-ieee1275.rmk: New file.
2144 * include/grub/i386/ieee1275/console.h: Likewise.
2145 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
2146 * include/grub/i386/ieee1275/kernel.h: Likewise.
2147 * include/grub/i386/ieee1275/time.h: Likewise.
2148 * kern/i386/ieee1275/init.c: Likewise.
2149 * kern/i386/ieee1275/startup.S: Likewise.
2151 2008-01-15 Robert Millan <rmh@aybabtu.com>
2153 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
2154 when pointers are 32-bit (but still do set it to one when they are
2157 2008-01-15 Robert Millan <rmh@aybabtu.com>
2159 * include/grub/ieee1275/ieee1275.h
2160 (grub_ieee1275_get_integer_property): New function prototype.
2162 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
2163 (grub_ieee1275_get_integer_property): New function. Wraps around
2164 grub_ieee1275_get_property() to handle endianess.
2166 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
2167 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
2169 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
2170 (grub_map): Likewise.
2171 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
2173 2008-01-15 Bean <bean123ch@gmail.com>
2175 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
2176 (grub_script_execute_cmdline): Reset grub_errno.
2178 * normal/main.c (read_config_file): Reset grub_errno.
2180 * normal/parse.y (script_init): New.
2181 (script): Move function and menuentry here.
2183 (command): Add delimiter at the end of command.
2184 (commands): Adjust to match the new command.
2185 (commandblock): Remove grub_script_lexer_record_start.
2186 (menuentry): Add grub_script_lexer_record_start, use the new commands.
2187 (if): Use the new commands.
2189 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
2191 2008-01-15 Robert Millan <rmh@aybabtu.com>
2193 * normal/menu.c (run_menu): Move timeout message from here ...
2194 (print_timeout): ... to here.
2195 (run_menu): Use print_timeout() once during initial draw to print
2196 the whole message, and again in every clock tick to update only
2197 the number of seconds.
2199 2008-01-15 Robert Millan <rmh@aybabtu.com>
2201 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
2202 actual size of `available' from grub_ieee1275_get_property(), and
2203 restrict parsing to that bound.
2205 2008-01-15 Christian Franke <franke@computer.org>
2207 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
2208 (argp_program_version): Remove variable.
2209 (argp_program_bug_address): Likewise.
2210 (options): Convert from struct argp_option to struct option.
2211 (struct arguments): Remove.
2212 (parse_opt): Remove.
2213 (usage): New function.
2214 (main): Replace struct args members by simple variables.
2215 Replace argp_parse() by getopt_long().
2216 Add switch to evaluate options.
2217 Add missing "(...)" around root_dev in prefix string.
2219 2008-01-14 Robert Millan <rmh@aybabtu.com>
2221 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
2222 for grub_ieee1275_exit(), in order to improve portability.
2224 2008-01-14 Robert Millan <rmh@aybabtu.com>
2226 * util/grub.d/10_linux.in (prefix): Define.
2227 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
2229 2008-01-13 Pavel Roskin <proski@gnu.org>
2231 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
2232 grub_errno if no errors have been detected.
2234 2008-01-12 Robert Millan <rmh@aybabtu.com>
2236 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
2237 (grub_util_get_dev_abstraction): New function prototype.
2239 * util/getroot.c: Include `<grub/util/getroot.h>'
2240 (grub_util_get_grub_dev): Move detection of abstraction type to ...
2241 (grub_util_get_dev_abstraction): ... here (new function).
2243 * util/grub-probe.c: Convert PRINT_* to an enum. Add
2244 `PRINT_ABSTRACTION'.
2245 (probe): Probe for abstraction type when requested.
2246 (main): Understand `--target=abstraction'.
2248 * util/i386/efi/grub-install.in: Add abstraction module to core
2249 image when it is found to be necessary.
2250 * util/i386/pc/grub-install.in: Likewise.
2251 * util/powerpc/ieee1275/grub-install.in: Likewise.
2253 * util/update-grub_lib.in (font_path): Return system path without
2254 converting to GRUB path.
2255 * util/update-grub.in: Convert system path returned by font_path()
2256 to a GRUB path. Use `grub-probe -t abstraction' to determine what
2257 abstraction module is needed for loading fonts (if any). Export
2258 that as `GRUB_PRELOAD_MODULES'.
2259 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
2262 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
2264 Remove some unused code from reiserfs.
2266 * fs/reiserfs.c (struct grub_reiserfs_key)
2267 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
2268 (struct grub_reiserfs_node_body): Removed.
2269 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
2271 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2273 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2275 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2277 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
2279 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
2281 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2282 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2283 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2285 2008-01-10 Robert Millan <rmh@aybabtu.com>
2287 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
2288 Determines if a file is garbage left by packaging systems, etc.
2289 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
2290 for processing /etc/grub.d scripts.
2291 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
2292 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
2293 as a condition for processing Linux images.
2295 2008-01-10 Pavel Roskin <proski@gnu.org>
2297 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
2298 to compile reiserfs.c on PowerPC.
2300 2008-01-10 Robert Millan <rmh@aybabtu.com>
2302 * kern/device.c (grub_device_iterate): Do not abort device iteration
2303 when one of the devices cannot be opened.
2304 * kern/disk.c (grub_disk_open): Do not account previous failures of
2305 unrelated functions when grub_errno is checked for.
2307 2008-01-08 Robert Millan <rmh@aybabtu.com>
2309 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
2310 `! grub_linux_is_bzimage', change order of address comparison to make
2311 it more intuitive, and improve "too big zImage" error message.
2313 2008-01-08 Robert Millan <rmh@aybabtu.com>
2315 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
2316 `$(update-grub_DATA)'.
2317 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
2320 2008-01-07 Robert Millan <rmh@aybabtu.com>
2322 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
2323 which instruction is modified by grub-setup during installation
2324 (since it wasn't obvious by only looking at this file).
2326 2008-01-07 Robert Millan <rmh@aybabtu.com>
2328 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
2329 listing actual TODO items.
2331 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2333 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
2335 (grub_reiserfs_get_key_offset): Likewise.
2336 (grub_reiserfs_set_key_offset): Likewise.
2337 (grub_reiserfs_set_key_type): Likewise.
2338 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
2340 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
2341 better to remove the bitfield version completely.
2343 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2345 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
2346 allocated from the heap, due to the fshelp implementation.
2347 (grub_reiserfs_dir): Free NODE, due to the same reason.
2349 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2351 Mostly from Vincent Pelletier:
2353 * fs/reiserfs.c: New file.
2355 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
2356 (reiserfs_mod_SOURCES): New variable.
2357 (reiserfs_mod_CFLAGS): Likewise.
2358 (reiserfs_mod_LDFLAGS): Likewise.
2360 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
2361 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
2362 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
2365 2008-01-06 Robert Millan <rmh@aybabtu.com>
2367 * normal/color.c: Remove `<grub/env.h>'.
2369 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
2371 * include/grub/normal.h: Include <grub/env.h>.
2373 2008-01-05 Robert Millan <rmh@aybabtu.com>
2375 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
2376 usage example with `(hd0,1)'.
2377 Reported by Samuel Thibault.
2379 2008-01-05 Robert Millan <rmh@aybabtu.com>
2381 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
2382 (grub_linux_boot_zimage): Rename to ...
2383 (grub_linux_boot): ... this.
2384 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
2385 (grub_linux_boot_zimage): Conditionalize zImage copy.
2387 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
2388 (grub_linux_boot_bzimage): Remove prototype.
2389 (grub_linux_boot_zimage): Rename to ...
2390 (grub_linux_boot): ... this.
2392 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
2393 (grub_linux_boot): Remove function.
2395 2008-01-05 Robert Millan <rmh@aybabtu.com>
2397 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
2398 (grub_env_write_color_highlight): Likewise.
2399 (grub_wait_after_message): Likewise.
2401 * normal/color.c: New file.
2403 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2404 (normal_mod_DEPENDENCIES): Likewise.
2406 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2407 (normal_mod_DEPENDENCIES): Likewise.
2409 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2410 (normal_mod_DEPENDENCIES): Likewise.
2412 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2413 (normal_mod_DEPENDENCIES): Likewise.
2415 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
2416 for waiting after a message is printed.
2417 * normal/main.c (read_config_file): Likewise.
2418 (grub_normal_init): Register grub_env_write_color_normal() and
2419 grub_env_write_color_highlight() hooks. Mark `color_normal' and
2420 `color_highlight' variables as global.
2422 * normal/menu.c (grub_wait_after_message): New function.
2423 (grub_color_menu_normal): New variable. Replaces ...
2424 (GRUB_COLOR_MENU_NORMAL): ... this macro.
2425 (grub_color_menu_highlight): New variable. Replaces ...
2426 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
2427 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
2428 `GRUB_TERM_COLOR_STANDARD'.
2429 (print_message): Use `grub_setcolorstate' to reload colors. Rename
2430 `normal_code' and `highlight_code' to `old_color_normal' and
2431 `old_color_highlight', respectively.
2432 (grub_menu_init_page): Update colors when drawing the menu, based on
2433 `menu_color_normal' and `menu_color_highlight' variables.
2434 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
2435 a message is printed.
2437 2008-01-05 Robert Millan <rmh@aybabtu.com>
2439 * kern/env.c (grub_env_context_open): Propagate hooks for global
2440 variables to new context.
2442 * kern/main.c (grub_set_root_dev): Export `root' variable.
2444 2008-01-05 Robert Millan <rmh@aybabtu.com>
2446 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
2447 discs unconditionaly, since udev and others have options to provide
2450 2008-01-05 Robert Millan <rmh@aybabtu.com>
2452 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
2454 2008-01-04 Christian Franke <franke@computer.org>
2456 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
2459 2008-01-03 Pavel Roskin <proski@gnu.org>
2461 * kern/i386/linuxbios/init.c: Put "void" to all function
2462 declarations with no arguments.
2463 * kern/powerpc/ieee1275/init.c: Likewise.
2464 * term/i386/pc/at_keyboard.c: Likewise.
2465 * term/i386/pc/vga_text.c: Likewise.
2466 * util/grub-mkdevicemap.c: Likewise.
2468 2008-01-02 Robert Millan <rmh@aybabtu.com>
2470 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
2471 message when loaded image is out of bounds.
2472 (grub_multiboot_load_elf64): Likewise.
2474 2008-01-02 Pavel Roskin <proski@gnu.org>
2476 * util/grub.d/10_linux.in: Try version without ".old" when
2477 looking for initrd. It's better to use initrd from the newer
2478 kernel of the same version than no initrd at all.
2480 2008-01-01 Robert Millan <rmh@aybabtu.com>
2482 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
2484 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
2486 * include/grub/video.h: Added grub_video_unmap_color and
2487 grub_video_get_active_render_target.
2488 (grub_video_adapter): Added unmap_color and get_active_render_target.
2490 * video/video.c: Added grub_video_unmap_color and
2491 grub_video_get_active_render_target.
2492 (grub_video_get_info): Changed method to accept NULL pointer as an
2493 argument to allow detection of active video adapter.
2495 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
2496 grub_video_vbe_unmap_color_int.
2497 Added grub_video_vbe_unmap_color and
2498 grub_video_vbe_get_active_render_target.
2499 (grub_video_vbe_adapter): Added unmap_color and
2500 get_active_render_target.
2502 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
2503 with grub_video_vbe_unmap_color_int.
2505 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
2506 (DEFAULT_NORMAL_COLOR): Likewise.
2507 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
2508 (DEFAULT_FG_COLOR): Removed.
2509 (DEFAULT_BG_COLOR): Likewise.
2510 (DEFAULT_CURSOR_COLOR): Changed value.
2511 (grub_virtual_screen): Added standard_color_setting,
2512 normal_color_setting, highlight_color_setting and term_color.
2513 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
2514 (bitmap_width): Added.
2515 (bitmap_height): Likewise.
2517 (set_term_color): Likewise.
2518 (grub_virtual_screen_setup): Changed to use new terminal coloring
2520 (grub_gfxterm_init): Added init for bitmap.
2521 (grub_gfxterm_fini): Added destroy for bitmap.
2522 (redraw_screen_rect): Updated to use background bitmap and new
2524 (scroll_up): Added optimization for case when there is no bitmap.
2525 (grub_gfxterm_cls): Fixed to use correct background color.
2526 (grub_virtual_screen_setcolorstate): Changed to use new terminal
2528 (grub_virtual_screen_setcolor): Likewise.
2529 (grub_virtual_screen_getcolor): Added.
2530 (grub_gfxterm_background_image_cmd): Likewise.
2531 (grub_video_term): Added setcolor and getcolor.
2532 (MOD_INIT): Added registration of background_image command.
2533 (MOD_TERM): Added unregistration for background_image command.
2535 2007-12-30 Pavel Roskin <proski@gnu.org>
2537 * loader/multiboot_loader.c: Fix multiboot command
2538 unregistration. Fix all typos in the word "multiboot".
2540 2007-12-29 Pavel Roskin <proski@gnu.org>
2542 * util/grub.d/10_linux.in: Refactor search for initrd. Add
2543 support for initrd names used in Fedora.
2545 2007-12-26 Bean <bean123ch@gmail.com>
2547 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
2548 (cpio_mod_SOURCES): New variable.
2549 (cpio_mod_CFLAGS): Likewise.
2550 (cpio_mod_LDFLAGS): Likewise.
2552 * fs/cpio.c: New file.
2554 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
2556 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2558 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2560 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2562 2007-12-25 Robert Millan <rmh@aybabtu.com>
2564 * include/grub/term.h (struct grub_term): Add `getcolor' function.
2565 (grub_getcolor): New function.
2567 * kern/term.c (grub_getcolor): New function.
2568 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
2569 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
2570 (print_entry): Set normal and highlight colors to
2571 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
2572 respectively, before printing and restore them to old
2574 (grub_menu_init_page): Likewise. Fill an additional colored space
2575 that would otherwise be left blank.
2577 * term/efi/console.c (grub_console_getcolor): New function.
2578 (struct grub_console_term.getcolor): New variable.
2579 * term/i386/pc/console.c (grub_console_getcolor): New function.
2580 (struct grub_console_term.getcolor): New variable.
2581 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
2582 (struct grub_console_term.getcolor): New variable.
2584 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
2585 (struct grub_console_term.setcolor): Remove variable.
2586 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
2587 (struct grub_console_term.setcolor): Remove variable.
2588 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
2589 (struct grub_console_term.setcolor): Remove variable.
2590 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
2591 (struct grub_console_term.setcolor): Remove variable.
2593 2007-12-25 Robert Millan <rmh@aybabtu.com>
2595 * configure.ac: Search for possible unifont.hex locations, and
2596 define UNIFONT_HEX if found.
2598 * Makefile.in (UNIFONT_HEX): Define variable.
2599 (DATA): Rename to ...
2600 (PKGLIB): ... this. Update all users.
2601 (PKGDATA): New variable.
2602 (pkgdata_IMAGES): Rename to ...
2603 (pkglib_IMAGES): ... this. Update all users.
2604 (pkgdata_MODULES): Rename to ...
2605 (pkglib_MODULES): ... this. Update all users.
2606 (pkgdata_PROGRAMS): Rename to ...
2607 (pkglib_PROGRAMS): ... this. Update all users.
2608 (pkgdata_DATA): Rename to ...
2609 (pkglib_DATA): ... this. Update all users.
2610 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
2611 (unicode.pff, ascii.pff): New rules.
2612 (all-local): Add `$(PKGDATA)' dependency.
2613 (install-local): Process `$(PKGDATA)'.
2615 * util/update-grub_lib.in (font_path): Search for *.pff files in
2616 a few more locations, including `${pkgdata}'.
2618 2007-12-23 Robert Millan <rmh@aybabtu.com>
2620 Patch from Bean <bean123ch@gmail.com>:
2621 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
2624 2007-12-21 Bean <bean123ch@gmail.com>
2626 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
2627 (ntfscomp_mod_SOURCES): New variable.
2628 (ntfscomp_mod_CFLAGS): Likewise.
2629 (ntfscomp_mod_LDFLAGS): Likewise.
2631 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
2632 (grub_probe_SOURCES): Likewise.
2633 (grub_emu_SOURCES): Likewise.
2635 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2636 (grub_emu_SOURCES): Likewise.
2638 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2639 (grub_emu_SOURCES): Likewise.
2641 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2642 (grub_emu_SOURCES): Likewise.
2644 * fs/ntfs.c (grub_ntfscomp_func): New variable.
2645 (read_run_list): Renamed to grub_ntfs_read_run_list.
2646 (decomp_nextvcn): Moved to ntfscomp.c.
2647 (decomp_getch): Likewise.
2648 (decomp_get16): Likewise.
2649 (decomp_block): Likewise.
2650 (read_block): Likewise.
2651 (read_data): Partially moved to ntfscomp.c.
2652 (fixup): Change unsigned to grub_uint16_t.
2653 (read_mft): Change unsigned long to grub_uint32_t.
2654 (read_attr): Likewise.
2655 (read_data): Likewise.
2656 (read_run_data): Likewise.
2657 (read_run_list): Likewise.
2658 (read_mft): Likewise.
2660 * fs/ntfscomp.c: New file.
2662 * include/grub/ntfs.h: New file.
2664 2007-12-16 Robert Millan <rmh@aybabtu.com>
2666 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
2667 IDE disk check, since Linux is known to support 20 IDE disks.
2668 Reported by Colin Watson.
2670 2007-12-15 Bean <bean123ch@gmail.com>
2672 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
2673 (lnxboot_img_SOURCES): New variable.
2674 (lnxboot_img_ASFLAGS): Likewise.
2675 (lnxboot_img_LDFLAGS): Likewise.
2677 * boot/i386/pc/lnxboot.S: New file.
2679 2007-11-24 Pavel Roskin <proski@gnu.org>
2681 * configure.ac: Test if '--build-id=none' is supported by the
2682 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
2683 objcopy to generate incorrect binary files (binutils
2684 2.17.50.0.18-1 as shipped by Fedora 8).
2685 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
2686 linking, so that build ID doesn't break the test.
2688 2007-11-24 Pavel Roskin <proski@gnu.org>
2690 * include/grub/i386/time.h: use "void" in the argument list
2692 * include/grub/powerpc/time.h: Likewise.
2693 * include/grub/sparc64/time.h: Likewise.
2695 2007-11-18 Christian Franke <franke@computer.org>
2697 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
2698 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
2699 This fixes the problem that function keys did not work in grub-emu.
2701 2007-11-18 Christian Franke <franke@computer.org>
2703 * disk/host.c (grub_host_open): Remove attribute unused from
2704 name parameter. Add check for "host". This fixes the problem
2705 that grub-emu does not find partitions.
2707 2007-11-18 Christian Franke <franke@computer.org>
2709 * util/hostfs.c (is_dir): New function.
2710 (grub_hostfs_dir): Handle missing dirent.d_type case.
2711 (grub_hostfs_read): Add missing fseek().
2712 (grub_hostfs_label): Clear label pointer. This fixes a crash
2713 of grub-emu on "ls (host)".
2715 2007-11-18 Christian Franke <franke@computer.org>
2717 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
2718 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
2719 to 64 bit boundary by default.
2721 2007-11-18 Bean <bean123ch@gmail.com>
2723 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
2724 (hexdump_mod_SOURCES): New variable.
2725 (hexdump_mod_CFLAGS): Likewise.
2726 (hexdump_mod_LDFLAGS): Likewise.
2728 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2730 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2732 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2734 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2736 * include/grub/hexdump.h: New file.
2738 * commands/hexdump.c: New file.
2740 2007-11-10 Robert Millan <rmh@aybabtu.com>
2742 * commands/i386/pc/play.c (beep_off): Switch order of arguments
2743 in grub_outb() calls.
2744 (beep_on): Likewise.
2746 2007-11-10 Christian Franke <franke@computer.org>
2748 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
2749 (grub_menu_run): Likewise.
2751 2007-11-10 Robert Millan <rmh@aybabtu.com>
2753 * include/grub/i386/efi/machine.h: New file.
2754 * include/grub/i386/linuxbios/machine.h: Likewise.
2755 * include/grub/i386/pc/machine.h: Likewise.
2756 * include/grub/powerpc/ieee1275/machine.h: Likewise.
2757 * include/grub/sparc64/ieee1275/machine.h: Likewise.
2759 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
2760 (serial_hw_io_addr): New variable.
2761 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
2762 instead of `(unsigned short *) 0x400'.
2764 2007-11-10 Bean <bean123ch@gmail.com>
2766 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2768 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2770 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
2771 (vga_mod_SOURCES): Added.
2772 (vga_mod_CFLAGS): Likewise.
2773 (vga_mod_LDFLAGS): Likewise.
2775 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
2777 (set_map_mask): Likewise.
2778 (set_read_map): Likewise.
2779 (set_read_address): Likewise.
2780 (vga_font): Removed variable.
2781 (get_vga_glyph): Removed function.
2782 (invalidate_char): Likewise.
2783 (write_char): Changed to use grub_font_get_glyph() for font
2785 (grub_vga_putchar): Likewise.
2786 (grub_vga_getcharwidth): Likewise.
2788 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2790 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
2792 (pxeboot_img_LDFLAGS): Likewise.
2793 (diskboot_img_LDFLAGS): Likewise.
2794 (kernel_img_LDFLAGS): Likewise.
2796 2007-11-06 Robert Millan <rmh@aybabtu.com>
2798 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
2799 in grub_outb() calls.
2800 (serial_hw_init): Likewise.
2802 2007-11-05 Robert Millan <rmh@aybabtu.com>
2804 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
2805 spaces. Skip non-regular files.
2807 2007-11-05 Robert Millan <rmh@aybabtu.com>
2809 * kern/disk.c (grub_disk_firmware_fini)
2810 (grub_disk_firmware_is_tainted): New variables.
2812 * include/grub/disk.h (grub_disk_firmware_fini)
2813 (grub_disk_firmware_is_tainted): Likewise.
2815 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
2816 (grub_disk_biosdisk_fini): ... to here.
2817 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
2818 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
2819 is set. Register grub_disk_biosdisk_fini() in
2820 `grub_disk_firmware_fini'.
2822 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
2823 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
2824 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
2825 to finish existing firmware disk interface.
2827 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
2828 (ata_mod_SOURCES): New variable.
2829 (ata_mod_CFLAGS): Likewise.
2830 (ata_mod_LDFLAGS): Likewise.
2832 2007-11-05 Robert Millan <rmh@aybabtu.com>
2834 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
2835 (grub_ata_wait): Reimplement using grub_millisleep().
2837 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
2838 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
2840 2007-11-03 Marco Gerards <marco@gnu.org>
2842 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
2843 (CRTC_ADDR_PORT): New macro.
2844 (CRTC_DATA_PORT): Likewise.
2845 (CRTC_CURSOR): Likewise.
2846 (CRTC_CURSOR_ADDR_HIGH): Likewise.
2847 (CRTC_CURSOR_ADDR_LOW): Likewise.
2848 (update_cursor): New function.
2849 (grub_console_real_putchar): Call `update_cursor'.
2850 (grub_console_gotoxy): Likewise.
2851 (grub_console_cls): Set the default color when clearing the
2853 (grub_console_setcursor): Implemented.
2855 2007-11-03 Marco Gerards <marco@gnu.org>
2857 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
2859 (grub_ata_pio_write): Likewise.
2861 (grub_atapi_identify): Wait after issuing an ATA command.
2862 (grub_atapi_packet): Likewise.
2863 (grub_ata_identify): Likewise.
2864 (grub_ata_readwrite): Likewise.
2866 2007-11-03 Marco Gerards <marco@gnu.org>
2868 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
2869 (grub_ata_pio_write): Likewise.
2870 (grub_ata_readwrite): Use `grub_error', instead of
2871 returning `grub_errno'.
2873 2007-11-03 Marco Gerards <marco@gnu.org>
2875 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2876 grub_ata_pio_write once for every single sector, instead of for
2879 2007-10-31 Robert Millan <rmh@aybabtu.com>
2881 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2883 * conf/i386-linuxbios.rmk: New file.
2885 * kern/i386/pc/hardware.c: Likewise.
2886 * term/i386/pc/at_keyboard.c: Likewise.
2887 * term/i386/pc/vga_text.c: Likewise.
2889 * include/grub/i386/linuxbios/boot.h: Likewise.
2890 * include/grub/i386/linuxbios/console.h: Likewise.
2891 * include/grub/i386/linuxbios/init.h: Likewise.
2892 * include/grub/i386/linuxbios/kernel.h: Likewise.
2893 * include/grub/i386/linuxbios/loader.h: Likewise.
2894 * include/grub/i386/linuxbios/memory.h: Likewise.
2895 * include/grub/i386/linuxbios/serial.h: Likewise.
2896 * include/grub/i386/linuxbios/time.h: Likewise.
2898 * kern/i386/linuxbios/init.c: Likewise.
2899 * kern/i386/linuxbios/startup.S: Likewise.
2900 * kern/i386/linuxbios/table.c: Likewise.
2902 2007-10-31 Marco Gerards <marco@gnu.org>
2904 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2905 (ata_mod_SOURCES): New variable.
2906 (ata_mod_CFLAGS): Likewise.
2907 (ata_mod_LDFLAGS): Likewise.
2909 * disk/ata.c: New file.
2911 * include/grub/disk.h (grub_disk_dev_id): Add
2912 `GRUB_DISK_DEV_ATA_ID'.
2914 2007-10-31 Robert Millan <rmh@aybabtu.com>
2916 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2917 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2919 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2920 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2922 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2925 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2927 2007-10-27 Robert Millan <rmh@aybabtu.com>
2929 * include/grub/types.h (ULONG_MAX): Define macro.
2931 2007-10-22 Robert Millan <rmh@aybabtu.com>
2933 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
2935 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
2937 2007-10-22 Robert Millan <rmh@aybabtu.com>
2939 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2940 (pkgdata_MODULES): Add `biosdisk.mod'.
2941 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2944 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2945 (grub_biosdisk_init): Replace with ...
2946 (GRUB_MOD_INIT(biosdisk)): ... this.
2947 (grub_biosdisk_fini): Replace with ...
2948 (GRUB_MOD_FINI(biosdisk)): ... this.
2950 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2951 (grub_machine_init): Remove call to grub_biosdisk_init().
2952 (grub_machine_fini): Remove call to grub_machine_fini().
2954 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2956 2007-10-22 Robert Millan <rmh@aybabtu.com>
2958 * include/grub/time.h: New file.
2959 * include/grub/i386/time.h: Likewise.
2960 * include/grub/powerpc/time.h: Likewise.
2961 * include/grub/sparc64/time.h: Likewise.
2963 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2965 (KERNEL_MACHINE_TIME_HEADER): ... this.
2966 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2968 (KERNEL_MACHINE_TIME_HEADER): ... this.
2969 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2971 (KERNEL_MACHINE_TIME_HEADER): ... this.
2973 * kern/i386/efi/init.c: Include `<grub/time.h>'.
2974 (grub_millisleep): New function.
2975 * kern/i386/pc/init.c: Include `<grub/time.h>'.
2976 (grub_millisleep): New function.
2977 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2978 Remove `grub/machine/time.h' include.
2979 (grub_millisleep): New function.
2980 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2981 Remove `grub/machine/time.h' include.
2982 (grub_millisleep): New function.
2984 * include/grub/misc.h (grub_div_roundup): New function.
2986 * kern/misc.c: Include `<grub/time.h>'.
2987 (grub_millisleep_generic): New function.
2989 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2991 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2993 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2994 `machine/time.h'. Add `time.h'.
2995 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2997 2007-10-21 Robert Millan <rmh@aybabtu.com>
2999 * include/grub/misc.h (grub_max): New function.
3001 2007-10-21 Robert Millan <rmh@aybabtu.com>
3003 * util/misc.c (grub_util_info): Call fflush() before returning.
3005 2007-10-20 Robert Millan <rmh@aybabtu.com>
3007 * genmk.rb (Image): Copy `extra_flags' from here ...
3008 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
3010 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
3011 to `argc' and `args' arguments.
3013 2007-10-17 Robert Millan <rmh@aybabtu.com>
3015 * kern/i386/loader.S: New file.
3017 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
3018 * kern/i386/loader.S (grub_linux_prot_size)... to here.
3019 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
3020 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
3021 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
3022 * kern/i386/loader.S (grub_linux_real_addr)... to here.
3023 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
3024 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
3025 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
3026 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
3027 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
3028 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
3029 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
3030 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
3032 * kern/i386/realmode.S: New file.
3034 * kern/i386/pc/startup.S (protstack): Moved from here ...
3035 * kern/i386/realmode.S (protstack)... to here.
3036 * kern/i386/pc/startup.S (gdt): Moved from here ...
3037 * kern/i386/realmode.S (gdt)... to here.
3038 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
3039 * kern/i386/realmode.S (prot_to_real)... to here.
3041 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
3042 `kern/i386/realmode.S'.
3044 2007-10-17 Robert Millan <rmh@aybabtu.com>
3046 * include/grub/i386/loader.h: New file.
3048 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
3049 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3050 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3051 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3052 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
3053 * include/grub/i386/loader.h (grub_linux_prot_size)
3054 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3055 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3056 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3057 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
3059 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
3061 2007-10-15 Robert Millan <rmh@aybabtu.com>
3063 * normal/misc.c (grub_normal_print_device_info): Do not probe for
3064 filesystem when dev->disk is unset.
3065 Do probe for filesystem even when dev->disk->has_partitions is set.
3066 In case a filesystem is found, always report it.
3067 In case it isn't, if dev->disk->has_partitions is set, report that
3068 a partition table was found instead of reporting that no filesystem
3069 could be identified.
3071 2007-10-12 Robert Millan <rmh@aybabtu.com>
3073 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
3074 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
3076 * include/grub/types.h (grub_host_to_target16): New macro.
3077 (grub_host_to_target32): Likewise.
3078 (grub_host_to_target64): Likewise.
3079 (grub_target_to_host16): Likewise.
3080 (grub_target_to_host32): Likewise.
3081 (grub_target_to_host64): Likewise.
3083 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3085 (GRUB_MOD_ALIGN): ...this. Update all users.
3087 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
3088 grub_host_to_target32.
3089 Replace grub_be_to_cpu32 with grub_target_to_host32.
3090 (load_modules): Likewise.
3091 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
3092 Replace grub_be_to_cpu32 with grub_target_to_host32.
3093 Replace grub_cpu_to_be16 with grub_host_to_target16.
3094 Replace grub_cpu_to_be32 grub_host_to_target32.
3096 2007-10-12 Robert Millan <rmh@aybabtu.com>
3098 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
3099 * util/elf/grub-mkimage.c: ... here.
3101 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
3102 `util/powerpc/ieee1275/grub-mkimage.c'.
3104 2007-10-07 Robert Millan <rmh@aybabtu.com>
3106 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
3107 and make it easier to figure out.
3108 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
3109 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
3110 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
3111 leave us with less than HEAP_MIN_SIZE total heap.
3112 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
3114 2007-10-03 Robert Millan <rmh@aybabtu.com>
3116 * include/grub/i386/io.h: New file.
3117 * commands/i386/pc/play.c (inb): Removed.
3119 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3121 * term/i386/pc/serial.c (inb): Removed.
3123 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3125 * term/i386/pc/vga.c (inb): Removed.
3127 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3130 2007-10-02 Robert Millan <rmh@aybabtu.com>
3132 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
3133 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3134 Reported by Marcin Kurek.
3136 2007-09-07 Robert Millan <rmh@aybabtu.com>
3138 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
3139 SmartFirmware version updates (as released by Sven Luther), and avoid
3140 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
3141 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
3144 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3147 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
3148 when merging two regions.
3150 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3152 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
3153 * normal/completion.c (grub_normal_do_completion): Likewise.
3154 Reported by Hitoshi Ozeki.
3156 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3158 Do not use devices at boot in chainloading.
3160 * loader/i386/pc/chainloader.c (boot_drive): New variable.
3161 (boot_part_addr): Likewise.
3162 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
3163 with BOOT_DRIVE and BOOT_PART_ADDR.
3164 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
3165 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
3167 2007-08-29 Robert Millan <rmh@aybabtu.com>
3169 Patch from Simon Peter <dn.tlp@gmx.net>:
3170 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
3171 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
3172 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
3173 util/i386/pc/grub-setup.c_DEPENDENCIES.
3174 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
3175 util/grub-probe.c_DEPENDENCIES.
3176 * conf/powerpc-ieee1275.rmk: Likewise.
3178 2007-08-28 Robert Millan <rmh@aybabtu.com>
3180 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
3181 to tell grub-mkdevicemap how to name devices.
3182 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
3185 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
3186 util/i386/get_disk_name.c.
3187 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
3188 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
3189 util/ieee1275/get_disk_name.c.
3191 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
3193 * DISTLIST: Add util/i386/get_disk_name.c and
3194 util/ieee1275/get_disk_name.c.
3196 * util/grub-mkdevicemap.c: Replace device naming logic with
3197 grub_util_get_disk_name() calls.
3199 2007-08-20 Robert Millan <rmh@aybabtu.com>
3201 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
3202 (so that it works for both plural and singular quantities).
3204 2007-08-05 Robert Millan <rmh@aybabtu.com>
3206 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
3207 so that [xz] isn't taken into account when determining order.
3209 2007-08-02 Marco Gerards <marco@gnu.org>
3211 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
3212 `include/multiboot2.h', `include/grub/elfload.h',
3213 `include/multiboot.h', `include/grub/multiboot.h',
3214 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
3215 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
3216 `kern/elf.c', `loader/multiboot_loader.c',
3217 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
3218 `loader/i386/pc/multiboot2.c',
3219 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
3220 `util/i386/pc/grub-mkrescue.in'. Remove
3221 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
3222 `include/grub/i386/pc/util/biosdisk.h' and
3223 `include/grub/powerpc/ieee1275/multiboot.h'.
3225 2007-08-02 Bean <bean123ch@gmail.com>
3227 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
3228 (ntfs_mod_SOURCES): New variable.
3229 (ntfs_mod_CFLAGS): Likewise.
3230 (ntfs_mod_LDFLAGS): Likewise.
3232 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
3233 (grub_probe_SOURCES): Likewise.
3234 (grub_emu_SOURCES): Likewise.
3236 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
3237 (grub_emu_SOURCES): Likewise.
3239 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
3240 (grub_emu_SOURCES): Likewise.
3242 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
3244 * fs/ntfs.c: New file.
3246 2007-08-02 Bean <bean123ch@gmail.com>
3248 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
3250 * file.h (grub_file): Likewise.
3252 * fshelp.h (grub_fshelp_read_file): Likewise.
3254 * util/i386/pc/grub-setup.c (setup): Likewise.
3255 (save_first_sector): Likewise.
3256 (save_blocklists): Likewise.
3258 * fs/affs.c (grub_affs_read_file): Likewise.
3260 * fs/ext2.c (grub_ext2_read_file): Likewise.
3262 * fs/fat.c (grub_fat_read_data): Likewise.
3264 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
3266 * fs/hfs.c (grub_hfs_read_file): Likewise.
3268 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
3270 * fs/jfs.c (grub_jfs_read_file): Likewise.
3272 * fs/minix.c (grub_minix_read_file): Likewise.
3274 * fs/sfs.c (grub_sfs_read_file): Likewise.
3276 * fs/ufs.c (grub_ufs_read_file): Likewise.
3278 * fs/xfs.c (grub_xfs_read_file): Likewise.
3280 * command/blocklist.c (read_blocklist): Likewise.
3281 (print_blocklist): Likewise.
3283 2007-08-02 Marco Gerards <marco@gnu.org>
3285 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
3288 * disk/host.c: New file.
3290 * util/hostfs.c: Likewise.
3292 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
3293 return `GRUB_ERR_BAD_FS'.
3294 * fs/sfs.c (grub_sfs_mount): Likewise.
3295 * fs/xfs.c (grub_xfs_mount): Likewise.
3297 * include/grub/disk.h (enum grub_disk_dev_id): Add
3298 `GRUB_DISK_DEVICE_HOST_ID'.
3300 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
3302 2007-07-24 Jerone Young <jerone@gmail.com>
3304 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
3305 modules for compilation.
3306 * conf/powerpc-ieee1275.rmk: Likewise.
3308 * include/multiboot.h: Move multiboot definitions to one file. Rename
3309 many definitions to not get grub specific.
3310 * include/multiboot2.h: Create header with multiboot 2 definitions.
3311 * include/grub/multiboot.h: Header for grub specific function
3312 prototypes and definitions.
3313 * include/grub/multiboot2.h: Likewise.
3314 * include/grub/multiboot_loader.h: Likewise.
3315 * include/grub/i386/pc/multiboot.h: Removed.
3316 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
3318 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
3319 and 2 to allow for one multiboot and module commands.
3320 * loader/multiboot2.c: Add multiboot2 functionality.
3321 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
3322 and definition names.
3323 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
3325 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
3326 ieee1275 specific multiboot2 code.
3328 * kern/i386/pc/startup.S: Change headers and definition names for
3329 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
3331 2007-07-22 Robert Millan <rmh@aybabtu.com>
3333 * geninitheader.sh: Process file specified in first parameter rather
3334 than hardcoding grub_modules_init.lst.
3335 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
3336 than hardcoding grub_modules_init.h.
3338 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
3339 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
3340 grub_probe_init.[ch] and grub_setup_init.[ch].
3342 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
3343 grub_modules_init.h with grub_emu_init.h.
3344 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
3345 grub_probe_init.[ch] files.
3346 * conf/i386-efi.rmk: Likewise.
3347 * conf/i386-pc.rmk: Likewise.
3348 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
3349 grub_setup_init.[ch] files.
3351 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
3352 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
3353 to initialize modules rather than a list of hardcoded functions.
3354 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
3355 grub_init_all() to initialize modules rather than a list of hardcoded
3358 2007-07-22 Robert Millan <rmh@aybabtu.com>
3360 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
3361 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
3363 2007-07-22 Robert Millan <rmh@aybabtu.com>
3365 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3366 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
3367 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
3368 flag when running on SmartFirmware.
3369 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
3370 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
3373 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3374 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
3375 rather than decreasing it.
3377 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
3378 there's not enough space to do it, fail in the same way as when it
3379 can't be done because there are no partitions.
3381 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
3382 when nvsetenv failed.
3384 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
3386 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
3387 because this rule is automatically generated.
3388 (grub-mkrescue): Removed for the same reason as above.
3390 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
3392 Migrate to GNU General Public License Version 3.
3394 * COPYING: Replaced with the plain text version of GPLv3.
3396 * config.guess: Updated from gnulib.
3397 * config.sub: Likewise.
3399 * geninit.sh: Output a GPLv3 copyright notice.
3400 * geninitheader.sh: Likewise.
3401 * genmodsrc.sh: Likewise.
3402 * gensymlist.sh.in: Likewise.
3404 * boot/i386/pc/boot.S: Upgraded to GPLv3.
3405 * boot/i386/pc/diskboot.S: Likewise.
3406 * boot/i386/pc/pxeboot.S: Likewise.
3407 * commands/blocklist.c: Likewise.
3408 * commands/boot.c: Likewise.
3409 * commands/cat.c: Likewise.
3410 * commands/cmp.c: Likewise.
3411 * commands/configfile.c: Likewise.
3412 * commands/echo.c: Likewise.
3413 * commands/help.c: Likewise.
3414 * commands/ls.c: Likewise.
3415 * commands/search.c: Likewise.
3416 * commands/terminal.c: Likewise.
3417 * commands/test.c: Likewise.
3418 * commands/videotest.c: Likewise.
3419 * commands/i386/cpuid.c: Likewise.
3420 * commands/i386/pc/halt.c: Likewise.
3421 * commands/i386/pc/play.c: Likewise.
3422 * commands/i386/pc/reboot.c: Likewise.
3423 * commands/i386/pc/vbeinfo.c: Likewise.
3424 * commands/i386/pc/vbetest.c: Likewise.
3425 * commands/ieee1275/halt.c: Likewise.
3426 * commands/ieee1275/reboot.c: Likewise.
3427 * commands/ieee1275/suspend.c: Likewise.
3428 * disk/loopback.c: Likewise.
3429 * disk/lvm.c: Likewise.
3430 * disk/raid.c: Likewise.
3431 * disk/efi/efidisk.c: Likewise.
3432 * disk/i386/pc/biosdisk.c: Likewise.
3433 * disk/ieee1275/ofdisk.c: Likewise.
3434 * font/manager.c: Likewise.
3435 * fs/affs.c: Likewise.
3436 * fs/ext2.c: Likewise.
3437 * fs/fat.c: Likewise.
3438 * fs/fshelp.c: Likewise.
3439 * fs/hfs.c: Likewise.
3440 * fs/hfsplus.c: Likewise.
3441 * fs/iso9660.c: Likewise.
3442 * fs/jfs.c: Likewise.
3443 * fs/minix.c: Likewise.
3444 * fs/sfs.c: Likewise.
3445 * fs/ufs.c: Likewise.
3446 * fs/xfs.c: Likewise.
3447 * hello/hello.c: Likewise.
3448 * include/grub/acorn_filecore.h: Likewise.
3449 * include/grub/arg.h: Likewise.
3450 * include/grub/bitmap.h: Likewise.
3451 * include/grub/boot.h: Likewise.
3452 * include/grub/cache.h: Likewise.
3453 * include/grub/device.h: Likewise.
3454 * include/grub/disk.h: Likewise.
3455 * include/grub/dl.h: Likewise.
3456 * include/grub/elfload.h: Likewise.
3457 * include/grub/env.h: Likewise.
3458 * include/grub/err.h: Likewise.
3459 * include/grub/file.h: Likewise.
3460 * include/grub/font.h: Likewise.
3461 * include/grub/fs.h: Likewise.
3462 * include/grub/fshelp.h: Likewise.
3463 * include/grub/gzio.h: Likewise.
3464 * include/grub/hfs.h: Likewise.
3465 * include/grub/kernel.h: Likewise.
3466 * include/grub/loader.h: Likewise.
3467 * include/grub/lvm.h: Likewise.
3468 * include/grub/misc.h: Likewise.
3469 * include/grub/mm.h: Likewise.
3470 * include/grub/net.h: Likewise.
3471 * include/grub/normal.h: Likewise.
3472 * include/grub/parser.h: Likewise.
3473 * include/grub/partition.h: Likewise.
3474 * include/grub/pc_partition.h: Likewise.
3475 * include/grub/raid.h: Likewise.
3476 * include/grub/rescue.h: Likewise.
3477 * include/grub/script.h: Likewise.
3478 * include/grub/setjmp.h: Likewise.
3479 * include/grub/symbol.h: Likewise.
3480 * include/grub/term.h: Likewise.
3481 * include/grub/terminfo.h: Likewise.
3482 * include/grub/tparm.h: Likewise.
3483 * include/grub/types.h: Likewise.
3484 * include/grub/video.h: Likewise.
3485 * include/grub/efi/api.h: Likewise.
3486 * include/grub/efi/chainloader.h: Likewise.
3487 * include/grub/efi/console.h: Likewise.
3488 * include/grub/efi/console_control.h: Likewise.
3489 * include/grub/efi/disk.h: Likewise.
3490 * include/grub/efi/efi.h: Likewise.
3491 * include/grub/efi/pe32.h: Likewise.
3492 * include/grub/efi/time.h: Likewise.
3493 * include/grub/i386/linux.h: Likewise.
3494 * include/grub/i386/setjmp.h: Likewise.
3495 * include/grub/i386/types.h: Likewise.
3496 * include/grub/i386/efi/kernel.h: Likewise.
3497 * include/grub/i386/efi/loader.h: Likewise.
3498 * include/grub/i386/efi/time.h: Likewise.
3499 * include/grub/i386/pc/biosdisk.h: Likewise.
3500 * include/grub/i386/pc/boot.h: Likewise.
3501 * include/grub/i386/pc/chainloader.h: Likewise.
3502 * include/grub/i386/pc/console.h: Likewise.
3503 * include/grub/i386/pc/init.h: Likewise.
3504 * include/grub/i386/pc/kernel.h: Likewise.
3505 * include/grub/i386/pc/loader.h: Likewise.
3506 * include/grub/i386/pc/memory.h: Likewise.
3507 * include/grub/i386/pc/multiboot.h: Likewise.
3508 * include/grub/i386/pc/serial.h: Likewise.
3509 * include/grub/i386/pc/time.h: Likewise.
3510 * include/grub/i386/pc/vbe.h: Likewise.
3511 * include/grub/i386/pc/vbeblit.h: Likewise.
3512 * include/grub/i386/pc/vbefill.h: Likewise.
3513 * include/grub/i386/pc/vbeutil.h: Likewise.
3514 * include/grub/i386/pc/vga.h: Likewise.
3515 * include/grub/ieee1275/ieee1275.h: Likewise.
3516 * include/grub/ieee1275/ofdisk.h: Likewise.
3517 * include/grub/powerpc/libgcc.h: Likewise.
3518 * include/grub/powerpc/setjmp.h: Likewise.
3519 * include/grub/powerpc/types.h: Likewise.
3520 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
3521 * include/grub/powerpc/ieee1275/console.h: Likewise.
3522 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
3523 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
3524 * include/grub/powerpc/ieee1275/loader.h: Likewise.
3525 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
3526 * include/grub/powerpc/ieee1275/time.h: Likewise.
3527 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
3528 * include/grub/sparc64/libgcc.h: Likewise.
3529 * include/grub/sparc64/setjmp.h: Likewise.
3530 * include/grub/sparc64/types.h: Likewise.
3531 * include/grub/sparc64/ieee1275/console.h: Likewise.
3532 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
3533 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
3534 * include/grub/sparc64/ieee1275/time.h: Likewise.
3535 * include/grub/util/biosdisk.h: Likewise.
3536 * include/grub/util/getroot.h: Likewise.
3537 * include/grub/util/lvm.h: Likewise.
3538 * include/grub/util/misc.h: Likewise.
3539 * include/grub/util/raid.h: Likewise.
3540 * include/grub/util/resolve.h: Likewise.
3541 * io/gzio.c: Likewise.
3542 * kern/device.c: Likewise.
3543 * kern/disk.c: Likewise.
3544 * kern/dl.c: Likewise.
3545 * kern/elf.c: Likewise.
3546 * kern/env.c: Likewise.
3547 * kern/err.c: Likewise.
3548 * kern/file.c: Likewise.
3549 * kern/fs.c: Likewise.
3550 * kern/loader.c: Likewise.
3551 * kern/main.c: Likewise.
3552 * kern/misc.c: Likewise.
3553 * kern/mm.c: Likewise.
3554 * kern/parser.c: Likewise.
3555 * kern/partition.c: Likewise.
3556 * kern/rescue.c: Likewise.
3557 * kern/term.c: Likewise.
3558 * kern/efi/efi.c: Likewise.
3559 * kern/efi/init.c: Likewise.
3560 * kern/efi/mm.c: Likewise.
3561 * kern/i386/dl.c: Likewise.
3562 * kern/i386/efi/init.c: Likewise.
3563 * kern/i386/efi/startup.S: Likewise.
3564 * kern/i386/pc/init.c: Likewise.
3565 * kern/i386/pc/lzo1x.S: Likewise.
3566 * kern/i386/pc/startup.S: Likewise.
3567 * kern/ieee1275/ieee1275.c: Likewise.
3568 * kern/powerpc/cache.S: Likewise.
3569 * kern/powerpc/dl.c: Likewise.
3570 * kern/powerpc/ieee1275/cmain.c: Likewise.
3571 * kern/powerpc/ieee1275/crt0.S: Likewise.
3572 * kern/powerpc/ieee1275/init.c: Likewise.
3573 * kern/powerpc/ieee1275/openfw.c: Likewise.
3574 * kern/sparc64/cache.S: Likewise.
3575 * kern/sparc64/dl.c: Likewise.
3576 * kern/sparc64/ieee1275/init.c: Likewise.
3577 * kern/sparc64/ieee1275/openfw.c: Likewise.
3578 * loader/efi/chainloader.c: Likewise.
3579 * loader/efi/chainloader_normal.c: Likewise.
3580 * loader/i386/efi/linux.c: Likewise.
3581 * loader/i386/efi/linux_normal.c: Likewise.
3582 * loader/i386/pc/chainloader.c: Likewise.
3583 * loader/i386/pc/chainloader_normal.c: Likewise.
3584 * loader/i386/pc/linux.c: Likewise.
3585 * loader/i386/pc/linux_normal.c: Likewise.
3586 * loader/i386/pc/multiboot.c: Likewise.
3587 * loader/i386/pc/multiboot_normal.c: Likewise.
3588 * loader/powerpc/ieee1275/linux.c: Likewise.
3589 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3590 * normal/arg.c: Likewise.
3591 * normal/cmdline.c: Likewise.
3592 * normal/command.c: Likewise.
3593 * normal/completion.c: Likewise.
3594 * normal/execute.c: Likewise.
3595 * normal/function.c: Likewise.
3596 * normal/lexer.c: Likewise.
3597 * normal/main.c: Likewise.
3598 * normal/menu.c: Likewise.
3599 * normal/menu_entry.c: Likewise.
3600 * normal/misc.c: Likewise.
3601 * normal/parser.y: Likewise.
3602 * normal/script.c: Likewise.
3603 * normal/i386/setjmp.S: Likewise.
3604 * normal/powerpc/setjmp.S: Likewise.
3605 * normal/sparc64/setjmp.S: Likewise.
3606 * partmap/acorn.c: Likewise.
3607 * partmap/amiga.c: Likewise.
3608 * partmap/apple.c: Likewise.
3609 * partmap/gpt.c: Likewise.
3610 * partmap/pc.c: Likewise.
3611 * partmap/sun.c: Likewise.
3612 * term/gfxterm.c: Likewise.
3613 * term/terminfo.c: Likewise.
3614 * term/efi/console.c: Likewise.
3615 * term/i386/pc/console.c: Likewise.
3616 * term/i386/pc/serial.c: Likewise.
3617 * term/i386/pc/vesafb.c: Likewise.
3618 * term/i386/pc/vga.c: Likewise.
3619 * term/ieee1275/ofconsole.c: Likewise.
3620 * util/biosdisk.c: Likewise.
3621 * util/console.c: Likewise.
3622 * util/genmoddep.c: Likewise.
3623 * util/getroot.c: Likewise.
3624 * util/grub-emu.c: Likewise.
3625 * util/grub-mkdevicemap.c: Likewise.
3626 * util/grub-probe.c: Likewise.
3627 * util/lvm.c: Likewise.
3628 * util/misc.c: Likewise.
3629 * util/raid.c: Likewise.
3630 * util/resolve.c: Likewise.
3631 * util/update-grub.in: Likewise.
3632 * util/update-grub_lib.in: Likewise.
3633 * util/grub.d/00_header.in: Likewise.
3634 * util/grub.d/10_hurd.in: Likewise.
3635 * util/grub.d/10_linux.in: Likewise.
3636 * util/i386/efi/grub-install.in: Likewise.
3637 * util/i386/efi/grub-mkimage.c: Likewise.
3638 * util/i386/pc/grub-install.in: Likewise.
3639 * util/i386/pc/grub-mkimage.c: Likewise.
3640 * util/i386/pc/grub-mkrescue.in: Likewise.
3641 * util/i386/pc/grub-setup.c: Likewise.
3642 * util/i386/pc/misc.c: Likewise.
3643 * util/powerpc/ieee1275/grub-install.in: Likewise.
3644 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
3645 * util/powerpc/ieee1275/misc.c: Likewise.
3646 * video/bitmap.c: Likewise.
3647 * video/video.c: Likewise.
3648 * video/i386/pc/vbe.c: Likewise.
3649 * video/i386/pc/vbeblit.c: Likewise.
3650 * video/i386/pc/vbefill.c: Likewise.
3651 * video/i386/pc/vbeutil.c: Likewise.
3652 * video/readers/tga.c: Likewise.
3654 2007-07-02 Robert Millan <rmh@aybabtu.com>
3656 * conf/i386-efi.rmk: Replace obsolete reference to
3657 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
3658 with util/getroot.c.
3659 * conf/powerpc-ieee1275.rmk: Likewise.
3660 * conf/sparc64-ieee1275.rmk: Likewise.
3662 * util/grub-emu.c (main): Fix unchecked pointer handling.
3664 2007-07-02 Robert Millan <rmh@aybabtu.com>
3666 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
3667 invocation to fail, in order to support partition-less media.
3669 * util/i386/pc/grub-install.in: Likewise.
3671 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
3672 which fs or partmap modules are needed (akin to its sister scripts).
3674 Also use grub-probe to get rid of unportable /proc/mounts check.
3676 Print the same informational message that the other scripts do, before
3679 2007-06-23 Robert Millan <rmh@aybabtu.com>
3681 * util/update-grub_lib.in (font_path): New function. Determine wether
3682 a font file can be found and, if so, echo the GRUB path to it.
3684 * util/update-grub.in: Handle multiple terminals depending on user
3685 input, platform availability and font file presence. Propagate
3686 variables of our findings to /etc/grub.d/ children.
3688 * util/grub.d/00_header.in: Handle multiple terminals, based on
3689 environment setup by update-grub.
3691 2007-06-23 Robert Millan <rmh@aybabtu.com>
3693 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
3695 2007-06-21 Robert Millan <rmh@aybabtu.com>
3697 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
3698 indicate end of data section in kernel image.
3699 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
3700 GRUB_KERNEL_MACHINE_DATA_END.
3702 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
3704 * kern/i386/efi/startup.S: Likewise.
3706 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
3707 during image generation. Implement --prefix option to override this
3709 * util/i386/efi/grub-mkimage.c: Likewise.
3711 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
3712 code to make path relative to its root into a separate function.
3714 * util/i386/pc/grub-install.in: Use newly provided
3715 make_system_path_relative_to_its_root() to convert ${grubdir}, then
3716 pass the result to grub-install --prefix.
3718 2007-06-13 Robert Millan <rmh@aybabtu.com>
3720 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
3722 * util/grub-emu.c: Use above definitions from misc.h instead of
3724 * util/grub-mkdevicemap.c: Likewise.
3725 * util/i386/pc/grub-setup.c: Likewise.
3726 * util/grub-probe.c: Likewise.
3727 (probe): Abort with grub_util_error() when either
3728 grub_guess_root_device or grub_util_get_grub_dev fails.
3730 2007-06-12 Robert Millan <rmh@aybabtu.com>
3732 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
3734 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
3736 * util/grub-probe.c (probe): Likewise for "drive_name".
3738 2007-06-11 Robert Millan <rmh@aybabtu.com>
3740 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
3741 not just the cdrom one.
3743 2007-06-11 Robert Millan <rmh@aybabtu.com>
3745 * util/i386/pc/grub-mkrescue.in: Add "set -e".
3746 Add --pkglibdir=DIR option to override pkglibdir.
3747 Mention --image-type=TYPE in help output.
3748 Fix --grub-mkimage (it was a no-op).
3749 Abort gracefuly when no parameter is given.
3751 2007-06-11 Robert Millan <rmh@aybabtu.com>
3753 * util/i386/pc/grub-mkrescue.in: New file.
3754 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
3755 * Makefile.in: Handle bin_SCRIPTS.
3757 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
3759 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
3760 list of video modes.
3762 2007-06-06 Robert Millan <rmh@aybabtu.com>
3764 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
3765 file doesn't exist, or if it is in a filesystem grub can't read.
3767 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
3768 not abort if GRUB_DRIVE could not be defined. Rearrange generated
3769 header comment to fit in 80 columns when the variables are resolved.
3771 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
3772 could be identified by update-grub. Remove redundant check for
3773 unifont.pff existance (since convert_system_path_to_grub_path now
3776 2007-06-04 Robert Millan <rmh@aybabtu.com>
3778 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
3780 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
3782 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
3784 2007-06-04 Robert Millan <rmh@aybabtu.com>
3786 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
3788 * include/grub/partition.h: Declare grub_apple_partition_map_init and
3789 grub_apple_partition_map_fini.
3792 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
3793 to access >2 TiB disks).
3795 Print disk->total_sectors with %llu instead of %lu, since this
3796 variable is always 64-bit (prevents wrong disk size from being displayed
3797 on either >2 TiB disk or big-endian CPU).
3799 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
3800 into a generic case that supports all (sane) partition maps.
3802 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
3805 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
3806 and grub_apple_partition_map_fini() after that.
3808 2007-06-01 Robert Millan <rmh@aybabtu.com>
3810 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
3812 * util/grub.d/00_header.in: Only enable gfxterm when
3813 convert_system_path_to_grub_path() succeeds.
3815 2007-05-20 Robert Millan <rmh@aybabtu.com>
3817 * util/update-grub_lib.in: New file.
3818 * DISTLIST: Add update-grub_lib.in.
3819 * conf/common.rmk: Generate update-grub_lib and install it in
3821 * Makefile.in: Add install routine for $(lib_DATA).
3823 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
3824 function provided by update-grub_lib to support arbitrary paths of
3826 * util/update-grub.in: Use convert_system_path_to_grub_path() to
3827 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
3829 2007-05-19 Robert Millan <rmh@aybabtu.com>
3831 * commands/i386/cpuid.c: New module.
3833 * conf/i386-efi.rmk: Enable cpuid.mod.
3834 * conf/i386-pc.rmk: Likewise.
3836 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3838 * kern/disk.c (grub_disk_read): Check return value of
3841 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3843 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
3845 * disk/raid.c (grub_raid_open): Likewise.
3847 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3849 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
3850 stack instead of on the heap.
3852 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
3853 before doing a read on it.
3855 * configure.ac: Only use -fno-stack-protector for the target
3858 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3860 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
3861 __attribute_ ((unused)) to mode_type argument.
3863 * util/getroot.c (grub_guess_root_device): Fix #endif.
3865 * kern/misc.c (memcmp): Fix prototype.
3867 * include/grub/partition.h [GRUB_UTIL]
3868 (grub_gpt_partition_map_init): Add prototype.
3869 (grub_gpt_partition_map_fini): Likewise.
3871 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
3874 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3875 (grub_fat_read_data): Likewise.
3876 (grub_fat_find_dir): Likewise.
3878 * font/manager.c (find_glyph): Make table a const.
3879 (grub_font_get_glyph): Remove bitmap from if statement.
3881 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
3883 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3884 code, first search for device in /dev/mapper, then in /dev.
3885 (grub_util_get_grub_dev): New function.
3886 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3888 * util/grub-probe.c (probe): Remove check for RAID, call
3889 grub_util_get_grub_dev() instead of
3890 grub_util_biosdisk_get_grub_dev().
3891 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3892 grub_util_biosdisk_get_grub_dev().
3893 * util/i386/pc/grub-setup.c (main): Likewise.
3895 2007-05-16 Robert Millan <rmh@aybabtu.com>
3897 * DISTLIST: Update for the latest changes.
3898 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3899 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3900 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3901 grub/util/biosdisk.h.
3902 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3903 grub/util/biosdisk.h.
3905 2007-05-16 Robert Millan <rmh@aybabtu.com>
3907 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3909 2007-05-16 Robert Millan <rmh@aybabtu.com>
3911 * util/i386/efi/grub-install.in: New.
3912 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3913 newly added grub-install.
3914 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3916 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3917 grub/util/biosdisk.h.
3918 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3919 grub/util/biosdisk.h.
3921 2007-05-16 Robert Millan <rmh@aybabtu.com>
3923 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3924 * include/grub/util/biosdisk.h: ... here.
3925 * util/i386/pc/biosdisk.c: Moved to ...
3926 * util/biosdisk.c: ... here.
3927 * util/i386/pc/getroot.c: Moved to ...
3928 * util/getroot.c: ... here.
3929 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3930 * util/grub-mkdevicemap.c: ... here.
3931 * util/i386/pc/grub-probe.c: Moved to ...
3932 * util/grub-probe.c: ... here.
3934 2007-05-15 Robert Millan <rmh@aybabtu.com>
3936 * util/update-grub.in: Remove duplicated line in grub.cfg header
3939 2007-05-13 Robert Millan <rmh@aybabtu.com>
3941 * util/update-grub.in: Fix a few assumptions about the devices holding
3942 /, /boot and /boot/grub being the same.
3943 * util/grub.d/00_header.in: Likewise.
3944 * util/grub.d/10_hurd.in: Likewise.
3945 * util/grub.d/10_linux.in: Likewise.
3947 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3948 patterns. Use that to define the `.old' suffix as older than `'.
3950 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3952 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3953 the grub.cfg header message.
3955 2007-05-11 Robert Millan <rmh@aybabtu.com>
3957 * util/update-grub.in: Create device.map if it doesn't already exist,
3958 before attempting to run grub-probe.
3959 Check for grub-probe and grub-mkdevicemap with the same code
3960 grub-install is using.
3963 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
3965 * Makefile.in: Add the datarootdir autoconf variable.
3967 2007-05-09 Robert Millan <rmh@aybabtu.com>
3969 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3970 fail gracefuly if dev->disk->partition == NULL.
3972 2007-05-07 Robert Millan <rmh@aybabtu.com>
3974 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3975 determine partition map module.
3976 * util/i386/pc/grub-install.in: Use this feature to decide which
3977 partition module to load, instead of hardcoding pc and gpt.
3979 2007-05-07 Robert Millan <rmh@aybabtu.com>
3981 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3982 source directory differs from build directory.
3984 2007-05-05 Robert Millan <rmh@aybabtu.com>
3986 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3989 2007-05-05 Robert Millan <rmh@aybabtu.com>
3991 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3993 2007-05-05 Robert Millan <rmh@aybabtu.com>
3995 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3996 command-line arguments via ${GRUB_CMDLINE_LINUX}.
3998 2007-05-05 Robert Millan <rmh@aybabtu.com>
4000 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
4001 (grub_probe_SOURCES): Likewise.
4002 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
4003 GPT and initialize dos_part and bsd_part accordingly.
4004 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
4006 (main): Activate gpt module for use during partition identification,
4007 and deactivate it afterwards.
4008 * util/i386/pc/grub-install.in: Add gpt module to core.img.
4009 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
4010 partition identification, and deactivate it afterwards.
4012 2007-05-05 Robert Millan <rmh@aybabtu.com>
4014 * term/i386/pc/console.c (grub_console_fini): Call
4015 grub_term_set_current() before grub_term_unregister().
4017 2007-05-04 Robert Millan <rmh@aybabtu.com>
4019 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
4020 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
4021 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
4022 and update-grub_DATA.
4023 * conf/common.rmk: Build and install update-grub components.
4024 * conf/common.mk: Regenerate.
4025 * util/update-grub.in: New. Core of update-grub.
4026 * util/grub.d/00_header.in: New. Generates grub.cfg header.
4027 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
4028 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
4029 * util/grub.d/README: New. Document grub.d directory layout.
4031 2007-05-01 Robert Millan <rmh@aybabtu.com>
4033 * util/grub-emu.c: Move initialization functions
4034 grub_util_biosdisk_init() and grub_init_all() before
4035 grub_util_biosdisk_get_grub_dev(), which relies on them.
4037 2007-04-19 Robert Millan <rmh@aybabtu.com>
4039 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
4042 2007-04-18 Jerone Young <jerone@gmail.com>
4044 * kernel/elf.c: Add missing parenthesis for conditional statement
4047 2007-04-10 Jerone Young <jerone@gmail.com>
4049 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
4050 continue on and look for device node with real device name.
4052 2007-04-10 Jerone Young <jerone@gmail.com>
4054 * configure.ac: Add argument for autoconf to use tranformation
4056 * Makefile.in: Add autoconf package transformation code.
4057 * util/i386/pc/grub-install.in: Likewise.
4058 * util/powerpc/ieee1275/grub-install.in: Likewise.
4060 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
4062 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
4063 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
4064 (EXT2_REVISION): Likewise.
4065 (EXT2_INODE_SIZE): Likewise.
4066 (struct grub_ext2_block_group): Added a missing member
4068 (grub_ext2_read_inode): Divide by the inode size in a superblock
4069 instead of 128 to obtain INODES_PER_BLOCK.
4070 Use the macro EXT2_INODE_SIZE instead of directly using
4073 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
4075 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
4076 superblock instead of the structure size to compute an
4077 offset. This fixes the problem that GRUB could not read a
4078 filesystem when inode size is different from 128-byte.
4080 2007-03-05 Marco Gerards <marco@gnu.org>
4082 * normal/main.c (read_config_file): When "menu" is not set, create
4085 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4087 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
4088 (HEAP_LIMIT): New macro.
4089 (grub_claim_heap): Claim memory up to `heaplimit'.
4091 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4093 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
4094 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
4096 (grub_arch_modules_addr): Return address after `_end'.
4097 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
4098 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
4099 (add_segments): Calculate `_end' from phdr size and location.
4100 (ALIGN_UP): Moved to ...
4101 * include/grub/misc.h: here.
4102 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4104 (GRUB_IEEE1275_MODULE_BASE): Removed.
4106 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4108 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
4111 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4113 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
4115 (grub_elf64_load_hook_t): Likewise.
4116 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
4119 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4121 * kern/mm.c: Update copyright.
4122 (grub_mm_debug): Correct syntax error.
4123 (grub_mm_dump_free): New function.
4124 (grub_debug_free): Call `grub_free'.
4125 * include/grub/mm.h: Update copyright.
4126 (grub_mm_dump_free): Add declaration.
4128 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4130 * include/grub/ieee1275/ieee1275.h: Update copyright.
4131 * kern/powerpc/ieee1275/init.c: Likewise.
4132 * kern/powerpc/ieee1275/openfw.c: Likewise.
4134 * loader/powerpc/ieee1275/linux.c: Likewise.
4135 * include/grub/elfload.h: Likewise.
4136 * kern/elf.c: Likewise.
4137 (grub_elf32_load): Pass `base' and `size' parameters. Update all
4139 (grub_elf64_load): Likewise.
4140 (grub_elf32_load_segment): Move to a nested function.
4141 (grub_elf64_load_segment): Likewise.
4143 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4145 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
4147 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
4148 (grub_heap_len): Likewise.
4149 (HEAP_SIZE): New macro.
4150 (grub_claim_heap): New function.
4151 (grub_machine_init): Don't claim heap directly. Call
4153 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
4154 (grub_available_iterate): New function.
4156 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
4158 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
4159 * configure.ac: Use it for testing the HOST and TARGET compilers.
4161 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
4163 * Makefile.in (enable_grub_emu): New variable.
4164 * configure.ac (--enable-grub-emu): New option.
4165 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
4166 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
4167 * conf/i386-pc.rmk: Likewise.
4168 * conf/powerpc-ieee1275.rmk: Likewise.
4169 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
4171 2006-12-12 Marco Gerards <marco@gnu.org>
4173 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
4175 * kern/env.c (grub_env_unset): Don't free the member `value' when
4176 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
4179 * normal/main.c (current_menu): Removed.
4180 (free_menu): Unset the `menu' environment variable.
4181 (grub_normal_menu_addentry): Make use of the environment variable
4182 `menu', instead of using the global `current_menu'. Allocate
4183 memory for the sourcecode of this entry.
4184 (read_config_file): New argument `nested', changed all callers.
4185 Only in the case of a new context, initialize a new menu. Set the
4186 `menu' environment variable.
4187 (grub_normal_execute): Don't set and unset the environment
4188 variable `menu' here anymore. Only free the menu when leaving the
4191 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
4194 2006-12-11 Marco Gerards <marco@gnu.org>
4196 * normal/menu_entry.c (run): Fix off by one bug so the last line
4197 is executed. Move the loader check to outside the loop.
4199 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
4201 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
4203 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
4205 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
4206 the number of sectors. Reported by Andrey Shuvikov
4207 <mr_hyro@yahoo.com>.
4209 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
4211 * kern/disk.c (grub_disk_read): When there is a read error, always
4212 try to read only the necessary data.
4214 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
4216 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
4218 [GRUB_UTIL] (grub_raid_fini): Likewise.
4219 [GRUB_UTIL] (grub_lvm_init): Likewise.
4220 [GRUB_UTIL] (grub_lvm_fini): Likewise.
4221 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
4222 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
4223 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
4224 and grub_raid_fini().
4226 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
4228 * include/grub/types.h (__unused): Rename to UNUSED.
4229 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
4230 (grub_elf64_size): Likewise.
4232 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
4234 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
4235 grub_error_push and grub_error_pop in the error-handling path.
4236 (grub_elf32_load_segment): Only call grub_file_read with non-zero
4239 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
4241 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
4242 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4243 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4244 (kernel_elf_SOURCES): Likewise.
4245 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
4246 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
4247 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4248 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4249 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
4250 (elf_mod_SOURCES): New variable.
4251 (elf_mod_CFLAGS): Likewise.
4252 (elf_mod_LDFLAGS): Likewise.
4253 * include/grub/types.h (__unused): New macro.
4254 * include/grub/elfload.h: New file.
4255 * kern/elf.c: Likewise.
4256 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
4257 (ELF32_LOADMASK): New macro.
4258 (ELF64_LOADMASK): Likewise.
4260 (grub_linux_load32): New function.
4261 (grub_linux_load64): Likewise.
4262 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
4263 Use grub_elf_t instead of grub_file_t.
4265 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
4267 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
4268 `catch_result' to struct set_color_args.
4270 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4272 * normal/menu.c: Include grub/script.h.
4273 * normal/menu_entry.c: Likewise.
4274 * include/grub/normal.h: Do not include grub/script.h.
4276 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4278 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
4280 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4282 * kern/disk.c (grub_disk_open): Print debug messages when opening a
4284 (grub_disk_close): Print debug messages when closing a disk.
4285 (grub_disk_read): Print debug messages when disk read fails.
4286 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
4288 * kern/partition.c: Include misc.h.
4289 (grub_partition_iterate): Print debug messages when detecting
4292 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4294 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
4296 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
4298 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
4300 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4301 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
4303 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
4305 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
4306 instead of sizeof(lv). Patch by Michael Guntsche.
4308 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
4310 * disk/lvm.c: Rename VGS to VG_LIST.
4311 (grub_lvm_iterate): Change VGS->LV to VG-LV.
4312 (grub_lvm_open): Likewise.
4313 Thanks to Michael Guntsche for finding this bug.
4315 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4317 * configure.ac (AC_INIT): Bumped to 1.95.
4319 2006-10-14 Robert Millan <rmh@aybabtu.com>
4321 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
4322 with "/dev/.static/dev/md".
4324 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
4326 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
4327 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
4328 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
4329 DRIVE_NAME are always freed.
4331 * util/i386/pc/biosdisk.c (make_device_name): Add one into
4332 DOS_PART, as a DOS partition is counted from one instead of zero
4333 now. Reported by Robert Millan.
4335 2006-10-14 Robert Millan <rmh@aybabtu.com>
4337 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
4338 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
4339 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
4340 string returned by grub_guess_root_device.
4341 * util/i386/pc/grub-setup.c: Likewise.
4342 * util/i386/pc/grub-probefs.c: Likewise.
4344 * util/i386/pc/grub-probefs.c: Rename to ...
4345 * util/i386/pc/grub-probe.c: ... this.
4346 * DISTLIST: Remove grub-probefs, add grub-probe.
4347 * conf/i386-efi.rmk: Likewise.
4348 * conf/i386-pc.rmk: Likewise.
4349 * util/i386/pc/grub-install.in: Likewise.
4351 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
4352 choose which information we want to print.
4354 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
4356 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
4357 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
4358 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
4359 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
4360 video/readers/tga.c and video/i386/pc/vbeutil.c.
4362 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
4364 Added support for RAID and LVM.
4366 * disk/lvm.c: New file.
4367 * disk/raid.c: Likewise.
4368 * include/grub/lvm.h: Likewise.
4369 * include/grub/raid.h: Likewise.
4370 * include/grub/util/lvm.h: Likewise.
4371 * include/grub/util/raid.h: Likewise.
4372 * util/lvm.c: Likewise.
4373 * util/raid.c: Likewise.
4375 * include/grub/disk.h (grub_disk_dev_id): Add
4376 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
4377 (grub_disk_get_size): New prototype.
4378 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
4379 returns a partition.
4380 (grub_disk_get_size): New function.
4382 * kern/i386/pc/init.c (make_install_device): Copy the prefix
4383 verbatim if grub_install_dos_part is -2.
4385 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
4388 * util/i386/pc/grub-setup.c (setup): New argument
4389 MUST_EMBED. Force embedding of GRUB when the argument is
4390 true. Close FILE before returning.
4391 (main): Add support for RAID and LVM.
4393 * conf/common.rmk: Add RAID and LVM modules.
4394 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
4396 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
4398 * kern/misc.c (grub_strstr): New function.
4399 * include/grub/misc.h (grub_strstr): New prototype.
4401 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
4403 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
4405 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
4407 * kern/misc.c (grub_strtoull): Guess the base only if not
4410 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4412 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
4415 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4417 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
4419 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
4420 Remove `flags' argument. All callers changed.
4421 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
4422 (IEEE1275_IHANDLE_INVALID): New variable.
4423 (IEEE1275_CELL_INVALID): New variable.
4424 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4425 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
4426 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
4427 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
4428 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
4429 codes from Open Firmware. All callers updated.
4430 (grub_ieee1275_next_property): Directly return Open Firmware return
4432 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4433 Standardize error checking from `grub_ieee1275_get_property'.
4434 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
4435 `devalias' to `aliases'. Correct comments. Consolidate error paths.
4437 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4439 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
4440 `instance_to_package_args' to `instance_to_path_args'.
4442 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
4443 `grub_ieee1275_chosen'.
4445 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
4446 `grub_ieee1275_interpret'.
4448 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
4450 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
4452 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
4454 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
4455 (__cmpdi): Likewise.
4457 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
4458 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
4461 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
4463 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
4464 to type `grub_ssize_t'.
4465 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
4467 2006-09-22 Marco Gerards <marco@gnu.org>
4469 * normal/script.c (grub_script_create_cmdmenu): Skip leading
4472 2006-09-22 Marco Gerards <marco@gnu.org>
4474 * commands/echo.c: New file.
4476 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
4478 * conf/common.rmk (echo_mod_SOURCES): New variable.
4479 (echo_mod_CFLAGS): Likewise.
4480 (echo_mod_LDFLAGS): Likewise.
4482 2006-09-22 Marco Gerards <marco@gnu.org>
4484 * normal/main.c (get_line): Malloc memory instead of using
4485 preallocated memory. Removed the arguments `cmdline' and
4486 `max_len'. Updated all callers.
4488 2006-09-22 Marco Gerards <marco@gnu.org>
4490 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
4491 (normal_mod_DEPENDENCIES): Likewise.
4493 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
4494 (normal_mod_DEPENDENCIES): Likewise.
4496 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
4498 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
4500 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
4502 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
4503 (normal_mod_DEPENDENCIES): Likewise.
4504 * conf/i386-pc.mk: Regenerate.
4505 * conf/i386-efi.mk: Likewise
4506 * conf/common.mk: Likewise.
4507 * conf/powerpc-ieee1275.mk: Likewise.
4508 * conf/sparc64-ieee1275.mk: Likewise.
4510 2006-09-22 Robert Millan <rmh@aybabtu.com>
4512 Sync with i386 version.
4513 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
4514 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
4516 2006-09-21 Robert Millan <rmh@aybabtu.com>
4518 Import from GRUB Legacy (lib/device.c):
4519 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
4520 (init_device_map) [__linux__]: Add support for I2O devices.
4522 2006-09-14 Marco Gerards <marco@gnu.org>
4524 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
4527 2006-09-14 Robert Millan <rmh@aybabtu.com>
4529 * util/i386/pc/grub-install.in: Skip menu.lst when removing
4532 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
4534 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
4535 before adding it to device.map.
4537 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
4539 * genmk.rb: Let GCC generate dependenceies the first time it
4540 compiles a file; using the -MD option.
4541 * conf/common.mk: Regenerate.
4542 * conf/i386-pc.mk: Likewise.
4543 * conf/i386-efi.mk: Likewise.
4544 * conf/powerpc-ieee1275.mk: Likewise.
4545 * conf/sparc64-ieee1275.mk: Likewise.
4547 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
4549 Move the prototypes of grub_setjmp and grub_longjmp to
4550 cpu/setjmp.h, so that each architecture may specify different
4553 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
4554 (grub_longjmp): Likewise.
4555 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
4556 (grub_longjmp): Likewise.
4557 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
4558 (grub_longjmp): Likewise.
4560 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
4561 [!GRUB_UTIL] (grub_longjmp): Removed.
4563 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
4565 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
4566 "color!" method does not return any value.
4568 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4570 * include/grub/bitmap.h: New file.
4572 * include/grub/i386/pc/vbeutil.h: Likewise.
4574 * video/bitmap.c: Likewise.
4576 * video/readers/tga.c: Likewise.
4578 * video/i386/pc/vbeutil.c: Likewise.
4580 * commands/videotest.c: Code cleanup and updated to reflect to new
4583 * term/gfxterm.c: Likewise.
4585 * video/video.c: Likewise.
4587 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
4588 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
4589 (bitmap_mod_SOURCES): New entry.
4590 (bitmap_mod_CFLAGS): Likewise.
4591 (bitmap_mod_LDFLAGS): Likewise.
4592 (tga_mod_SOURCES): Likewise.
4593 (tga_mod_CFLAGS): Likewise.
4594 (tga_mod_LDFLAGS): Likewise.
4596 * include/grub/video.h (grub_video_blit_operators): New enum type.
4597 (grub_video_render_target): Changed as forward declaration and moved
4598 actual definition to be video driver specific.
4599 (grub_video_adapter.blit_bitmap): Added blitting operator.
4600 (grub_video_adapter.blit_render_target): Likewise.
4601 (grub_video_blit_bitmap): Likewise.
4602 (grub_video_blit_render_target): Likewise.
4604 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
4605 driver specific render target definition.
4606 (grub_video_vbe_map_rgba): Added driver internal helper.
4607 (grub_video_vbe_unmap_color): Updated to use
4608 grub_video_i386_vbeblit_info.
4609 (grub_video_vbe_get_video_ptr): Likewise.
4611 * include/grub/i386/pc/vbeblit.h
4612 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
4613 grub_video_i386_vbeblit_info.
4614 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4615 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4616 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4617 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4618 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4619 (grub_video_i386_vbeblit_index_index): Likewise.
4620 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
4621 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4622 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4623 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
4625 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
4628 * video/i386/pc/vbeblit.c: Updated to reflect changes on
4629 include/grub/i386/pc/vbeblit.h.
4631 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
4632 Updated to use grub_video_i386_vbeblit_info.
4633 (grub_video_i386_vbefill_R8G8B8): Likewise.
4634 (grub_video_i386_vbefill_index): Likewise.
4635 (grub_video_i386_vbefill): Added generic filler.
4637 * video/i386/pc/vbefill.c: Updated to reflect changes on
4638 include/grub/i386/pc/vbefill.h.
4640 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
4641 grub_video_i386_vbeblit_info.
4642 (grub_video_vbe_unmap_color): Likewise.
4643 (grub_video_vbe_blit_glyph): Likewise.
4644 (grub_video_vbe_scroll): Likewise.
4645 (grub_video_vbe_draw_pixel): Removed function.
4646 (grub_video_vbe_get_pixel): Likewise.
4647 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
4648 updated code to use it.
4649 (common_blitter): Added common blitter for render target and bitmap.
4650 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
4651 (grub_video_vbe_blit_render_target): Likewise.
4653 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
4655 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
4656 is in text mode if there is no console control protocol instance
4659 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4661 * include/grub/video.h: Code cleanup.
4663 * include/grub/i386/pc/vbe.h: Likewise.
4665 * video/i386/pc/vbe.c: Likewise.
4667 * video/i386/pc/vbeblit.c: Likewise.
4669 * video/i386/pc/vbefill.c: Likewise.
4671 * video/video.c: Likewise. Also added more comments.
4673 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4675 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
4676 (struct grub_biosdisk_dap): Likewise.
4678 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
4679 linkage settings for all functions.
4681 2006-07-12 Marco Gerards <marco@gnu.org>
4683 * configure.ac (--enable-mm-debug): Fix typo.
4685 * genkernsyms.sh.in: Use proper quoting for `CC'.
4687 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
4689 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
4690 (normal_mod_ASFLAGS): Remove "-m32".
4692 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
4694 * util/misc.c: Include config.h.
4695 [!HAVE_MEMALIGN]: Do not include malloc.h.
4696 (grub_memalign): Use posix_memalign, if present. Then, use
4697 memalign, if present. Otherwise, emit an error.
4699 * util/grub-emu.c: Do not include malloc.h.
4701 * include/grub/util/misc.h: Include unistd.h. This is required for
4702 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
4703 D. Eades III <hde@foobar-qux.org>.
4705 * configure.ac (AC_GNU_SOURCE): Added.
4706 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
4709 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
4711 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
4712 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
4714 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
4716 * include/grub/types.h (grub_host_addr_t): Rename to
4718 (grub_host_off_t): Rename to grub_target_off_t.
4719 (grub_host_size_t): Rename to grub_target_size_t.
4720 (grub_host_ssize_t): Rename to grub_target_ssize_t.
4721 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
4723 * include/grub/kernel.h (struct grub_module_header): Change type
4724 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
4725 (grub_module_info): Likewise.
4727 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4729 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
4730 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
4731 Velazquez <jesus.velazquez@gmail.com>.
4733 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4735 Count partitions from 1 instead of 0 in the string representation
4736 of partitions. Still use 0-based internally.
4738 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
4739 (sun_partition_map_iterate): Use grub_partition_t instead of
4740 struct grub_partition *. Cast DESC->START_CYLINDER to
4741 grub_uint64_t after converting the endian.
4742 (sun_partition_map_probe): Subtract 1 for PARTNUM.
4743 (sun_partition_map_get_name): Add 1 to P->INDEX.
4745 * partmap/pc.c (grub_partition_parse): Subtract 1 for
4747 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
4749 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
4750 zero instead of one.
4751 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
4752 (gpt_partition_map_get_name): Add 1 into P->INDEX.
4754 * partmap/apple.c (apple_partition_map_iterate): Change the type
4756 (apple_partition_map_probe): Subtract 1 for PARTNUM.
4757 (apple_partition_map_get_name): Add 1 into P->INDEX.
4759 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
4761 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
4762 calculate the offset of a partition.
4763 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
4764 (amiga_partition_map_get_name): Add 1 into P->INDEX.
4766 * partmap/acorn.c (acorn_partition_map_find): Change the type of
4767 SECTOR to grub_disk_addr_t.
4768 (acorn_partition_map_iterate): Likewise.
4769 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
4770 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
4772 (acorn_partition_map_get_name): Add 1 into P->INDEX.
4774 * kern/i386/pc/init.c (make_install_device): Add 1 into
4775 GRUB_INSTALL_DOS_PART.
4777 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
4780 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4782 Clean up the code to support 64-bit addressing in disks and
4783 files. This change is not enough for filesystems yet.
4785 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
4786 type of "start" to grub_uint64_t.
4787 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
4788 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
4789 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
4792 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
4793 to grub_disk_addr_t.
4795 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
4798 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4800 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
4803 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
4805 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
4807 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
4809 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
4810 to grub_off_t, to detect an error from grub_file_seek.
4811 (grub_multiboot_load_elf32): Likewise.
4813 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
4814 maximum unsigned long value when an overflow is detected.
4815 (grub_strtoull): New function.
4816 (grub_divmod64): Likewise.
4817 (grub_lltoa): use grub_divmod64.
4819 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
4821 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
4822 the pointer to next character. Use grub_strtoull instead of
4824 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
4825 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
4828 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
4829 return value is signed.
4830 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
4831 test if OFFSET is less than zero, as OFFSET is unsigned now.
4833 * kern/disk.c (struct grub_disk_cache): Change the type of
4834 "sector" to grub_disk_addr_t.
4835 (grub_disk_cache_get_index): Change the type of SECTOR to
4836 grub_disk_addr_t. Calculate the hash with SECTOR casted to
4837 unsigned after shifting.
4838 (grub_disk_cache_invalidate): Change the type of SECTOR to
4840 (grub_disk_cache_unlock): Likewise.
4841 (grub_disk_cache_store): Likewise.
4842 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
4843 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
4844 grub_disk_addr_t and grub_uint64_t, respectively.
4845 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
4846 body, as the value of OFFSET is tweaked by
4847 grub_disk_check_range. Change the types of START_SECTOR, LEN and
4848 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
4850 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
4851 body, as the value of OFFSET is tweaked by
4852 grub_disk_check_range. Change the types of LEN and N to
4855 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
4856 and "saved_offset" to grub_off_t.
4857 (test_header): Cast BUF to char *.
4858 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
4860 (grub_gzio_read): Change the types of OFFSET and SIZE to
4861 grub_off_t and grub_size_t, respectively.
4863 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
4865 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
4866 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
4867 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
4868 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
4869 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
4871 * include/grub/types.h (grub_off_t): Unconditionally set to
4873 (grub_disk_addr_t): Changed to grub_uint64_t.
4875 * include/grub/partition.h (struct grub_partition): Change the
4876 types of "start", "len" and "offset" to grub_disk_addr_t,
4877 grub_uint64_t and grub_disk_addr_t, respectively.
4878 (grub_partition_get_start): Return grub_disk_addr_t.
4879 (grub_partition_get_len): Return grub_uint64_t.
4881 * include/grub/misc.h (grub_strtoull): New prototype.
4882 (grub_divmod64): Likewise.
4884 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4885 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4886 grub_off_t, respectively.
4887 All callers and references changed.
4889 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4890 grub_size_t in "read".
4891 All callers and references changed.
4893 * include/grub/file.h (struct grub_file): Change the types of
4894 "offset" and "size" to grub_off_t and grub_off_t,
4895 respectively. Change the type of SECTOR to grub_disk_addr_t in
4897 (grub_file_read): Change the type of LEN to grub_size_t.
4898 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4900 (grub_file_size): Return grub_off_t.
4901 (grub_file_tell): Likewise.
4902 All callers and references changed.
4904 * include/grub/disk.h (struct grub_disk_dev): Change the types of
4905 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4907 (struct grub_disk): Change the type of "total_sectors" to
4908 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4910 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4911 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4912 (grub_disk_write): Likewise.
4913 All callers and references changed.
4915 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4916 char * for grub_strncmp to silence gcc.
4917 (grub_iso9660_mount): Likewise.
4918 (grub_iso9660_mount): Likewise.
4919 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4921 (grub_iso9660_iterate_dir): Likewise.
4922 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4924 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4925 LEN to grub_disk_addr_t and grub_size_t, respectively.
4927 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4929 * fs/jfs.c (grub_jfs_read_file): Likewise.
4931 * fs/minix.c (grub_jfs_read_file): Likewise.
4933 * fs/sfs.c (grub_jfs_read_file): Likewise.
4935 * fs/ufs.c (grub_jfs_read_file): Likewise.
4937 * fs/xfs.c (grub_jfs_read_file): Likewise.
4939 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4940 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4943 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4944 BLKNR to -1 instead of returning GRUB_ERRNO.
4945 (grub_ext2_read_file): Change the types of SECTOR and
4946 LEN to grub_disk_addr_t and grub_size_t, respectively.
4948 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4949 LEN to grub_disk_addr_t and grub_size_t, respectively.
4951 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4954 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4955 string. Do not cast SECTOR explicitly.
4957 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4958 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4959 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4960 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4961 over 2TB and LBA mode is not supported, raise an error.
4962 (get_safe_sectors): New function.
4963 (grub_biosdisk_read): Use get_safe_sectors.
4964 (grub_biosdisk_write): Likewise.
4966 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4967 (grub_efidisk_write): Likewise.
4969 * disk/loopback.c (delete_loopback): Cosmetic changes.
4970 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4972 (grub_loopback_open): Likewise.
4973 (grub_loopback_read): Likewise. Also, change the type of POS to
4974 grub_off_t, and fix the usage of grub_memset.
4976 * commands/i386/pc/play.c: Include grub/machine/time.h.
4978 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4981 * commands/configfile.c: Include grub/env.h.
4983 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4984 GRUB_ERRNO directly instead. Change the type of POS to
4985 grub_off_t. Follow the coding standard.
4987 * commands/blocklist.c: Include grub/partition.h.
4988 (grub_cmd_blocklist): Return an error if the underlying device is
4989 not a disk. Take the starting sector of a partition into account,
4990 if a partition is used.
4992 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4994 (lba_mode): Support 64-bit addresses.
4995 (chs_mode): Likewise.
4996 (copy_buffer): Adapted to the new offsets of a length field and a
4998 (blocklist_default_start): Allocate 64-bit space.
5000 * boot/i386/pc/boot.S (force_lba): Removed.
5001 (boot_drive): Moved to under KERNEL_SECTOR.
5002 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
5004 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
5006 (lba_mode): Refactored to support a 64-bit address. More size
5008 (setup_sectors): Likewise.
5010 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5012 * DISTLIST: Added include/grub/i386/linux.h. Removed
5013 include/grub/i386/pc/linux.h
5015 * configure.ac (AC_INIT): Bumped to 1.94.
5017 * config.guess: Updated from gnulib.
5018 * config.sub: Likewise.
5019 * install-sh: Likewise.
5020 * mkinstalldirs: Likewise.
5022 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5024 * conf/common.rmk (grub_modules_init.lst): Depended on
5025 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
5028 * genmk.rb (PModule::rule): Reverted the previous change.
5030 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5032 * conf/common.rmk (grub_modules_init.lst): Depends on
5033 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
5034 that the target does not exist before producing.
5035 (grub_modules_init.h): Remove the target before generating.
5036 (grub_emu_init.c): Likewise.
5038 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
5040 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
5042 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
5043 for the target-specific tests. Make sure that we also have the
5044 up-to-date target variables for those tests.
5046 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5048 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
5049 (PModule::rule): Likewise.
5051 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5053 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
5054 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
5055 target-specific flags should be prefixed.
5056 (PModule::rule): Likewise.
5058 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
5060 * configure.ac (CMP): Check if cmp is available explicitly.
5062 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
5064 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
5065 (target_cpu): New variable.
5066 (pkglibdir): Use target_cpu instead of host_cpu.
5068 * util/i386/pc/grub-install.in (host_cpu): Removed.
5069 (target_cpu): New variable.
5070 (pkglibdir): Use target_cpu instead of host_cpu.
5072 * util/genmoddep.c: Removed.
5074 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
5075 instead of GRUB_HOST_SIZEOF_VOID_P.
5076 * kern/dl.c: Likewise.
5078 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
5080 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5081 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5082 (GRUB_TARGET_SIZEOF_LONG): ... this.
5083 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5084 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5085 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5087 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5088 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5089 (GRUB_TARGET_SIZEOF_LONG): ... this.
5090 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5091 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5092 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5094 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5095 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5096 (GRUB_TARGET_SIZEOF_LONG): ... this.
5097 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5098 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5100 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
5101 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
5102 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
5103 instead of GRUB_HOST_SIZEOF_LONG.
5104 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
5105 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
5106 GRUB_CPU_WORDS_BIGENDIAN.
5107 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
5108 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
5111 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
5112 (genmoddep_SOURCES): Likewise.
5113 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
5114 (genmoddep_SOURCES): Likewise.
5115 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
5116 (genmoddep_SOURCES): Likewise.
5117 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
5119 (genmoddep_SOURCES): Likewise.
5121 * genmoddep.awk: New file.
5123 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
5124 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
5125 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
5126 (PModule::rule): Likewise.
5127 (Program::rule): Likewise.
5128 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
5129 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
5132 * configure.ac: Rewritten intensively to use host and target
5133 instead of build and host, respectively.
5135 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
5136 (host_cpu): Removed.
5137 (target_cpu): New variable.
5138 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
5139 (BUILD_CC): Removed.
5140 (BUILD_CFLAGS): Likewise.
5141 (BUILD_CPPFLAGS): Likewise.
5142 (TARGET_CC): New variable.
5143 (TARGET_CFLAGS): Likewise.
5144 (TARGET_CPPFLAGS): Likewise.
5145 (TARGET_LDFLAGS): Likewise.
5147 (include): Use target_cpu instead of host_cpu.
5148 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
5150 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
5152 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
5154 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
5155 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
5156 field 'false' to 'exec_on_false'.
5157 (grub_script_create_cmdif): Renamed argument names to reflect above
5160 * normal/execute.c (grub_script_execute_cmdif): Likewise.
5162 * normal/script.c (grub_script_create_cmdif): Likewise.
5164 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
5166 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
5168 (grub_hfsplus_btree_recptr): Likewise.
5169 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
5170 FILEBLOCK both to pass a block number and store next block
5172 (grub_hfsplus_read_block): Rewritten heavily to support an extent
5173 overflow file correctly. Specify errors appropriately, because
5174 fshelp expects that GRUB_ERRNO is set when fails. Reuse
5175 grub_hfsplus_btree_recptr to get the pointer to a found key.
5176 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
5179 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
5181 (_linux_mod_SOURCES): New variable.
5182 (_linux_mod_CFLAGS): Likewise.
5183 (_linux_mod_LDFLAGS): Likewise.
5184 (linux_mod_SOURCES): Likewise.
5185 (linux_mod_CFLAGS): Likewise.
5186 (linux_mod_LDFLAGS): Likewise.
5188 * DISTLIST: Added loader/i386/efi/linux.c,
5189 loader/i386/efi/linux_normal.c and
5190 include/grub/i386/efi/loader.h.
5192 * loader/i386/efi/linux.c: New file.
5193 * loader/i386/efi/linux_normal.c: Likewise.
5194 * include/grub/i386/efi/loader.h: Likewise.
5196 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
5198 * commands/blocklist.c: New file.
5200 * DISTLIST: Added commands/blocklist.c.
5202 * term/efi/console.c (grub_console_highlight_color): Use a lighter
5203 color for the background, and a darker color for the foreground.
5204 (grub_console_checkkey): Return READ_KEY.
5205 (grub_console_cls): Set the background to
5206 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
5208 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
5210 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
5211 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
5213 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
5216 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
5217 BG. The spec is wrong again.
5219 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
5221 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
5223 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
5224 commands/blocklist.c.
5225 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5227 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
5228 (blocklist_mod_SOURCES): New variable.
5229 (blocklist_mod_CFLAGS): Likewise.
5230 (blocklist_mod_LDFLAGS): Likewise.
5232 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
5234 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
5236 (lba_mode): Use %eax more intensively to reduce the code size.
5238 2006-05-20 Marco Gerards <marco@gnu.org>
5240 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
5242 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
5244 (script): Accept leading newlines.
5245 (newlines): New rule to describe 0 or more newlines.
5246 (commands): Accept `command' with trailing newline. Fixed the
5247 order in which arguments were passed to `grub_script_add_cmd'.
5248 Accept commands separated by newlines.
5249 (function): Changed to accept newlines.
5250 (menuentry) Rewritten.
5252 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
5253 front of the list, instead of to the end.
5255 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
5257 * util/i386/pc/grub-install.in (bindir): New variable.
5258 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
5259 Shaver <lbgwjl@gmail.com>.
5261 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
5263 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
5264 grub/machine/linux.h
5265 * loader/i386/pc/linux.c: Likewise.
5267 * include/grub/i386/pc/linux.h: Moved to ...
5268 * include/grub/i386/linux.h: ... here.
5270 * include/grub/i386/linux.h (struct linux_kernel_params): New
5273 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
5275 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
5277 (grub_video_vbe_blit_glyph): Likewise.
5278 (grub_video_vbe_blit_bitmap): Likewise.
5279 (grub_video_vbe_blit_render_target): Likewise.
5281 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
5283 * configure.ac (--with-platform): Properly quote the square
5286 2006-05-08 Marco Gerards <marco@gnu.org>
5288 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
5290 (kernel_elf_HEADERS): ...to this. Updated all users.
5291 (grubof_symlist.c): Renamed from this...
5292 (kernel_elf_symlist.c): ...to this. Updated all users.
5293 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
5294 (grubof_SOURCES): Renamed from this...
5295 (kernel_elf_SOURCES): ...to this.
5296 (grubof_HEADERS): Renamed from this...
5297 (kernel_elf_HEADERS): ...to this.
5298 (grubof_CFLAGS): Renamed from this...
5299 (kernel_elf_CFLAGS): ...to this.
5300 (grubof_ASFLAGS): Renamed from this...
5301 (kernel_elf_ASFLAGS): ...to this.
5302 (grubof_LDFLAGS): Renamed from this...
5303 (kernel_elf_LDFLAGS): ...to this.
5305 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
5307 (kernel_elf_HEADERS): ...to this. Updated all users.
5308 (grubof_symlist.c): Renamed from this...
5309 (kernel_elf_symlist.c): ...to this. Updated all users.
5310 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
5311 (grubof_SOURCES): Renamed from this...
5312 (kernel_elf_SOURCES): ...to this.
5313 (grubof_HEADERS): Renamed from this...
5314 (kernel_elf_HEADERS): ...to this.
5315 (grubof_CFLAGS): Renamed from this...
5316 (kernel_elf_CFLAGS): ...to this.
5317 (grubof_ASFLAGS): Renamed from this...
5318 (kernel_elf_ASFLAGS): ...to this.
5319 (grubof_LDFLAGS): Renamed from this...
5320 (kernel_elf_LDFLAGS): ...to this.
5322 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
5323 `kernel.elf' instead of `grubof'.
5325 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
5327 Add --with-platform to configure. Use pkglibdir instead of
5328 pkgdatadir. This is reported by Roger Leigh.
5330 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
5331 (host_vendor): Likewise.
5332 (host_os): Likewise.
5333 (pkgdatadir): Likewise.
5334 (platform): New variable.
5335 (pkglibdir): Likewise.
5336 Use PKGLIBDIR instead of PKGDATADIR.
5338 * util/i386/pc/grub-install.in (datadir): Removed.
5339 (host_vendor): Likewise.
5340 (host_os): Likewise.
5341 (pkgdatadir): Likewise.
5342 (platform): New variable.
5343 (pkglibdir): Likewise.
5344 Use PKGLIBDIR instead of PKGDATADIR.
5346 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
5347 instead of GRUB_DATADIR.
5349 * util/i386/pc/grub-mkimage.c (usage): Likewise.
5351 * util/i386/efi/grub-mkimage.c (usage): Likewise.
5354 * configure.ac (--with-platform): New option.
5355 Use PLATFORM instead of HOST_VENDOR to specify a platform.
5357 * Makefile.in: Include a makefile based on PLATFORM instead of
5359 (pkgdatadir): Not appended by the machine type.
5360 (pkglibdir): Appended by the machine type.
5361 (host_vendor): Removed.
5362 (platform): New variable.
5363 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
5364 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
5365 (uninstall): Likewise.
5367 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
5369 Use the environment context in the menu. Remove the commands
5370 "default" and "timeout", and use variables instead.
5372 * normal/menu.c: Include grub/env.h.
5373 (print_entry): Cast TITLE to silence gcc.
5374 (get_timeout): New function.
5375 (set_timeout): Likewise.
5376 (get_entry_number): Likewise.
5377 (run_menu): Use a default entry, a fallback entry and a timeout
5378 in the environment variables "default", "fallback" and
5379 "timeout". Also, tweak the default entry if it is not within the
5380 current menu entries.
5381 (grub_menu_run): Use a fallback entry in the environment variable
5384 * normal/main.c (read_config_file): Do not initialize
5385 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
5387 (grub_normal_execute): Use a data slot to store the menu.
5389 * include/grub/normal.h (struct grub_menu): Removed default_entry,
5390 fallback_entry and timeout.
5391 (struct grub_menu_list): Removed.
5392 (grub_menu_list_t): Likewise.
5393 (struct grub_context): Likewise.
5394 (grub_context_t): Likewise.
5395 (grub_context_get): Likewise.
5396 (grub_context_get_current_menu): Likewise.
5397 (grub_context_push_menu): Likewise.
5398 (grub_context_pop_menu): Likewise.
5399 (grub_default_init): Likewise.
5400 (grub_default_fini): Likewise.
5401 (grub_timeout_init): Likewise.
5402 (grub_timeout_fini): Likewise.
5404 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
5406 (normal_mod_SOURCES): Removed normal/context.c.
5408 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
5409 commands/default.c, commands/timeout.c and normal/context.c.
5410 (normal_mod_SOURCES): Removed normal/context.c.
5412 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
5413 commands/timeout.c and normal/context.c.
5414 (normal_mod_SOURCES): Removed normal/context.c.
5416 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
5417 commands/default.c, commands/timeout.c and normal/context.c.
5418 (normal_mod_SOURCES): Removed normal/context.c.
5420 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
5422 (default_mod_SOURCES): Removed.
5423 (default_mod_CFLAGS): Likewise.
5424 (default_mod_LDFLAGS): Likewise.
5425 (timeout_mod_SOURCES): Removed.
5426 (timeout_mod_CFLAGS): Likewise.
5427 (timeout_mod_LDFLAGS): Likewise.
5429 * DISTLIST: Removed commands/default.c, commands/timeout.c and
5432 * commands/default.c: Removed.
5433 * commands/timeout.c: Likewise.
5434 * normal/context.c: Likewise.
5436 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
5438 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
5440 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
5442 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
5443 "next" to "prev" for readability.
5444 (struct grub_env_sorted_var): New struct.
5445 (grub_env_context): Renamed to ...
5446 (initial_context): ... this.
5447 (grub_env_var_context): Renamed to ...
5448 (current_context): ... this.
5449 (grub_env_find): Look only at CURRENT_CONTEXT.
5450 (grub_env_context_open): Rewritten to copy exported variables from
5452 (grub_env_context_close): Rewritten according to the new
5453 scheme. Also, add an assertion to prevent the initial context from
5455 (grub_env_insert): Removed the code for the sorted list.
5456 (grub_env_remove): Likewise.
5457 (grub_env_export): Simply mark the variable with
5458 GRUB_ENV_VAR_GLOBAL.
5459 (grub_env_set): A cosmetic change for naming consistency.
5460 (grub_env_get): Likewise.
5461 (grub_env_unset): Likewise.
5462 (grub_env_iterate): Rewritten to sort variables within this
5464 (grub_register_variable_hook): Fixed for naming consistency. Call
5465 grub_env_find again, only if NAME is not found at the first time.
5466 (mangle_data_slot_name): New function.
5467 (grub_env_set_data_slot): Likewise.
5468 (grub_env_get_data_slot): Likewise.
5469 (grub_env_unset_data_slot): Likewise.
5471 * include/grub/env.h (grub_env_var_type): New enum.
5472 (GRUB_ENV_VAR_LOCAL): New constant.
5473 (GRUB_ENV_VAR_GLOBAL): Likewise.
5474 (GRUB_ENV_VAR_DATA): Likewise.
5475 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
5477 (grub_env_set): Replace VAR with NAME for consistency.
5478 (grub_register_variable_hook): Likewise.
5479 (grub_env_export): Specify the name of the argument.
5480 (grub_env_set_data_slot): New prototype.
5481 (grub_env_get_data_slot): Likewise.
5482 (grub_env_unset_data_slot): Likewise.
5484 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5486 Extend the loader so that GRUB can accept a loader which comes
5487 back to GRUB when a loaded image exits. Also, this change adds
5488 support for a chainloader on EFI.
5490 * term/efi/console.c: Include grub/misc.h.
5491 (grub_console_checkkey): Display a scan code on the top for
5492 debugging. This will be removed once the EFI port gets stable.
5493 Correct the scan code mapping.
5495 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
5496 allocate memory from larger regions, in order to reduce the number
5497 of allocated regions. Otherwise, the MacOSX loader panics.
5498 (filter_memory_map): Avoid less than 1MB for compatibility with
5500 (add_memory_regions): Allocate from the tail of a region, if
5501 possible, to avoid allocating a region near to 1MB, for the MacOSX
5504 * kern/efi/init.c (grub_efi_set_prefix): Specify
5505 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
5507 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
5508 argument IMAGE_HANDLE and specify it to get a loaded image.
5509 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
5510 grub_efi_get_loaded_image.
5511 (grub_efi_get_filename): Divide the legnth by the size of
5513 (grub_efi_get_device_path): New function.
5514 (grub_efi_print_device_path): Print End Device Path nodes. Divide
5515 the length by the size of grub_efi_char16_t for a file path device
5518 * kern/loader.c (grub_loader_noreturn): New variable.
5519 (grub_loader_set): Accept a new argument NORETURN. Set
5520 GRUB_LOADER_NORETURN to NORETURN.
5521 All callers changed.
5522 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
5525 * include/grub/efi/efi.h (grub_efi_get_device_path): New
5527 (grub_efi_get_loaded_image): Take an argument to specify an image
5530 * include/grub/loader.h (grub_loader_set): Added one more argument
5533 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
5534 instead of grub_efi_open_protocol.
5535 (grub_efidisk_get_device_name): Likewise.
5536 (grub_efidisk_close): Print a newline.
5537 (grub_efidisk_get_device_handle): Fixed to use
5538 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
5539 GRUB_EFI_DEVICE_PATH_TYPE.
5541 * disk/efi/efidisk.c (device_path_guid): Moved to ...
5542 * kern/efi/efi.c (device_path_guid): ... here.
5544 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
5546 (kernel_mod_HEADERS): Added efi/disk.h.
5547 (_chain_mod_SOURCES): New variable.
5548 (_chain_mod_CFLAGS): Likewise.
5549 (_chain_mod_LDFLAGS): Likewise.
5550 (chain_mod_SOURCES): Likewise.
5551 (chain_mod_CFLAGS): Likewise.
5552 (chain_mod_LDFLAGS): Likewise.
5554 * DISTLIST: Added include/grub/efi/chainloader.h,
5555 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
5557 * include/grub/efi/chainloader.h: New file.
5558 * loader/efi/chainloader.c: Likewise.
5559 * loader/efi/chainloader_normal.c: Likewise.
5561 2006-04-30 Marco Gerards <marco@gnu.org>
5563 * commands/configfile.c (grub_cmd_source): New function.
5564 (GRUB_MOD_INIT): Register the commands `source' and `.'.
5565 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
5567 2006-04-30 Marco Gerards <marco@gnu.org>
5569 * normal/execute.c (grub_script_execute_cmd): Change the return
5570 type to `grub_err_t'. Correctly return the error.
5571 (grub_script_execute_cmdline): In case a command line is not a
5572 command or a function, try to interpret it as an assignment.
5574 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5576 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
5577 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
5578 skip a node whose name is obviously invalid as UTF-16,
5579 i.e. contains a NUL character. Stop the iteration when the last
5580 directory entry is found. Instead of using the return value of
5581 grub_hfsplus_btree_iterate_node, store the value in RET and use
5582 it, because the iterator can be stopped by the last directory
5585 2006-04-30 Marco Gerards <marco@gnu.org>
5587 * include/grub/env.h (grub_env_export): New prototype. Reported
5588 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
5590 2006-04-30 Marco Gerards <marco@gnu.org>
5592 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
5593 size of the extents in a catalog file record.
5595 2006-04-29 Marco Gerards <marco@gnu.org>
5597 * commands/configfile.c (grub_cmd_configfile): Execute the
5598 configfile within its own context.
5600 * include/grub/env.h (grub_env_context_open): New prototype.
5601 (grub_env_context_close): Likewise.
5603 * kern/env.c (grub_env): Removed.
5604 (grub_env_sorted): Likewise.
5605 (grub_env_context): New variable.
5606 (grub_env_var_context): Likewise.
5607 (grub_env_find): Search both the active context and the global
5609 (grub_env_context_open): New function.
5610 (grub_env_context_close): Likewise.
5611 (grub_env_insert): Likewise.
5612 (grub_env_remove): Likewise.
5613 (grub_env_export): Likewise.
5614 (grub_env_set): Changed to use helper functions to avoid code
5616 (grub_env_iterate): Rewritten so both the current context and the
5617 global context are being used.
5619 * normal/command.c (export_command): New function.
5620 (grub_command_init): Register the `export' function.
5622 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
5624 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
5625 explicitly to suppress gcc's warnings.
5626 * fs/fat.c (grub_fat_find_dir): Likewise.
5627 (grub_fat_label): Likewise.
5628 * fs/xfs.c (grub_xfs_read_inode): Likewise.
5629 (grub_xfs_mount): Likewise.
5630 (grub_xfs_label): Likewise.
5631 * fs/affs.c (grub_affs_mount): Likewise.
5632 (grub_affs_label): Likewise.
5633 (grub_affs_iterate_dir): Likewise.
5634 * fs/sfs.c (grub_sfs_mount): Likewise.
5635 (grub_sfs_iterate_dir): Likewise.
5636 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
5637 * fs/hfs.c (grub_hfs_mount): Likewise.
5638 (grub_hfs_cmp_catkeys): Likewise.
5639 (grub_hfs_find_dir): Likewise.
5640 (grub_hfs_dir): Likewise.
5641 (grub_hfs_label): Likewise.
5642 * fs/jfs.c (grub_jfs_mount): Likewise.
5643 (grub_jfs_opendir): Likewise.
5644 (grub_jfs_getent): Likewise.
5645 (grub_jfs_lookup_symlink): Likewise.
5646 (grub_jfs_label): Likewise.
5647 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
5648 (grub_hfsplus_iterate_dir): Likewise.
5649 (grub_hfsplus_btree_iterate_node): Made static.
5651 * util/grub-emu.c (prefix): New variable.
5652 (grub_machine_set_prefix): New function.
5653 (main): Do not set the environment variable "prefix" here. Only
5654 set PREFIX, which is used later by grub_machine_set_prefix.
5656 * include/grub/video.h: Do not include grub/symbol.h.
5657 (grub_video_register): Not exported. This symbol is not defined in
5659 (grub_video_unregister): Likewise.
5660 (grub_video_iterate): Likewise.
5661 (grub_video_setup): Likewise.
5662 (grub_video_restore): Likewise.
5663 (grub_video_get_info): Likewise.
5664 (grub_video_get_blit_format): Likewise.
5665 (grub_video_set_palette): Likewise.
5666 (grub_video_get_palette): Likewise.
5667 (grub_video_set_viewport): Likewise.
5668 (grub_video_get_viewport): Likewise.
5669 (grub_video_map_color): Likewise.
5670 (grub_video_map_rgb): Likewise.
5671 (grub_video_map_rgba): Likewise.
5672 (grub_video_fill_rect): Likewise.
5673 (grub_video_blit_glyph): Likewise.
5674 (grub_video_blit_bitmap): Likewise.
5675 (grub_video_blit_render_target): Likewise.
5676 (grub_video_scroll): Likewise.
5677 (grub_video_swap_buffers): Likewise.
5678 (grub_video_create_render_target): Likewise.
5679 (grub_video_delete_render_target): Likewise.
5680 (grub_video_set_active_render_target): Likewise.
5682 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
5684 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
5686 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
5687 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5688 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5689 instead of $(srcdir)/genkernsyms.sh.
5691 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
5692 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5693 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5694 instead of $(srcdir)/genkernsyms.sh.
5696 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
5697 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5698 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5699 instead of $(srcdir)/genkernsyms.sh.
5701 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
5702 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5703 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5704 instead of $(srcdir)/genkernsyms.sh.
5706 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
5709 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
5711 (gensymlist.sh): New target.
5712 (genkernsyms.sh): Likewise.
5714 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
5715 genkernsyms.sh.in and gensymlist.sh.in.
5717 * genkernsyms.sh: Removed.
5718 * gensymlist.sh: Likewise.
5720 * genkernsyms.sh.in: New file.
5721 * gensymlist.sh.in: Likewise.
5723 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5725 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
5726 clobber "prefix", since we may have already set it manually.
5728 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5730 * kern/misc.c (abort): New alias for grub_abort.
5732 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
5734 A new machine-specific function "grub_machine_set_prefix" is
5735 defined. This is called after loading modules, so that a prefix
5736 initialization can use modules. Also, this change adds an
5737 intensive debugging feature for the memory manager via the
5738 configure option "--enable-mm-debug".
5740 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
5743 * kern/sparc64/ieee1275/init.c (abort): Removed.
5744 (grub_stop): Likewise.
5745 (grub_exit): New function.
5746 (grub_set_prefix): Renamed to ...
5747 (grub_machine_set_prefix): ... this.
5748 (grub_machine_init): Do not call grub_set_prefix.
5750 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
5751 (grub_machine_set_prefix): ... this.
5752 (grub_machine_init): Do not call grub_set_prefix.
5754 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
5755 (grub_machine_init): Do not set the prefix here.
5757 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
5759 * kern/efi/init.c: Include grub/mm.h.
5760 (grub_efi_set_prefix): New function.
5762 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
5763 (grub_efi_get_filename): New function.
5764 (grub_print_device_path): Renamed to ...
5765 (grub_efi_print_device_path): ... this.
5767 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
5768 [MM_DEBUG] (grub_realloc): Likewise.
5769 [MM_DEBUG] (grub_free): Likewise.
5770 [MM_DEBUG] (grub_memalign): Likewise.
5771 [MM_DEBUG] (grub_mm_debug): New variable.
5772 [MM_DEBUG] (grub_debug_malloc): New function.
5773 [MM_DEBUG] (grub_debug_free): New function.
5774 [MM_DEBUG] (grub_debug_realloc): New function.
5775 [MM_DEBUG] (grub_debug_memalign): New function.
5777 * kern/misc.c (grub_abort): Print a newline to distinguish
5780 * kern/main.c (grub_main): Call grub_machine_set_prefix and
5781 grub_set_root_dev after loading modules. This is necessary when
5782 setting a prefix depends on modules.
5784 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
5785 (grub_efi_print_device_path): ... this.
5786 (grub_efi_get_filename): New prototype.
5787 (grub_efi_set_prefix): Likewise.
5789 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
5791 (grub_efidisk_get_device_handle): New prototype.
5792 (grub_efidisk_get_device_name): Likewise.
5794 * include/grub/mm.h: Include config.h.
5795 (MM_DEBUG): Removed.
5796 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
5797 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
5798 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
5799 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
5800 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
5801 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
5802 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
5803 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
5804 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
5806 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
5808 * disk/efi/efidisk.c: Include grub/partition.h.
5809 (iterate_child_devices): New function.
5810 (add_device): First, compare only last device path nodes, so that
5811 devices are sorted by the types.
5812 (grub_efidisk_get_device_handle): New function.
5813 (grub_efidisk_get_device_name): Likewise.
5815 * configure.ac (--enable-mm-debug): New option to enable the
5816 memory manager debugging feature. This makes the binary much
5817 bigger, so is disabled by default.
5819 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
5821 Use grub_abort instead of grub_stop, and grub_exit must be
5822 define in each architecture now. Also, this change adds support
5825 * util/i386/pc/grub-probefs.c: Include grub/term.h.
5826 (grub_getkey): New function.
5827 (grub_term_get_current): Likewise.
5829 * util/i386/pc/grub-setup.c: Include grub/term.h.
5830 (grub_getkey): New function.
5831 (grub_term_get_current): Likewise.
5833 * util/misc.c (grub_stop): Renamed to ...
5834 (grub_exit): ... this.
5836 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
5837 (grub_exit): ... this.
5838 (grub_machine_init): Use grub_abort instead of abort.
5839 (grub_stop): Removed.
5841 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
5844 * kern/i386/pc/startup.S (grub_exit): New function.
5845 (cold_reboot): New label.
5847 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
5848 (grub_efi_init): Call grub_efidisk_init.
5849 (grub_efi_fini): Call grub_efidisk_fini.
5851 * kern/efi/efi.c: Include grub/mm.h.
5852 (grub_efi_console_control_guid): Renamed to ...
5853 (console_control_guid): ... this.
5854 (grub_efi_loaded_image_guid): Renamed to ...
5855 (loaded_image_guid): ... this.
5856 (grub_efi_locate_handle): New function.
5857 (grub_efi_open_protocol): Likewise.
5858 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
5859 GRUB_EFI_CONSOLE_CONTROL_GUID.
5860 (grub_efi_exit): Removed.
5861 (grub_stop): Likewise.
5862 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
5863 (grub_exit): New function.
5864 (grub_print_device_path): Likewise.
5866 * kern/rescue.c (grub_rescue_cmd_exit): New function.
5867 (grub_enter_rescue_mode): Register "exit".
5869 * kern/misc.c (grub_real_dprintf): A cosmetic change.
5870 (grub_abort): New function.
5872 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5874 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5876 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5878 * include/grub/efi/efi.h (grub_efi_exit): Removed.
5879 (grub_print_device_path): New prototype.
5880 (grub_efi_locate_handle): Likewise.
5881 (grub_efi_open_protocol): Likewise.
5883 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5884 * disk/efi/efidisk.c: Likewise.
5886 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5888 * include/grub/efi/console_control.h
5889 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5891 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5892 last 8 bytes as an array.
5893 (GRUB_EFI_DISK_IO_GUID): New macro.
5894 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5895 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5896 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5898 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5899 (struct grub_efi_device_path): Rename the member "sub_type" to
5901 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5902 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5903 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5904 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5905 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5906 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5907 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5908 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5909 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5910 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5911 (struct grub_efi_pci_device_path): New structure.
5912 (grub_efi_pci_device_path_t): New type.
5913 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5914 (struct grub_efi_pccard_device_path): New structure.
5915 (grub_efi_pccard_device_path_t): New type.
5916 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5917 (struct grub_efi_memory_mapped_device_path): New structure.
5918 (grub_efi_memory_mapped_device_path_t): New type.
5919 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5920 (struct grub_efi_vendor_device_path): New structure.
5921 (grub_efi_vendor_device_path_t): New type.
5922 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5923 (struct grub_efi_controller_device_path): New structure.
5924 (grub_efi_controller_device_path_t): New type.
5925 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5926 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5927 (struct grub_efi_acpi_device_path): New structure.
5928 (grub_efi_acpi_device_path_t): New type.
5929 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5930 (struct grub_efi_expanded_acpi_device_path): New structure.
5931 (grub_efi_expanded_acpi_device_path_t): New type.
5932 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5933 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5934 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5935 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5936 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5937 (struct grub_efi_atapi_device_path): New structure.
5938 (grub_efi_atapi_device_path_t): New type.
5939 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5940 (struct grub_efi_fibre_channel_device_path): New structure.
5941 (grub_efi_fibre_channel_device_path_t): New type.
5942 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5943 (struct grub_efi_1394_device_path): New structure.
5944 (grub_efi_1394_device_path_t): New type.
5945 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5946 (struct grub_efi_usb_device_path): New structure.
5947 (grub_efi_usb_device_path_t): New type.
5948 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5949 (struct grub_efi_usb_class_device_path): New structure.
5950 (grub_efi_usb_class_device_path_t): New type.
5951 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5952 (struct grub_efi_i2o_device_path): New structure.
5953 (grub_efi_i2o_device_path_t): New type.
5954 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5955 (struct grub_efi_mac_address_device_path): New structure.
5956 (grub_efi_mac_address_device_path_t): New type.
5957 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5958 (struct grub_efi_ipv4_device_path): New structure.
5959 (grub_efi_ipv4_device_path_t): New type.
5960 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5961 (struct grub_efi_ipv6_device_path): New structure.
5962 (grub_efi_ipv6_device_path_t): New type.
5963 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5964 (struct grub_efi_infiniband_device_path): New structure.
5965 (grub_efi_infiniband_device_path_t): New type.
5966 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5967 (struct grub_efi_uart_device_path): New structure.
5968 (grub_efi_uart_device_path_t): New type.
5969 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5970 (struct grub_efi_vendor_messaging_device_path): New structure.
5971 (grub_efi_vendor_messaging_device_path_t): New type.
5972 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5973 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5974 (struct grub_efi_hard_drive_device_path): New structure.
5975 (grub_efi_hard_drive_device_path_t): New type.
5976 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5977 (struct grub_efi_cdrom_device_path): New structure.
5978 (grub_efi_cdrom_device_path_t): New type.
5979 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5980 (struct grub_efi_vendor_media_device_path): New structure.
5981 (grub_efi_vendor_media_device_path_t): New type.
5982 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5983 (struct grub_efi_file_path_device_path): New structure.
5984 (grub_efi_file_path_device_path_t): New type.
5985 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5986 (struct grub_efi_protocol_device_path): New structure.
5987 (grub_efi_protocol_device_path_t): New type.
5988 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5989 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5990 (struct grub_efi_bios_device_path): New structure.
5991 (grub_efi_bios_device_path_t): New type.
5992 (struct grub_efi_disk_io): New structure.
5993 (grub_efi_disk_io_t): New type.
5994 (struct grub_efi_block_io_media): New structure.
5995 (grub_efi_block_io_media_t): New type.
5996 (struct grub_efi_block_io): New structure.
5997 (grub_efi_block_io_t): New type.
5999 * include/grub/misc.h (grub_stop): Removed.
6000 (grub_exit): New prototype.
6001 (grub_abort): Likewise.
6003 * include/grub/disk.h (enum grub_disk_dev_id): Added
6004 GRUB_DISK_DEVICE_EFIDISK_ID.
6006 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
6008 (kernel_syms.lst): Remove the target if an error occurs.
6010 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
6012 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
6013 as it was simply too buggy.
6015 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
6017 * kern/misc.c (grub_lltoa): New function.
6018 (grub_vsprintf): Added support for the long long suffix,
6021 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
6023 * Makefile.in (LDFLAGS): Add variable.
6024 (LD): Remove variable.
6025 * configure.ac: Add -m32 to LDFLAGS.
6026 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
6027 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
6028 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
6029 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
6030 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
6032 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
6033 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
6034 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
6036 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
6038 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
6039 length for unknown glyph.
6041 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6043 Add support for pre-loaded modules into the EFI port.
6045 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
6046 completely. Accept one more argument DIR. The caller has changed.
6048 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
6050 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
6051 (grub_efi_loaded_image_guid): New variable.
6052 (grub_efi_get_loaded_image): New function.
6053 (grub_arch_modules_addr): Likewise.
6055 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
6058 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
6059 (struct grub_efi_loaded_image): New structure.
6060 (grub_efi_loaded_image_t): New type.
6062 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6064 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
6065 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
6066 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
6068 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
6070 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
6072 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
6074 * DISTLIST: Added include/grub/efi/console.h,
6075 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
6076 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6078 * include/grub/efi/console.h: New file.
6079 * include/grub/efi/time.h: Likewise.
6080 * include/grub/i386/efi/kernel.h: Likewise.
6081 * kern/efi/init.c: Likewise.
6082 * kern/efi/mm.c: Likewise.
6083 * term/efi/console.c: Likewise.
6085 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
6086 (grub_stop): Removed.
6087 (grub_get_rtc): Likewise.
6088 (grub_machine_init): Simply call grub_efi_init.
6089 (grub_machine_fini): Call grub_efi_fini.
6091 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
6092 (grub_efi_output_string): Removed.
6093 (grub_efi_stall): New function.
6094 (grub_stop): Likewise.
6095 (grub_get_rtc): Likewise.
6097 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
6098 (grub_efi_stall): New prototype.
6099 (grub_efi_allocate_pages): Likewise.
6100 (grub_efi_free_pages): Likewise.
6101 (grub_efi_get_memory_map): Likewise.
6102 (grub_efi_mm_init): Likewise.
6103 (grub_efi_mm_fini): Likewise.
6104 (grub_efi_init): Likewise.
6105 (grub_efi_fini): Likewise.
6107 * include/grub/i386/efi/time.h: Do not include
6108 grub/symbol.h. Include grub/efi/time.h.
6109 (GRUB_TICKS_PER_SECOND): Removed.
6110 (grub_get_rtc): Likewise.
6112 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
6113 Added padding. The EFI spec is buggy.
6114 (GRUB_EFI_BLACK): New macro.
6115 (GRUB_EFI_BLUE): Likewise.
6116 (GRUB_EFI_GREEN): Likewise.
6117 (GRUB_EFI_CYAN): Likewise.
6118 (GRUB_EFI_RED): Likewise.
6119 (GRUB_EFI_MAGENTA): Likewise.
6120 (GRUB_EFI_BROWN): Likewise.
6121 (GRUB_EFI_LIGHTGRAY): Likewise.
6122 (GRUB_EFI_BRIGHT): Likewise.
6123 (GRUB_EFI_DARKGRAY): Likewise.
6124 (GRUB_EFI_LIGHTBLUE): Likewise.
6125 (GRUB_EFI_LIGHTGREEN): Likewise.
6126 (GRUB_EFI_LIGHTCYAN): Likewise.
6127 (GRUB_EFI_LIGHTRED): Likewise.
6128 (GRUB_EFI_LIGHTMAGENTA): Likewise.
6129 (GRUB_EFI_YELLOW): Likewise.
6130 (GRUB_EFI_WHITE): Likewise.
6131 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
6132 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
6133 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
6134 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
6135 (GRUB_EFI_BACKGROUND_RED): Likewise.
6136 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
6137 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
6138 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
6139 (GRUB_EFI_TEXT_ATTR): Likewise.
6141 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
6142 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6143 (kernel_mod_HEADERS): Added efi/time.h.
6145 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
6147 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
6148 include/grub/efi/api.h, include/grub/efi/console_control.h,
6149 include/grub/efi/efi.h, include/grub/efi/pe32.h,
6150 include/grub/i386/efi/time.h, kern/efi/efi.c,
6151 kern/i386/efi/init.c, kern/i386/efi/startup.S,
6152 and util/i386/efi/grub-mkimage.c.
6154 * Makefile.in (RMKFILES): Added i386-efi.rmk.
6156 * genmk.rb (PModule#rule): Do not export symbols if
6157 #{prefix}_EXPORTS is set to "no".
6159 * conf/i386-efi.mk: New file.
6160 * conf/i386-efi.rmk: Likewise.
6161 * include/grub/efi/api.h: Likewise.
6162 * include/grub/efi/console_control.h: Likewise.
6163 * include/grub/efi/efi.h: Likewise.
6164 * include/grub/efi/pe32.h: Likewise.
6165 * include/grub/i386/efi/time.h: Likewise.
6166 * kern/efi/efi.c: Likewise.
6167 * kern/i386/efi/init.c: Likewise.
6168 * kern/i386/efi/startup.S: Likewise.
6169 * util/i386/efi/grub-mkimage.c: Likewise.
6171 2006-04-17 Marco Gerards <marco@gnu.org>
6173 * include/grub/script.h: Include <grub/parser.h> and
6174 "grub_script.tab.h".
6175 (struct grub_lexer_param): New struct.
6176 (struct grub_parser_param): Likewise.
6177 (grub_script_create_arglist): Pass the state in an argument.
6178 (grub_script_add_arglist): Likewise.
6179 (grub_script_create_cmdline): Likewise.
6180 (grub_script_create_cmdblock): Likewise.
6181 (grub_script_create_cmdif): Likewise.
6182 (grub_script_create_cmdmenu): Likewise.
6183 (grub_script_add_cmd): Likewise.
6184 (grub_script_arg_add): Likewise.
6185 (grub_script_lexer_ref): Likewise.
6186 (grub_script_lexer_deref): Likewise.
6187 (grub_script_lexer_record_start): Likewise.
6188 (grub_script_lexer_record_stop): Likewise.
6189 (grub_script_mem_record): Likewise.
6190 (grub_script_mem_record_stop): Likewise.
6191 (grub_script_malloc): Likewise.
6192 (grub_script_yylex): Likewise.
6193 (grub_script_yyparse): Likewise.
6194 (grub_script_yyerror): Likewise.
6195 (grub_script_yylex): Likewise.
6196 (grub_script_lexer_init): Return the state.
6198 * normal/lexer.c (grub_script_lexer_state): Removed variable.
6199 (grub_script_lexer_done): Likewise.
6200 (grub_script_lexer_getline): Likewise.
6201 (grub_script_lexer_refs): Likewise.
6203 (newscript): Likewise.
6205 (recording): Likewise.
6206 (recordpos): Likewise.
6207 (recordlen): Likewise.
6208 (grub_script_lexer_init): Return the state instead of setting
6210 (grub_script_lexer_ref): Use the newly added argument for state
6212 (grub_script_lexer_deref): Likewise.
6213 (grub_script_lexer_record_start): Likewise.
6214 (grub_script_lexer_record_stop): Likewise.
6215 (recordchar): Likewise.
6216 (nextchar): Likewise.
6217 (grub_script_yylex2): Likewise.
6218 (grub_script_yylex): Likewise.
6219 (grub_script_yyerror): Likewise.
6221 * normal/parser.y (func_mem): Removed variable.
6222 (menu_entry): Likewise.
6224 (%lex-param): New parser option.
6225 (%parse-param): Likewise.
6226 (script): Always return the AST.
6227 (argument): Pass the state around.
6228 (arguments): Likewise.
6229 (grubcmd): Likewise.
6230 (commands): Likewise.
6231 (function): Likewise.
6232 (menuentry): Likewise.
6233 (if_statement): Likewise.
6236 * normal/script.c (grub_script_memused): Removed variable.
6237 (grub_script_parsed): Likewise.
6238 (grub_script_malloc): Added a state argument. Use that instead of
6240 (grub_script_mem_record): Likewise.
6241 (grub_script_mem_record_stop): Likewise.
6242 (grub_script_arg_add): Likewise.
6243 (grub_script_add_arglist): Likewise.
6244 (grub_script_create_cmdline): Likewise.
6245 (grub_script_create_cmdif): Likewise.
6246 (grub_script_create_cmdmenu): Likewise.
6247 (grub_script_add_cmd): Likewise.
6248 (grub_script_parse): Setup the state before calling the parser.
6250 2006-04-16 Marco Gerards <marco@gnu.org>
6252 * normal/command.c (grub_command_init): Remove the title command.
6254 * normal/lexer.c (grub_script_yylex): Renamed from this...
6255 (grub_script_yylex2): ... to this.
6256 (grub_script_yylex): New function. Temporary
6257 introduced to filter some tokens.
6258 (grub_script_yyerror): Print a newline.
6260 * normal/main.c (read_config_file): Output information about the
6261 lines that contain errors. Wait for a key after all lines have
6262 been processed. Don't return an empty menu.
6264 * normal/parser.y (func_mem): Don't initialize.
6265 (menu_entry): Likewise.
6266 (err): New variable.
6267 (script): Don't return anything when an error was encountered.
6268 (ws, returns): Removed rules.
6269 (argument): Disabled concatenated variable support.
6270 (arguments): Remove explicit separators.
6271 (grubcmd): Likewise.
6272 (function): Likewise.
6273 (menuentry): Likewise.
6275 (commands): Likewise. Add error handling.
6277 * normal/script.c (grub_script_create_cmdline): If
6278 `grub_script_parsed' is 0, assume the parser encountered an error.
6280 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
6282 * configure.ac: Add support for EFI. Fix the typo
6283 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
6285 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
6287 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
6288 foreign multibyte characters should be shown correctly.
6290 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
6292 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
6294 (read_config_file): Made it to close file before returning.
6296 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
6298 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
6299 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
6300 video/i386/pc/vbefill.c.
6302 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
6303 video/i386/pc/vbefill.c.
6305 * include/grub/video.h (grub_video_blit_format): New enum.
6306 (grub_video_mode_info): Added new member blit_format.
6307 (grub_video_get_blit_format): New function prototype.
6309 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
6311 (grub_video_vbe_map_rgb): Likewise.
6312 (grub_video_vbe_unmap_color): Likewise.
6314 * include/grub/i386/pc/vbeblit.h: New file.
6316 * include/grub/i386/pc/vbefill.h: New file.
6318 * video/video.c (grub_video_get_blit_format): New function.
6319 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
6320 (grub_video_vbe_map_rgb): Likewise.
6321 (grub_video_vbe_unmap_color): Likewise.
6323 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
6325 (grub_video_vbe_blit_render_target): Changed to use more optimized
6327 (grub_video_vbe_setup): Added detection for optimized settings.
6328 (grub_video_vbe_create_render_target): Likewise.
6330 * video/i386/pc/vbeblit.c: New file.
6332 * video/i386/pc/vbefill.c: New file.
6334 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
6336 * font/manager.c (grub_font_get_glyph): Removed font fixup from
6339 * util/unifont2pff.rb: ... and moved it to here. Improved argument
6340 parsing to support both hex and dec ranges. If filename was missing
6341 show usage information.
6343 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
6345 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
6346 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
6348 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
6349 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
6350 (video_mod_SOURCES): Added.
6351 (video_mod_CFLAGS): Likewise.
6352 (video_mod_LDFLAGS): Likewise.
6353 (gfxterm_mod_SOURCES): Likewise.
6354 (gfxterm_mod_CFLAGS): Likewise.
6355 (gfxterm_mod_LDFLAGS): Likewise.
6356 (videotest_mod_SOURCES): Likewise.
6357 (videotest_mod_CFLAGS): Likewise.
6358 (videotest_mod_LDFLAGS): Likewise.
6359 (vesafb_mod_SOURCES): Removed.
6360 (vesafb_mod_CFLAGS): Likewise.
6361 (vesafb_mod_LDFLAGS): Likewise.
6362 (vga_mod_SOURCES): Likewise.
6363 (vga_mod_CFLAGS): Likewise.
6364 (vga_mod_LDFLAGS): Likewise.
6366 * commands/videotest.c: New file.
6368 * font/manager.c (fill_with_default_glyph): Modified to use
6370 (grub_font_get_glyph): Likewise.
6371 (fontmanager): Renamed from this...
6372 (font_manager): ... to this.
6374 * include/grub/font.h (grub_font_glyph): Added new structure.
6375 (grub_font_get_glyph): Modified to use grub_font_glyph.
6377 * include/grub/misc.h (grub_abs): Added as inline function.
6379 * include/grub/video.h: New file.
6381 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
6382 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
6383 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
6384 (grub_vbe_get_controller_info): Renamed from this...
6385 (grub_vbe_bios_get_controller_info): ... to this.
6386 (grub_vbe_get_mode_info): Renamed from this...
6387 (grub_vbe_bios_get_mode_info): ... to this.
6388 (grub_vbe_set_mode): Renamed from this...
6389 (grub_vbe_bios_set_mode): ... to this.
6390 (grub_vbe_get_mode): Renamed from this...
6391 (grub_vbe_bios_get_mode): ... to this.
6392 (grub_vbe_set_memory_window): Renamed from this...
6393 (grub_vbe_bios_set_memory_window): ... to this.
6394 (grub_vbe_get_memory_window): Renamed from this...
6395 (grub_vbe_bios_get_memory_window): ... to this.
6396 (grub_vbe_set_scanline_length): Renamed from this...
6397 (grub_vbe_set_scanline_length): ... to this.
6398 (grub_vbe_get_scanline_length): Renamed from this...
6399 (grub_vbe_bios_get_scanline_length): ... to this.
6400 (grub_vbe_set_display_start): Renamed from this...
6401 (grub_vbe_bios_set_display_start): ... to this.
6402 (grub_vbe_get_display_start): Renamed from this...
6403 (grub_vbe_bios_get_display_start): ... to this.
6404 (grub_vbe_set_palette_data): Renamed from this...
6405 (grub_vbe_bios_set_palette_data): ... to this.
6406 (grub_vbe_set_pixel_rgb): Removed.
6407 (grub_vbe_set_pixel_index): Likewise.
6409 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
6411 (grub_vbe_bios_get_controller_info): ... to this.
6412 (grub_vbe_get_mode_info): Renamed from this...
6413 (grub_vbe_bios_get_mode_info): ... to this.
6414 (grub_vbe_set_mode): Renamed from this...
6415 (grub_vbe_bios_set_mode): ... to this.
6416 (grub_vbe_get_mode): Renamed from this...
6417 (grub_vbe_bios_get_mode): ... to this.
6418 (grub_vbe_set_memory_window): Renamed from this...
6419 (grub_vbe_bios_set_memory_window): ... to this.
6420 (grub_vbe_get_memory_window): Renamed from this...
6421 (grub_vbe_bios_get_memory_window): ... to this.
6422 (grub_vbe_set_scanline_length): Renamed from this...
6423 (grub_vbe_set_scanline_length): ... to this.
6424 (grub_vbe_get_scanline_length): Renamed from this...
6425 (grub_vbe_bios_get_scanline_length): ... to this.
6426 (grub_vbe_set_display_start): Renamed from this...
6427 (grub_vbe_bios_set_display_start): ... to this.
6428 (grub_vbe_get_display_start): Renamed from this...
6429 (grub_vbe_bios_get_display_start): ... to this.
6430 (grub_vbe_set_palette_data): Renamed from this...
6431 (grub_vbe_bios_set_palette_data): ... to this.
6432 (grub_vbe_bios_get_controller_info): Fixed problem with registers
6433 getting corrupted after calling it. Added more pushes and pops.
6434 (grub_vbe_bios_set_mode): Likewise.
6435 (grub_vbe_bios_get_mode): Likewise.
6436 (grub_vbe_bios_get_memory_window): Likewise.
6437 (grub_vbe_bios_set_scanline_length): Likewise.
6438 (grub_vbe_bios_get_scanline_length): Likewise.
6439 (grub_vbe_bios_get_display_start): Likewise.
6440 (grub_vbe_bios_set_palette_data): Likewise.
6442 * normal/cmdline.c (cl_set_pos): Refresh the screen.
6443 (cl_insert): Likewise.
6444 (cl_delete): Likewise.
6446 * term/gfxterm.c: New file.
6448 * term/i386/pc/vesafb.c: Removed file.
6450 * video/video.c: New file.
6452 * video/i386/pc/vbe.c (real2pm): Added new function.
6453 (grub_video_vbe_draw_pixel): Likewise.
6454 (grub_video_vbe_get_video_ptr): Likewise.
6455 (grub_video_vbe_get_pixel): Likewise
6456 (grub_video_vbe_init): Likewise.
6457 (grub_video_vbe_fini): Likewise.
6458 (grub_video_vbe_setup): Likewise.
6459 (grub_video_vbe_get_info): Likewise.
6460 (grub_video_vbe_set_palette): Likewise.
6461 (grub_video_vbe_get_palette): Likewise.
6462 (grub_video_vbe_set_viewport): Likewise.
6463 (grub_video_vbe_get_viewport): Likewise.
6464 (grub_video_vbe_map_color): Likewise.
6465 (grub_video_vbe_map_rgb): Likewise.
6466 (grub_video_vbe_map_rgba): Likewise.
6467 (grub_video_vbe_unmap_color): Likewise.
6468 (grub_video_vbe_fill_rect): Likewise.
6469 (grub_video_vbe_blit_glyph): Likewise.
6470 (grub_video_vbe_blit_bitmap): Likewise.
6471 (grub_video_vbe_blit_render_target): Likewise.
6472 (grub_video_vbe_scroll): Likewise.
6473 (grub_video_vbe_swap_buffers): Likewise.
6474 (grub_video_vbe_create_render_target): Likewise.
6475 (grub_video_vbe_delete_render_target): Likewise.
6476 (grub_video_vbe_set_active_render_target): Likewise.
6477 (grub_vbe_set_pixel_rgb): Remove function.
6478 (grub_vbe_set_pixel_index): Likewise.
6479 (index_color_mode): Remove static variable.
6480 (active_mode): Likewise.
6481 (framebuffer): Likewise.
6482 (bytes_per_scan_line): Likewise.
6483 (grub_video_vbe_adapter): Added new static variable.
6484 (framebuffer): Likewise.
6485 (render_target): Likewise.
6486 (initial_mode): Likewise.
6487 (mode_in_use): Likewise.
6488 (mode_list): Likewise.
6490 2006-03-10 Marco Gerards <marco@gnu.org>
6492 * configure.ac (AC_INIT): Bumped to 1.93.
6494 * DISTLIST: Added `include/grub/hfs.h'.
6496 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
6498 * boot/i386/pc/boot.S (general_error): Before looping, try INT
6499 18H, which might help the BIOS falling back to next boot media.
6501 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
6503 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
6504 Poe Chen <poe.poechen@gmail.com>.
6506 2006-01-17 Marco Gerards <marco@gnu.org>
6508 * include/grub/normal.h: Include <grub/script.h>.
6509 (grub_command_list): Removed struct.
6510 (grub_command_list_t): Removed type.
6511 (grub_menu_entry): Remove members `num' and `command_list'. Add
6512 members `commands' and `sourcecode'.
6513 * include/grub/script.h: Add inclusion guards.
6514 (grub_script_cmd_menuentry): New struct.
6515 (grub_script_execute_menuentry): New prototype.
6516 (grub_script_lexer_record_start): Likewise.
6517 (grub_script_lexer_record_stop): Likewise.
6518 * normal/execute.c (grub_script_execute_menuentry): New function.
6519 * normal/lexer.c (record, recording, recordpos, recordlen): New
6521 (grub_script_lexer_record_start): New function.
6522 (grub_script_lexer_record_stop): Likewise.
6523 (recordchar): Likewise.
6524 (nextchar): Likewise.
6525 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
6526 2048 as the buffer size. Add the tokens `menuentry' and `@'.
6527 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
6528 (current_menu): New variable.
6529 (free_menu): Mainly rewritten.
6530 (grub_normal_menu_addentry): New function.
6531 (read_config_file): Rewritten.
6532 * normal/menu.c (run_menu_entry): Mainly rewritten.
6533 * normal/menu_entry.c (make_screen): Rewritten te code to insert
6535 (run): Mainly rewritten.
6536 * normal/parser.y (menu_entry): New variable.
6537 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
6538 (menuentry): New rule.
6539 (command): Add `menuentry'.
6540 (if_statement): Allow additional returns before `fi'.
6541 * normal/script.c (grub_script_create_cmdmenu): New function.
6543 2006-01-03 Marco Gerards <marco@gnu.org>
6545 * INSTALL: GNU Bison is required.
6546 * configure.ac: Rewritten the test to detect Bison.
6547 * Makefile.in (YACC): New variable. Reported by Xun Sun
6548 <xun.sun.cn@gmail.com>.
6550 2006-01-03 Marco Gerards <marco@gnu.org>
6552 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
6553 the HFS+ filesystem to filesystem blocks.
6554 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
6555 GCC warning is silenced.
6557 2006-01-03 Marco Gerards <marco@gnu.org>
6559 * partmap/apple.c (apple_partition_map_iterate): Convert the data
6560 read from disk from big endian to host byte order.
6562 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
6564 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
6566 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
6567 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
6568 embedded HFS+ filesystem.
6569 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
6570 (grub_hfs_sblock): Move from here...
6571 * include/grub/hfs.h: To here... New file.
6572 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
6574 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
6576 (grub_hfsplus_volheader): Change type of member `magic' to
6578 (grub_hfsplus_data): Add new member `embedded_offset'.
6579 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
6581 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
6582 Calculate the offset.
6584 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6586 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
6588 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
6590 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6592 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
6593 ENV->NAME is NULL after allocating ENV->VALUE.
6595 2005-12-25 Marco Gerards <marco@gnu.org>
6597 * kern/env.c (grub_env_set): Rewritten the error handling code.
6599 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6601 * geninit.sh: Made more robust, and more portable.
6603 2005-12-25 Marco Gerards <marco@gnu.org>
6605 Add support for Apple HFS+ filesystems.
6607 * fs/hfsplus.c: New file.
6609 * DISTLIST: Added `fs/hfsplus.c'.
6611 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
6612 (hfsplus_mod_SOURCES): New variable.
6613 (hfsplus_mod_CFLAGS): Likewise.
6614 (hfsplus_mod_LDFLAGS): Likewise.
6615 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
6616 (grub_setup_SOURCES): Likewise.
6617 (grub_mkdevicemap_SOURCES): Likewise.
6618 (grub_emu_SOURCES): Likewise.
6619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6621 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
6623 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
6625 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6627 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
6628 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
6629 include/grub/parser.h, include/grub/script.h, kern/parser.c,
6630 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
6631 normal/lexer.c, normal/parser.y, normal/script.c, and
6633 Removed kern/sparc64/cache.c.
6635 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
6636 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
6639 * configure.ac (AC_INIT): Bumped to 1.92.
6641 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
6643 * kern/err.c (grub_error_push): Added new function to support error
6645 (grub_error_pop): Likewise.
6646 (grub_error_stack_items): New local variable to support error stacks.
6647 (grub_error_stack_pos): Likewise.
6648 (grub_error_stack_assert): Likewise.
6649 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
6651 (grub_print_error): Added support to print errors from error stack.
6653 * include/grub/err.h (grub_error_push): Added function prototype.
6654 (grub_error_pop): Likewise.
6656 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
6658 * configure.ac: Accept `powerpc64' as host_cpu.
6659 (amd64): Rename to `biarch32'.
6661 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
6662 non-cacheline-aligned addresses.
6664 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
6665 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
6666 if `size' is non-zero.
6668 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
6670 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
6671 and `cd' to make sure the filename is not prefixed with a
6673 (pkgdata_MODULES): Add `gpt.mod'.
6674 (gpt_mod_SOURCES): New variable.
6675 (gpt_mod_CFLAGS): Likewise.
6676 (gpt_mod_LDFLAGS): Likewise.
6678 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
6680 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
6683 * partmap/gpt.c: New file.
6685 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
6686 GPT partition map is detected.
6688 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
6690 * commands/i386/pc/play.c: New file.
6691 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
6692 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
6695 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
6697 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
6698 ((unused))' to silence gcc warning.
6700 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
6702 * configure.ac: Correct `AC_PROG_YACC' test.
6704 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6706 * util/powerpc/ieee1275/grub-install.in: Run the mount point
6707 check before installing files.
6709 2005-11-22 Mike Small <smallm@panix.com>
6711 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
6712 number regex so multidigit numbers are recognized correctly.
6714 2005-11-22 Mike Small <smallm@panix.com>
6716 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
6717 debugging message before attempting to claim memory.
6718 (grub_rescue_cmd_initrd): Add a claim debugging message and try
6719 multiple addresses in case of failure.
6721 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6723 * term/tparm.c (get_space): Remove empty `if' statement.
6725 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
6727 * kern/parser.c (check_varstate): Rename `state' to 's'.
6729 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6731 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
6732 variable definitions to the beginning of each function. Sort stack
6734 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
6735 `buf' argument to `char *'.
6737 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6739 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
6740 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6741 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6742 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6743 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6744 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6745 configfile.mod, search.mod, gzio.mod and test.mod.
6746 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6747 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6748 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6749 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6750 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6751 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6752 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6753 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6754 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6755 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6756 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6757 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6758 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6759 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6760 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6761 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6762 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6763 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6764 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6765 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6766 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6767 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6768 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
6770 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
6772 (pkgdata_MODULES): Add test.mod.
6774 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6776 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
6777 appending to variables with "+=".
6778 (PModule): Use full pathname to generate *.lst filenames.
6780 * Makefile.in: Fixed list rules moved from genmk.rb.
6781 (.DELETE_ON_ERROR): New special target.
6782 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
6784 * conf/i386-pc.rmk: Include conf/common.mk.
6785 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6786 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6787 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6788 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6789 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6790 configfile.mod, search.mod, gzio.mod and test.mod.
6791 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6792 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6793 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6794 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6795 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6796 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6797 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6798 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6799 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6800 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6801 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6802 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6803 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6804 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6805 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6806 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6807 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6808 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6809 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6810 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6811 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6812 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6813 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
6815 * conf/common.rmk: ... to here. New file.
6817 * conf/common.mk: New file.
6819 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
6821 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
6822 (grub_script.tab.c): ... here.
6824 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
6825 (grub_script.tab.c): ... here.
6827 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
6828 (grub_script.tab.c): ... here.
6830 * normal/command.c (grub_command_find): Fixed a memory leak of
6831 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
6833 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6835 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
6836 "@" which marks the start of a comment on ARM.
6837 (VARIABLE): Likewise.
6839 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6841 Add support for Linux/ADFS partition tables.
6843 * partmap/acorn.c: New file.
6845 * include/grub/acorn_filecore.h: Likewise.
6847 * DISTLIST: Added `partmap/acorn.c' and
6848 `include/grub/acorn_filecore.h'.
6850 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6852 (pkgdata_MODULES): Add `acorn.mod'.
6853 (acorn_mod_SOURCES): New variable.
6854 (acorn_mod_CFLAGS): Likewise.
6856 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6858 (pkgdata_MODULES): Add `acorn.mod'.
6859 (acorn_mod_SOURCES): New variable.
6860 (acorn_mod_CFLAGS): Likewise.
6862 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
6863 (pkgdata_MODULES): Add `acorn.mod'.
6864 (acorn_mod_SOURCES): New variable.
6865 (acorn_mod_CFLAGS): Likewise.
6866 (acorn_mod_LDFLAGS): Likewise.
6868 * include/types.h (grub_disk_addr_t): New typedef.
6870 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
6872 * geninit.sh: New file.
6874 * geninitheader.sh: Likewise.
6876 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6877 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6878 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6879 * commands/configfile.c (grub_configfile_init)
6880 (grub_configfile_fini): Likewise.
6881 * commands/default.c (grub_default_init, grub_default_fini):
6883 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6884 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6885 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6886 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6888 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6889 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6891 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
6892 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
6894 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6896 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6898 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6899 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6900 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6901 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6902 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6903 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6904 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6905 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6906 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6907 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6908 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6909 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6910 * partmap/amiga.c (grub_amiga_partition_map_init)
6911 (grub_amiga_partition_map_fini): Likewise.
6912 * partmap/apple.c (grub_apple_partition_map_init)
6913 (grub_apple_partition_map_fini): Likewise.
6914 * partmap/pc.c (grub_pc_partition_map_init)
6915 (grub_pc_partition_map_fini): Likewise.
6916 * partmap/sun.c (grub_sun_partition_map_init,
6917 grub_sun_partition_map_fini): Likewise.
6918 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6921 * util/grub-emu.c: Include <grub_modules_init.h>.
6922 (main): Don't initialize and de-initialize any modules directly,
6923 use `grub_init_all' and `grub_fini_all' instead.
6925 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6926 `grub_vesafb_mod_init'.
6927 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
6929 * term/i386/pc/vga.c (grub_vga_init): Renamed to
6930 `grub_vga_mod_init'. Updated all users.
6931 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6933 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6934 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6937 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6938 Generate a function to initialize the module in utilities.
6939 Updated all callers.
6940 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
6941 initialize the module in utilities. Updated all callers.
6943 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6945 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6946 escape sequence and a literal ^L to clear the screen.
6948 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6949 when returning from Open Firmware.
6951 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6953 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6954 (grub_ofconsole_height): Likewise.
6955 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6956 manually insert a '\n'.
6957 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6958 `grub_ofconsole_height'. Return early if these are already set.
6960 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6962 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6963 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6964 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6965 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6966 and `normal/script.c'.
6967 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6968 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6969 (test_mod_SOURCES): New variable.
6970 (test_mod_CFLAGS): Likewise.
6971 (test_mod_LDFLAGS): Likewise.
6972 (pkgdata_MODULES): Add `test.mod'.
6973 (grub_script.tab.c): New rule.
6974 (grub_script.tab.h): Likewise.
6976 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
6978 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6979 `commands/test.c', `normal/execute.c', `normal/lexer.c',
6980 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6981 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6982 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6983 (test_mod_SOURCES): New variable.
6984 (test_mod_CFLAGS): Likewise.
6985 (pkgdata_MODULES): Add `test.mod'.
6986 (grub_script.tab.c): New rule.
6987 (grub_script.tab.h): Likewise.
6989 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
6991 Add initial scripting support.
6993 * commands/test.c: New file.
6994 * include/grub/script.h: Likewise.
6995 * normal/execute.c: Likewise.
6996 * normal/function.c: Likewise.
6997 * normal/lexer.c: Likewise.
6998 * normal/parser.y: Likewise.
6999 * normal/script.c: Likewise.
7001 * configure.ac: Add `AC_PROG_YACC' test.
7003 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
7004 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
7005 `normal/function.c' and `normal/script.c'.
7006 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7007 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7008 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
7010 (pkgdata_MODULES): Add `test.mod'.
7011 (grub_script.tab.c): New rule.
7012 (grub_script.tab.h): Likewise.
7014 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
7016 * include/grub/normal.h (grub_test_init): New prototype.
7017 (grub_test_fini): Likewise.
7019 * normal/command.c: Include <grub/script.h>.
7020 (grub_command_execute): Rewritten.
7022 * util/grub-emu.c (main): Call `grub_test_init' and
7025 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7027 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
7029 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
7030 there are no pending characters.
7032 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7034 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
7035 `grub_strndup' to drop device arguments. Replace unnecessary
7036 `grub_strndup' with `grub_strdup'.
7038 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7040 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
7041 `debug' environment variable has been set.
7043 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
7045 * Makefile.in (install-local): Use $(DATA).
7046 (uninstall): Likewise.
7047 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
7048 (sbin_UTILITIES): ... to here.
7049 (sbin_SCRIPTS): New variable.
7050 (grub_install_SOURCES): New variable.
7051 * util/powerpc/ieee1275/grub-install.in: New file.
7052 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
7054 (add_segments): Call `grub_util_get_path'.
7056 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7058 From Timothy Baldwin:
7059 * commands/ls.c (grub_ls_list_files): Close FILE with
7061 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
7063 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
7065 * include/grub/parser.h: New file.
7067 * kern/parser.c: Likewise.
7069 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
7070 (grub_setup_SOURCES): Likewise.
7071 (grub_probefs_SOURCES): Likewise.
7072 (grub_emu_SOURCES): Likewise.
7073 (kernel_img_HEADERS): Add `parser.h'.
7075 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7076 (grub_emu_SOURCES): Add `kern/parser.c'.
7077 (grubof_SOURCES): Likewise.
7079 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7080 (grubof_SOURCES): Add `kern/parser.c'.
7082 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
7084 * kern/misc.c (grub_split_cmdline): Removed function.
7086 * kern/rescue.c: Include <grub/parser.h>.
7087 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
7088 of `grub_split_cmdline'.
7090 * normal/command.c: Include <grub/parser.h>.
7091 (grub_command_execute): Use `grub_parser_split_cmdline' instead
7092 of `grub_split_cmdline'.
7094 * normal/completion.c: Include <grub/parser.h>.
7095 (cmdline_state): New variable.
7096 (iterate_dir): End the filename with a quote depending on the
7098 (get_state): new function.
7099 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
7100 split the arguments and determine the current argument. When the
7101 argument string is not quoted, escape all spaces.
7103 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7105 * normal/sparc64/setjmp.S: New file.
7107 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7109 * include/grub/sparc64/libgcc.h: New file.
7110 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
7111 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
7112 normal/sparc64/setjmp.c.
7114 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7116 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
7117 * kern/sparc64/cache.S: New file.
7118 * kern/sparc64/cache.c: Removed.
7119 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
7120 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
7122 (COMMON_LDFLAGS): Add -melf64_sparc.
7123 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
7124 (grubof_SOURCES): Use cache.S instead of cache.c.
7125 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
7126 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
7127 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
7129 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
7130 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
7131 (linux_mod_CFLAGS): Commented out.
7132 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
7133 out because module isn't built.
7134 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
7135 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
7136 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
7137 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
7138 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
7139 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7140 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7141 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
7142 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
7143 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
7144 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7145 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7146 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
7147 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
7149 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
7151 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
7152 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
7153 longer, because HFS should not be used on PC.
7155 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7157 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
7158 consistently within the loop.
7160 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
7162 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
7163 directory can not be read.
7165 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7167 * configure.ac (AC_INIT): Increase the version number to 1.91.
7169 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
7170 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
7171 term/i386/pc/serial.c.
7173 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7175 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
7176 file size must be permitted.
7178 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
7179 between %ah and %al.
7181 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7183 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
7185 Call the hook with a NUL-terminated filename.
7186 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
7189 * kern/term.c (cursor_state): New variable.
7190 (grub_term_set_current): Reset the cursor state on a new
7192 (grub_setcursor): Rewritten to use CURSOR_STATE.
7193 (grub_getcursor): New function.
7195 * include/grub/term.h (grub_getcursor): New prototype.
7197 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
7198 integers on ARM. Reported by Timothy Baldwin
7199 <T.E.Baldwin99@members.leeds.ac.uk>.
7201 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
7203 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
7205 (grub_sfs_dir): Likewise.
7207 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
7209 Add support for the SFS filesystem.
7211 * fs/sfs.c: New file.
7213 * DISTLIST: Added `fs/sfs.c'.
7215 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
7216 (grub_probefs_SOURCES): Likewise.
7217 (grub_emu_SOURCES): Likewise.
7218 (pkgdata_MODULES): Add `sfs.mod'.
7219 (sfs_mod_SOURCES): New variable.
7220 (sfs_mod_CFLAGS): Likewise.
7221 (sfs_mod_LDFLAGS): Likewise.
7223 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
7224 (pkgdata_MODULES): Add `sfs.mod'.
7225 (sfs_mod_SOURCES): New variable.
7226 (sfs_mod_CFLAGS): Likewise.
7228 * util/grub-emu.c (main): Call `grub_sfs_init' and
7231 * include/grub/fs.h (grub_sfs_init): New prototype.
7232 (grub_sfs_fini): Likewise.
7234 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
7236 Add support for the AFFS filesystem.
7238 * fs/affs.c: New file.
7240 * DISTLIST: Added `fs/affs.c'.
7242 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
7243 (grub_probefs_SOURCES): Likewise.
7244 (grub_emu_SOURCES): Likewise.
7245 (pkgdata_MODULES): Add `affs.mod'.
7246 (affs_mod_SOURCES): New variable.
7247 (affs_mod_CFLAGS): Likewise.
7248 (affs_mod_LDFLAGS): Likewise.
7250 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
7251 (pkgdata_MODULES): Add `affs.mod'.
7252 (affs_mod_SOURCES): New variable.
7253 (affs_mod_CFLAGS): Likewise.
7255 * util/grub-emu.c (main): Call `grub_affs_init' and
7258 * include/grub/fs.h (grub_affs_init): New prototype.
7259 (grub_affs_fini): Likewise.
7261 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
7263 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
7265 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
7267 * configure.ac: Accept `x86_64' as host_cpu. In that case add
7270 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
7273 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
7274 (COMMON_LDFLAGS): New variable.
7275 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
7276 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
7277 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
7278 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
7279 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
7280 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
7281 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
7282 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
7283 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
7284 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
7285 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7286 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7287 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
7288 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
7289 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
7291 (normal_mod_ASFLAGS): Add `-m32'.
7293 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
7294 (grub_host_size_t, grub_host_ssize_t): New types.
7295 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
7296 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
7297 `GRUB_HOST_SIZEOF_VOID_P'.
7299 * include/grub/kernel.h (struct grub_module_header): Type of
7300 member offset changed to `grub_host_off_t'. Type of member size
7301 changed to `grub_host_size_t'.
7302 (struct grub_module_info): Type of member offset changed to
7303 `grub_host_off_t'. Type of member size changed to
7306 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
7308 Make GRUB's kernel compliant to Multiboot Specification.
7310 * kern/i386/pc/startup.S (multiboot_header): New label.
7311 (multiboot_entry): Likewise.
7312 (multiboot_trampoline): Likewise.
7314 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7317 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
7318 put parentheses after a question mark.
7319 [!GRUB_UTIL] (my_mod): New variable.
7321 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
7323 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
7325 Adds support for the XFS filesystem. Btrees are not supported
7328 * fs/xfs.c: New file.
7330 * DISTLIST: Added `fs/xfs.c'.
7332 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
7333 (grub_probefs_SOURCES): Likewise.
7334 (grub_emu_SOURCES): Likewise.
7335 (pkgdata_MODULES): Add `xfs.mod'.
7336 (xfs_mod_SOURCES): New variable.
7337 (xfs_mod_CFLAGS): Likewise.
7339 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
7340 (pkgdata_MODULES): Add `xfs.mod'.
7341 (xfs_mod_SOURCES): New variable.
7342 (xfs_mod_CFLAGS): Likewise.
7344 * util/grub-emu.c (main): Call `grub_xfs_init' and
7347 * include/grub/fs.h (grub_xfs_init): New prototype.
7348 (grub_xfs_fini): Likewise.
7351 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
7353 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
7354 color modes, allow greater than 16 colors to be configured as
7357 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7359 * normal/completion.c (complete_arguments): Add the qualifier
7362 From Omniflux <omniflux+lists@omniflux.com>:
7363 * include/grub/terminfo.h: New file.
7364 * include/grub/tparm.h: Likewise.
7365 * include/grub/i386/pc/serial.h: Likewise.
7366 * term/terminfo.c: Likewise.
7367 * term/tparm.c: Likewise.
7368 * term/i386/pc/serial.c: Likewise.
7369 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
7371 (terminfo_mod_SOURCES): New variable.
7372 (terminfo_mod_CFLAGS): Likewise.
7373 (serial_mod_SOURCES): Likewise.
7374 (serial_mod_CFLAGS): Likewise.
7376 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
7378 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
7379 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
7380 and kern/powerpc/ieee1275/cmain.c, respectively.
7382 * boot/powerpc/ieee1275/crt0.S: Moved to ...
7383 * kern/powerpc/ieee1275/crt0.S: ... here.
7385 * boot/powerpc/ieee1275/cmain.c: Moved to ...
7386 * kern/powerpc/ieee1275/cmain.c: ... here.
7388 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
7389 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
7390 instead of boot/powerpc/ieee1275/crt0.S and
7391 boot/powerpc/ieee1275/cmain.c, respectively.
7393 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
7394 sectors. It was not used anyway.
7396 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
7398 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
7399 `unused parameter' warning.
7401 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
7403 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
7405 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
7408 2005-08-28 Marco Gerards <metgerards@student.han.nl>
7410 * include/grub/normal.h (enum grub_completion_type): Added
7411 `GRUB_COMPLETION_TYPE_ARGUMENT'.
7413 * normal/cmdline.c (print_completion): Handle
7414 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
7415 * normal/menu_entry.c (store_completion): Likewise.
7417 * normal/completion.c (complete_arguments): New function.
7418 (grub_normal_do_completion): Call `complete_arguments' when the
7419 current words start with a dash.
7421 2005-08-27 Marco Gerards <metgerards@student.han.nl>
7423 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
7424 `gzio.mod' instead of `io.mod').
7426 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
7428 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
7429 (DISTDIRS): Added io and video.
7430 Rewrite the search routine to make an output consistently.
7432 * DISTLIST: Added conf/sparc64-ieee1275.mk,
7433 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
7434 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
7435 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
7436 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
7437 util/powerpc/ieee1275/misc.c.
7439 * include/grub/gzio.h: New file.
7440 * io/gzio.c: Likewise.
7442 * kern/file.c (grub_file_close): Call grub_device_close only if
7443 FILE->DEVICE is not NULL.
7445 * include/grub/mm.h [!NULL] (NULL): New macro.
7447 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
7449 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
7450 (pkgdata_MODULES): Added gzio.mod.
7451 (gzio_mod_SOURCES): New variable.
7452 (gzio_mod_CFLAGS): Likewise.
7454 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
7455 (pkgdata_MODULES): Added gzio.mod.
7456 (gzio_mod_SOURCES): New variable.
7457 (gzio_mod_CFLAGS): Likewise.
7459 * commands/cat.c: Include grub/gzio.h.
7460 (grub_cmd_cat): Use grub_gzfile_open instead of
7463 * commands/cmp.c: Include grub/gzio.h.
7464 (grub_cmd_cmp): Use grub_gzfile_open instead of
7467 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
7468 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
7470 (grub_rescue_cmd_module): Likewise.
7472 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
7474 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
7475 kern/sparc64/ieee1275/init.c because it contains _start.
7476 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
7478 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
7480 * configure.ac: Add support for sparc64 host with ieee1275
7482 * configure: Generated from configure.ac.
7483 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
7485 (grub_ofdisk_read): Likewise.
7486 (grub_ofdisk_open): Use %p to print pointer values, and cast the
7487 pointers as (void *) to remove a warning.
7488 (grub_ofdisk_close): Likewise.
7489 (grub_ofdisk_read): Likewise.
7490 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
7491 returns, so make it return void to remove a warning.
7492 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
7493 Corresponding prototype change.
7494 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
7495 values, and cast the pointers as (void *) to remove a warning.
7496 (grub_mm_dump): Likewise.
7497 * conf/sparc64-ieee1275.mk: New file.
7498 * conf/sparc64-ieee1275.rmk: Likewise.
7499 * include/grub/sparc64/setjmp.h: Likewise.
7500 * include/grub/sparc64/types.h: Likewise.
7501 * include/grub/sparc64/ieee1275/console.h: Likewise.
7502 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7503 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7504 * include/grub/sparc64/ieee1275/time.h: Likewise.
7505 * kern/sparc64/cache.c: Likewise.
7506 * kern/sparc64/dl.c: Likewise.
7507 * kern/sparc64/ieee1275/init.c: Likewise.
7508 * kern/sparc64/ieee1275/openfw.c: Likewise.
7510 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7512 * util/console.c (grub_ncurses_putchar): If C is greater than
7513 0x7f, set C to a question mark.
7514 (grub_ncurses_getcharwidth): New function.
7515 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
7518 * normal/menu.c (print_entry): Made aware of Unicode. First,
7519 convert TITLE to UCS-4, and predict the cursor position by
7522 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
7524 * kern/misc.c (grub_utf16_to_utf8): Likewise.
7526 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7528 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
7529 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7532 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
7533 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7534 grub_strcpy and grub_strlen. Take it into account that a space
7535 character is inserted as a delimiter.
7537 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7539 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
7540 invalid magic in thre error.
7542 * commands/search.c: New file.
7544 * util/grub-emu.c (main): Call grub_search_init and
7547 * kern/rescue.c (grub_rescue_print_disks): Removed.
7548 (grub_rescue_print_devices): New function.
7549 (grub_rescue_cmd_ls): Use grub_device_iterate with
7550 grub_rescue_print_devices instead of grub_disk_dev_iterate with
7551 grub_rescue_print_disks.
7553 * kern/partition.c (grub_partition_iterate): Return the result of
7554 PARTMAP->ITERATE instead of GRUB_ERRNO.
7556 * kern/device.c: Include grub/partition.h.
7557 (grub_device_iterate): New function.
7559 * include/grub/partition.h (grub_partition_iterate): Return int
7560 instead of grub_err_t.
7562 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
7564 [GRUB_UTIL] (grub_search_fini): Likewise.
7566 * include/grub/device.h (grub_device_iterate): New prototype.
7568 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7570 (pkgdata_MODULES): Added search.mod.
7571 (search_mod_SOURCES): New variable.
7572 (search_mod_CFLAGS): Likewise.
7574 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
7575 (pkgdata_MODULES): Added search.mod.
7576 (search_mod_SOURCES): New variable.
7577 (search_mod_CFLAGS): Likewise.
7579 * commands/ls.c (grub_ls_list_disks): Renamed to ...
7580 (grub_ls_list_devices): ... this, and use grub_device_iterate.
7581 All callers changed.
7583 * DISTLIST: Added commands/search.c.
7585 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7587 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
7589 (grub_getcharwidth): New function.
7591 * kern/misc.c (grub_utf8_to_ucs4): New function.
7593 * include/grub/term.h (struct grub_term): Added a new member
7595 (grub_getcharwidth): New prototype.
7597 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
7599 * term/i386/pc/console.c (map_char): New function. Segregated from
7600 grub_console_putchar.
7601 (grub_console_putchar): Use map_char.
7602 (grub_console_getcharwidth): New function.
7603 (grub_console_term): Specified grub_console_getcharwidth as
7606 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
7607 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
7609 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
7611 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
7612 on grub_strtoul completely.
7613 (write_char): Declare local variables in the beginning of the
7615 (grub_vesafb_getcharwidth): New function.
7616 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
7619 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
7621 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
7622 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
7623 commands/i386/pc/vbetest.c.
7625 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
7626 call grub_vbe_get_controller_info again, because the returned
7627 information is volatile.
7628 (grub_vbe_set_video_mode): Mostly rewritten.
7629 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
7630 grub_vbe_status_t correctly.
7631 (grub_vbe_get_video_mode_info): Likewise.
7632 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
7633 several if statements.
7635 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
7636 * commands/i386/pc/vbeinfo.c: ... this.
7638 * commands/i386/pc/vbe_test.c: Renamed to ...
7639 * commands/i386/pc/vbetest.c: ... this.
7641 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
7643 (grub_cmd_vbeinfo): ... this. Save video modes before
7644 iterating. Skip a video mode, if it is not available, not enough
7645 information is given or it is monochrome. Show the memory
7646 model. Leave the interpretation of MODEVAR to grub_strtoul
7648 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
7649 (GRUB_MOD_FINI): Likewise.
7651 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
7652 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
7653 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
7654 duplicated grub_env_get. Leave the interpretation of MODEVAR to
7655 grub_strtoul completely.
7657 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
7658 (GRUB_MOD_FINI): Likewise.
7660 * normal/misc.c: Include grub/mm.h.
7662 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
7663 vbe_list_modes with vbetest.mod and vbeinfo.mod.
7664 (vbe_list_modes_mod_SOURCES): Removed.
7665 (vbe_list_modes_mod_CFLAGS): Likewise.
7666 (vbe_test_mod_SOURCES): Likewise.
7667 (vbe_test_mod_CFLAGS): Likewise.
7668 (vbeinfo_mod_SOURCES): New variable.
7669 (vbeinfo_mod_CFLAGS): Likewise.
7670 (vbetest_mod_SOURCES): Likewise.
7671 (vbetest_mod_CFLAGS): Likewise.
7673 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
7675 * normal/misc.c: New file.
7677 * DISTLIST: Added normal/misc.c.
7679 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
7680 DISK to HOOK. Call HOOK with DISK.
7681 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7682 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7683 * partmap/sun.c (sun_partition_map_iterate): Likewise.
7685 * normal/menu_entry.c (struct screen): Added a new member
7687 (completion_buffer): New global variable.
7688 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
7689 (store_completion): New function.
7690 (complete): Likewise.
7691 (clear_completions): Likewise.
7692 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
7693 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
7694 a tab, call complete.
7696 * normal/completion.c (disk_dev): Removed.
7697 (print_simple_completion): Likewise.
7698 (print_partition_completion): Likewise.
7699 (print_func): New global variable.
7700 (add_completion): Do not take the arguments WHAT or PRINT any
7701 longer. Added a new argument TYPE. Instead of printing directly,
7702 call PRINT_FUNC if not NULL.
7703 All callers changed.
7704 (complete_device): Use a local variable DEV instead of
7705 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
7706 (grub_normal_do_completion): Take a new argument HOOK. Do not
7707 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
7708 empty string, return NULL instead.
7709 All callers changed.
7711 * normal/cmdline.c (print_completion): New function.
7713 * kern/partition.c (grub_partition_iterate): Add an argument DISK
7715 All callers changed.
7717 * kern/disk.c (grub_print_partinfo): Removed.
7719 * include/grub/partition.h (struct grub_partition_map): Add a new
7720 argument DISK into HOOK of ITERATE.
7721 (grub_partition_iterate): Add a new argument DISK to HOOK.
7723 * include/grub/normal.h (enum grub_completion_type): New enum.
7724 (grub_completion_type_t): New type.
7725 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
7726 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
7727 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
7728 (GRUB_COMPLETION_TYPE_FILE): Likewise.
7729 (grub_normal_do_completion): Added a new argument HOOK.
7730 (grub_normal_print_device_info): New prototype.
7732 * include/grub/disk.h (grub_print_partinfo): Removed.
7734 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
7735 (normal_mod_SOURCES): Likewise.
7736 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7737 (normal_mod_SOURCES): Likewise.
7739 * commands/ls.c (grub_ls_list_disks): Use
7740 grub_normal_print_device_info instead of grub_print_partinfo. Free
7742 (grub_ls_list_files): Use grub_normal_print_device_info instead of
7743 duplicating the code.
7745 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7747 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
7748 follow GCS more precisely.
7749 * commands/i386/pc/vbe_test.c: Likewise.
7750 * include/grub/i386/pc/vbe.h: Likewise.
7751 * term/i386/pc/vesafb.c: Likewise.
7752 * video/i386/pc/vbe.c: Likewise.
7754 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7756 * DISTLIST: Added term/i386/pc/vesafb.c
7757 DISTLIST: Added video/i386/pc/vbe.c
7758 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
7759 DISTLIST: Added commands/i386/pc/vbe_test.c.
7760 * commands/i386/pc/vbe_list_modes.c: New file.
7761 * commands/i386/pc/vbe_test.c: Likewise.
7762 * term/i386/pc/vesafb.c: Likewise.
7763 * video/i386/pc/vbe.c: Likewise.
7764 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
7765 (grub_vbe_probe) Added prototype.
7766 (grub_vbe_set_video_mode) Likewise.
7767 (grub_vbe_get_video_mode) Likewise.
7768 (grub_vbe_get_video_mode_info) Likewise.
7769 (grub_vbe_set_pixel_rgb) Likewise.
7770 (grub_vbe_set_pixel_index) Likewise.
7771 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
7772 (pkgdata_MODULES): Added vesafb.mod.
7773 (pkgdata_MODULES): Added vbe_list_modes.mod.
7774 (pkgdata_MODULES): Added vbe_test.mod.
7775 (vbe_mod_SOURCES): Added.
7776 (vbe_mod_CFLAGS): Likewise.
7777 (vesafb_mod_SOURCES): Likewise.
7778 (vesafb_mod_CFLAGS): Likewise.
7779 (vbe_list_modes_mod_SOURCES): Likewise.
7780 (vbe_list_modes_mod_CFLAGS): Likewise.
7781 (vbe_test_mod_SOURCES): Likewise.
7782 (vbe_test_mod_CFLAGS): Likewise.
7784 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
7786 * normal/command.c (grub_command_execute): If INTERACTIVE is
7787 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
7788 CMDLINE. Disable the pager if INTERACTIVE is true.
7789 All callers are changed.
7791 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
7792 before reading a config file.
7793 * normal/main.c (read_config_file): Even if a command is not
7794 found, register it if it is within an entry.
7796 * util/grub-emu.c: Include sys/types.h and unistd.h.
7797 (options): Added --hold.
7798 (struct arguments): Added a new member "hold".
7799 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
7801 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
7802 cleared by a debugger, if it is not zero.
7804 * include/grub/normal.h (grub_command_execute): Add an argument
7807 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
7809 * DISTLIST: Added include/grub/i386/pc/vbe.h.
7811 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
7813 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
7814 program with another one, because the old one didn't detect a bug
7815 in gcc-3.4. Always use regparm 2, because the new test is still
7816 not enough for gcc-4.0. Someone must investigate a simple test
7817 case which detects a bug in gcc-4.0.
7819 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
7821 * DISTLIST: Added normal/completion.c.
7823 * normal/completion.c: New file.
7825 * term/i386/pc/console.c (grub_console_getwh): New function.
7826 (grub_console_term): Assign grub_console_getwh to getwh.
7828 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
7829 function is defined in normal/completion.c as
7830 grub_normal_do_completion.
7831 (grub_cmdline_get): Use grub_normal_do_completion instead of
7834 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
7835 returns non-zero, otherwise return 0.
7836 (grub_partition_iterate): First, probe the partition map. Then,
7837 call ITERATE only for this partition map.
7839 * kern/misc.c (grub_strncmp): Rewritten.
7841 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
7842 returns non-zero. Otherwise return 0.
7844 * include/grub/partition.h (grub_partition_map_iterate): Return
7845 int instead of void.
7847 * include/grub/normal.h (grub_normal_do_completion): New prototype.
7849 * include/grub/misc.h (grub_strncmp): Change the type of N to
7852 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
7855 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
7856 unsigned explictly before comparing it with I.
7858 * kern/main.c (grub_env_write_root): Add the attribute unused into
7861 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7862 normal/completion.c.
7863 (normal_mod_SOURCES): Likewise.
7864 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7865 (normal_mod_SOURCES): Likewise.
7867 * normal/command.c (grub_iterate_commands): If ITERATE returns
7868 non-zero, return one immediately.
7870 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
7872 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7873 * kern/i386/pc/startup.S: Updated Global Descriptor table's
7875 (grub_vbe_get_controller_info): New function.
7876 (grub_vbe_get_mode_info): Likewise.
7877 (grub_vbe_set_mode): Likewise.
7878 (grub_vbe_get_mode): Likewise.
7879 (grub_vbe_set_memory_window): Likewise.
7880 (grub_vbe_get_memory_window): Likewise.
7881 (grub_vbe_set_scanline_length): Likewise.
7882 (grub_vbe_get_scanline_length): Likewise.
7883 (grub_vbe_set_display_start): Likewise.
7884 (grub_vbe_get_display_start): Likewise.
7885 (grub_vbe_set_palette_data): Likewise.
7886 * include/grub/i386/pc/vbe.h: New file.
7888 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7890 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7891 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7892 * DISTLIST: Likewise.
7893 * kern/ieee1275/of.c: Moved to ...
7894 * kern/ieee1275/ieee1275.c: ... here.
7896 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7898 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7899 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7900 Pass 0 as `end' parameter to grub_strtoul().
7902 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7904 * include/grub/powerpc/ieee1275/console.h: Do not include
7905 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
7907 (grub_console_cur_color): Remove i386-specific prototype.
7908 (grub_console_real_putchar): Likewise.
7909 (grub_console_checkkey): Likewise.
7910 (grub_console_getkey): Likewise.
7911 (grub_console_getxy): Likewise.
7912 (grub_console_gotoxy): Likewise.
7913 (grub_console_cls): Likewise.
7914 (grub_console_setcursor): Likewise.
7915 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7916 Include <grub/machine/console.h>.
7917 * term/ieee1275/ofconsole.c: Likewise.
7919 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
7921 * Makefile.in (LIBLZO): New variable.
7923 * configure.ac: Check for LZO version 2.
7925 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7926 lzo/lzo1x.h instead of lzo1x.h.
7928 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7931 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7932 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7934 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7935 copying the data from PARTITION to P.
7937 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7939 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7940 negative, unload the module.
7942 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7943 map is "pc_partition_map" but not "pc".
7944 (usage): Fix the description. The options are --boot-image and
7945 --core-image but not --boot-file or --core-file.
7946 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7947 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7950 * util/i386/pc/grub-install.in: Do not specify --boot-file or
7951 --core-file. Specify INSTALL_DEVICE as an argument.
7953 * util/console.c: Include config.h.
7954 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7955 [HAVE_NCURSES_H]: Include ncurses.h.
7956 [HAVE_CURSES_H]: Include curses.h.
7957 [!A_NORMAL] (A_NORMAL): Defined as zero.
7958 [!A_STANDOUT] (A_STANDOUT): Likewise.
7960 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7962 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7964 * configure.ac: Check for curses libraries and headers.
7966 * Makefile.in (LIBCURSES): New variable.
7968 * genmk.rb (Script::rule): Set the executable bits.
7970 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7971 name of the PC partition map is "pc_partition_map" but not "pc".
7973 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7975 * util/i386/pc/grub-install.in (grub_probefs): New variable.
7976 (modules): Likewise.
7977 (usage): Added descriptions for --modules and --grub-probefs.
7978 Handle --modules and --grub-probefs. Save the arguments in MODULES
7979 and GRUB_PROBEFS, respectively.
7980 Auto-detect a filesystem module against GRUBDIR. If the result is
7981 empty and modules are not specified explicitly, abort the
7982 installation. Add the result to MODULES.
7984 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7985 disk/powerpc/ieee1275/ofdisk.c,
7986 include/grub/powerpc/ieee1275/init.h and
7987 term/powerpc/ieee1275/ofconsole.c.
7988 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7989 term/ieee1275/ofconsole.c.
7991 * include/grub/powerpc/ieee1275/console.h: Resurrected.
7993 * COPYING: Upgraded to the latest version. Only the address of the
7994 FSF office has changed.
7996 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7998 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7999 kern/ieee1275.c with kern/ieee1275/of.c.
8001 * kern/ieee1275.c: Moved to ...
8002 * kern/ieee1275/of.c: ... here.
8004 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
8006 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
8009 * config.guess: Updated to the latest version from gnulib.
8010 * config.sub: Likewise.
8011 * install.sh: Likewise.
8012 * mkinstalldirs: Likewise.
8014 * include/grub/console.h: Removed. This file is arch-specific. Do
8015 not put this in include/grub.
8017 * include/grub/i386/pc/console.h: Resurrected.
8019 * util/console.c: Include grub/machine/console.h instead of
8021 * util/grub-emu.c: Likewise.
8023 2005-08-04 Marco Gerards <metgerards@student.han.nl>
8025 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
8028 From Vincent Pelletier <subdino2004@yahoo.fr>
8029 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
8030 Redefined to use grub_getwh.
8031 (grub_term): New member named getwh.
8032 (grub_getwh): New prototype.
8033 * kern/term.c (grub_getwh): New function.
8034 * term/i386/pc/console.c (grub_console_getwh): New function.
8035 (grub_console_term): New member `getwh'.
8036 * term/i386/pc/vga.c (grub_vga_getwh): New function.
8037 (grub_vga_term): New member `getwh'.
8038 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
8040 (grub_ofconsole_getw): New function.
8041 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
8042 (grub_ofconsole_term): New field named getwh and new initial
8045 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
8047 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
8048 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
8049 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
8050 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
8051 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
8052 of <grub/machine/ieee1275.h>.
8053 * commands/ieee1275/reboot.c: Likewise.
8054 * boot/powerpc/ieee1275/ieee1275.c: Move ...
8055 * kern/ieee1275.c: ... to here. All users updated. Change all
8056 parameter structs to use new type `grub_ieee1275_cell_t'.
8057 * term/powerpc/ieee1275/ofconsole.c: Move ...
8058 * term/ieee1275/ofconsole.c: ... to here. All users updated.
8059 * disk/powerpc/ieee1275/ofdisk.c: Move ...
8060 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
8061 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
8063 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
8064 Remove unused prototypes. All users updated.
8065 * include/grub/powerpc/ieee1275/console.h: Removed.
8066 * include/grub/powerpc/ieee1275/ieee1275.h: Define
8067 `grub_ieee1275_cell_t'.
8068 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
8069 Cast comparisons with -1 to the correct type.
8070 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
8071 type to match `grub_ieee1275_entry_fn'.
8073 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
8075 * DISTLIST: Added util/i386/pc/grub-probefs.c.
8077 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
8078 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
8080 (grub_probefs_SOURCES): New variable.
8082 * util/i386/pc/grub-probefs.c: New file.
8084 * util/i386/pc/grub-setup.c (main): Call
8085 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
8086 grub_hfs_init and grub_jfs_init to initialize the system. Call
8087 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
8088 grub_pc_partition_map_fini to finish the system.
8090 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
8092 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
8094 (grub_multiboot_load_elf32): Likewise.
8095 (grub_multiboot_is_elf64): Likewise.
8096 (grub_multiboot_load_elf64): Likewise.
8097 (grub_multiboot_load_elf): Likewise.
8098 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
8099 an ELF32 or ELF64 file.
8100 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
8102 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
8103 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
8104 NULL before calling FS->LABEL.
8105 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
8106 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
8107 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
8108 before calling FS->LABEL.
8110 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
8112 * util/i386/pc/grub-install.in (datadir): New variable.
8114 (pkgdatadir): New variable.
8115 (pkglibdir): Removed.
8117 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
8119 * DISTLIST: Added util/i386/pc/grub-install.in.
8121 * util/i386/pc/grub-install.in: New file.
8123 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
8124 (grub_install_SOURCES): Likewise.
8126 * genmk.rb: Added support for scripts.
8127 (Script): New class.
8128 (scripts): New variable.
8130 * Makefile.in (install-local): Install sbin_SCRIPTS by
8132 (uninstall): Remove sbin_SCRIPTS.
8134 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
8135 device, try to get a GRUB device by
8136 grub_util_biosdisk_get_grub_dev.
8139 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
8140 description for --device-map.
8142 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8144 Change the semantics of variable hooks. They now return strings
8145 instead of error values.
8147 * util/i386/pc/grub-setup.c: Include grub/env.h.
8148 (setup): Use grub_device_set_root instead of grub_env_set.
8150 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
8151 grub_env_get instead of grub_device_set_root and
8152 grub_device_get_root, respectively.
8154 * kern/main.c (grub_env_write_root): New function.
8155 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
8156 grub_env_set instead of grub_device_set_root.
8158 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
8160 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
8161 rather than calling ENV->WRITE_HOOK afterwards.
8162 (grub_env_get): Return the result of ENV->READ_HOOK rather than
8163 passing a pointer of a pointer.
8164 (grub_register_variable_hook): Change the types of "read_hook" and
8165 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
8167 Allocate the default empty string on the heap, because this string
8170 * kern/device.c: Include grub/env.h.
8171 (grub_device_set_root): Removed.
8172 (grub_device_get_root): Likewise.
8173 (grub_device_open): Use grub_env_get instead of
8174 grub_device_get_root.
8176 * include/grub/env.h (grub_env_read_hook_t): New type.
8177 (grub_env_write_hook_t): Likewise.
8178 (grub_env_var): Change the types of "read_hook" and "write_hook"
8179 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
8180 (grub_register_variable_hook): Likewise.
8182 * include/grub/device.h (grub_device_set_root): Removed.
8183 (grub_device_set_root): Likewise.
8185 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
8186 make sure that DIRNAME terminates with '/', so that
8187 grub_fat_find_dir will fail if PATH is not a directory.
8189 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
8191 Use the qualifier auto for print_files and print_files_long.
8192 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
8194 Put a newline only if there is no error.
8195 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
8198 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8200 * kern/partition.c (grub_partition_probe): Initialize PART to
8201 NULL. Otherwise, when no partition map is registered, this returns
8204 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
8206 * partmap/apple.c (apple_partition_map_iterate): Check if POS
8207 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
8210 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
8212 * commands/ls.c (grub_ls_list_disks): Print the filesystem
8213 information on each device, if it does not have partitions. Print
8214 "Device" instead of "Disk", because this function is not specific
8217 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
8218 static to ensure that it is put on the memory rather than a
8221 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
8223 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
8224 (grub_cat_init): Likewise.
8225 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
8226 (options): Likewise.
8227 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
8228 (grub_configfile_init): Likewise.
8229 * font/manager.c (GRUB_MOD_INIT): Likewise.
8230 * commands/help.c (GRUB_MOD_INIT): Likewise.
8231 (grub_help_init): Likewise.
8232 * normal/command.c (grub_command_init): Likewise.
8233 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
8234 * disk/loopback.c (grub_loop_init): Likewise.
8235 (GRUB_MOD_INIT): Likewise.
8236 * commands/ls.c (grub_ls_init): Likewise.
8237 (GRUB_MOD_INIT): Likewise.
8238 (options): Likewise.
8239 * commands/boot.c (grub_boot_init): Likewise.
8240 (GRUB_MOD_INIT): Likewise.
8241 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
8242 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
8243 (GRUB_MOD_INIT): Likewise.
8244 * commands/cmp.c (grub_cmp_init): Likewise.
8245 (GRUB_MOD_INIT): Likewise.
8247 * normal/arg.c: Use <> instead of "" to include header files.
8248 (SHORT_ARG_HELP): New macro.
8249 (SHORT_ARG_USAGE): Likewise.
8250 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
8251 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
8253 (find_short): Check if C is 'h' or 'u' explicitly.
8254 (grub_arg_show_help): Use space characters instead of tabs. Treat
8255 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
8256 are shown with --help and --usage only if they are not used for
8258 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
8261 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
8262 const into "longarg". Change the type of "shortarg" to int.
8264 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
8266 * boot/i386/pc/boot.S (boot_drive_check): New label.
8268 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
8271 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
8272 which do not pass a boot drive correctly. Copied from GRUB Legacy.
8274 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
8276 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
8277 When turning off Gate A20, skip the check and return immediately,
8278 because this is not fatal usually.
8280 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
8282 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
8283 be 0x7C00 instead of 0x8000.
8285 * boot/i386/pc/pxeboot.S: Rewritten.
8287 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
8289 (gate_a20_check_state): Read a byte from 0x108000. Invert the
8292 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
8294 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
8295 robustness. This routine now supports a BIOS call and System
8296 Control Port A to modify the gate A20.
8298 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8301 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
8303 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
8304 device path and resulting ihandle.
8305 (grub_ofdisk_close): dprintf the ihandle being closed.
8306 (grub_ofdisk_read): dprintf function parameters.
8307 * kern/mm.c (grub_mm_init_region): Likewise.
8308 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
8309 (grub_linux_boot): dprintf the Linux entry point, initrd address and
8310 size, and boot arguments.
8311 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
8312 before loading into memory.
8313 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
8314 before loading into memory.
8316 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
8318 * kern/mm.c: Added much documentation.
8319 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
8320 8, set to 5 instead of 8.
8322 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
8324 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
8326 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
8327 (grub_mkdevicemap_SOURCES): New variable.
8329 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
8330 lib/device.c of GRUB Legacy.
8332 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
8334 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
8335 instead of PATH is NULL.
8337 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
8339 * commands/cmp.c (BUFFER_SIZE): New macro.
8340 (grub_cmd_cmp): Close the right file at the right time. Compare
8341 only data just read. Don't report files of different size as
8342 identical. Dynamically allocate buffers. Move variable
8343 declarations at the beginning of function.
8345 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
8347 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
8350 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
8352 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
8353 when backspace is pressed at beginning of line.
8355 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
8357 * DISTLIST: Added genfslist.sh.
8359 * normal/main.c (fs_module_list): New variable.
8360 (autoload_fs_module): New function.
8361 (read_fs_list): Likewise.
8362 (grub_normal_execute): Call read_fs_list.
8364 * kern/fs.c (grub_fs_autoload_hook): New variable.
8365 (grub_fs_probe): Added support for auto-loading.
8367 * include/grub/normal.h (struct grub_fs_module_list): New struct.
8368 (grub_fs_module_list_t): New type.
8370 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
8371 (grub_fs_autoload_hook): New prototype.
8373 * genfslist.sh: New file.
8375 * genmk.rb: Added a rule to generate a filesystem list.
8377 2005-06-30 Marco Gerards <metgerards@student.han.nl>
8379 * configure.ac: Fix the test for cross-compiling.
8381 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
8382 define GRUB_UTIL anymore.
8384 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
8385 so this function works on other systems than just big endian.
8386 (load_modules): Likewise.
8387 (add_segments): Likewise.
8389 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
8391 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
8392 contains `l' modifier, get a long from va_arg().
8394 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
8396 * kern/mm.c (grub_free): If the next free block which is being
8397 merged is the first free block, set the first block to the block
8399 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
8401 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
8403 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
8404 `grub_ieee1275_chosen'.
8406 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
8408 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
8409 (grub_ieee1275_chosen): New variable.
8410 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
8412 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
8413 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8414 Rename first argument to `phandle' for consistency.
8415 (grub_ieee1275_get_property_length): Likewise.
8416 (grub_ieee1275_next_property): Likewise. Change type of first argument
8417 to grub_ieee1275_phandle_t.
8418 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
8419 Move export next to declaration.
8420 (grub_ieee1275_chosen): New variable.
8421 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
8422 Correct cosmetic typo.
8423 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
8424 `grub_ieee1275_chosen'.
8425 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
8426 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
8427 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
8428 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
8429 `grub_ieee1275_chosen'.
8431 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
8433 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
8435 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
8436 /chosen/bootargs as "variable=value" pairs.
8438 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
8440 * include/grub/misc.h (grub_dprintf): New macro.
8441 (grub_real_dprintf): New prototype.
8442 (grub_strword): Likewise.
8443 (grub_iswordseparator): Likewise.
8444 * kern/misc.c (grub_real_dprintf): New function.
8445 (grub_strword): Likewise.
8446 (grub_iswordseparator): Likewise.
8448 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
8450 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
8451 (roundup): Remove macro.
8452 (grub_ieee1275_flags): Make static.
8453 (grub_ieee1275_realmode): Remove.
8454 (grub_ieee1275_test_flag): New function.
8455 (grub_ieee1275_set_flag): Likewise.
8456 (find_options): Rename to `grub_ieee1275_find_options'; update
8457 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
8458 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
8459 (cmain): New prototype.
8460 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
8461 `grub_ieee1275_flags' directly.
8462 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
8464 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
8465 Don't include grub/machine/init.h.
8466 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
8467 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8469 (grub_ieee1275_realmode): Likewise.
8470 (grub_ieee1275_flag): New enum.
8471 (grub_ieee1275_test_flag): New prototype.
8472 (grub_ieee1275_set_flag): New prototype.
8473 * include/grub/powerpc/ieee1275/init.h: Remove file.
8474 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
8475 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
8476 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
8477 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
8479 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
8480 `grub_ieee1275_test_flag'.
8481 (grub_ieee1275_encode_devname): Likewise.
8483 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
8485 * include/grub/powerpc/ieee1275/ieee1275.h
8486 (grub_ieee1275_encode_devname): New prototype.
8487 (grub_ieee1275_get_filename): Likewise.
8488 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
8490 (grub_set_prefix): Likewise.
8491 (grub_machine_init): Call grub_set_prefix.
8492 * kern/powerpc/ieee1275/openfw.c: Fix typos.
8493 (grub_parse_type): New enum.
8494 (grub_ieee1275_get_devargs): New function.
8495 (grub_ieee1275_get_devname): Likewise.
8496 (grub_ieee1275_parse_args): Likewise.
8497 (grub_ieee1275_get_filename): Likewise.
8498 (grub_ieee1275_encode_devname): Likewise.
8500 2005-03-30 Marco Gerards <metgerards@student.han.nl>
8502 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
8503 `grub_loader_unset'.
8505 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
8507 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
8508 instead of grub_ieee1275_interpret.
8509 (grub_halt_init): New function.
8510 (grub_halt_fini): Likewise.
8511 (GRUB_MOD_INIT): Correct message grammar.
8512 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
8513 instead of grub_ieee1275_interpret.
8514 (grub_reboot_init): New function.
8515 (grub_reboot_fini): Likewise.
8516 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
8517 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
8518 util/i386/pc/misc.c with commands/ieee1275/halt.c,
8519 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
8520 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
8522 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
8524 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
8526 (grub_halt): Likewise.
8527 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
8528 (cmain): Remove __attribute__((unused)).
8529 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
8530 (grub_heap_len): Likewise.
8531 (grub_machine_fini): New function.
8532 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
8533 (grub_halt): Likewise.
8534 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
8536 * util/powerpc/ieee1275/misc.c: New file.
8538 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8540 * DISTLIST: New file.
8541 * gendistlist.sh: Likewise.
8543 * Makefile.in (COMMON_DISTFILES): Removed.
8544 (BOOT_DISTFILES): Likewise.
8545 (CONF_DISTFILES): Likewise.
8546 (DISK_DISTFILES): Likewise.
8547 (FS_DISTFILES): Likewise.
8548 (INCLUDE_DISTFILES): Likewise.
8549 (KERN_DISTFILES): Likewise.
8550 (LOADER_DISTFILES): Likewise.
8551 (TERM_DISTFILES): Likewise.
8552 (UTIL_DISTFILES): Likewise.
8553 (DISTFILES): Likewise.
8554 (uninstall): Uninstall files in $(pkgdata_DATA).
8555 (DISTLIST): New target.
8556 (distdir): Use the contents of the file DISTLIST to get a list of
8559 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8561 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
8562 descriptor. This is ported from GRUB Legacy.
8564 * gencmdlist.sh: Added an extra semicolon to make it work with
8565 old sed versions. Reported by Robert Bihlmeyer
8566 <robbe@orcus.priv.at>.
8568 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
8570 Automatic loading of commands is supported.
8572 * normal/main.c (read_command_list): New function.
8573 (grub_normal_execute): Call read_command_list.
8575 * normal/command.c (grub_register_command): Return zero or CMD.
8576 Allocate CMD->NAME from the heap.
8577 Initialize CMD->MODULE_NAME to zero.
8578 Find the same name as well. If the same command is found and it is
8579 a dummy command, overwrite members. If it is not a dummy command,
8581 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
8582 (grub_command_find): If a dummy command is found, load a module
8583 and retry to find a command only once.
8585 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
8586 make sure that each command is loaded.
8588 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
8590 (struct grub_command): Remove const from the member `name'.
8591 Add a new member `module_name'.
8592 (grub_register_command): Return grub_command_t.
8594 * commands/help.c (grub_cmd_help): Call grub_command_find to make
8595 sure that each command is loaded.
8597 * genmk.rb (PModule::rule): Specify a module name without the
8598 suffix ".mod" to gencmdlist.sh.
8600 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8602 * gencmdlist.sh: New file.
8604 * genmk.rb (PModule::rule): Generate a rule for a command list.
8606 Generate command.lst from $(COMMANDFILES).
8608 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
8609 (DATA): Added $(pkgdata_DATA).
8610 (install-local): Install files in $(pkgdata_DATA).
8612 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8614 * term/i386/pc/vga.c (debug_command): Removed.
8615 (GRUB_MOD_INIT): Do not register the command "debug".
8617 From Hollis Blanchard:
8618 * commands/configfile.c: New file.
8619 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8620 commands/configfile.c.
8621 (pkgdata_MODULES): Added configfile.mod.
8622 (configfile_mod_SOURCES): New variable.
8623 (configfile_mod_CFLAGS): Likewise.
8624 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8625 commands/configfile.c.
8626 (pkgdata_MODULES): Added configfile.mod.
8627 (configfile_mod_SOURCES): New variable.
8628 (configfile_mod_CFLAGS): Likewise.
8629 * util/grub-emu.c (main): Call grub_configfile_init and
8630 grub_configfile_fini.
8631 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
8633 [GRUB_UTIL] (grub_configfile_fini): Likewise.
8635 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8637 * normal/arg.c (grub_arg_show_help): Do not show the bug report
8640 * commands/help.c (grub_cmd_help): Do not print newlines after
8641 the last command in print_command_help.
8643 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8645 * commands/default.h: New file.
8646 * commands/timeout.h: Likewise.
8647 * normal/context.c: Likewise.
8649 * util/misc.c: Do not include sys/times.h.
8650 Include sys/time.h and grub/machine/time.h.
8651 (grub_get_rtc): Rewritten with gettimeofday.
8653 * util/grub-emu.c (main): Call grub_default_init and
8654 grub_timeout_init before grub_normal_init, and call
8655 grub_timeout_fini and grub_default_fini after grub_main.
8657 * util/console.c (grub_ncurses_checkkey): Return the read
8660 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
8663 * normal/main.c (read_config_file): Push MENU. If this fails,
8664 print an error and wait for a user input.
8665 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
8666 If a menu is empty or an error occurs, pop MENU.
8667 (grub_normal_execute): Pop and free MENU after grub_menu_run
8670 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
8672 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
8674 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8676 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
8678 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8681 * include/grub/normal.h (struct grub_menu_list): New struct.
8682 (grub_menu_list_t): New type.
8683 (struct grub_context): New struct.
8684 (grub_context_t): New type.
8685 (grub_register_command): Got rid of EXPORT_FUNC.
8686 (grub_unregister_command): Likewise.
8687 (grub_context_get): New prototype.
8688 (grub_context_get_current_menu): Likewise.
8689 (grub_context_push_menu): Likewise.
8690 (grub_context_pop_menu): Likewise.
8691 [GRUB_UTIL] (grub_default_init): Likewise.
8692 [GRUB_UTIL] (grub_default_fini): Likewise.
8693 [GRUB_UTIL] (grub_timeout_init): Likewise.
8694 [GRUB_UTIL] (grub_timeout_fini): Likewise.
8696 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
8697 commands/timeout.c and normal/context.c.
8698 (pkgdata_MODULES): Added default.mod and timeout.mod.
8699 (normal_mod_SOURCES): Added normal/context.c.
8700 (default_mod_SOURCES): New variable.
8701 (default_mod_CFLAGS): Likewise.
8702 (timeout_mod_SOURCES): Likewise.
8703 (timeout_mod_CFLAGS): Likewise.
8704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
8706 (pkgdata_MODULES): Added default.mod and timeout.mod.
8707 (normal_mod_SOURCES): Added normal/context.c.
8708 (default_mod_SOURCES): New variable.
8709 (default_mod_CFLAGS): Likewise.
8710 (timeout_mod_SOURCES): Likewise.
8711 (timeout_mod_CFLAGS): Likewise.
8713 * Makefile.in (all-local): Added $(MKFILES).
8715 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
8717 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
8718 (grub_emu_SOURCES): Likewise.
8719 (pkgdata_MODULES): Add `sun.mod'.
8720 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8721 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8723 (pkgdata_MODULES): Add `sun.mod'.
8724 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8725 * include/grub/partition.h (grub_sun_partition_map_init): New
8727 (grub_sun_partition_map_fini): Likewise.
8728 * partmap/sun.c: New file.
8729 * util/grub-emu.c (main): Initialize and de-initialize the sun
8730 partitionmap support.
8732 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
8734 This implements an Emacs-like menu entry editor.
8736 * normal/menu_entry.c: New file.
8738 * util/console.c (grub_ncurses_putchar): Translate some Unicode
8739 characters to ASCII.
8740 (saved_char): New variable.
8741 (grub_ncurses_checkkey): Rewritten completely.
8742 (grub_ncurses_getkey): Likewise.
8743 (grub_ncurses_init): Call raw instead of cbreak.
8745 * normal/menu.c (print_entry): Do not put a space.
8746 (init_page): Renamed to ...
8747 (grub_menu_init_page): ... this. All callers changed.
8748 (edit_menu_entry): Removed.
8749 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
8751 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
8753 * kern/misc.c (grub_vprintf): Call grub_refresh.
8755 * normal/menu.c (DISP_LEFT): Renamed to ...
8756 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
8757 * normal/menu.c (DISP_UP): Renamed to ...
8758 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
8759 * normal/menu.c (DISP_RIGHT): Renamed to ...
8760 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
8761 * normal/menu.c (DISP_DOWN): Renamed to ...
8762 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
8763 * normal/menu.c (DISP_HLINE): Renamed to ...
8764 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
8765 * normal/menu.c (DISP_VLINE): Renamed to ...
8766 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
8767 * normal/menu.c (DISP_UL): Renamed to ...
8768 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
8769 * normal/menu.c (DISP_UR): Renamed to ...
8770 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
8771 * normal/menu.c (DISP_LL): Renamed to ...
8772 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
8773 * normal/menu.c (DISP_LR): Renamed to ...
8774 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
8775 * normal/menu.c (TERM_WIDTH): Renamed to ...
8776 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
8777 * normal/menu.c (TERM_HEIGHT): Renamed to ...
8778 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
8779 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
8780 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
8781 * normal/menu.c (TERM_MARGIN): Renamed to ...
8782 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
8783 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
8784 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
8785 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
8786 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
8787 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
8788 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
8789 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
8790 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
8791 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
8792 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
8793 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
8794 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
8795 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
8796 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
8797 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
8798 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
8799 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
8800 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
8801 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
8802 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
8803 All callers changed.
8805 * include/grub/normal.h: New prototype.
8807 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8808 normal/menu_entry.c.
8809 (normal_mod_SOURCES): Likewise.
8810 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8811 (normal_mod_SOURCES): Likewise.
8813 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
8815 * include/grub/normal.h (grub_halt_init): New prototype.
8816 (grub_halt_fini): Likewise.
8817 (grub_reboot_init): Likewise.
8818 (grub_reboot_fini): Likewise.
8820 * util/grub-emu.c: Include signal.h.
8821 (main_env): New global variable.
8822 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
8824 (grub_machine_fini): New function.
8825 (main): Call grub_halt_init and grub_reboot_init before
8826 grub_main, and grub_reboot_fini and grub_halt_fini after it.
8827 Call setjmp with MAIN_ENV to go back afterwards.
8828 Call grub_machine_fini right before return.
8830 * include/grub/util/misc.h: Include setjmp.h.
8831 (main_env): New prototype.
8833 * include/grub/kernel.h (grub_machine_fini): New prototype.
8834 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
8835 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
8837 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
8838 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
8839 * term/i386/pc/console.c (grub_console_fini): Likewise.
8841 * util/i386/pc/misc.c: New file.
8843 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8844 util/i386/pc/misc.c, commands/i386/pc/halt.c and
8845 commands/i386/pc/reboot.c.
8847 2005-02-14 Guillem Jover <guillem@hadrons.org>
8849 * include/grub/dl.h (grub_dl_check_header): New prototype.
8850 (grub_arch_dl_check_header): Change return type to grub_err_t,
8851 remove size parameter and export function. Update all callers.
8852 * kern/dl.c (grub_dl_check_header): New function.
8853 (grub_dl_load_core): Use `grub_dl_check_header' instead of
8854 `grub_arch_dl_check_header'. Check ELF type. Check if sections
8855 are inside the core.
8856 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
8857 independent ELF header checks.
8858 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8859 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
8860 `grub_dl_check_header' instead of explicit checks. Check for the
8862 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
8863 `grub_dl_check_header' instead of explicit checks. Remove arch
8864 specific ELF header checks.
8866 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
8869 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
8871 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
8872 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8874 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
8876 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8877 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
8878 (part_map_iterate): Clear `grub_errno' and return 0 if
8879 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
8880 * partmap/amiga.c (amiga_partition_map_iterate): Return
8881 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8882 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8884 2005-02-01 Guillem Jover <guillem@hadrons.org>
8886 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8889 2005-01-31 Marco Gerards <metgerards@student.han.nl>
8891 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8893 (grub_rescue_cmd_linux): New prototype.
8894 (grub_rescue_cmd_initrd): Likewise.
8895 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8897 (grub_linux_release_mem): Release the memory for the initrd.
8898 (grub_load_linux): Renamed from this...
8899 (grub_rescue_cmd_linux): ...To this. Changed all callers.
8900 Changed `entry' not to be static. Loop over memory regions to
8901 find another one when the default fails.
8902 (grub_rescue_cmd_initrd): New function.
8903 (grub_linux_init): Remove function.
8904 (grub_linux_fini): Likewise.
8905 (GRUB_MOD_INIT): Register `initrd'.
8906 (GRUB_MOD_FINI): Unregister `initrd'.
8907 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8909 (grub_linux_normal_fini): Likewise.
8910 (GRUB_MOD_INIT): Register `initrd'.
8911 (GRUB_MOD_FINI): Unregister `initrd'.
8913 2005-01-31 Marco Gerards <metgerards@student.han.nl>
8915 * commands/help.c: New file.
8916 * normal/arg.c (show_help): Renamed to...
8917 (grub_arg_show_help): ... this.
8918 * commands/i386/pc/halt.c: New file.
8919 * commands/i386/pc/reboot.c: Likewise.
8920 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8921 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8922 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8923 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8925 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8927 (pkgdata_MODULES): Add `help.mod'.
8928 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8929 * grub/i386/pc/init.h (grub_reboot): New prototype.
8930 (grub_halt): Likewise.
8931 * include/grub/normal.h (grub_arg_show_help): New prototype.
8932 (grub_help_init): Likewise.
8933 (grub_help_fini): Likewise.
8934 * util/grub-emu.c (main): Initialize and deinitialize the help
8937 * normal/cmdline.c (grub_cmdline_get): Doc fix.
8939 * normal/command.c (grub_command_init): Fixed the description of
8940 the `set' and `unset' commands.
8942 2005-01-31 Marco Gerards <metgerards@student.han.nl>
8944 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8946 * commands/ieee1275/halt.c: New file.
8947 * commands/ieee1275/reboot.c: Likewise.
8948 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8949 `__attribute__ ((unused))'. Some GCS related fixed.
8950 (grub_suspend_init) [GRUB_UTIL]: Function removed.
8951 (grub_suspend_fini): Likewise.
8952 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8954 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8955 (halt_mod_CFLAGS): New variables.
8956 * include/grub/powerpc/ieee1275/ieee1275.h
8957 (grub_ieee1275_interpret): New prototype.
8959 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8961 * include/grub/misc.h (memmove): New prototype.
8964 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
8966 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8967 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
8969 2005-01-22 Marco Gerards <metgerards@student.han.nl>
8971 * kern/misc.c (grub_strndup): Function rewritten.
8973 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
8975 * normal/menu.c (TERM_WIDTH): Macro redefined.
8976 (TERM_TOP_BORDER_Y): Likewise.
8977 (draw_border): Replaced while-loop by a for-loop. Make the number
8978 of lines consistent with the number of lines displayed in
8979 print_entries. Added a margin below the rectangle.
8980 (print_entry): Make the entry fit in the rectangle.
8981 (print_entries): Display the scroll arrows next to the right
8984 2005-01-21 Marco Gerards <metgerards@student.han.nl>
8986 * fs/minix.c (grub_minix_find_file): Reserve more space for
8987 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
8988 `grub_strncpy' to copy `path' into it.
8990 2005-01-21 Marco Gerards <metgerards@student.han.nl>
8992 Add the loopback device, a device via which files can be accessed
8995 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8996 (pkgdata_MODULES): Add loopback.mod.
8997 (loopback_mod_SOURCES): New variable.
8998 (loopback_mod_CFLAGS): Likewise.
8999 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9001 (pkgdata_MODULES): Add loopback.mod.
9002 (loopback_mod_SOURCES): New variable.
9003 (loopback_mod_CFLAGS): Likewise.
9004 * disk/loopback.c: new file.
9005 * include/grub/normal.h (grub_loop_init): New prototype.
9006 (grub_loop_fini): New prototype.
9007 * util/grub-emu.c (main): Initialize and de-initialize loopback
9009 * include/grub/disk.h (grub_disk_dev_id): Add
9010 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
9012 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
9014 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
9016 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
9017 (suspend_mod_SOURCES): New variable.
9018 (suspend_mod_CFLAGS): Likewise.
9019 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
9021 * commands/ieee1275/suspend.c: New file.
9023 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9025 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
9026 ((unused))' to `__attribute__ ((used))'.
9027 (GRUB_MOD_FINI): Likewise.
9028 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
9029 * genmk.rb (PModule): Assign space to common symbols when linking
9032 2005-01-20 Marco Gerards <metgerards@student.han.nl>
9034 * include/grub/mm.h (grub_mm_init_region): Change the type of the
9035 `unsigned' arguments to `grub_size_t'.
9036 (grub_malloc): Likewise.
9037 (grub_realloc): Likewise.
9038 (grub_memalign): Likewise.
9039 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
9040 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9041 * util/misc.c (grub_malloc): Likewise.
9042 (grub_realloc): Likewise.
9043 * kern/mm.c (get_header_from_pointer): Change the casts to
9044 `unsigned' into a cast to `grub_size_t'.
9046 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
9047 point to `currnode' when `currnode' is changed.
9049 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
9050 Schottelius <nico-linux@schottelius.org>.
9052 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
9054 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
9055 (note_path): Remove variable.
9056 (GRUB_IEEE1275_NOTE_NAME): New macro.
9057 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
9058 (grub_ieee1275_note_hdr): New structure.
9059 (grub_ieee1275_note_desc): Likewise.
9060 (grub_ieee1275_note): Likewise.
9061 (load_note): Remove `dir' argument. All callers updated. Remove
9062 `note_img' and `path'. Do not load a file from `note_path'.
9063 Initialize a struct grub_ieee1275_note and write that to `out'.
9064 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
9066 2005-01-05 Marco Gerards <metgerards@student.han.nl>
9068 * util/misc.c (grub_util_read_image): Revert last change. It
9069 called `grub_util_read_at', which seeks from the beginning of the
9072 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
9074 * TODO: Add note about endianness in grub-mkimage.
9075 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
9077 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
9078 (grub_mkimage_SOURCES): New target.
9079 * include/grub/kernel.h (grub_start_addr): Remove variable.
9080 (grub_end_addr): Likewise.
9081 (grub_total_module_size): Likewise.
9082 (grub_kernel_image_size): Likewise.
9083 (GRUB_MODULE_MAGIC): New constant.
9084 (grub_module_info): New structure.
9085 (grub_arch_modules_addr): New prototype.
9086 (grub_get_end_addr): Remove prototype.
9087 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
9088 * include/grub/powerpc/ieee1275/kernel.h: New file.
9089 * include/grub/util/misc.h (grub_util_get_fp_size): New
9091 (grub_util_read_at): Likewise.
9092 (grub_util_write_image_at): Likewise.
9093 * kern/main.c (grub_get_end_addr): Remove function.
9094 (grub_load_modules): Call grub_arch_modules_addr instead of using
9095 grub_end_addr. Look for a grub_module_info struct in memory. Use
9096 the grub_module_info fields instead of calling grub_get_end_addr
9097 as loop conditions. Move grub_add_unused_region code here.
9098 (grub_add_unused_region): Remove function.
9099 * kern/i386/pc/init.c: Include grub/cache.h.
9100 (grub_machine_init): Remove call to grub_get_end_addr. Remove
9101 one call to add_mem_region.
9102 (grub_arch_modules_addr): New function.
9103 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
9104 (grub_total_module_size): Likewise.
9105 Include grub/machine/kernel.h.
9106 (grub_arch_modules_addr): New function.
9107 * util/grub-emu.c (grub_end_addr): Remove variable.
9108 (grub_total_module_size): Likewise.
9109 (grub_arch_modules_addr): New function.
9110 * util/misc.c: Include unistd.h.
9111 (grub_util_get_fp_size): New function.
9112 (grub_util_read_at): Likewise.
9113 (grub_util_write_image_at): Likewise.
9114 (grub_util_read_image): Call grub_util_read_at.
9115 (grub_util_write_image): Call grub_util_write_image_at.
9116 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
9117 additional memory in kernel_img for a struct grub_module_info.
9118 Fill in that grub_module_info.
9119 * util/powerpc/ieee1275/grub-mkimage.c: New file.
9121 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9123 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
9125 * include/grub/powerpc/ieee1275/ieee1275.h
9126 (grub_ieee1275_milliseconds): New prototype.
9127 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
9129 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
9130 grub_ieee1275_milliseconds.
9132 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9134 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
9136 (find_options): New function.
9137 (cmain): Call find_options.
9138 * include/grub/powerpc/ieee1275/ieee1275.h
9139 (grub_ieee1275_realmode): New extern variable.
9140 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
9141 grub_map if grub_ieee1275_realmode is false.
9143 2004-12-29 Marco Gerards <metgerards@student.han.nl>
9145 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
9146 lines are inserted and make it work like readline. Reported by
9147 Vincent Pelletier <subdino2004@yahoo.fr>.
9149 2004-12-28 Marco Gerards <metgerards@student.han.nl>
9151 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
9153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
9154 `kern/powerpc/cache.S'.
9156 2004-12-27 Marco Gerards <metgerards@student.han.nl>
9158 * genmk.rb: Handle the `Program' class in the main loop. Written
9159 by Johan Rydberg <jrydberg@gnu.org>.
9160 (Program): New class.
9161 (programs): New variable.
9162 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
9163 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
9164 instead of "grub/kernel.h". Include <grub/machine/init.h>.
9165 (help_arch): Function removed.
9166 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
9167 `powerpc/libgcc.h' and `loader.h'.
9168 (pkgdata_PROGRAMS): New variable.
9169 (sbin_UTILITIES): Variable removed.
9170 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
9171 (grubof_SOURCES): Variable re-defined so it only includes the
9173 (grubof_CFLAGS): Remove `-DGRUBOF'.
9174 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
9175 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
9176 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
9177 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
9178 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
9179 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
9180 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
9181 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
9182 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
9183 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
9184 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9185 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
9186 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
9187 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
9188 (pc_mod_CFLAGS): New variables.
9189 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
9190 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
9191 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
9192 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
9194 * include/grub/i386/pc/init.h (grub_os_area_addr)
9195 (rub_os_area_size): ... to here.
9196 * include/grub/powerpc/ieee1275/ieee1275.h
9197 (grub_ieee1275_entry_fn): Export symbol.
9198 * include/grub/powerpc/ieee1275/init.h: New file.
9199 * include/grub/powerpc/libgcc.h: Likewise.
9200 * include/grub/cache.h: Likewise.
9201 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
9202 <hollis@penguinppc.org>.
9203 * kern/dl.c: Include <grub/cache.h>.
9204 (grub_dl_flush_cache): New function.
9205 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
9207 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
9208 (grub_console_init): Removed prototypes.
9209 (grub_machine_init): Don't initialize the modules anymore.
9210 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
9212 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
9213 Macro undef removed.
9214 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
9215 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
9216 relocation `R_PPC_REL32'. Return an error when the relocation is
9218 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
9219 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
9220 * util/misc.c (grub_arch_sync_caches): Likewise.
9222 2004-12-19 Marco Gerards <metgerards@student.han.nl>
9224 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
9225 `symlist.c', add `grubof_symlist.c'.
9226 (symlist.c): Variable removed.
9227 (grubof_HEADERS): Variable added.
9228 (grubof_symlist.c): New target.
9229 (kernel_syms.lst): Use `grubof_HEADERS' instead of
9230 `kernel_img_HEADERS'.
9231 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
9232 * kern/powerpc/dl.c: New file.
9233 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
9235 (grub_arch_dl_relocate_symbols): Likewise.
9236 (grub_register_exported_symbols): Likewise.
9238 2004-12-13 Marco Gerards <metgerards@student.han.nl>
9240 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
9241 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
9242 to fail instead. Reported by Vincent Pelletier
9243 <subdino2004@yahoo.fr>.
9245 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
9246 it is not allocated. Reported by Vincent Pelletier
9247 <subdino2004@yahoo.fr>.
9249 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
9250 output so the output looks better.
9252 2004-12-04 Marco Gerards <metgerards@student.han.nl>
9254 Modulize the partition map support and add support for the amiga
9257 * commands/ls.c: Include <grub/partition.h> instead of
9258 <grub/machine/partition.h>.
9259 * kern/disk.c: Likewise.
9260 * kern/rescue.c: Likewise.
9261 * loader/i386/pc/chainloader.c: Likewise.
9262 * normal/cmdline.c: Likewise.
9263 * kern/powerpc/ieee1275/init.c: Likewise.
9264 (grub_machine_init): Call `grub_pc_partition_map_init',
9265 `grub_amiga_partition_map_init' and
9266 `grub_apple_partition_map_init'.
9267 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
9268 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
9269 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
9270 `partition.h' and `pc_partition.h'.
9271 (grub_setup_SOURCES): Remove
9272 `disk/i386/pc/partition.c'. Add `kern/partition.c',
9273 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
9274 (grub_emu_SOURCES): Likewise.
9275 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
9276 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
9277 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
9278 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
9279 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
9280 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
9281 (grubof_SOURCES): Likewise.
9282 * disk/i386/pc/partition.c: File removed.
9283 * disk/powerpc/ieee1275/partition.c: Likewise.
9284 * include/grub/powerpc/ieee1275/partition.h: Likewise.
9285 * include/grub/i386/pc/partition.h: Likewise.
9286 * kern/partition.c: New file.
9287 * partmap/amiga.c: Likewise.
9288 * partmap/apple.c: Likewise.
9289 * partmap/pc.c: Likewise.
9290 * include/grub/partition.h: Likewise..
9291 * include/grub/pc_partition.h: Likewise.
9292 * util/grub-emu.c: Include <grub/partition.h> instead of
9293 <grub/machine/partition.h>.
9294 (main): Call `grub_pc_partition_map_init',
9295 `grub_amiga_partition_map_init' and
9296 `grub_apple_partition_map_init' and deinitialize afterwards.
9297 * util/i386/pc/biosdisk.c: Include `#include
9298 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
9299 `<grub/machine/partition.h>'.
9300 * util/i386/pc/grub-setup.c: Likewise.
9301 * util/i386/pc/biosdisk.c: Likewise.
9302 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
9303 partition information in case of a PC partition.
9304 * util/i386/pc/grub-setup.c: Include `#include
9305 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
9306 `<grub/machine/partition.h>'.
9307 (setup): Only access the PC specific partition information in case
9310 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
9312 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
9313 (grub_longjmp): Likewise.
9314 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
9316 * normal/powerpc/setjmp.S: New file.
9317 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9318 `normal/powerpc/setjmp.S'.
9319 (grubof_CFLAGS): Add `-DGRUBOF'.
9320 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
9321 [GRUB_UTIL && !GRUBOF].
9323 2004-11-16 Marco Gerards <metgerards@student.han.nl>
9325 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
9326 property named `name'. Correctly handle the error returned by
9327 `grub_ieee1275_finddevice' if a device can not be opened.
9329 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
9331 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
9332 `actual' for negativity.
9333 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
9336 2004-11-01 Marco Gerards <metgerards@student.han.nl>
9338 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
9339 (PAGE_OFFSET): New macro.
9340 (CRTC_ADDR_PORT): Likewise.
9341 (CRTC_DATA_PORT): Likewise.
9342 (START_ADDR_HIGH_REGISTER): Likewise.
9343 (START_ADDR_LOW_REGISTER): Likewise.
9344 (GRAPHICS_ADDR_PORT): Likewise.
9345 (GRAPHICS_DATA_PORT): Likewise.
9346 (READ_MAP_REGISTER): Likewise.
9347 (INPUT_STATUS1_REGISTER): Likewise.
9348 (INPUT_STATUS1_VERTR_BIT): Likewise.
9349 (page): New variable.
9350 (wait_vretrace): New function.
9351 (set_read_map): Likewise.
9352 (set_start_address): Likewise.
9353 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
9355 (check_vga_mem): Take the page into account.
9356 (write_char): Likewise.
9357 (write_cursor): Likewise.
9358 (scroll_up): Likewise. Copy the page to the page that is not
9359 shown and switch between both pages.
9360 (grub_vga_putchar): Fix off by one error.
9361 (grub_vga_cls): Wait for the vertical retrace. Take the page into
9364 2004-11-01 Marco Gerards <metgerards@student.han.nl>
9366 Add support for iso9660 (including rockridge).
9368 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
9369 (iso9660_mod_SOURCES): New variable.
9370 (iso9660_mod_CFLAGS): Likewise.
9371 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
9372 * include/grub/fs.h (grub_iso9660_init): New prototype.
9373 * util/grub-emu.c (main): Call `grub_iso9660_init'.
9374 * fs/iso9660.c: New file.
9376 * include/grub/misc.h (grub_strncat): New prototype.
9377 * kern/misc.c (grub_strncat): New function.
9379 * fs/hfs.c (grub_hfs_mount): Translate the error
9380 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
9381 * fs/jfs.c (grub_jfs_mount): Likewise.
9382 * fs/ufs.c (grub_ufs_mount): Likewise.
9384 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
9386 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
9387 which initialized BAT registers.
9388 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
9389 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
9391 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
9392 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
9394 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
9395 (grub_mapclaim): Likewise.
9396 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
9397 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
9400 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
9402 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
9403 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
9404 -ffreestanding and -msoft-float.
9406 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
9408 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
9409 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
9410 set in grub_ieee1275_flags.
9412 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
9414 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
9416 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
9417 grub_console_init first.
9418 Change the memory range used for grub_ieee1275_claim and
9419 grub_mm_init_region.
9420 Print an error message if the claim fails.
9421 Include <grub/misc.h>.
9423 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
9425 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
9426 Call grub_children_iterate for device nodes of type `scsi',
9428 (grub_ofdisk_open): Remove manual device alias resolution.
9429 Fix memory leak when device cannot be opened.
9430 * include/grub/powerpc/ieee1275/ieee1275.h
9431 (grub_children_iterate): New prototype.
9432 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
9434 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9435 Return -1 if args.size was -1.
9437 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
9439 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
9440 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
9441 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
9442 Open Firmware's memory for it; claim memory from _start to _end.
9443 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
9445 (_start): Zero BSS from __bss_start to _end.
9446 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9448 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
9450 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
9452 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
9453 -1 if args.base was -1.
9455 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
9457 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
9458 escape sequence instead of a literal ^L. Also call
9459 grub_ofconsole_gotoxy.
9461 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
9463 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
9464 void * arguments to grub_addr_t. All callers updated. Also make
9465 the `result' argument optional.
9466 (grub_ieee1275_release): change void * arguments to grub_addr_t.
9467 All callers updated.
9469 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
9471 * commands/ls.c (grub_ls_list_files): Use the string following the
9472 initial ')', if present, as the filesystem path.
9473 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
9475 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
9477 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
9479 Make the source code of the menu interface more readable.
9481 * normal/menu.c: Include grub/mm.h.
9482 (TERM_WIDTH): New macro.
9483 (TERM_HEIGHT): Likewise.
9484 (TERM_INFO_HEIGHT): Likewise.
9485 (TERM_MARGIN): Likewise.
9486 (TERM_SCROLL_WIDTH): Likewise.
9487 (TERM_TOP_BORDER_Y): Likewise.
9488 (TERM_LEFT_BORDER_X): Likewise.
9489 (TERM_BORDER_WIDTH): Likewise.
9490 (TERM_MESSAGE_HEIGHT): Likewise.
9491 (TERM_BORDER_HEIGHT): Likewise.
9492 (TERM_NUM_ENTRIES): Likewise.
9493 (TERM_FIRST_ENTRY_Y): Likewise.
9494 (TERM_ENTRY_WIDTH): Likewise.
9495 (TERM_CURSOR_X): Likewise.
9496 (draw_border): Use macros instead of magic numbers.
9497 (print_entry): Likewise.
9498 (print_entries): Likewise.
9499 (run_menu): Likewise. Also, handle the key 'e'.
9500 (run_menu_entry): Ignore empty command lines.
9501 (print_message): Added a new argument EDIT. If EDIT is true,
9502 print a different message.
9503 (init_page): Likewise.
9504 (edit_menu_entry): New function. Not implemented yet.
9506 2004-09-17 Marco Gerards <metgerards@student.han.nl>
9508 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
9509 can be loaded from normal mode.
9511 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
9513 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
9514 (multiboot_mod_CFLAGS): New variables.
9515 * loader/i386/pc/linux_normal.c: New file.
9516 * loader/i386/pc/multiboot_normal.c: Likewise.
9518 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
9521 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
9522 `fdiro' to read the mode information from instead of `diro'.
9524 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
9525 looking up a symlink.
9527 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
9529 * normal/command.c (grub_command_execute): Don't parse the
9530 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
9531 flags of the command.
9533 * normal/menu.c (grub_menu_run): Fix typo.
9535 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
9537 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
9539 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
9540 `y + 1' instead of `y - 1'.
9542 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
9544 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
9546 From Hollis Blanchard <hollis@penguinppc.org>:
9547 * kern/misc.c (memmove): New alias for grub_memmove.
9548 (memcmp): New alias for grub_memcmp.
9549 (memset): New alias for grub_memset.
9550 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9551 Change "int handle" to "grub_ieee1275_phandle_t handle".
9552 * include/grub/powerpc/ieee1275/ieee1275.h
9553 (grub_ieee1275_get_property): Likewise.
9555 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
9557 Added normal mode command `chainloader' as module chain.mod, which
9558 depends on normal.mod and _chain.mod.
9560 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
9561 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
9562 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
9564 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
9565 but arguments parsing moved to ...
9566 (grub_chainloader_cmd): ... here. New function.
9567 * include/grub/i386/pc/chainloader.h: New file.
9568 * loader/i386/pc/chainloader_normal.c: Likewise.
9570 2004-09-11 Marco Gerards <metgerards@student.han.nl>
9572 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
9573 (grub_mkimage_LDFLAGS): Likewise.
9574 (grub_emu_SOURCES): Likewise.
9575 (kernel_img_HEADERS): Added fshelp.h.
9576 * fs/ext2.c: Include <grub/fshelp.h>.
9577 (FILETYPE_REG): New macro.
9578 (FILETYPE_INO_REG): Likewise.
9579 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
9581 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
9583 (grub_fshelp_node): New struct.
9584 (grub_ext2_data): Added member `diropen'. Changed member `inode'
9586 (grub_ext2_get_file_block): Removed function.
9587 (grub_ext2_read_block): New function.
9588 (grub_ext2_read_file): Replaced parameter `data' by `node'.
9589 This function was written.
9590 (grub_ext2_mount): Read the root inode. Create a diropen struct.
9591 (grub_ext2_find_file): Removed function.
9592 (grub_ext2_read_symlink): New function.
9593 (grub_ext2_iterate_dir): Likewise.
9594 (grub_ext2_open): Rewritten.
9595 (grub_ext2_dir): Rewritten.
9596 * include/grub/fshelp.h: New file.
9597 * fs/fshelp.c: Likewise.
9599 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
9601 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
9602 (print_message): Add a missing newline.
9603 (run_menu): Added timeout support.
9604 (run_menu_entry): New local function.
9605 (grub_menu_run): Added support for booting.
9607 * kern/loader.c (grub_loader_is_loaded): New function.
9609 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
9610 (grub_get_rtc): Exported.
9612 * include/grub/i386/pc/time.h: Include grub/symbol.h.
9613 (grub_get_rtc): Exported.
9615 * include/grub/normal.h (struct grub_command_list): Remove
9616 constant from the member `command'.
9618 * include/grub/loader.h (grub_loader_is_loaded): Declared.
9620 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
9622 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
9624 2004-08-28 Marco Gerards <metgerards@student.han.nl>
9626 Add support for the JFS filesystem.
9628 * fs/jfs.c: New file.
9629 * include/grub/fs.h (grub_jfs_init): New prototype.
9630 (grub_jfs_fini): New prototype.
9631 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
9632 (grub_emu_SOURCES): Likewise.
9633 (pkgdata_MODULES): Add jfs.mod.
9634 (jfs_mod_SOURCES): New variable.
9635 (jfs_mod_CFLAGS): Likewise.
9636 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
9637 (grubof_SOURCES): Likewise.
9638 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
9640 * fs/fat.c (grub_fat_find_dir): Convert the filename little
9641 endian to the host endian.
9642 (grub_fat_utf16_to_utf8): Move function from there...
9643 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
9644 the endianess of the source string anymore.
9645 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
9647 2004-08-24 Marco Gerards <metgerards@student.han.nl>
9649 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
9650 (grub_boot_fini) [GRUB_UTIL]: Likewise.
9651 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
9652 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
9654 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
9655 (grub_hfs_iterate_dir): Make the function static. Add prototypes
9656 for `node_found' and `it_dir'.
9657 (grub_hfs_dir): Add prototype for `dir_hook'.
9659 * fs/minix.c (grub_minix_get_file_block): Add prototype for
9660 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
9661 and `indir32' to silence a gcc warning.
9663 * include/grub/fs.h (grub_hfs_init): New prototype.
9664 (grub_hfs_fini): Likewise.
9667 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9669 Each disk device has its own id now. This is useful to make use
9670 of multiple disk devices.
9672 * include/grub/disk.h (grub_disk_dev_id): New enum.
9673 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
9674 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
9676 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
9677 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9679 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
9680 GRUB_DISK_DEVICE_OFDISK_ID as an id.
9682 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
9683 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9685 * include/grub/disk.h (struct grub_disk_dev): Added a new member
9686 "id" which is used by the cache manager.
9688 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
9691 2004-08-18 Marco Gerards <metgerards@student.han.nl>
9693 * fs/hfs.c: New file.
9694 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
9695 (grub_emu_SOURCES): Likewise.
9696 (pkgdata_MODULES): Add hfs.mod.
9697 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
9698 (grubof_SOURCES): Likewise.
9699 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
9701 * include/grub/misc.h (grub_strncasecmp): Add prototype.
9702 * kern/misc.c (grub_strncasecmp): Add function.
9704 2004-08-14 Marco Gerards <metgerards@student.han.nl>
9706 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
9709 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
9710 (grub_ext2_dir): In case the directory entry type is unknown, read
9713 2004-08-02 Peter Bruin <pjbruin@dds.nl>
9715 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
9716 grub_load_linux instead of grub_rescue_cmd_linux as second
9717 argument of grub_rescue_register_command.
9719 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
9721 2004-07-27 Marco Gerards <metgerards@student.han.nl>
9723 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
9725 * commands/boot.c: Remove the check for `GRUB_UTIL'.
9726 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9727 `loader/powerpc/ieee1275/linux.c',
9728 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
9729 * include/grub/powerpc/ieee1275/ieee1275.h
9730 (grub_ieee1275_release): New prototype.
9731 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
9732 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
9733 normal, boot, linux and linux_normal.
9734 * loader/powerpc/ieee1275/linux.c: New file.
9735 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9737 2004-07-12 Marco Gerards <metgerards@student.han.nl>
9739 * normal/arg.c (grub_arg_parse): Correct error handling after
9740 reallocating the argumentlist (check if `argl' is not null instead
9741 of checking if `args' is not null).
9742 * kern/mm.c (grub_realloc): Return the same pointer when using the
9743 same region, instead of returning the header address.
9745 2004-07-11 Marco Gerards <metgerards@student.han.nl>
9747 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
9748 one block instead of two when looking for the initial partition.
9749 (grub_partition_probe): Initialize the local variable `p' with 0.
9750 Use base 10 for the grub_strtoul call.
9751 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
9752 need for one local variable.
9753 (grub_strtoul): Don't add the new value to `num', instead of that
9756 2004-07-11 Marco Gerards <metgerards@student.han.nl>
9758 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
9759 (pxeboot_img_SOURCES): New variable.
9760 (pxeboot_img_ASFLAGS): Likewise.
9761 (pxeboot_img_LDFLAGS): Likewise.
9762 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
9763 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
9764 <lode_leroy@hotmail.com>.
9766 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9768 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
9771 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9773 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
9774 the history buffer logic.
9776 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9778 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
9779 (FILETYPE_INO_SYMLINK): New macros.
9780 (grub_ext2_find_file): Check if the node is a directory using the
9781 inode stat information instead of using the filetype in the
9782 dirent. Exclude the first character of an absolute symlink.
9783 (grub_ext2_dir): Mask out the filetype part of the mode member of
9786 2004-05-24 Marco Gerards <metgerards@student.han.nl>
9788 Add support for UFS version 1 and 2. Add support for the minix
9789 filesystem version 1 and 2, both the variants with 14 and 30 long
9792 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
9794 (grub_emu_SOURCES): Likewise.
9795 (pkgdata_MODULES): Add ufs.mod and minix.mod.
9796 (ufs_mod_SOURCES): New variable.
9797 (ufs_mod_CFLAGS): Likewise.
9798 (minix_mod_SOURCES): Likewise.
9799 (minix_mod_CFLAGS): Likewise.
9800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
9802 (grubof_SOURCES): Likewise.
9803 * fs/ufs.c: New file.
9804 * fs/minix.c: New file.
9805 * include/grub/fs.h (grub_ufs_init): New prototype.
9806 (grub_ufs_fini): Likewise.
9807 (grub_minix_init): Likewise.
9808 (grub_minix_fini): Likewise.
9809 * util/grub-emu.c (main): Initialize and deinitialize UFS and
9812 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
9814 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
9815 commands/ls.c, commands/terminal.c, commands/boot.c,
9816 commands/cmp.c and commands/cat.c.
9817 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
9819 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
9822 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9824 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
9825 and grub_, respectively. Because the conversion is trivial and
9826 mechanical, I omit the details here. Please refer to the CVS
9827 if you need more information.
9829 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9831 * include/pupa: Renamed to ...
9832 * include/grub: ... this.
9833 * util/i386/pc/pupa-mkimage.c: Renamed to ...
9834 * util/i386/pc/grub-mkimage.c: ... this.
9835 * util/i386/pc/pupa-setup.c: Renamed to ...
9836 * util/i386/pc/grub-setup.c: ... this.
9837 * util/pupa-emu.c: Renamed to ...
9838 * util/grub-emu.c: ... this.
9840 2004-03-29 Marco Gerards <metgerards@student.han.nl>
9842 Add support for the newworld apple macintosh (PPC). This has been
9843 tested on the powerbook 2000 only. It only adds support for
9844 generic ieee1275 functions, console and disk support. This should
9845 be easy to port to other architectures with support for Open
9848 * configure.ac: Accept the powerpc as host_cpu. In the case of
9849 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
9850 specific tests are only executed while building for the i386.
9851 Inverse test for crosscompile.
9852 * genmk.rb (Utility): Allow assembler files.
9853 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
9854 * conf/powerpc-ieee1275.rmk: New file.
9855 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
9856 * disk/powerpc/ieee1275/partition.c: Likewise.
9857 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
9858 * include/pupa/powerpc/ieee1275/console.h: Likewise.
9859 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
9860 * include/pupa/powerpc/ieee1275/time.h: Likewise.
9861 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
9862 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
9863 * include/pupa/powerpc/ieee1275/loader.h
9864 * include/pupa/powerpc/setjmp.h: Likewise.
9865 * include/pupa/powerpc/types.h: Likewise.
9866 * kern/powerpc/ieee1275/init.c: Likewise.
9867 * kern/powerpc/ieee1275/openfw.c: Likewise.
9868 * term/powerpc/ieee1275/ofconsole.c: Likewise.
9870 These files were written by Johan Rydberg
9871 (jrydberg@night.trouble.net) and I only modified them slightly.
9873 * boot/powerpc/ieee1275/cmain.c: New file.
9874 * boot/powerpc/ieee1275/crt0.S: Likewise.
9875 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9876 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9878 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
9880 * Makefile.in: Update copyright.
9881 * genmodsrc.sh: Likewise.
9882 * gensymlist.sh: Likewise.
9883 * term/i386/pc/vga.c: Indent correctly.
9885 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9886 bugreporting address.
9887 * util/i386/pc/pupa-setup.c (usage): Likewise,
9888 (main): Call pupa_ext2_init and pupa_ext2_fini.
9890 * fs/fat.c (log2): Renamed to ...
9891 (fat_log2): ... this.
9892 All callers changed.
9893 * kern/misc.c (memcpy): Alias to pupa_memmove.
9894 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9896 * util/console.c (pupa_ncurses_fini): Return 0.
9898 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9899 Move fail label here.
9900 [__GNU__]: Don't warn when using stat.
9901 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9902 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9903 long int. Use strtol instead of strtoul.
9905 2004-03-14 Marco Gerards <metgerards@student.han.nl>
9907 * commands/boot.c: New file.
9908 * commands/cat.c: Likewise.
9909 * commands/cmp.c: Likewise.
9910 * commands/ls.c: Likewise.
9911 * commands/terminal.c: Likewise.
9912 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9913 (pupa_register_command): Changed interface to match the new
9915 (pupa_command_execute): Changed (almost rewritten) so it uses
9916 pupa_split_command. Added support for setting variables using the
9918 (rescue_command): Changed to work with the new argument parser.
9919 (terminal_command): Moved from here to commands/terminal.c.
9920 (set_command): New function.
9921 (unset_command): New function.
9922 (insmod_command): New function.
9923 (rmmod_command): New function.
9924 (lsmod_command): New function.
9925 (pupa_command_init): Don't initialize the command terminal
9926 anymore. Initialize the commands set, unset, insmod, rmmod and
9928 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9929 (kernel_img_HEADERS): Add arg.h and env.h.
9930 (pupa_mkimage_LDFLAGS): Add kern/env.c.
9931 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9932 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9934 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9936 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9937 (boot_mod_SOURCES): New variable.
9938 (terminal_mod_SOURCES): Likewise.
9939 (ls_mod_SOURCES): Likewise.
9940 (cmp_mod_SOURCES): Likewise.
9941 (cat_mod_SOURCES): Likewise.
9943 * normal/arg.c: New file.
9944 * kern/env.c: Likewise.
9945 * include/pupa/arg.h: Likewise.
9946 * include/pupa/env.h: Likewise.
9947 * font/manager.c (font_command): Changed to match argument parsing
9949 (PUPA_MOD_INIT): Likewise.
9950 * hello/hello.c (pupa_cmd_hello): Likewise.
9951 (PUPA_MOD_INIT): Likewise.
9952 * include/pupa/disk.h: Include <pupa/device.h>.
9953 (pupa_print_partinfo): New prototype.
9954 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9955 (pupa_dl_get_prefix): Likewise.
9956 * include/pupa/misc.h: Include <pupa/err.h>.
9957 (pupa_isgraph): New prototype.
9958 (pupa_isdigit): Likewise.
9959 (pupa_split_cmdline): Likewise.
9960 * include/pupa/normal.h: Include <pupa/arg.h>.
9961 (pupa_command): Changed the prototype of the member `func' to
9962 match the argument parsing interface. Added member `options'.
9963 (pupa_register_command): Updated to match function.
9964 (pupa_arg_parse): New prototype.
9965 (pupa_hello_init) [PUPA_UTIL]: New prototype.
9966 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9967 (pupa_ls_init) [PUPA_UTIL]: Likewise.
9968 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9969 (pupa_cat_init) [PUPA_UTIL]: Likewise.
9970 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9971 (pupa_boot_init) [PUPA_UTIL]: Likewise.
9972 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9973 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9974 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9975 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9976 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9977 * kern/disk.c: Include <pupa/file.h>.
9978 (pupa_print_partinfo): New function.
9979 * kern/dl.c: Include <pupa/env.h>.
9980 (pupa_dl_dir): Variable removed.
9981 (pupa_dl_load): Use the environment variable `prefix' instead of
9982 the variable pupa_dl_dir.
9983 (pupa_dl_set_prefix): Function removed.
9984 (pupa_dl_get_prefix): Likewise.
9985 * kern/i386/pc/init.c: Include <pupa/env.h>.
9986 (pupa_machine_init): Use the environment variable `prefix' instead of
9987 using pupa_dl_set_prefix to set the prefix.
9988 * kern/main.c: Include <pupa/env.h>.
9989 (pupa_set_root_dev): Use the environment variable `prefix' instead of
9990 using pupa_dl_get_prefix to get the prefix.
9991 * kern/misc.c: Include <pupa/env.h>.
9992 (pupa_isdigit): New function.
9993 (pupa_isgraph): Likewise.
9994 (pupa_ftoa): Likewise.
9995 (pupa_vsprintf): Added support for printing values of the type
9996 `double'. Make it possible to format variable output when using
9997 formatting like `%1.2%f'.
9998 (pupa_split_cmdline): New function.
9999 * kern/rescue.c: Include <pupa/env.h>.
10000 (next_word): Removed function.
10001 (pupa_rescue_cmd_prefix): Likewise.
10002 (pupa_rescue_cmd_set): New function.
10003 (pupa_rescue_cmd_unset): New function.
10004 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
10005 split the command line instead of splitting it here. Added
10006 support for setting variables using the syntax `foo=bar'. Don't
10007 initialize the prefix command anymore. Initialized the set and
10009 * normal/cmdline.c: Include <pupa/env.h>.
10010 (pupa_tab_complete): Added prototypes for print_simple_completion,
10011 print_partition_completion, add_completion, iterate_commands,
10012 iterate_dev, iterate_part and iterate_dir. Moved code to print
10013 partition information from here to kern/disk.c.
10014 (pupa_cmdline_run): Don't check if the funtion exists anymore.
10015 * normal/main.c: Include <pupa/env.h>.
10016 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
10017 instead of using pupa_dl_get_prefix to get the prefix.
10018 * term/i386/pc/vga.c: Include <pupa/arg.h>.
10019 (check_vga_mem): Cast pointers to `void *' to silence a gcc
10021 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
10022 (pupa_vga_setcolor): Declare unused variables with `__attribute__
10023 ((unused))' to silence a gcc warning.
10024 (pupa_vga_setcolor): Likewise.
10025 (debug_command): Changed to match argument parsing
10027 * util/pupa-emu.c: Include <pupa/env.h>.
10028 (options): Added 0's for unused fields to silence a gcc warning.
10030 (main): Use the environment variable `prefix' instead of using
10031 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
10032 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
10035 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
10036 * util/misc.c: Include <malloc.h>.
10037 (pupa_malloc): Rewritten so errors are correctly reported.
10038 (pupa_realloc): Likewise.
10039 (pupa_memalign): Likewise.
10040 (pupa_mm_init_region): Declare unused variables with
10041 `__attribute__ ((unused))' to silence a gcc warning.
10042 * normal/i386/setjmp.S: Remove tab at the end of the file to
10043 silence a gcc warning.
10044 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
10045 variables with `__attribute__ ((unused))' to silence a gcc
10047 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
10048 local variable i unsigned to silence a gcc warning.
10050 * kern/term.c: Include <pupa/misc.h>.
10051 (pupa_more_lines): New variable.
10052 (pupa_more): Likewise.
10053 (pupa_putcode): When the pager is active pause at the end of every
10055 (pupa_set_more): New function.
10056 * include/pupa/term.h (pupa_set_more): New prototype.
10059 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
10061 Now this project is GRUB 2 rather than PUPA. The location of
10062 the CVS repository was moved to GRUB's.
10064 * configure.ac: Use bug-grub as the reporting address.
10065 Use GRUB instead of PUPA.
10066 Change the version number to 1.90.
10068 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
10070 * genkernsyms.sh: Updated copyright information.
10071 * genmk.rb: Likewise.
10072 * genmodsrc.sh: Likewise.
10073 * gensymlist.sh: Likewise.
10074 * boot/i386/pc/boot.S: Likewise.
10075 * boot/i386/pc/diskboot.S: Likewise.
10076 * disk/i386/pc/biosdisk.c: Likewise.
10077 * disk/i386/pc/partition.c: Likewise.
10078 * font/manager.c: Likewise.
10079 * fs/ext2.c: Likewise.
10080 * fs/fat.c: Likewise.
10081 * include/pupa/boot.h: Likewise.
10082 * include/pupa/device.h: Likewise.
10083 * include/pupa/disk.h: Likewise.
10084 * include/pupa/dl.h: Likewise.
10085 * include/pupa/elf.h: Likewise.
10086 * include/pupa/err.h: Likewise.
10087 * include/pupa/file.h: Likewise.
10088 * include/pupa/font.h: Likewise.
10089 * include/pupa/fs.h: Likewise.
10090 * include/pupa/kernel.h: Likewise.
10091 * include/pupa/loader.h: Likewise.
10092 * include/pupa/misc.h: Likewise.
10093 * include/pupa/mm.h: Likewise.
10094 * include/pupa/net.h: Likewise.
10095 * include/pupa/normal.h: Likewise.
10096 * include/pupa/rescue.h: Likewise.
10097 * include/pupa/setjmp.h: Likewise.
10098 * include/pupa/symbol.h: Likewise.
10099 * include/pupa/term.h: Likewise.
10100 * include/pupa/types.h: Likewise.
10101 * include/pupa/i386/setjmp.h: Likewise.
10102 * include/pupa/i386/types.h: Likewise.
10103 * include/pupa/i386/pc/biosdisk.h: Likewise.
10104 * include/pupa/i386/pc/boot.h: Likewise.
10105 * include/pupa/i386/pc/console.h: Likewise.
10106 * include/pupa/i386/pc/init.h: Likewise.
10107 * include/pupa/i386/pc/kernel.h: Likewise.
10108 * include/pupa/i386/pc/linux.h: Likewise.
10109 * include/pupa/i386/pc/loader.h: Likewise.
10110 * include/pupa/i386/pc/memory.h: Likewise.
10111 * include/pupa/i386/pc/multiboot.h: Likewise.
10112 * include/pupa/i386/pc/partition.h: Likewise.
10113 * include/pupa/i386/pc/time.h: Likewise.
10114 * include/pupa/i386/pc/vga.h: Likewise.
10115 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
10116 * include/pupa/util/getroot.h: Likewise.
10117 * include/pupa/util/misc.h: Likewise.
10118 * include/pupa/util/resolve.h: Likewise.
10119 * kern/device.c: Likewise.
10120 * kern/disk.c: Likewise.
10121 * kern/dl.c: Likewise.
10122 * kern/err.c: Likewise.
10123 * kern/file.c: Likewise.
10124 * kern/fs.c: Likewise.
10125 * kern/loader.c: Likewise.
10126 * kern/main.c: Likewise.
10127 * kern/misc.c: Likewise.
10128 * kern/mm.c: Likewise.
10129 * kern/rescue.c: Likewise.
10130 * kern/term.c: Likewise.
10131 * kern/i386/dl.c: Likewise.
10132 * kern/i386/pc/init.c: Likewise.
10133 * kern/i386/pc/lzo1x.S: Likewise.
10134 * kern/i386/pc/startup.S: Likewise.
10135 * loader/i386/pc/chainloader.c: Likewise.
10136 * loader/i386/pc/linux.c: Likewise.
10137 * loader/i386/pc/multiboot.c: Likewise.
10138 * normal/cmdline.c: Likewise.
10139 * normal/command.c: Likewise.
10140 * normal/main.c: Likewise.
10141 * normal/menu.c: Likewise.
10142 * normal/i386/setjmp.S: Likewise.
10143 * term/i386/pc/console.c: Likewise.
10144 * term/i386/pc/vga.c: Likewise.
10145 * util/console.c: Likewise.
10146 * util/genmoddep.c: Likewise.
10147 * util/misc.c: Likewise.
10148 * util/pupa-emu.c: Likewise.
10149 * util/resolve.c: Likewise.
10150 * util/unifont2pff.rb: Likewise.
10151 * util/i386/pc/biosdisk.c: Likewise.
10152 * util/i386/pc/getroot.c: Likewise.
10153 * util/i386/pc/pupa-mkimage.c: Likewise.
10154 * util/i386/pc/pupa-setup.c: Likewise.
10156 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
10158 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
10159 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
10160 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
10161 reading and reset it after reading.
10162 (pupa_ext2_close): Return PUPA_ERR_NONE.
10164 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
10166 (struct linux_kernel_header): Add kernel_version and
10168 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
10169 pupa_file_read succeeds.
10170 (pupa_rescue_cmd_initrd): Implement.
10172 2003-12-03 Marco Gerards <metgerards@student.han.nl>
10174 * fs/ext2.c (pupa_ext2_label): New function.
10175 (pupa_ext2_fs): Added label.
10176 * fs/fat.c (pupa_fat_label): New function.
10177 (pupa_fat_fs): Added label.
10178 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
10180 * kern/misc.c (pupa_strndup): New function.
10181 * include/pupa/misc.h (pupa_strndup): New prototype.
10183 * include/pupa/normal.h: Include <pupa/err.h>.
10184 (pupa_set_history): New prototype.
10185 (pupa_iterate_commands): New prototype.
10186 * normal/cmdline.c: Include <pupa/machine/partition.h>,
10187 <pupa/disk.h>, <pupa/file.h>.
10188 (hist_size): New variable.
10189 (hist_lines): Likewise.
10190 (hist_end): Likewise.
10191 (hist_used): Likewise.
10192 (pupa_set_history): New function.
10193 (pupa_history_get): Likewise.
10194 (pupa_history_add): Likewise.
10195 (pupa_history_replace): Likewise.
10196 (pupa_tab_complete): Likewise.
10197 (pupa_cmdline_run): Added tab completion and history buffer. Tab
10198 completion shows partitionnames while completing partitions, this
10199 feature was suggested by Jeff Bailey.
10200 * normal/command.c (pupa_iterate_commands): New function.
10201 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
10202 (pupa_normal_init): Initialize history buffer.
10203 (PUPA_MOD_INIT): Likewise.
10204 (pupa_normal_fini): Free the history buffer.
10205 (PUPA_MOD_FINI): Likewise.
10207 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
10210 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
10211 * configure.ac [i386]: Check for regparam bug.
10212 (NESTED_FUNC_ATTR) [! i386]: Defined.
10214 2003-11-17 Marco Gerards <metgerards@student.han.nl>
10216 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
10217 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
10218 (pupa_emu_SOURCES): New variable.
10219 (pupa_emu_LDFLAGS): Likewise.
10220 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
10221 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
10222 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
10223 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
10224 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
10225 (pupa_jmp_buf): New typedef.
10226 (pupa_setjmp) [PUPA_UTIL]: New macro.
10227 (pupa_longjmp) [PUPA_UTIL]: Likewise.
10228 * include/pupa/term.h (struct pupa_term): New member `refresh'.
10229 (pupa_refresh): New prototype.
10230 * include/pupa/util/getroot.h: New file.
10231 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
10233 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
10234 (pupa_rescue_cmd_cat): Likewise.
10235 (pupa_rescue_cmd_ls): Likewise.
10236 (pupa_rescue_cmd_testload): Likewise.
10237 (pupa_rescue_cmd_lsmod): Likewise.
10238 * normal/cmdline.c (pupa_cmdline_get): Likewise.
10239 * normal/menu.c (run_menu): Likewise.
10240 * kern/term.c (pupa_cls): Likewise.
10241 (pupa_refresh): New function.
10242 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
10243 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
10244 * util/console.c: New file.
10246 * util/i386/pc/getroot.c: New file.
10247 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
10248 (pupa_putchar): New function.
10249 (pupa_refresh): Likewise.
10250 (xgetcwd): Function moved to ...
10251 (strip_extra_slashes): Likewise.
10252 (get_prefix): Likewise.
10253 * util/i386/pc/getroot.c: ... here.
10254 (find_root_device): Function moved and renamed to...
10255 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
10256 Changed all callers.
10257 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
10259 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
10260 Changed all callers.
10261 * util/misc.c (pupa_memalign): New function.
10262 (pupa_mm_init_region): Likewise.
10263 (pupa_register_exported_symbols): Likewise.
10264 (pupa_putchar): Function removed.
10265 * util/pupa-emu.c: New file.
10267 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
10269 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
10270 (_multiboot_mod_SOURCES): New variable.
10271 (_multiboot_mod_CFLAGS): Likewise.
10272 * loader/i386/pc/multiboot.c: New file.
10273 * include/pupa/i386/pc/multiboot.h: Likewise.
10274 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
10275 (pupa_multiboot_real_boot): New function.
10276 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
10277 (pupa_multiboot_real_boot): New prototype.
10278 (pupa_rescue_cmd_multiboot): Likewise
10279 (pupa_rescue_cmd_module): Likewise.
10281 * kern/loader.c (pupa_loader_set): Continue when
10282 pupa_loader_unload_func() fails.
10283 (pupa_loader_unset): New function.
10284 * include/pupa/loader.h (pupa_loader_unset): New prototype.
10286 * kern/misc.c (pupa_stpcpy): New function.
10287 * include/pupa/misc.h (pupa_stpcpy): New prototype.
10289 2003-11-12 Marco Gerards <metgerards@student.han.nl>
10291 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
10292 for available extensions.
10294 * include/pupa/i386/pc/time.h: New file.
10295 * kern/disk.c: Include <pupa/machine/time.h>.
10296 (PUPA_CACHE_TIMEOUT): New macro.
10297 (pupa_last_time): New variable.
10298 (pupa_disk_open): Flush the cache when there was a timeout.
10299 (pupa_disk_close): Reset the timer.
10300 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
10302 * util/misc.c: Include <sys/times.h>
10303 (pupa_get_rtc): New function.
10305 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10307 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
10309 (pupa_ext2_get_file_block): Use blocks member.
10311 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
10312 first block. Return -1 instead of pupa_errno on error.
10314 2003-10-27 Marco Gerards <metgerards@student.han.nl>
10316 * README: In the pupa-mkimage example use _chain instead of chain
10317 and ext2 instead of fat.
10318 * TODO: Replace ext2fs with jfs as an example. Add an item for
10319 adding journal playback for ext2fs.
10320 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
10321 (pkgdata_MODULES): Added ext2.mod.
10322 (ext2_mod_SOURCES): New variable.
10323 (ext2_mod_CFLAGS): Likewise.
10324 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
10325 * include/pupa/misc.h (pupa_strncpy): New prototype.
10326 (pupa_strcat): Likewise.
10327 (pupa_strncmp): Likewise.
10328 * kern/misc.c (pupa_strcat): Enable function.
10329 (pupa_strncpy): New function.
10330 (pupa_strncmp): Likewise.
10331 * fs/ext2.c: New file.
10333 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
10334 when the read failed before retrying.
10335 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
10336 (_FILE_OFFSET_BITS): Likewise.
10337 * configure.ac: Added AC_SYS_LARGEFILE.
10339 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
10341 * genmk.rb (PModule#rule): Make sure to get only symbol names
10342 from the output of nm.
10343 Reported by Robert Millan <zeratul2@wanadoo.es>.
10345 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
10347 I forgot to check in these changes for a long time. This adds
10348 incomplete support for VGA console, and this is still very
10349 buggy. Also, a lot of consideration is required for I18N,
10350 UNICODE, and VGA font issues. Therefore, assume that this is
10351 such that "better than nothing".
10353 * font/manager.c: New file.
10354 * include/pupa/font.h: Likewise.
10355 * include/pupa/i386/pc/vga.h: Likewise.
10356 * term/i386/pc/vga.c: Likewise.
10357 * util/unifont2pff.rb: Likewise.
10359 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
10360 (pkgdata_MODULES): Added vga.mod and font.mod.
10361 (vga_mod_SOURCES): New variables.
10362 (vga_mod_CFLAGS): Likewise.
10363 (font_mod_SOURCES): Likewise.
10364 (font_mod_CFLAGS): Likewise.
10366 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
10368 * include/pupa/term.h: Include pupa/err.h.
10369 (struct pupa_term): Added init and fini.
10370 Changed the argument of putchar to pupa_uint32_t.
10372 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
10373 (pupa_console_real_putchar): New prototype.
10374 (pupa_console_putchar): Removed.
10375 (pupa_console_checkkey): Exported.
10376 (pupa_console_getkey): Likewise.
10378 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
10381 * kern/term.c (pupa_term_set_current): Rewritten.
10382 (pupa_putchar): Likewise.
10383 (pupa_putcode): New function.
10385 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
10386 (pupa_console_real_putchar): ... this.
10387 (pupa_vga_set_mode): New function.
10388 (pupa_vga_get_font): Likewise.
10390 * normal/command.c: Include pupa/term.h.
10391 (terminal_command): New function.
10392 (pupa_command_init): Register the command "terminal".
10394 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
10395 (DISP_UP): Likewise.
10396 (DISP_RIGHT): Likewise.
10397 (DISP_DOWN): Likewise.
10398 (DISP_HLINE): Likewise.
10399 (DISP_VLINE): Likewise.
10400 (DISP_UL): Likewise.
10401 (DISP_UR): Likewise.
10402 (DISP_LL): Likewise.
10403 (DISP_LR): Likewise.
10405 * term/i386/pc/console.c (pupa_console_putchar): New function.
10407 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
10409 * util/resolve.c (pupa_util_resolve_dependencies): BUG
10410 FIX. Reverse the path_list.
10412 * include/pupa/normal.h: Export pupa_register_command and
10413 pupa_unregister_command.
10415 * hello/hello.c (pupa_cmd_hello): New module.
10416 * conf/i386-pc.rmk: Added hello.mod.
10418 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
10420 * kern/i386/pc/lzo1x.S: New file.
10422 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
10423 (compress_kernel): New variable.
10424 (generate_image): Heavily modified to support compressing a
10425 large part of the core image.
10427 * util/misc.c (pupa_util_read_image): Fix a file descriptor
10429 (pupa_util_load_image): New function.
10431 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
10432 (pupa_compressed_size): New variable.
10433 (codestart): Enable Gate A20 here.
10434 Decompress the compressed part of the core image.
10435 Rearrange the code to put functions and variables which are
10436 required for initialization in the non-compressed part.
10439 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
10442 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
10444 * include/pupa/i386/pc/kernel.h
10445 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
10446 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
10447 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10448 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10449 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
10451 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
10453 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
10454 (Utility#rule): Likewise.
10456 * configure.ac: Check if LZO is available.
10458 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
10460 * include/pupa/normal.h: New file.
10461 * include/pupa/setjmp.h: Likewise.
10462 * include/pupa/i386/setjmp.h: Likewise.
10463 * normal/cmdline.c: Likewise.
10464 * normal/command.c: Likewise.
10465 * normal/main.c: Likewise.
10466 * normal/menu.c: Likewise.
10467 * normal/i386/setjmp.S: Likewise.
10469 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
10470 (pupa_rescue_cmd_initrd): Likewise.
10472 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
10475 * kern/i386/pc/startup.S (translation_table): New variable.
10476 (translate_keycode): New function.
10477 (pupa_console_getkey): Call translate_keycode.
10479 * kern/rescue.c (attempt_normal_mode): New function.
10480 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
10481 it failed, print a message.
10483 * kern/mm.c (pupa_real_malloc): Print more information when a
10484 free magic is broken.
10485 (pupa_free): If the first free header is not free actually, set
10488 * kern/main.c (pupa_load_normal_mode): Just load the module
10490 (pupa_main): Don't print the message
10491 "Entering into rescue mode..." here.
10493 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
10495 (pupa_rescue_cmd_initrd): Likewise.
10496 (pupa_rescue_cmd_initrd): Likewise.
10498 * include/pupa/symbol.h (FUNCTION): Specify the type.
10499 (VARIABLE): Likewise.
10501 * include/pupa/err.h (pupa_err_t): Added
10502 PUPA_ERR_UNKNOWN_COMMAND.
10504 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
10505 (pupa_dl_get_prefix): Likewise.
10507 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
10508 Added _chain.mod and _linux.mod instead of chain.mod and
10510 (chain_mod_SOURCES): Renamed to ...
10511 (_chain_mod_SOURCES): ... this.
10512 (chain_mod_CFLAGS): Renamed to ...
10513 (_chain_mod_CFLAGS): ... this.
10514 (linux_mod_SOURCES): Renamed to ...
10515 (_linux_mod_SOURCES): ... this.
10516 (linux_mod_CFLAGS): Renamed to ...
10517 (_linux_mod_CFLAGS): ... this.
10518 (normal_mod_SOURCES): New variable.
10519 (normal_mod_CFLAGS): Likewise.
10520 (normal_mod_ASFLAGS): Likewise.
10522 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
10524 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
10527 * kern/dl.c (pupa_dl_ref): Refer dependending modules
10529 (pupa_dl_unref): Unrefer depending modules recursively.
10530 Don't call pupa_dl_unload implicitly, because PUPA can crash if
10531 a module is unloaded before one depending on that module is
10533 (pupa_dl_unload): Unload depending modules explicitly,
10536 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
10538 * include/pupa/i386/pc/linux.h: New file.
10539 * loader/i386/pc/linux.c: Likewise.
10541 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
10543 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
10544 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
10545 of PUPA_CHAINLOADER_BOOT_SECTOR.
10547 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
10548 (pupa_linux_prot_size): New variable.
10549 (pupa_linux_tmp_addr): Likewise.
10550 (pupa_linux_real_addr): Likewise.
10551 (pupa_linux_boot_zimage): New function.
10552 (pupa_linux_boot_bzimage): Likewise.
10554 * kern/i386/pc/init.c (struct mem_region): New structure.
10555 (MAX_REGIONS): New macro.
10556 (mem_regions): New variable.
10557 (num_regions): Likewise.
10558 (pupa_os_area_addr): Likewise.
10559 (pupa_os_area_size): Likewise.
10560 (pupa_lower_mem): Likewise.
10561 (pupa_upper_mem): Likewise.
10562 (add_mem_region): New function.
10563 (compact_mem_regions): Likewise.
10564 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
10565 the size of the conventional memory and that of so-called upper
10566 memory (before the first memory hole).
10567 Instead of adding each found region to free memory, use
10568 add_mem_region and add them after removing overlaps.
10569 Also, add only 1/4 of the upper memory to free memory. The rest
10570 is used for loading OS images. Maybe this is ad hoc, but this
10571 makes it much easier to relocate OS images when booting.
10573 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
10574 (pupa_enter_rescue_mode): Don't register initrd and module.
10576 * kern/mm.c: Include pupa/dl.h.
10578 * kern/main.c: Include pupa/file.h and pupa/device.h.
10580 * kern/loader.c (pupa_loader_load_module_func): Removed.
10581 (pupa_loader_load_module): Likewise.
10583 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
10586 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
10587 (pupa_linux_tmp_addr): Likewise.
10588 (pupa_linux_real_addr): Likewise.
10589 (pupa_linux_boot_zimage): Likewise.
10590 (pupa_linux_boot_bzimage): Likewise.
10592 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
10593 (pupa_upper_mem): Likewise.
10594 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
10595 module is too dangerous.
10597 * include/pupa/loader.h (pupa_os_area_addr): Declared.
10598 (pupa_os_area_size): Likewise.
10599 (pupa_loader_set): Remove the first argument. Loader doesn't
10600 manage modules or initrd any longer.
10601 (pupa_loader_load_module): Removed.
10603 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
10604 (linux_mod_SOURCES): New variable.
10605 (linux_mod_CFLAGS): Likewise.
10607 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
10609 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
10610 the length of a blocklist correctly.
10612 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
10613 Use ioctl only if the OS file is a block device.
10614 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
10615 not very useful for normal files.
10617 * kern/main.c (pupa_set_root_dev): New function.
10618 (pupa_load_normal_mode): Likewise.
10619 (pupa_main): Call those above.
10621 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
10624 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
10626 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10628 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
10629 (setup): Configure the installed partition information and the
10632 * loader/i386/pc/chainloader.c (my_mod): New variable.
10633 (pupa_chainloader_unload): New function.
10634 (pupa_rescue_cmd_chainloader): Refer itself.
10635 (PUPA_MOD_INIT): Save its own module in MY_MOD.
10637 * kern/i386/pc/startup.S (install_partition): Removed.
10638 (version_string): Likewise.
10639 (config_file): Likewise.
10640 (pupa_install_dos_part): New variable.
10641 (pupa_install_bsd_part): Likewise.
10642 (pupa_prefix): Likewise.
10643 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
10645 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
10647 (make_install_device): New function.
10648 (pupa_machine_init): Set the dl prefix.
10650 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
10651 (buf): Renamed to ...
10652 (linebuf): ... this.
10653 (pupa_rescue_cmd_prefix): New function.
10654 (pupa_rescue_cmd_insmod): Likewise.
10655 (pupa_rescue_cmd_rmmod): Likewise.
10656 (pupa_rescue_cmd_lsmod): Likewise.
10657 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
10660 * kern/mm.c (pupa_memalign): If failed even after invalidating
10661 disk caches, unload unneeded modules and retry.
10663 * kern/misc.c (pupa_memmove): New function.
10664 (pupa_memcpy): Removed.
10665 (pupa_strcpy): New function.
10666 (pupa_itoa): Made static.
10668 * kern/dl.c (pupa_dl_iterate): New function.
10669 (pupa_dl_ref): Likewise.
10670 (pupa_dl_unref): Likewise.
10671 (pupa_dl_unload): Return if succeeded or not.
10672 (pupa_dl_unload_unneeded): New function.
10673 (pupa_dl_unload_all): Likewise.
10674 (pupa_dl_init): Renamed to ...
10675 (pupa_dl_set_prefix): ... this.
10676 (pupa_dl_get_prefix): New function.
10678 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
10679 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
10680 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10681 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10682 (pupa_install_dos_part): Declared.
10683 (pupa_install_bsd_part): Likewise.
10684 (pupa_prefix): Likewise.
10685 (pupa_boot_drive): Likewise.
10687 * include/pupa/types.h: Fix a typo.
10689 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
10691 (pupa_memmove): Declared.
10692 (pupa_strcpy): Likewise.
10694 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
10695 pupa_mod_init takes one argument, its own module.
10696 (pupa_dl_unload_unneeded): Declared.
10697 (pupa_dl_unload_all): Likewise.
10698 (pupa_dl_ref): Likewise.
10699 (pupa_dl_unref): Likewise.
10700 (pupa_dl_iterate): Likewise.
10701 (pupa_dl_init): Renamed to ...
10702 (pupa_dl_set_prefix): ... this.
10703 (pupa_dl_get_prefix): Declared.
10705 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
10706 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
10708 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
10709 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
10711 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
10712 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
10714 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10716 * util/i386/pc/pupa-setup.c (setup): Define the internal
10717 function find_first_partition_start at the top level, because GCC
10718 3.0.x cannot compile internal functions in deeper scopes
10720 (find_root_device): Use lstat instead of stat.
10721 Don't follow symbolic links.
10722 Fix the path-constructing code.
10724 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
10725 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
10726 by a BLKGETSIZE ioctl first, because block devices don't fill
10727 the member st_mode of the structure stat on Linux.
10728 [__linux__] (linux_find_partition): Use a temporary buffer
10729 REAL_DEV for the working space. Copy it to DEV before returning.
10730 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
10731 buffer cache consistent.
10732 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
10733 strncmp. The previous value was merely wrong.
10734 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
10736 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
10737 FAT size is 12. The previous value was merely wrong.
10739 * kern/main.c (pupa_main): Don't split the starting message from
10742 * kern/term.c (pupa_putchar): Put CR after LF instead of before
10743 LF, because BIOS goes crazy about character attributes in this
10746 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10748 * include/i386/pc/util/biosdisk.h: New file.
10749 * util/i386/pc/biosdisk.c: Likewise.
10750 * util/i386/pc/pupa-setup.c: Likewise.
10752 * Makefile.in (INCLUDE_DISTFILES): Added
10753 include/pupa/i386/pc/util/biosdisk.h.
10754 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
10755 directory util/i386/pc.
10756 (install-local): Added a rule for sbin_UTILITIES.
10757 (uninstall): Likewise.
10759 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
10761 * util/misc.c (xrealloc): New function.
10762 (pupa_malloc): Likewise.
10763 (pupa_free): Likewise.
10764 (pupa_realloc): Likewise.
10765 (pupa_stop): Likewise.
10766 (pupa_putchar): Likewise.
10768 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
10770 * include/pupa/util/misc.h (xrealloc): Declared.
10772 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
10774 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
10775 (PUPA_BOOT_MACHINE_BPB_END): ... this.
10777 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
10778 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10780 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
10781 way should be implemented.
10782 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10784 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
10785 the size of NAME for safety.
10786 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
10789 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
10790 (pupa_setup_SOURCES): Likewise.
10792 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
10794 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10796 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
10797 bunch of pushl's from pusha, because this destroys the return
10800 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10802 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
10803 This means that any missing prototypes could be fatal. Also, you
10804 must take care when writing assembly code. See the comments at
10805 the beginning of startup.S, for more details.
10807 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
10808 compilation mechanism.
10809 (pupa_chainloader_real_boot): Likewise.
10810 (pupa_biosdisk_rw_int13_extensions): Likewise.
10811 (pupa_biosdisk_rw_standard): Likewise.
10812 (pupa_biosdisk_check_int13_extensions): Likewise.
10813 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
10814 (pupa_biosdisk_get_diskinfo_standard): Likewise.
10815 (pupa_get_memsize): Likewise.
10816 (pupa_get_mmap_entry): Likewise.
10817 (pupa_console_putchar): Likewise.
10818 (pupa_console_setcursor): Likewise.
10819 (pupa_getrtsecs): Use pushl instead of push.
10821 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
10822 memory instead of the stack for a mmap entry, because some
10823 BIOSes may ignore the maximum size and overflow.
10825 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
10827 * genmk.rb (PModule#rule): Compile automatically generated
10828 sources with module-specific CFLAGS as well as other sources.
10830 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10832 * configure.ac: Check ld.
10833 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
10834 respectively, before checking endianness and sizes.
10836 * Makefile.in (LD): New variable.
10838 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10840 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
10842 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10844 * Changelog: New file.