]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-06-16 Bean <bean123ch@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
d31a32a1 12008-06-16 Bean <bean123ch@gmail.com>
2
3 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre journal state.
4 (grub_ext2_read_block): Likewise.
5 (grub_ext2_read_inode): Likewise.
6 (grub_ext2_mount): Likewise.
7 (grub_ext2_close): Likewise.
8 (grub_ext3_get_journal): Removed.
9
10 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre journal state.
11 (grub_reiserfs_read_symlink): Likewise.
12 (grub_reiserfs_mount): Likewise.
13 (grub_reiserfs_open): Likewise.
14 (grub_reiserfs_read): Likewise.
15 (grub_reiserfs_close): Likewise.
16 (grub_reiserfs_get_journal): Removed.
17
18 * fs/fshelp.c (grub_fshelp_read): Removed.
19 (grub_fshelp_map_block): Likewise.
20
21 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
22 (grub_fshelp_journal): Likewise.
23 (grub_fshelp_read): Likewise.
24 (grub_fshelp_map_block): Likewise.
25
3540a760 262008-06-16 Pavel Roskin <proski@gnu.org>
27
28 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
29 floating point anymore.
30 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
31
95614c84 322008-06-15 Pavel Roskin <proski@gnu.org>
33
34 * commands/ls.c (grub_ls_list_files): Use integer calculations
35 for human readable format, avoid floating point use.
36 * kern/misc.c (grub_ftoa): Remove.
37 (grub_vsprintf): Remove floating point support.
38
50465dd6 392008-06-15 Robert Millan <rmh@aybabtu.com>
40
fe6b695a 41 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 42 devices.
43 Reported by Max Vozeler.
44
a9207284 452008-06-15 Robert Millan <rmh@aybabtu.com>
46
47 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
48 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
49 skipped later.
50 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
51 the beginning of the prefix.
52
53 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
54 It is assumed that if we have a memdisk, grub-mkimage has set
55 grub_prefix to include the "(memdisk)" drive in it.
56
a7cbd45a 572008-06-15 Robert Millan <rmh@aybabtu.com>
58
59 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
60 Initialize keyboard controller after registering the terminal, so that
61 grub_printf() can be called from grub_keyboard_controller_init().
62
21cf716a 632008-06-15 Robert Millan <rmh@aybabtu.com>
64
65 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
66 extent-btree which is written as big endian on disk.
67 Reported by Alain Greppin <al@chilibi.org>.
68
23a64d8e 692008-06-14 Robert Millan <rmh@aybabtu.com>
70
71 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
72 * util/i386/pc/grub-install.in (modules): Likewise.
73
d687651c 742008-06-13 Pavel Roskin <proski@gnu.org>
75
76 * commands/ls.c (grub_ls_list_files): Fix format warnings.
77
dfe9ddd4 782008-06-13 Bean <bean123ch@gmail.com>
79
80 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
81
82 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
83
84 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
85 to indicate sparse block.
86
16ae7781 872008-06-12 Pavel Roskin <proski@gnu.org>
88
e6d1a308 89 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
90 number, grub_fshelp_read() does it for us.
91
16ae7781 92 * fs/fshelp.c (grub_fshelp_read): New function. Implement
93 linear disk read with journal translation.
94 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
95 * include/grub/fshelp.h: Declare grub_fshelp_read().
96
40fd3a2b 972008-06-09 Pavel Roskin <proski@gnu.org>
98
99 * fs/minix.c (grub_minix_mount): Handle error reading
100 superblock.
101
f5679726 1022008-06-08 Robert Millan <rmh@aybabtu.com>
103
104 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
105 don't append the RAID prefix afterwards.
106 Reported by Clint Adams.
107
ce525529 1082008-06-08 Robert Millan <rmh@aybabtu.com>
109
110 Based on description from Pavel:
111 * kern/disk.c (grub_disk_check_range): Rename to ...
112 (grub_disk_adjust_range): ... this. Add a comment explaining the
113 tasks performed by this function.
114
ad4936a0 1152008-06-08 Robert Millan <rmh@aybabtu.com>
116
117 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
118 `num_serial' (for consistency with other variables).
119 (struct grub_ntfs_data): Add `uuid' member.
120 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
121 (grub_ntfs_uuid): New function.
122 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
123
dc20b0f9 1242008-06-07 Pavel Roskin <proski@gnu.org>
125
126 * util/biosdisk.c (open_device): Revert last change to the
127 function, it broke installation. The sector needs to be
128 different dependent on which device is opened.
129
c5e3cfba 1302008-06-06 Robert Millan <rmh@aybabtu.com>
131
132 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
133 rest of GRUB, and breakage doesn't happen if its value were modified.
134
135 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
136 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
137 a constant (same value).
138 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
139 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
140
26a1f8c4 1412008-06-06 Robert Millan <rmh@aybabtu.com>
142
143 * util/biosdisk.c (open_device): Do not modify sector offset when
144 accessing a partition. kern/disk.c already handles this for us.
145
25d6b327 1462008-06-06 Robert Millan <rmh@aybabtu.com>
147
148 * util/grub-emu.c (grub_machine_init): Move code in this function from
149 here ...
150 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
151 segfault in case grub_printf() is called).
152
153 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
154 grub_probe. Update all users not to explicitly add it again.
155 (grub_device): New variable; contains corresponding device for grubdir.
156 (fs_module, partmap_module, devabstraction_module): Pass
157 `--device ${grub_device}' to grub_probe to avoid traversing /dev
158 every time.
159
9ece62fb 1602008-06-05 Robert Millan <rmh@aybabtu.com>
161
162 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
163 is found, print it (same layout as with labels).
164
1ad36d37 1652008-06-04 Robert Millan <rmh@aybabtu.com>
166
167 * util/biosdisk.c (get_drive): Rename to ...
168 (find_grub_drive): ... this. Update all users.
169
170 (get_os_disk): Rename to ...
171 (convert_system_partition_to_system_disk): ... this. Update all users.
172
173 (find_drive): Rename to ...
174 (find_system_device): ... this. Update all users.
175
e6a30859 1762008-06-04 Robert Millan <rmh@aybabtu.com>
177
178 * util/biosdisk.c (get_os_disk): Handle IDA devices.
179 * util/grub-mkdevicemap.c (get_mmc_disk_name)
180 (make_device_map): Likewise.
181
00c108a4 1822008-06-01 Robert Millan <rmh@aybabtu.com>
183
184 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
185 before dereferencing it.
186
187 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
188 union with fat12/fat16-specific ones. Add some new fields, including
189 `num_serial' for both versions.
190 (struct grub_fat_data): Add `uuid' member.
191 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
192 names. Initialize `data->uuid' using `num_serial'.
193 (grub_fat_uuid): New function.
194 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
195
196 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
197 (grub_reiserfs_uuid): New function.
198 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
199 member.
200
201 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
202 (grub_xfs_uuid): New function.
203 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
204
1385c5bb 2052008-06-01 Robert Millan <rmh@aybabtu.com>
206
207 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
208 code that is backward compatible with pre-uuid search command.
209
c682dfd7 2102008-05-31 Robert Millan <rmh@aybabtu.com>
211
212 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
213 floppies after everything else, to ensure floppy drive isn't accessed
214 unnecessarily (patch from Bean).
215
b7db5d47 2162008-05-31 Robert Millan <rmh@aybabtu.com>
217
218 * commands/search.c (search_label, search_fs_uuid, search_file): Do
219 not print device names when we were asked to set a variable.
220
6e037aa9 2212008-05-31 Robert Millan <rmh@aybabtu.com>
222
223 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
224 using "cursor-on" and "cursor-off" commands (understood at least by
225 the Open Firmware flavour on OLPC).
226
41305bc8 2272008-05-31 Michael Gorven <michael@gorven.za.net>
228
229 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
230 on and off sequences.
231
69ba137e 2322008-05-31 Robert Millan <rmh@aybabtu.com>
233
234 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
235 * util/update-grub.in: Likewise.
236
520ae21b 2372008-05-30 Pavel Roskin <proski@gnu.org>
238
239 * util/biosdisk.c (linux_find_partition): Simplify logic and
240 make the code more universal. Keep special processing for
241 devfs, but use a simple rule for all other devices. If the
242 device ends with a number, append 'p' and the partition number.
243 Otherwise, append only the partition number.
244
5786569b 2452008-05-30 Robert Millan <rmh@aybabtu.com>
246
247 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
248 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
249 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
250 the `root' parameter to Linux.
251
51500452 2522008-05-30 Robert Millan <rmh@aybabtu.com>
253
254 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
255 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
256 --fs_uuid with --fs-uuid.
257 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
258 all filesystems support them).
259
811d3878 2602008-05-30 Robert Millan <rmh@aybabtu.com>
261
262 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
263 grub_printf() flags, since we're printing in units of 2 bytes.
264
cab63c95 2652008-05-30 Robert Millan <rmh@aybabtu.com>
266
267 * util/grub.d/00_header.in: Remove obsolete comment referencing
268 convert_system_path_to_grub_path().
269 * util/update-grub.in: Likewise.
270 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
271 (convert_system_path_to_grub_path): Add a warning message explaining
272 that this function is deprecated. Rely on is_path_readable_by_grub()
273 for the readability checks.
274 (font_path): Use is_path_readable_by_grub() for the readability
275 check rather than convert_system_path_to_grub_path().
276
972e2f7a 2772008-05-30 Robert Millan <rmh@aybabtu.com>
278
279 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
280 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
281 converting it first.
282 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
283 grub.cfg for access to font file, and afterwards call it again to set
284 the root device.
285
62191274 2862008-05-30 Robert Millan <rmh@aybabtu.com>
287
288 * commands/search.c (options): Add --fs_uuid option.
289 (search_fs_uuid): New function.
290 (grub_cmd_search): Fix --set argument passing.
291 Use search_fs_uuid() when requested via --fs_uuid.
292 (grub_search_init): Update help message.
293 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
294 and redeclare it as an array of 16-bit words.
295 (grub_ext2_uuid): New function.
296 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
297 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
298 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
299 (GRUB_DEVICE_BOOT_UUID): New variables.
300 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
301 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
302 whenever possible.
303 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
304 just assume `root' variable has the right value.
305 * util/grub.d/10_linux.in: Likewise.
306 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
307 via PRINT_FS_UUID.
308 (main): Recognise `-t fs_uuid' argument.
309
01b73ec8 3102008-05-30 Robert Millan <rmh@aybabtu.com>
311
312 * util/biosdisk.c (map): Redefine structure to hold information
313 about GRUB drive name.
fe6b695a 314 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 315 drive names.
316 (call_hook): Remove.
317 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
318 member. Assume drive has partitions.
319 (grub_util_biosdisk_open): Access device names via `.device' struct
320 member.
321 (open_device): Likewise.
322 (find_drive): Likewise.
323 (read_device_map): Adjust map[] usage to match the new struct
324 definition. Don't check for duplicates (still possible, but not cheap
325 anymore).
326 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
327 (make_device_name): Remove assumption of BIOS-like drive names.
328
22f16596 3292008-05-30 Pavel Roskin <proski@gnu.org>
330
331 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
332 compiling execute.c doesn't need grub_script.tab.h anymore.
333 (normal/command.c_DEPENDENCIES): Likewise.
334 (normal/function.c_DEPENDENCIES): Likewise.
335 * conf/i386-ieee1275.rmk: Likewise.
336 * conf/i386-linuxbios.rmk: Likewise.
337 * conf/i386-pc.rmk: Likewise.
338 * conf/powerpc-ieee1275.rmk: Likewise.
339 * conf/sparc64-ieee1275.rmk: Likewise.
340
528ad8f2 3412008-05-29 Pavel Roskin <proski@gnu.org>
342
d1dff95d 343 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
344 when scanning metadata for volume group name.
345
528ad8f2 346 * include/grub/script.h: Don't include grub_script.tab.h. It's
347 a generated file, which may only be included from the files with
348 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
349 use union YYSTYPE, as the later allows forward declaration.
350 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
351
47248e08 3522008-05-29 Robert Millan <rmh@aybabtu.com>
353
354 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
355 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
356 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
357 (grub_console_checkkey): Add grub_dprintf() call to report unknown
358 scan codes.
359
ee632529 3602008-05-29 Robert Millan <rmh@aybabtu.com>
361
362 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
363 control key combinations.
364
eee96e08 3652008-05-29 Robert Millan <rmh@aybabtu.com>
366
367 * util/powerpc/ieee1275/grub-install.in: Move from here ...
368 * util/ieee1275/grub-install.in: ... to here.
369 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
370 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
371 (grub_install_SOURCES): Likewise.
372
da9a6a94 3732008-05-29 Robert Millan <rmh@aybabtu.com>
374
375 * fs/affs.c: Update copyright year.
376 * fs/ext2.c: Likewise.
377 * fs/fshelp.c: Likewise.
378 * fs/hfsplus.c: Likewise.
379 * fs/ntfs.c: Likewise.
380 * fs/xfs.c: Likewise.
381 * include/grub/fshelp.h: Likewise.
382 * util/grub-mkdevicemap.c: Likewise.
383
12e65f3a 3842008-05-28 Robert Millan <rmh@aybabtu.com>
385
386 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
387 might need to be fatfs to support some firmware implementations
388 (e.g. OFW or EFI).
389
23023641 3902008-05-28 Robert Millan <rmh@aybabtu.com>
391
392 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
393 devices.
394 * util/grub-mkdevicemap.c (get_mmc_disk_name)
395 (make_device_map): Likewise.
396
887d2619 3972008-05-20 Bean <bean123ch@gmail.com>
398
399 * fs/fshelp.c (grub_fshelp_map_block): New function.
400 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
401 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
402
403 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
404 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
405 (grub_fshelp_journal): New structure.
406 (grub_fshelp_map_block): New function prototype.
407 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
408 (grub_fshelp_map_block): Likewise.
409
410 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
411 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
412 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
413 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
414 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
415 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
416 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
417 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
418 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
419 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
420 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
421 (grub_ext2_sblock): New members for journal support.
422 (grub_ext3_journal_header): New structure.
423 (grub_ext3_journal_revoke_header): Likewise.
424 (grub_ext3_journal_block_tag): Likewise.
425 (grub_ext3_journal_sblock): Likewise.
426 (grub_fshelp_node): New members logfile and journal.
427 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
428 grub_fshelp_map_block to get real block number.
429 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
430 number.
431 (grub_ext2_read_inode): Likewise.
432 (grub_ext3_get_journal): New function.
433 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
434 (grub_ext2_close): Release memory used by journal.
435
436 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
437 (REISERFS_MAGIC_DESC_BLOCK): New macro.
438 (grub_reiserfs_transaction_header): Renamed to
439 grub_reiserfs_description_block, replace field data with real_blocks.
440 (grub_reiserfs_commit_block): New structure.
441 (grub_reiserfs_data): New member journal.
442 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
443 number.
444 (grub_reiserfs_read_symlink): Likewise.
445 (grub_reiserfs_iterate_dir): Likewise.
446 (grub_reiserfs_open): Likewise.
447 (grub_reiserfs_read): Likewise.
448 (grub_reiserfs_get_journal): New function.
449 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
450 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
451 using grub_reiserfs_get_journal.
452 (grub_reiserfs_close): Release memory used by journal.
453
454 * fs/affs.c (grub_affs_read_block): Change block type to
455 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
456
457 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
458
459 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
460
461 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
462
463 * fs/udf.c (grub_udf_read_block): Change block type to
464 grub_disk_addr_t. Use type cast to avoid warning.
465
466 * fs/xfs.c (grub_xfs_read_block): Likewise.
467
b7c6bed5 4682008-05-16 Christian Franke <franke@computer.org>
469
470 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
471 to ensure that break with ESC will always work.
472 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
473 Remove ESC from keyboard queue.
474
eedf167f 4752008-05-16 Christian Franke <franke@computer.org>
476
477 * util/biosdisk.c: [__CYGWIN__] Add includes.
478 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
479 (get_os_disk): Move variable declarations to OS specific
480 parts to avoid warning.
481 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
482 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
483 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
484 Cygwin.
485 * util/getroot.c: [__CYGWIN__] Add includes.
486 (strip_extra_slashes): Fix "/" case.
487 [__CYGWIN__] (get_win32_path): New function.
488 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
489 [__CYGWIN__] (find_root_device): Disable.
490 [__CYGWIN__] (get_bootsec_serial): New function.
491 [__CYGWIN__] (find_cygwin_root_device): Likewise.
492 [__linux__] (grub_guess_root_device): Add early returns to simplify
493 structure.
494 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
495 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
496 check for Linux only.
497
a079699e 4982008-05-15 Bean <bean123ch@gmail.com>
499
500 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
501 keyboard hang problem in apple's intel mac.
502
1cf4059a 5032008-05-09 Robert Millan <rmh@aybabtu.com>
504
505 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
506 devices.
507 * util/grub-mkdevicemap.c (get_virtio_disk_name)
508 (make_device_map): Likewise.
509 Reported by Aurelien Jarno <aurel32@debian.org>
510
ed759390 5112008-05-07 Ian Campbell <ijc@hellion.org.uk>
512
513 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
514 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
515 (make_device_map): Output entries for xvd type disks.
516
b56c4eaa 5172008-05-07 Robert Millan <rmh@aybabtu.com>
518
519 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
520 devices.
521 * util/grub-mkdevicemap.c (get_cciss_disk_name)
522 (make_device_map): Likewise.
523 Reported by Roland Dreier <rdreier@cisco.com>
524
7f8866ed 5252008-05-07 Robert Millan <rmh@aybabtu.com>
526
527 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
528 grub_strstr() call. Correct a few mistakes in failure path handling.
529
b0346e0f 5302008-05-06 Robert Millan <rmh@aybabtu.com>
531
532 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
533 Do not print a trailing slash (therefore, the root directory is an
534 empty string).
535 (convert_system_path_to_grub_path): Do not remove trailing slash
536 from make_system_path_relative_to_its_root() output.
537
538 * util/i386/pc/grub-install.in: Add trailing slash to output from
539 make_system_path_relative_to_its_root().
540
6cf12cbd 5412008-05-06 Robert Millan <rmh@aybabtu.com>
542
543 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
544 ensures that output lines aren't intermangled with those sent to
545 stderr (via grub_util_info()).
546 * util/grub-probe.c (grub_refresh): Likewise.
547 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
548
0fbb3117 5492008-05-05 Christian Franke <franke@computer.org>
550
551 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
552 Add Cygwin device names.
553 (get_ide_disk_name) [__CYGWIN__]: Likewise.
554 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
555 (check_device): Return error instead of success on empty name.
556 (make_device_map): Move label inside linux specific code to
557 prevent compiler warning.
558
8124cdb7 5592008-04-30 Robert Millan <rmh@aybabtu.com>
560
561 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
562 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
563 first boot option.
564 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
565
094c01d0 5662008-04-29 Robert Millan <rmh@aybabtu.com>
567
568 * docs/grub.cfg: New file (example GRUB configuration).
569
f4b1fc02 5702008-04-26 Robert Millan <rmh@aybabtu.com>
571
329ce2a5 572 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
573 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
574 and `disk/ieee1275/nand.c'.
f4b1fc02 575
25f16ec1 5762008-04-25 Bean <bean123ch@gmail.com>
577
578 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
579 i386-linuxbios.
580
581 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
582 change the buffer size to 4096 for cdrom device.
583
584 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
585 and nand.mod.
586 (_linux_mod_SOURCES): New variable.
587 (_linux_mod_CFLAGS): Likewise.
588 (_linux_mod_LDFLAGS): Likewise.
589 (linux_mod_SOURCES): Likewise.
590 (linux_mod_CFLAGS): Likewise.
591 (linux_mod_LDFLAGS): Likewise.
592 (nand_mod_SOURCES): Likewise.
593 (nand_mod_CFLAGS): Likewise.
594 (nand_mod_LDFLAGS): Likewise.
595
596 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
597 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
598 type property. (nand device in olpc don't have this property)
599
600 * include/grub/disk.h (grub_disk_dev_id): New macro
601 GRUB_DISK_DEVICE_NAND_ID.
602
603 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
604 function prototype.
605 (grub_rescue_cmd_initrd): Likewise.
606
607 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
608 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
609 ofw_cif_handler and ofw_idt, adjust padding number.
610
611 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
612 GRUB_MACHINE_IEEE1275 is defined.
613
614 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
615 Use NESTED_FUNC_ATTR attribute on the hook parameter.
616
617 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
618 on nested function heap_init.
619 (grub_upper_mem): New variable for i386-ieee1275.
620 (grub_get_extended_memory): New function for i386-ieee1275.
621 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
622
623 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
624 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
625 property.
626
627 * loader/i386/ieee1275/linux.c: New file.
628
629 * loader/i386/ieee1275/linux_normal.c: New file.
630
631 * disk/ieee1275/nand.c: New file.
632
e89d61e9 6332008-04-18 Thomas Schwinge <tschwinge@gnu.org>
634
635 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
636 value.
637 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
638
602566f6 6392008-04-18 Robert Millan <rmh@aybabtu.com>
640
641 Restructures early code path on ieee1275 to unify grub_main() as
642 the first C function that is executed in every platform.
643
644 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
645 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
646 cmain().
647 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
648 * kern/ieee1275/cmain.c (cmain): Rename to ...
649 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
650 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
651 at the beginning.
652
57490c2b 6532008-04-18 Robert Millan <rmh@aybabtu.com>
654
655 * util/update-grub.in: Fix syntax error when setting
656 `GRUB_PRELOAD_MODULES'.
657 Reported by Stephane Chazelas <stephane@artesyncp.com>
658
1977517d 6592008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
660
661 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
662 section into account, newer toolchains generate unique build ids
663 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 664 we want build ids to be preserved
1977517d 665 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
666 far from other sections don't cause the raw binary images grow
667 size
668
bfb1f1a2 6692008-04-15 Robert Millan <rmh@aybabtu.com>
670
671 * disk/lvm.c: Update copyright year.
672 * kern/misc.c: Likewise.
673
01979850 6742008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
675
676 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
677 there is no memory left for physical volume name.
678
0a1150e2 6792008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
680
681 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
682 volume name mapping to support bigger than 9 character names properly.
683
82ead3fe 6842008-04-13 Robert Millan <rmh@aybabtu.com>
685
686 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
687 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
688
e54a72f5 6892008-04-13 Christian Franke <franke@computer.org>
690
691 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
692 to create a floppy emulation boot CD when non emulation mode
693 does not work.
694 Enable Joliet CD filesystem extension.
695
9fe86034 6962008-04-13 Robert Millan <rmh@aybabtu.com>
697
698 * kern/misc.c (grub_strncat): Fix off-by-one error.
699 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
700
701 * kern/env.c (grub_env_context_close): Clear current context, not
702 previous one.
703 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
704
705 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
706
7ceeee39 7072008-04-13 Robert Millan <rmh@aybabtu.com>
708
709 Improve robustness when handling LVM.
710
711 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
712 (and leave `*p' unmodified).
713 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
714 through it.
715 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
716 iterating through it.
717 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
718 through it.
fe6b695a 719 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 720 when due) on each grub_lvm_getvalue() or grub_strstr() call.
721 Don't assume `vg->pvs != NULL' when iterating through it.
722
58cd3d85 7232008-04-13 Robert Millan <rmh@aybabtu.com>
724
725 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
726 * genmk.rb (partmap): New variable.
727 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
728 (#{partmap}): New target rule.
729 * genpartmaplist.sh: New file.
730 * Makefile.in (pkglib_DATA): Add partmap.lst.
731 (partmap.lst): New target rule.
732 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
733 modules (including all partition maps), instead of preloading them.
734
78b51059 7352007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
736
737 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
738 `linux-boot-prober' (if installed) to detect other operating
739 systems which are installed on the computer and add them to
740 the boot menu.
741 * conf/common.rmk: Build and install 30_os-prober.
742
a91627b4 7432008-04-12 Robert Millan <rmh@aybabtu.com>
744
745 * kern/powerpc/ieee1275/init.c: Move from here ...
746 * kern/ieee1275/init.c: ... to here. Update all users.
747
748 * kern/powerpc/ieee1275/cmain.c: Move from here ...
749 * kern/ieee1275/cmain.c: ... to here. Update all users.
750
751 * kern/powerpc/ieee1275/openfw.c: Move from here ...
752 * kern/ieee1275/openfw.c: ... to here. Update all users.
753
754 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
755 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
756
322562ea 7572008-04-10 Pavel Roskin <proski@gnu.org>
758
759 * configure.ac: Always use "_cv_" in cache variables for
760 compatibility with Autoconf 2.62.
761
a02a73c5 7622008-04-07 Robert Millan <rmh@aybabtu.com>
763
764 Revert grub/machine/init.h addition by Pavel (since it breaks on
765 i386-ieee1275 and others):
766 * util/i386/pc/misc.c: Remove grub/machine/init.h.
767 * util/powerpc/ieee1275/misc.c: Likewise.
768
25c024b1 7692008-04-07 Robert Millan <rmh@aybabtu.com>
770
771 * util/grub-probe.c (probe): Improve error message.
772
3cbd2f98 7732008-04-07 Robert Millan <rmh@aybabtu.com>
774
775 * util/biosdisk.c (read_device_map): Skip devices that don't exist
776 (this prevents the presence of a bogus entry from ruining the whole
777 thing).
778
87a297bf 7792008-04-06 Pavel Roskin <proski@gnu.org>
780
36747a62 781 * util/biosdisk.c: Include grub/util/biosdisk.h.
782 * util/grub-fstest.c (execute_command): Make static.
783 * util/grub-mkdevicemap.c (check_device): Likewise.
784 * util/i386/pc/misc.c: Include grub/machine/init.h.
785 * util/powerpc/ieee1275/misc.c: Likewise.
786 * util/lvm.c: Include grub/util/lvm.h.
787 * util/misc.c: Include grub/kernel.h, grub/misc.h and
788 grub/cache.h.
789 * util/raid.c: Include grub/util/raid.h.
790 (grub_util_getdiskname): Make static.
791
87a297bf 792 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
793 grub_hostfs_fini(), as they are called from grub_init_all() and
794 grub_fini_all() respectively. This fixes an infinite loop in
795 grub-fstest due to double registration of hostfs.
796 Reported by Christian Franke <Christian.Franke@t-online.de>
797
f6ce7629 7982008-04-05 Pavel Roskin <proski@gnu.org>
799
800 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
801 all 8 functions. Otherwise, probe function 0 only.
802
070e49e4 8032008-04-04 Pavel Roskin <proski@gnu.org>
804
8b088a4c 805 * commands/lspci.c (grub_lspci_iter): Print the bus number
806 correctly.
807
4f657021 808 * commands/lspci.c (grub_pci_classes): Fix typos.
809 (grub_lspci_iter): Don't print func twice. Print vendor ID
810 before device ID, as it's normally done.
811
070e49e4 812 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
813 Fix signedness warnings.
814 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
815 Likewise.
816 * util/ieee1275/get_disk_name.c: Include config.h so that
817 _GNU_SOURCE is defined and getline() is declared. Mark an
818 unused argument as such. Fix a signedness warning.
819
ba7328dc 8202008-04-02 Pavel Roskin <proski@gnu.org>
821
26887f22 822 * genkernsyms.sh.in: Use more robust assignments for CC and
823 srcdir. Quote srcdir.
824 * gensymlist.sh.in: Likewise. Assert at the compile time that
825 the symbol table is not empty.
826
ba7328dc 827 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
828 * fs/cpio.c (grub_cpio_read): Likewise.
829
0f582c6b 8302008-04-01 Pavel Roskin <proski@gnu.org>
831
4b6e1995 832 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
833 * disk/host.c (grub_host_open): Likewise.
834 * disk/loopback.c (grub_loopback_open): Likewise.
835 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
836 disk->id as in disk/host.c, not a multi-character constant.
837
828a2768 838 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
839 later is obsolete, potentially dangerous and sets a bad example.
840 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
841 * util/misc.c (grub_util_get_image_size): Likewise.
842
2bb4fb47 843 * disk/loopback.c (options): Improve help for "--partitions".
844
0f582c6b 845 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
846 options to align them with the short options, e.g. "echo -e".
847
a33224e0 8482008-03-31 Bean <bean123ch@gmail.com>
849
850 * video/reader/png.c (grub_png_data): New member is_16bit and
851 image_data.
852 (grub_png_decode_image_header): Detect 16 bit png image.
853 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
854 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
855 (grub_video_reader_png): Release memory occupied by image_data.
856
857 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
858 4096 bytes.
859 (grub_nfs_mount): Skip the test for sector per cluster.
860
861 * include/grub/ntfs.h (MAX_SPC): Removed.
862
86cb4f54 8632008-03-31 Bean <bean123ch@gmail.com>
864
865 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
866 (grub_probe_SOURCES): Add fs/afs.c.
867 (grub_fstest_SOURCES): Likewise.
868 (afs_mod_SOURCES): New variable.
869 (afs_mod_CFLAGS): Likewise.
870 (afs_mod_LDFLAGS): Likewise.
871
872 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
873 (grub_emu_SOURCES): Likewise.
874
875 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
876
877 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
878
879 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
880
881 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
882
883 * fs/afs.c: New file.
884
17c74c21 8852008-03-30 Pavel Roskin <proski@gnu.org>
886
4cb68e89 887 * disk/host.c: Include grub/misc.h to fix a warning.
888 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
889 warnings about implicit declarations.
890
8790bb04 891 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
892 variable.
893 * include/grub/i386/loader.h: Change declaration of
894 grub_linux_boot() to match what grub_loader_set() expects.
895 * util/getroot.c (grub_guess_root_device): Return const char* to
896 fix a warning.
897 * util/grub-probe.c (probe): Fix a warning about uninitialized
898 abstraction_name variable.
899 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
900 second argument as unused to fix a warning.
901
9a3f3296 902 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
903 missing grub_error() call.
904
0ecef90d 905 * util/update-grub_lib.in: Define datarootdir, since Autoconf
906 2.60 and newer uses it to define datadir.
907
0bf6d401 908 * commands/sleep.c: Fix warning about implicit declaration.
909 * disk/memdisk.c: Likewise.
910 * loader/aout.c: Likewise.
911 * loader/i386/bsd_normal.c: Likewise.
912 * util/grub-probe.c: Likewise.
913
7cdacf97 914 * commands/i386/cpuid.c (has_longmode): Make static.
915 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
916 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
917
17c74c21 918 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
919 GDT. This is more robust, as %ds can change.
920 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
921 calling real_to_prot().
922 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
923
80a3e68b 9242008-03-28 Pavel Roskin <proski@gnu.org>
925
926 * kern/i386/pc/startup.S: Assert that uncompressed functions
927 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
928 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
929 code, as they push parts of the code (error handlers) beyond
930 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
931 code as correctness and size.
932
77bcd272 9332008-03-28 Pavel Roskin <proski@gnu.org>
934
935 * kern/i386/pc/startup.S
936 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
937 data block address to the real mode, keep offset minimal. This
938 works around a bug in AWARD BIOS on old Athlon systems, which
939 makes CD detection hang.
940
c5dfd43b 9412008-03-26 Pavel Roskin <proski@gnu.org>
942
943 * normal/color.c (grub_parse_color_name_pair): Make `name' a
944 const.
945 * include/grub/normal.h: Add grub_parse_color_name_pair()
946 declaration.
947
bf962df2 9482008-03-24 Bean <bean123ch@gmail.com>
949
950 * disk/i386/pc/biosdisk.c (cd_start): Removed.
951 (cd_count): Removed.
952 (cd_drive): New variable.
953 (grub_biosdisk_get_drive): Don't check for (cdN) device.
954 (grub_biosdisk_call_hook): Likewise.
955 (grub_biosdisk_iterate): Change cdrom detection method.
956 (grub_biosdisk_open): Replace cd_start with cd_drive.
957 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
958 detect cdrom device.
959
960 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
961 Removed.
962 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
963 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
964 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
965 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
966 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
967 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
968 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
969 (grub_biosdisk_cdrp): New structure.
970 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
971
972 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
973
974 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
975 device.
976
977 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
978 New function.
979
68e7fc7a 9802008-03-20 Robert Millan <rmh@aybabtu.com>
981
982 Remove 2 TiB limit in ata.mod.
983 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
984 (grub_ata_dumpinfo): Print sector count with 0x%llx.
985 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
986 grub_uint64_t instead of grub_uint32_t.
987
38ad2cf5 9882008-03-05 Bean <bean123ch@gmail.com>
989
990 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
991 (grub_multiboot): Set boot device.
992
993 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
994
2b89344e 9952008-03-02 Bean <bean123ch@gmail.com>
996
997 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
998 symlink_buffer.
999
87a95d1f 10002008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
1001
1002 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
1003 texinfo.tex.
1004
1005 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
1006 modified.
1007
1008 * docs/fdl.texi: New file.
1009
1010 * docs/mdate-sh: New file. Copied from gnulib.
1011 * docs/texinfo.tex: Likewise.
1012
1013 * config.guess: Updated from gnulib.
1014 * install-sh: Likewise.
1015
7dc15d8e 10162008-02-28 Robert Millan <rmh@aybabtu.com>
1017
1018 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
1019 (aout_mod_SOURCES): New variable.
1020 (aout_mod_CFLAGS): Likewise.
1021 (aout_mod_LDFLAGS): Likewise.
1022
1023 * conf/i386-ieee1275.rmk: Likewise.
1024
b00ab696 10252008-02-28 Robert Millan <rmh@aybabtu.com>
1026
1027 * util/update-grub.in: Reorganise terminal validity check. Accept
1028 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
1029 Based on suggestion by Franklin PIAT.
1030
79ca2d78 10312008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
1032
1033 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
1034 function.
1035 * util/getroot.c (grub_util_check_block_device): New function that
1036 returns the given argument if it is a block device and returns NULL else.
1037 * util/grub-probe.c (argument_is_device): New variable.
1038 (probe): Promote device_name from a variable to an argument. Receive
1039 device_name from grub_util_check_block_device() if path is NULL and from
1040 grub_guess_root_device() else. Do not free() device_name anymore.
1041 (options): Introduce new parameter '-d, --device'.
1042 (main): Add description of the new parameter to the help screen.
1043 Rename path variable to argument. Set argument_is_device if the '-d'
1044 option is given. Pass argument to probe() depending on
1045 argument_is_device.
1046
0d16e571 10472008-02-24 Bean <bean123ch@gmail.com>
1048
1049 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
1050 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
1051 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
1052 (GRUB_ISO9660_VOLDESC_PART): Likewise.
1053 (GRUB_ISO9660_VOLDESC_END): Likewise.
1054 (grub_iso9660_primary_voldesc): New member escape.
1055 (grub_iso9660_data): New member joliet.
1056 (grub_iso9660_convert_string): New function.
1057 (grub_iso9660_mount): Detect joliet extension.
1058 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
1059 (grub_iso9660_iso9660_label): Likewise.
1060
1061 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
1062 (grub_setup_SOURCES): Add fs/udf.c.
1063 (grub_fstest_SOURCES): Likewise.
1064 (udf_mod_SOURCES): New variable.
1065 (udf_mod_CFLAGS): Likewise.
1066 (udf_mod_LDFLAGS): Likewise.
1067
1068 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
1069 (grub_emu_SOURCES): Likewise.
1070
1071 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1072
1073 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1074
1075 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1076
1077 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1078
1079 * fs/udf.c: New file.
1080
8a594a17 10812008-02-24 Robert Millan <rmh@aybabtu.com>
1082
1083 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
1084 (normal/lexer.c_DEPENDENCIES): New variables.
1085 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1086 (normal/lexer.c_DEPENDENCIES): Likewise.
1087 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
1088 (normal/lexer.c_DEPENDENCIES): Likewise.
1089 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
1090 (normal/lexer.c_DEPENDENCIES): Likewise.
1091 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1092 (normal/lexer.c_DEPENDENCIES): Likewise.
1093 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1094 (normal/lexer.c_DEPENDENCIES): Likewise.
1095
2dc33c03 10962008-02-23 Robert Millan <rmh@aybabtu.com>
1097
1098 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
1099 since they were intended to be in hex. This didn't break previously
1100 because of a bug in gpt_partition_map_iterate() (see below).
1101
1102 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
1103 when checking the validity of GPT header.
1104 Remove `partno', since it always provides the same information as `i'.
1105
f6f4cfb0 11062008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
1107
1108 * include/grub/efi/time.h: Fix a wrong comment.
1109
79ff665f 11102008-02-19 Pavel Roskin <proski@gnu.org>
1111
1112 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
1113 message.
1114
d38e24c2 11152008-02-19 Bean <bean123ch@gmail.com>
1116
1117 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
1118 (aout_mod_SOURCES): New variable.
1119 (aout_mod_CFLAGS): Likewise.
1120 (aout_mod_LDFLAGS): Likewise.
1121 (_bsd_mod_SOURCES): New variable.
1122 (_bsd_mod_CFLAGS): Likewise.
1123 (_bsd_mod_LDFLAGS): Likewise.
1124 (bsd_mod_SOURCES): New variable.
1125 (bsd_mod_CFLAGS): Likewise.
1126 (bsd_mod_LDFLAGS): Likewise.
1127
1128 * include/grub/aout.h: New file.
1129
1130 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
1131
1132 * include/grub/i386/bsd.h: New file.
1133
1134 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
1135 to make it public.
1136
1137 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
1138 function is called, so that it's possible to change it inside the hook.
1139 (grub_elf64_load): Likewise.
1140 (grub_elf_file): Don't close the file if elf header is not found.
1141 (grub_elf_close): Close the file if grub_elf_file fails (The new
1142 grub_elf_file won't close it).
1143 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
1144 (grub_elf64_size): Likewise.
1145
1146 * kern/i386/loader.S (grub_unix_real_boot): New function.
1147
1148 * loader/aout.c: New file.
1149
1150 * loader/i386/bsd.c: New file.
1151
1152 * loader/i386/bsd_normal.c: New file.
1153
1154 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
1155
1156 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
1157 can test othe formats.
1158
b93bdb0f 11592008-02-19 Robert Millan <rmh@aybabtu.com>
1160
1161 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
1162 (grub_gpt_partition_type_empty): Redefine with macro from
1163 `<grub/gpt_partition.h>'.
1164 (gpt_partition_map_iterate): Adjust partition type comparison.
1165
1166 Export `entry' as partmap-specific `part.data' struct.
1167 (grub_gpt_header, grub_gpt_partentry): Move from here ...
1168
1169 * include/grub/gpt_partition.h (grub_gpt_header)
1170 (grub_gpt_partentry): ... to here (new file).
1171
1172 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
1173
1174 (grub_gpt_partition_type_bios_boot): New const variable, defined
1175 with macro from `<grub/gpt_partition.h>'.
1176
1177 (setup): Replace `first_start' with `embed_region', which keeps
1178 track of the embed region (and is partmap-agnostic).
1179
1180 Replace find_first_partition_start() with find_usable_region(),
1181 which finds a usable region for embedding using partmap-specific
1182 knowledge (supports PC/MSDOS and GPT).
1183
1184 Fix all assumptions that the embed region start at sector 1, using
1185 `embed_region.start' from now on. Similarly, use `embed_region.end'
1186 rather than `first_start' to calculate available size.
1187
1188 In grub_util_info() message, replace "into after the MBR" with an
1189 indication of the specific sector our embed region starts at.
1190
66cb40f6 11912008-02-19 Robert Millan <rmh@aybabtu.com>
1192
1193 * DISTLIST: Replace `commands/ieee1275/halt.c' and
1194 `commands/ieee1275/reboot.c' with `commands/halt.c' and
1195 `commands/reboot.c'.
1196 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1197 (halt_mod_SOURCES): Likewise.
1198 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1199 (halt_mod_SOURCES): Likewise.
1200
b7202015 12012008-02-17 Christian Franke <franke@computer.org>
1202
1203 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
1204
32b0fc49 12052008-02-17 Robert Millan <rmh@aybabtu.com>
1206
1207 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1208 set `first_start' to 0 for non-PC/MSDOS partition maps.
1209
aca63502 12102008-02-16 Robert Millan <rmh@aybabtu.com>
1211
1212 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1213 do not assume partition map is PC/MSDOS before performing checks that
1214 are specific to that layout.
1215
0de8be86 12162008-02-13 Robert Millan <rmh@aybabtu.com>
1217
1218 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
1219 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
1220 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
1221
c3db8364 12222008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
1223
1224 * configure.ac: Only a cosmetic change on the handling of
1225 -fno-stack-protector.
1226
f714229e 12272008-02-12 Alexandre Boeglin <alex@boeglin.org>
1228
c3db8364 1229 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
1230 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
1231 reboot.c.
f714229e 1232 (grub_install_SOURCES): Add halt.mod and reboot.mod.
1233 (halt_mod_SOURCES): New variable.
1234 (halt_mod_CFLAGS): Likewise.
1235 (halt_mod_LDFLAGS): Likewise.
1236 (reboot_mod_SOURCES): Likewise.
1237 (reboot_mod_CFLAGS): Likewise.
1238 (reboot_mod_LDFLAGS): Likewise.
1239
c3db8364 1240 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
1241 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
1242 reboot.c.
f714229e 1243 (halt_mod_SOURCES): Likewise.
1244 (reboot_mod_SOURCES): Likewise.
1245
c3db8364 1246 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
1247 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 1248 (reboot_mod_SOURCES): Likewise.
1249
1250 * commands/i386/pc/reboot.c: merge this file ...
1251
1252 * commands/ieee1275/reboot.c: ... and this file ...
1253
1254 * commands/reboot.c: ... to this file.
c3db8364 1255 Add some precompiler directive to include the correct header for
1256 each machine.
f714229e 1257
1258 * commands/ieee1275/halt.c: move this file ...
1259
1260 * commands/halt.c: ... to here.
c3db8364 1261 Add some precompiler directive to include the correct header for
1262 each machine.
f714229e 1263
1264 * include/grub/efi/efi.h (grub_reboot): New function declaration.
1265 (grub_halt): Likewise.
1266
1267 * kern/efi/efi.c (grub_reboot): New function.
1268 (grub_halt): Likewise.
1269
c74493e0 12702008-02-12 Robert Millan <rmh@aybabtu.com>
1271
1272 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
1273 /dev (like it is done for /dev/mapper). This doesn't provide support
1274 for EVMS, but at least it is now easy to identify the problem when it
1275 arises.
1276
d0db4b04 12772008-02-11 Robert Millan <rmh@aybabtu.com>
1278
1279 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
1280 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
1281 comparing it with -1, not 0.
1282
bf748642 12832008-02-10 Robert Millan <rmh@aybabtu.com>
1284
1285 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
1286 `disk/lvm.c'.
1287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1288 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
1289
1290 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
1291 `disk/lvm.c' to the end of the list.
1292 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1293 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1294
b5db202a 12952008-02-10 Robert Millan <rmh@aybabtu.com>
1296
1297 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
1298 grub_print_error() instead. This will let user know why we're entering
1299 rescue mode.
1300 Based on suggestions from Sam Morris.
1301
83abee31 13022008-02-10 Alexandre Boeglin <alex@boeglin.org>
1303
1304 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
1305 on remaining N args, instead of "--" arg N times.
1306
78d5a08b 13072008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
1308
1309 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
1310 (fill_with_default_glyph): Changed to use unknown_glyph for fill
1311 pattern for unknown glyphs.
1312
68807e5f 13132008-02-09 Robert Millan <rmh@aybabtu.com>
1314
1315 * configure.ac: Probe for `help2man'.
1316 * Makefile.in (builddir): New variable.
1317 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
1318 or otherwise add a few flags/options to it.
1319 (install-local): For every executable utility or script that is
1320 installed, invoke $(HELP2MAN) to install a manpage based on --help
1321 output.
1322
1323 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
1324 that it doesn't prevent --help from working in build tree.
1325
1326 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
1327 with `bug-grub@gnu.org'.
1328 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
1329 * util/update-grub.in (usage): New function.
1330 Implement proper argument check, with support for --help and --version
1331 (as well as existing -y).
1332
13332008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 1334
1335 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
1336 avoid overwriting previous output.
1337 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
1338
c1962162 13392008-02-09 Robert Millan <rmh@aybabtu.com>
1340
1341 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
1342 drawing the menu.
1343
3dac2e3f 13442008-02-09 Robert Millan <rmh@aybabtu.com>
1345
1346 * commands/sleep.c: New file.
1347 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
1348 (sleep_mod_SOURCES): New variable.
1349 (sleep_mod_CFLAGS): Likewise.
1350 (sleep_mod_LDFLAGS): Likewise.
1351
7a634e08 13522008-02-09 Robert Millan <rmh@aybabtu.com>
1353
1354 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
1355 situations in which we can deduce the RAID size and the superblock
1356 doesn't match it.
1357
b92f0c18 13582008-02-09 Robert Millan <rmh@aybabtu.com>
1359
1360 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
1361 and return a grub_diskmemberlist_t composed of LVM physical volumes.
1362 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
1363
1364 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
1365 and return a grub_diskmemberlist_t composed of physical array members.
1366 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
1367
1368 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
1369 prototype.
1370 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
1371 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
1372 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
1373
1374 * util/grub-probe.c (probe): Move partmap probing code from here ...
1375 (probe_partmap): ... to here.
1376 (probe): Use probe_partmap() once for the disk we're probing, and
1377 additionally, when such disk contains a memberlist() struct member,
1378 once for each disk that is contained in the structure returned by
1379 memberlist().
1380
91a4bf68 13812008-02-09 Robert Millan <rmh@aybabtu.com>
1382
1383 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
1384 environment variable to 'all' in order to obtain debug output from
1385 non-util/ code.
1386 * util/i386/pc/grub-setup.c (main): Likewise.
1387
a96f9caa 13882008-02-08 Robert Millan <rmh@aybabtu.com>
1389
1390 * disk/raid.c (grub_raid_scan_device): Check for
1391 `array->device[sb.this_disk.number]' rather than for
1392 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 1393 guaranteed to be accessible.
a96f9caa 1394
b37a9222 13952008-02-08 Robert Millan <rmh@aybabtu.com>
1396
1397 * disk/raid.c: Update copyright.
1398 * fs/cpio.c: Likewise.
1399 * include/grub/raid.h: Likewise.
1400 * loader/i386/pc/multiboot.c: Likewise.
1401 * util/hostfs.c: Likewise.
1402
5626aee1 14032008-02-08 Robert Millan <rmh@aybabtu.com>
1404
1405 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
1406 to a grub_disk_t array.
1407 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
1408 `device[x]'.
1409 (grub_raid_scan_device): Replace `device[x].name' accesses with
1410 `device[x]->name'. Simplify initialization of `array->device[x]'.
1411
554f0187 14122008-02-08 Robert Millan <rmh@aybabtu.com>
1413
1414 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
1415 grub_dprintf() calls.
1416 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
1417 error message.
1418
1ec8425d 14192008-02-07 Christian Franke <franke@computer.org>
1420
1421 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
1422 instead of fseek and ftell to support large files.
1423 (grub_hostfs_read): Likewise.
1424
f2156fda 14252008-02-07 Robert Millan <rmh@aybabtu.com>
1426
1427 Patch from Jeroen Dekkers.
1428 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 1429 failure, since successfully reading all array members might not be
f2156fda 1430 required.
1431
9216e0e7 14322008-02-06 Robert Millan <rmh@aybabtu.com>
1433
1434 * util/grub-probe.c (probe): Simplify partmap probing (with the
1435 assumption that the first word up to the underscore equals to
1436 the module name).
1437
b0dfd29a 14382008-02-06 Christian Franke <franke@computer.org>
1439
1440 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
1441 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
1442 last block of a cpio or tar stream.
1443 Check for "TRAILER!!!" instead of any empty data
1444 block to detect last block of a cpio stream.
1445 (grub_cpio_dir): Fix constness of variable np.
1446 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
1447 cpio or tar trailer is detected. This fixes a crash
1448 on open of a non existing file.
1449
c32865bf 14502008-02-05 Bean <bean123ch@gmail.com>
1451
1452 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
1453 address of entry.
1454 (grub_multiboot_load_elf64): Likewise.
1455 (grub_multiboot): Initialize mbi structure.
1456
1457 * util/grub-fstest.c: Don't include unused header file script.h.
1458
fe6b695a 1459 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 1460 of file.
1461 (grub_fstest_SOURCES): Likewise.
1462
409480b7 14632008-02-05 Robert Millan <rmh@aybabtu.com>
1464
1465 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
1466 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
1467 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
1468 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
1469
1470 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
1471 (translation_table): Replace hardcoded values with macros
1472 provided by `<grub/term.h>'.
1473
1474 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
1475 (keyboard_map): Correct/add a few values, with macros provided
1476 by `<grub/term.h>'.
1477 (keyboard_map_shift): Zero values that don't differ from their
1478 `keyboard_map' equivalents.
1479 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
1480 Discard the second scan code that is always sent by Caps lock.
1481 Only use `keyboard_map_shift' when it provides a non-zero value,
1482 otherwise fallback to `keyboard_map'.
1483
99fadbaa 14842008-02-04 Bean <bean123ch@gmail.com>
1485
1486 * Makefile.in (enable_grub_fstest): New variable.
1487
1488 * conf/common.rmk (grub_fstest_init.lst): New rule.
1489 (grub_fstest_init.h): Likewise.
1490 (grub_fstest_init.c): Likewise.
1491 (util/grub-fstest.c_DEPENDENCIES): New variable.
1492 (grub_fstest_SOURCES): Likewise.
1493
1494 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
1495
1496 * util/grub-fstest.c: New file.
1497
bf567c50 14982008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1499
1500 Make grub-setup handle a separate root device.
1501
1502 * util/i386/pc/grub-setup.c (setup): Always open the root device,
1503 so that the root device can be compared with the destination
1504 device.
1505 When embedding the core image, if the root and destination devices
1506 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
1507 0xFF.
1508 When not embedding, set ROOT_DRIVE to 0xFF.
1509
9be6b98b 15102008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1511
1512 Add support for having a grub directory in a different drive. This
1513 is still only the data handling part.
1514
1515 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
1516 (codestart): Save %dh in GRUB_ROOT_DRIVE.
1517 (grub_root_drive): New variable.
1518
1519 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
1520 instead of GRUB_BOOT_DRIVE to construct a device name. Set
1521 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
1522 as it was.
1523
1524 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
1525
1526 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
1527 macro.
1528 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
1529
1530 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
1531 is bogus, because PXE booting does not specify any drive
1532 correctly.
1533
1534 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
1535 am not sure if this is really correct.
1536
1537 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
1538 is always identical to the boot drive when booting from a CD.
1539
1540 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
1541 longer.
1542 (root_drive): New variable.
1543 (real_start): Unconditionally set %dh to ROOT_DRIVE.
1544 (setup_sectors): Push %dx right after popping it, because %dh will
1545 be modified later.
1546 (copy_buffer): Restore %dx.
1547
e0ca0677 15482008-02-03 Robert Millan <rmh@aybabtu.com>
1549
1550 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
1551 use `cdboot.img' for cdrom images.
1552
3b3f6629 15532008-02-03 Robert Millan <rmh@aybabtu.com>
1554
1555 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
1556 only setup gfxterm when `font' command has succeeded.
1557
d42b3672 15582008-02-03 Robert Millan <rmh@aybabtu.com>
1559
1560 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
1561 (grub_rescue_cmd_multiboot_loader)
1562 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
1563
fa370ea6 15642008-02-03 Pavel Roskin <proski@gnu.org>
1565
e0c5dacb 1566 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 1567 %edx and %esi from stack only after grub_gate_a20() is called.
1568 grub_gate_a20() clobbers %edx.
1569
f2a76e1d 15702008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1571
1572 * configure.ac (AC_INIT): Bumped to 1.96.
1573
1574 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
1575 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
1576 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
1577 video/readers/png.c.
1578
90fd32d1 15792008-02-03 Bean <bean123ch@gmail.com>
9be665dd 1580
1581 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
1582 (cdboot_img_SOURCES): New variable.
1583 (cdboot_img_ASFLAGS): New variable.
1584 (cdboot_img_LDFLAGS): New variable.
1585
1586 * boot/i386/pc/cdboot.S: New file.
1587
1588 * disk/i386/pc/biosdisk.c (cd_start): New variable.
1589 (cd_count): Likewise.
1590 (grub_biosdisk_get_drive): Add support for cd device.
1591 (grub_biosdisk_call_hook): Likewise.
1592 (grub_biosdisk_iterate): Likewise.
1593 (grub_biosdisk_open): Likewise.
1594 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
1595 (grub_biosdisk_rw): Support reading from cd device.
1596 (GRUB_MOD_INIT): Iterate cd devices.
1597
1598 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
1599 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
1600 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
1601
1602 * kern/i386/pc/init.c (make_install_device): Check for cd device.
1603
4020aa53 16042008-02-02 Robert Millan <rmh@aybabtu.com>
1605
1606 * commands/read.c: New file.
1607 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
1608 (read_mod_SOURCES): New variable.
1609 (read_mod_CFLAGS): Likewise.
1610 (read_mod_LDFLAGS): Likewise.
1611
e03a1132 16122008-02-02 Robert Millan <rmh@aybabtu.com>
1613
1614 * normal/main.c (grub_normal_execute): Check for `menu->size' when
1615 determining whether menu has to be displayed.
1616
58c69220 16172008-02-02 Marco Gerards <marco@gnu.org>
1618
1619 * bus/pci.c: New file.
1620
1621 * include/grub/pci.h: Likewise.
1622
1623 * include/grub/i386/pc/pci.h: Likewise.
1624
1625 * commands/lspci.c: Likewise.
1626
1627 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
1628 `lspci.mod'.
1629 (pci_mod_SOURCES): New variable.
1630 (pci_mod_CFLAGS): Likewise.
1631 (pci_mod_LDFLAGS): Likewise.
1632 (lspci_mod_SOURCES): Likewise.
1633 (lspci_mod_CFLAGS): Likewise.
1634 (lspci_mod_LDFLAGS): Likewise.
1635
c004e1b4 16362008-02-02 Bean <bean123ch@gmail.com>
1637
1638 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
1639 (grub_ufs_get_file_block): Fix indirect block calculation problem.
1640
1641 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
1642 (grub_xfs_btree_node): New structure.
1643 (grub_xfs_btree_root): New structure.
1644 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
1645 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
1646 (GRUB_XFS_EXTENT_BLOCK): Likewise.
1647 (GRUB_XFS_EXTENT_SIZE): Likewise.
1648 (grub_xfs_read_block): Support btree format type.
1649 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
1650 Use directory block as basic unit.
1651
1652 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
1653
1654 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
1655 __attribute__ ((__regparm__ (1))).
1656
f95562bf 16572008-02-01 Robert Millan <rmh@aybabtu.com>
1658
1659 Correct a mistake in previous commit.
1660
1661 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
1662 top.
1663 (normal/command.c_DEPENDENCIES): New variable.
1664
7d31f41f 16652008-02-01 Robert Millan <rmh@aybabtu.com>
1666
1667 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
1668 top.
1669 (normal/command.c_DEPENDENCIES): New variable.
1670 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
1671 * conf/i386-ieee1275.rmk: Likewise.
1672 * conf/i386-linuxbios.rmk: Likewise.
1673 * conf/i386-pc.rmk: Likewise.
1674 * conf/sparc64-ieee1275.rmk: Likewise.
1675 * conf/powerpc-ieee1275.rmk: Likewise.
1676 (grub_emu_SOURCES): Add `fs/fshelp.c'.
1677
1678 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
1679
60b6be74 16802008-02-01 Robert Millan <rmh@aybabtu.com>
1681
1682 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
1683 call at beginning of function.
1684
078522ab 16852008-01-31 Pavel Roskin <proski@gnu.org>
1686
1687 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 1688 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
1689 (grub_mkrescue_SOURCES): Likewise.
078522ab 1690 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
1691
ccaa8a5f 16922008-01-30 Robert Millan <rmh@aybabtu.com>
1693
1694 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
1695 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
1696 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
1697 (grub_probe_SOURCES): ... to here.
1698
1699 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
1700 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
1701 * conf/i386-ieee1275.rmk: Likewise.
1702 * conf/i386-linuxbios.rmk: Likewise.
1703 * conf/powerpc-ieee1275.rmk: Likewise.
1704
ae5a9cd7 17052008-01-30 Tristan Gingold <gingold@free.fr>
1706
1707 * kern/rescue.c: Silently accept empty lines.
1708
70bc2ef2 17092008-01-29 Bean <bean123ch@gmail.com>
1710
1711 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
1712 (real_code_2): Code cleanup and change comment style.
1713 (move_memory): Avoid using 32-bit address mode.
1714
6a4d50ea 17152008-01-29 Bean <bean123ch@gmail.com>
1716
1717 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
1718 (png_mod_SOURCES): New variable.
1719 (png_mod_CFLAGS): Likewise.
1720 (png_mod_LDFLAGS): Likewise.
1721
1722 * video/readers/png.c: New file.
1723
11cc30ac 17242008-01-28 Robert Millan <rmh@aybabtu.com>
1725
1726 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
1727 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
1728 `ifndef GRUB_MOD_GAP' hack.
1729 * util/elf/grub-mkimage.c (add_segments): Likewise.
1730
3abc589f 17312008-01-27 Robert Millan <rmh@aybabtu.com>
1732
1733 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
1734 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 1735 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 1736
e1907778 17372008-01-27 Robert Millan <rmh@aybabtu.com>
1738
1739 Get grub-emu to build again (including parallel builds).
1740
1741 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
1742 Split into ...
1743 (util/grub-emu.c_DEPENDENCIES): ... this, ...
1744 (normal/execute.c_DEPENDENCIES): ... this, ...
1745 (grub-emu_DEPENDENCIES): ... and this.
1746
1747 * conf/i386-efi.rmk: Likewise.
1748 * conf/i386-linuxbios.rmk: Likewise.
1749 * conf/i386-ieee1275.rmk: Likewise.
1750 * conf/powerpc-ieee1275.rmk: Likewise.
1751 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
1752
2216b101 17532008-01-27 Robert Millan <rmh@aybabtu.com>
1754
1755 * NEWS: Add a few items.
1756
f75172d9 17572008-01-27 Robert Millan <rmh@aybabtu.com>
1758
1759 Fix parallel builds with grub-emu. Based on earlier commit for
1760 grub-probe and grub-setup.
1761
1762 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1763 (util/grub-emu.c_DEPENDENCIES): ... this.
1764 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1765 (util/grub-emu.c_DEPENDENCIES): ... this.
1766 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1767 (util/grub-emu.c_DEPENDENCIES): ... this.
1768 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1769 (util/grub-emu.c_DEPENDENCIES): ... this.
1770 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1771 (util/grub-emu.c_DEPENDENCIES): ... this.
1772
3f51de77 17732008-01-27 Pavel Roskin <proski@gnu.org>
1774
1775 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
1776 to create a gap between _end and the modules added to the image
1777 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
1778 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
1779 * util/elf/grub-mkimage.c (add_segments): Likewise.
1780
2033f53e 17812008-01-26 Pavel Roskin <proski@gnu.org>
1782
1783 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
1784 just return an error.
1785
22da1f6f 17862008-01-26 Bean <bean123ch@gmail.com>
1787
1788 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
1789 (grub_reiserfs_get_item): Save offset of the next item.
1790 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
1791
2a9525e6 17922008-01-25 Robert Millan <rmh@aybabtu.com>
1793
1794 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
1795 make all filesystem sources appear together (possibly fixing omissions
1796 while at it).
1797 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1798 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1799 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1801
1802 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
1803 add `kern/file.c'.
1804 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
1805 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1806 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
1807 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1808
1809 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
1810 (probe): Add a sanity check to make sure of our ability to read
1811 requested files when probing for filesystem type.
1812
1813 * genmk.rb: Update copyright year (2007).
1814
1815 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
1816 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
1817 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
1818 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
1819 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
1820 : Remove function prototypes.
1821
b95f71b5 18222008-01-25 Robert Millan <rmh@aybabtu.com>
1823
1824 Revert my previous commits (based on wrong assumption of how grub_errno
1825 works).
1826
fe6b695a 1827 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 1828 * kern/file.c (grub_file_open): Likewise.
1829
d08bbb49 18302008-01-24 Pavel Roskin <proski@gnu.org>
1831
1832 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
1833 that hang if GRUB tries to setup colors.
1834 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
1835 colors for firmwares that don't support it.
1836 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
1837 Recognize Open Hack'Ware, set flags to work around its
1838 limitations.
1839
605e36ed 18402008-01-24 Robert Millan <rmh@aybabtu.com>
1841
1842 * kern/file.c (grub_file_open): Do not account previous failures of
1843 unrelated functions when grub_errno is checked for.
1844 Reported by Oleg Strikov.
1845
bac332a1 18462008-01-24 Bean <bean123ch@gmail.com>
1847
1848 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
1849 (grub_ufs_sblock): New member volume name.
1850 (grub_ufs_find_file): Fix string copy bug.
1851 (grub_ufs_label): Implement this function properly.
1852
1853 * fs/hfs.c (grub_hfs_cnid_type): New enum.
1854 (grub_hfs_iterate_records): Use the correct file number for extents
1855 and catalog file. Fix problem in next index calculation.
1856 (grub_hfs_find_node): Replace recursive function call with loop.
1857 (grub_hfs_iterate_dir): Replace recursive function call with loop.
1858
15c80c09 18592008-01-23 Robert Millan <rmh@aybabtu.com>
1860
1861 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
1862 `<grub/symbol.h>' and `<grub/multiboot.h>'.
1863 (grub_multiboot2_real_boot): New function prototype.
1864
1865 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
1866 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
1867
1868 * kern/i386/ieee1275/init.c (grub_os_area_addr)
1869 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
1870
305338fd 18712008-01-23 Robert Millan <rmh@aybabtu.com>
1872
1873 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
1874 #ifdef'ed out grub_printf().
1875
3ea52685 18762008-01-23 Robert Millan <rmh@aybabtu.com>
1877
1878 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
1879 grub_dprintf calls, since they make "debug=all" mode unusable.
1880 (grub_console_checkkey): Likewise.
1881
5882ae4b 18822008-01-23 Robert Millan <rmh@aybabtu.com>
1883
1884 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1885 `term/i386/pc/at_keyboard.c'.
1886 (pkglib_MODULES): Add `serial.mod'.
1887 (serial_mod_SOURCES): New variable.
1888 (serial_mod_CFLAGS): Likewise.
1889 (serial_mod_LDFLAGS): Likewise.
1890
1891 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
1892 `<grub/powerpc/ieee1275/console.h>'.
1893 (grub_keyboard_controller_init): New function prototype.
1894 (grub_console_checkkey): Likewise.
1895 (grub_console_getkey): Likewise.
1896
1897 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
1898 keyboard on i386.
1899
1900 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
1901 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
1902
06ab5303 19032008-01-23 Robert Millan <rmh@aybabtu.com>
1904
1905 * kern/i386/pc/init.c (make_install_device): When memdisk image is
1906 present, "(memdisk)/boot/grub" becomes the default prefix.
1907
1908 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
1909 a memdisk tarball with all the modules. Add --overlay=DIR option that
1910 allows users to overlay additional files into the image.
1911
dbb475a4 19122008-01-23 Robert Millan <rmh@aybabtu.com>
1913
1914 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1915 and `machine/memory.h'.
1916 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1917 (_multiboot_mod_SOURCES): New variable.
1918 (_multiboot_mod_CFLAGS): Likewise.
1919 (_multiboot_mod_LDFLAGS): Likewise.
1920 (multiboot_mod_SOURCES): Likewise.
1921 (multiboot_mod_CFLAGS): Likewise.
1922 (multiboot_mod_LDFLAGS): Likewise.
1923
1924 * include/grub/i386/ieee1275/loader.h: New file.
1925
1926 * include/grub/i386/ieee1275/machine.h: Likewise.
1927
1928 * include/grub/i386/ieee1275/memory.h: Likewise.
1929
1930 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1931 variable declaration.
1932 (grub_os_area_size): Likewise.
1933
1934 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1935 (grub_lower_mem, grub_upper_mem): New variables.
1936 (grub_stop_floppy): New function (just to make
1937 grub_multiboot2_real_boot() happy).
1938
1939 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1940 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1941 (grub_stop): New function.
1942 Include `"../realmode.S"' and `"../loader.S"'.
1943
1944 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1945 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1946
1947 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1948 rely on grub_multiboot2_real_boot() for final boot.
1949
25638629 19502008-01-22 Robert Millan <rmh@aybabtu.com>
1951
1952 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1953 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1954 device that doesn't look like an SD card.
1955 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1956 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1957 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1958 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1959 found.
1960
9dad816d 19612008-01-22 Robert Millan <rmh@aybabtu.com>
1962
1963 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1964 avoid claiming over our own code.
1965
34842f2d 19662008-01-22 Bean <bean123ch@gmail.com>
1967
1968 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1969 (jpeg_mod_SOURCES): New variable.
1970 (jpeg_mod_CFLAGS): Likewise.
1971 (jpeg_mod_LDFLAGS): Likewise.
1972
1973 * video/readers/jpeg.c : New file.
1974
44023a28 19752008-01-22 Bean <bean123ch@gmail.com>
1976
1977 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1978 there are no more items.
1979
bc2d8ac6 19802008-01-21 Robert Millan <rmh@aybabtu.com>
1981
1982 * kern/mm.c (grub_mm_init_region): Improve debug message.
1983
261bd4bc 19842008-01-21 Robert Millan <rmh@aybabtu.com>
1985
1986 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1987 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1988 address.
1989 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1990 a C macro.
1991 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1992 Indicates start of upper memory.
1993 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1994 (generate_image): Abort when image size is big enough to corrupt
1995 upper memory.
1996
1997 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1998 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1999 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2000 instead of hardcoding 0xA0000.
2001 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
2002 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2003 instead of hardcoding 0xA0000.
2004
f970b55e 20052008-01-21 Robert Millan <rmh@aybabtu.com>
2006
2007 * disk/memdisk.c (memdisk_size): New variable.
2008 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
2009 `memdisk_size'.
2010 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
2011 image to dynamic memory.
2012 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
2013 `memdisk_size'. Free memdisk block.
2014
1a8b0526 20152008-01-21 Robert Millan <rmh@aybabtu.com>
2016
2017 Fix detection of very small filesystems (like tar).
2018
2019 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
2020 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
2021 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
2022 a problem with this disk).
2023
6e9b4aab 20242008-01-21 Robert Millan <rmh@aybabtu.com>
2025
2026 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
2027 on grub_biosdisk_rw_standard() error.
2028
0d8837b2 20292008-01-21 Robert Millan <rmh@aybabtu.com>
2030
2031 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
2032 recent changes.
2033 * kern/elf.c: Likewise.
2034 * kern/ieee1275/ieee1275.c: Likewise.
2035 * kern/powerpc/ieee1275/openfw.c: Likewise.
2036 * term/ieee1275/ofconsole.c: Likewise.
2037
ffd36e34 20382008-01-21 Robert Millan <rmh@aybabtu.com>
2039
2040 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
2041
3f0093d0 2042 * include/grub/kernel.h (grub_arch_memdisk_addr)
2043 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 2044
3f0093d0 2045 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
2046 (grub_arch_memdisk_size): ... to here.
ffd36e34 2047
6c391b21 20482008-01-21 Robert Millan <rmh@aybabtu.com>
2049
2050 Mostly based on bugfix from Bean.
2051
2052 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
2053 attribute with hook() parameter.
2054 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
2055 declaration.
2056 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
2057 attribute with hook() parameter.
2058 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
2059 declaration.
2060
55a581dc 20612008-01-21 Robert Millan <rmh@aybabtu.com>
2062
2063 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
2064 (pkglib_MODULES): Add `memdisk.mod'.
2065 (memdisk_mod_SOURCES): New variable.
2066 (memdisk_mod_CFLAGS): Likewise.
2067 (memdisk_mod_LDFLAGS): Likewise.
2068
2069 * disk/memdisk.c: New file.
2070
2071 * include/grub/disk.h (grub_disk_dev_id): Add
2072 `GRUB_DISK_DEVICE_MEMDISK_ID'.
2073
2074 * include/grub/i386/pc/kernel.h
2075 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
2076 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
2077 (grub_kernel_image_size): New variable declaration.
2078 (grub_total_module_size): Likewise.
2079 (grub_memdisk_image_size): Likewise.
2080
2081 * include/grub/i386/pc/memory.h
2082 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
2083
2084 * include/grub/kernel.h: Include `<grub/symbol.h>'.
2085 (grub_arch_memdisk_addr): New variable declaration.
2086 (grub_arch_memdisk_size): Likewise.
2087
2088 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
2089 (grub_arch_memdisk_size): Likewise.
2090
2091 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
2092 (codestart): Replace hardcoded `0x100000' with
2093 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
2094
2095 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
2096 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
2097 not NULL, append the contents of the file it refers to, at the end of
2098 the compressed kernel image. Initialize `grub_memdisk_image_size'
2099 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
2100 (options): Add "memdisk"|'m' option.
2101 (main): Parse --memdisk|-m option, and pass user-provided path as
2102 parameter to generate_image().
2103
3d7f54c9 21042008-01-20 Robert Millan <rmh@aybabtu.com>
2105
2106 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
2107 grub_dprintf() calls from here ...
2108 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
2109
0bf74728 21102008-01-20 Robert Millan <rmh@aybabtu.com>
2111
2112 Fix detection of "real mode" when /options/real-mode? doesn't exist.
2113
2114 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
2115 declaration.
2116 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
2117 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
2118 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 2119 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 2120 property).
2121 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
2122 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
2123
33bf70a7 21242008-01-19 Robert Millan <rmh@aybabtu.com>
2125
fe6b695a 2126 Get rid of confusing function (superseded by
33bf70a7 2127 `grub_ieee1275_get_integer_property')
2128 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
2129 prototype.
2130 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
2131 function.
2132 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
2133 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
2134 in native endianess from grub_ieee1275_get_integer_property().
2135
e2da7d26 21362008-01-19 Robert Millan <rmh@aybabtu.com>
2137
2138 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
2139 command after "shut-down", since implementations differ on which
2140 the command for halt is.
2141
59f1fd8d 21422008-01-19 Robert Millan <rmh@aybabtu.com>
2143
2144 * include/grub/i386/linuxbios/console.h: Add header protection.
2145 (grub_keyboard_controller_init): New function prototype.
2146 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
2147 (KEYBOARD_COMMAND_READ): Likewise.
2148 (KEYBOARD_COMMAND_WRITE): Likewise.
2149 (KEYBOARD_SCANCODE_SET1): Likewise.
2150 (grub_keyboard_controller_write): New function.
2151 (grub_keyboard_controller_read): Likewise.
2152 (grub_keyboard_controller_init): Likewise.
2153
2154 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
2155 (grub_console_init): On coreboot/LinuxBIOS, call
2156 grub_keyboard_controller_init().
2157
5f5a7c15 21582008-01-19 Robert Millan <rmh@aybabtu.com>
2159
2160 PowerPC changes provided by Pavel Roskin.
2161
2162 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
2163 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
2164 don't rely on cmain() doing it.
2165 * kern/i386/ieee1275/startup.S (_start): Store %eax in
2166 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
2167
1210e168 21682008-01-16 Robert Millan <rmh@aybabtu.com>
2169
2170 * include/grub/i386/linuxbios/memory.h
2171 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
2172 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
2173 receive `table_header' as argument. Instead, probe for it in the
2174 known memory ranges where it can be present.
2175 (grub_available_iterate): Do not pass a fixed `table_header' address
2176 to grub_linuxbios_table_iterate().
2177
3d04eab8 21782008-01-15 Robert Millan <rmh@aybabtu.com>
2179
2180 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
2181 * conf/i386-ieee1275.rmk: New file.
2182 * include/grub/i386/ieee1275/console.h: Likewise.
2183 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
2184 * include/grub/i386/ieee1275/kernel.h: Likewise.
2185 * include/grub/i386/ieee1275/time.h: Likewise.
2186 * kern/i386/ieee1275/init.c: Likewise.
2187 * kern/i386/ieee1275/startup.S: Likewise.
2188
d1bc1b73 21892008-01-15 Robert Millan <rmh@aybabtu.com>
2190
2191 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
2192 when pointers are 32-bit (but still do set it to one when they are
2193 64-bit).
2194
66a65807 21952008-01-15 Robert Millan <rmh@aybabtu.com>
2196
2197 * include/grub/ieee1275/ieee1275.h
2198 (grub_ieee1275_get_integer_property): New function prototype.
2199
2200 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
2201 (grub_ieee1275_get_integer_property): New function. Wraps around
2202 grub_ieee1275_get_property() to handle endianess.
2203
2204 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
2205 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 2206 where appropriate.
66a65807 2207 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
2208 (grub_map): Likewise.
2209 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
2210
a83ccafd 22112008-01-15 Bean <bean123ch@gmail.com>
2212
2213 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
2214 (grub_script_execute_cmdline): Reset grub_errno.
2215
2216 * normal/main.c (read_config_file): Reset grub_errno.
2217
2218 * normal/parse.y (script_init): New.
2219 (script): Move function and menuentry here.
2220 (delimiter): New.
2221 (command): Add delimiter at the end of command.
2222 (commands): Adjust to match the new command.
2223 (commandblock): Remove grub_script_lexer_record_start.
2224 (menuentry): Add grub_script_lexer_record_start, use the new commands.
2225 (if): Use the new commands.
2226
2227 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
2228
df6ecfc6 22292008-01-15 Robert Millan <rmh@aybabtu.com>
2230
2231 * normal/menu.c (run_menu): Move timeout message from here ...
2232 (print_timeout): ... to here.
2233 (run_menu): Use print_timeout() once during initial draw to print
2234 the whole message, and again in every clock tick to update only
2235 the number of seconds.
2236
87ae25eb 22372008-01-15 Robert Millan <rmh@aybabtu.com>
2238
2239 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
2240 actual size of `available' from grub_ieee1275_get_property(), and
2241 restrict parsing to that bound.
2242
47bf09a4 22432008-01-15 Christian Franke <franke@computer.org>
2244
2245 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
2246 (argp_program_version): Remove variable.
2247 (argp_program_bug_address): Likewise.
2248 (options): Convert from struct argp_option to struct option.
2249 (struct arguments): Remove.
2250 (parse_opt): Remove.
2251 (usage): New function.
2252 (main): Replace struct args members by simple variables.
2253 Replace argp_parse() by getopt_long().
2254 Add switch to evaluate options.
2255 Add missing "(...)" around root_dev in prefix string.
2256
c86f1469 22572008-01-14 Robert Millan <rmh@aybabtu.com>
2258
2259 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
2260 for grub_ieee1275_exit(), in order to improve portability.
2261
e622c559 22622008-01-14 Robert Millan <rmh@aybabtu.com>
2263
2264 * util/grub.d/10_linux.in (prefix): Define.
2265 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
2266
44cb1ec8 22672008-01-13 Pavel Roskin <proski@gnu.org>
2268
2269 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
2270 grub_errno if no errors have been detected.
2271
1eb8c802 22722008-01-12 Robert Millan <rmh@aybabtu.com>
2273
2274 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
2275 (grub_util_get_dev_abstraction): New function prototype.
2276
2277 * util/getroot.c: Include `<grub/util/getroot.h>'
2278 (grub_util_get_grub_dev): Move detection of abstraction type to ...
2279 (grub_util_get_dev_abstraction): ... here (new function).
2280
2281 * util/grub-probe.c: Convert PRINT_* to an enum. Add
2282 `PRINT_ABSTRACTION'.
2283 (probe): Probe for abstraction type when requested.
2284 (main): Understand `--target=abstraction'.
2285
2286 * util/i386/efi/grub-install.in: Add abstraction module to core
2287 image when it is found to be necessary.
2288 * util/i386/pc/grub-install.in: Likewise.
2289 * util/powerpc/ieee1275/grub-install.in: Likewise.
2290
2291 * util/update-grub_lib.in (font_path): Return system path without
2292 converting to GRUB path.
2293 * util/update-grub.in: Convert system path returned by font_path()
2294 to a GRUB path. Use `grub-probe -t abstraction' to determine what
2295 abstraction module is needed for loading fonts (if any). Export
2296 that as `GRUB_PRELOAD_MODULES'.
2297 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
2298 insmod commands).
2299
52bd3de9 23002008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
2301
2302 Remove some unused code from reiserfs.
2303
2304 * fs/reiserfs.c (struct grub_reiserfs_key)
2305 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
2306 (struct grub_reiserfs_node_body): Removed.
2307 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
2308 Likewise.
2309 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2310 Likewise.
2311 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2312 Likewise.
2313 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
2314 Likewise.
2315 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
2316 Likewise.
2317 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
2318 Likewise.
2319 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2320 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2321 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
2322
2f80039d 23232008-01-10 Robert Millan <rmh@aybabtu.com>
2324
2325 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
2326 Determines if a file is garbage left by packaging systems, etc.
2327 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
2328 for processing /etc/grub.d scripts.
2329 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
2330 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
2331 as a condition for processing Linux images.
2332
87888032 23332008-01-10 Pavel Roskin <proski@gnu.org>
2334
2335 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
2336 to compile reiserfs.c on PowerPC.
2337
7e54fced 23382008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 2339
2340 * kern/device.c (grub_device_iterate): Do not abort device iteration
2341 when one of the devices cannot be opened.
2342 * kern/disk.c (grub_disk_open): Do not account previous failures of
2343 unrelated functions when grub_errno is checked for.
2344
5aa541e6 23452008-01-08 Robert Millan <rmh@aybabtu.com>
2346
2347 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
2348 `! grub_linux_is_bzimage', change order of address comparison to make
2349 it more intuitive, and improve "too big zImage" error message.
2350
7076340d 23512008-01-08 Robert Millan <rmh@aybabtu.com>
2352
2353 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
2354 `$(update-grub_DATA)'.
2355 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
2356 targets.
2357
9ca70333 23582008-01-07 Robert Millan <rmh@aybabtu.com>
2359
2360 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
2361 which instruction is modified by grub-setup during installation
2362 (since it wasn't obvious by only looking at this file).
2363
38ccf575 23642008-01-07 Robert Millan <rmh@aybabtu.com>
2365
2366 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
2367 listing actual TODO items.
2368
f5db4291 23692008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2370
868967cf 2371 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
2372 correctly.
2373 (grub_reiserfs_get_key_offset): Likewise.
2374 (grub_reiserfs_set_key_offset): Likewise.
2375 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 2376 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 2377
2378 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
2379 better to remove the bitfield version completely.
2380
23812008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2382
f5db4291 2383 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
2384 allocated from the heap, due to the fshelp implementation.
2385 (grub_reiserfs_dir): Free NODE, due to the same reason.
2386
492e6d9d 23872008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2388
2389 Mostly from Vincent Pelletier:
2390
2391 * fs/reiserfs.c: New file.
2392
2393 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
2394 (reiserfs_mod_SOURCES): New variable.
2395 (reiserfs_mod_CFLAGS): Likewise.
2396 (reiserfs_mod_LDFLAGS): Likewise.
2397
2398 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
2399 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
2400 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
2401 normal/color.c.
2402
9ce3e7c1 24032008-01-06 Robert Millan <rmh@aybabtu.com>
2404
2405 * normal/color.c: Remove `<grub/env.h>'.
2406
f3b58148 24072008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
2408
2409 * include/grub/normal.h: Include <grub/env.h>.
2410
7ac3bcfa 24112008-01-05 Robert Millan <rmh@aybabtu.com>
2412
2413 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
2414 usage example with `(hd0,1)'.
fb358190 2415 Reported by Samuel Thibault.
7ac3bcfa 2416
c8ee99d7 24172008-01-05 Robert Millan <rmh@aybabtu.com>
2418
2419 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
2420 (grub_linux_boot_zimage): Rename to ...
2421 (grub_linux_boot): ... this.
2422 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
2423 (grub_linux_boot_zimage): Conditionalize zImage copy.
2424
2425 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
2426 (grub_linux_boot_bzimage): Remove prototype.
2427 (grub_linux_boot_zimage): Rename to ...
2428 (grub_linux_boot): ... this.
2429
2430 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
2431 (grub_linux_boot): Remove function.
2432
0ece25b1 24332008-01-05 Robert Millan <rmh@aybabtu.com>
2434
2435 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
2436 (grub_env_write_color_highlight): Likewise.
2437 (grub_wait_after_message): Likewise.
2438
2439 * normal/color.c: New file.
2440
2441 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2442 (normal_mod_DEPENDENCIES): Likewise.
2443
2444 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2445 (normal_mod_DEPENDENCIES): Likewise.
2446
2447 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2448 (normal_mod_DEPENDENCIES): Likewise.
2449
2450 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
2451 (normal_mod_DEPENDENCIES): Likewise.
2452
2453 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
2454 for waiting after a message is printed.
2455 * normal/main.c (read_config_file): Likewise.
2456 (grub_normal_init): Register grub_env_write_color_normal() and
2457 grub_env_write_color_highlight() hooks. Mark `color_normal' and
2458 `color_highlight' variables as global.
2459
2460 * normal/menu.c (grub_wait_after_message): New function.
2461 (grub_color_menu_normal): New variable. Replaces ...
2462 (GRUB_COLOR_MENU_NORMAL): ... this macro.
2463 (grub_color_menu_highlight): New variable. Replaces ...
2464 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
2465 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
2466 `GRUB_TERM_COLOR_STANDARD'.
2467 (print_message): Use `grub_setcolorstate' to reload colors. Rename
2468 `normal_code' and `highlight_code' to `old_color_normal' and
2469 `old_color_highlight', respectively.
2470 (grub_menu_init_page): Update colors when drawing the menu, based on
2471 `menu_color_normal' and `menu_color_highlight' variables.
2472 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
2473 a message is printed.
2474
182dd4e5 24752008-01-05 Robert Millan <rmh@aybabtu.com>
2476
2477 * kern/env.c (grub_env_context_open): Propagate hooks for global
2478 variables to new context.
2479
2480 * kern/main.c (grub_set_root_dev): Export `root' variable.
2481
ddf8f6ad 24822008-01-05 Robert Millan <rmh@aybabtu.com>
2483
2484 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 2485 discs unconditionally, since udev and others have options to provide
ddf8f6ad 2486 them.
2487
d8b43d9b 24882008-01-05 Robert Millan <rmh@aybabtu.com>
2489
2490 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
2491
2bff2de3 24922008-01-04 Christian Franke <franke@computer.org>
2493
2494 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
2495 of eisa_mmap.
2496
97eab917 24972008-01-03 Pavel Roskin <proski@gnu.org>
2498
2499 * kern/i386/linuxbios/init.c: Put "void" to all function
2500 declarations with no arguments.
2501 * kern/powerpc/ieee1275/init.c: Likewise.
2502 * term/i386/pc/at_keyboard.c: Likewise.
2503 * term/i386/pc/vga_text.c: Likewise.
2504 * util/grub-mkdevicemap.c: Likewise.
2505
b9416d00 25062008-01-02 Robert Millan <rmh@aybabtu.com>
2507
2508 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
2509 message when loaded image is out of bounds.
2510 (grub_multiboot_load_elf64): Likewise.
2511
92695df9 25122008-01-02 Pavel Roskin <proski@gnu.org>
2513
2514 * util/grub.d/10_linux.in: Try version without ".old" when
2515 looking for initrd. It's better to use initrd from the newer
2516 kernel of the same version than no initrd at all.
2517
d98d9cad 25182008-01-01 Robert Millan <rmh@aybabtu.com>
2519
2520 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
2521
dbfdce36 25222008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
2523
2524 * include/grub/video.h: Added grub_video_unmap_color and
2525 grub_video_get_active_render_target.
2526 (grub_video_adapter): Added unmap_color and get_active_render_target.
2527
2528 * video/video.c: Added grub_video_unmap_color and
2529 grub_video_get_active_render_target.
2530 (grub_video_get_info): Changed method to accept NULL pointer as an
2531 argument to allow detection of active video adapter.
2532
2533 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
2534 grub_video_vbe_unmap_color_int.
2535 Added grub_video_vbe_unmap_color and
2536 grub_video_vbe_get_active_render_target.
2537 (grub_video_vbe_adapter): Added unmap_color and
2538 get_active_render_target.
2539
2540 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
2541 with grub_video_vbe_unmap_color_int.
2542
2543 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
2544 (DEFAULT_NORMAL_COLOR): Likewise.
2545 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
2546 (DEFAULT_FG_COLOR): Removed.
2547 (DEFAULT_BG_COLOR): Likewise.
2548 (DEFAULT_CURSOR_COLOR): Changed value.
2549 (grub_virtual_screen): Added standard_color_setting,
2550 normal_color_setting, highlight_color_setting and term_color.
2551 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
2552 (bitmap_width): Added.
2553 (bitmap_height): Likewise.
2554 (bitmap): Likewise.
2555 (set_term_color): Likewise.
2556 (grub_virtual_screen_setup): Changed to use new terminal coloring
2557 settings.
2558 (grub_gfxterm_init): Added init for bitmap.
2559 (grub_gfxterm_fini): Added destroy for bitmap.
2560 (redraw_screen_rect): Updated to use background bitmap and new
2561 terminal coloring.
2562 (scroll_up): Added optimization for case when there is no bitmap.
2563 (grub_gfxterm_cls): Fixed to use correct background color.
2564 (grub_virtual_screen_setcolorstate): Changed to use new terminal
2565 coloring.
2566 (grub_virtual_screen_setcolor): Likewise.
2567 (grub_virtual_screen_getcolor): Added.
2568 (grub_gfxterm_background_image_cmd): Likewise.
2569 (grub_video_term): Added setcolor and getcolor.
2570 (MOD_INIT): Added registration of background_image command.
2571 (MOD_TERM): Added unregistration for background_image command.
2572
c3c20931 25732007-12-30 Pavel Roskin <proski@gnu.org>
2574
2575 * loader/multiboot_loader.c: Fix multiboot command
2576 unregistration. Fix all typos in the word "multiboot".
2577
df266716 25782007-12-29 Pavel Roskin <proski@gnu.org>
94239199 2579
2580 * util/grub.d/10_linux.in: Refactor search for initrd. Add
2581 support for initrd names used in Fedora.
2582
fc6e896c 25832007-12-26 Bean <bean123ch@gmail.com>
2584
2585 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
2586 (cpio_mod_SOURCES): New variable.
2587 (cpio_mod_CFLAGS): Likewise.
2588 (cpio_mod_LDFLAGS): Likewise.
2589
2590 * fs/cpio.c: New file.
2591
2592 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
2593
2594 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2595
2596 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2597
2598 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2599
533110ad 26002007-12-25 Robert Millan <rmh@aybabtu.com>
2601
2602 * include/grub/term.h (struct grub_term): Add `getcolor' function.
2603 (grub_getcolor): New function.
2604
2605 * kern/term.c (grub_getcolor): New function.
2606 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
2607 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
2608 (print_entry): Set normal and highlight colors to
2609 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
2610 respectively, before printing and restore them to old
2611 values afterwards.
2612 (grub_menu_init_page): Likewise. Fill an additional colored space
2613 that would otherwise be left blank.
2614
2615 * term/efi/console.c (grub_console_getcolor): New function.
2616 (struct grub_console_term.getcolor): New variable.
2617 * term/i386/pc/console.c (grub_console_getcolor): New function.
2618 (struct grub_console_term.getcolor): New variable.
2619 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
2620 (struct grub_console_term.getcolor): New variable.
2621
2622 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
2623 (struct grub_console_term.setcolor): Remove variable.
2624 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
2625 (struct grub_console_term.setcolor): Remove variable.
2626 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
2627 (struct grub_console_term.setcolor): Remove variable.
2628 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
2629 (struct grub_console_term.setcolor): Remove variable.
2630
4931827f 26312007-12-25 Robert Millan <rmh@aybabtu.com>
2632
2633 * configure.ac: Search for possible unifont.hex locations, and
2634 define UNIFONT_HEX if found.
2635
2636 * Makefile.in (UNIFONT_HEX): Define variable.
2637 (DATA): Rename to ...
2638 (PKGLIB): ... this. Update all users.
2639 (PKGDATA): New variable.
2640 (pkgdata_IMAGES): Rename to ...
2641 (pkglib_IMAGES): ... this. Update all users.
2642 (pkgdata_MODULES): Rename to ...
2643 (pkglib_MODULES): ... this. Update all users.
2644 (pkgdata_PROGRAMS): Rename to ...
2645 (pkglib_PROGRAMS): ... this. Update all users.
2646 (pkgdata_DATA): Rename to ...
2647 (pkglib_DATA): ... this. Update all users.
2648 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
2649 (unicode.pff, ascii.pff): New rules.
2650 (all-local): Add `$(PKGDATA)' dependency.
2651 (install-local): Process `$(PKGDATA)'.
2652
2653 * util/update-grub_lib.in (font_path): Search for *.pff files in
2654 a few more locations, including `${pkgdata}'.
2655
57e57e31 26562007-12-23 Robert Millan <rmh@aybabtu.com>
2657
2658 Patch from Bean <bean123ch@gmail.com>:
2659 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
2660 `size'.
2661
4bc72aa9 26622007-12-21 Bean <bean123ch@gmail.com>
2663
2664 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
2665 (ntfscomp_mod_SOURCES): New variable.
2666 (ntfscomp_mod_CFLAGS): Likewise.
2667 (ntfscomp_mod_LDFLAGS): Likewise.
2668
2669 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
2670 (grub_probe_SOURCES): Likewise.
2671 (grub_emu_SOURCES): Likewise.
2672
2673 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2674 (grub_emu_SOURCES): Likewise.
2675
2676 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2677 (grub_emu_SOURCES): Likewise.
2678
2679 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2680 (grub_emu_SOURCES): Likewise.
2681
2682 * fs/ntfs.c (grub_ntfscomp_func): New variable.
2683 (read_run_list): Renamed to grub_ntfs_read_run_list.
2684 (decomp_nextvcn): Moved to ntfscomp.c.
2685 (decomp_getch): Likewise.
2686 (decomp_get16): Likewise.
2687 (decomp_block): Likewise.
2688 (read_block): Likewise.
2689 (read_data): Partially moved to ntfscomp.c.
2690 (fixup): Change unsigned to grub_uint16_t.
2691 (read_mft): Change unsigned long to grub_uint32_t.
2692 (read_attr): Likewise.
2693 (read_data): Likewise.
2694 (read_run_data): Likewise.
2695 (read_run_list): Likewise.
2696 (read_mft): Likewise.
2697
2698 * fs/ntfscomp.c: New file.
2699
2700 * include/grub/ntfs.h: New file.
2701
af680a87 27022007-12-16 Robert Millan <rmh@aybabtu.com>
2703
2704 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
2705 IDE disk check, since Linux is known to support 20 IDE disks.
2706 Reported by Colin Watson.
2707
84be7599 27082007-12-15 Bean <bean123ch@gmail.com>
2709
2710 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
2711 (lnxboot_img_SOURCES): New variable.
2712 (lnxboot_img_ASFLAGS): Likewise.
2713 (lnxboot_img_LDFLAGS): Likewise.
2714
2715 * boot/i386/pc/lnxboot.S: New file.
2716
6af9db01 27172007-11-24 Pavel Roskin <proski@gnu.org>
2718
2719 * configure.ac: Test if '--build-id=none' is supported by the
2720 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
2721 objcopy to generate incorrect binary files (binutils
2722 2.17.50.0.18-1 as shipped by Fedora 8).
2723 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
2724 linking, so that build ID doesn't break the test.
2725
7361cfe6 27262007-11-24 Pavel Roskin <proski@gnu.org>
2727
2728 * include/grub/i386/time.h: use "void" in the argument list
2729 of grub_cpu_idle().
2730 * include/grub/powerpc/time.h: Likewise.
2731 * include/grub/sparc64/time.h: Likewise.
2732
1593e10c 27332007-11-18 Christian Franke <franke@computer.org>
2734
2735 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
2736 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
2737 This fixes the problem that function keys did not work in grub-emu.
2738
3b8db1a8 27392007-11-18 Christian Franke <franke@computer.org>
2740
2741 * disk/host.c (grub_host_open): Remove attribute unused from
2742 name parameter. Add check for "host". This fixes the problem
2743 that grub-emu does not find partitions.
2744
2e29408d 27452007-11-18 Christian Franke <franke@computer.org>
2746
2747 * util/hostfs.c (is_dir): New function.
2748 (grub_hostfs_dir): Handle missing dirent.d_type case.
2749 (grub_hostfs_read): Add missing fseek().
2750 (grub_hostfs_label): Clear label pointer. This fixes a crash
2751 of grub-emu on "ls (host)".
2752
398cd047 27532007-11-18 Christian Franke <franke@computer.org>
2754
2755 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
2756 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
2757 to 64 bit boundary by default.
2758
c405c391 27592007-11-18 Bean <bean123ch@gmail.com>
2760
2761 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
2762 (hexdump_mod_SOURCES): New variable.
2763 (hexdump_mod_CFLAGS): Likewise.
2764 (hexdump_mod_LDFLAGS): Likewise.
2765
2766 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2767
2768 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2769
2770 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2771
2772 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2773
2774 * include/grub/hexdump.h: New file.
2775
2776 * commands/hexdump.c: New file.
2777
5cced7fd 27782007-11-10 Robert Millan <rmh@aybabtu.com>
2779
2780 * commands/i386/pc/play.c (beep_off): Switch order of arguments
2781 in grub_outb() calls.
2782 (beep_on): Likewise.
2783
8b714eb0 27842007-11-10 Christian Franke <franke@computer.org>
2785
2786 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
2787 (grub_menu_run): Likewise.
2788
ce0f1839 27892007-11-10 Robert Millan <rmh@aybabtu.com>
2790
2791 * include/grub/i386/efi/machine.h: New file.
2792 * include/grub/i386/linuxbios/machine.h: Likewise.
2793 * include/grub/i386/pc/machine.h: Likewise.
2794 * include/grub/powerpc/ieee1275/machine.h: Likewise.
2795 * include/grub/sparc64/ieee1275/machine.h: Likewise.
2796
2797 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
2798 (serial_hw_io_addr): New variable.
2799 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
2800 instead of `(unsigned short *) 0x400'.
2801
270c237d 28022007-11-10 Bean <bean123ch@gmail.com>
2803
2804 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2805
a87783bf 28062007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2807
2808 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
2809 (vga_mod_SOURCES): Added.
2810 (vga_mod_CFLAGS): Likewise.
2811 (vga_mod_LDFLAGS): Likewise.
2812
2813 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
2814 grub_outb() calls.
2815 (set_map_mask): Likewise.
2816 (set_read_map): Likewise.
2817 (set_read_address): Likewise.
2818 (vga_font): Removed variable.
2819 (get_vga_glyph): Removed function.
2820 (invalidate_char): Likewise.
2821 (write_char): Changed to use grub_font_get_glyph() for font
2822 information.
2823 (grub_vga_putchar): Likewise.
2824 (grub_vga_getcharwidth): Likewise.
2825
6433b448 28262007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2827
2828 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
2829 flags.
2830 (pxeboot_img_LDFLAGS): Likewise.
2831 (diskboot_img_LDFLAGS): Likewise.
2832 (kernel_img_LDFLAGS): Likewise.
2833
49178511 28342007-11-06 Robert Millan <rmh@aybabtu.com>
2835
2836 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
2837 in grub_outb() calls.
2838 (serial_hw_init): Likewise.
2839
53b052de 28402007-11-05 Robert Millan <rmh@aybabtu.com>
2841
2842 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
2843 spaces. Skip non-regular files.
2844
5ab33bba 28452007-11-05 Robert Millan <rmh@aybabtu.com>
2846
2847 * kern/disk.c (grub_disk_firmware_fini)
2848 (grub_disk_firmware_is_tainted): New variables.
2849
2850 * include/grub/disk.h (grub_disk_firmware_fini)
2851 (grub_disk_firmware_is_tainted): Likewise.
2852
2853 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
2854 (grub_disk_biosdisk_fini): ... to here.
2855 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
2856 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
2857 is set. Register grub_disk_biosdisk_fini() in
2858 `grub_disk_firmware_fini'.
2859
2860 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
2861 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
2862 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
2863 to finish existing firmware disk interface.
2864
2865 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
2866 (ata_mod_SOURCES): New variable.
2867 (ata_mod_CFLAGS): Likewise.
2868 (ata_mod_LDFLAGS): Likewise.
2869
0149ab7c 28702007-11-05 Robert Millan <rmh@aybabtu.com>
2871
2872 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
2873 (grub_ata_wait): Reimplement using grub_millisleep().
2874
2875 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
2876 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
2877
be7ac41e 28782007-11-03 Marco Gerards <marco@gnu.org>
2879
2880 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
2881 (CRTC_ADDR_PORT): New macro.
2882 (CRTC_DATA_PORT): Likewise.
2883 (CRTC_CURSOR): Likewise.
2884 (CRTC_CURSOR_ADDR_HIGH): Likewise.
2885 (CRTC_CURSOR_ADDR_LOW): Likewise.
2886 (update_cursor): New function.
2887 (grub_console_real_putchar): Call `update_cursor'.
2888 (grub_console_gotoxy): Likewise.
2889 (grub_console_cls): Set the default color when clearing the
2890 screen.
2891 (grub_console_setcursor): Implemented.
2892
bb06ab2e 28932007-11-03 Marco Gerards <marco@gnu.org>
2894
2895 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
2896 become activate.
2897 (grub_ata_pio_write): Likewise.
2898
2899 (grub_atapi_identify): Wait after issuing an ATA command.
2900 (grub_atapi_packet): Likewise.
2901 (grub_ata_identify): Likewise.
2902 (grub_ata_readwrite): Likewise.
2903
cf8f780b 29042007-11-03 Marco Gerards <marco@gnu.org>
2905
2906 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
2907 (grub_ata_pio_write): Likewise.
2908 (grub_ata_readwrite): Use `grub_error', instead of
2909 returning `grub_errno'.
2910
ed649e54 29112007-11-03 Marco Gerards <marco@gnu.org>
2912
2913 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2914 grub_ata_pio_write once for every single sector, instead of for
2915 multiple sectors.
2916
ca25d8f0 29172007-10-31 Robert Millan <rmh@aybabtu.com>
2918
2919 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2920
2921 * conf/i386-linuxbios.rmk: New file.
2922
2923 * kern/i386/pc/hardware.c: Likewise.
2924 * term/i386/pc/at_keyboard.c: Likewise.
2925 * term/i386/pc/vga_text.c: Likewise.
2926
2927 * include/grub/i386/linuxbios/boot.h: Likewise.
2928 * include/grub/i386/linuxbios/console.h: Likewise.
2929 * include/grub/i386/linuxbios/init.h: Likewise.
2930 * include/grub/i386/linuxbios/kernel.h: Likewise.
2931 * include/grub/i386/linuxbios/loader.h: Likewise.
2932 * include/grub/i386/linuxbios/memory.h: Likewise.
2933 * include/grub/i386/linuxbios/serial.h: Likewise.
2934 * include/grub/i386/linuxbios/time.h: Likewise.
2935
2936 * kern/i386/linuxbios/init.c: Likewise.
2937 * kern/i386/linuxbios/startup.S: Likewise.
2938 * kern/i386/linuxbios/table.c: Likewise.
2939
e911ecc1 29402007-10-31 Marco Gerards <marco@gnu.org>
2941
2942 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2943 (ata_mod_SOURCES): New variable.
2944 (ata_mod_CFLAGS): Likewise.
2945 (ata_mod_LDFLAGS): Likewise.
2946
2947 * disk/ata.c: New file.
2948
2949 * include/grub/disk.h (grub_disk_dev_id): Add
2950 `GRUB_DISK_DEV_ATA_ID'.
2951
7f66d0e0 29522007-10-31 Robert Millan <rmh@aybabtu.com>
2953
2954 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2955 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2956
2957 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2958 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2959
2960 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2961 `<grub/types.h>'.
2962
2963 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2964
5cd7dd46 29652007-10-27 Robert Millan <rmh@aybabtu.com>
2966
3236ca65 2967 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 2968
2ebfc90f 29692007-10-22 Robert Millan <rmh@aybabtu.com>
2970
2971 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
2972 `"../realmode.S"'.
2973 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
2974
73fcb0f3 29752007-10-22 Robert Millan <rmh@aybabtu.com>
2976
2977 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2978 (pkgdata_MODULES): Add `biosdisk.mod'.
2979 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2980 variables.
2981
2982 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2983 (grub_biosdisk_init): Replace with ...
2984 (GRUB_MOD_INIT(biosdisk)): ... this.
2985 (grub_biosdisk_fini): Replace with ...
2986 (GRUB_MOD_FINI(biosdisk)): ... this.
2987
2988 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2989 (grub_machine_init): Remove call to grub_biosdisk_init().
2990 (grub_machine_fini): Remove call to grub_machine_fini().
2991
2992 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2993
3381d274 29942007-10-22 Robert Millan <rmh@aybabtu.com>
2995
2996 * include/grub/time.h: New file.
2997 * include/grub/i386/time.h: Likewise.
2998 * include/grub/powerpc/time.h: Likewise.
2999 * include/grub/sparc64/time.h: Likewise.
3000
3001 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
3002 instances to ...
3003 (KERNEL_MACHINE_TIME_HEADER): ... this.
3004 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3005 instances to ...
3006 (KERNEL_MACHINE_TIME_HEADER): ... this.
3007 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3008 instances to ...
3009 (KERNEL_MACHINE_TIME_HEADER): ... this.
3010
3011 * kern/i386/efi/init.c: Include `<grub/time.h>'.
3012 (grub_millisleep): New function.
3013 * kern/i386/pc/init.c: Include `<grub/time.h>'.
3014 (grub_millisleep): New function.
3015 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
3016 Remove `grub/machine/time.h' include.
3017 (grub_millisleep): New function.
3018 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
3019 Remove `grub/machine/time.h' include.
3020 (grub_millisleep): New function.
3021
3022 * include/grub/misc.h (grub_div_roundup): New function.
3023
3024 * kern/misc.c: Include `<grub/time.h>'.
3025 (grub_millisleep_generic): New function.
3026
3027 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
3028 Add `time.h'.
3029 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
3030 Add `time.h'.
3031 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
3032 `machine/time.h'. Add `time.h'.
3033 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3034
a39a0312 30352007-10-21 Robert Millan <rmh@aybabtu.com>
3036
3037 * include/grub/misc.h (grub_max): New function.
3038
2aad70e2 30392007-10-21 Robert Millan <rmh@aybabtu.com>
3040
3041 * util/misc.c (grub_util_info): Call fflush() before returning.
3042
54b71c4b 30432007-10-20 Robert Millan <rmh@aybabtu.com>
3044
3045 * genmk.rb (Image): Copy `extra_flags' from here ...
3046 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
3047
3048 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
3049 to `argc' and `args' arguments.
3050
a979f513 30512007-10-17 Robert Millan <rmh@aybabtu.com>
3052
3053 * kern/i386/loader.S: New file.
3054
3055 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
3056 * kern/i386/loader.S (grub_linux_prot_size)... to here.
3057 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
3058 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
3059 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
3060 * kern/i386/loader.S (grub_linux_real_addr)... to here.
3061 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
3062 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
3063 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
3064 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
3065 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
3066 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
3067 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
3068 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
3069
3070 * kern/i386/realmode.S: New file.
3071
3072 * kern/i386/pc/startup.S (protstack): Moved from here ...
3073 * kern/i386/realmode.S (protstack)... to here.
3074 * kern/i386/pc/startup.S (gdt): Moved from here ...
3075 * kern/i386/realmode.S (gdt)... to here.
3076 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
3077 * kern/i386/realmode.S (prot_to_real)... to here.
3078
3079 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
3080 `kern/i386/realmode.S'.
3081
825fc8fd 30822007-10-17 Robert Millan <rmh@aybabtu.com>
3083
3084 * include/grub/i386/loader.h: New file.
3085
3086 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
3087 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3088 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3089 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3090 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
3091 * include/grub/i386/loader.h (grub_linux_prot_size)
3092 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3093 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3094 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3095 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
3096
3097 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
3098
e179b2f4 30992007-10-15 Robert Millan <rmh@aybabtu.com>
3100
3101 * normal/misc.c (grub_normal_print_device_info): Do not probe for
3102 filesystem when dev->disk is unset.
3103 Do probe for filesystem even when dev->disk->has_partitions is set.
3104 In case a filesystem is found, always report it.
3105 In case it isn't, if dev->disk->has_partitions is set, report that
3106 a partition table was found instead of reporting that no filesystem
3107 could be identified.
3108
5db82af6 31092007-10-12 Robert Millan <rmh@aybabtu.com>
3110
3111 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
3112 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
3113
68f6ac74 3114 * include/grub/types.h (grub_host_to_target16): New macro.
3115 (grub_host_to_target32): Likewise.
3116 (grub_host_to_target64): Likewise.
3117 (grub_target_to_host16): Likewise.
3118 (grub_target_to_host32): Likewise.
3119 (grub_target_to_host64): Likewise.
5db82af6 3120
3121 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3122 Renamed from to ...
3123 (GRUB_MOD_ALIGN): ...this. Update all users.
3124
68f6ac74 3125 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
3126 grub_host_to_target32.
3127 Replace grub_be_to_cpu32 with grub_target_to_host32.
3128 (load_modules): Likewise.
3129 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
3130 Replace grub_be_to_cpu32 with grub_target_to_host32.
3131 Replace grub_cpu_to_be16 with grub_host_to_target16.
3132 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 3133
3cf497cc 31342007-10-12 Robert Millan <rmh@aybabtu.com>
3135
3136 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
3137 * util/elf/grub-mkimage.c: ... here.
3138
3139 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
3140 `util/powerpc/ieee1275/grub-mkimage.c'.
3141
c8cc3692 31422007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 3143
c8cc3692 3144 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
3145 and make it easier to figure out.
3146 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
3147 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
3148 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
3149 leave us with less than HEAP_MIN_SIZE total heap.
3150 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 3151
5c58b791 31522007-10-03 Robert Millan <rmh@aybabtu.com>
3153
3154 * include/grub/i386/io.h: New file.
3155 * commands/i386/pc/play.c (inb): Removed.
3156 (outb): Removed.
3157 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3158 with grub_outb().
afcd2ef8 3159 * term/i386/pc/serial.c (inb): Removed.
3160 (outb): Removed.
3161 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3162 with grub_outb().
3163 * term/i386/pc/vga.c (inb): Removed.
3164 (outb): Removed.
3165 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3166 with grub_outb().
5c58b791 3167
1a477ed6 31682007-10-02 Robert Millan <rmh@aybabtu.com>
3169
3170 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
3171 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3172 Reported by Marcin Kurek.
3173
6b5d80fa 31742007-09-07 Robert Millan <rmh@aybabtu.com>
3175
3176 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
3177 SmartFirmware version updates (as released by Sven Luther), and avoid
3178 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
3179 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
3180 known broken.
3181
5618afbf 31822007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3183
3184 From Hitoshi Ozeki:
3185 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
3186 when merging two regions.
3187
6139dcd9 31882007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3189
508e39ee 3190 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
3191 * normal/completion.c (grub_normal_do_completion): Likewise.
3192 Reported by Hitoshi Ozeki.
3193
31942007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3195
6139dcd9 3196 Do not use devices at boot in chainloading.
3197
3198 * loader/i386/pc/chainloader.c (boot_drive): New variable.
3199 (boot_part_addr): Likewise.
3200 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
3201 with BOOT_DRIVE and BOOT_PART_ADDR.
3202 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
3203 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
3204
38da6516 32052007-08-29 Robert Millan <rmh@aybabtu.com>
3206
3207 Patch from Simon Peter <dn.tlp@gmx.net>:
3208 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
3209 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
3210 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
3211 util/i386/pc/grub-setup.c_DEPENDENCIES.
3212 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
3213 util/grub-probe.c_DEPENDENCIES.
3214 * conf/powerpc-ieee1275.rmk: Likewise.
3215
29d0928c 32162007-08-28 Robert Millan <rmh@aybabtu.com>
3217
3218 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
3219 to tell grub-mkdevicemap how to name devices.
3220 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
3221 feature).
3222
3223 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
3224 util/i386/get_disk_name.c.
3225 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
3226 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
3227 util/ieee1275/get_disk_name.c.
3228
3229 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
3230
3231 * DISTLIST: Add util/i386/get_disk_name.c and
3232 util/ieee1275/get_disk_name.c.
3233
3234 * util/grub-mkdevicemap.c: Replace device naming logic with
3235 grub_util_get_disk_name() calls.
3236
5a0d3cca 32372007-08-20 Robert Millan <rmh@aybabtu.com>
3238
3239 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
3240 (so that it works for both plural and singular quantities).
3241
8b72db2f 32422007-08-05 Robert Millan <rmh@aybabtu.com>
3243
3244 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
3245 so that [xz] isn't taken into account when determining order.
3246
352466bf 32472007-08-02 Marco Gerards <marco@gnu.org>
3248
3249 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
3250 `include/multiboot2.h', `include/grub/elfload.h',
3251 `include/multiboot.h', `include/grub/multiboot.h',
3252 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
3253 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
3254 `kern/elf.c', `loader/multiboot_loader.c',
3255 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
3256 `loader/i386/pc/multiboot2.c',
3257 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
3258 `util/i386/pc/grub-mkrescue.in'. Remove
3259 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
3260 `include/grub/i386/pc/util/biosdisk.h' and
3261 `include/grub/powerpc/ieee1275/multiboot.h'.
3262
8f096014 32632007-08-02 Bean <bean123ch@gmail.com>
3264
3265 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
3266 (ntfs_mod_SOURCES): New variable.
3267 (ntfs_mod_CFLAGS): Likewise.
3268 (ntfs_mod_LDFLAGS): Likewise.
3269
3270 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
3271 (grub_probe_SOURCES): Likewise.
3272 (grub_emu_SOURCES): Likewise.
3273
3274 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
3275 (grub_emu_SOURCES): Likewise.
3276
3277 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
3278 (grub_emu_SOURCES): Likewise.
3279
3280 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
3281
3282 * fs/ntfs.c: New file.
3283
9959f7db 32842007-08-02 Bean <bean123ch@gmail.com>
3285
3286 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
3287
3288 * file.h (grub_file): Likewise.
3289
3290 * fshelp.h (grub_fshelp_read_file): Likewise.
3291
3292 * util/i386/pc/grub-setup.c (setup): Likewise.
3293 (save_first_sector): Likewise.
3294 (save_blocklists): Likewise.
3295
3296 * fs/affs.c (grub_affs_read_file): Likewise.
3297
3298 * fs/ext2.c (grub_ext2_read_file): Likewise.
3299
3300 * fs/fat.c (grub_fat_read_data): Likewise.
3301
3302 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
3303
3304 * fs/hfs.c (grub_hfs_read_file): Likewise.
3305
3306 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
3307
3308 * fs/jfs.c (grub_jfs_read_file): Likewise.
3309
3310 * fs/minix.c (grub_minix_read_file): Likewise.
3311
3312 * fs/sfs.c (grub_sfs_read_file): Likewise.
3313
3314 * fs/ufs.c (grub_ufs_read_file): Likewise.
3315
3316 * fs/xfs.c (grub_xfs_read_file): Likewise.
3317
3318 * command/blocklist.c (read_blocklist): Likewise.
3319 (print_blocklist): Likewise.
3320
0a203f83 33212007-08-02 Marco Gerards <marco@gnu.org>
3322
3323 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
3324 `util/hostfs.c'.
3325
3326 * disk/host.c: New file.
3327
3328 * util/hostfs.c: Likewise.
3329
3330 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
3331 return `GRUB_ERR_BAD_FS'.
3332 * fs/sfs.c (grub_sfs_mount): Likewise.
3333 * fs/xfs.c (grub_xfs_mount): Likewise.
3334
3335 * include/grub/disk.h (enum grub_disk_dev_id): Add
3336 `GRUB_DISK_DEVICE_HOST_ID'.
3337
3338 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
3339
e5dfe777 33402007-07-24 Jerone Young <jerone@gmail.com>
3341
3342 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
3343 modules for compilation.
3344 * conf/powerpc-ieee1275.rmk: Likewise.
3345
3346 * include/multiboot.h: Move multiboot definitions to one file. Rename
3347 many definitions to not get grub specific.
3348 * include/multiboot2.h: Create header with multiboot 2 definitions.
3349 * include/grub/multiboot.h: Header for grub specific function
3350 prototypes and definitions.
3351 * include/grub/multiboot2.h: Likewise.
3352 * include/grub/multiboot_loader.h: Likewise.
3353 * include/grub/i386/pc/multiboot.h: Removed.
3354 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
3355
3356 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
3357 and 2 to allow for one multiboot and module commands.
3358 * loader/multiboot2.c: Add multiboot2 functionality.
3359 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
3360 and definition names.
3361 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
3362 2 functions.
3363 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
3364 ieee1275 specific multiboot2 code.
3365
3366 * kern/i386/pc/startup.S: Change headers and definition names for
3367 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
3368
daf0f0ba 33692007-07-22 Robert Millan <rmh@aybabtu.com>
3370
3371 * geninitheader.sh: Process file specified in first parameter rather
3372 than hardcoding grub_modules_init.lst.
fe6b695a 3373 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 3374 than hardcoding grub_modules_init.h.
3375
3376 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
3377 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
3378 grub_probe_init.[ch] and grub_setup_init.[ch].
3379
3380 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
3381 grub_modules_init.h with grub_emu_init.h.
3382 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
3383 grub_probe_init.[ch] files.
3384 * conf/i386-efi.rmk: Likewise.
3385 * conf/i386-pc.rmk: Likewise.
3386 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
3387 grub_setup_init.[ch] files.
3388
3389 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
3390 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
3391 to initialize modules rather than a list of hardcoded functions.
3392 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
3393 grub_init_all() to initialize modules rather than a list of hardcoded
3394 functions.
3395
54cdc1cc 33962007-07-22 Robert Millan <rmh@aybabtu.com>
3397
3398 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
3399 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
3400
ad0686cc 34012007-07-22 Robert Millan <rmh@aybabtu.com>
3402
3403 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3404 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
3405 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
3406 flag when running on SmartFirmware.
3407 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
3408 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
3409 was set.
3410
3411 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3412 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
3413 rather than decreasing it.
3414
3415 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
3416 there's not enough space to do it, fail in the same way as when it
3417 can't be done because there are no partitions.
3418
3419 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
3420 when nvsetenv failed.
3421
969c02ec 34222007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
3423
3424 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
3425 because this rule is automatically generated.
3426 (grub-mkrescue): Removed for the same reason as above.
3427
5a79f472 34282007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
3429
3430 Migrate to GNU General Public License Version 3.
3431
3432 * COPYING: Replaced with the plain text version of GPLv3.
3433
3434 * config.guess: Updated from gnulib.
3435 * config.sub: Likewise.
3436
3437 * geninit.sh: Output a GPLv3 copyright notice.
3438 * geninitheader.sh: Likewise.
3439 * genmodsrc.sh: Likewise.
3440 * gensymlist.sh.in: Likewise.
3441
3442 * boot/i386/pc/boot.S: Upgraded to GPLv3.
3443 * boot/i386/pc/diskboot.S: Likewise.
3444 * boot/i386/pc/pxeboot.S: Likewise.
3445 * commands/blocklist.c: Likewise.
3446 * commands/boot.c: Likewise.
3447 * commands/cat.c: Likewise.
3448 * commands/cmp.c: Likewise.
3449 * commands/configfile.c: Likewise.
3450 * commands/echo.c: Likewise.
3451 * commands/help.c: Likewise.
3452 * commands/ls.c: Likewise.
3453 * commands/search.c: Likewise.
3454 * commands/terminal.c: Likewise.
3455 * commands/test.c: Likewise.
3456 * commands/videotest.c: Likewise.
3457 * commands/i386/cpuid.c: Likewise.
3458 * commands/i386/pc/halt.c: Likewise.
3459 * commands/i386/pc/play.c: Likewise.
3460 * commands/i386/pc/reboot.c: Likewise.
3461 * commands/i386/pc/vbeinfo.c: Likewise.
3462 * commands/i386/pc/vbetest.c: Likewise.
3463 * commands/ieee1275/halt.c: Likewise.
3464 * commands/ieee1275/reboot.c: Likewise.
3465 * commands/ieee1275/suspend.c: Likewise.
3466 * disk/loopback.c: Likewise.
3467 * disk/lvm.c: Likewise.
3468 * disk/raid.c: Likewise.
3469 * disk/efi/efidisk.c: Likewise.
3470 * disk/i386/pc/biosdisk.c: Likewise.
3471 * disk/ieee1275/ofdisk.c: Likewise.
3472 * font/manager.c: Likewise.
3473 * fs/affs.c: Likewise.
3474 * fs/ext2.c: Likewise.
3475 * fs/fat.c: Likewise.
3476 * fs/fshelp.c: Likewise.
3477 * fs/hfs.c: Likewise.
3478 * fs/hfsplus.c: Likewise.
3479 * fs/iso9660.c: Likewise.
3480 * fs/jfs.c: Likewise.
3481 * fs/minix.c: Likewise.
3482 * fs/sfs.c: Likewise.
3483 * fs/ufs.c: Likewise.
3484 * fs/xfs.c: Likewise.
3485 * hello/hello.c: Likewise.
3486 * include/grub/acorn_filecore.h: Likewise.
3487 * include/grub/arg.h: Likewise.
3488 * include/grub/bitmap.h: Likewise.
3489 * include/grub/boot.h: Likewise.
3490 * include/grub/cache.h: Likewise.
3491 * include/grub/device.h: Likewise.
3492 * include/grub/disk.h: Likewise.
3493 * include/grub/dl.h: Likewise.
3494 * include/grub/elfload.h: Likewise.
3495 * include/grub/env.h: Likewise.
3496 * include/grub/err.h: Likewise.
3497 * include/grub/file.h: Likewise.
3498 * include/grub/font.h: Likewise.
3499 * include/grub/fs.h: Likewise.
3500 * include/grub/fshelp.h: Likewise.
3501 * include/grub/gzio.h: Likewise.
3502 * include/grub/hfs.h: Likewise.
3503 * include/grub/kernel.h: Likewise.
3504 * include/grub/loader.h: Likewise.
3505 * include/grub/lvm.h: Likewise.
3506 * include/grub/misc.h: Likewise.
3507 * include/grub/mm.h: Likewise.
3508 * include/grub/net.h: Likewise.
3509 * include/grub/normal.h: Likewise.
3510 * include/grub/parser.h: Likewise.
3511 * include/grub/partition.h: Likewise.
3512 * include/grub/pc_partition.h: Likewise.
3513 * include/grub/raid.h: Likewise.
3514 * include/grub/rescue.h: Likewise.
3515 * include/grub/script.h: Likewise.
3516 * include/grub/setjmp.h: Likewise.
3517 * include/grub/symbol.h: Likewise.
3518 * include/grub/term.h: Likewise.
3519 * include/grub/terminfo.h: Likewise.
3520 * include/grub/tparm.h: Likewise.
3521 * include/grub/types.h: Likewise.
3522 * include/grub/video.h: Likewise.
3523 * include/grub/efi/api.h: Likewise.
3524 * include/grub/efi/chainloader.h: Likewise.
3525 * include/grub/efi/console.h: Likewise.
3526 * include/grub/efi/console_control.h: Likewise.
3527 * include/grub/efi/disk.h: Likewise.
3528 * include/grub/efi/efi.h: Likewise.
3529 * include/grub/efi/pe32.h: Likewise.
3530 * include/grub/efi/time.h: Likewise.
3531 * include/grub/i386/linux.h: Likewise.
3532 * include/grub/i386/setjmp.h: Likewise.
3533 * include/grub/i386/types.h: Likewise.
3534 * include/grub/i386/efi/kernel.h: Likewise.
3535 * include/grub/i386/efi/loader.h: Likewise.
3536 * include/grub/i386/efi/time.h: Likewise.
3537 * include/grub/i386/pc/biosdisk.h: Likewise.
3538 * include/grub/i386/pc/boot.h: Likewise.
3539 * include/grub/i386/pc/chainloader.h: Likewise.
3540 * include/grub/i386/pc/console.h: Likewise.
3541 * include/grub/i386/pc/init.h: Likewise.
3542 * include/grub/i386/pc/kernel.h: Likewise.
3543 * include/grub/i386/pc/loader.h: Likewise.
3544 * include/grub/i386/pc/memory.h: Likewise.
3545 * include/grub/i386/pc/multiboot.h: Likewise.
3546 * include/grub/i386/pc/serial.h: Likewise.
3547 * include/grub/i386/pc/time.h: Likewise.
3548 * include/grub/i386/pc/vbe.h: Likewise.
3549 * include/grub/i386/pc/vbeblit.h: Likewise.
3550 * include/grub/i386/pc/vbefill.h: Likewise.
3551 * include/grub/i386/pc/vbeutil.h: Likewise.
3552 * include/grub/i386/pc/vga.h: Likewise.
3553 * include/grub/ieee1275/ieee1275.h: Likewise.
3554 * include/grub/ieee1275/ofdisk.h: Likewise.
3555 * include/grub/powerpc/libgcc.h: Likewise.
3556 * include/grub/powerpc/setjmp.h: Likewise.
3557 * include/grub/powerpc/types.h: Likewise.
3558 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
3559 * include/grub/powerpc/ieee1275/console.h: Likewise.
3560 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
3561 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
3562 * include/grub/powerpc/ieee1275/loader.h: Likewise.
3563 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
3564 * include/grub/powerpc/ieee1275/time.h: Likewise.
3565 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
3566 * include/grub/sparc64/libgcc.h: Likewise.
3567 * include/grub/sparc64/setjmp.h: Likewise.
3568 * include/grub/sparc64/types.h: Likewise.
3569 * include/grub/sparc64/ieee1275/console.h: Likewise.
3570 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
3571 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
3572 * include/grub/sparc64/ieee1275/time.h: Likewise.
3573 * include/grub/util/biosdisk.h: Likewise.
3574 * include/grub/util/getroot.h: Likewise.
3575 * include/grub/util/lvm.h: Likewise.
3576 * include/grub/util/misc.h: Likewise.
3577 * include/grub/util/raid.h: Likewise.
3578 * include/grub/util/resolve.h: Likewise.
3579 * io/gzio.c: Likewise.
3580 * kern/device.c: Likewise.
3581 * kern/disk.c: Likewise.
3582 * kern/dl.c: Likewise.
3583 * kern/elf.c: Likewise.
3584 * kern/env.c: Likewise.
3585 * kern/err.c: Likewise.
3586 * kern/file.c: Likewise.
3587 * kern/fs.c: Likewise.
3588 * kern/loader.c: Likewise.
3589 * kern/main.c: Likewise.
3590 * kern/misc.c: Likewise.
3591 * kern/mm.c: Likewise.
3592 * kern/parser.c: Likewise.
3593 * kern/partition.c: Likewise.
3594 * kern/rescue.c: Likewise.
3595 * kern/term.c: Likewise.
3596 * kern/efi/efi.c: Likewise.
3597 * kern/efi/init.c: Likewise.
3598 * kern/efi/mm.c: Likewise.
3599 * kern/i386/dl.c: Likewise.
3600 * kern/i386/efi/init.c: Likewise.
3601 * kern/i386/efi/startup.S: Likewise.
3602 * kern/i386/pc/init.c: Likewise.
3603 * kern/i386/pc/lzo1x.S: Likewise.
3604 * kern/i386/pc/startup.S: Likewise.
3605 * kern/ieee1275/ieee1275.c: Likewise.
3606 * kern/powerpc/cache.S: Likewise.
3607 * kern/powerpc/dl.c: Likewise.
3608 * kern/powerpc/ieee1275/cmain.c: Likewise.
3609 * kern/powerpc/ieee1275/crt0.S: Likewise.
3610 * kern/powerpc/ieee1275/init.c: Likewise.
3611 * kern/powerpc/ieee1275/openfw.c: Likewise.
3612 * kern/sparc64/cache.S: Likewise.
3613 * kern/sparc64/dl.c: Likewise.
3614 * kern/sparc64/ieee1275/init.c: Likewise.
3615 * kern/sparc64/ieee1275/openfw.c: Likewise.
3616 * loader/efi/chainloader.c: Likewise.
3617 * loader/efi/chainloader_normal.c: Likewise.
3618 * loader/i386/efi/linux.c: Likewise.
3619 * loader/i386/efi/linux_normal.c: Likewise.
3620 * loader/i386/pc/chainloader.c: Likewise.
3621 * loader/i386/pc/chainloader_normal.c: Likewise.
3622 * loader/i386/pc/linux.c: Likewise.
3623 * loader/i386/pc/linux_normal.c: Likewise.
3624 * loader/i386/pc/multiboot.c: Likewise.
3625 * loader/i386/pc/multiboot_normal.c: Likewise.
3626 * loader/powerpc/ieee1275/linux.c: Likewise.
3627 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3628 * normal/arg.c: Likewise.
3629 * normal/cmdline.c: Likewise.
3630 * normal/command.c: Likewise.
3631 * normal/completion.c: Likewise.
3632 * normal/execute.c: Likewise.
3633 * normal/function.c: Likewise.
3634 * normal/lexer.c: Likewise.
3635 * normal/main.c: Likewise.
3636 * normal/menu.c: Likewise.
3637 * normal/menu_entry.c: Likewise.
3638 * normal/misc.c: Likewise.
3639 * normal/parser.y: Likewise.
3640 * normal/script.c: Likewise.
3641 * normal/i386/setjmp.S: Likewise.
3642 * normal/powerpc/setjmp.S: Likewise.
3643 * normal/sparc64/setjmp.S: Likewise.
3644 * partmap/acorn.c: Likewise.
3645 * partmap/amiga.c: Likewise.
3646 * partmap/apple.c: Likewise.
3647 * partmap/gpt.c: Likewise.
3648 * partmap/pc.c: Likewise.
3649 * partmap/sun.c: Likewise.
3650 * term/gfxterm.c: Likewise.
3651 * term/terminfo.c: Likewise.
3652 * term/efi/console.c: Likewise.
3653 * term/i386/pc/console.c: Likewise.
3654 * term/i386/pc/serial.c: Likewise.
3655 * term/i386/pc/vesafb.c: Likewise.
3656 * term/i386/pc/vga.c: Likewise.
3657 * term/ieee1275/ofconsole.c: Likewise.
3658 * util/biosdisk.c: Likewise.
3659 * util/console.c: Likewise.
3660 * util/genmoddep.c: Likewise.
3661 * util/getroot.c: Likewise.
3662 * util/grub-emu.c: Likewise.
3663 * util/grub-mkdevicemap.c: Likewise.
3664 * util/grub-probe.c: Likewise.
3665 * util/lvm.c: Likewise.
3666 * util/misc.c: Likewise.
3667 * util/raid.c: Likewise.
3668 * util/resolve.c: Likewise.
3669 * util/update-grub.in: Likewise.
3670 * util/update-grub_lib.in: Likewise.
3671 * util/grub.d/00_header.in: Likewise.
3672 * util/grub.d/10_hurd.in: Likewise.
3673 * util/grub.d/10_linux.in: Likewise.
3674 * util/i386/efi/grub-install.in: Likewise.
3675 * util/i386/efi/grub-mkimage.c: Likewise.
3676 * util/i386/pc/grub-install.in: Likewise.
3677 * util/i386/pc/grub-mkimage.c: Likewise.
3678 * util/i386/pc/grub-mkrescue.in: Likewise.
3679 * util/i386/pc/grub-setup.c: Likewise.
3680 * util/i386/pc/misc.c: Likewise.
3681 * util/powerpc/ieee1275/grub-install.in: Likewise.
3682 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
3683 * util/powerpc/ieee1275/misc.c: Likewise.
3684 * video/bitmap.c: Likewise.
3685 * video/video.c: Likewise.
3686 * video/i386/pc/vbe.c: Likewise.
3687 * video/i386/pc/vbeblit.c: Likewise.
3688 * video/i386/pc/vbefill.c: Likewise.
3689 * video/i386/pc/vbeutil.c: Likewise.
3690 * video/readers/tga.c: Likewise.
3691
3572d015 36922007-07-02 Robert Millan <rmh@aybabtu.com>
3693
3694 * conf/i386-efi.rmk: Replace obsolete reference to
3695 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
3696 with util/getroot.c.
3697 * conf/powerpc-ieee1275.rmk: Likewise.
3698 * conf/sparc64-ieee1275.rmk: Likewise.
3699
3700 * util/grub-emu.c (main): Fix unchecked pointer handling.
3701
2c2a681b 37022007-07-02 Robert Millan <rmh@aybabtu.com>
3703
3704 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
3705 invocation to fail, in order to support partition-less media.
3706
3707 * util/i386/pc/grub-install.in: Likewise.
3708
3709 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
3710 which fs or partmap modules are needed (akin to its sister scripts).
3711
3712 Also use grub-probe to get rid of unportable /proc/mounts check.
3713
3714 Print the same informational message that the other scripts do, before
fe6b695a 3715 exiting.
2c2a681b 3716
6193defe 37172007-06-23 Robert Millan <rmh@aybabtu.com>
3718
fe6b695a 3719 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 3720 a font file can be found and, if so, echo the GRUB path to it.
3721
3722 * util/update-grub.in: Handle multiple terminals depending on user
3723 input, platform availability and font file presence. Propagate
3724 variables of our findings to /etc/grub.d/ children.
3725
3726 * util/grub.d/00_header.in: Handle multiple terminals, based on
3727 environment setup by update-grub.
3728
eface1dc 37292007-06-23 Robert Millan <rmh@aybabtu.com>
3730
ba50d28f 3731 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 3732
bf697e28 37332007-06-21 Robert Millan <rmh@aybabtu.com>
3734
3735 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
3736 indicate end of data section in kernel image.
3737 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
3738 GRUB_KERNEL_MACHINE_DATA_END.
3739
3740 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
3741 space for it.
3742 * kern/i386/efi/startup.S: Likewise.
3743
3744 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
3745 during image generation. Implement --prefix option to override this
3746 patch.
3747 * util/i386/efi/grub-mkimage.c: Likewise.
3748
3749 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
3750 code to make path relative to its root into a separate function.
3751
3752 * util/i386/pc/grub-install.in: Use newly provided
3753 make_system_path_relative_to_its_root() to convert ${grubdir}, then
3754 pass the result to grub-install --prefix.
3755
baa574b4 37562007-06-13 Robert Millan <rmh@aybabtu.com>
3757
3758 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
3759 DEFAULT_DEVICE_MAP.
3760 * util/grub-emu.c: Use above definitions from misc.h instead of
3761 defining them.
3762 * util/grub-mkdevicemap.c: Likewise.
3763 * util/i386/pc/grub-setup.c: Likewise.
3764 * util/grub-probe.c: Likewise.
3765 (probe): Abort with grub_util_error() when either
3766 grub_guess_root_device or grub_util_get_grub_dev fails.
3767
0215dcbf 37682007-06-12 Robert Millan <rmh@aybabtu.com>
3769
3770 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
3771 "pager" assignment.
3772 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
3773 "pcdata".
3774 * util/grub-probe.c (probe): Likewise for "drive_name".
3775
8af2ab7b 37762007-06-11 Robert Millan <rmh@aybabtu.com>
3777
3778 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
3779 not just the cdrom one.
3780
59d31694 37812007-06-11 Robert Millan <rmh@aybabtu.com>
3782
3783 * util/i386/pc/grub-mkrescue.in: Add "set -e".
3784 Add --pkglibdir=DIR option to override pkglibdir.
3785 Mention --image-type=TYPE in help output.
3786 Fix --grub-mkimage (it was a no-op).
fe6b695a 3787 Abort gracefully when no parameter is given.
59d31694 3788
7ee367e4 37892007-06-11 Robert Millan <rmh@aybabtu.com>
3790
3791 * util/i386/pc/grub-mkrescue.in: New file.
3792 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
3793 * Makefile.in: Handle bin_SCRIPTS.
3794
29b0ed46 37952007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
3796
3797 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
3798 list of video modes.
3799
c0f90770 38002007-06-06 Robert Millan <rmh@aybabtu.com>
3801
3802 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
3803 file doesn't exist, or if it is in a filesystem grub can't read.
3804
3805 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
3806 not abort if GRUB_DRIVE could not be defined. Rearrange generated
3807 header comment to fit in 80 columns when the variables are resolved.
3808
3809 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
3810 could be identified by update-grub. Remove redundant check for
fe6b695a 3811 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 3812 handles that).
3813
fb36dc26 38142007-06-04 Robert Millan <rmh@aybabtu.com>
3815
3816 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
3817
3818 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
3819
3820 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
3821
0c68c93e 38222007-06-04 Robert Millan <rmh@aybabtu.com>
3823
3824 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
3825
3826 * include/grub/partition.h: Declare grub_apple_partition_map_init and
3827 grub_apple_partition_map_fini.
3828
3829 * util/biosdisk.c
3830 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
3831 to access >2 TiB disks).
3832
3833 Print disk->total_sectors with %llu instead of %lu, since this
3834 variable is always 64-bit (prevents wrong disk size from being displayed
3835 on either >2 TiB disk or big-endian CPU).
3836
3837 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
3838 into a generic case that supports all (sane) partition maps.
3839
3840 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
3841 breaks big-endian.
3842
3843 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
3844 and grub_apple_partition_map_fini() after that.
3845
0f23eb74 38462007-06-01 Robert Millan <rmh@aybabtu.com>
3847
3848 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
3849
3850 * util/grub.d/00_header.in: Only enable gfxterm when
3851 convert_system_path_to_grub_path() succeeds.
3852
42c71976 38532007-05-20 Robert Millan <rmh@aybabtu.com>
3854
3855 * util/update-grub_lib.in: New file.
3856 * DISTLIST: Add update-grub_lib.in.
3857 * conf/common.rmk: Generate update-grub_lib and install it in
3858 $(lib_DATA).
3859 * Makefile.in: Add install routine for $(lib_DATA).
3860
3861 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
3862 function provided by update-grub_lib to support arbitrary paths of
3863 unifont.pff.
3864 * util/update-grub.in: Use convert_system_path_to_grub_path() to
3865 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
3866
5beb2291 38672007-05-19 Robert Millan <rmh@aybabtu.com>
3868
3869 * commands/i386/cpuid.c: New module.
3870 * DISTLIST: Add it.
3871 * conf/i386-efi.rmk: Enable cpuid.mod.
3872 * conf/i386-pc.rmk: Likewise.
3873
7262eca1 38742007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3875
3876 * kern/disk.c (grub_disk_read): Check return value of
3877 grub_realloc().
3878
260ba823 38792007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3880
3881 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
3882 arrays.
3883 * disk/raid.c (grub_raid_open): Likewise.
3884
1ecb6cf2 38852007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3886
3887 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
3888 stack instead of on the heap.
3889
3890 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
3891 before doing a read on it.
3892
3893 * configure.ac: Only use -fno-stack-protector for the target
3894 environment.
3895
21c8cbb1 38962007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3897
3898 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
3899 __attribute_ ((unused)) to mode_type argument.
3900
3901 * util/getroot.c (grub_guess_root_device): Fix #endif.
3902
3903 * kern/misc.c (memcmp): Fix prototype.
3904
3905 * include/grub/partition.h [GRUB_UTIL]
3906 (grub_gpt_partition_map_init): Add prototype.
3907 (grub_gpt_partition_map_fini): Likewise.
3908
3909 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
3910 at the right place.
3911
3912 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3913 (grub_fat_read_data): Likewise.
3914 (grub_fat_find_dir): Likewise.
3915
3916 * font/manager.c (find_glyph): Make table a const.
3917 (grub_font_get_glyph): Remove bitmap from if statement.
3918
849d55d3 39192007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
3920
3921 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3922 code, first search for device in /dev/mapper, then in /dev.
3923 (grub_util_get_grub_dev): New function.
3924 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3925 prototype.
3926 * util/grub-probe.c (probe): Remove check for RAID, call
3927 grub_util_get_grub_dev() instead of
3928 grub_util_biosdisk_get_grub_dev().
3929 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3930 grub_util_biosdisk_get_grub_dev().
3931 * util/i386/pc/grub-setup.c (main): Likewise.
3932
8fff7c2f 39332007-05-16 Robert Millan <rmh@aybabtu.com>
3934
3935 * DISTLIST: Update for the latest changes.
3936 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3937 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3938 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3939 grub/util/biosdisk.h.
3940 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3941 grub/util/biosdisk.h.
3942
48e12b52 39432007-05-16 Robert Millan <rmh@aybabtu.com>
3944
3945 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3946
46b9d128 39472007-05-16 Robert Millan <rmh@aybabtu.com>
3948
3949 * util/i386/efi/grub-install.in: New.
3950 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3951 newly added grub-install.
3952 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3953 include.
3954 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3955 grub/util/biosdisk.h.
3956 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3957 grub/util/biosdisk.h.
3958
2d1a40a9 39592007-05-16 Robert Millan <rmh@aybabtu.com>
3960
3961 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3962 * include/grub/util/biosdisk.h: ... here.
3963 * util/i386/pc/biosdisk.c: Moved to ...
3964 * util/biosdisk.c: ... here.
3965 * util/i386/pc/getroot.c: Moved to ...
3966 * util/getroot.c: ... here.
3967 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3968 * util/grub-mkdevicemap.c: ... here.
3969 * util/i386/pc/grub-probe.c: Moved to ...
3970 * util/grub-probe.c: ... here.
3971
9e26e3bc 39722007-05-15 Robert Millan <rmh@aybabtu.com>
3973
3974 * util/update-grub.in: Remove duplicated line in grub.cfg header
3975 message.
3976
57f96397 39772007-05-13 Robert Millan <rmh@aybabtu.com>
3978
3979 * util/update-grub.in: Fix a few assumptions about the devices holding
3980 /, /boot and /boot/grub being the same.
3981 * util/grub.d/00_header.in: Likewise.
3982 * util/grub.d/10_hurd.in: Likewise.
3983 * util/grub.d/10_linux.in: Likewise.
3984
3985 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3986 patterns. Use that to define the `.old' suffix as older than `'.
3987
3988 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3989
3990 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3991 the grub.cfg header message.
3992
2e610d62 39932007-05-11 Robert Millan <rmh@aybabtu.com>
3994
3995 * util/update-grub.in: Create device.map if it doesn't already exist,
3996 before attempting to run grub-probe.
3997 Check for grub-probe and grub-mkdevicemap with the same code
3998 grub-install is using.
3999 Remove test mode.
4000
3f6a10ef 40012007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
4002
4003 * Makefile.in: Add the datarootdir autoconf variable.
4004
02e7b75e 40052007-05-09 Robert Millan <rmh@aybabtu.com>
4006
4007 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
fe6b695a 4008 fail gracefully if dev->disk->partition == NULL.
02e7b75e 4009
75f396cc 40102007-05-07 Robert Millan <rmh@aybabtu.com>
4011
4012 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
4013 determine partition map module.
4014 * util/i386/pc/grub-install.in: Use this feature to decide which
4015 partition module to load, instead of hardcoding pc and gpt.
4016
da65cb36 40172007-05-07 Robert Millan <rmh@aybabtu.com>
4018
4019 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
4020 source directory differs from build directory.
4021
b57d6a91 40222007-05-05 Robert Millan <rmh@aybabtu.com>
4023
4024 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
4025 initialisation.
4026
509d00f1 40272007-05-05 Robert Millan <rmh@aybabtu.com>
4028
4029 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
4030
c48f23ef 40312007-05-05 Robert Millan <rmh@aybabtu.com>
4032
4033 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
4034 command-line arguments via ${GRUB_CMDLINE_LINUX}.
4035
20b97658 40362007-05-05 Robert Millan <rmh@aybabtu.com>
4037
4038 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
4039 (grub_probe_SOURCES): Likewise.
4040 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
4041 GPT and initialize dos_part and bsd_part accordingly.
4042 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
4043 install_bsd_part.
4044 (main): Activate gpt module for use during partition identification,
4045 and deactivate it afterwards.
4046 * util/i386/pc/grub-install.in: Add gpt module to core.img.
4047 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
4048 partition identification, and deactivate it afterwards.
4049
99123174 40502007-05-05 Robert Millan <rmh@aybabtu.com>
4051
4052 * term/i386/pc/console.c (grub_console_fini): Call
4053 grub_term_set_current() before grub_term_unregister().
4054
ebd97f6e 40552007-05-04 Robert Millan <rmh@aybabtu.com>
4056
4057 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
4058 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
4059 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
4060 and update-grub_DATA.
4061 * conf/common.rmk: Build and install update-grub components.
4062 * conf/common.mk: Regenerate.
4063 * util/update-grub.in: New. Core of update-grub.
4064 * util/grub.d/00_header.in: New. Generates grub.cfg header.
4065 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
4066 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
4067 * util/grub.d/README: New. Document grub.d directory layout.
4068
b06a264d 40692007-05-01 Robert Millan <rmh@aybabtu.com>
4070
4071 * util/grub-emu.c: Move initialization functions
4072 grub_util_biosdisk_init() and grub_init_all() before
4073 grub_util_biosdisk_get_grub_dev(), which relies on them.
4074
41f0050e 40752007-04-19 Robert Millan <rmh@aybabtu.com>
4076
4077 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
4078 it is used later.
4079
04582bb3 40802007-04-18 Jerone Young <jerone@gmail.com>
4081
4082 * kernel/elf.c: Add missing parenthesis for conditional statement
4083 stanza.
4084
08db4632 40852007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 4086
08db4632 4087 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
4088 continue on and look for device node with real device name.
4089
801b76be 40902007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 4091
fe6b695a 4092 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 4093 ability.
4094 * Makefile.in: Add autoconf package transformation code.
4095 * util/i386/pc/grub-install.in: Likewise.
4096 * util/powerpc/ieee1275/grub-install.in: Likewise.
4097
6795c4e1 40982007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
4099
4100 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
4101 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
4102 (EXT2_REVISION): Likewise.
4103 (EXT2_INODE_SIZE): Likewise.
4104 (struct grub_ext2_block_group): Added a missing member
4105 "used_dirs".
4106 (grub_ext2_read_inode): Divide by the inode size in a superblock
4107 instead of 128 to obtain INODES_PER_BLOCK.
4108 Use the macro EXT2_INODE_SIZE instead of directly using
4109 SBLOCK->INODE_SIZE.
4110
d70af616 41112007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
4112
4113 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
4114 superblock instead of the structure size to compute an
4115 offset. This fixes the problem that GRUB could not read a
4116 filesystem when inode size is different from 128-byte.
4117
3b801603 41182007-03-05 Marco Gerards <marco@gnu.org>
4119
4120 * normal/main.c (read_config_file): When "menu" is not set, create
4121 an initial context.
4122
4785bfe4 41232007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4124
4125 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
4126 (HEAP_LIMIT): New macro.
4127 (grub_claim_heap): Claim memory up to `heaplimit'.
4128
a0cbb023 41292007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4130
4131 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
4132 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
4133 (_start): Likewise.
4134 (grub_arch_modules_addr): Return address after `_end'.
4135 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
4136 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
4137 (add_segments): Calculate `_end' from phdr size and location.
4138 (ALIGN_UP): Moved to ...
4139 * include/grub/misc.h: here.
4140 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4141 New macro.
4142 (GRUB_IEEE1275_MODULE_BASE): Removed.
4143
fd7d8eba 41442007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4145
4146 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
4147 loop boundary.
4148
9b09e6fc 41492007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4150
4151 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
4152 All users updated.
4153 (grub_elf64_load_hook_t): Likewise.
4154 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
4155 debug output.
4156
3ce27299 41572007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4158
4159 * kern/mm.c: Update copyright.
4160 (grub_mm_debug): Correct syntax error.
4161 (grub_mm_dump_free): New function.
4162 (grub_debug_free): Call `grub_free'.
4163 * include/grub/mm.h: Update copyright.
4164 (grub_mm_dump_free): Add declaration.
4165
077d5fee 41662007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4167
4168 * include/grub/ieee1275/ieee1275.h: Update copyright.
4169 * kern/powerpc/ieee1275/init.c: Likewise.
4170 * kern/powerpc/ieee1275/openfw.c: Likewise.
4171
4172 * loader/powerpc/ieee1275/linux.c: Likewise.
4173 * include/grub/elfload.h: Likewise.
4174 * kern/elf.c: Likewise.
4175 (grub_elf32_load): Pass `base' and `size' parameters. Update all
4176 callers.
4177 (grub_elf64_load): Likewise.
4178 (grub_elf32_load_segment): Move to a nested function.
4179 (grub_elf64_load_segment): Likewise.
4180
dc946850 41812007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4182
4183 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
4184 prototype.
4185 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
4186 (grub_heap_len): Likewise.
4187 (HEAP_SIZE): New macro.
4188 (grub_claim_heap): New function.
4189 (grub_machine_init): Don't claim heap directly. Call
4190 `grub_claim_heap'.
4191 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
4192 (grub_available_iterate): New function.
4193
baa2a121 41942007-02-03 Thomas Schwinge <tschwinge@gnu.org>
4195
4196 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
4197 * configure.ac: Use it for testing the HOST and TARGET compilers.
4198
4fe9862e 41992006-12-13 Thomas Schwinge <tschwinge@gnu.org>
4200
4201 * Makefile.in (enable_grub_emu): New variable.
4202 * configure.ac (--enable-grub-emu): New option.
4203 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
4204 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
4205 * conf/i386-pc.rmk: Likewise.
4206 * conf/powerpc-ieee1275.rmk: Likewise.
4207 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
4208
a8aa5762 42092006-12-12 Marco Gerards <marco@gnu.org>
4210
4211 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
4212
4213 * kern/env.c (grub_env_unset): Don't free the member `value' when
4214 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
4215 pointer.
4216
4217 * normal/main.c (current_menu): Removed.
4218 (free_menu): Unset the `menu' environment variable.
4219 (grub_normal_menu_addentry): Make use of the environment variable
4220 `menu', instead of using the global `current_menu'. Allocate
4221 memory for the sourcecode of this entry.
4222 (read_config_file): New argument `nested', changed all callers.
4223 Only in the case of a new context, initialize a new menu. Set the
4224 `menu' environment variable.
4225 (grub_normal_execute): Don't set and unset the environment
4226 variable `menu' here anymore. Only free the menu when leaving the
4227 context.
4228
4229 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
4230 leak.
4231
957b3a3e 42322006-12-11 Marco Gerards <marco@gnu.org>
4233
4234 * normal/menu_entry.c (run): Fix off by one bug so the last line
4235 is executed. Move the loader check to outside the loop.
4236
ef875714 42372006-12-08 Hollis Blanchard <hollis@penguinppc.org>
4238
4239 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
4240
4e739985 42412006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
4242
4243 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
4244 the number of sectors. Reported by Andrey Shuvikov
4245 <mr_hyro@yahoo.com>.
4246
790707f2 42472006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
4248
4249 * kern/disk.c (grub_disk_read): When there is a read error, always
4250 try to read only the necessary data.
4251
4252 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
4253 disk/raid.c.
4254 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
4255 prototype.
4256 [GRUB_UTIL] (grub_raid_fini): Likewise.
4257 [GRUB_UTIL] (grub_lvm_init): Likewise.
4258 [GRUB_UTIL] (grub_lvm_fini): Likewise.
4259 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
4260 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
4261 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
4262 and grub_raid_fini().
4263
03e58196 42642006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
4265
4266 * include/grub/types.h (__unused): Rename to UNUSED.
4267 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
4268 (grub_elf64_size): Likewise.
4269
ae4f23bf 42702006-11-03 Hollis Blanchard <hollis@penguinppc.org>
4271
4272 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
4273 grub_error_push and grub_error_pop in the error-handling path.
4274 (grub_elf32_load_segment): Only call grub_file_read with non-zero
4275 length.
4276
2166cc83 42772006-11-03 Hollis Blanchard <hollis@penguinppc.org>
4278
4279 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
4280 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4281 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4282 (kernel_elf_SOURCES): Likewise.
4283 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
4284 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
4285 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4286 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4287 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
4288 (elf_mod_SOURCES): New variable.
4289 (elf_mod_CFLAGS): Likewise.
4290 (elf_mod_LDFLAGS): Likewise.
4291 * include/grub/types.h (__unused): New macro.
4292 * include/grub/elfload.h: New file.
4293 * kern/elf.c: Likewise.
4294 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
4295 (ELF32_LOADMASK): New macro.
4296 (ELF64_LOADMASK): Likewise.
4297 (vmlinux): Removed.
4298 (grub_linux_load32): New function.
4299 (grub_linux_load64): Likewise.
4300 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
4301 Use grub_elf_t instead of grub_file_t.
4302
a09d5aa5 43032006-11-02 Hollis Blanchard <hollis@penguinppc.org>
4304
4305 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
4306 `catch_result' to struct set_color_args.
4307
d976fc51 43082006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4309
4310 * normal/menu.c: Include grub/script.h.
4311 * normal/menu_entry.c: Likewise.
4312 * include/grub/normal.h: Do not include grub/script.h.
4313
67507549 43142006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4315
4316 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
4317
69203a99 43182006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4319
4320 * kern/disk.c (grub_disk_open): Print debug messages when opening a
4321 disk.
4322 (grub_disk_close): Print debug messages when closing a disk.
4323 (grub_disk_read): Print debug messages when disk read fails.
4324 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
4325 filesystem type.
4326 * kern/partition.c: Include misc.h.
4327 (grub_partition_iterate): Print debug messages when detecting
4328 partition type.
4329
e2b8278c 43302006-10-27 Hollis Blanchard <hollis@penguinppc.org>
4331
4332 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
4333 is negative.
4334 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
4335
97b2f2ff 43362006-10-26 Hollis Blanchard <hollis@penguinppc.org>
4337
4338 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4339 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
4340
6555d655 43412006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
4342
4343 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
4344 instead of sizeof(lv). Patch by Michael Guntsche.
4345
4d42b77f 43462006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
4347
4348 * disk/lvm.c: Rename VGS to VG_LIST.
4349 (grub_lvm_iterate): Change VGS->LV to VG-LV.
4350 (grub_lvm_open): Likewise.
4351 Thanks to Michael Guntsche for finding this bug.
4352
5d74d927 43532006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4354
4355 * configure.ac (AC_INIT): Bumped to 1.95.
4356
a1bb27e4 43572006-10-14 Robert Millan <rmh@aybabtu.com>
4358
4359 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
4360 with "/dev/.static/dev/md".
4361
e0994b8b 43622006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
4363
4364 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
4365 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
4366 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
4367 DRIVE_NAME are always freed.
4368
4369 * util/i386/pc/biosdisk.c (make_device_name): Add one into
4370 DOS_PART, as a DOS partition is counted from one instead of zero
4371 now. Reported by Robert Millan.
4372
ddd5cee9 43732006-10-14 Robert Millan <rmh@aybabtu.com>
4374
4375 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
4376 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
4377 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
4378 string returned by grub_guess_root_device.
4379 * util/i386/pc/grub-setup.c: Likewise.
4380 * util/i386/pc/grub-probefs.c: Likewise.
4381
4382 * util/i386/pc/grub-probefs.c: Rename to ...
4383 * util/i386/pc/grub-probe.c: ... this.
4384 * DISTLIST: Remove grub-probefs, add grub-probe.
4385 * conf/i386-efi.rmk: Likewise.
4386 * conf/i386-pc.rmk: Likewise.
4387 * util/i386/pc/grub-install.in: Likewise.
4388
4389 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
4390 choose which information we want to print.
4391
2b002173 43922006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
4393
4394 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
4395 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
4396 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
4397 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
4398 video/readers/tga.c and video/i386/pc/vbeutil.c.
4399
44002006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
4401
4402 Added support for RAID and LVM.
4403
4404 * disk/lvm.c: New file.
4405 * disk/raid.c: Likewise.
4406 * include/grub/lvm.h: Likewise.
4407 * include/grub/raid.h: Likewise.
4408 * include/grub/util/lvm.h: Likewise.
4409 * include/grub/util/raid.h: Likewise.
4410 * util/lvm.c: Likewise.
4411 * util/raid.c: Likewise.
4412
4413 * include/grub/disk.h (grub_disk_dev_id): Add
4414 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
4415 (grub_disk_get_size): New prototype.
4416 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
4417 returns a partition.
4418 (grub_disk_get_size): New function.
4419
4420 * kern/i386/pc/init.c (make_install_device): Copy the prefix
4421 verbatim if grub_install_dos_part is -2.
4422
4423 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
4424 and LVM devices.
4425
4426 * util/i386/pc/grub-setup.c (setup): New argument
4427 MUST_EMBED. Force embedding of GRUB when the argument is
4428 true. Close FILE before returning.
4429 (main): Add support for RAID and LVM.
4430
4431 * conf/common.rmk: Add RAID and LVM modules.
4432 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
4433 util/lvm.c.
4434 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
4435
4436 * kern/misc.c (grub_strstr): New function.
4437 * include/grub/misc.h (grub_strstr): New prototype.
4438
050548d0 44392006-10-10 Tristan Gingold <tristan.gingold@bull.net>
4440
4441 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
4442
da849d2d 44432006-10-05 Tristan Gingold <tristan.gingold@bull.net>
4444
4445 * kern/misc.c (grub_strtoull): Guess the base only if not
4446 specified.
4447
97b2f2ff 44482006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 4449
4450 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
4451 PowerMac support.
4452
97b2f2ff 44532006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 4454
4455 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
4456
4457 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
4458 Remove `flags' argument. All callers changed.
4459 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
4460 (IEEE1275_IHANDLE_INVALID): New variable.
4461 (IEEE1275_CELL_INVALID): New variable.
4462 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4463 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
4464 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
4465 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
4466 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
4467 codes from Open Firmware. All callers updated.
4468 (grub_ieee1275_next_property): Directly return Open Firmware return
4469 code.
4470 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4471 Standardize error checking from `grub_ieee1275_get_property'.
4472 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
4473 `devalias' to `aliases'. Correct comments. Consolidate error paths.
4474
97b2f2ff 44752006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 4476
4477 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
4478 `instance_to_package_args' to `instance_to_path_args'.
4479
4480 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
4481 `grub_ieee1275_chosen'.
4482
4483 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
4484 `grub_ieee1275_interpret'.
4485
97b2f2ff 44862006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 4487
4488 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
4489
97b2f2ff 44902006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 4491
4492 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
4493 (__cmpdi): Likewise.
4494
4495 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
4496 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
4497 `grub_ssize_t'.
4498
02bb8acc 4499 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 4500
4501 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
4502 to type `grub_ssize_t'.
4503 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
4504
7f9a8531 45052006-09-22 Marco Gerards <marco@gnu.org>
4506
4507 * normal/script.c (grub_script_create_cmdmenu): Skip leading
4508 newlines.
4509
b5ef1102 45102006-09-22 Marco Gerards <marco@gnu.org>
4511
4512 * commands/echo.c: New file.
4513
4514 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
4515
4516 * conf/common.rmk (echo_mod_SOURCES): New variable.
4517 (echo_mod_CFLAGS): Likewise.
4518 (echo_mod_LDFLAGS): Likewise.
4519
2cff3677 45202006-09-22 Marco Gerards <marco@gnu.org>
4521
4522 * normal/main.c (get_line): Malloc memory instead of using
4523 preallocated memory. Removed the arguments `cmdline' and
4524 `max_len'. Updated all callers.
4525
6ba4688b 45262006-09-22 Marco Gerards <marco@gnu.org>
4527
4528 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
4529 (normal_mod_DEPENDENCIES): Likewise.
4530
4531 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
4532 (normal_mod_DEPENDENCIES): Likewise.
4533
4534 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
4535
e02ac02c 45362006-09-22 Johan Rydberg <jrydberg@gnu.org>
4537
4538 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
4539 programs.
4540 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
4541 (normal_mod_DEPENDENCIES): Likewise.
4542 * conf/i386-pc.mk: Regenerate.
4543 * conf/i386-efi.mk: Likewise
4544 * conf/common.mk: Likewise.
4545 * conf/powerpc-ieee1275.mk: Likewise.
4546 * conf/sparc64-ieee1275.mk: Likewise.
4547
8d252e44 45482006-09-22 Robert Millan <rmh@aybabtu.com>
4549
4550 Sync with i386 version.
4551 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
4552 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
4553
209bf7ac 45542006-09-21 Robert Millan <rmh@aybabtu.com>
4555
4556 Import from GRUB Legacy (lib/device.c):
4557 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
4558 (init_device_map) [__linux__]: Add support for I2O devices.
4559
6b146090 45602006-09-14 Marco Gerards <marco@gnu.org>
4561
4562 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
4563 `-melf_i386'.
4564
e38600a8 45652006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 4566
4567 * util/i386/pc/grub-install.in: Skip menu.lst when removing
4568 /boot/grub/*.lst.
78fa1790 4569
2952da5d 4570 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 4571
2952da5d 4572 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
4573 before adding it to device.map.
4574
01b82a64 45752006-08-15 Johan Rydberg <jrydberg@gnu.org>
4576
fe6b695a 4577 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 4578 compiles a file; using the -MD option.
4579 * conf/common.mk: Regenerate.
4580 * conf/i386-pc.mk: Likewise.
4581 * conf/i386-efi.mk: Likewise.
4582 * conf/powerpc-ieee1275.mk: Likewise.
4583 * conf/sparc64-ieee1275.mk: Likewise.
4584
1064790d 45852006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
4586
4587 Move the prototypes of grub_setjmp and grub_longjmp to
4588 cpu/setjmp.h, so that each architecture may specify different
4589 attributes.
4590
4591 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
4592 (grub_longjmp): Likewise.
4593 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
4594 (grub_longjmp): Likewise.
4595 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
4596 (grub_longjmp): Likewise.
4597
4598 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
4599 [!GRUB_UTIL] (grub_longjmp): Removed.
4600
29dda3ed 46012006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
4602
4603 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
4604 "color!" method does not return any value.
4605
ad2a06ed 46062006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4607
4608 * include/grub/bitmap.h: New file.
4609
4610 * include/grub/i386/pc/vbeutil.h: Likewise.
4611
4612 * video/bitmap.c: Likewise.
4613
4614 * video/readers/tga.c: Likewise.
4615
4616 * video/i386/pc/vbeutil.c: Likewise.
4617
4618 * commands/videotest.c: Code cleanup and updated to reflect to new
4619 video API.
4620
4621 * term/gfxterm.c: Likewise.
4622
4623 * video/video.c: Likewise.
4624
4625 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
4626 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
4627 (bitmap_mod_SOURCES): New entry.
4628 (bitmap_mod_CFLAGS): Likewise.
4629 (bitmap_mod_LDFLAGS): Likewise.
4630 (tga_mod_SOURCES): Likewise.
4631 (tga_mod_CFLAGS): Likewise.
4632 (tga_mod_LDFLAGS): Likewise.
4633
4634 * include/grub/video.h (grub_video_blit_operators): New enum type.
4635 (grub_video_render_target): Changed as forward declaration and moved
4636 actual definition to be video driver specific.
4637 (grub_video_adapter.blit_bitmap): Added blitting operator.
4638 (grub_video_adapter.blit_render_target): Likewise.
4639 (grub_video_blit_bitmap): Likewise.
4640 (grub_video_blit_render_target): Likewise.
4641
4642 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
4643 driver specific render target definition.
4644 (grub_video_vbe_map_rgba): Added driver internal helper.
4645 (grub_video_vbe_unmap_color): Updated to use
4646 grub_video_i386_vbeblit_info.
4647 (grub_video_vbe_get_video_ptr): Likewise.
4648
4649 * include/grub/i386/pc/vbeblit.h
4650 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
4651 grub_video_i386_vbeblit_info.
4652 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4653 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4654 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4655 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4656 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4657 (grub_video_i386_vbeblit_index_index): Likewise.
4658 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
4659 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4660 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4661 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
4662 operator.
4663 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
4664 operator.
4665
4666 * video/i386/pc/vbeblit.c: Updated to reflect changes on
4667 include/grub/i386/pc/vbeblit.h.
4668
4669 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
4670 Updated to use grub_video_i386_vbeblit_info.
4671 (grub_video_i386_vbefill_R8G8B8): Likewise.
4672 (grub_video_i386_vbefill_index): Likewise.
4673 (grub_video_i386_vbefill): Added generic filler.
4674
4675 * video/i386/pc/vbefill.c: Updated to reflect changes on
4676 include/grub/i386/pc/vbefill.h.
4677
4678 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
4679 grub_video_i386_vbeblit_info.
4680 (grub_video_vbe_unmap_color): Likewise.
4681 (grub_video_vbe_blit_glyph): Likewise.
4682 (grub_video_vbe_scroll): Likewise.
4683 (grub_video_vbe_draw_pixel): Removed function.
4684 (grub_video_vbe_get_pixel): Likewise.
4685 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
4686 updated code to use it.
4687 (common_blitter): Added common blitter for render target and bitmap.
4688 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
4689 (grub_video_vbe_blit_render_target): Likewise.
4690
bc8c036d 46912006-07-30 Johan Rydberg <jrydberg@gnu.org>
4692
4693 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
4694 is in text mode if there is no console control protocol instance
4695 available.
4696
684a8eff 46972006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4698
4699 * include/grub/video.h: Code cleanup.
4700
4701 * include/grub/i386/pc/vbe.h: Likewise.
4702
4703 * video/i386/pc/vbe.c: Likewise.
4704
4705 * video/i386/pc/vbeblit.c: Likewise.
4706
4707 * video/i386/pc/vbefill.c: Likewise.
4708
4709 * video/video.c: Likewise. Also added more comments.
4710
5915059b 47112006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4712
4713 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
4714 (struct grub_biosdisk_dap): Likewise.
4715
4716 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
4717 linkage settings for all functions.
4718
90ce5d56 47192006-07-12 Marco Gerards <marco@gnu.org>
4720
4721 * configure.ac (--enable-mm-debug): Fix typo.
4722
4723 * genkernsyms.sh.in: Use proper quoting for `CC'.
4724
43e7f879 47252006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
4726
4727 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
4728 (normal_mod_ASFLAGS): Remove "-m32".
4729
4889bdec 47302006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
4731
4732 * util/misc.c: Include config.h.
4733 [!HAVE_MEMALIGN]: Do not include malloc.h.
4734 (grub_memalign): Use posix_memalign, if present. Then, use
4735 memalign, if present. Otherwise, emit an error.
4736
4737 * util/grub-emu.c: Do not include malloc.h.
4738
4739 * include/grub/util/misc.h: Include unistd.h. This is required for
4740 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
4741 D. Eades III <hde@foobar-qux.org>.
4742
4743 * configure.ac (AC_GNU_SOURCE): Added.
4744 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
4745 type.
4746
fd39d4da 47472006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
4748
4749 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
4750 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
4751
b786f3b5 47522006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
4753
4754 * include/grub/types.h (grub_host_addr_t): Rename to
4755 grub_target_addr_t.
4756 (grub_host_off_t): Rename to grub_target_off_t.
4757 (grub_host_size_t): Rename to grub_target_size_t.
4758 (grub_host_ssize_t): Rename to grub_target_ssize_t.
4759 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
4760
4761 * include/grub/kernel.h (struct grub_module_header): Change type
4762 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
4763 (grub_module_info): Likewise.
4764
051988bb 47652006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4766
4767 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
4768 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
4769 Velazquez <jesus.velazquez@gmail.com>.
4770
deae281b 47712006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4772
4773 Count partitions from 1 instead of 0 in the string representation
4774 of partitions. Still use 0-based internally.
4775
4776 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
4777 (sun_partition_map_iterate): Use grub_partition_t instead of
4778 struct grub_partition *. Cast DESC->START_CYLINDER to
4779 grub_uint64_t after converting the endian.
4780 (sun_partition_map_probe): Subtract 1 for PARTNUM.
4781 (sun_partition_map_get_name): Add 1 to P->INDEX.
4782
4783 * partmap/pc.c (grub_partition_parse): Subtract 1 for
4784 PCDATA->DOS_PART.
4785 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
4786
4787 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
4788 zero instead of one.
4789 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
4790 (gpt_partition_map_get_name): Add 1 into P->INDEX.
4791
4792 * partmap/apple.c (apple_partition_map_iterate): Change the type
4793 of POS to unsigned.
4794 (apple_partition_map_probe): Subtract 1 for PARTNUM.
4795 (apple_partition_map_get_name): Add 1 into P->INDEX.
4796
4797 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
4798 of POS to unsigned.
4799 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
4800 calculate the offset of a partition.
4801 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
4802 (amiga_partition_map_get_name): Add 1 into P->INDEX.
4803
4804 * partmap/acorn.c (acorn_partition_map_find): Change the type of
4805 SECTOR to grub_disk_addr_t.
4806 (acorn_partition_map_iterate): Likewise.
4807 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
4808 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
4809 top.
4810 (acorn_partition_map_get_name): Add 1 into P->INDEX.
4811
4812 * kern/i386/pc/init.c (make_install_device): Add 1 into
4813 GRUB_INSTALL_DOS_PART.
4814
4815 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
4816 conditional.
4817
524a1e6a 48182006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4819
4820 Clean up the code to support 64-bit addressing in disks and
4821 files. This change is not enough for filesystems yet.
4822
4823 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
4824 type of "start" to grub_uint64_t.
4825 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
4826 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
4827 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
4828 convert addresses.
4829
4830 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
4831 to grub_disk_addr_t.
4832
4833 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
4834 string.
4835
4836 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4837
4838 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
4839 to char *.
4840
4841 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
4842
4843 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
4844
4845 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
4846
4847 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
4848 to grub_off_t, to detect an error from grub_file_seek.
4849 (grub_multiboot_load_elf32): Likewise.
4850
4851 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
4852 maximum unsigned long value when an overflow is detected.
4853 (grub_strtoull): New function.
4854 (grub_divmod64): Likewise.
4855 (grub_lltoa): use grub_divmod64.
4856
4857 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
4858 grub_disk_addr_t.
4859 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
4860 the pointer to next character. Use grub_strtoull instead of
4861 grub_strtoul.
4862 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
4863 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
4864 respectively.
4865
fe6b695a 4866 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 4867 return value is signed.
4868 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
4869 test if OFFSET is less than zero, as OFFSET is unsigned now.
4870
4871 * kern/disk.c (struct grub_disk_cache): Change the type of
4872 "sector" to grub_disk_addr_t.
4873 (grub_disk_cache_get_index): Change the type of SECTOR to
4874 grub_disk_addr_t. Calculate the hash with SECTOR casted to
4875 unsigned after shifting.
4876 (grub_disk_cache_invalidate): Change the type of SECTOR to
4877 grub_disk_addr_t.
4878 (grub_disk_cache_unlock): Likewise.
4879 (grub_disk_cache_store): Likewise.
4880 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
4881 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
4882 grub_disk_addr_t and grub_uint64_t, respectively.
4883 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
4884 body, as the value of OFFSET is tweaked by
4885 grub_disk_check_range. Change the types of START_SECTOR, LEN and
4886 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
4887 respectively.
4888 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
4889 body, as the value of OFFSET is tweaked by
4890 grub_disk_check_range. Change the types of LEN and N to
4891 grub_size_t.
4892
4893 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
4894 and "saved_offset" to grub_off_t.
4895 (test_header): Cast BUF to char *.
4896 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
4897 to char *.
4898 (grub_gzio_read): Change the types of OFFSET and SIZE to
4899 grub_off_t and grub_size_t, respectively.
4900
4901 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
4902 Removed.
4903 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
4904 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
4905 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
4906 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
4907 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
4908
4909 * include/grub/types.h (grub_off_t): Unconditionally set to
4910 grub_uint64_t.
4911 (grub_disk_addr_t): Changed to grub_uint64_t.
4912
4913 * include/grub/partition.h (struct grub_partition): Change the
4914 types of "start", "len" and "offset" to grub_disk_addr_t,
4915 grub_uint64_t and grub_disk_addr_t, respectively.
4916 (grub_partition_get_start): Return grub_disk_addr_t.
4917 (grub_partition_get_len): Return grub_uint64_t.
4918
4919 * include/grub/misc.h (grub_strtoull): New prototype.
4920 (grub_divmod64): Likewise.
4921
4922 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4923 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4924 grub_off_t, respectively.
4925 All callers and references changed.
4926
4927 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4928 grub_size_t in "read".
4929 All callers and references changed.
4930
4931 * include/grub/file.h (struct grub_file): Change the types of
4932 "offset" and "size" to grub_off_t and grub_off_t,
4933 respectively. Change the type of SECTOR to grub_disk_addr_t in
4934 "read_hook".
4935 (grub_file_read): Change the type of LEN to grub_size_t.
4936 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4937 grub_off_t.
4938 (grub_file_size): Return grub_off_t.
4939 (grub_file_tell): Likewise.
4940 All callers and references changed.
4941
4942 * include/grub/disk.h (struct grub_disk_dev): Change the types of
4943 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4944 "write".
4945 (struct grub_disk): Change the type of "total_sectors" to
4946 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4947 "read_hook".
4948 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4949 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4950 (grub_disk_write): Likewise.
4951 All callers and references changed.
4952
4953 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4954 char * for grub_strncmp to silence gcc.
4955 (grub_iso9660_mount): Likewise.
4956 (grub_iso9660_mount): Likewise.
4957 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4958 return statement.
4959 (grub_iso9660_iterate_dir): Likewise.
4960 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4961
4962 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4963 LEN to grub_disk_addr_t and grub_size_t, respectively.
4964
4965 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4966
4967 * fs/jfs.c (grub_jfs_read_file): Likewise.
4968
4969 * fs/minix.c (grub_jfs_read_file): Likewise.
4970
4971 * fs/sfs.c (grub_jfs_read_file): Likewise.
4972
4973 * fs/ufs.c (grub_jfs_read_file): Likewise.
4974
4975 * fs/xfs.c (grub_jfs_read_file): Likewise.
4976
4977 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4978 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4979 respectively.
4980
4981 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4982 BLKNR to -1 instead of returning GRUB_ERRNO.
4983 (grub_ext2_read_file): Change the types of SECTOR and
4984 LEN to grub_disk_addr_t and grub_size_t, respectively.
4985
4986 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4987 LEN to grub_disk_addr_t and grub_size_t, respectively.
4988
4989 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4990 grub_file_read.
4991
4992 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4993 string. Do not cast SECTOR explicitly.
4994
4995 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4996 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4997 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4998 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4999 over 2TB and LBA mode is not supported, raise an error.
5000 (get_safe_sectors): New function.
5001 (grub_biosdisk_read): Use get_safe_sectors.
5002 (grub_biosdisk_write): Likewise.
5003
5004 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
5005 (grub_efidisk_write): Likewise.
5006
5007 * disk/loopback.c (delete_loopback): Cosmetic changes.
5008 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
5009 correctly.
5010 (grub_loopback_open): Likewise.
5011 (grub_loopback_read): Likewise. Also, change the type of POS to
5012 grub_off_t, and fix the usage of grub_memset.
5013
5014 * commands/i386/pc/play.c: Include grub/machine/time.h.
5015
5016 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
5017 print FILE->SIZE.
5018
5019 * commands/configfile.c: Include grub/env.h.
5020
5021 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
5022 GRUB_ERRNO directly instead. Change the type of POS to
5023 grub_off_t. Follow the coding standard.
5024
5025 * commands/blocklist.c: Include grub/partition.h.
5026 (grub_cmd_blocklist): Return an error if the underlying device is
5027 not a disk. Take the starting sector of a partition into account,
5028 if a partition is used.
5029
5030 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
5031 a length field.
5032 (lba_mode): Support 64-bit addresses.
5033 (chs_mode): Likewise.
5034 (copy_buffer): Adapted to the new offsets of a length field and a
5035 segment field.
5036 (blocklist_default_start): Allocate 64-bit space.
5037
5038 * boot/i386/pc/boot.S (force_lba): Removed.
5039 (boot_drive): Moved to under KERNEL_SECTOR.
5040 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
5041 space.
5042 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
5043 is useless.
5044 (lba_mode): Refactored to support a 64-bit address. More size
5045 optimization.
5046 (setup_sectors): Likewise.
5047
53af98ad 50482006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5049
5050 * DISTLIST: Added include/grub/i386/linux.h. Removed
5051 include/grub/i386/pc/linux.h
5052
5053 * configure.ac (AC_INIT): Bumped to 1.94.
5054
5055 * config.guess: Updated from gnulib.
5056 * config.sub: Likewise.
5057 * install-sh: Likewise.
5058 * mkinstalldirs: Likewise.
5059
b4c1940a 50602006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5061
5062 * conf/common.rmk (grub_modules_init.lst): Depended on
5063 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
5064 MODSRCFILES.
5065
5066 * genmk.rb (PModule::rule): Reverted the previous change.
5067
cfca1cfd 50682006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5069
5070 * conf/common.rmk (grub_modules_init.lst): Depends on
5071 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
5072 that the target does not exist before producing.
5073 (grub_modules_init.h): Remove the target before generating.
5074 (grub_emu_init.c): Likewise.
5075
5076 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
5077
aa6d7826 50782006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
5079
5080 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
5081 for the target-specific tests. Make sure that we also have the
5082 up-to-date target variables for those tests.
5083
26c607b9 50842006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5085
5086 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
5087 (PModule::rule): Likewise.
5088
0162321a 50892006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5090
5091 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
5092 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
5093 target-specific flags should be prefixed.
5094 (PModule::rule): Likewise.
5095
6c826348 50962006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
5097
5098 * configure.ac (CMP): Check if cmp is available explicitly.
5099
b977bf01 51002006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
5101
5102 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
5103 (target_cpu): New variable.
5104 (pkglibdir): Use target_cpu instead of host_cpu.
5105
5106 * util/i386/pc/grub-install.in (host_cpu): Removed.
5107 (target_cpu): New variable.
5108 (pkglibdir): Use target_cpu instead of host_cpu.
5109
5110 * util/genmoddep.c: Removed.
5111
5112 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
5113 instead of GRUB_HOST_SIZEOF_VOID_P.
5114 * kern/dl.c: Likewise.
5115
5116 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
5117 ...
5118 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5119 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5120 (GRUB_TARGET_SIZEOF_LONG): ... this.
5121 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5122 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5123 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5124 to ...
5125 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5126 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5127 (GRUB_TARGET_SIZEOF_LONG): ... this.
5128 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5129 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5130 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5131 to ...
5132 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5133 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5134 (GRUB_TARGET_SIZEOF_LONG): ... this.
5135 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5136 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5137
5138 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
5139 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
5140 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
5141 instead of GRUB_HOST_SIZEOF_LONG.
5142 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
5143 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
5144 GRUB_CPU_WORDS_BIGENDIAN.
5145 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
5146 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
5147 grub_host_ssize_t.
5148
5149 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
5150 (genmoddep_SOURCES): Likewise.
5151 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
5152 (genmoddep_SOURCES): Likewise.
5153 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
5154 (genmoddep_SOURCES): Likewise.
5155 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
5156 Likewise.
5157 (genmoddep_SOURCES): Likewise.
5158
5159 * genmoddep.awk: New file.
5160
5161 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
5162 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
5163 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
5164 (PModule::rule): Likewise.
5165 (Program::rule): Likewise.
5166 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
5167 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
5168 respectively.
5169
5170 * configure.ac: Rewritten intensively to use host and target
5171 instead of build and host, respectively.
5172
5173 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
5174 (host_cpu): Removed.
5175 (target_cpu): New variable.
5176 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
5177 (BUILD_CC): Removed.
5178 (BUILD_CFLAGS): Likewise.
5179 (BUILD_CPPFLAGS): Likewise.
5180 (TARGET_CC): New variable.
5181 (TARGET_CFLAGS): Likewise.
5182 (TARGET_CPPFLAGS): Likewise.
5183 (TARGET_LDFLAGS): Likewise.
5184 (AWK): Likewise.
5185 (include): Use target_cpu instead of host_cpu.
5186 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
5187
5188 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
5189
f09771a1 51902006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
5191
5192 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
5193 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
5194 field 'false' to 'exec_on_false'.
5195 (grub_script_create_cmdif): Renamed argument names to reflect above
5196 changes.
5197
5198 * normal/execute.c (grub_script_execute_cmdif): Likewise.
5199
5200 * normal/script.c (grub_script_create_cmdif): Likewise.
5201
118f4fb3 52022006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
5203
5204 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
5205 top.
5206 (grub_hfsplus_btree_recptr): Likewise.
5207 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
5208 FILEBLOCK both to pass a block number and store next block
5209 number.
5210 (grub_hfsplus_read_block): Rewritten heavily to support an extent
5211 overflow file correctly. Specify errors appropriately, because
5212 fshelp expects that GRUB_ERRNO is set when fails. Reuse
5213 grub_hfsplus_btree_recptr to get the pointer to a found key.
5214 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
5215 is found.
5216
5217 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
5218 linux.mod.
5219 (_linux_mod_SOURCES): New variable.
5220 (_linux_mod_CFLAGS): Likewise.
5221 (_linux_mod_LDFLAGS): Likewise.
5222 (linux_mod_SOURCES): Likewise.
5223 (linux_mod_CFLAGS): Likewise.
5224 (linux_mod_LDFLAGS): Likewise.
5225
5226 * DISTLIST: Added loader/i386/efi/linux.c,
5227 loader/i386/efi/linux_normal.c and
5228 include/grub/i386/efi/loader.h.
5229
5230 * loader/i386/efi/linux.c: New file.
5231 * loader/i386/efi/linux_normal.c: Likewise.
5232 * include/grub/i386/efi/loader.h: Likewise.
5233
89a7d726 52342006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
5235
5236 * commands/blocklist.c: New file.
5237
5238 * DISTLIST: Added commands/blocklist.c.
5239
5240 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 5241 color for the background, and a darker color for the foreground.
89a7d726 5242 (grub_console_checkkey): Return READ_KEY.
5243 (grub_console_cls): Set the background to
5244 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
5245
5246 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
5247
5248 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
5249 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
5250
5251 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
5252 prototype.
5253
5254 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
5255 BG. The spec is wrong again.
5256
5257 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
5258 prototype.
5259 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
5260
5261 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
5262 commands/blocklist.c.
5263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5264
5265 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
5266 (blocklist_mod_SOURCES): New variable.
5267 (blocklist_mod_CFLAGS): Likewise.
5268 (blocklist_mod_LDFLAGS): Likewise.
5269
75c8f258 52702006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
5271
5272 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
5273 duplication.
5274 (lba_mode): Use %eax more intensively to reduce the code size.
5275
da2eb181 52762006-05-20 Marco Gerards <marco@gnu.org>
5277
5278 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
5279
5280 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
5281 for `menuentry'.
5282 (script): Accept leading newlines.
5283 (newlines): New rule to describe 0 or more newlines.
5284 (commands): Accept `command' with trailing newline. Fixed the
5285 order in which arguments were passed to `grub_script_add_cmd'.
5286 Accept commands separated by newlines.
5287 (function): Changed to accept newlines.
5288 (menuentry) Rewritten.
5289
5290 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
5291 front of the list, instead of to the end.
5292
577b4050 52932006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
5294
5295 * util/i386/pc/grub-install.in (bindir): New variable.
5296 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
5297 Shaver <lbgwjl@gmail.com>.
5298
0d6e1189 52992006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
5300
5301 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
5302 grub/machine/linux.h
5303 * loader/i386/pc/linux.c: Likewise.
5304
5305 * include/grub/i386/pc/linux.h: Moved to ...
5306 * include/grub/i386/linux.h: ... here.
5307
5308 * include/grub/i386/linux.h (struct linux_kernel_params): New
5309 struct.
5310
31b86e9f 53112006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
5312
5313 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
5314 checking.
5315 (grub_video_vbe_blit_glyph): Likewise.
5316 (grub_video_vbe_blit_bitmap): Likewise.
5317 (grub_video_vbe_blit_render_target): Likewise.
5318
83b984de 53192006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
5320
5321 * configure.ac (--with-platform): Properly quote the square
5322 brackets.
5323
5f0413bd 53242006-05-08 Marco Gerards <marco@gnu.org>
5325
5326 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
5327 this...
5328 (kernel_elf_HEADERS): ...to this. Updated all users.
5329 (grubof_symlist.c): Renamed from this...
5330 (kernel_elf_symlist.c): ...to this. Updated all users.
5331 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
5332 (grubof_SOURCES): Renamed from this...
5333 (kernel_elf_SOURCES): ...to this.
5334 (grubof_HEADERS): Renamed from this...
5335 (kernel_elf_HEADERS): ...to this.
5336 (grubof_CFLAGS): Renamed from this...
5337 (kernel_elf_CFLAGS): ...to this.
5338 (grubof_ASFLAGS): Renamed from this...
5339 (kernel_elf_ASFLAGS): ...to this.
5340 (grubof_LDFLAGS): Renamed from this...
5341 (kernel_elf_LDFLAGS): ...to this.
5342
5343 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
5344 this...
5345 (kernel_elf_HEADERS): ...to this. Updated all users.
5346 (grubof_symlist.c): Renamed from this...
5347 (kernel_elf_symlist.c): ...to this. Updated all users.
5348 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
5349 (grubof_SOURCES): Renamed from this...
5350 (kernel_elf_SOURCES): ...to this.
5351 (grubof_HEADERS): Renamed from this...
5352 (kernel_elf_HEADERS): ...to this.
5353 (grubof_CFLAGS): Renamed from this...
5354 (kernel_elf_CFLAGS): ...to this.
5355 (grubof_ASFLAGS): Renamed from this...
5356 (kernel_elf_ASFLAGS): ...to this.
5357 (grubof_LDFLAGS): Renamed from this...
5358 (kernel_elf_LDFLAGS): ...to this.
5359
5360 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
5361 `kernel.elf' instead of `grubof'.
5362
05568c2e 53632006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
5364
5365 Add --with-platform to configure. Use pkglibdir instead of
5366 pkgdatadir. This is reported by Roger Leigh.
5367
5368 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
5369 (host_vendor): Likewise.
5370 (host_os): Likewise.
5371 (pkgdatadir): Likewise.
5372 (platform): New variable.
5373 (pkglibdir): Likewise.
5374 Use PKGLIBDIR instead of PKGDATADIR.
5375
5376 * util/i386/pc/grub-install.in (datadir): Removed.
5377 (host_vendor): Likewise.
5378 (host_os): Likewise.
5379 (pkgdatadir): Likewise.
5380 (platform): New variable.
5381 (pkglibdir): Likewise.
5382 Use PKGLIBDIR instead of PKGDATADIR.
5383
5384 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
5385 instead of GRUB_DATADIR.
5386 (main): Likewise.
5387 * util/i386/pc/grub-mkimage.c (usage): Likewise.
5388 (main): Likewise.
5389 * util/i386/efi/grub-mkimage.c (usage): Likewise.
5390 (main): Likewise.
5391
5392 * configure.ac (--with-platform): New option.
5393 Use PLATFORM instead of HOST_VENDOR to specify a platform.
5394
5395 * Makefile.in: Include a makefile based on PLATFORM instead of
5396 HOST_VENDOR.
5397 (pkgdatadir): Not appended by the machine type.
5398 (pkglibdir): Appended by the machine type.
5399 (host_vendor): Removed.
5400 (platform): New variable.
5401 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
5402 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
5403 (uninstall): Likewise.
5404
4e93851c 54052006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
5406
5407 Use the environment context in the menu. Remove the commands
5408 "default" and "timeout", and use variables instead.
5409
5410 * normal/menu.c: Include grub/env.h.
5411 (print_entry): Cast TITLE to silence gcc.
5412 (get_timeout): New function.
5413 (set_timeout): Likewise.
5414 (get_entry_number): Likewise.
5415 (run_menu): Use a default entry, a fallback entry and a timeout
5416 in the environment variables "default", "fallback" and
5417 "timeout". Also, tweak the default entry if it is not within the
5418 current menu entries.
5419 (grub_menu_run): Use a fallback entry in the environment variable
5420 "fallback".
5421
5422 * normal/main.c (read_config_file): Do not initialize
5423 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
5424 NEWMENU->TIMEOUT.
5425 (grub_normal_execute): Use a data slot to store the menu.
5426
5427 * include/grub/normal.h (struct grub_menu): Removed default_entry,
5428 fallback_entry and timeout.
5429 (struct grub_menu_list): Removed.
5430 (grub_menu_list_t): Likewise.
5431 (struct grub_context): Likewise.
5432 (grub_context_t): Likewise.
5433 (grub_context_get): Likewise.
5434 (grub_context_get_current_menu): Likewise.
5435 (grub_context_push_menu): Likewise.
5436 (grub_context_pop_menu): Likewise.
5437 (grub_default_init): Likewise.
5438 (grub_default_fini): Likewise.
5439 (grub_timeout_init): Likewise.
5440 (grub_timeout_fini): Likewise.
5441
5442 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
5443 and timeout.mod.
5444 (normal_mod_SOURCES): Removed normal/context.c.
5445
5446 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
5447 commands/default.c, commands/timeout.c and normal/context.c.
5448 (normal_mod_SOURCES): Removed normal/context.c.
5449
5450 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
5451 commands/timeout.c and normal/context.c.
5452 (normal_mod_SOURCES): Removed normal/context.c.
5453
5454 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
5455 commands/default.c, commands/timeout.c and normal/context.c.
5456 (normal_mod_SOURCES): Removed normal/context.c.
5457
5458 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
5459 timeout.mod.
5460 (default_mod_SOURCES): Removed.
5461 (default_mod_CFLAGS): Likewise.
5462 (default_mod_LDFLAGS): Likewise.
5463 (timeout_mod_SOURCES): Removed.
5464 (timeout_mod_CFLAGS): Likewise.
5465 (timeout_mod_LDFLAGS): Likewise.
5466
5467 * DISTLIST: Removed commands/default.c, commands/timeout.c and
5468 normal/context.c.
5469
5470 * commands/default.c: Removed.
5471 * commands/timeout.c: Likewise.
5472 * normal/context.c: Likewise.
5473
1eb9cc1d 54742006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
5475
5476 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
5477
385bd9c1 54782006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
5479
5480 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
5481 "next" to "prev" for readability.
5482 (struct grub_env_sorted_var): New struct.
5483 (grub_env_context): Renamed to ...
5484 (initial_context): ... this.
5485 (grub_env_var_context): Renamed to ...
5486 (current_context): ... this.
5487 (grub_env_find): Look only at CURRENT_CONTEXT.
5488 (grub_env_context_open): Rewritten to copy exported variables from
5489 previous context.
5490 (grub_env_context_close): Rewritten according to the new
5491 scheme. Also, add an assertion to prevent the initial context from
5492 removed.
5493 (grub_env_insert): Removed the code for the sorted list.
5494 (grub_env_remove): Likewise.
5495 (grub_env_export): Simply mark the variable with
5496 GRUB_ENV_VAR_GLOBAL.
5497 (grub_env_set): A cosmetic change for naming consistency.
5498 (grub_env_get): Likewise.
5499 (grub_env_unset): Likewise.
5500 (grub_env_iterate): Rewritten to sort variables within this
5501 function.
5502 (grub_register_variable_hook): Fixed for naming consistency. Call
5503 grub_env_find again, only if NAME is not found at the first time.
5504 (mangle_data_slot_name): New function.
5505 (grub_env_set_data_slot): Likewise.
5506 (grub_env_get_data_slot): Likewise.
5507 (grub_env_unset_data_slot): Likewise.
5508
5509 * include/grub/env.h (grub_env_var_type): New enum.
5510 (GRUB_ENV_VAR_LOCAL): New constant.
5511 (GRUB_ENV_VAR_GLOBAL): Likewise.
5512 (GRUB_ENV_VAR_DATA): Likewise.
5513 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
5514 "type".
5515 (grub_env_set): Replace VAR with NAME for consistency.
5516 (grub_register_variable_hook): Likewise.
5517 (grub_env_export): Specify the name of the argument.
5518 (grub_env_set_data_slot): New prototype.
5519 (grub_env_get_data_slot): Likewise.
5520 (grub_env_unset_data_slot): Likewise.
5521
7f362539 55222006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5523
5524 Extend the loader so that GRUB can accept a loader which comes
5525 back to GRUB when a loaded image exits. Also, this change adds
5526 support for a chainloader on EFI.
5527
5528 * term/efi/console.c: Include grub/misc.h.
5529 (grub_console_checkkey): Display a scan code on the top for
5530 debugging. This will be removed once the EFI port gets stable.
5531 Correct the scan code mapping.
5532
5533 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
5534 allocate memory from larger regions, in order to reduce the number
5535 of allocated regions. Otherwise, the MacOSX loader panics.
5536 (filter_memory_map): Avoid less than 1MB for compatibility with
5537 other loaders.
5538 (add_memory_regions): Allocate from the tail of a region, if
5539 possible, to avoid allocating a region near to 1MB, for the MacOSX
5540 loader.
5541
5542 * kern/efi/init.c (grub_efi_set_prefix): Specify
5543 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
5544
5545 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
5546 argument IMAGE_HANDLE and specify it to get a loaded image.
5547 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
5548 grub_efi_get_loaded_image.
fe6b695a 5549 (grub_efi_get_filename): Divide the length by the size of
7f362539 5550 grub_efi_char16_t.
5551 (grub_efi_get_device_path): New function.
5552 (grub_efi_print_device_path): Print End Device Path nodes. Divide
5553 the length by the size of grub_efi_char16_t for a file path device
5554 path node.
5555
5556 * kern/loader.c (grub_loader_noreturn): New variable.
5557 (grub_loader_set): Accept a new argument NORETURN. Set
5558 GRUB_LOADER_NORETURN to NORETURN.
5559 All callers changed.
5560 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
5561 grub_machine_fini.
5562
5563 * include/grub/efi/efi.h (grub_efi_get_device_path): New
5564 prototype.
5565 (grub_efi_get_loaded_image): Take an argument to specify an image
5566 handle.
5567
5568 * include/grub/loader.h (grub_loader_set): Added one more argument
5569 NORETURN.
5570
5571 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
5572 instead of grub_efi_open_protocol.
5573 (grub_efidisk_get_device_name): Likewise.
5574 (grub_efidisk_close): Print a newline.
5575 (grub_efidisk_get_device_handle): Fixed to use
5576 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
5577 GRUB_EFI_DEVICE_PATH_TYPE.
5578
5579 * disk/efi/efidisk.c (device_path_guid): Moved to ...
5580 * kern/efi/efi.c (device_path_guid): ... here.
5581
5582 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
5583 chain.mod.
5584 (kernel_mod_HEADERS): Added efi/disk.h.
5585 (_chain_mod_SOURCES): New variable.
5586 (_chain_mod_CFLAGS): Likewise.
5587 (_chain_mod_LDFLAGS): Likewise.
5588 (chain_mod_SOURCES): Likewise.
5589 (chain_mod_CFLAGS): Likewise.
5590 (chain_mod_LDFLAGS): Likewise.
5591
5592 * DISTLIST: Added include/grub/efi/chainloader.h,
5593 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
5594
5595 * include/grub/efi/chainloader.h: New file.
5596 * loader/efi/chainloader.c: Likewise.
5597 * loader/efi/chainloader_normal.c: Likewise.
5598
c0111d6e 55992006-04-30 Marco Gerards <marco@gnu.org>
5600
5601 * commands/configfile.c (grub_cmd_source): New function.
5602 (GRUB_MOD_INIT): Register the commands `source' and `.'.
5603 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
5604
df5341da 56052006-04-30 Marco Gerards <marco@gnu.org>
5606
5607 * normal/execute.c (grub_script_execute_cmd): Change the return
5608 type to `grub_err_t'. Correctly return the error.
5609 (grub_script_execute_cmdline): In case a command line is not a
5610 command or a function, try to interpret it as an assignment.
5611
f85934bd 56122006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5613
5614 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
5615 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
5616 skip a node whose name is obviously invalid as UTF-16,
5617 i.e. contains a NUL character. Stop the iteration when the last
5618 directory entry is found. Instead of using the return value of
5619 grub_hfsplus_btree_iterate_node, store the value in RET and use
5620 it, because the iterator can be stopped by the last directory
5621 entry.
5622
8f8a2cf8 56232006-04-30 Marco Gerards <marco@gnu.org>
5624
5625 * include/grub/env.h (grub_env_export): New prototype. Reported
5626 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
5627
a27e84ce 56282006-04-30 Marco Gerards <marco@gnu.org>
5629
5630 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
5631 size of the extents in a catalog file record.
5632
eaef0553 56332006-04-29 Marco Gerards <marco@gnu.org>
5634
5635 * commands/configfile.c (grub_cmd_configfile): Execute the
5636 configfile within its own context.
5637
5638 * include/grub/env.h (grub_env_context_open): New prototype.
5639 (grub_env_context_close): Likewise.
5640
5641 * kern/env.c (grub_env): Removed.
5642 (grub_env_sorted): Likewise.
5643 (grub_env_context): New variable.
5644 (grub_env_var_context): Likewise.
5645 (grub_env_find): Search both the active context and the global
5646 context.
5647 (grub_env_context_open): New function.
5648 (grub_env_context_close): Likewise.
5649 (grub_env_insert): Likewise.
5650 (grub_env_remove): Likewise.
5651 (grub_env_export): Likewise.
5652 (grub_env_set): Changed to use helper functions to avoid code
5653 duplication.
5654 (grub_env_iterate): Rewritten so both the current context and the
5655 global context are being used.
5656
5657 * normal/command.c (export_command): New function.
5658 (grub_command_init): Register the `export' function.
5659
7b455f4d 56602006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
5661
5662 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
5663 explicitly to suppress gcc's warnings.
5664 * fs/fat.c (grub_fat_find_dir): Likewise.
5665 (grub_fat_label): Likewise.
5666 * fs/xfs.c (grub_xfs_read_inode): Likewise.
5667 (grub_xfs_mount): Likewise.
5668 (grub_xfs_label): Likewise.
5669 * fs/affs.c (grub_affs_mount): Likewise.
5670 (grub_affs_label): Likewise.
5671 (grub_affs_iterate_dir): Likewise.
5672 * fs/sfs.c (grub_sfs_mount): Likewise.
5673 (grub_sfs_iterate_dir): Likewise.
5674 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
5675 * fs/hfs.c (grub_hfs_mount): Likewise.
5676 (grub_hfs_cmp_catkeys): Likewise.
5677 (grub_hfs_find_dir): Likewise.
5678 (grub_hfs_dir): Likewise.
5679 (grub_hfs_label): Likewise.
5680 * fs/jfs.c (grub_jfs_mount): Likewise.
5681 (grub_jfs_opendir): Likewise.
5682 (grub_jfs_getent): Likewise.
5683 (grub_jfs_lookup_symlink): Likewise.
5684 (grub_jfs_label): Likewise.
5685 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
5686 (grub_hfsplus_iterate_dir): Likewise.
5687 (grub_hfsplus_btree_iterate_node): Made static.
5688
5689 * util/grub-emu.c (prefix): New variable.
5690 (grub_machine_set_prefix): New function.
5691 (main): Do not set the environment variable "prefix" here. Only
5692 set PREFIX, which is used later by grub_machine_set_prefix.
5693
5694 * include/grub/video.h: Do not include grub/symbol.h.
5695 (grub_video_register): Not exported. This symbol is not defined in
5696 the kernel.
5697 (grub_video_unregister): Likewise.
5698 (grub_video_iterate): Likewise.
5699 (grub_video_setup): Likewise.
5700 (grub_video_restore): Likewise.
5701 (grub_video_get_info): Likewise.
5702 (grub_video_get_blit_format): Likewise.
5703 (grub_video_set_palette): Likewise.
5704 (grub_video_get_palette): Likewise.
5705 (grub_video_set_viewport): Likewise.
5706 (grub_video_get_viewport): Likewise.
5707 (grub_video_map_color): Likewise.
5708 (grub_video_map_rgb): Likewise.
5709 (grub_video_map_rgba): Likewise.
5710 (grub_video_fill_rect): Likewise.
5711 (grub_video_blit_glyph): Likewise.
5712 (grub_video_blit_bitmap): Likewise.
5713 (grub_video_blit_render_target): Likewise.
5714 (grub_video_scroll): Likewise.
5715 (grub_video_swap_buffers): Likewise.
5716 (grub_video_create_render_target): Likewise.
5717 (grub_video_delete_render_target): Likewise.
5718 (grub_video_set_active_render_target): Likewise.
5719
5720 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
5721 Undefined.
5722 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
5723
5724 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
5725 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5726 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5727 instead of $(srcdir)/genkernsyms.sh.
5728
5729 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
5730 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5731 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5732 instead of $(srcdir)/genkernsyms.sh.
5733
5734 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
5735 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5736 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5737 instead of $(srcdir)/genkernsyms.sh.
5738
5739 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
5740 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5741 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5742 instead of $(srcdir)/genkernsyms.sh.
5743
5744 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
5745 genkernsyms.sh.
5746
5747 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
5748 genkernsyms.sh.
5749 (gensymlist.sh): New target.
5750 (genkernsyms.sh): Likewise.
5751
5752 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
5753 genkernsyms.sh.in and gensymlist.sh.in.
5754
5755 * genkernsyms.sh: Removed.
5756 * gensymlist.sh: Likewise.
5757
5758 * genkernsyms.sh.in: New file.
5759 * gensymlist.sh.in: Likewise.
5760
1885bb27 57612006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5762
5763 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
5764 clobber "prefix", since we may have already set it manually.
5765
71538dff 57662006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5767
5768 * kern/misc.c (abort): New alias for grub_abort.
5769
2965c7cc 57702006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
5771
5772 A new machine-specific function "grub_machine_set_prefix" is
5773 defined. This is called after loading modules, so that a prefix
5774 initialization can use modules. Also, this change adds an
5775 intensive debugging feature for the memory manager via the
5776 configure option "--enable-mm-debug".
5777
5778 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
5779 PART.LEN.
5780
5781 * kern/sparc64/ieee1275/init.c (abort): Removed.
5782 (grub_stop): Likewise.
5783 (grub_exit): New function.
5784 (grub_set_prefix): Renamed to ...
5785 (grub_machine_set_prefix): ... this.
5786 (grub_machine_init): Do not call grub_set_prefix.
5787
5788 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
5789 (grub_machine_set_prefix): ... this.
5790 (grub_machine_init): Do not call grub_set_prefix.
5791
5792 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
5793 (grub_machine_init): Do not set the prefix here.
5794
5795 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
5796
5797 * kern/efi/init.c: Include grub/mm.h.
5798 (grub_efi_set_prefix): New function.
5799
5800 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
5801 (grub_efi_get_filename): New function.
5802 (grub_print_device_path): Renamed to ...
5803 (grub_efi_print_device_path): ... this.
5804
5805 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
5806 [MM_DEBUG] (grub_realloc): Likewise.
5807 [MM_DEBUG] (grub_free): Likewise.
5808 [MM_DEBUG] (grub_memalign): Likewise.
5809 [MM_DEBUG] (grub_mm_debug): New variable.
5810 [MM_DEBUG] (grub_debug_malloc): New function.
5811 [MM_DEBUG] (grub_debug_free): New function.
5812 [MM_DEBUG] (grub_debug_realloc): New function.
5813 [MM_DEBUG] (grub_debug_memalign): New function.
5814
5815 * kern/misc.c (grub_abort): Print a newline to distinguish
5816 the message.
5817
5818 * kern/main.c (grub_main): Call grub_machine_set_prefix and
5819 grub_set_root_dev after loading modules. This is necessary when
5820 setting a prefix depends on modules.
5821
5822 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
5823 (grub_efi_print_device_path): ... this.
5824 (grub_efi_get_filename): New prototype.
5825 (grub_efi_set_prefix): Likewise.
5826
5827 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
5828 and grub/disk.h.
5829 (grub_efidisk_get_device_handle): New prototype.
5830 (grub_efidisk_get_device_name): Likewise.
5831
5832 * include/grub/mm.h: Include config.h.
5833 (MM_DEBUG): Removed.
5834 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
5835 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
5836 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
5837 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
5838 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
5839 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
5840 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
5841 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
5842 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
5843
5844 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
5845
5846 * disk/efi/efidisk.c: Include grub/partition.h.
5847 (iterate_child_devices): New function.
5848 (add_device): First, compare only last device path nodes, so that
5849 devices are sorted by the types.
5850 (grub_efidisk_get_device_handle): New function.
5851 (grub_efidisk_get_device_name): Likewise.
5852
5853 * configure.ac (--enable-mm-debug): New option to enable the
5854 memory manager debugging feature. This makes the binary much
5855 bigger, so is disabled by default.
5856
9cacaa17 58572006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
5858
5859 Use grub_abort instead of grub_stop, and grub_exit must be
5860 define in each architecture now. Also, this change adds support
5861 for EFI disks.
5862
5863 * util/i386/pc/grub-probefs.c: Include grub/term.h.
5864 (grub_getkey): New function.
5865 (grub_term_get_current): Likewise.
5866
5867 * util/i386/pc/grub-setup.c: Include grub/term.h.
5868 (grub_getkey): New function.
5869 (grub_term_get_current): Likewise.
5870
5871 * util/misc.c (grub_stop): Renamed to ...
5872 (grub_exit): ... this.
5873
5874 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
5875 (grub_exit): ... this.
5876 (grub_machine_init): Use grub_abort instead of abort.
5877 (grub_stop): Removed.
5878
5879 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
5880 abort.
5881
5882 * kern/i386/pc/startup.S (grub_exit): New function.
5883 (cold_reboot): New label.
5884
5885 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
5886 (grub_efi_init): Call grub_efidisk_init.
5887 (grub_efi_fini): Call grub_efidisk_fini.
5888
5889 * kern/efi/efi.c: Include grub/mm.h.
5890 (grub_efi_console_control_guid): Renamed to ...
5891 (console_control_guid): ... this.
5892 (grub_efi_loaded_image_guid): Renamed to ...
5893 (loaded_image_guid): ... this.
5894 (grub_efi_locate_handle): New function.
5895 (grub_efi_open_protocol): Likewise.
5896 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
5897 GRUB_EFI_CONSOLE_CONTROL_GUID.
5898 (grub_efi_exit): Removed.
5899 (grub_stop): Likewise.
5900 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
5901 (grub_exit): New function.
5902 (grub_print_device_path): Likewise.
5903
5904 * kern/rescue.c (grub_rescue_cmd_exit): New function.
5905 (grub_enter_rescue_mode): Register "exit".
5906
5907 * kern/misc.c (grub_real_dprintf): A cosmetic change.
5908 (grub_abort): New function.
5909
5910 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5911
5912 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5913
5914 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5915
5916 * include/grub/efi/efi.h (grub_efi_exit): Removed.
5917 (grub_print_device_path): New prototype.
5918 (grub_efi_locate_handle): Likewise.
5919 (grub_efi_open_protocol): Likewise.
5920
5921 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5922 * disk/efi/efidisk.c: Likewise.
5923
5924 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5925
5926 * include/grub/efi/console_control.h
5927 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5928
5929 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5930 last 8 bytes as an array.
5931 (GRUB_EFI_DISK_IO_GUID): New macro.
5932 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5933 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5934 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5935 grub_uint8_t.
5936 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5937 (struct grub_efi_device_path): Rename the member "sub_type" to
5938 "subtype".
5939 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5940 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5941 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5942 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5943 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5944 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5945 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5946 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5947 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5948 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5949 (struct grub_efi_pci_device_path): New structure.
5950 (grub_efi_pci_device_path_t): New type.
5951 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5952 (struct grub_efi_pccard_device_path): New structure.
5953 (grub_efi_pccard_device_path_t): New type.
5954 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5955 (struct grub_efi_memory_mapped_device_path): New structure.
5956 (grub_efi_memory_mapped_device_path_t): New type.
5957 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5958 (struct grub_efi_vendor_device_path): New structure.
5959 (grub_efi_vendor_device_path_t): New type.
5960 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5961 (struct grub_efi_controller_device_path): New structure.
5962 (grub_efi_controller_device_path_t): New type.
5963 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5964 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5965 (struct grub_efi_acpi_device_path): New structure.
5966 (grub_efi_acpi_device_path_t): New type.
5967 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5968 (struct grub_efi_expanded_acpi_device_path): New structure.
5969 (grub_efi_expanded_acpi_device_path_t): New type.
5970 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5971 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5972 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5973 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5974 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5975 (struct grub_efi_atapi_device_path): New structure.
5976 (grub_efi_atapi_device_path_t): New type.
5977 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5978 (struct grub_efi_fibre_channel_device_path): New structure.
5979 (grub_efi_fibre_channel_device_path_t): New type.
5980 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5981 (struct grub_efi_1394_device_path): New structure.
5982 (grub_efi_1394_device_path_t): New type.
5983 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5984 (struct grub_efi_usb_device_path): New structure.
5985 (grub_efi_usb_device_path_t): New type.
5986 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5987 (struct grub_efi_usb_class_device_path): New structure.
5988 (grub_efi_usb_class_device_path_t): New type.
5989 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5990 (struct grub_efi_i2o_device_path): New structure.
5991 (grub_efi_i2o_device_path_t): New type.
5992 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5993 (struct grub_efi_mac_address_device_path): New structure.
5994 (grub_efi_mac_address_device_path_t): New type.
5995 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5996 (struct grub_efi_ipv4_device_path): New structure.
5997 (grub_efi_ipv4_device_path_t): New type.
5998 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5999 (struct grub_efi_ipv6_device_path): New structure.
6000 (grub_efi_ipv6_device_path_t): New type.
6001 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
6002 (struct grub_efi_infiniband_device_path): New structure.
6003 (grub_efi_infiniband_device_path_t): New type.
6004 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
6005 (struct grub_efi_uart_device_path): New structure.
6006 (grub_efi_uart_device_path_t): New type.
6007 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
6008 (struct grub_efi_vendor_messaging_device_path): New structure.
6009 (grub_efi_vendor_messaging_device_path_t): New type.
6010 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
6011 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
6012 (struct grub_efi_hard_drive_device_path): New structure.
6013 (grub_efi_hard_drive_device_path_t): New type.
6014 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
6015 (struct grub_efi_cdrom_device_path): New structure.
6016 (grub_efi_cdrom_device_path_t): New type.
6017 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
6018 (struct grub_efi_vendor_media_device_path): New structure.
6019 (grub_efi_vendor_media_device_path_t): New type.
6020 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
6021 (struct grub_efi_file_path_device_path): New structure.
6022 (grub_efi_file_path_device_path_t): New type.
6023 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
6024 (struct grub_efi_protocol_device_path): New structure.
6025 (grub_efi_protocol_device_path_t): New type.
6026 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
6027 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
6028 (struct grub_efi_bios_device_path): New structure.
6029 (grub_efi_bios_device_path_t): New type.
6030 (struct grub_efi_disk_io): New structure.
6031 (grub_efi_disk_io_t): New type.
6032 (struct grub_efi_block_io_media): New structure.
6033 (grub_efi_block_io_media_t): New type.
6034 (struct grub_efi_block_io): New structure.
6035 (grub_efi_block_io_t): New type.
6036
6037 * include/grub/misc.h (grub_stop): Removed.
6038 (grub_exit): New prototype.
6039 (grub_abort): Likewise.
6040
6041 * include/grub/disk.h (enum grub_disk_dev_id): Added
6042 GRUB_DISK_DEVICE_EFIDISK_ID.
6043
6044 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
6045 disk/efi/efidisk.c.
6046 (kernel_syms.lst): Remove the target if an error occurs.
6047
49986a9f 60482006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
6049
6050 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
6051 as it was simply too buggy.
6052
970d3b8a 60532006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
6054
6055 * kern/misc.c (grub_lltoa): New function.
6056 (grub_vsprintf): Added support for the long long suffix,
6057 i.e. "ll".
6058
ff04ec24 60592006-04-20 Hollis Blanchard <hollis@penguinppc.org>
6060
6061 * Makefile.in (LDFLAGS): Add variable.
6062 (LD): Remove variable.
6063 * configure.ac: Add -m32 to LDFLAGS.
6064 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
6065 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
6066 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
6067 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
6068 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
6069 variables.
6070 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
6071 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
6072 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
6073
37e5e1a4 60742006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
6075
6076 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
6077 length for unknown glyph.
6078
c352d8dd 60792006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6080
2eab1c0d 6081 Add support for pre-loaded modules into the EFI port.
6082
6083 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
6084 completely. Accept one more argument DIR. The caller has changed.
6085
6086 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
6087
6088 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
6089 (grub_efi_loaded_image_guid): New variable.
6090 (grub_efi_get_loaded_image): New function.
6091 (grub_arch_modules_addr): Likewise.
6092
6093 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
6094 prototype.
6095
6096 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
6097 (struct grub_efi_loaded_image): New structure.
6098 (grub_efi_loaded_image_t): New type.
6099
61002006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6101
c352d8dd 6102 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
6103 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
6104 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
6105
6d01d6b4 61062006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
6107
6108 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
6109
976a4ea0 61102006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
6111
6112 * DISTLIST: Added include/grub/efi/console.h,
6113 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
6114 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6115
6116 * include/grub/efi/console.h: New file.
6117 * include/grub/efi/time.h: Likewise.
6118 * include/grub/i386/efi/kernel.h: Likewise.
6119 * kern/efi/init.c: Likewise.
6120 * kern/efi/mm.c: Likewise.
6121 * term/efi/console.c: Likewise.
6122
6123 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
6124 (grub_stop): Removed.
6125 (grub_get_rtc): Likewise.
6126 (grub_machine_init): Simply call grub_efi_init.
6127 (grub_machine_fini): Call grub_efi_fini.
6128
6129 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
6130 (grub_efi_output_string): Removed.
6131 (grub_efi_stall): New function.
6132 (grub_stop): Likewise.
6133 (grub_get_rtc): Likewise.
6134
6135 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
6136 (grub_efi_stall): New prototype.
6137 (grub_efi_allocate_pages): Likewise.
6138 (grub_efi_free_pages): Likewise.
6139 (grub_efi_get_memory_map): Likewise.
6140 (grub_efi_mm_init): Likewise.
6141 (grub_efi_mm_fini): Likewise.
6142 (grub_efi_init): Likewise.
6143 (grub_efi_fini): Likewise.
6144
6145 * include/grub/i386/efi/time.h: Do not include
6146 grub/symbol.h. Include grub/efi/time.h.
6147 (GRUB_TICKS_PER_SECOND): Removed.
6148 (grub_get_rtc): Likewise.
6149
6150 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
6151 Added padding. The EFI spec is buggy.
6152 (GRUB_EFI_BLACK): New macro.
6153 (GRUB_EFI_BLUE): Likewise.
6154 (GRUB_EFI_GREEN): Likewise.
6155 (GRUB_EFI_CYAN): Likewise.
6156 (GRUB_EFI_RED): Likewise.
6157 (GRUB_EFI_MAGENTA): Likewise.
6158 (GRUB_EFI_BROWN): Likewise.
6159 (GRUB_EFI_LIGHTGRAY): Likewise.
6160 (GRUB_EFI_BRIGHT): Likewise.
6161 (GRUB_EFI_DARKGRAY): Likewise.
6162 (GRUB_EFI_LIGHTBLUE): Likewise.
6163 (GRUB_EFI_LIGHTGREEN): Likewise.
6164 (GRUB_EFI_LIGHTCYAN): Likewise.
6165 (GRUB_EFI_LIGHTRED): Likewise.
6166 (GRUB_EFI_LIGHTMAGENTA): Likewise.
6167 (GRUB_EFI_YELLOW): Likewise.
6168 (GRUB_EFI_WHITE): Likewise.
6169 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
6170 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
6171 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
6172 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
6173 (GRUB_EFI_BACKGROUND_RED): Likewise.
6174 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
6175 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
6176 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
6177 (GRUB_EFI_TEXT_ATTR): Likewise.
6178
6179 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
6180 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6181 (kernel_mod_HEADERS): Added efi/time.h.
6182
83709125 61832006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
6184
6185 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
6186 include/grub/efi/api.h, include/grub/efi/console_control.h,
6187 include/grub/efi/efi.h, include/grub/efi/pe32.h,
6188 include/grub/i386/efi/time.h, kern/efi/efi.c,
6189 kern/i386/efi/init.c, kern/i386/efi/startup.S,
6190 and util/i386/efi/grub-mkimage.c.
6191
6192 * Makefile.in (RMKFILES): Added i386-efi.rmk.
6193
6194 * genmk.rb (PModule#rule): Do not export symbols if
6195 #{prefix}_EXPORTS is set to "no".
6196
6197 * conf/i386-efi.mk: New file.
6198 * conf/i386-efi.rmk: Likewise.
6199 * include/grub/efi/api.h: Likewise.
6200 * include/grub/efi/console_control.h: Likewise.
6201 * include/grub/efi/efi.h: Likewise.
6202 * include/grub/efi/pe32.h: Likewise.
6203 * include/grub/i386/efi/time.h: Likewise.
6204 * kern/efi/efi.c: Likewise.
6205 * kern/i386/efi/init.c: Likewise.
6206 * kern/i386/efi/startup.S: Likewise.
6207 * util/i386/efi/grub-mkimage.c: Likewise.
6208
62092006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 6210
6211 * include/grub/script.h: Include <grub/parser.h> and
6212 "grub_script.tab.h".
6213 (struct grub_lexer_param): New struct.
6214 (struct grub_parser_param): Likewise.
6215 (grub_script_create_arglist): Pass the state in an argument.
6216 (grub_script_add_arglist): Likewise.
6217 (grub_script_create_cmdline): Likewise.
6218 (grub_script_create_cmdblock): Likewise.
6219 (grub_script_create_cmdif): Likewise.
6220 (grub_script_create_cmdmenu): Likewise.
6221 (grub_script_add_cmd): Likewise.
6222 (grub_script_arg_add): Likewise.
6223 (grub_script_lexer_ref): Likewise.
6224 (grub_script_lexer_deref): Likewise.
6225 (grub_script_lexer_record_start): Likewise.
6226 (grub_script_lexer_record_stop): Likewise.
6227 (grub_script_mem_record): Likewise.
6228 (grub_script_mem_record_stop): Likewise.
6229 (grub_script_malloc): Likewise.
6230 (grub_script_yylex): Likewise.
6231 (grub_script_yyparse): Likewise.
6232 (grub_script_yyerror): Likewise.
6233 (grub_script_yylex): Likewise.
6234 (grub_script_lexer_init): Return the state.
6235
6236 * normal/lexer.c (grub_script_lexer_state): Removed variable.
6237 (grub_script_lexer_done): Likewise.
6238 (grub_script_lexer_getline): Likewise.
6239 (grub_script_lexer_refs): Likewise.
6240 (script): Likewise.
6241 (newscript): Likewise.
6242 (record): Likewise.
6243 (recording): Likewise.
6244 (recordpos): Likewise.
6245 (recordlen): Likewise.
6246 (grub_script_lexer_init): Return the state instead of setting
6247 global variables.
6248 (grub_script_lexer_ref): Use the newly added argument for state
6249 instead of globals.
6250 (grub_script_lexer_deref): Likewise.
6251 (grub_script_lexer_record_start): Likewise.
6252 (grub_script_lexer_record_stop): Likewise.
6253 (recordchar): Likewise.
6254 (nextchar): Likewise.
6255 (grub_script_yylex2): Likewise.
6256 (grub_script_yylex): Likewise.
6257 (grub_script_yyerror): Likewise.
6258
6259 * normal/parser.y (func_mem): Removed variable.
6260 (menu_entry): Likewise.
6261 (err): Likewise.
6262 (%lex-param): New parser option.
6263 (%parse-param): Likewise.
6264 (script): Always return the AST.
6265 (argument): Pass the state around.
6266 (arguments): Likewise.
6267 (grubcmd): Likewise.
6268 (commands): Likewise.
6269 (function): Likewise.
6270 (menuentry): Likewise.
6271 (if_statement): Likewise.
6272 (if): Likewise.
6273
6274 * normal/script.c (grub_script_memused): Removed variable.
6275 (grub_script_parsed): Likewise.
6276 (grub_script_malloc): Added a state argument. Use that instead of
6277 global variables.
6278 (grub_script_mem_record): Likewise.
6279 (grub_script_mem_record_stop): Likewise.
6280 (grub_script_arg_add): Likewise.
6281 (grub_script_add_arglist): Likewise.
6282 (grub_script_create_cmdline): Likewise.
6283 (grub_script_create_cmdif): Likewise.
6284 (grub_script_create_cmdmenu): Likewise.
6285 (grub_script_add_cmd): Likewise.
6286 (grub_script_parse): Setup the state before calling the parser.
6287
e2a8c904 62882006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 6289
6290 * normal/command.c (grub_command_init): Remove the title command.
6291
6292 * normal/lexer.c (grub_script_yylex): Renamed from this...
6293 (grub_script_yylex2): ... to this.
6294 (grub_script_yylex): New function. Temporary
6295 introduced to filter some tokens.
6296 (grub_script_yyerror): Print a newline.
6297
6298 * normal/main.c (read_config_file): Output information about the
6299 lines that contain errors. Wait for a key after all lines have
6300 been processed. Don't return an empty menu.
6301
6302 * normal/parser.y (func_mem): Don't initialize.
6303 (menu_entry): Likewise.
6304 (err): New variable.
6305 (script): Don't return anything when an error was encountered.
6306 (ws, returns): Removed rules.
6307 (argument): Disabled concatenated variable support.
6308 (arguments): Remove explicit separators.
6309 (grubcmd): Likewise.
6310 (function): Likewise.
6311 (menuentry): Likewise.
6312 (if): Likewise.
6313 (commands): Likewise. Add error handling.
6314
6315 * normal/script.c (grub_script_create_cmdline): If
6316 `grub_script_parsed' is 0, assume the parser encountered an error.
6317
c9a86192 63182006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
6319
6320 * configure.ac: Add support for EFI. Fix the typo
6321 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
6322
70f3b243 63232006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
6324
6325 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
6326 foreign multibyte characters should be shown correctly.
6327
65f201ad 63282006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
6329
6330 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
6331 calculation.
6332 (read_config_file): Made it to close file before returning.
6333
b4b93674 63342006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
6335
6336 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
6337 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
6338 video/i386/pc/vbefill.c.
6339
6340 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
6341 video/i386/pc/vbefill.c.
6342
6343 * include/grub/video.h (grub_video_blit_format): New enum.
6344 (grub_video_mode_info): Added new member blit_format.
6345 (grub_video_get_blit_format): New function prototype.
6346
6347 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
6348 function prototype.
6349 (grub_video_vbe_map_rgb): Likewise.
6350 (grub_video_vbe_unmap_color): Likewise.
6351
6352 * include/grub/i386/pc/vbeblit.h: New file.
6353
6354 * include/grub/i386/pc/vbefill.h: New file.
6355
6356 * video/video.c (grub_video_get_blit_format): New function.
6357 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
6358 (grub_video_vbe_map_rgb): Likewise.
6359 (grub_video_vbe_unmap_color): Likewise.
6360
6361 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
6362 optimized fills.
6363 (grub_video_vbe_blit_render_target): Changed to use more optimized
6364 blits.
6365 (grub_video_vbe_setup): Added detection for optimized settings.
6366 (grub_video_vbe_create_render_target): Likewise.
6367
6368 * video/i386/pc/vbeblit.c: New file.
6369
6370 * video/i386/pc/vbefill.c: New file.
6371
c2379b9c 63722006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
6373
6374 * font/manager.c (grub_font_get_glyph): Removed font fixup from
6375 here...
6376
6377 * util/unifont2pff.rb: ... and moved it to here. Improved argument
6378 parsing to support both hex and dec ranges. If filename was missing
6379 show usage information.
6380
bd0d7896 63812006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
6382
6383 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
6384 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
6385
6386 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
6387 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
6388 (video_mod_SOURCES): Added.
6389 (video_mod_CFLAGS): Likewise.
6390 (video_mod_LDFLAGS): Likewise.
6391 (gfxterm_mod_SOURCES): Likewise.
6392 (gfxterm_mod_CFLAGS): Likewise.
6393 (gfxterm_mod_LDFLAGS): Likewise.
6394 (videotest_mod_SOURCES): Likewise.
6395 (videotest_mod_CFLAGS): Likewise.
6396 (videotest_mod_LDFLAGS): Likewise.
6397 (vesafb_mod_SOURCES): Removed.
6398 (vesafb_mod_CFLAGS): Likewise.
6399 (vesafb_mod_LDFLAGS): Likewise.
6400 (vga_mod_SOURCES): Likewise.
6401 (vga_mod_CFLAGS): Likewise.
6402 (vga_mod_LDFLAGS): Likewise.
6403
6404 * commands/videotest.c: New file.
6405
6406 * font/manager.c (fill_with_default_glyph): Modified to use
6407 grub_font_glyph.
6408 (grub_font_get_glyph): Likewise.
6409 (fontmanager): Renamed from this...
6410 (font_manager): ... to this.
6411
6412 * include/grub/font.h (grub_font_glyph): Added new structure.
6413 (grub_font_get_glyph): Modified to use grub_font_glyph.
6414
6415 * include/grub/misc.h (grub_abs): Added as inline function.
6416
6417 * include/grub/video.h: New file.
6418
6419 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
6420 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
6421 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
6422 (grub_vbe_get_controller_info): Renamed from this...
6423 (grub_vbe_bios_get_controller_info): ... to this.
6424 (grub_vbe_get_mode_info): Renamed from this...
6425 (grub_vbe_bios_get_mode_info): ... to this.
6426 (grub_vbe_set_mode): Renamed from this...
6427 (grub_vbe_bios_set_mode): ... to this.
6428 (grub_vbe_get_mode): Renamed from this...
6429 (grub_vbe_bios_get_mode): ... to this.
6430 (grub_vbe_set_memory_window): Renamed from this...
6431 (grub_vbe_bios_set_memory_window): ... to this.
6432 (grub_vbe_get_memory_window): Renamed from this...
6433 (grub_vbe_bios_get_memory_window): ... to this.
6434 (grub_vbe_set_scanline_length): Renamed from this...
6435 (grub_vbe_set_scanline_length): ... to this.
6436 (grub_vbe_get_scanline_length): Renamed from this...
6437 (grub_vbe_bios_get_scanline_length): ... to this.
6438 (grub_vbe_set_display_start): Renamed from this...
6439 (grub_vbe_bios_set_display_start): ... to this.
6440 (grub_vbe_get_display_start): Renamed from this...
6441 (grub_vbe_bios_get_display_start): ... to this.
6442 (grub_vbe_set_palette_data): Renamed from this...
6443 (grub_vbe_bios_set_palette_data): ... to this.
6444 (grub_vbe_set_pixel_rgb): Removed.
6445 (grub_vbe_set_pixel_index): Likewise.
6446
6447 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
6448 from this...
6449 (grub_vbe_bios_get_controller_info): ... to this.
6450 (grub_vbe_get_mode_info): Renamed from this...
6451 (grub_vbe_bios_get_mode_info): ... to this.
6452 (grub_vbe_set_mode): Renamed from this...
6453 (grub_vbe_bios_set_mode): ... to this.
6454 (grub_vbe_get_mode): Renamed from this...
6455 (grub_vbe_bios_get_mode): ... to this.
6456 (grub_vbe_set_memory_window): Renamed from this...
6457 (grub_vbe_bios_set_memory_window): ... to this.
6458 (grub_vbe_get_memory_window): Renamed from this...
6459 (grub_vbe_bios_get_memory_window): ... to this.
6460 (grub_vbe_set_scanline_length): Renamed from this...
6461 (grub_vbe_set_scanline_length): ... to this.
6462 (grub_vbe_get_scanline_length): Renamed from this...
6463 (grub_vbe_bios_get_scanline_length): ... to this.
6464 (grub_vbe_set_display_start): Renamed from this...
6465 (grub_vbe_bios_set_display_start): ... to this.
6466 (grub_vbe_get_display_start): Renamed from this...
6467 (grub_vbe_bios_get_display_start): ... to this.
6468 (grub_vbe_set_palette_data): Renamed from this...
6469 (grub_vbe_bios_set_palette_data): ... to this.
6470 (grub_vbe_bios_get_controller_info): Fixed problem with registers
6471 getting corrupted after calling it. Added more pushes and pops.
6472 (grub_vbe_bios_set_mode): Likewise.
6473 (grub_vbe_bios_get_mode): Likewise.
6474 (grub_vbe_bios_get_memory_window): Likewise.
6475 (grub_vbe_bios_set_scanline_length): Likewise.
6476 (grub_vbe_bios_get_scanline_length): Likewise.
6477 (grub_vbe_bios_get_display_start): Likewise.
6478 (grub_vbe_bios_set_palette_data): Likewise.
6479
6480 * normal/cmdline.c (cl_set_pos): Refresh the screen.
6481 (cl_insert): Likewise.
6482 (cl_delete): Likewise.
6483
6484 * term/gfxterm.c: New file.
6485
6486 * term/i386/pc/vesafb.c: Removed file.
6487
6488 * video/video.c: New file.
6489
6490 * video/i386/pc/vbe.c (real2pm): Added new function.
6491 (grub_video_vbe_draw_pixel): Likewise.
6492 (grub_video_vbe_get_video_ptr): Likewise.
6493 (grub_video_vbe_get_pixel): Likewise
6494 (grub_video_vbe_init): Likewise.
6495 (grub_video_vbe_fini): Likewise.
6496 (grub_video_vbe_setup): Likewise.
6497 (grub_video_vbe_get_info): Likewise.
6498 (grub_video_vbe_set_palette): Likewise.
6499 (grub_video_vbe_get_palette): Likewise.
6500 (grub_video_vbe_set_viewport): Likewise.
6501 (grub_video_vbe_get_viewport): Likewise.
6502 (grub_video_vbe_map_color): Likewise.
6503 (grub_video_vbe_map_rgb): Likewise.
6504 (grub_video_vbe_map_rgba): Likewise.
6505 (grub_video_vbe_unmap_color): Likewise.
6506 (grub_video_vbe_fill_rect): Likewise.
6507 (grub_video_vbe_blit_glyph): Likewise.
6508 (grub_video_vbe_blit_bitmap): Likewise.
6509 (grub_video_vbe_blit_render_target): Likewise.
6510 (grub_video_vbe_scroll): Likewise.
6511 (grub_video_vbe_swap_buffers): Likewise.
6512 (grub_video_vbe_create_render_target): Likewise.
6513 (grub_video_vbe_delete_render_target): Likewise.
6514 (grub_video_vbe_set_active_render_target): Likewise.
6515 (grub_vbe_set_pixel_rgb): Remove function.
6516 (grub_vbe_set_pixel_index): Likewise.
6517 (index_color_mode): Remove static variable.
6518 (active_mode): Likewise.
6519 (framebuffer): Likewise.
6520 (bytes_per_scan_line): Likewise.
6521 (grub_video_vbe_adapter): Added new static variable.
6522 (framebuffer): Likewise.
6523 (render_target): Likewise.
6524 (initial_mode): Likewise.
6525 (mode_in_use): Likewise.
6526 (mode_list): Likewise.
6527
5f97350b 65282006-03-10 Marco Gerards <marco@gnu.org>
6529
6530 * configure.ac (AC_INIT): Bumped to 1.93.
6531
6532 * DISTLIST: Added `include/grub/hfs.h'.
6533
a3c5c6f8 65342006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
6535
6536 * boot/i386/pc/boot.S (general_error): Before looping, try INT
6537 18H, which might help the BIOS falling back to next boot media.
6538
6de53d26 65392006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
6540
6541 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
6542 Poe Chen <poe.poechen@gmail.com>.
6543
77c4a393 65442006-01-17 Marco Gerards <marco@gnu.org>
6545
6546 * include/grub/normal.h: Include <grub/script.h>.
6547 (grub_command_list): Removed struct.
6548 (grub_command_list_t): Removed type.
6549 (grub_menu_entry): Remove members `num' and `command_list'. Add
6550 members `commands' and `sourcecode'.
6551 * include/grub/script.h: Add inclusion guards.
6552 (grub_script_cmd_menuentry): New struct.
6553 (grub_script_execute_menuentry): New prototype.
6554 (grub_script_lexer_record_start): Likewise.
6555 (grub_script_lexer_record_stop): Likewise.
6556 * normal/execute.c (grub_script_execute_menuentry): New function.
6557 * normal/lexer.c (record, recording, recordpos, recordlen): New
6558 variables.
6559 (grub_script_lexer_record_start): New function.
6560 (grub_script_lexer_record_stop): Likewise.
6561 (recordchar): Likewise.
6562 (nextchar): Likewise.
6563 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
6564 2048 as the buffer size. Add the tokens `menuentry' and `@'.
6565 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
6566 (current_menu): New variable.
6567 (free_menu): Mainly rewritten.
6568 (grub_normal_menu_addentry): New function.
6569 (read_config_file): Rewritten.
6570 * normal/menu.c (run_menu_entry): Mainly rewritten.
6571 * normal/menu_entry.c (make_screen): Rewritten te code to insert
6572 the menu entry.
6573 (run): Mainly rewritten.
6574 * normal/parser.y (menu_entry): New variable.
6575 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
6576 (menuentry): New rule.
6577 (command): Add `menuentry'.
6578 (if_statement): Allow additional returns before `fi'.
6579 * normal/script.c (grub_script_create_cmdmenu): New function.
6580
144f1f98 65812006-01-03 Marco Gerards <marco@gnu.org>
6582
6583 * INSTALL: GNU Bison is required.
6584 * configure.ac: Rewritten the test to detect Bison.
6585 * Makefile.in (YACC): New variable. Reported by Xun Sun
6586 <xun.sun.cn@gmail.com>.
6587
af4b2d89 65882006-01-03 Marco Gerards <marco@gnu.org>
6589
6590 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
6591 the HFS+ filesystem to filesystem blocks.
6592 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
6593 GCC warning is silenced.
6594
15643b71 65952006-01-03 Marco Gerards <marco@gnu.org>
6596
6597 * partmap/apple.c (apple_partition_map_iterate): Convert the data
6598 read from disk from big endian to host byte order.
6599
00905879 66002006-01-03 Hollis Blanchard <hollis@penguinppc.org>
6601
6602 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
6603 documentation.
6604 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
6605 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
6606 embedded HFS+ filesystem.
6607 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
6608 (grub_hfs_sblock): Move from here...
6609 * include/grub/hfs.h: To here... New file.
6610 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
6611 documentation.
6612 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
6613 New macros.
6614 (grub_hfsplus_volheader): Change type of member `magic' to
6615 `grub_uint16_t'.
6616 (grub_hfsplus_data): Add new member `embedded_offset'.
6617 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
6618 returned block.
6619 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
6620 Calculate the offset.
6621
8899bc3e 66222005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6623
6624 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
6625 Removed.
6626 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
6627
ae8c0277 66282005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6629
6630 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
6631 ENV->NAME is NULL after allocating ENV->VALUE.
6632
07084456 66332005-12-25 Marco Gerards <marco@gnu.org>
6634
6635 * kern/env.c (grub_env_set): Rewritten the error handling code.
6636
4750f5f1 66372005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6638
6639 * geninit.sh: Made more robust, and more portable.
6640
50214199 66412005-12-25 Marco Gerards <marco@gnu.org>
6642
6643 Add support for Apple HFS+ filesystems.
6644
6645 * fs/hfsplus.c: New file.
6646
6647 * DISTLIST: Added `fs/hfsplus.c'.
6648
6649 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
6650 (hfsplus_mod_SOURCES): New variable.
6651 (hfsplus_mod_CFLAGS): Likewise.
6652 (hfsplus_mod_LDFLAGS): Likewise.
6653 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
6654 (grub_setup_SOURCES): Likewise.
6655 (grub_mkdevicemap_SOURCES): Likewise.
6656 (grub_emu_SOURCES): Likewise.
6657 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6658
6659 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
6660
6661 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
6662
befaed6c 66632005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6664
6665 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
6666 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
6667 include/grub/parser.h, include/grub/script.h, kern/parser.c,
6668 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
6669 normal/lexer.c, normal/parser.y, normal/script.c, and
6670 partmap/gpt.c.
6671 Removed kern/sparc64/cache.c.
6672
6673 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
6674 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
6675 grub_emu_init.c.
6676
6677 * configure.ac (AC_INIT): Bumped to 1.92.
6678
6a124103 66792005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
6680
6681 * kern/err.c (grub_error_push): Added new function to support error
6682 stacks.
6683 (grub_error_pop): Likewise.
6684 (grub_error_stack_items): New local variable to support error stacks.
6685 (grub_error_stack_pos): Likewise.
6686 (grub_error_stack_assert): Likewise.
6687 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
6688 stack depth.
6689 (grub_print_error): Added support to print errors from error stack.
6690
6691 * include/grub/err.h (grub_error_push): Added function prototype.
6692 (grub_error_pop): Likewise.
6693
be973c1b 66942005-12-09 Hollis Blanchard <hollis@penguinppc.org>
6695
6696 * configure.ac: Accept `powerpc64' as host_cpu.
6697 (amd64): Rename to `biarch32'.
6698
6699 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
6700 non-cacheline-aligned addresses.
6701
6702 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
6703 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
6704 if `size' is non-zero.
6705
b04216ab 67062005-12-03 Marco Gerards <mgerards@xs4all.nl>
6707
6708 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
6709 and `cd' to make sure the filename is not prefixed with a
6710 directory name.
6711 (pkgdata_MODULES): Add `gpt.mod'.
6712 (gpt_mod_SOURCES): New variable.
6713 (gpt_mod_CFLAGS): Likewise.
6714 (gpt_mod_LDFLAGS): Likewise.
6715
6716 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
6717
6718 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
6719 New macro.
6720
6721 * partmap/gpt.c: New file.
6722
6723 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
6724 GPT partition map is detected.
6725
41730ed9 67262005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
6727
6728 * commands/i386/pc/play.c: New file.
6729 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
6730 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
6731 macros.
6732
95dc3643 67332005-11-27 Marco Gerards <mgerards@xs4all.nl>
6734
6735 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
6736 ((unused))' to silence gcc warning.
6737
1569ec51 67382005-11-26 Hollis Blanchard <hollis@penguinppc.org>
6739
6740 * configure.ac: Correct `AC_PROG_YACC' test.
6741
9abde152 67422005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6743
6744 * util/powerpc/ieee1275/grub-install.in: Run the mount point
6745 check before installing files.
6746
44b83271 67472005-11-22 Mike Small <smallm@panix.com>
6748
6749 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
6750 number regex so multidigit numbers are recognized correctly.
6751
67522005-11-22 Mike Small <smallm@panix.com>
6753
6754 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
6755 debugging message before attempting to claim memory.
6756 (grub_rescue_cmd_initrd): Add a claim debugging message and try
6757 multiple addresses in case of failure.
6758
9c12956b 67592005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6760
6761 * term/tparm.c (get_space): Remove empty `if' statement.
6762
6763 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
6764
6765 * kern/parser.c (check_varstate): Rename `state' to 's'.
6766
aeaf81d9 67672005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6768
6769 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
6770 variable definitions to the beginning of each function. Sort stack
6771 variables by size.
6772 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
6773 `buf' argument to `char *'.
6774
79bbb63f 67752005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6776
6777 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
6778 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 6779 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 6780 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6781 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6782 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6783 configfile.mod, search.mod, gzio.mod and test.mod.
6784 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6785 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6786 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6787 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6788 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6789 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6790 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6791 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6792 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6793 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6794 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6795 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6796 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6797 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6798 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6799 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6800 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6801 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6802 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6803 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6804 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6805 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6806 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
6807
6808 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
6809 `grep --include'.
6810 (pkgdata_MODULES): Add test.mod.
6811
233b1628 68122005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6813
6814 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
6815 appending to variables with "+=".
6816 (PModule): Use full pathname to generate *.lst filenames.
6817
6818 * Makefile.in: Fixed list rules moved from genmk.rb.
6819 (.DELETE_ON_ERROR): New special target.
6820 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
6821
6822 * conf/i386-pc.rmk: Include conf/common.mk.
6823 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 6824 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 6825 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6826 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6827 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6828 configfile.mod, search.mod, gzio.mod and test.mod.
6829 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6830 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6831 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6832 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6833 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6834 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6835 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6836 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6837 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6838 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6839 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6840 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6841 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6842 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6843 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6844 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6845 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6846 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6847 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6848 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6849 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6850 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6851 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
6852 here...
6853 * conf/common.rmk: ... to here. New file.
6854
6855 * conf/common.mk: New file.
6856
16f820c8 68572005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
6858
6859 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
6860 (grub_script.tab.c): ... here.
6861
6862 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
6863 (grub_script.tab.c): ... here.
6864
6865 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
6866 (grub_script.tab.c): ... here.
6867
6868 * normal/command.c (grub_command_find): Fixed a memory leak of
6869 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
6870
63ba1554 68712005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6872
6873 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
6874 "@" which marks the start of a comment on ARM.
6875 (VARIABLE): Likewise.
6876
7f67dc13 68772005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6878
79bbb63f 6879 Add support for Linux/ADFS partition tables.
7f67dc13 6880
6881 * partmap/acorn.c: New file.
6882
6883 * include/grub/acorn_filecore.h: Likewise.
6884
6885 * DISTLIST: Added `partmap/acorn.c' and
6886 `include/grub/acorn_filecore.h'.
6887
6888 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6889 `partmap/acorn.c'.
6890 (pkgdata_MODULES): Add `acorn.mod'.
6891 (acorn_mod_SOURCES): New variable.
6892 (acorn_mod_CFLAGS): Likewise.
6893
6894 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6895 `partmap/acorn.c'.
6896 (pkgdata_MODULES): Add `acorn.mod'.
6897 (acorn_mod_SOURCES): New variable.
6898 (acorn_mod_CFLAGS): Likewise.
6899
6900 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
6901 (pkgdata_MODULES): Add `acorn.mod'.
6902 (acorn_mod_SOURCES): New variable.
6903 (acorn_mod_CFLAGS): Likewise.
6904 (acorn_mod_LDFLAGS): Likewise.
6905
6906 * include/types.h (grub_disk_addr_t): New typedef.
6907
6d099807 69082005-11-13 Marco Gerards <mgerards@xs4all.nl>
6909
6910 * geninit.sh: New file.
6911
6912 * geninitheader.sh: Likewise.
6913
6914 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6915 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6916 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6917 * commands/configfile.c (grub_configfile_init)
6918 (grub_configfile_fini): Likewise.
6919 * commands/default.c (grub_default_init, grub_default_fini):
6920 Likewise.
6921 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6922 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6923 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6924 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6925 Likewise.
6926 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6927 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6928 Likewise.
6929 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 6930 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 6931 Likewise.
6932 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6933 Likewise.
fe6b695a 6934 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 6935 Likewise.
6936 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6937 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6938 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6939 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6940 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6941 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6942 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6943 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6944 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6945 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6946 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6947 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6948 * partmap/amiga.c (grub_amiga_partition_map_init)
6949 (grub_amiga_partition_map_fini): Likewise.
6950 * partmap/apple.c (grub_apple_partition_map_init)
6951 (grub_apple_partition_map_fini): Likewise.
6952 * partmap/pc.c (grub_pc_partition_map_init)
6953 (grub_pc_partition_map_fini): Likewise.
6954 * partmap/sun.c (grub_sun_partition_map_init,
6955 grub_sun_partition_map_fini): Likewise.
6956 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6957 Likewise.
6958
6959 * util/grub-emu.c: Include <grub_modules_init.h>.
6960 (main): Don't initialize and de-initialize any modules directly,
6961 use `grub_init_all' and `grub_fini_all' instead.
6962
6963 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6964 `grub_vesafb_mod_init'.
6965 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
6966 all users.
6967 * term/i386/pc/vga.c (grub_vga_init): Renamed to
6968 `grub_vga_mod_init'. Updated all users.
6969 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6970
6971 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6972 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6973 rules.
6974
6975 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6976 Generate a function to initialize the module in utilities.
6977 Updated all callers.
6978 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
6979 initialize the module in utilities. Updated all callers.
6980
9046bcf0 69812005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6982
6983 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6984 escape sequence and a literal ^L to clear the screen.
6985
6986 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6987 when returning from Open Firmware.
6988
d13ea639 69892005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6990
6991 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6992 (grub_ofconsole_height): Likewise.
6993 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6994 manually insert a '\n'.
6995 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6996 `grub_ofconsole_height'. Return early if these are already set.
6997
a8fcf206 69982005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6999
7000 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7001 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
7002 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
7003 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
7004 and `normal/script.c'.
7005 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7006 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7007 (test_mod_SOURCES): New variable.
7008 (test_mod_CFLAGS): Likewise.
7009 (test_mod_LDFLAGS): Likewise.
7010 (pkgdata_MODULES): Add `test.mod'.
7011 (grub_script.tab.c): New rule.
7012 (grub_script.tab.h): Likewise.
7013
b6b32745 70142005-11-07 Marco Gerards <mgerards@xs4all.nl>
7015
7016 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7017 `commands/test.c', `normal/execute.c', `normal/lexer.c',
7018 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7019 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7020 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7021 (test_mod_SOURCES): New variable.
7022 (test_mod_CFLAGS): Likewise.
7023 (pkgdata_MODULES): Add `test.mod'.
7024 (grub_script.tab.c): New rule.
7025 (grub_script.tab.h): Likewise.
7026
daac212a 70272005-11-06 Marco Gerards <mgerards@xs4all.nl>
7028
7029 Add initial scripting support.
7030
7031 * commands/test.c: New file.
7032 * include/grub/script.h: Likewise.
7033 * normal/execute.c: Likewise.
7034 * normal/function.c: Likewise.
7035 * normal/lexer.c: Likewise.
7036 * normal/parser.y: Likewise.
7037 * normal/script.c: Likewise.
7038
7039 * configure.ac: Add `AC_PROG_YACC' test.
7040
7041 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
7042 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
7043 `normal/function.c' and `normal/script.c'.
7044 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7045 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 7046 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
7047 variables.
daac212a 7048 (pkgdata_MODULES): Add `test.mod'.
7049 (grub_script.tab.c): New rule.
7050 (grub_script.tab.h): Likewise.
7051
7052 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
7053
7054 * include/grub/normal.h (grub_test_init): New prototype.
7055 (grub_test_fini): Likewise.
7056
7057 * normal/command.c: Include <grub/script.h>.
7058 (grub_command_execute): Rewritten.
7059
7060 * util/grub-emu.c (main): Call `grub_test_init' and
7061 `grub_test_fini'.
7062
77500b2b 70632005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7064
7065 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
7066 to 0.
7067 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
7068 there are no pending characters.
7069
e45deb9e 70702005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7071
7072 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
7073 `grub_strndup' to drop device arguments. Replace unnecessary
7074 `grub_strndup' with `grub_strdup'.
7075
4ce32619 70762005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7077
7078 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
7079 `debug' environment variable has been set.
7080
70812005-11-02 Hollis Blanchard <hollis@penguinppc.org>
7082
7083 * Makefile.in (install-local): Use $(DATA).
7084 (uninstall): Likewise.
7085 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
7086 (sbin_UTILITIES): ... to here.
7087 (sbin_SCRIPTS): New variable.
7088 (grub_install_SOURCES): New variable.
7089 * util/powerpc/ieee1275/grub-install.in: New file.
7090 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
7091 variable.
7092 (add_segments): Call `grub_util_get_path'.
7093
25fe6f03 70942005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7095
7096 From Timothy Baldwin:
7097 * commands/ls.c (grub_ls_list_files): Close FILE with
7098 grub_file_close.
7099 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
7100
04ccf3ec 71012005-10-24 Marco Gerards <mgerards@xs4all.nl>
7102
7103 * include/grub/parser.h: New file.
7104
7105 * kern/parser.c: Likewise.
7106
7107 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
7108 (grub_setup_SOURCES): Likewise.
7109 (grub_probefs_SOURCES): Likewise.
7110 (grub_emu_SOURCES): Likewise.
7111 (kernel_img_HEADERS): Add `parser.h'.
7112
7113 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7114 (grub_emu_SOURCES): Add `kern/parser.c'.
7115 (grubof_SOURCES): Likewise.
7116
7117 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7118 (grubof_SOURCES): Add `kern/parser.c'.
7119
7120 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
7121
7122 * kern/misc.c (grub_split_cmdline): Removed function.
7123
7124 * kern/rescue.c: Include <grub/parser.h>.
7125 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
7126 of `grub_split_cmdline'.
7127
7128 * normal/command.c: Include <grub/parser.h>.
7129 (grub_command_execute): Use `grub_parser_split_cmdline' instead
7130 of `grub_split_cmdline'.
7131
7132 * normal/completion.c: Include <grub/parser.h>.
7133 (cmdline_state): New variable.
7134 (iterate_dir): End the filename with a quote depending on the
7135 command line state.
7136 (get_state): new function.
7137 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
7138 split the arguments and determine the current argument. When the
7139 argument string is not quoted, escape all spaces.
7140
6d8f4b0e 71412005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7142
7143 * normal/sparc64/setjmp.S: New file.
7144
15cf03ed 71452005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7146
7147 * include/grub/sparc64/libgcc.h: New file.
7148 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
7149 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
7150 normal/sparc64/setjmp.c.
7151
03e8661a 71522005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7153
7154 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
7155 * kern/sparc64/cache.S: New file.
7156 * kern/sparc64/cache.c: Removed.
7157 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
7158 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
7159 -mtune=ultrasparc.
7160 (COMMON_LDFLAGS): Add -melf64_sparc.
7161 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
7162 (grubof_SOURCES): Use cache.S instead of cache.c.
7163 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
7164 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
7165 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
7166 commented though.
7167 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
7168 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
7169 (linux_mod_CFLAGS): Commented out.
7170 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
7171 out because module isn't built.
7172 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
7173 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
7174 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
7175 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
7176 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
7177 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7178 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7179 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
7180 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
7181 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
7182 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7183 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7184 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
7185 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
7186
34eeec8a 71872005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
7188
7189 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
7190 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
7191 longer, because HFS should not be used on PC.
7192
708367a3 71932005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7194
7195 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
7196 consistently within the loop.
7197
6fa1251a 71982005-10-15 Marco Gerards <mgerards@xs4all.nl>
7199
7200 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
7201 directory can not be read.
7202
4801580b 72032005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7204
7205 * configure.ac (AC_INIT): Increase the version number to 1.91.
7206
7207 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
7208 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
7209 term/i386/pc/serial.c.
7210
219ad426 72112005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7212
7213 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
7214 file size must be permitted.
7215
7216 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
7217 between %ah and %al.
7218
688e5699 72192005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7220
7221 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
7222 grub_uint64_t.
7223 Call the hook with a NUL-terminated filename.
7224 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
7225 grub_cpu_to_be32.
7226
7227 * kern/term.c (cursor_state): New variable.
7228 (grub_term_set_current): Reset the cursor state on a new
7229 terminal.
7230 (grub_setcursor): Rewritten to use CURSOR_STATE.
7231 (grub_getcursor): New function.
7232
7233 * include/grub/term.h (grub_getcursor): New prototype.
7234
7235 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
7236 integers on ARM. Reported by Timothy Baldwin
7237 <T.E.Baldwin99@members.leeds.ac.uk>.
7238
bb34586c 72392005-10-11 Marco Gerards <mgerards@xs4all.nl>
7240
7241 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
7242 allocated.
7243 (grub_sfs_dir): Likewise.
7244
9a909877 72452005-10-09 Marco Gerards <mgerards@xs4all.nl>
7246
7247 Add support for the SFS filesystem.
7248
7249 * fs/sfs.c: New file.
7250
7251 * DISTLIST: Added `fs/sfs.c'.
7252
7253 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
7254 (grub_probefs_SOURCES): Likewise.
7255 (grub_emu_SOURCES): Likewise.
7256 (pkgdata_MODULES): Add `sfs.mod'.
7257 (sfs_mod_SOURCES): New variable.
7258 (sfs_mod_CFLAGS): Likewise.
7259 (sfs_mod_LDFLAGS): Likewise.
7260
7261 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
7262 (pkgdata_MODULES): Add `sfs.mod'.
7263 (sfs_mod_SOURCES): New variable.
7264 (sfs_mod_CFLAGS): Likewise.
7265
7266 * util/grub-emu.c (main): Call `grub_sfs_init' and
7267 `grub_sfs_fini'.
7268
7269 * include/grub/fs.h (grub_sfs_init): New prototype.
7270 (grub_sfs_fini): Likewise.
7271
57bdbde3 72722005-10-07 Marco Gerards <mgerards@xs4all.nl>
7273
7274 Add support for the AFFS filesystem.
7275
7276 * fs/affs.c: New file.
7277
7278 * DISTLIST: Added `fs/affs.c'.
7279
7280 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
7281 (grub_probefs_SOURCES): Likewise.
7282 (grub_emu_SOURCES): Likewise.
7283 (pkgdata_MODULES): Add `affs.mod'.
7284 (affs_mod_SOURCES): New variable.
7285 (affs_mod_CFLAGS): Likewise.
7286 (affs_mod_LDFLAGS): Likewise.
7287
7288 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
7289 (pkgdata_MODULES): Add `affs.mod'.
7290 (affs_mod_SOURCES): New variable.
7291 (affs_mod_CFLAGS): Likewise.
7292
7293 * util/grub-emu.c (main): Call `grub_affs_init' and
7294 `grub_affs_fini'.
7295
7296 * include/grub/fs.h (grub_affs_init): New prototype.
7297 (grub_affs_fini): Likewise.
7298
047b67e0 72992005-10-01 Marco Gerards <mgerards@xs4all.nl>
7300
7301 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
7302
59b8208a 73032005-10-01 Marco Gerards <mgerards@xs4all.nl>
7304
7305 * configure.ac: Accept `x86_64' as host_cpu. In that case add
7306 `-m32' to CFLAGS.
7307
7308 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
7309 linking.
7310
7311 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
7312 (COMMON_LDFLAGS): New variable.
7313 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
7314 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
7315 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
7316 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
7317 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
7318 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
7319 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
7320 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
7321 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
7322 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
7323 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7324 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7325 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
7326 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
7327 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
7328 variables.
7329 (normal_mod_ASFLAGS): Add `-m32'.
7330
7331 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
7332 (grub_host_size_t, grub_host_ssize_t): New types.
7333 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 7334 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 7335 `GRUB_HOST_SIZEOF_VOID_P'.
7336
7337 * include/grub/kernel.h (struct grub_module_header): Type of
7338 member offset changed to `grub_host_off_t'. Type of member size
7339 changed to `grub_host_size_t'.
7340 (struct grub_module_info): Type of member offset changed to
7341 `grub_host_off_t'. Type of member size changed to
7342 `grub_host_size_t'.
7343
b4093103 73442005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
7345
7346 Make GRUB's kernel compliant to Multiboot Specification.
7347
7348 * kern/i386/pc/startup.S (multiboot_header): New label.
7349 (multiboot_entry): Likewise.
7350 (multiboot_trampoline): Likewise.
7351
7352 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7353 Increased to 0x4A0.
7354
7355 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
7356 put parentheses after a question mark.
7357 [!GRUB_UTIL] (my_mod): New variable.
7358
7359 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
7360
b2499b29 73612005-09-28 Marco Gerards <mgerards@xs4all.nl>
7362
7363 Adds support for the XFS filesystem. Btrees are not supported
7364 yet.
7365
7366 * fs/xfs.c: New file.
7367
7368 * DISTLIST: Added `fs/xfs.c'.
7369
7370 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
7371 (grub_probefs_SOURCES): Likewise.
7372 (grub_emu_SOURCES): Likewise.
7373 (pkgdata_MODULES): Add `xfs.mod'.
7374 (xfs_mod_SOURCES): New variable.
7375 (xfs_mod_CFLAGS): Likewise.
7376
7377 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
7378 (pkgdata_MODULES): Add `xfs.mod'.
7379 (xfs_mod_SOURCES): New variable.
7380 (xfs_mod_CFLAGS): Likewise.
7381
7382 * util/grub-emu.c (main): Call `grub_xfs_init' and
7383 `grub_xfs_fini'.
7384
7385 * include/grub/fs.h (grub_xfs_init): New prototype.
7386 (grub_xfs_fini): Likewise.
7387
7388
83d37a62 73892005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
7390
7391 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
7392 color modes, allow greater than 16 colors to be configured as
7393 a default palette.
7394
47d2d65e 73952005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7396
7397 * normal/completion.c (complete_arguments): Add the qualifier
7398 const into OPTIONS.
7399
7400 From Omniflux <omniflux+lists@omniflux.com>:
7401 * include/grub/terminfo.h: New file.
7402 * include/grub/tparm.h: Likewise.
7403 * include/grub/i386/pc/serial.h: Likewise.
7404 * term/terminfo.c: Likewise.
7405 * term/tparm.c: Likewise.
7406 * term/i386/pc/serial.c: Likewise.
7407 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
7408 serial.mod.
7409 (terminfo_mod_SOURCES): New variable.
7410 (terminfo_mod_CFLAGS): Likewise.
7411 (serial_mod_SOURCES): Likewise.
7412 (serial_mod_CFLAGS): Likewise.
7413
48b671ff 74142005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
7415
7416 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
7417 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
7418 and kern/powerpc/ieee1275/cmain.c, respectively.
7419
7420 * boot/powerpc/ieee1275/crt0.S: Moved to ...
7421 * kern/powerpc/ieee1275/crt0.S: ... here.
7422
7423 * boot/powerpc/ieee1275/cmain.c: Moved to ...
7424 * kern/powerpc/ieee1275/cmain.c: ... here.
7425
7426 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
7427 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
7428 instead of boot/powerpc/ieee1275/crt0.S and
7429 boot/powerpc/ieee1275/cmain.c, respectively.
7430
7431 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
7432 sectors. It was not used anyway.
7433
09fc77a7 74342005-08-30 Hollis Blanchard <hollis@penguinppc.org>
7435
7436 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
7437 `unused parameter' warning.
7438
003789c7 74392005-08-30 Hollis Blanchard <hollis@penguinppc.org>
7440
7441 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
7442 function.
7443 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
7444 getcharwidth.
7445
67f44c86 74462005-08-28 Marco Gerards <metgerards@student.han.nl>
7447
7448 * include/grub/normal.h (enum grub_completion_type): Added
7449 `GRUB_COMPLETION_TYPE_ARGUMENT'.
7450
7451 * normal/cmdline.c (print_completion): Handle
7452 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
7453 * normal/menu_entry.c (store_completion): Likewise.
7454
7455 * normal/completion.c (complete_arguments): New function.
7456 (grub_normal_do_completion): Call `complete_arguments' when the
7457 current words start with a dash.
7458
0b5abe02 74592005-08-27 Marco Gerards <metgerards@student.han.nl>
7460
7461 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
7462 `gzio.mod' instead of `io.mod').
7463
d9864ee1 74642005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
7465
7466 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
7467 (DISTDIRS): Added io and video.
7468 Rewrite the search routine to make an output consistently.
7469
7470 * DISTLIST: Added conf/sparc64-ieee1275.mk,
7471 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
7472 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
7473 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
7474 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
7475 util/powerpc/ieee1275/misc.c.
7476
7477 * include/grub/gzio.h: New file.
7478 * io/gzio.c: Likewise.
7479
7480 * kern/file.c (grub_file_close): Call grub_device_close only if
7481 FILE->DEVICE is not NULL.
7482
7483 * include/grub/mm.h [!NULL] (NULL): New macro.
7484
7485 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
7486
7487 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
7488 (pkgdata_MODULES): Added gzio.mod.
7489 (gzio_mod_SOURCES): New variable.
7490 (gzio_mod_CFLAGS): Likewise.
7491
7492 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
7493 (pkgdata_MODULES): Added gzio.mod.
7494 (gzio_mod_SOURCES): New variable.
7495 (gzio_mod_CFLAGS): Likewise.
7496
7497 * commands/cat.c: Include grub/gzio.h.
7498 (grub_cmd_cat): Use grub_gzfile_open instead of
7499 grub_file_open.
7500
7501 * commands/cmp.c: Include grub/gzio.h.
7502 (grub_cmd_cmp): Use grub_gzfile_open instead of
7503 grub_file_open.
7504
7505 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
7506 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
7507 grub_file_open.
7508 (grub_rescue_cmd_module): Likewise.
7509
fa46f4b5 75102005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
7511
7512 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
7513 kern/sparc64/ieee1275/init.c because it contains _start.
7514 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
7515
e9211b5d 75162005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
7517
7518 * configure.ac: Add support for sparc64 host with ieee1275
7519 firmware.
7520 * configure: Generated from configure.ac.
7521 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
7522 instead of int.
7523 (grub_ofdisk_read): Likewise.
7524 (grub_ofdisk_open): Use %p to print pointer values, and cast the
7525 pointers as (void *) to remove a warning.
7526 (grub_ofdisk_close): Likewise.
7527 (grub_ofdisk_read): Likewise.
7528 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
7529 returns, so make it return void to remove a warning.
7530 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
7531 Corresponding prototype change.
7532 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
7533 values, and cast the pointers as (void *) to remove a warning.
7534 (grub_mm_dump): Likewise.
7535 * conf/sparc64-ieee1275.mk: New file.
7536 * conf/sparc64-ieee1275.rmk: Likewise.
7537 * include/grub/sparc64/setjmp.h: Likewise.
7538 * include/grub/sparc64/types.h: Likewise.
7539 * include/grub/sparc64/ieee1275/console.h: Likewise.
7540 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7541 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7542 * include/grub/sparc64/ieee1275/time.h: Likewise.
7543 * kern/sparc64/cache.c: Likewise.
7544 * kern/sparc64/dl.c: Likewise.
7545 * kern/sparc64/ieee1275/init.c: Likewise.
7546 * kern/sparc64/ieee1275/openfw.c: Likewise.
7547
385c6a92 75482005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7549
7550 * util/console.c (grub_ncurses_putchar): If C is greater than
7551 0x7f, set C to a question mark.
7552 (grub_ncurses_getcharwidth): New function.
7553 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
7554 getcharwidth.
7555
7556 * normal/menu.c (print_entry): Made aware of Unicode. First,
7557 convert TITLE to UCS-4, and predict the cursor position by
7558 grub_getcharwidth.
7559
7560 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
7561 const to SRC.
7562 * kern/misc.c (grub_utf16_to_utf8): Likewise.
7563
16ccb8b1 75642005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7565
7566 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
7567 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7568 grub_strcat.
7569
7570 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
7571 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7572 grub_strcpy and grub_strlen. Take it into account that a space
7573 character is inserted as a delimiter.
7574
6a85ce79 75752005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7576
7577 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 7578 invalid magic in the error.
6a85ce79 7579
7580 * commands/search.c: New file.
7581
7582 * util/grub-emu.c (main): Call grub_search_init and
7583 grub_search_fini.
7584
7585 * kern/rescue.c (grub_rescue_print_disks): Removed.
7586 (grub_rescue_print_devices): New function.
7587 (grub_rescue_cmd_ls): Use grub_device_iterate with
7588 grub_rescue_print_devices instead of grub_disk_dev_iterate with
7589 grub_rescue_print_disks.
7590
7591 * kern/partition.c (grub_partition_iterate): Return the result of
7592 PARTMAP->ITERATE instead of GRUB_ERRNO.
7593
7594 * kern/device.c: Include grub/partition.h.
7595 (grub_device_iterate): New function.
7596
7597 * include/grub/partition.h (grub_partition_iterate): Return int
7598 instead of grub_err_t.
7599
7600 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
7601 prototype.
7602 [GRUB_UTIL] (grub_search_fini): Likewise.
7603
7604 * include/grub/device.h (grub_device_iterate): New prototype.
7605
7606 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7607 commands/search.c.
7608 (pkgdata_MODULES): Added search.mod.
7609 (search_mod_SOURCES): New variable.
7610 (search_mod_CFLAGS): Likewise.
7611
7612 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
7613 (pkgdata_MODULES): Added search.mod.
7614 (search_mod_SOURCES): New variable.
7615 (search_mod_CFLAGS): Likewise.
7616
7617 * commands/ls.c (grub_ls_list_disks): Renamed to ...
7618 (grub_ls_list_devices): ... this, and use grub_device_iterate.
7619 All callers changed.
7620
7621 * DISTLIST: Added commands/search.c.
7622
ef095434 76232005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7624
7625 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
7626 conversion.
7627 (grub_getcharwidth): New function.
7628
7629 * kern/misc.c (grub_utf8_to_ucs4): New function.
7630
7631 * include/grub/term.h (struct grub_term): Added a new member
7632 "getcharwidth".
7633 (grub_getcharwidth): New prototype.
7634
7635 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
7636
7637 * term/i386/pc/console.c (map_char): New function. Segregated from
7638 grub_console_putchar.
7639 (grub_console_putchar): Use map_char.
7640 (grub_console_getcharwidth): New function.
7641 (grub_console_term): Specified grub_console_getcharwidth as
7642 getcharwidth.
7643
7644 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
7645 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
7646
7647 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
7648 GRUB_ERRNO.
7649 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
7650 on grub_strtoul completely.
7651 (write_char): Declare local variables in the beginning of the
7652 function.
7653 (grub_vesafb_getcharwidth): New function.
7654 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
7655 getcharwidth.
7656
1f0a95e4 76572005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
7658
7659 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
7660 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
7661 commands/i386/pc/vbetest.c.
7662
7663 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
7664 call grub_vbe_get_controller_info again, because the returned
7665 information is volatile.
7666 (grub_vbe_set_video_mode): Mostly rewritten.
7667 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
7668 grub_vbe_status_t correctly.
7669 (grub_vbe_get_video_mode_info): Likewise.
7670 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
7671 several if statements.
7672
7673 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
7674 * commands/i386/pc/vbeinfo.c: ... this.
7675
7676 * commands/i386/pc/vbe_test.c: Renamed to ...
7677 * commands/i386/pc/vbetest.c: ... this.
7678
7679 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
7680 ...
7681 (grub_cmd_vbeinfo): ... this. Save video modes before
7682 iterating. Skip a video mode, if it is not available, not enough
7683 information is given or it is monochrome. Show the memory
7684 model. Leave the interpretation of MODEVAR to grub_strtoul
7685 completely.
7686 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
7687 (GRUB_MOD_FINI): Likewise.
7688
7689 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
7690 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
7691 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
7692 duplicated grub_env_get. Leave the interpretation of MODEVAR to
7693 grub_strtoul completely.
7694 (real2pm): Removed.
7695 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
7696 (GRUB_MOD_FINI): Likewise.
7697
7698 * normal/misc.c: Include grub/mm.h.
7699
7700 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
7701 vbe_list_modes with vbetest.mod and vbeinfo.mod.
7702 (vbe_list_modes_mod_SOURCES): Removed.
7703 (vbe_list_modes_mod_CFLAGS): Likewise.
7704 (vbe_test_mod_SOURCES): Likewise.
7705 (vbe_test_mod_CFLAGS): Likewise.
7706 (vbeinfo_mod_SOURCES): New variable.
7707 (vbeinfo_mod_CFLAGS): Likewise.
7708 (vbetest_mod_SOURCES): Likewise.
7709 (vbetest_mod_CFLAGS): Likewise.
7710
992ffbbe 77112005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
7712
7713 * normal/misc.c: New file.
7714
7715 * DISTLIST: Added normal/misc.c.
7716
7717 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
7718 DISK to HOOK. Call HOOK with DISK.
7719 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7720 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7721 * partmap/sun.c (sun_partition_map_iterate): Likewise.
7722
7723 * normal/menu_entry.c (struct screen): Added a new member
7724 "completion_shown".
7725 (completion_buffer): New global variable.
7726 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
7727 (store_completion): New function.
7728 (complete): Likewise.
7729 (clear_completions): Likewise.
7730 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
7731 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
7732 a tab, call complete.
7733
7734 * normal/completion.c (disk_dev): Removed.
7735 (print_simple_completion): Likewise.
7736 (print_partition_completion): Likewise.
7737 (print_func): New global variable.
7738 (add_completion): Do not take the arguments WHAT or PRINT any
7739 longer. Added a new argument TYPE. Instead of printing directly,
7740 call PRINT_FUNC if not NULL.
7741 All callers changed.
7742 (complete_device): Use a local variable DEV instead of
7743 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
7744 (grub_normal_do_completion): Take a new argument HOOK. Do not
7745 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
7746 empty string, return NULL instead.
7747 All callers changed.
7748
7749 * normal/cmdline.c (print_completion): New function.
7750
7751 * kern/partition.c (grub_partition_iterate): Add an argument DISK
7752 to HOOK.
7753 All callers changed.
7754
7755 * kern/disk.c (grub_print_partinfo): Removed.
7756
7757 * include/grub/partition.h (struct grub_partition_map): Add a new
7758 argument DISK into HOOK of ITERATE.
7759 (grub_partition_iterate): Add a new argument DISK to HOOK.
7760
7761 * include/grub/normal.h (enum grub_completion_type): New enum.
7762 (grub_completion_type_t): New type.
7763 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
7764 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
7765 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
7766 (GRUB_COMPLETION_TYPE_FILE): Likewise.
7767 (grub_normal_do_completion): Added a new argument HOOK.
7768 (grub_normal_print_device_info): New prototype.
7769
7770 * include/grub/disk.h (grub_print_partinfo): Removed.
7771
7772 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
7773 (normal_mod_SOURCES): Likewise.
7774 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7775 (normal_mod_SOURCES): Likewise.
7776
7777 * commands/ls.c (grub_ls_list_disks): Use
7778 grub_normal_print_device_info instead of grub_print_partinfo. Free
7779 PNAME.
7780 (grub_ls_list_files): Use grub_normal_print_device_info instead of
7781 duplicating the code.
7782
0bd41162 77832005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7784
7785 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
7786 follow GCS more precisely.
7787 * commands/i386/pc/vbe_test.c: Likewise.
7788 * include/grub/i386/pc/vbe.h: Likewise.
7789 * term/i386/pc/vesafb.c: Likewise.
7790 * video/i386/pc/vbe.c: Likewise.
7791
6323696a 77922005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7793
7794 * DISTLIST: Added term/i386/pc/vesafb.c
7795 DISTLIST: Added video/i386/pc/vbe.c
7796 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
7797 DISTLIST: Added commands/i386/pc/vbe_test.c.
7798 * commands/i386/pc/vbe_list_modes.c: New file.
7799 * commands/i386/pc/vbe_test.c: Likewise.
7800 * term/i386/pc/vesafb.c: Likewise.
7801 * video/i386/pc/vbe.c: Likewise.
7802 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
7803 (grub_vbe_probe) Added prototype.
7804 (grub_vbe_set_video_mode) Likewise.
7805 (grub_vbe_get_video_mode) Likewise.
7806 (grub_vbe_get_video_mode_info) Likewise.
7807 (grub_vbe_set_pixel_rgb) Likewise.
7808 (grub_vbe_set_pixel_index) Likewise.
7809 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
7810 (pkgdata_MODULES): Added vesafb.mod.
7811 (pkgdata_MODULES): Added vbe_list_modes.mod.
7812 (pkgdata_MODULES): Added vbe_test.mod.
7813 (vbe_mod_SOURCES): Added.
7814 (vbe_mod_CFLAGS): Likewise.
7815 (vesafb_mod_SOURCES): Likewise.
7816 (vesafb_mod_CFLAGS): Likewise.
7817 (vbe_list_modes_mod_SOURCES): Likewise.
7818 (vbe_list_modes_mod_CFLAGS): Likewise.
7819 (vbe_test_mod_SOURCES): Likewise.
7820 (vbe_test_mod_CFLAGS): Likewise.
7821
0a74e62f 78222005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
7823
0a74e62f 7824 * normal/command.c (grub_command_execute): If INTERACTIVE is
7825 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
7826 CMDLINE. Disable the pager if INTERACTIVE is true.
7827 All callers are changed.
7828
7829 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
7830 before reading a config file.
7831 * normal/main.c (read_config_file): Even if a command is not
7832 found, register it if it is within an entry.
7833
7834 * util/grub-emu.c: Include sys/types.h and unistd.h.
7835 (options): Added --hold.
7836 (struct arguments): Added a new member "hold".
7837 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
7838 missing.
7839 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
7840 cleared by a debugger, if it is not zero.
7841
7842 * include/grub/normal.h (grub_command_execute): Add an argument
7843 INTERACTIVE.
7844
e51f85ae 78452005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
7846
7847 * DISTLIST: Added include/grub/i386/pc/vbe.h.
7848
e9c6f39b 78492005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
7850
7851 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
7852 program with another one, because the old one didn't detect a bug
7853 in gcc-3.4. Always use regparm 2, because the new test is still
7854 not enough for gcc-4.0. Someone must investigate a simple test
7855 case which detects a bug in gcc-4.0.
7856
8de3495c 78572005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
7858
7859 * DISTLIST: Added normal/completion.c.
7860
7861 * normal/completion.c: New file.
7862
7863 * term/i386/pc/console.c (grub_console_getwh): New function.
7864 (grub_console_term): Assign grub_console_getwh to getwh.
7865
7866 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
7867 function is defined in normal/completion.c as
7868 grub_normal_do_completion.
7869 (grub_cmdline_get): Use grub_normal_do_completion instead of
7870 grub_tab_complete.
7871
7872 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
7873 returns non-zero, otherwise return 0.
7874 (grub_partition_iterate): First, probe the partition map. Then,
7875 call ITERATE only for this partition map.
7876
7877 * kern/misc.c (grub_strncmp): Rewritten.
7878
7879 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
7880 returns non-zero. Otherwise return 0.
7881
7882 * include/grub/partition.h (grub_partition_map_iterate): Return
7883 int instead of void.
7884
7885 * include/grub/normal.h (grub_normal_do_completion): New prototype.
7886
7887 * include/grub/misc.h (grub_strncmp): Change the type of N to
7888 grub_size_t.
7889
7890 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
7891 of void.
7892
7893 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 7894 unsigned explicitly before comparing it with I.
8de3495c 7895
7896 * kern/main.c (grub_env_write_root): Add the attribute unused into
7897 VAR.
7898
7899 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7900 normal/completion.c.
7901 (normal_mod_SOURCES): Likewise.
7902 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7903 (normal_mod_SOURCES): Likewise.
7904
7905 * normal/command.c (grub_iterate_commands): If ITERATE returns
7906 non-zero, return one immediately.
7907
e85e144b 79082005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
7909
7910 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7911 * kern/i386/pc/startup.S: Updated Global Descriptor table's
7912 descriptions.
7913 (grub_vbe_get_controller_info): New function.
7914 (grub_vbe_get_mode_info): Likewise.
7915 (grub_vbe_set_mode): Likewise.
7916 (grub_vbe_get_mode): Likewise.
7917 (grub_vbe_set_memory_window): Likewise.
7918 (grub_vbe_get_memory_window): Likewise.
7919 (grub_vbe_set_scanline_length): Likewise.
7920 (grub_vbe_get_scanline_length): Likewise.
7921 (grub_vbe_set_display_start): Likewise.
7922 (grub_vbe_get_display_start): Likewise.
7923 (grub_vbe_set_palette_data): Likewise.
7924 * include/grub/i386/pc/vbe.h: New file.
7925
c46153d2 79262005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7927
7928 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7929 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7930 * DISTLIST: Likewise.
7931 * kern/ieee1275/of.c: Moved to ...
7932 * kern/ieee1275/ieee1275.c: ... here.
7933
0cb90c45 79342005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7935
7936 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7937 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7938 Pass 0 as `end' parameter to grub_strtoul().
7939
a19fb360 79402005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7941
7942 * include/grub/powerpc/ieee1275/console.h: Do not include
7943 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
7944 ifdef.
7945 (grub_console_cur_color): Remove i386-specific prototype.
7946 (grub_console_real_putchar): Likewise.
7947 (grub_console_checkkey): Likewise.
7948 (grub_console_getkey): Likewise.
7949 (grub_console_getxy): Likewise.
7950 (grub_console_gotoxy): Likewise.
7951 (grub_console_cls): Likewise.
7952 (grub_console_setcursor): Likewise.
7953 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7954 Include <grub/machine/console.h>.
7955 * term/ieee1275/ofconsole.c: Likewise.
7956
4ac9bd04 79572005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
7958
7959 * Makefile.in (LIBLZO): New variable.
7960
7961 * configure.ac: Check for LZO version 2.
7962
7963 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7964 lzo/lzo1x.h instead of lzo1x.h.
7965
7966 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7967 of -llzo.
7968
7969 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7970 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7971
7972 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7973 copying the data from PARTITION to P.
7974
f4917dfd 79752005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7976
7977 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7978 negative, unload the module.
7979
7980 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7981 map is "pc_partition_map" but not "pc".
7982 (usage): Fix the description. The options are --boot-image and
7983 --core-image but not --boot-file or --core-file.
7984 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7985 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7986 DEFAULT_DIRECTORY.
7987
7988 * util/i386/pc/grub-install.in: Do not specify --boot-file or
7989 --core-file. Specify INSTALL_DEVICE as an argument.
7990
7991 * util/console.c: Include config.h.
7992 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7993 [HAVE_NCURSES_H]: Include ncurses.h.
7994 [HAVE_CURSES_H]: Include curses.h.
7995 [!A_NORMAL] (A_NORMAL): Defined as zero.
7996 [!A_STANDOUT] (A_STANDOUT): Likewise.
7997
7998 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7999 -lncurses.
8000 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
8001
8002 * configure.ac: Check for curses libraries and headers.
8003
8004 * Makefile.in (LIBCURSES): New variable.
8005
8006 * genmk.rb (Script::rule): Set the executable bits.
8007
8008 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
8009 name of the PC partition map is "pc_partition_map" but not "pc".
8010
0e143073 80112005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8012
8013 * util/i386/pc/grub-install.in (grub_probefs): New variable.
8014 (modules): Likewise.
8015 (usage): Added descriptions for --modules and --grub-probefs.
8016 Handle --modules and --grub-probefs. Save the arguments in MODULES
8017 and GRUB_PROBEFS, respectively.
8018 Auto-detect a filesystem module against GRUBDIR. If the result is
8019 empty and modules are not specified explicitly, abort the
8020 installation. Add the result to MODULES.
8021
8022 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
8023 disk/powerpc/ieee1275/ofdisk.c,
8024 include/grub/powerpc/ieee1275/init.h and
8025 term/powerpc/ieee1275/ofconsole.c.
8026 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
8027 term/ieee1275/ofconsole.c.
8028
8029 * include/grub/powerpc/ieee1275/console.h: Resurrected.
8030
8031 * COPYING: Upgraded to the latest version. Only the address of the
8032 FSF office has changed.
8033
efd6e6d5 80342005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8035
8036 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8037 kern/ieee1275.c with kern/ieee1275/of.c.
8038
8039 * kern/ieee1275.c: Moved to ...
8040 * kern/ieee1275/of.c: ... here.
8041
8ceafda2 80422005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
8043
8044 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 8045 readability.
8ceafda2 8046
8047 * config.guess: Updated to the latest version from gnulib.
8048 * config.sub: Likewise.
8049 * install.sh: Likewise.
8050 * mkinstalldirs: Likewise.
8051
8052 * include/grub/console.h: Removed. This file is arch-specific. Do
8053 not put this in include/grub.
8054
8055 * include/grub/i386/pc/console.h: Resurrected.
8056
8057 * util/console.c: Include grub/machine/console.h instead of
8058 grub/console.h.
8059 * util/grub-emu.c: Likewise.
8060
267f6cd9 80612005-08-04 Marco Gerards <metgerards@student.han.nl>
8062
8063 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
8064 hardcoded value.
8065
8066 From Vincent Pelletier <subdino2004@yahoo.fr>
8067 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
8068 Redefined to use grub_getwh.
8069 (grub_term): New member named getwh.
8070 (grub_getwh): New prototype.
8071 * kern/term.c (grub_getwh): New function.
8072 * term/i386/pc/console.c (grub_console_getwh): New function.
8073 (grub_console_term): New member `getwh'.
8074 * term/i386/pc/vga.c (grub_vga_getwh): New function.
8075 (grub_vga_term): New member `getwh'.
0b5abe02 8076 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 8077 grub_ssize_t.
8078 (grub_ofconsole_getw): New function.
8079 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
8080 (grub_ofconsole_term): New field named getwh and new initial
8081 value.
8082
3be7266d 80832005-08-03 Hollis Blanchard <hollis@penguinppc.org>
8084
8085 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
8086 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
8087 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
8088 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
8089 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
8090 of <grub/machine/ieee1275.h>.
8091 * commands/ieee1275/reboot.c: Likewise.
8092 * boot/powerpc/ieee1275/ieee1275.c: Move ...
8093 * kern/ieee1275.c: ... to here. All users updated. Change all
8094 parameter structs to use new type `grub_ieee1275_cell_t'.
8095 * term/powerpc/ieee1275/ofconsole.c: Move ...
8096 * term/ieee1275/ofconsole.c: ... to here. All users updated.
8097 * disk/powerpc/ieee1275/ofdisk.c: Move ...
8098 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
8099 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
8100 to return int.
8101 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
8102 Remove unused prototypes. All users updated.
8103 * include/grub/powerpc/ieee1275/console.h: Removed.
8104 * include/grub/powerpc/ieee1275/ieee1275.h: Define
8105 `grub_ieee1275_cell_t'.
8106 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
8107 Cast comparisons with -1 to the correct type.
8108 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
8109 type to match `grub_ieee1275_entry_fn'.
8110
8b5f3938 81112005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
8112
8113 * DISTLIST: Added util/i386/pc/grub-probefs.c.
8114
8115 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
8116 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
8117 partmap/sun.c.
8118 (grub_probefs_SOURCES): New variable.
8119
8120 * util/i386/pc/grub-probefs.c: New file.
8121
8122 * util/i386/pc/grub-setup.c (main): Call
8123 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
8124 grub_hfs_init and grub_jfs_init to initialize the system. Call
8125 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
8126 grub_pc_partition_map_fini to finish the system.
8127
ea409713 81282005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
8129
8130 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
8131 function.
8132 (grub_multiboot_load_elf32): Likewise.
8133 (grub_multiboot_is_elf64): Likewise.
8134 (grub_multiboot_load_elf64): Likewise.
8135 (grub_multiboot_load_elf): Likewise.
8136 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
8137 an ELF32 or ELF64 file.
8138 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
8139
8140 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
8141 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
8142 NULL before calling FS->LABEL.
8143 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
8144 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
8145 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
8146 before calling FS->LABEL.
8147
141a288b 81482005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
8149
8150 * util/i386/pc/grub-install.in (datadir): New variable.
8151 (libdir): Removed.
8152 (pkgdatadir): New variable.
8153 (pkglibdir): Removed.
8154
0d5f8a54 81552005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
8156
8157 * DISTLIST: Added util/i386/pc/grub-install.in.
8158
8159 * util/i386/pc/grub-install.in: New file.
8160
8161 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
8162 (grub_install_SOURCES): Likewise.
8163
8164 * genmk.rb: Added support for scripts.
8165 (Script): New class.
8166 (scripts): New variable.
8167
8168 * Makefile.in (install-local): Install sbin_SCRIPTS by
8169 INSTALL_SCRIPT.
8170 (uninstall): Remove sbin_SCRIPTS.
8171
8172 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
8173 device, try to get a GRUB device by
8174 grub_util_biosdisk_get_grub_dev.
8175 Free DEST_DEV.
8176
8177 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
8178 description for --device-map.
8179
5f968e1e 81802005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8181
8182 Change the semantics of variable hooks. They now return strings
8183 instead of error values.
8184
8185 * util/i386/pc/grub-setup.c: Include grub/env.h.
8186 (setup): Use grub_device_set_root instead of grub_env_set.
8187
8188 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
8189 grub_env_get instead of grub_device_set_root and
8190 grub_device_get_root, respectively.
8191
8192 * kern/main.c (grub_env_write_root): New function.
8193 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
8194 grub_env_set instead of grub_device_set_root.
8195
8196 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
8197 many variables.
8198 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
8199 rather than calling ENV->WRITE_HOOK afterwards.
8200 (grub_env_get): Return the result of ENV->READ_HOOK rather than
8201 passing a pointer of a pointer.
8202 (grub_register_variable_hook): Change the types of "read_hook" and
8203 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
8204 respectively.
8205 Allocate the default empty string on the heap, because this string
8206 may be freed later.
8207
8208 * kern/device.c: Include grub/env.h.
8209 (grub_device_set_root): Removed.
8210 (grub_device_get_root): Likewise.
8211 (grub_device_open): Use grub_env_get instead of
8212 grub_device_get_root.
8213
8214 * include/grub/env.h (grub_env_read_hook_t): New type.
8215 (grub_env_write_hook_t): Likewise.
8216 (grub_env_var): Change the types of "read_hook" and "write_hook"
8217 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
8218 (grub_register_variable_hook): Likewise.
8219
8220 * include/grub/device.h (grub_device_set_root): Removed.
8221 (grub_device_set_root): Likewise.
8222
8223 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
8224 make sure that DIRNAME terminates with '/', so that
8225 grub_fat_find_dir will fail if PATH is not a directory.
8226
8227 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
8228 from DIRNAME.
8229 Use the qualifier auto for print_files and print_files_long.
8230 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
8231 as a regular file.
8232 Put a newline only if there is no error.
8233 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
8234 used.
8235
896f0afd 82362005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8237
8238 * kern/partition.c (grub_partition_probe): Initialize PART to
8239 NULL. Otherwise, when no partition map is registered, this returns
8240 a garbage.
8241
b28b81b2 82422005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
8243
8244 * partmap/apple.c (apple_partition_map_iterate): Check if POS
8245 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
8246 valid.
8247
5f3607e0 82482005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
8249
8250 * commands/ls.c (grub_ls_list_disks): Print the filesystem
8251 information on each device, if it does not have partitions. Print
8252 "Device" instead of "Disk", because this function is not specific
8253 to disk devices.
8254
8255 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
8256 static to ensure that it is put on the memory rather than a
8257 register.
8258
502c87e8 82592005-07-17 Yoshinori Okuji <okuji@enbug.org>
8260
8261 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
8262 (grub_cat_init): Likewise.
8263 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
8264 (options): Likewise.
8265 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
8266 (grub_configfile_init): Likewise.
8267 * font/manager.c (GRUB_MOD_INIT): Likewise.
8268 * commands/help.c (GRUB_MOD_INIT): Likewise.
8269 (grub_help_init): Likewise.
8270 * normal/command.c (grub_command_init): Likewise.
8271 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
8272 * disk/loopback.c (grub_loop_init): Likewise.
8273 (GRUB_MOD_INIT): Likewise.
8274 * commands/ls.c (grub_ls_init): Likewise.
8275 (GRUB_MOD_INIT): Likewise.
8276 (options): Likewise.
8277 * commands/boot.c (grub_boot_init): Likewise.
8278 (GRUB_MOD_INIT): Likewise.
8279 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
8280 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
8281 (GRUB_MOD_INIT): Likewise.
8282 * commands/cmp.c (grub_cmp_init): Likewise.
8283 (GRUB_MOD_INIT): Likewise.
8284
8285 * normal/arg.c: Use <> instead of "" to include header files.
8286 (SHORT_ARG_HELP): New macro.
8287 (SHORT_ARG_USAGE): Likewise.
8288 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
8289 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
8290 descriptions.
8291 (find_short): Check if C is 'h' or 'u' explicitly.
8292 (grub_arg_show_help): Use space characters instead of tabs. Treat
8293 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
8294 are shown with --help and --usage only if they are not used for
8295 the command itself.
8296 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
8297 'h' and 'u'.
8298
8299 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
8300 const into "longarg". Change the type of "shortarg" to int.
8301
f806d18e 83022005-07-17 Yoshinori Okuji <okuji@enbug.org>
8303
8304 * boot/i386/pc/boot.S (boot_drive_check): New label.
8305
8306 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
8307 macro.
8308
8309 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
8310 which do not pass a boot drive correctly. Copied from GRUB Legacy.
8311
e293232b 83122005-07-17 Yoshinori Okuji <okuji@enbug.org>
8313
8314 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
8315 When turning off Gate A20, skip the check and return immediately,
8316 because this is not fatal usually.
8317
ebedfd00 83182005-07-17 Yoshinori Okuji <okuji@enbug.org>
8319
8320 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
8321 be 0x7C00 instead of 0x8000.
8322
8323 * boot/i386/pc/pxeboot.S: Rewritten.
8324
8325 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
8326 EXT_C.
8327 (gate_a20_check_state): Read a byte from 0x108000. Invert the
8328 result.
8329
654fc59f 83302005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
8331
8332 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
8333 robustness. This routine now supports a BIOS call and System
8334 Control Port A to modify the gate A20.
8335
8336 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8337 Increased to 0x440.
8338
09f9923f 83392005-07-12 Hollis Blanchard <hollis@penguinppc.org>
8340
8341 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
8342 device path and resulting ihandle.
8343 (grub_ofdisk_close): dprintf the ihandle being closed.
8344 (grub_ofdisk_read): dprintf function parameters.
8345 * kern/mm.c (grub_mm_init_region): Likewise.
8346 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
8347 (grub_linux_boot): dprintf the Linux entry point, initrd address and
8348 size, and boot arguments.
8349 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
8350 before loading into memory.
8351 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
8352 before loading into memory.
8353
7ef504d8 83542005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
8355
8356 * kern/mm.c: Added much documentation.
8357 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
8358 8, set to 5 instead of 8.
8359
e0f050c2 83602005-07-10 Yoshinori Okuji <okuji@enbug.org>
8361
8362 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
8363
8364 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
8365 (grub_mkdevicemap_SOURCES): New variable.
8366
8367 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
8368 lib/device.c of GRUB Legacy.
8369
7224189a 83702005-07-10 Yoshinori Okuji <okuji@enbug.org>
8371
8372 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
8373 instead of PATH is NULL.
8374
68c864eb 83752005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
8376
8377 * commands/cmp.c (BUFFER_SIZE): New macro.
8378 (grub_cmd_cmp): Close the right file at the right time. Compare
8379 only data just read. Don't report files of different size as
8380 identical. Dynamically allocate buffers. Move variable
8381 declarations at the beginning of function.
8382
e6f3e614 83832005-07-09 Yoshinori Okuji <okuji@enbug.org>
8384
8385 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
8386 reverse.
8387
f8f1559a 83882004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
8389
8390 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
8391 when backspace is pressed at beginning of line.
8392
39c9d41d 83932005-07-03 Yoshinori Okuji <okuji@enbug.org>
8394
8395 * DISTLIST: Added genfslist.sh.
8396
8397 * normal/main.c (fs_module_list): New variable.
8398 (autoload_fs_module): New function.
8399 (read_fs_list): Likewise.
8400 (grub_normal_execute): Call read_fs_list.
8401
8402 * kern/fs.c (grub_fs_autoload_hook): New variable.
8403 (grub_fs_probe): Added support for auto-loading.
8404
8405 * include/grub/normal.h (struct grub_fs_module_list): New struct.
8406 (grub_fs_module_list_t): New type.
8407
8408 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
8409 (grub_fs_autoload_hook): New prototype.
8410
8411 * genfslist.sh: New file.
8412
8413 * genmk.rb: Added a rule to generate a filesystem list.
8414
121c1d83 84152005-06-30 Marco Gerards <metgerards@student.han.nl>
8416
8417 * configure.ac: Fix the test for cross-compiling.
8418
8419 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
8420 define GRUB_UTIL anymore.
8421
8422 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
8423 so this function works on other systems than just big endian.
8424 (load_modules): Likewise.
8425 (add_segments): Likewise.
8426
e75d76e1 84272005-06-23 Hollis Blanchard <hollis@penguinppc.org>
8428
8429 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
8430 contains `l' modifier, get a long from va_arg().
8431
50b5a0a7 84322005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
8433
8434 * kern/mm.c (grub_free): If the next free block which is being
8435 merged is the first free block, set the first block to the block
8436 being freed.
8437 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
8438
89371b20 84392005-05-08 Hollis Blanchard <hollis@penguinppc.org>
8440
8441 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
8442 `grub_ieee1275_chosen'.
8443
168d6e58 84442005-05-08 Hollis Blanchard <hollis@penguinppc.org>
8445
8446 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
8447 (grub_ieee1275_chosen): New variable.
8448 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
8449 `chosen'.
8450 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
8451 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8452 Rename first argument to `phandle' for consistency.
8453 (grub_ieee1275_get_property_length): Likewise.
8454 (grub_ieee1275_next_property): Likewise. Change type of first argument
8455 to grub_ieee1275_phandle_t.
8456 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
8457 Move export next to declaration.
8458 (grub_ieee1275_chosen): New variable.
8459 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
8460 Correct cosmetic typo.
8461 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
8462 `grub_ieee1275_chosen'.
8463 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
8464 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
8465 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
8466 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
8467 `grub_ieee1275_chosen'.
8468
ca5baa3f 84692005-05-10 Hollis Blanchard <hollis@penguinppc.org>
8470
8471 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
8472 /chosen/bootargs.
8473 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
8474 /chosen/bootargs as "variable=value" pairs.
8475
708b345f 84762005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
8477
8478 * include/grub/misc.h (grub_dprintf): New macro.
8479 (grub_real_dprintf): New prototype.
8480 (grub_strword): Likewise.
8481 (grub_iswordseparator): Likewise.
8482 * kern/misc.c (grub_real_dprintf): New function.
8483 (grub_strword): Likewise.
8484 (grub_iswordseparator): Likewise.
8485
f4c5e67c 84862005-04-30 Hollis Blanchard <hollis@penguinppc.org>
8487
8488 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
8489 (roundup): Remove macro.
8490 (grub_ieee1275_flags): Make static.
8491 (grub_ieee1275_realmode): Remove.
8492 (grub_ieee1275_test_flag): New function.
8493 (grub_ieee1275_set_flag): Likewise.
8494 (find_options): Rename to `grub_ieee1275_find_options'; update
8495 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
8496 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
8497 (cmain): New prototype.
8498 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
8499 `grub_ieee1275_flags' directly.
8500 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
8501 machine/biosdisk.h.
8502 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
8503 Don't include grub/machine/init.h.
8504 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
8505 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8506 Remove prototype.
8507 (grub_ieee1275_realmode): Likewise.
8508 (grub_ieee1275_flag): New enum.
8509 (grub_ieee1275_test_flag): New prototype.
8510 (grub_ieee1275_set_flag): New prototype.
8511 * include/grub/powerpc/ieee1275/init.h: Remove file.
8512 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
8513 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
8514 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
8515 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
8516 comment.
8517 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
8518 `grub_ieee1275_test_flag'.
8519 (grub_ieee1275_encode_devname): Likewise.
8520
ed16607e 85212005-04-21 Hollis Blanchard <hollis@penguinppc.org>
8522
8523 * include/grub/powerpc/ieee1275/ieee1275.h
8524 (grub_ieee1275_encode_devname): New prototype.
8525 (grub_ieee1275_get_filename): Likewise.
8526 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
8527 function.
8528 (grub_set_prefix): Likewise.
8529 (grub_machine_init): Call grub_set_prefix.
8530 * kern/powerpc/ieee1275/openfw.c: Fix typos.
8531 (grub_parse_type): New enum.
8532 (grub_ieee1275_get_devargs): New function.
8533 (grub_ieee1275_get_devname): Likewise.
8534 (grub_ieee1275_parse_args): Likewise.
8535 (grub_ieee1275_get_filename): Likewise.
8536 (grub_ieee1275_encode_devname): Likewise.
8537
be369920 85382005-03-30 Marco Gerards <metgerards@student.han.nl>
8539
8540 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
8541 `grub_loader_unset'.
8542
a5ce3a4a 85432005-03-26 Hollis Blanchard <hollis@penguinppc.org>
8544
8545 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
8546 instead of grub_ieee1275_interpret.
8547 (grub_halt_init): New function.
8548 (grub_halt_fini): Likewise.
8549 (GRUB_MOD_INIT): Correct message grammar.
8550 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
8551 instead of grub_ieee1275_interpret.
8552 (grub_reboot_init): New function.
8553 (grub_reboot_fini): Likewise.
8554 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
8555 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
8556 util/i386/pc/misc.c with commands/ieee1275/halt.c,
8557 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
8558 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
8559 function.
8560 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
8561 Add prototype.
8562 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
8563 prototype.
8564 (grub_halt): Likewise.
8565 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
8566 (cmain): Remove __attribute__((unused)).
8567 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
8568 (grub_heap_len): Likewise.
8569 (grub_machine_fini): New function.
8570 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
8571 (grub_halt): Likewise.
8572 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
8573 function.
8574 * util/powerpc/ieee1275/misc.c: New file.
8575
0058f771 85762005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8577
8578 * DISTLIST: New file.
8579 * gendistlist.sh: Likewise.
8580
8581 * Makefile.in (COMMON_DISTFILES): Removed.
8582 (BOOT_DISTFILES): Likewise.
8583 (CONF_DISTFILES): Likewise.
8584 (DISK_DISTFILES): Likewise.
8585 (FS_DISTFILES): Likewise.
8586 (INCLUDE_DISTFILES): Likewise.
8587 (KERN_DISTFILES): Likewise.
8588 (LOADER_DISTFILES): Likewise.
8589 (TERM_DISTFILES): Likewise.
8590 (UTIL_DISTFILES): Likewise.
8591 (DISTFILES): Likewise.
8592 (uninstall): Uninstall files in $(pkgdata_DATA).
8593 (DISTLIST): New target.
8594 (distdir): Use the contents of the file DISTLIST to get a list of
8595 distributed files.
8596
46b3b8a5 85972005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8598
8599 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
8600 descriptor. This is ported from GRUB Legacy.
8601
8602 * gencmdlist.sh: Added an extra semicolon to make it work with
8603 old sed versions. Reported by Robert Bihlmeyer
8604 <robbe@orcus.priv.at>.
8605
5822ff87 86062005-03-08 Yoshinori Okuji <okuji@enbug.org>
8607
8608 Automatic loading of commands is supported.
8609
8610 * normal/main.c (read_command_list): New function.
8611 (grub_normal_execute): Call read_command_list.
8612
8613 * normal/command.c (grub_register_command): Return zero or CMD.
8614 Allocate CMD->NAME from the heap.
8615 Initialize CMD->MODULE_NAME to zero.
8616 Find the same name as well. If the same command is found and it is
8617 a dummy command, overwrite members. If it is not a dummy command,
8618 return zero.
8619 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
8620 (grub_command_find): If a dummy command is found, load a module
8621 and retry to find a command only once.
8622
8623 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
8624 make sure that each command is loaded.
8625
8626 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
8627 macro.
8628 (struct grub_command): Remove const from the member `name'.
8629 Add a new member `module_name'.
8630 (grub_register_command): Return grub_command_t.
8631
8632 * commands/help.c (grub_cmd_help): Call grub_command_find to make
8633 sure that each command is loaded.
8634
8635 * genmk.rb (PModule::rule): Specify a module name without the
8636 suffix ".mod" to gencmdlist.sh.
8637
7b1f4b57 86382005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8639
8640 * gencmdlist.sh: New file.
8641
8642 * genmk.rb (PModule::rule): Generate a rule for a command list.
8643 Clean command.lst.
8644 Generate command.lst from $(COMMANDFILES).
8645
8646 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
8647 (DATA): Added $(pkgdata_DATA).
8648 (install-local): Install files in $(pkgdata_DATA).
8649
062aaf39 86502005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8651
8652 * term/i386/pc/vga.c (debug_command): Removed.
8653 (GRUB_MOD_INIT): Do not register the command "debug".
8654
8655 From Hollis Blanchard:
8656 * commands/configfile.c: New file.
8657 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8658 commands/configfile.c.
8659 (pkgdata_MODULES): Added configfile.mod.
8660 (configfile_mod_SOURCES): New variable.
8661 (configfile_mod_CFLAGS): Likewise.
8662 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8663 commands/configfile.c.
8664 (pkgdata_MODULES): Added configfile.mod.
8665 (configfile_mod_SOURCES): New variable.
8666 (configfile_mod_CFLAGS): Likewise.
8667 * util/grub-emu.c (main): Call grub_configfile_init and
8668 grub_configfile_fini.
8669 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
8670 prototype.
8671 [GRUB_UTIL] (grub_configfile_fini): Likewise.
8672
cee01aa6 86732005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8674
8675 * normal/arg.c (grub_arg_show_help): Do not show the bug report
8676 address.
8677
8678 * commands/help.c (grub_cmd_help): Do not print newlines after
8679 the last command in print_command_help.
8680
93f3a1d8 86812005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8682
8683 * commands/default.h: New file.
8684 * commands/timeout.h: Likewise.
8685 * normal/context.c: Likewise.
8686
8687 * util/misc.c: Do not include sys/times.h.
8688 Include sys/time.h and grub/machine/time.h.
8689 (grub_get_rtc): Rewritten with gettimeofday.
8690
8691 * util/grub-emu.c (main): Call grub_default_init and
8692 grub_timeout_init before grub_normal_init, and call
8693 grub_timeout_fini and grub_default_fini after grub_main.
8694
8695 * util/console.c (grub_ncurses_checkkey): Return the read
8696 character or -1.
8697
8698 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
8699 timeouts.
8700
8701 * normal/main.c (read_config_file): Push MENU. If this fails,
8702 print an error and wait for a user input.
8703 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
8704 If a menu is empty or an error occurs, pop MENU.
8705 (grub_normal_execute): Pop and free MENU after grub_menu_run
8706 returns.
8707
8708 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
8709
8710 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
8711 include time.h.
8712 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8713 without GRUB_UTIL.
8714 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
8715 time.h.
8716 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8717 without GRUB_UTIL.
8718
8719 * include/grub/normal.h (struct grub_menu_list): New struct.
8720 (grub_menu_list_t): New type.
8721 (struct grub_context): New struct.
8722 (grub_context_t): New type.
8723 (grub_register_command): Got rid of EXPORT_FUNC.
8724 (grub_unregister_command): Likewise.
8725 (grub_context_get): New prototype.
8726 (grub_context_get_current_menu): Likewise.
8727 (grub_context_push_menu): Likewise.
8728 (grub_context_pop_menu): Likewise.
8729 [GRUB_UTIL] (grub_default_init): Likewise.
8730 [GRUB_UTIL] (grub_default_fini): Likewise.
8731 [GRUB_UTIL] (grub_timeout_init): Likewise.
8732 [GRUB_UTIL] (grub_timeout_fini): Likewise.
8733
8734 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
8735 commands/timeout.c and normal/context.c.
8736 (pkgdata_MODULES): Added default.mod and timeout.mod.
8737 (normal_mod_SOURCES): Added normal/context.c.
8738 (default_mod_SOURCES): New variable.
8739 (default_mod_CFLAGS): Likewise.
8740 (timeout_mod_SOURCES): Likewise.
8741 (timeout_mod_CFLAGS): Likewise.
8742 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
8743 conf/i386-pc.rmk.
8744 (pkgdata_MODULES): Added default.mod and timeout.mod.
8745 (normal_mod_SOURCES): Added normal/context.c.
8746 (default_mod_SOURCES): New variable.
8747 (default_mod_CFLAGS): Likewise.
8748 (timeout_mod_SOURCES): Likewise.
8749 (timeout_mod_CFLAGS): Likewise.
8750
8751 * Makefile.in (all-local): Added $(MKFILES).
8752
4ed2e1dd 87532005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
8754
8755 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
8756 (grub_emu_SOURCES): Likewise.
8757 (pkgdata_MODULES): Add `sun.mod'.
8758 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8759 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8760 `partmap/sun.c'.
8761 (pkgdata_MODULES): Add `sun.mod'.
8762 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8763 * include/grub/partition.h (grub_sun_partition_map_init): New
8764 prototype.
8765 (grub_sun_partition_map_fini): Likewise.
8766 * partmap/sun.c: New file.
8767 * util/grub-emu.c (main): Initialize and de-initialize the sun
8768 partitionmap support.
8769
4d4e372e 87702005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
8771
8772 This implements an Emacs-like menu entry editor.
8773
8774 * normal/menu_entry.c: New file.
8775
8776 * util/console.c (grub_ncurses_putchar): Translate some Unicode
8777 characters to ASCII.
8778 (saved_char): New variable.
8779 (grub_ncurses_checkkey): Rewritten completely.
8780 (grub_ncurses_getkey): Likewise.
8781 (grub_ncurses_init): Call raw instead of cbreak.
8782
8783 * normal/menu.c (print_entry): Do not put a space.
8784 (init_page): Renamed to ...
8785 (grub_menu_init_page): ... this. All callers changed.
8786 (edit_menu_entry): Removed.
8787 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
8788
8789 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
8790
8791 * kern/misc.c (grub_vprintf): Call grub_refresh.
8792
8793 * normal/menu.c (DISP_LEFT): Renamed to ...
8794 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
8795 * normal/menu.c (DISP_UP): Renamed to ...
8796 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
8797 * normal/menu.c (DISP_RIGHT): Renamed to ...
8798 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
8799 * normal/menu.c (DISP_DOWN): Renamed to ...
8800 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
8801 * normal/menu.c (DISP_HLINE): Renamed to ...
8802 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
8803 * normal/menu.c (DISP_VLINE): Renamed to ...
8804 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
8805 * normal/menu.c (DISP_UL): Renamed to ...
8806 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
8807 * normal/menu.c (DISP_UR): Renamed to ...
8808 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
8809 * normal/menu.c (DISP_LL): Renamed to ...
8810 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
8811 * normal/menu.c (DISP_LR): Renamed to ...
8812 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
8813 * normal/menu.c (TERM_WIDTH): Renamed to ...
8814 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
8815 * normal/menu.c (TERM_HEIGHT): Renamed to ...
8816 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
8817 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
8818 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
8819 * normal/menu.c (TERM_MARGIN): Renamed to ...
8820 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
8821 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
8822 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
8823 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
8824 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
8825 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
8826 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
8827 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
8828 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
8829 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
8830 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
8831 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
8832 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
8833 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
8834 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
8835 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
8836 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
8837 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
8838 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
8839 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
8840 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
8841 All callers changed.
8842
8843 * include/grub/normal.h: New prototype.
8844
8845 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8846 normal/menu_entry.c.
8847 (normal_mod_SOURCES): Likewise.
8848 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8849 (normal_mod_SOURCES): Likewise.
8850
e6b92c8a 88512005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
8852
8853 * include/grub/normal.h (grub_halt_init): New prototype.
8854 (grub_halt_fini): Likewise.
8855 (grub_reboot_init): Likewise.
8856 (grub_reboot_fini): Likewise.
8857
8858 * util/grub-emu.c: Include signal.h.
8859 (main_env): New global variable.
8860 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
8861 catch C-c.
8862 (grub_machine_fini): New function.
8863 (main): Call grub_halt_init and grub_reboot_init before
8864 grub_main, and grub_reboot_fini and grub_halt_fini after it.
8865 Call setjmp with MAIN_ENV to go back afterwards.
8866 Call grub_machine_fini right before return.
8867
8868 * include/grub/util/misc.h: Include setjmp.h.
8869 (main_env): New prototype.
8870
8871 * include/grub/kernel.h (grub_machine_fini): New prototype.
8872 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
8873 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
8874
8875 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
8876 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
8877 * term/i386/pc/console.c (grub_console_fini): Likewise.
8878
8879 * util/i386/pc/misc.c: New file.
8880
8881 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8882 util/i386/pc/misc.c, commands/i386/pc/halt.c and
8883 commands/i386/pc/reboot.c.
8884
c642636f 88852005-02-14 Guillem Jover <guillem@hadrons.org>
8886
8887 * include/grub/dl.h (grub_dl_check_header): New prototype.
8888 (grub_arch_dl_check_header): Change return type to grub_err_t,
8889 remove size parameter and export function. Update all callers.
8890 * kern/dl.c (grub_dl_check_header): New function.
8891 (grub_dl_load_core): Use `grub_dl_check_header' instead of
8892 `grub_arch_dl_check_header'. Check ELF type. Check if sections
8893 are inside the core.
8894 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
8895 independent ELF header checks.
8896 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8897 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
8898 `grub_dl_check_header' instead of explicit checks. Check for the
8899 ELF type.
8900 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
8901 `grub_dl_check_header' instead of explicit checks. Remove arch
8902 specific ELF header checks.
8903
e6b92c8a 8904 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
8905 argument SIZE.
8906
5eabe94b 89072005-02-13 Hollis Blanchard <hollis@penguinppc.org>
8908
8909 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
8910 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8911
1b14a681 89122005-02-12 Hollis Blanchard <hollis@penguinppc.org>
8913
8914 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8915 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
8916 (part_map_iterate): Clear `grub_errno' and return 0 if
8917 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
8918 * partmap/amiga.c (amiga_partition_map_iterate): Return
8919 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8920 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8921
aca108aa 89222005-02-01 Guillem Jover <guillem@hadrons.org>
8923
8924 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8925 help info.
8926
c9f9c556 89272005-01-31 Marco Gerards <metgerards@student.han.nl>
8928
8929 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8930 Removed prototype.
8931 (grub_rescue_cmd_linux): New prototype.
8932 (grub_rescue_cmd_initrd): Likewise.
8933 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8934 `bi_rec'.
8935 (grub_linux_release_mem): Release the memory for the initrd.
8936 (grub_load_linux): Renamed from this...
8937 (grub_rescue_cmd_linux): ...To this. Changed all callers.
8938 Changed `entry' not to be static. Loop over memory regions to
8939 find another one when the default fails.
8940 (grub_rescue_cmd_initrd): New function.
8941 (grub_linux_init): Remove function.
8942 (grub_linux_fini): Likewise.
8943 (GRUB_MOD_INIT): Register `initrd'.
8944 (GRUB_MOD_FINI): Unregister `initrd'.
8945 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8946 Function removed.
8947 (grub_linux_normal_fini): Likewise.
8948 (GRUB_MOD_INIT): Register `initrd'.
8949 (GRUB_MOD_FINI): Unregister `initrd'.
8950
990cf3aa 89512005-01-31 Marco Gerards <metgerards@student.han.nl>
8952
8953 * commands/help.c: New file.
8954 * normal/arg.c (show_help): Renamed to...
8955 (grub_arg_show_help): ... this.
8956 * commands/i386/pc/halt.c: New file.
8957 * commands/i386/pc/reboot.c: Likewise.
8958 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8959 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8960 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8961 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8962 variables.
8963 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8964 `commands/help.c'.
8965 (pkgdata_MODULES): Add `help.mod'.
8966 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8967 * grub/i386/pc/init.h (grub_reboot): New prototype.
8968 (grub_halt): Likewise.
8969 * include/grub/normal.h (grub_arg_show_help): New prototype.
8970 (grub_help_init): Likewise.
8971 (grub_help_fini): Likewise.
8972 * util/grub-emu.c (main): Initialize and deinitialize the help
8973 command.
8974
8975 * normal/cmdline.c (grub_cmdline_get): Doc fix.
8976
8977 * normal/command.c (grub_command_init): Fixed the description of
8978 the `set' and `unset' commands.
8979
89802005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 8981
8982 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8983 function.
8984 * commands/ieee1275/halt.c: New file.
8985 * commands/ieee1275/reboot.c: Likewise.
8986 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8987 `__attribute__ ((unused))'. Some GCS related fixed.
8988 (grub_suspend_init) [GRUB_UTIL]: Function removed.
8989 (grub_suspend_fini): Likewise.
8990 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8991 and `halt.mod'.
8992 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8993 (halt_mod_CFLAGS): New variables.
8994 * include/grub/powerpc/ieee1275/ieee1275.h
8995 (grub_ieee1275_interpret): New prototype.
8996
1ab09cc7 89972005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8998
8999 * include/grub/misc.h (memmove): New prototype.
9000 (memcpy): Likewise.
9001
8b8cbdb2 90022005-01-22 Hollis Blanchard <hollis@penguinppc.org>
9003
9004 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
9005 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
9006
e3741a27 90072005-01-22 Marco Gerards <metgerards@student.han.nl>
9008
9009 * kern/misc.c (grub_strndup): Function rewritten.
9010
776bd780 90112005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
9012
9013 * normal/menu.c (TERM_WIDTH): Macro redefined.
9014 (TERM_TOP_BORDER_Y): Likewise.
9015 (draw_border): Replaced while-loop by a for-loop. Make the number
9016 of lines consistent with the number of lines displayed in
9017 print_entries. Added a margin below the rectangle.
9018 (print_entry): Make the entry fit in the rectangle.
9019 (print_entries): Display the scroll arrows next to the right
9020 border.
9021
78026bce 90222005-01-21 Marco Gerards <metgerards@student.han.nl>
9023
9024 * fs/minix.c (grub_minix_find_file): Reserve more space for
9025 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
9026 `grub_strncpy' to copy `path' into it.
9027
67bbaf0f 90282005-01-21 Marco Gerards <metgerards@student.han.nl>
9029
9030 Add the loopback device, a device via which files can be accessed
9031 as devices.
9032
9033 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
9034 (pkgdata_MODULES): Add loopback.mod.
9035 (loopback_mod_SOURCES): New variable.
9036 (loopback_mod_CFLAGS): Likewise.
9037 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9038 `disk/loopback.c'.
9039 (pkgdata_MODULES): Add loopback.mod.
9040 (loopback_mod_SOURCES): New variable.
9041 (loopback_mod_CFLAGS): Likewise.
9042 * disk/loopback.c: new file.
9043 * include/grub/normal.h (grub_loop_init): New prototype.
9044 (grub_loop_fini): New prototype.
9045 * util/grub-emu.c (main): Initialize and de-initialize loopback
9046 support.
9047 * include/grub/disk.h (grub_disk_dev_id): Add
9048 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
9049
6f1c18bd 90502005-01-20 Hollis Blanchard <hollis@penguinppc.org>
9051
9052 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
9053 function.
9054 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
9055 (suspend_mod_SOURCES): New variable.
9056 (suspend_mod_CFLAGS): Likewise.
9057 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
9058 New prototype.
9059 * commands/ieee1275/suspend.c: New file.
9060
b38551da 90612005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9062
9063 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
9064 ((unused))' to `__attribute__ ((used))'.
9065 (GRUB_MOD_FINI): Likewise.
9066 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
9067 * genmk.rb (PModule): Assign space to common symbols when linking
9068 modules.
9069
777aff39 90702005-01-20 Marco Gerards <metgerards@student.han.nl>
9071
9072 * include/grub/mm.h (grub_mm_init_region): Change the type of the
9073 `unsigned' arguments to `grub_size_t'.
9074 (grub_malloc): Likewise.
9075 (grub_realloc): Likewise.
9076 (grub_memalign): Likewise.
9077 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
9078 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9079 * util/misc.c (grub_malloc): Likewise.
9080 (grub_realloc): Likewise.
9081 * kern/mm.c (get_header_from_pointer): Change the casts to
9082 `unsigned' into a cast to `grub_size_t'.
9083
9084 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
9085 point to `currnode' when `currnode' is changed.
9086
9087 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
9088 Schottelius <nico-linux@schottelius.org>.
9089
d0ff18e1 90902005-01-09 Hollis Blanchard <hollis@penguinppc.org>
9091
9092 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
9093 (note_path): Remove variable.
9094 (GRUB_IEEE1275_NOTE_NAME): New macro.
9095 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
9096 (grub_ieee1275_note_hdr): New structure.
9097 (grub_ieee1275_note_desc): Likewise.
9098 (grub_ieee1275_note): Likewise.
9099 (load_note): Remove `dir' argument. All callers updated. Remove
9100 `note_img' and `path'. Do not load a file from `note_path'.
9101 Initialize a struct grub_ieee1275_note and write that to `out'.
9102 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
9103
4ca7004c 91042005-01-05 Marco Gerards <metgerards@student.han.nl>
9105
9106 * util/misc.c (grub_util_read_image): Revert last change. It
9107 called `grub_util_read_at', which seeks from the beginning of the
9108 file.
9109
0b412211 91102005-01-04 Hollis Blanchard <hollis@penguinppc.org>
9111
9112 * TODO: Add note about endianness in grub-mkimage.
9113 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
9114 section.
9115 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
9116 (grub_mkimage_SOURCES): New target.
9117 * include/grub/kernel.h (grub_start_addr): Remove variable.
9118 (grub_end_addr): Likewise.
9119 (grub_total_module_size): Likewise.
9120 (grub_kernel_image_size): Likewise.
9121 (GRUB_MODULE_MAGIC): New constant.
9122 (grub_module_info): New structure.
9123 (grub_arch_modules_addr): New prototype.
9124 (grub_get_end_addr): Remove prototype.
9125 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
9126 * include/grub/powerpc/ieee1275/kernel.h: New file.
9127 * include/grub/util/misc.h (grub_util_get_fp_size): New
9128 prototype.
9129 (grub_util_read_at): Likewise.
9130 (grub_util_write_image_at): Likewise.
9131 * kern/main.c (grub_get_end_addr): Remove function.
9132 (grub_load_modules): Call grub_arch_modules_addr instead of using
9133 grub_end_addr. Look for a grub_module_info struct in memory. Use
9134 the grub_module_info fields instead of calling grub_get_end_addr
9135 as loop conditions. Move grub_add_unused_region code here.
9136 (grub_add_unused_region): Remove function.
9137 * kern/i386/pc/init.c: Include grub/cache.h.
9138 (grub_machine_init): Remove call to grub_get_end_addr. Remove
9139 one call to add_mem_region.
9140 (grub_arch_modules_addr): New function.
9141 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
9142 (grub_total_module_size): Likewise.
9143 Include grub/machine/kernel.h.
9144 (grub_arch_modules_addr): New function.
9145 * util/grub-emu.c (grub_end_addr): Remove variable.
9146 (grub_total_module_size): Likewise.
9147 (grub_arch_modules_addr): New function.
9148 * util/misc.c: Include unistd.h.
9149 (grub_util_get_fp_size): New function.
9150 (grub_util_read_at): Likewise.
9151 (grub_util_write_image_at): Likewise.
9152 (grub_util_read_image): Call grub_util_read_at.
9153 (grub_util_write_image): Call grub_util_write_image_at.
9154 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
9155 additional memory in kernel_img for a struct grub_module_info.
9156 Fill in that grub_module_info.
9157 * util/powerpc/ieee1275/grub-mkimage.c: New file.
9158
458786f8 91592005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9160
9161 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
9162 New function.
9163 * include/grub/powerpc/ieee1275/ieee1275.h
9164 (grub_ieee1275_milliseconds): New prototype.
9165 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
9166 Change to 1000.
9167 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
9168 grub_ieee1275_milliseconds.
9169
ac507d1b 91702005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9171
9172 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
9173 variable.
9174 (find_options): New function.
9175 (cmain): Call find_options.
9176 * include/grub/powerpc/ieee1275/ieee1275.h
9177 (grub_ieee1275_realmode): New extern variable.
9178 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
9179 grub_map if grub_ieee1275_realmode is false.
9180
6b8fd1c4 91812004-12-29 Marco Gerards <metgerards@student.han.nl>
9182
9183 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
9184 lines are inserted and make it work like readline. Reported by
9185 Vincent Pelletier <subdino2004@yahoo.fr>.
9186
8514a1e0 91872004-12-28 Marco Gerards <metgerards@student.han.nl>
9188
9189 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
9190
9191 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
9192 `kern/powerpc/cache.S'.
9193
924b6140 91942004-12-27 Marco Gerards <metgerards@student.han.nl>
9195
9196 * genmk.rb: Handle the `Program' class in the main loop. Written
9197 by Johan Rydberg <jrydberg@gnu.org>.
9198 (Program): New class.
9199 (programs): New variable.
9200 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
9201 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
9202 instead of "grub/kernel.h". Include <grub/machine/init.h>.
9203 (help_arch): Function removed.
9204 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
9205 `powerpc/libgcc.h' and `loader.h'.
9206 (pkgdata_PROGRAMS): New variable.
9207 (sbin_UTILITIES): Variable removed.
9208 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
9209 (grubof_SOURCES): Variable re-defined so it only includes the
9210 core functionality.
9211 (grubof_CFLAGS): Remove `-DGRUBOF'.
9212 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
9213 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
9214 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
9215 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
9216 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
9217 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
9218 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
9219 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
9220 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
9221 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
9222 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9223 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
9224 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
9225 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
9226 (pc_mod_CFLAGS): New variables.
9227 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
9228 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
9229 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
9230 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
9231 Moved from here...
9232 * include/grub/i386/pc/init.h (grub_os_area_addr)
9233 (rub_os_area_size): ... to here.
9234 * include/grub/powerpc/ieee1275/ieee1275.h
9235 (grub_ieee1275_entry_fn): Export symbol.
9236 * include/grub/powerpc/ieee1275/init.h: New file.
9237 * include/grub/powerpc/libgcc.h: Likewise.
9238 * include/grub/cache.h: Likewise.
9239 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
9240 <hollis@penguinppc.org>.
9241 * kern/dl.c: Include <grub/cache.h>.
9242 (grub_dl_flush_cache): New function.
9243 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
9244 for this module.
9245 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
9246 (grub_console_init): Removed prototypes.
9247 (grub_machine_init): Don't initialize the modules anymore.
9248 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
9249 static.
9250 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
9251 Macro undef removed.
9252 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
9253 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
9254 relocation `R_PPC_REL32'. Return an error when the relocation is
9255 unknown.
9256 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
9257 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
9258 * util/misc.c (grub_arch_sync_caches): Likewise.
9259
e4b47e0c 92602004-12-19 Marco Gerards <metgerards@student.han.nl>
9261
9262 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
9263 `symlist.c', add `grubof_symlist.c'.
9264 (symlist.c): Variable removed.
9265 (grubof_HEADERS): Variable added.
9266 (grubof_symlist.c): New target.
9267 (kernel_syms.lst): Use `grubof_HEADERS' instead of
9268 `kernel_img_HEADERS'.
9269 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
9270 * kern/powerpc/dl.c: New file.
9271 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
9272 Function removed.
9273 (grub_arch_dl_relocate_symbols): Likewise.
9274 (grub_register_exported_symbols): Likewise.
9275
4ceb3636 92762004-12-13 Marco Gerards <metgerards@student.han.nl>
9277
9278 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
9279 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
9280 to fail instead. Reported by Vincent Pelletier
9281 <subdino2004@yahoo.fr>.
9282
9283 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
9284 it is not allocated. Reported by Vincent Pelletier
9285 <subdino2004@yahoo.fr>.
9286
9287 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
9288 output so the output looks better.
9289
3f1578fe 92902004-12-04 Marco Gerards <metgerards@student.han.nl>
9291
9292 Modulize the partition map support and add support for the amiga
9293 partition map.
9294
9295 * commands/ls.c: Include <grub/partition.h> instead of
9296 <grub/machine/partition.h>.
9297 * kern/disk.c: Likewise.
9298 * kern/rescue.c: Likewise.
9299 * loader/i386/pc/chainloader.c: Likewise.
9300 * normal/cmdline.c: Likewise.
9301 * kern/powerpc/ieee1275/init.c: Likewise.
9302 (grub_machine_init): Call `grub_pc_partition_map_init',
9303 `grub_amiga_partition_map_init' and
9304 `grub_apple_partition_map_init'.
9305 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
9306 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
9307 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
9308 `partition.h' and `pc_partition.h'.
9309 (grub_setup_SOURCES): Remove
9310 `disk/i386/pc/partition.c'. Add `kern/partition.c',
9311 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
9312 (grub_emu_SOURCES): Likewise.
9313 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
9314 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
9315 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
9316 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
9317 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
9318 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
9319 (grubof_SOURCES): Likewise.
9320 * disk/i386/pc/partition.c: File removed.
9321 * disk/powerpc/ieee1275/partition.c: Likewise.
9322 * include/grub/powerpc/ieee1275/partition.h: Likewise.
9323 * include/grub/i386/pc/partition.h: Likewise.
9324 * kern/partition.c: New file.
9325 * partmap/amiga.c: Likewise.
9326 * partmap/apple.c: Likewise.
9327 * partmap/pc.c: Likewise.
9328 * include/grub/partition.h: Likewise..
9329 * include/grub/pc_partition.h: Likewise.
9330 * util/grub-emu.c: Include <grub/partition.h> instead of
9331 <grub/machine/partition.h>.
9332 (main): Call `grub_pc_partition_map_init',
9333 `grub_amiga_partition_map_init' and
9334 `grub_apple_partition_map_init' and deinitialize afterwards.
9335 * util/i386/pc/biosdisk.c: Include `#include
9336 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
9337 `<grub/machine/partition.h>'.
9338 * util/i386/pc/grub-setup.c: Likewise.
9339 * util/i386/pc/biosdisk.c: Likewise.
9340 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
9341 partition information in case of a PC partition.
9342 * util/i386/pc/grub-setup.c: Include `#include
9343 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
9344 `<grub/machine/partition.h>'.
9345 (setup): Only access the PC specific partition information in case
9346 of a PC partition.
9347
0ef4ced9 93482004-11-17 Hollis Blanchard <hollis@penguinppc.org>
9349
9350 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
9351 (grub_longjmp): Likewise.
9352 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
9353 20.
9354 * normal/powerpc/setjmp.S: New file.
9355 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9356 `normal/powerpc/setjmp.S'.
9357 (grubof_CFLAGS): Add `-DGRUBOF'.
9358 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
9359 [GRUB_UTIL && !GRUBOF].
9360
19950e29 93612004-11-16 Marco Gerards <metgerards@student.han.nl>
9362
9363 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
9364 property named `name'. Correctly handle the error returned by
9365 `grub_ieee1275_finddevice' if a device can not be opened.
9366
a2fea427 93672004-11-02 Hollis Blanchard <hollis@penguinppc.org>
9368
9369 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
9370 `actual' for negativity.
9371 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
9372 kern/fshelp.c.
9373
41ea0ea3 93742004-11-01 Marco Gerards <metgerards@student.han.nl>
9375
9376 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
9377 (PAGE_OFFSET): New macro.
9378 (CRTC_ADDR_PORT): Likewise.
9379 (CRTC_DATA_PORT): Likewise.
9380 (START_ADDR_HIGH_REGISTER): Likewise.
9381 (START_ADDR_LOW_REGISTER): Likewise.
9382 (GRAPHICS_ADDR_PORT): Likewise.
9383 (GRAPHICS_DATA_PORT): Likewise.
9384 (READ_MAP_REGISTER): Likewise.
9385 (INPUT_STATUS1_REGISTER): Likewise.
9386 (INPUT_STATUS1_VERTR_BIT): Likewise.
9387 (page): New variable.
9388 (wait_vretrace): New function.
9389 (set_read_map): Likewise.
9390 (set_start_address): Likewise.
9391 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
9392 the right page.
9393 (check_vga_mem): Take the page into account.
9394 (write_char): Likewise.
9395 (write_cursor): Likewise.
9396 (scroll_up): Likewise. Copy the page to the page that is not
9397 shown and switch between both pages.
9398 (grub_vga_putchar): Fix off by one error.
9399 (grub_vga_cls): Wait for the vertical retrace. Take the page into
9400 account.
9401
ad0bd20b 94022004-11-01 Marco Gerards <metgerards@student.han.nl>
9403
9404 Add support for iso9660 (including rockridge).
9405
9406 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
9407 (iso9660_mod_SOURCES): New variable.
9408 (iso9660_mod_CFLAGS): Likewise.
9409 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
9410 * include/grub/fs.h (grub_iso9660_init): New prototype.
9411 * util/grub-emu.c (main): Call `grub_iso9660_init'.
9412 * fs/iso9660.c: New file.
9413
9414 * include/grub/misc.h (grub_strncat): New prototype.
9415 * kern/misc.c (grub_strncat): New function.
9416
9417 * fs/hfs.c (grub_hfs_mount): Translate the error
9418 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
9419 * fs/jfs.c (grub_jfs_mount): Likewise.
9420 * fs/ufs.c (grub_ufs_mount): Likewise.
9421
a5477a59 94222004-10-28 Hollis Blanchard <hollis@penguinppc.org>
9423
9424 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
9425 which initialized BAT registers.
9426 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
9427 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
9428 Move from here...
9429 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
9430 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
9431 ... to here.
9432 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
9433 (grub_mapclaim): Likewise.
9434 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
9435 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
9436 hand.
9437
9304c1f8 94382004-10-19 Hollis Blanchard <hollis@penguinppc.org>
9439
9440 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
9441 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
9442 -ffreestanding and -msoft-float.
9443
86f4ae25 94442004-10-15 Hollis Blanchard <hollis@penguinppc.org>
9445
9446 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
9447 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
9448 set in grub_ieee1275_flags.
9449
38912228 94502004-10-14 Hollis Blanchard <hollis@penguinppc.org>
9451
9452 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
9453 prototype.
9454 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
9455 grub_console_init first.
9456 Change the memory range used for grub_ieee1275_claim and
9457 grub_mm_init_region.
9458 Print an error message if the claim fails.
9459 Include <grub/misc.h>.
9460
d1923dc8 94612004-10-13 Hollis Blanchard <hollis@penguinppc.org>
9462
9463 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
9464 Call grub_children_iterate for device nodes of type `scsi',
9465 `ide', or `ata'.
9466 (grub_ofdisk_open): Remove manual device alias resolution.
9467 Fix memory leak when device cannot be opened.
9468 * include/grub/powerpc/ieee1275/ieee1275.h
9469 (grub_children_iterate): New prototype.
9470 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
9471 New function.
9472 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9473 Return -1 if args.size was -1.
9474
4512e4f3 94752004-10-11 Hollis Blanchard <hollis@penguinppc.org>
9476
9477 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
9478 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
9479 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
9480 Open Firmware's memory for it; claim memory from _start to _end.
9481 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
9482 (_end): New extern.
9483 (_start): Zero BSS from __bss_start to _end.
9484 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9485 New extern.
9486 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
9487
4d61feb0 94882004-10-11 Hollis Blanchard <hollis@penguinppc.org>
9489
ad0bd20b 9490 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
9491 -1 if args.base was -1.
4d61feb0 9492
026fa2f9 94932004-10-08 Hollis Blanchard <hollis@penguinppc.org>
9494
9495 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
9496 escape sequence instead of a literal ^L. Also call
9497 grub_ofconsole_gotoxy.
9498
9f2220ef 94992004-10-03 Hollis Blanchard <hollis@penguinppc.org>
9500
9501 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
9502 void * arguments to grub_addr_t. All callers updated. Also make
9503 the `result' argument optional.
9504 (grub_ieee1275_release): change void * arguments to grub_addr_t.
9505 All callers updated.
9506
8a572cd7 95072004-09-22 Hollis Blanchard <hollis@penguinppc.org>
9508
9509 * commands/ls.c (grub_ls_list_files): Use the string following the
9510 initial ')', if present, as the filesystem path.
9511 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
9512
9513 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
9514
18aa81f2 95152004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
9516
9517 Make the source code of the menu interface more readable.
9518
9519 * normal/menu.c: Include grub/mm.h.
9520 (TERM_WIDTH): New macro.
9521 (TERM_HEIGHT): Likewise.
9522 (TERM_INFO_HEIGHT): Likewise.
9523 (TERM_MARGIN): Likewise.
9524 (TERM_SCROLL_WIDTH): Likewise.
9525 (TERM_TOP_BORDER_Y): Likewise.
9526 (TERM_LEFT_BORDER_X): Likewise.
9527 (TERM_BORDER_WIDTH): Likewise.
9528 (TERM_MESSAGE_HEIGHT): Likewise.
9529 (TERM_BORDER_HEIGHT): Likewise.
9530 (TERM_NUM_ENTRIES): Likewise.
9531 (TERM_FIRST_ENTRY_Y): Likewise.
9532 (TERM_ENTRY_WIDTH): Likewise.
9533 (TERM_CURSOR_X): Likewise.
9534 (draw_border): Use macros instead of magic numbers.
9535 (print_entry): Likewise.
9536 (print_entries): Likewise.
9537 (run_menu): Likewise. Also, handle the key 'e'.
9538 (run_menu_entry): Ignore empty command lines.
9539 (print_message): Added a new argument EDIT. If EDIT is true,
9540 print a different message.
9541 (init_page): Likewise.
9542 (edit_menu_entry): New function. Not implemented yet.
9543
b47efe30 95442004-09-17 Marco Gerards <metgerards@student.han.nl>
9545
9546 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
9547 can be loaded from normal mode.
9548
9549 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
9550 `multiboot.mod'.
9551 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
9552 (multiboot_mod_CFLAGS): New variables.
9553 * loader/i386/pc/linux_normal.c: New file.
9554 * loader/i386/pc/multiboot_normal.c: Likewise.
9555
9556 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
9557 attribute `unused'.
9558
9559 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
9560 `fdiro' to read the mode information from instead of `diro'.
9561
9562 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
9563 looking up a symlink.
9564
9565 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
9566 macro.
9567 * normal/command.c (grub_command_execute): Don't parse the
9568 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
9569 flags of the command.
9570
9571 * normal/menu.c (grub_menu_run): Fix typo.
9572
da75ac71 95732004-09-14 Hollis Blanchard <hollis@penguinppc.org>
9574
9575 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
9576
9577 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
9578 `y + 1' instead of `y - 1'.
9579
9580 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
9581
062b24c2 95822004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
9583
9584 From Hollis Blanchard <hollis@penguinppc.org>:
9585 * kern/misc.c (memmove): New alias for grub_memmove.
9586 (memcmp): New alias for grub_memcmp.
9587 (memset): New alias for grub_memset.
9588 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9589 Change "int handle" to "grub_ieee1275_phandle_t handle".
9590 * include/grub/powerpc/ieee1275/ieee1275.h
9591 (grub_ieee1275_get_property): Likewise.
9592
8ddad845 95932004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
9594
9595 Added normal mode command `chainloader' as module chain.mod, which
9596 depends on normal.mod and _chain.mod.
9597
9598 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
9599 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
9600 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
9601 Deleted prototype.
9602 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
9603 but arguments parsing moved to ...
9604 (grub_chainloader_cmd): ... here. New function.
9605 * include/grub/i386/pc/chainloader.h: New file.
9606 * loader/i386/pc/chainloader_normal.c: Likewise.
9607
2c1f4ce3 96082004-09-11 Marco Gerards <metgerards@student.han.nl>
9609
9610 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
9611 (grub_mkimage_LDFLAGS): Likewise.
9612 (grub_emu_SOURCES): Likewise.
9613 (kernel_img_HEADERS): Added fshelp.h.
9614 * fs/ext2.c: Include <grub/fshelp.h>.
9615 (FILETYPE_REG): New macro.
9616 (FILETYPE_INO_REG): Likewise.
9617 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
9618 Changed all users.
9619 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
9620 all users.
9621 (grub_fshelp_node): New struct.
9622 (grub_ext2_data): Added member `diropen'. Changed member `inode'
9623 to a pointer.
9624 (grub_ext2_get_file_block): Removed function.
9625 (grub_ext2_read_block): New function.
9626 (grub_ext2_read_file): Replaced parameter `data' by `node'.
9627 This function was written.
9628 (grub_ext2_mount): Read the root inode. Create a diropen struct.
9629 (grub_ext2_find_file): Removed function.
9630 (grub_ext2_read_symlink): New function.
9631 (grub_ext2_iterate_dir): Likewise.
9632 (grub_ext2_open): Rewritten.
9633 (grub_ext2_dir): Rewritten.
9634 * include/grub/fshelp.h: New file.
9635 * fs/fshelp.c: Likewise.
9636
3c52136a 96372004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
9638
9639 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
9640 (print_message): Add a missing newline.
9641 (run_menu): Added timeout support.
9642 (run_menu_entry): New local function.
9643 (grub_menu_run): Added support for booting.
9644
9645 * kern/loader.c (grub_loader_is_loaded): New function.
9646
9647 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
9648 (grub_get_rtc): Exported.
9649
9650 * include/grub/i386/pc/time.h: Include grub/symbol.h.
9651 (grub_get_rtc): Exported.
9652
9653 * include/grub/normal.h (struct grub_command_list): Remove
9654 constant from the member `command'.
9655
9656 * include/grub/loader.h (grub_loader_is_loaded): Declared.
9657
9658 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
9659
9660 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
9661
aa033560 96622004-08-28 Marco Gerards <metgerards@student.han.nl>
9663
9664 Add support for the JFS filesystem.
9665
9666 * fs/jfs.c: New file.
9667 * include/grub/fs.h (grub_jfs_init): New prototype.
9668 (grub_jfs_fini): New prototype.
9669 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
9670 (grub_emu_SOURCES): Likewise.
9671 (pkgdata_MODULES): Add jfs.mod.
9672 (jfs_mod_SOURCES): New variable.
9673 (jfs_mod_CFLAGS): Likewise.
9674 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
9675 (grubof_SOURCES): Likewise.
9676 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
9677
9678 * fs/fat.c (grub_fat_find_dir): Convert the filename little
9679 endian to the host endian.
9680 (grub_fat_utf16_to_utf8): Move function from there...
9681 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
9682 the endianess of the source string anymore.
9683 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
9684
94bc45af 96852004-08-24 Marco Gerards <metgerards@student.han.nl>
9686
9687 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
9688 (grub_boot_fini) [GRUB_UTIL]: Likewise.
9689 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
9690 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
9691
9692 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
9693 (grub_hfs_iterate_dir): Make the function static. Add prototypes
9694 for `node_found' and `it_dir'.
9695 (grub_hfs_dir): Add prototype for `dir_hook'.
9696
9697 * fs/minix.c (grub_minix_get_file_block): Add prototype for
9698 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
9699 and `indir32' to silence a gcc warning.
9700
9701 * include/grub/fs.h (grub_hfs_init): New prototype.
9702 (grub_hfs_fini): Likewise.
9703
9704
97543f08 97052004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9706
9707 Each disk device has its own id now. This is useful to make use
9708 of multiple disk devices.
9709
9710 * include/grub/disk.h (grub_disk_dev_id): New enum.
9711 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
9712 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
9713
9714 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
9715 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9716
9717 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
9718 GRUB_DISK_DEVICE_OFDISK_ID as an id.
9719
9720 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
9721 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9722
9723 * include/grub/disk.h (struct grub_disk_dev): Added a new member
9724 "id" which is used by the cache manager.
9725
9726 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
9727 of just "GRUB".
9728
64372eb4 97292004-08-18 Marco Gerards <metgerards@student.han.nl>
9730
9731 * fs/hfs.c: New file.
9732 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
9733 (grub_emu_SOURCES): Likewise.
9734 (pkgdata_MODULES): Add hfs.mod.
9735 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
9736 (grubof_SOURCES): Likewise.
9737 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
9738
9739 * include/grub/misc.h (grub_strncasecmp): Add prototype.
9740 * kern/misc.c (grub_strncasecmp): Add function.
9741
cc61b58f 97422004-08-14 Marco Gerards <metgerards@student.han.nl>
9743
9744 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
9745 with parentheses.
9746
9747 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
9748 (grub_ext2_dir): In case the directory entry type is unknown, read
9749 it from the inode.
9750
0ef123f6 97512004-08-02 Peter Bruin <pjbruin@dds.nl>
9752
9753 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
9754 grub_load_linux instead of grub_rescue_cmd_linux as second
9755 argument of grub_rescue_register_command.
9756
9757 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
9758
a447c5df 97592004-07-27 Marco Gerards <metgerards@student.han.nl>
9760
9761 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
9762 function.
9763 * commands/boot.c: Remove the check for `GRUB_UTIL'.
9764 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9765 `loader/powerpc/ieee1275/linux.c',
9766 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
9767 * include/grub/powerpc/ieee1275/ieee1275.h
9768 (grub_ieee1275_release): New prototype.
9769 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
9770 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
9771 normal, boot, linux and linux_normal.
9772 * loader/powerpc/ieee1275/linux.c: New file.
9773 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9774
5a9e3546 97752004-07-12 Marco Gerards <metgerards@student.han.nl>
9776
9777 * normal/arg.c (grub_arg_parse): Correct error handling after
9778 reallocating the argumentlist (check if `argl' is not null instead
9779 of checking if `args' is not null).
9780 * kern/mm.c (grub_realloc): Return the same pointer when using the
9781 same region, instead of returning the header address.
9782
e15199cb 97832004-07-11 Marco Gerards <metgerards@student.han.nl>
9784
9785 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
9786 one block instead of two when looking for the initial partition.
9787 (grub_partition_probe): Initialize the local variable `p' with 0.
9788 Use base 10 for the grub_strtoul call.
9789 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
9790 need for one local variable.
9791 (grub_strtoul): Don't add the new value to `num', instead of that
9792 just assign it.
9793
020616c2 97942004-07-11 Marco Gerards <metgerards@student.han.nl>
9795
9796 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
9797 (pxeboot_img_SOURCES): New variable.
9798 (pxeboot_img_ASFLAGS): Likewise.
9799 (pxeboot_img_LDFLAGS): Likewise.
9800 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
9801 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
9802 <lode_leroy@hotmail.com>.
9803
6c51eb64 98042004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9805
9806 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
9807 there was no input.
9808
cfb12aff 98092004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9810
9811 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
9812 the history buffer logic.
9813
6eabba74 98142004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9815
9816 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
9817 (FILETYPE_INO_SYMLINK): New macros.
9818 (grub_ext2_find_file): Check if the node is a directory using the
9819 inode stat information instead of using the filetype in the
9820 dirent. Exclude the first character of an absolute symlink.
9821 (grub_ext2_dir): Mask out the filetype part of the mode member of
9822 the inode.
9823
66e19ef8 98242004-05-24 Marco Gerards <metgerards@student.han.nl>
9825
9826 Add support for UFS version 1 and 2. Add support for the minix
9827 filesystem version 1 and 2, both the variants with 14 and 30 long
9828 filenames.
9829
9830 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
9831 fs/minix.c.
9832 (grub_emu_SOURCES): Likewise.
9833 (pkgdata_MODULES): Add ufs.mod and minix.mod.
9834 (ufs_mod_SOURCES): New variable.
9835 (ufs_mod_CFLAGS): Likewise.
9836 (minix_mod_SOURCES): Likewise.
9837 (minix_mod_CFLAGS): Likewise.
9838 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
9839 fs/minix.c.
9840 (grubof_SOURCES): Likewise.
9841 * fs/ufs.c: New file.
9842 * fs/minix.c: New file.
9843 * include/grub/fs.h (grub_ufs_init): New prototype.
9844 (grub_ufs_fini): Likewise.
9845 (grub_minix_init): Likewise.
9846 (grub_minix_fini): Likewise.
9847 * util/grub-emu.c (main): Initialize and deinitialize UFS and
9848 minix fs.
9849
cc2e748a 98502004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
9851
9852 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
9853 commands/ls.c, commands/terminal.c, commands/boot.c,
9854 commands/cmp.c and commands/cat.c.
9855 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
9856
9857 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
9858 "env.h"
9859
4b13b216 98602004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9861
9862 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
9863 and grub_, respectively. Because the conversion is trivial and
9864 mechanical, I omit the details here. Please refer to the CVS
9865 if you need more information.
9866
6a142551 98672004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9868
9869 * include/pupa: Renamed to ...
9870 * include/grub: ... this.
9871 * util/i386/pc/pupa-mkimage.c: Renamed to ...
9872 * util/i386/pc/grub-mkimage.c: ... this.
9873 * util/i386/pc/pupa-setup.c: Renamed to ...
9874 * util/i386/pc/grub-setup.c: ... this.
9875 * util/pupa-emu.c: Renamed to ...
9876 * util/grub-emu.c: ... this.
9877
e56cdf21 98782004-03-29 Marco Gerards <metgerards@student.han.nl>
9879
9880 Add support for the newworld apple macintosh (PPC). This has been
9881 tested on the powerbook 2000 only. It only adds support for
9882 generic ieee1275 functions, console and disk support. This should
9883 be easy to port to other architectures with support for Open
9884 Firmware.
9885
9886 * configure.ac: Accept the powerpc as host_cpu. In the case of
9887 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
9888 specific tests are only executed while building for the i386.
9889 Inverse test for crosscompile.
9890 * genmk.rb (Utility): Allow assembler files.
9891 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
9892 * conf/powerpc-ieee1275.rmk: New file.
9893 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
9894 * disk/powerpc/ieee1275/partition.c: Likewise.
9895 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
9896 * include/pupa/powerpc/ieee1275/console.h: Likewise.
9897 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
9898 * include/pupa/powerpc/ieee1275/time.h: Likewise.
9899 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
9900 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
9901 * include/pupa/powerpc/ieee1275/loader.h
9902 * include/pupa/powerpc/setjmp.h: Likewise.
9903 * include/pupa/powerpc/types.h: Likewise.
9904 * kern/powerpc/ieee1275/init.c: Likewise.
9905 * kern/powerpc/ieee1275/openfw.c: Likewise.
9906 * term/powerpc/ieee1275/ofconsole.c: Likewise.
9907
9908 These files were written by Johan Rydberg
9909 (jrydberg@night.trouble.net) and I only modified them slightly.
9910
9911 * boot/powerpc/ieee1275/cmain.c: New file.
9912 * boot/powerpc/ieee1275/crt0.S: Likewise.
9913 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9914 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9915
8c8cc205 99162004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
9917
9918 * Makefile.in: Update copyright.
9919 * genmodsrc.sh: Likewise.
9920 * gensymlist.sh: Likewise.
9921 * term/i386/pc/vga.c: Indent correctly.
9922
9923 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9924 bugreporting address.
9925 * util/i386/pc/pupa-setup.c (usage): Likewise,
9926 (main): Call pupa_ext2_init and pupa_ext2_fini.
9927
9928 * fs/fat.c (log2): Renamed to ...
9929 (fat_log2): ... this.
9930 All callers changed.
9931 * kern/misc.c (memcpy): Alias to pupa_memmove.
9932 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9933 lvalue cast.
9934 * util/console.c (pupa_ncurses_fini): Return 0.
9935
9936 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9937 Move fail label here.
9938 [__GNU__]: Don't warn when using stat.
9939 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9940 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9941 long int. Use strtol instead of strtoul.
9942
db1771cf 99432004-03-14 Marco Gerards <metgerards@student.han.nl>
9944
9945 * commands/boot.c: New file.
9946 * commands/cat.c: Likewise.
9947 * commands/cmp.c: Likewise.
9948 * commands/ls.c: Likewise.
9949 * commands/terminal.c: Likewise.
9950 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9951 (pupa_register_command): Changed interface to match the new
9952 argument parser.
9953 (pupa_command_execute): Changed (almost rewritten) so it uses
9954 pupa_split_command. Added support for setting variables using the
9955 syntax `foo=bar'.
9956 (rescue_command): Changed to work with the new argument parser.
9957 (terminal_command): Moved from here to commands/terminal.c.
9958 (set_command): New function.
9959 (unset_command): New function.
9960 (insmod_command): New function.
9961 (rmmod_command): New function.
9962 (lsmod_command): New function.
9963 (pupa_command_init): Don't initialize the command terminal
9964 anymore. Initialize the commands set, unset, insmod, rmmod and
9965 lsmod.
9966 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9967 (kernel_img_HEADERS): Add arg.h and env.h.
9968 (pupa_mkimage_LDFLAGS): Add kern/env.c.
9969 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9970 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9971 normal/arg.c.
9972 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9973 terminal.mod.
9974 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9975 (boot_mod_SOURCES): New variable.
9976 (terminal_mod_SOURCES): Likewise.
9977 (ls_mod_SOURCES): Likewise.
9978 (cmp_mod_SOURCES): Likewise.
9979 (cat_mod_SOURCES): Likewise.
9980
9981 * normal/arg.c: New file.
9982 * kern/env.c: Likewise.
9983 * include/pupa/arg.h: Likewise.
9984 * include/pupa/env.h: Likewise.
9985 * font/manager.c (font_command): Changed to match argument parsing
9986 interface changes.
9987 (PUPA_MOD_INIT): Likewise.
9988 * hello/hello.c (pupa_cmd_hello): Likewise.
9989 (PUPA_MOD_INIT): Likewise.
9990 * include/pupa/disk.h: Include <pupa/device.h>.
9991 (pupa_print_partinfo): New prototype.
9992 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9993 (pupa_dl_get_prefix): Likewise.
9994 * include/pupa/misc.h: Include <pupa/err.h>.
9995 (pupa_isgraph): New prototype.
9996 (pupa_isdigit): Likewise.
9997 (pupa_split_cmdline): Likewise.
9998 * include/pupa/normal.h: Include <pupa/arg.h>.
9999 (pupa_command): Changed the prototype of the member `func' to
10000 match the argument parsing interface. Added member `options'.
10001 (pupa_register_command): Updated to match function.
10002 (pupa_arg_parse): New prototype.
10003 (pupa_hello_init) [PUPA_UTIL]: New prototype.
10004 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
10005 (pupa_ls_init) [PUPA_UTIL]: Likewise.
10006 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
10007 (pupa_cat_init) [PUPA_UTIL]: Likewise.
10008 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
10009 (pupa_boot_init) [PUPA_UTIL]: Likewise.
10010 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
10011 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
10012 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
10013 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
10014 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
10015 * kern/disk.c: Include <pupa/file.h>.
10016 (pupa_print_partinfo): New function.
10017 * kern/dl.c: Include <pupa/env.h>.
10018 (pupa_dl_dir): Variable removed.
10019 (pupa_dl_load): Use the environment variable `prefix' instead of
10020 the variable pupa_dl_dir.
10021 (pupa_dl_set_prefix): Function removed.
10022 (pupa_dl_get_prefix): Likewise.
10023 * kern/i386/pc/init.c: Include <pupa/env.h>.
10024 (pupa_machine_init): Use the environment variable `prefix' instead of
10025 using pupa_dl_set_prefix to set the prefix.
10026 * kern/main.c: Include <pupa/env.h>.
10027 (pupa_set_root_dev): Use the environment variable `prefix' instead of
10028 using pupa_dl_get_prefix to get the prefix.
10029 * kern/misc.c: Include <pupa/env.h>.
10030 (pupa_isdigit): New function.
10031 (pupa_isgraph): Likewise.
10032 (pupa_ftoa): Likewise.
10033 (pupa_vsprintf): Added support for printing values of the type
10034 `double'. Make it possible to format variable output when using
10035 formatting like `%1.2%f'.
10036 (pupa_split_cmdline): New function.
10037 * kern/rescue.c: Include <pupa/env.h>.
10038 (next_word): Removed function.
10039 (pupa_rescue_cmd_prefix): Likewise.
10040 (pupa_rescue_cmd_set): New function.
10041 (pupa_rescue_cmd_unset): New function.
10042 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
10043 split the command line instead of splitting it here. Added
10044 support for setting variables using the syntax `foo=bar'. Don't
10045 initialize the prefix command anymore. Initialized the set and
10046 unset commands.
10047 * normal/cmdline.c: Include <pupa/env.h>.
10048 (pupa_tab_complete): Added prototypes for print_simple_completion,
10049 print_partition_completion, add_completion, iterate_commands,
10050 iterate_dev, iterate_part and iterate_dir. Moved code to print
10051 partition information from here to kern/disk.c.
fe6b695a 10052 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 10053 * normal/main.c: Include <pupa/env.h>.
10054 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
10055 instead of using pupa_dl_get_prefix to get the prefix.
10056 * term/i386/pc/vga.c: Include <pupa/arg.h>.
10057 (check_vga_mem): Cast pointers to `void *' to silence a gcc
10058 warning.
10059 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
10060 (pupa_vga_setcolor): Declare unused variables with `__attribute__
10061 ((unused))' to silence a gcc warning.
10062 (pupa_vga_setcolor): Likewise.
10063 (debug_command): Changed to match argument parsing
10064 interface changes.
10065 * util/pupa-emu.c: Include <pupa/env.h>.
10066 (options): Added 0's for unused fields to silence a gcc warning.
10067 (argp): Likewise.
10068 (main): Use the environment variable `prefix' instead of using
10069 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
10070 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
10071 and terminal.
10072
10073 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
10074 * util/misc.c: Include <malloc.h>.
10075 (pupa_malloc): Rewritten so errors are correctly reported.
10076 (pupa_realloc): Likewise.
10077 (pupa_memalign): Likewise.
10078 (pupa_mm_init_region): Declare unused variables with
10079 `__attribute__ ((unused))' to silence a gcc warning.
10080 * normal/i386/setjmp.S: Remove tab at the end of the file to
10081 silence a gcc warning.
10082 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
10083 variables with `__attribute__ ((unused))' to silence a gcc
10084 warning.
10085 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
10086 local variable i unsigned to silence a gcc warning.
10087
10088 * kern/term.c: Include <pupa/misc.h>.
10089 (pupa_more_lines): New variable.
10090 (pupa_more): Likewise.
10091 (pupa_putcode): When the pager is active pause at the end of every
10092 screen.
10093 (pupa_set_more): New function.
10094 * include/pupa/term.h (pupa_set_more): New prototype.
10095
10096
3b1139cb 100972004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
10098
10099 Now this project is GRUB 2 rather than PUPA. The location of
10100 the CVS repository was moved to GRUB's.
10101
10102 * configure.ac: Use bug-grub as the reporting address.
10103 Use GRUB instead of PUPA.
10104 Change the version number to 1.90.
10105
8367695c 101062004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
10107
10108 * genkernsyms.sh: Updated copyright information.
10109 * genmk.rb: Likewise.
10110 * genmodsrc.sh: Likewise.
10111 * gensymlist.sh: Likewise.
10112 * boot/i386/pc/boot.S: Likewise.
10113 * boot/i386/pc/diskboot.S: Likewise.
10114 * disk/i386/pc/biosdisk.c: Likewise.
10115 * disk/i386/pc/partition.c: Likewise.
10116 * font/manager.c: Likewise.
10117 * fs/ext2.c: Likewise.
10118 * fs/fat.c: Likewise.
10119 * include/pupa/boot.h: Likewise.
10120 * include/pupa/device.h: Likewise.
10121 * include/pupa/disk.h: Likewise.
10122 * include/pupa/dl.h: Likewise.
10123 * include/pupa/elf.h: Likewise.
10124 * include/pupa/err.h: Likewise.
10125 * include/pupa/file.h: Likewise.
10126 * include/pupa/font.h: Likewise.
10127 * include/pupa/fs.h: Likewise.
10128 * include/pupa/kernel.h: Likewise.
10129 * include/pupa/loader.h: Likewise.
10130 * include/pupa/misc.h: Likewise.
10131 * include/pupa/mm.h: Likewise.
10132 * include/pupa/net.h: Likewise.
10133 * include/pupa/normal.h: Likewise.
10134 * include/pupa/rescue.h: Likewise.
10135 * include/pupa/setjmp.h: Likewise.
10136 * include/pupa/symbol.h: Likewise.
10137 * include/pupa/term.h: Likewise.
10138 * include/pupa/types.h: Likewise.
10139 * include/pupa/i386/setjmp.h: Likewise.
10140 * include/pupa/i386/types.h: Likewise.
10141 * include/pupa/i386/pc/biosdisk.h: Likewise.
10142 * include/pupa/i386/pc/boot.h: Likewise.
10143 * include/pupa/i386/pc/console.h: Likewise.
10144 * include/pupa/i386/pc/init.h: Likewise.
10145 * include/pupa/i386/pc/kernel.h: Likewise.
10146 * include/pupa/i386/pc/linux.h: Likewise.
10147 * include/pupa/i386/pc/loader.h: Likewise.
10148 * include/pupa/i386/pc/memory.h: Likewise.
10149 * include/pupa/i386/pc/multiboot.h: Likewise.
10150 * include/pupa/i386/pc/partition.h: Likewise.
10151 * include/pupa/i386/pc/time.h: Likewise.
10152 * include/pupa/i386/pc/vga.h: Likewise.
10153 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
10154 * include/pupa/util/getroot.h: Likewise.
10155 * include/pupa/util/misc.h: Likewise.
10156 * include/pupa/util/resolve.h: Likewise.
10157 * kern/device.c: Likewise.
10158 * kern/disk.c: Likewise.
10159 * kern/dl.c: Likewise.
10160 * kern/err.c: Likewise.
10161 * kern/file.c: Likewise.
10162 * kern/fs.c: Likewise.
10163 * kern/loader.c: Likewise.
10164 * kern/main.c: Likewise.
10165 * kern/misc.c: Likewise.
10166 * kern/mm.c: Likewise.
10167 * kern/rescue.c: Likewise.
10168 * kern/term.c: Likewise.
10169 * kern/i386/dl.c: Likewise.
10170 * kern/i386/pc/init.c: Likewise.
10171 * kern/i386/pc/lzo1x.S: Likewise.
10172 * kern/i386/pc/startup.S: Likewise.
10173 * loader/i386/pc/chainloader.c: Likewise.
10174 * loader/i386/pc/linux.c: Likewise.
10175 * loader/i386/pc/multiboot.c: Likewise.
10176 * normal/cmdline.c: Likewise.
10177 * normal/command.c: Likewise.
10178 * normal/main.c: Likewise.
10179 * normal/menu.c: Likewise.
10180 * normal/i386/setjmp.S: Likewise.
10181 * term/i386/pc/console.c: Likewise.
10182 * term/i386/pc/vga.c: Likewise.
10183 * util/console.c: Likewise.
10184 * util/genmoddep.c: Likewise.
10185 * util/misc.c: Likewise.
10186 * util/pupa-emu.c: Likewise.
10187 * util/resolve.c: Likewise.
10188 * util/unifont2pff.rb: Likewise.
10189 * util/i386/pc/biosdisk.c: Likewise.
10190 * util/i386/pc/getroot.c: Likewise.
10191 * util/i386/pc/pupa-mkimage.c: Likewise.
10192 * util/i386/pc/pupa-setup.c: Likewise.
10193
e6eced71 101942004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
10195
10196 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
10197 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
10198 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
10199 reading and reset it after reading.
10200 (pupa_ext2_close): Return PUPA_ERR_NONE.
10201
10202 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
10203 Correct value.
10204 (struct linux_kernel_header): Add kernel_version and
10205 initrd_addr_max.
10206 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
10207 pupa_file_read succeeds.
10208 (pupa_rescue_cmd_initrd): Implement.
10209
5aded270 102102003-12-03 Marco Gerards <metgerards@student.han.nl>
10211
10212 * fs/ext2.c (pupa_ext2_label): New function.
10213 (pupa_ext2_fs): Added label.
10214 * fs/fat.c (pupa_fat_label): New function.
10215 (pupa_fat_fs): Added label.
10216 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
10217
10218 * kern/misc.c (pupa_strndup): New function.
10219 * include/pupa/misc.h (pupa_strndup): New prototype.
10220
10221 * include/pupa/normal.h: Include <pupa/err.h>.
10222 (pupa_set_history): New prototype.
10223 (pupa_iterate_commands): New prototype.
10224 * normal/cmdline.c: Include <pupa/machine/partition.h>,
10225 <pupa/disk.h>, <pupa/file.h>.
10226 (hist_size): New variable.
10227 (hist_lines): Likewise.
10228 (hist_end): Likewise.
10229 (hist_used): Likewise.
10230 (pupa_set_history): New function.
10231 (pupa_history_get): Likewise.
10232 (pupa_history_add): Likewise.
10233 (pupa_history_replace): Likewise.
10234 (pupa_tab_complete): Likewise.
10235 (pupa_cmdline_run): Added tab completion and history buffer. Tab
10236 completion shows partitionnames while completing partitions, this
10237 feature was suggested by Jeff Bailey.
10238 * normal/command.c (pupa_iterate_commands): New function.
10239 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
10240 (pupa_normal_init): Initialize history buffer.
10241 (PUPA_MOD_INIT): Likewise.
10242 (pupa_normal_fini): Free the history buffer.
10243 (PUPA_MOD_FINI): Likewise.
10244
10245 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
10246 key.
10247
10248 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
10249 * configure.ac [i386]: Check for regparam bug.
10250 (NESTED_FUNC_ATTR) [! i386]: Defined.
10251
1f7315a3 102522003-11-17 Marco Gerards <metgerards@student.han.nl>
10253
10254 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
10255 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
10256 (pupa_emu_SOURCES): New variable.
10257 (pupa_emu_LDFLAGS): Likewise.
10258 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
10259 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
10260 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
10261 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
10262 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
10263 (pupa_jmp_buf): New typedef.
10264 (pupa_setjmp) [PUPA_UTIL]: New macro.
10265 (pupa_longjmp) [PUPA_UTIL]: Likewise.
10266 * include/pupa/term.h (struct pupa_term): New member `refresh'.
10267 (pupa_refresh): New prototype.
10268 * include/pupa/util/getroot.h: New file.
10269 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
10270 it.
10271 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
10272 (pupa_rescue_cmd_cat): Likewise.
10273 (pupa_rescue_cmd_ls): Likewise.
10274 (pupa_rescue_cmd_testload): Likewise.
10275 (pupa_rescue_cmd_lsmod): Likewise.
10276 * normal/cmdline.c (pupa_cmdline_get): Likewise.
10277 * normal/menu.c (run_menu): Likewise.
10278 * kern/term.c (pupa_cls): Likewise.
10279 (pupa_refresh): New function.
10280 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
10281 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
10282 * util/console.c: New file.
10283
10284 * util/i386/pc/getroot.c: New file.
10285 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
10286 (pupa_putchar): New function.
10287 (pupa_refresh): Likewise.
10288 (xgetcwd): Function moved to ...
10289 (strip_extra_slashes): Likewise.
10290 (get_prefix): Likewise.
10291 * util/i386/pc/getroot.c: ... here.
10292 (find_root_device): Function moved and renamed to...
10293 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
10294 Changed all callers.
10295 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
10296 and renamed to...
10297 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
10298 Changed all callers.
10299 * util/misc.c (pupa_memalign): New function.
10300 (pupa_mm_init_region): Likewise.
10301 (pupa_register_exported_symbols): Likewise.
10302 (pupa_putchar): Function removed.
10303 * util/pupa-emu.c: New file.
10304
9a5c1ade 103052003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
10306
10307 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
10308 (_multiboot_mod_SOURCES): New variable.
10309 (_multiboot_mod_CFLAGS): Likewise.
10310 * loader/i386/pc/multiboot.c: New file.
10311 * include/pupa/i386/pc/multiboot.h: Likewise.
10312 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
10313 (pupa_multiboot_real_boot): New function.
10314 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
10315 (pupa_multiboot_real_boot): New prototype.
10316 (pupa_rescue_cmd_multiboot): Likewise
10317 (pupa_rescue_cmd_module): Likewise.
10318
10319 * kern/loader.c (pupa_loader_set): Continue when
10320 pupa_loader_unload_func() fails.
10321 (pupa_loader_unset): New function.
10322 * include/pupa/loader.h (pupa_loader_unset): New prototype.
10323
10324 * kern/misc.c (pupa_stpcpy): New function.
10325 * include/pupa/misc.h (pupa_stpcpy): New prototype.
10326
8e72a9c0 103272003-11-12 Marco Gerards <metgerards@student.han.nl>
10328
10329 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
10330 for available extensions.
10331
10332 * include/pupa/i386/pc/time.h: New file.
10333 * kern/disk.c: Include <pupa/machine/time.h>.
10334 (PUPA_CACHE_TIMEOUT): New macro.
10335 (pupa_last_time): New variable.
10336 (pupa_disk_open): Flush the cache when there was a timeout.
10337 (pupa_disk_close): Reset the timer.
10338 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
10339 pupa_currticks.
10340 * util/misc.c: Include <sys/times.h>
10341 (pupa_get_rtc): New function.
10342
c4adbd32 103432003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10344
10345 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
10346 as blocks.
10347 (pupa_ext2_get_file_block): Use blocks member.
10348
10349 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
10350 first block. Return -1 instead of pupa_errno on error.
10351
bfd30f06 103522003-10-27 Marco Gerards <metgerards@student.han.nl>
10353
10354 * README: In the pupa-mkimage example use _chain instead of chain
10355 and ext2 instead of fat.
10356 * TODO: Replace ext2fs with jfs as an example. Add an item for
10357 adding journal playback for ext2fs.
10358 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
10359 (pkgdata_MODULES): Added ext2.mod.
10360 (ext2_mod_SOURCES): New variable.
10361 (ext2_mod_CFLAGS): Likewise.
10362 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
10363 * include/pupa/misc.h (pupa_strncpy): New prototype.
10364 (pupa_strcat): Likewise.
10365 (pupa_strncmp): Likewise.
10366 * kern/misc.c (pupa_strcat): Enable function.
10367 (pupa_strncpy): New function.
10368 (pupa_strncmp): Likewise.
10369 * fs/ext2.c: New file.
10370
10371 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
10372 when the read failed before retrying.
10373 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
10374 (_FILE_OFFSET_BITS): Likewise.
10375 * configure.ac: Added AC_SYS_LARGEFILE.
10376
98d15063 103772003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
10378
10379 * genmk.rb (PModule#rule): Make sure to get only symbol names
10380 from the output of nm.
10381 Reported by Robert Millan <zeratul2@wanadoo.es>.
10382
18d9c7cd 103832003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
10384
10385 I forgot to check in these changes for a long time. This adds
10386 incomplete support for VGA console, and this is still very
10387 buggy. Also, a lot of consideration is required for I18N,
10388 UNICODE, and VGA font issues. Therefore, assume that this is
10389 such that "better than nothing".
10390
10391 * font/manager.c: New file.
10392 * include/pupa/font.h: Likewise.
10393 * include/pupa/i386/pc/vga.h: Likewise.
10394 * term/i386/pc/vga.c: Likewise.
10395 * util/unifont2pff.rb: Likewise.
10396
10397 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
10398 (pkgdata_MODULES): Added vga.mod and font.mod.
10399 (vga_mod_SOURCES): New variables.
10400 (vga_mod_CFLAGS): Likewise.
10401 (font_mod_SOURCES): Likewise.
10402 (font_mod_CFLAGS): Likewise.
10403
10404 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
10405
10406 * include/pupa/term.h: Include pupa/err.h.
10407 (struct pupa_term): Added init and fini.
10408 Changed the argument of putchar to pupa_uint32_t.
10409
10410 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
10411 (pupa_console_real_putchar): New prototype.
10412 (pupa_console_putchar): Removed.
10413 (pupa_console_checkkey): Exported.
10414 (pupa_console_getkey): Likewise.
10415
10416 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
10417 characters.
10418
10419 * kern/term.c (pupa_term_set_current): Rewritten.
10420 (pupa_putchar): Likewise.
10421 (pupa_putcode): New function.
10422
10423 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
10424 (pupa_console_real_putchar): ... this.
10425 (pupa_vga_set_mode): New function.
10426 (pupa_vga_get_font): Likewise.
10427
10428 * normal/command.c: Include pupa/term.h.
10429 (terminal_command): New function.
10430 (pupa_command_init): Register the command "terminal".
10431
10432 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
10433 (DISP_UP): Likewise.
10434 (DISP_RIGHT): Likewise.
10435 (DISP_DOWN): Likewise.
10436 (DISP_HLINE): Likewise.
10437 (DISP_VLINE): Likewise.
10438 (DISP_UL): Likewise.
10439 (DISP_UR): Likewise.
10440 (DISP_LL): Likewise.
10441 (DISP_LR): Likewise.
10442
10443 * term/i386/pc/console.c (pupa_console_putchar): New function.
10444
977329f5 104452003-02-08 NIIBE Yutaka <gniibe@m17n.org>
10446
10447 * util/resolve.c (pupa_util_resolve_dependencies): BUG
10448 FIX. Reverse the path_list.
10449
10450 * include/pupa/normal.h: Export pupa_register_command and
10451 pupa_unregister_command.
10452
10453 * hello/hello.c (pupa_cmd_hello): New module.
10454 * conf/i386-pc.rmk: Added hello.mod.
10455
1f5ab428 104562003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
10457
10458 * kern/i386/pc/lzo1x.S: New file.
10459
10460 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
10461 (compress_kernel): New variable.
10462 (generate_image): Heavily modified to support compressing a
10463 large part of the core image.
10464
10465 * util/misc.c (pupa_util_read_image): Fix a file descriptor
10466 leak.
10467 (pupa_util_load_image): New function.
10468
10469 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
10470 (pupa_compressed_size): New variable.
10471 (codestart): Enable Gate A20 here.
10472 Decompress the compressed part of the core image.
10473 Rearrange the code to put functions and variables which are
10474 required for initialization in the non-compressed part.
10475 Include lzo1x.S.
10476
10477 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
10478 here.
10479
10480 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
10481
10482 * include/pupa/i386/pc/kernel.h
10483 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
10484 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
10485 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10486 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10487 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
10488
10489 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
10490
10491 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
10492 (Utility#rule): Likewise.
10493
10494 * configure.ac: Check if LZO is available.
10495
ce5bf700 104962003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
10497
10498 * include/pupa/normal.h: New file.
10499 * include/pupa/setjmp.h: Likewise.
10500 * include/pupa/i386/setjmp.h: Likewise.
10501 * normal/cmdline.c: Likewise.
10502 * normal/command.c: Likewise.
10503 * normal/main.c: Likewise.
10504 * normal/menu.c: Likewise.
10505 * normal/i386/setjmp.S: Likewise.
10506
10507 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
10508 (pupa_rescue_cmd_initrd): Likewise.
10509
10510 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
10511 Likewise.
10512
10513 * kern/i386/pc/startup.S (translation_table): New variable.
10514 (translate_keycode): New function.
10515 (pupa_console_getkey): Call translate_keycode.
10516
10517 * kern/rescue.c (attempt_normal_mode): New function.
10518 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
10519 it failed, print a message.
10520
10521 * kern/mm.c (pupa_real_malloc): Print more information when a
10522 free magic is broken.
10523 (pupa_free): If the first free header is not free actually, set
10524 it to P.
10525
10526 * kern/main.c (pupa_load_normal_mode): Just load the module
10527 "normal".
10528 (pupa_main): Don't print the message
10529 "Entering into rescue mode..." here.
10530
10531 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
10532 Declared.
10533 (pupa_rescue_cmd_initrd): Likewise.
10534 (pupa_rescue_cmd_initrd): Likewise.
10535
10536 * include/pupa/symbol.h (FUNCTION): Specify the type.
10537 (VARIABLE): Likewise.
10538
10539 * include/pupa/err.h (pupa_err_t): Added
10540 PUPA_ERR_UNKNOWN_COMMAND.
10541
10542 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
10543 (pupa_dl_get_prefix): Likewise.
10544
10545 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
10546 Added _chain.mod and _linux.mod instead of chain.mod and
10547 linux.mod.
10548 (chain_mod_SOURCES): Renamed to ...
10549 (_chain_mod_SOURCES): ... this.
10550 (chain_mod_CFLAGS): Renamed to ...
10551 (_chain_mod_CFLAGS): ... this.
10552 (linux_mod_SOURCES): Renamed to ...
10553 (_linux_mod_SOURCES): ... this.
10554 (linux_mod_CFLAGS): Renamed to ...
10555 (_linux_mod_CFLAGS): ... this.
10556 (normal_mod_SOURCES): New variable.
10557 (normal_mod_CFLAGS): Likewise.
10558 (normal_mod_ASFLAGS): Likewise.
10559
105602003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
10561
10562 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
10563 possible.
10564
fe6b695a 10565 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 10566 recursively.
10567 (pupa_dl_unref): Unrefer depending modules recursively.
10568 Don't call pupa_dl_unload implicitly, because PUPA can crash if
10569 a module is unloaded before one depending on that module is
10570 unloaded.
10571 (pupa_dl_unload): Unload depending modules explicitly,
10572 if possible.
10573
c04da074 105742003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
10575
10576 * include/pupa/i386/pc/linux.h: New file.
10577 * loader/i386/pc/linux.c: Likewise.
10578
10579 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
10580 Removed.
10581 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
10582 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
10583 of PUPA_CHAINLOADER_BOOT_SECTOR.
10584
10585 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
10586 (pupa_linux_prot_size): New variable.
10587 (pupa_linux_tmp_addr): Likewise.
10588 (pupa_linux_real_addr): Likewise.
10589 (pupa_linux_boot_zimage): New function.
10590 (pupa_linux_boot_bzimage): Likewise.
10591
10592 * kern/i386/pc/init.c (struct mem_region): New structure.
10593 (MAX_REGIONS): New macro.
10594 (mem_regions): New variable.
10595 (num_regions): Likewise.
10596 (pupa_os_area_addr): Likewise.
10597 (pupa_os_area_size): Likewise.
10598 (pupa_lower_mem): Likewise.
10599 (pupa_upper_mem): Likewise.
10600 (add_mem_region): New function.
10601 (compact_mem_regions): Likewise.
10602 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
10603 the size of the conventional memory and that of so-called upper
10604 memory (before the first memory hole).
10605 Instead of adding each found region to free memory, use
10606 add_mem_region and add them after removing overlaps.
10607 Also, add only 1/4 of the upper memory to free memory. The rest
10608 is used for loading OS images. Maybe this is ad hoc, but this
10609 makes it much easier to relocate OS images when booting.
10610
10611 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
10612 (pupa_enter_rescue_mode): Don't register initrd and module.
10613
10614 * kern/mm.c: Include pupa/dl.h.
10615
10616 * kern/main.c: Include pupa/file.h and pupa/device.h.
10617
10618 * kern/loader.c (pupa_loader_load_module_func): Removed.
10619 (pupa_loader_load_module): Likewise.
10620
10621 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
10622 ``.o''.
10623
10624 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
10625 (pupa_linux_tmp_addr): Likewise.
10626 (pupa_linux_real_addr): Likewise.
10627 (pupa_linux_boot_zimage): Likewise.
10628 (pupa_linux_boot_bzimage): Likewise.
10629
10630 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
10631 (pupa_upper_mem): Likewise.
10632 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
10633 module is too dangerous.
10634
10635 * include/pupa/loader.h (pupa_os_area_addr): Declared.
10636 (pupa_os_area_size): Likewise.
10637 (pupa_loader_set): Remove the first argument. Loader doesn't
10638 manage modules or initrd any longer.
10639 (pupa_loader_load_module): Removed.
10640
10641 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
10642 (linux_mod_SOURCES): New variable.
10643 (linux_mod_CFLAGS): Likewise.
10644
a13f9237 106452003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
10646
10647 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
10648 the length of a blocklist correctly.
10649
10650 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
10651 Use ioctl only if the OS file is a block device.
10652 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
10653 not very useful for normal files.
10654
10655 * kern/main.c (pupa_set_root_dev): New function.
10656 (pupa_load_normal_mode): Likewise.
10657 (pupa_main): Call those above.
10658
10659 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
10660 pupa_uint16_t.
10661
10662 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
10663
a5ffe966 106642003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10665
10666 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
10667 (setup): Configure the installed partition information and the
10668 dl prefix.
10669
10670 * loader/i386/pc/chainloader.c (my_mod): New variable.
10671 (pupa_chainloader_unload): New function.
10672 (pupa_rescue_cmd_chainloader): Refer itself.
10673 (PUPA_MOD_INIT): Save its own module in MY_MOD.
10674
10675 * kern/i386/pc/startup.S (install_partition): Removed.
10676 (version_string): Likewise.
10677 (config_file): Likewise.
10678 (pupa_install_dos_part): New variable.
10679 (pupa_install_bsd_part): Likewise.
10680 (pupa_prefix): Likewise.
10681 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
10682
10683 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
10684 and pupa/misc.h.
10685 (make_install_device): New function.
10686 (pupa_machine_init): Set the dl prefix.
10687
10688 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
10689 (buf): Renamed to ...
10690 (linebuf): ... this.
10691 (pupa_rescue_cmd_prefix): New function.
10692 (pupa_rescue_cmd_insmod): Likewise.
10693 (pupa_rescue_cmd_rmmod): Likewise.
10694 (pupa_rescue_cmd_lsmod): Likewise.
10695 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
10696 rmmod and lsmod.
10697
10698 * kern/mm.c (pupa_memalign): If failed even after invalidating
10699 disk caches, unload unneeded modules and retry.
10700
10701 * kern/misc.c (pupa_memmove): New function.
10702 (pupa_memcpy): Removed.
10703 (pupa_strcpy): New function.
10704 (pupa_itoa): Made static.
10705
10706 * kern/dl.c (pupa_dl_iterate): New function.
10707 (pupa_dl_ref): Likewise.
10708 (pupa_dl_unref): Likewise.
10709 (pupa_dl_unload): Return if succeeded or not.
10710 (pupa_dl_unload_unneeded): New function.
10711 (pupa_dl_unload_all): Likewise.
10712 (pupa_dl_init): Renamed to ...
10713 (pupa_dl_set_prefix): ... this.
10714 (pupa_dl_get_prefix): New function.
10715
10716 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
10717 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
10718 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10719 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10720 (pupa_install_dos_part): Declared.
10721 (pupa_install_bsd_part): Likewise.
10722 (pupa_prefix): Likewise.
10723 (pupa_boot_drive): Likewise.
10724
10725 * include/pupa/types.h: Fix a typo.
10726
10727 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
10728 pupa_memmove.
10729 (pupa_memmove): Declared.
10730 (pupa_strcpy): Likewise.
10731
10732 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
10733 pupa_mod_init takes one argument, its own module.
10734 (pupa_dl_unload_unneeded): Declared.
10735 (pupa_dl_unload_all): Likewise.
10736 (pupa_dl_ref): Likewise.
10737 (pupa_dl_unref): Likewise.
10738 (pupa_dl_iterate): Likewise.
10739 (pupa_dl_init): Renamed to ...
10740 (pupa_dl_set_prefix): ... this.
10741 (pupa_dl_get_prefix): Declared.
10742
10743 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
10744 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
10745 unloaded.
10746 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
10747 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
10748
10749 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
10750 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
10751
012d7999 107522003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10753
10754 * util/i386/pc/pupa-setup.c (setup): Define the internal
10755 function find_first_partition_start at the top level, because GCC
10756 3.0.x cannot compile internal functions in deeper scopes
10757 correctly.
10758 (find_root_device): Use lstat instead of stat.
10759 Don't follow symbolic links.
10760 Fix the path-constructing code.
10761
10762 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
10763 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
10764 by a BLKGETSIZE ioctl first, because block devices don't fill
10765 the member st_mode of the structure stat on Linux.
10766 [__linux__] (linux_find_partition): Use a temporary buffer
10767 REAL_DEV for the working space. Copy it to DEV before returning.
10768 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
10769 buffer cache consistent.
10770 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
10771 strncmp. The previous value was merely wrong.
10772 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
10773
10774 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
10775 FAT size is 12. The previous value was merely wrong.
10776
10777 * kern/main.c (pupa_main): Don't split the starting message from
10778 newlines.
10779
10780 * kern/term.c (pupa_putchar): Put CR after LF instead of before
10781 LF, because BIOS goes crazy about character attributes in this
10782 case.
10783
1cc73a62 107842003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10785
10786 * include/i386/pc/util/biosdisk.h: New file.
10787 * util/i386/pc/biosdisk.c: Likewise.
10788 * util/i386/pc/pupa-setup.c: Likewise.
10789
10790 * Makefile.in (INCLUDE_DISTFILES): Added
10791 include/pupa/i386/pc/util/biosdisk.h.
10792 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
10793 directory util/i386/pc.
10794 (install-local): Added a rule for sbin_UTILITIES.
10795 (uninstall): Likewise.
10796
10797 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
10798
10799 * util/misc.c (xrealloc): New function.
10800 (pupa_malloc): Likewise.
10801 (pupa_free): Likewise.
10802 (pupa_realloc): Likewise.
10803 (pupa_stop): Likewise.
10804 (pupa_putchar): Likewise.
10805
10806 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
10807
10808 * include/pupa/util/misc.h (xrealloc): Declared.
10809
10810 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
10811 macro.
10812 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
10813 (PUPA_BOOT_MACHINE_BPB_END): ... this.
10814
10815 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
10816 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10817
10818 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
10819 way should be implemented.
10820 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10821
10822 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
10823 the size of NAME for safety.
10824 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
10825 0x88.
10826
10827 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
10828 (pupa_setup_SOURCES): Likewise.
10829
10830 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
10831
08b70fe8 108322002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10833
10834 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
10835 bunch of pushl's from pusha, because this destroys the return
10836 value.
10837
62ddcc8f 108382002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10839
10840 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
10841 This means that any missing prototypes could be fatal. Also, you
10842 must take care when writing assembly code. See the comments at
10843 the beginning of startup.S, for more details.
10844
10845 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
10846 compilation mechanism.
10847 (pupa_chainloader_real_boot): Likewise.
10848 (pupa_biosdisk_rw_int13_extensions): Likewise.
10849 (pupa_biosdisk_rw_standard): Likewise.
10850 (pupa_biosdisk_check_int13_extensions): Likewise.
10851 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
10852 (pupa_biosdisk_get_diskinfo_standard): Likewise.
10853 (pupa_get_memsize): Likewise.
10854 (pupa_get_mmap_entry): Likewise.
10855 (pupa_console_putchar): Likewise.
10856 (pupa_console_setcursor): Likewise.
10857 (pupa_getrtsecs): Use pushl instead of push.
10858
10859 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
10860 memory instead of the stack for a mmap entry, because some
10861 BIOSes may ignore the maximum size and overflow.
10862
10863 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
10864
10865 * genmk.rb (PModule#rule): Compile automatically generated
10866 sources with module-specific CFLAGS as well as other sources.
10867
9962ed99 108682002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10869
10870 * configure.ac: Check ld.
10871 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
10872 respectively, before checking endianness and sizes.
10873
10874 * Makefile.in (LD): New variable.
10875
abdfc3c5 108762002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10877
10878 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
10879
6a161fa9 108802002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10881
10882 * Changelog: New file.
10883